...
|
...
|
@@ -386,6 +386,12 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec |
|
|
}
|
|
|
}
|
|
|
|
|
|
if utils.IsContain(undertakerUserTypes, int32(1)) && utils.IsContain(undertakerUserTypes, int32(2)) {
|
|
|
undertakerUserTypes = append(undertakerUserTypes, int32(3))
|
|
|
}
|
|
|
|
|
|
newUndertakerTypesUncheckedAvailable := utils.Intersect32(undertakerTypesUncheckedAvailable, undertakerUserTypes)
|
|
|
|
|
|
log.Logger.Info("承接人类型", map[string]interface{}{
|
|
|
"undertakerUserTypes": undertakerUserTypes,
|
|
|
})
|
...
|
...
|
@@ -417,7 +423,7 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec |
|
|
}
|
|
|
|
|
|
cooperationProjectDto := &dto.CooperationProjectsDto{}
|
|
|
if err := cooperationProjectDto.LoadDto(cooperationProject, nil, undertakerTypesUncheckedAvailable, applicants); err != nil {
|
|
|
if err := cooperationProjectDto.LoadDto(cooperationProject, nil, newUndertakerTypesUncheckedAvailable, applicants); err != nil {
|
|
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
|
|
}
|
|
|
if err := transactionContext.CommitTransaction(); err != nil {
|
...
|
...
|
@@ -681,6 +687,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
var undertakerTypes []int32
|
|
|
var k1, k2 int32
|
|
|
if len(applicantTypes) > 0 {
|
...
|
...
|
@@ -696,6 +703,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
|
|
if k1 != 0 && k2 != 0 {
|
|
|
undertakerTypes = append(undertakerTypes, 3)
|
|
|
}
|
|
|
|
|
|
// 校验可以修改的承接人(申请人)类型
|
|
|
for _, t := range undertakerTypes {
|
|
|
if !utils.IsContain(updateCooperationProjectCommand.CooperationProjectUndertakerTypes, t) {
|
...
|
...
|
|