|
|
@@ -280,50 +280,62 @@ public class MsCaseApplicationServiceImpl implements MsCaseApplicationService {
|
|
280
|
280
|
StringBuilder applicantName = new StringBuilder();
|
|
281
|
281
|
StringBuilder respondentName = new StringBuilder();
|
|
282
|
282
|
for (MsCaseAffiliate affiliate : affiliates) {
|
|
283
|
|
- // 当前用户是操作人
|
|
284
|
|
- if(affiliate.getUserId()!=null && affiliate.getUserId().equals(loginUserId)
|
|
285
|
|
- && affiliate.getRoleType()!=null && affiliate.getOperatorFlag()!=null && affiliate.getOperatorFlag()==1) {
|
|
286
|
|
- if (vo.getAppOperatorFlag() == null && (affiliate.getRoleType()==1 || affiliate.getRoleType()==2)) {
|
|
287
|
|
- // 设置申请操作人标记
|
|
288
|
|
- vo.setAppOperatorFlag(1);
|
|
289
|
283
|
|
|
290
|
|
- }
|
|
291
|
|
- if (vo.getResOperatorFlag() == null && (affiliate.getRoleType()==3 || affiliate.getRoleType()==4)) {
|
|
292
|
|
- // 设置被申请操作人标记
|
|
293
|
|
- vo.setResOperatorFlag(1);
|
|
|
284
|
+ // 当前用户是操作人
|
|
|
285
|
+ if (affiliate.getUserId()!=null && affiliate.getRoleType() != null && affiliate.getOperatorFlag() != null && affiliate.getOperatorFlag() == 1) {
|
|
|
286
|
+ if (vo.getAppOperatorFlag() == null && (affiliate.getRoleType() == 1 || affiliate.getRoleType() == 2)) {
|
|
|
287
|
+ // 申请人操作人
|
|
|
288
|
+ if(affiliate.getUserId().equals(loginUserId) &&!vo.getCaseStatusName().equals("待签名")){
|
|
|
289
|
+ vo.setAppOperatorFlag(1);
|
|
|
290
|
+ }else if(vo.getCaseStatusName().equals("待签名")) {
|
|
|
291
|
+ if(affiliate.getUserId().equals(loginUserId)){
|
|
|
292
|
+ vo.setAppOperatorFlag(1);
|
|
|
293
|
+ }else {
|
|
|
294
|
+ vo.setAppOperatorFlag(0);
|
|
|
295
|
+ }
|
|
|
296
|
+ }
|
|
|
297
|
+
|
|
|
298
|
+ }
|
|
|
299
|
+ if (vo.getResOperatorFlag() == null && (affiliate.getRoleType() == 3 || affiliate.getRoleType() == 4)) {
|
|
|
300
|
+ // 申请人操作人
|
|
|
301
|
+ if(Objects.equals(affiliate.getUserId(), loginUserId) &&!vo.getCaseStatusName().equals("待签名")){
|
|
|
302
|
+ vo.setResOperatorFlag(1);
|
|
|
303
|
+ }else if(vo.getCaseStatusName().equals("待签名")) {
|
|
|
304
|
+ if(Objects.equals(affiliate.getUserId(), loginUserId)){
|
|
|
305
|
+ vo.setResOperatorFlag(1);
|
|
|
306
|
+ }else {
|
|
|
307
|
+ vo.setResOperatorFlag(0);
|
|
|
308
|
+ }
|
|
|
309
|
+ }
|
|
294
|
310
|
|
|
|
311
|
+ }
|
|
295
|
312
|
}
|
|
296
|
|
- }
|
|
297
|
313
|
if(vo.getOrganizeFlag()==null || vo.getOrganizeFlag()!=1) {
|
|
298
|
314
|
if (StrUtil.isNotEmpty(affiliate.getRoleName()) && affiliate.getRoleName().equals("申请人")
|
|
299
|
315
|
&& affiliate.getRoleType() != null && affiliate.getRoleType() == 1&&StrUtil.isNotEmpty(affiliate.getName())
|
|
300
|
|
- && !applicantName.toString().contains(affiliate.getName())) {
|
|
|
316
|
+ && !applicantName.toString().contains(affiliate.getName()+Constants.CN_SPLIT_COMMA)) {
|
|
301
|
317
|
applicantName.append(affiliate.getName()).append(Constants.CN_SPLIT_COMMA);
|
|
302
|
318
|
}
|
|
303
|
319
|
}else {
|
|
304
|
320
|
// 组织机构
|
|
305
|
321
|
if ( affiliate.getRoleType() != null && affiliate.getRoleType() == 1&&StrUtil.isNotEmpty(affiliate.getApplicantOrgName())
|
|
306
|
|
- && !applicantName.toString().contains(affiliate.getApplicantOrgName())) {
|
|
|
322
|
+ && !applicantName.toString().contains(affiliate.getApplicantOrgName()+Constants.CN_SPLIT_COMMA)) {
|
|
307
|
323
|
applicantName.append(affiliate.getApplicantOrgName()).append(Constants.CN_SPLIT_COMMA);
|
|
308
|
324
|
}
|
|
309
|
325
|
}
|
|
310
|
326
|
if(vo.getOrganizeFlag()==null || vo.getOrganizeFlag()!=1) {
|
|
311
|
327
|
if (StrUtil.isNotEmpty(affiliate.getRoleName()) && affiliate.getRoleName().equals("被申请人")
|
|
312
|
328
|
&& affiliate.getRoleType() != null && affiliate.getRoleType() == 3&&StrUtil.isNotEmpty(affiliate.getName())
|
|
313
|
|
- && !respondentName.toString().contains(affiliate.getName())) {
|
|
|
329
|
+ && !respondentName.toString().contains(affiliate.getName()+Constants.CN_SPLIT_COMMA)) {
|
|
314
|
330
|
|
|
315
|
331
|
respondentName.append(affiliate.getName()).append(Constants.CN_SPLIT_COMMA);
|
|
316
|
332
|
}
|
|
317
|
333
|
}else {
|
|
318
|
334
|
// 组织机构
|
|
319
|
|
- if ( affiliate.getRoleType() != null && affiliate.getRoleType() == 3&&StrUtil.isNotEmpty(affiliate.getApplicantOrgName())&& !respondentName.toString().contains(affiliate.getApplicantOrgName())) {
|
|
|
335
|
+ if ( affiliate.getRoleType() != null && affiliate.getRoleType() == 3&&StrUtil.isNotEmpty(affiliate.getApplicantOrgName())&& !respondentName.toString().contains(affiliate.getApplicantOrgName()+Constants.CN_SPLIT_COMMA)) {
|
|
320
|
336
|
respondentName.append(affiliate.getApplicantOrgName()).append(Constants.CN_SPLIT_COMMA);
|
|
321
|
337
|
}
|
|
322
|
338
|
}
|
|
323
|
|
-// if(StrUtil.isNotEmpty(affiliate.getRoleName()) && affiliate.getRoleName().equals("被申请人")
|
|
324
|
|
-// && affiliate.getRoleType()!=null && affiliate.getRoleType()==3&&StrUtil.isNotEmpty(affiliate.getName())){
|
|
325
|
|
-// respondentName.append(affiliate.getName()).append(Constants.CN_SPLIT_COMMA);
|
|
326
|
|
-// }
|
|
327
|
339
|
|
|
328
|
340
|
}
|
|
329
|
341
|
vo.setApplicationName(removeLastComma(applicantName.toString(),Constants.CN_SPLIT_COMMA));
|