|
@@ -386,6 +386,12 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec |
|
@@ -386,6 +386,12 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec |
386
|
}
|
386
|
}
|
387
|
}
|
387
|
}
|
388
|
|
388
|
|
|
|
389
|
+ if utils.IsContain(undertakerUserTypes, int32(1)) && utils.IsContain(undertakerUserTypes, int32(2)) {
|
|
|
390
|
+ undertakerUserTypes = append(undertakerUserTypes, int32(3))
|
|
|
391
|
+ }
|
|
|
392
|
+
|
|
|
393
|
+ newUndertakerTypesUncheckedAvailable := utils.Intersect32(undertakerTypesUncheckedAvailable, undertakerUserTypes)
|
|
|
394
|
+
|
389
|
log.Logger.Info("承接人类型", map[string]interface{}{
|
395
|
log.Logger.Info("承接人类型", map[string]interface{}{
|
390
|
"undertakerUserTypes": undertakerUserTypes,
|
396
|
"undertakerUserTypes": undertakerUserTypes,
|
391
|
})
|
397
|
})
|
|
@@ -417,7 +423,7 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec |
|
@@ -417,7 +423,7 @@ func (cooperationProjectService *CooperationProjectService) GetCooperationProjec |
417
|
}
|
423
|
}
|
418
|
|
424
|
|
419
|
cooperationProjectDto := &dto.CooperationProjectsDto{}
|
425
|
cooperationProjectDto := &dto.CooperationProjectsDto{}
|
420
|
- if err := cooperationProjectDto.LoadDto(cooperationProject, nil, undertakerTypesUncheckedAvailable, applicants); err != nil {
|
426
|
+ if err := cooperationProjectDto.LoadDto(cooperationProject, nil, newUndertakerTypesUncheckedAvailable, applicants); err != nil {
|
421
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
427
|
return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error())
|
422
|
}
|
428
|
}
|
423
|
if err := transactionContext.CommitTransaction(); err != nil {
|
429
|
if err := transactionContext.CommitTransaction(); err != nil {
|
|
@@ -681,6 +687,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
|
@@ -681,6 +687,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
681
|
}
|
687
|
}
|
682
|
}
|
688
|
}
|
683
|
}
|
689
|
}
|
|
|
690
|
+
|
684
|
var undertakerTypes []int32
|
691
|
var undertakerTypes []int32
|
685
|
var k1, k2 int32
|
692
|
var k1, k2 int32
|
686
|
if len(applicantTypes) > 0 {
|
693
|
if len(applicantTypes) > 0 {
|
|
@@ -696,6 +703,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
|
@@ -696,6 +703,7 @@ func (cooperationProjectService *CooperationProjectService) UpdateCooperationPro |
696
|
if k1 != 0 && k2 != 0 {
|
703
|
if k1 != 0 && k2 != 0 {
|
697
|
undertakerTypes = append(undertakerTypes, 3)
|
704
|
undertakerTypes = append(undertakerTypes, 3)
|
698
|
}
|
705
|
}
|
|
|
706
|
+
|
699
|
// 校验可以修改的承接人(申请人)类型
|
707
|
// 校验可以修改的承接人(申请人)类型
|
700
|
for _, t := range undertakerTypes {
|
708
|
for _, t := range undertakerTypes {
|
701
|
if !utils.IsContain(updateCooperationProjectCommand.CooperationProjectUndertakerTypes, t) {
|
709
|
if !utils.IsContain(updateCooperationProjectCommand.CooperationProjectUndertakerTypes, t) {
|