正在显示
2 个修改的文件
包含
33 行增加
和
1 行删除
@@ -1111,6 +1111,36 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | @@ -1111,6 +1111,36 @@ func (cooperationContractService *CooperationContractService) UpdateCooperationC | ||
1111 | // 变更承接人 | 1111 | // 变更承接人 |
1112 | var undertakersChanged string | 1112 | var undertakersChanged string |
1113 | for i, undertaker := range cooperationContractSaved.Undertakers { | 1113 | for i, undertaker := range cooperationContractSaved.Undertakers { |
1114 | + if undertaker.Referrer == nil { | ||
1115 | + undertaker.Referrer = &domain.Referrer{ | ||
1116 | + UserId: 0, | ||
1117 | + UserBaseId: 0, | ||
1118 | + Roles: nil, | ||
1119 | + Orgs: nil, | ||
1120 | + Org: nil, | ||
1121 | + Department: nil, | ||
1122 | + Company: nil, | ||
1123 | + UserInfo: nil, | ||
1124 | + UserType: 0, | ||
1125 | + UserName: "", | ||
1126 | + UserPhone: "", | ||
1127 | + } | ||
1128 | + } | ||
1129 | + if undertaker.Salesman == nil { | ||
1130 | + undertaker.Salesman = &domain.Salesman{ | ||
1131 | + UserId: 0, | ||
1132 | + UserBaseId: 0, | ||
1133 | + Roles: nil, | ||
1134 | + Orgs: nil, | ||
1135 | + Org: nil, | ||
1136 | + Department: nil, | ||
1137 | + Company: nil, | ||
1138 | + UserInfo: nil, | ||
1139 | + UserType: 0, | ||
1140 | + UserName: "", | ||
1141 | + UserPhone: "", | ||
1142 | + } | ||
1143 | + } | ||
1114 | undertakersChanged = undertakersChanged + strconv.FormatInt(int64(i), 10) + "(" + undertaker.UserName + "," + undertaker.Referrer.UserName + "," + undertaker.Salesman.UserName + ")" | 1144 | undertakersChanged = undertakersChanged + strconv.FormatInt(int64(i), 10) + "(" + undertaker.UserName + "," + undertaker.Referrer.UserName + "," + undertaker.Salesman.UserName + ")" |
1115 | } | 1145 | } |
1116 | undertakerChangeTemp2 := "【" + undertakersChanged + "】" | 1146 | undertakerChangeTemp2 := "【" + undertakersChanged + "】" |
@@ -125,11 +125,13 @@ func (creditAccountService *CreditAccountService) CreateCreditAccount(createCred | @@ -125,11 +125,13 @@ func (creditAccountService *CreditAccountService) CreateCreditAccount(createCred | ||
125 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) | 125 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, err.Error()) |
126 | } else { | 126 | } else { |
127 | // 校验共创用户是否一致 | 127 | // 校验共创用户是否一致 |
128 | + if len(dividendsEstimates) > 0 { | ||
128 | for i, _ := range dividendsEstimates { | 129 | for i, _ := range dividendsEstimates { |
129 | - if dividendsEstimates[i].DividendsUser.UserId != dividendsEstimates[i+1].DividendsUser.UserId { | 130 | + if dividendsEstimates[i].DividendsUser.UserId != dividendsEstimates[0].DividendsUser.UserId { |
130 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "请勾选同一个共创用户进行结算") | 131 | return nil, application.ThrowError(application.INTERNAL_SERVER_ERROR, "请勾选同一个共创用户进行结算") |
131 | } | 132 | } |
132 | } | 133 | } |
134 | + } | ||
133 | 135 | ||
134 | // 校验分红预算单是否可以进行预算 | 136 | // 校验分红预算单是否可以进行预算 |
135 | for _, dividendsEstimate := range dividendsEstimates { | 137 | for _, dividendsEstimate := range dividendsEstimates { |
-
请 注册 或 登录 后发表评论