|
@@ -63,8 +63,8 @@ type ContractService interface {
|
|
|
Add(contractData *viewmodels.Contracts, projectId int, bidsectionId int, treeId int) error
|
|
|
Update(contractData *viewmodels.Contracts, projectId int, bidsectionId int, treeId int) error
|
|
|
Delete(projectId int, bidsectionId int, treeId int, id int) error
|
|
|
- Close(projectId int, bidsectionId int, treeId int, id int) error
|
|
|
- Unlock(projectId int, bidsectionId int, treeId int, id int) error
|
|
|
+ Close(projectId int, bidsectionId int, treeId int, id int, treeType int) error
|
|
|
+ Unlock(projectId int, bidsectionId int, treeId int, id int, treeType int) error
|
|
|
GetSurvey(bidsectionId int, projectId int, contractsType int) map[string]interface{}
|
|
|
|
|
|
ReturnCreate(returnData *viewmodels.ContractsReturn, projectId int, bidsectionId int, contractsId int, projectAccountId int) error
|
|
@@ -490,9 +490,9 @@ func (s *contractService) Delete(projectId int, bidsectionId int, treeId int, id
|
|
|
}
|
|
|
|
|
|
// 关闭合同
|
|
|
-func (s *contractService) Close(projectId int, bidsectionId int, treeId int, id int) error {
|
|
|
+func (s *contractService) Close(projectId int, bidsectionId int, treeId int, id int, treeType int) error {
|
|
|
// 1. 项目节存在
|
|
|
- contractsTree := s.treeContractDao.Get(treeId, bidsectionId, projectId, 0)
|
|
|
+ contractsTree := s.treeContractDao.Get(treeId, bidsectionId, projectId, treeType)
|
|
|
if contractsTree.Id == 0 {
|
|
|
return errors.New("未找到项目节")
|
|
|
}
|
|
@@ -516,9 +516,9 @@ func (s *contractService) Close(projectId int, bidsectionId int, treeId int, id
|
|
|
}
|
|
|
|
|
|
// 解锁合同
|
|
|
-func (s *contractService) Unlock(projectId int, bidsectionId int, treeId int, id int) error {
|
|
|
+func (s *contractService) Unlock(projectId int, bidsectionId int, treeId int, id int, treeType int) error {
|
|
|
// 1. 项目节存在
|
|
|
- contractsTree := s.treeContractDao.Get(treeId, bidsectionId, projectId, 0)
|
|
|
+ contractsTree := s.treeContractDao.Get(treeId, bidsectionId, projectId, treeType)
|
|
|
if contractsTree.Id == 0 {
|
|
|
return errors.New("未找到项目节")
|
|
|
}
|