|
@@ -43,7 +43,7 @@ type ContractService interface {
|
|
ValidRuleContractPaid(ctx iris.Context) (*viewmodels.ContractsPaid, error)
|
|
ValidRuleContractPaid(ctx iris.Context) (*viewmodels.ContractsPaid, error)
|
|
ValidRuleContractPaidDel(ctx iris.Context) (*viewmodels.ContractsPaid, error)
|
|
ValidRuleContractPaidDel(ctx iris.Context) (*viewmodels.ContractsPaid, error)
|
|
|
|
|
|
- Get(treeId int, bidsectionId int, projectId int) *viewmodels.TreeSectionContract
|
|
|
|
|
|
+ Get(treeId int, bidsectionId int, projectId int, treeType int) *viewmodels.TreeSectionContract
|
|
GetSectionTreeContract(attribution string, bidsectionId int, projectId int, treeType int) []*viewmodels.Contracts
|
|
GetSectionTreeContract(attribution string, bidsectionId int, projectId int, treeType int) []*viewmodels.Contracts
|
|
GetSecionTree(bidsectionId int, projectId int, treeType int) *viewmodels.TreeSectionContract
|
|
GetSecionTree(bidsectionId int, projectId int, treeType int) *viewmodels.TreeSectionContract
|
|
SetSection(templateNumber int, bidsectionId int, projectIdInt int, treeType int) error
|
|
SetSection(templateNumber int, bidsectionId int, projectIdInt int, treeType int) error
|
|
@@ -282,18 +282,18 @@ func (s *contractService) ValidRuleContractDel(ctx iris.Context) (*viewmodels.Co
|
|
|
|
|
|
//------------------------------------------------------------
|
|
//------------------------------------------------------------
|
|
// 获得项目节
|
|
// 获得项目节
|
|
-func (s *contractService) Get(treeId int, bidsectionId int, projectId int) *viewmodels.TreeSectionContract {
|
|
|
|
|
|
+func (s *contractService) Get(treeId int, bidsectionId int, projectId int, treeType int) *viewmodels.TreeSectionContract {
|
|
// 1.获得项目节
|
|
// 1.获得项目节
|
|
- section := s.treeContractDao.Get(treeId, bidsectionId, projectId, 0)
|
|
|
|
|
|
+ section := s.treeContractDao.Get(treeId, bidsectionId, projectId, treeType)
|
|
// 2.构造数据
|
|
// 2.构造数据
|
|
sectionVM := s.makeSectionView(section)
|
|
sectionVM := s.makeSectionView(section)
|
|
// 3.更新 上移和下一的限制
|
|
// 3.更新 上移和下一的限制
|
|
- youngerBrotherList := s.treeContractDao.GetYoungerBrother(section.Serial, section.Depth, section.ParentId, bidsectionId, projectId, 0)
|
|
|
|
|
|
+ youngerBrotherList := s.treeContractDao.GetYoungerBrother(section.Serial, section.Depth, section.ParentId, bidsectionId, projectId, treeType)
|
|
if len(youngerBrotherList) == 0 {
|
|
if len(youngerBrotherList) == 0 {
|
|
sectionVM.IsEnd = true
|
|
sectionVM.IsEnd = true
|
|
}
|
|
}
|
|
sectionVM.ElderBrother = true
|
|
sectionVM.ElderBrother = true
|
|
- elderBrotherList := s.treeContractDao.GetElderBrother(section.Serial, section.Depth, section.ParentId, bidsectionId, projectId, 0)
|
|
|
|
|
|
+ elderBrotherList := s.treeContractDao.GetElderBrother(section.Serial, section.Depth, section.ParentId, bidsectionId, projectId, treeType)
|
|
if len(elderBrotherList) == 0 {
|
|
if len(elderBrotherList) == 0 {
|
|
sectionVM.ElderBrother = false
|
|
sectionVM.ElderBrother = false
|
|
}
|
|
}
|