|
@@ -75,32 +75,7 @@ public class ProcurementDomesticCustomerCreditServiceImpl |
|
@@ -75,32 +75,7 @@ public class ProcurementDomesticCustomerCreditServiceImpl |
|
75
|
PageHelperUtil.startPage(pageIndex, pageSize);
|
75
|
PageHelperUtil.startPage(pageIndex, pageSize);
|
|
76
|
List<ProcurementDomesticCustomerCredit> datas = this.query(vo);
|
76
|
List<ProcurementDomesticCustomerCredit> datas = this.query(vo);
|
|
77
|
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(datas)) {
|
77
|
if (org.apache.commons.collections.CollectionUtils.isNotEmpty(datas)) {
|
|
78
|
- //流程数据
|
|
|
|
79
|
- List<FlowInstanceWrapper> flowByConditionList = flowInstanceWrapperService.getFlowByBusinessIdList(
|
|
|
|
80
|
- datas.stream().map(ProcurementDomesticCustomerCredit::getId).collect(Collectors.toList()));
|
|
|
|
81
|
- if (org.apache.commons.collections.CollectionUtils.isNotEmpty(flowByConditionList)) {
|
|
|
|
82
|
- List<String> idList = flowByConditionList.stream().map(FlowInstanceWrapper::getBusinessId).collect(Collectors.toList());
|
|
|
|
83
|
- for (ProcurementDomesticCustomerCredit customerCredit : datas) {
|
|
|
|
84
|
- if (idList.contains(customerCredit.getId())) {
|
|
|
|
85
|
- customerCredit.setShowExamineDetail(true);
|
|
|
|
86
|
- } else {
|
|
|
|
87
|
- customerCredit.setShowExamineDetail(false);
|
|
|
|
88
|
- }
|
|
|
|
89
|
- }
|
|
|
|
90
|
- }
|
|
|
|
91
|
- // 获取当前人员的待办任务数据
|
|
|
|
92
|
- List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId());
|
|
|
|
93
|
- if (CollectionUtils.isEmpty(flowTaskList)) {
|
|
|
|
94
|
- return PageResultUtil.convert(new PageInfo<>(datas));
|
|
|
|
95
|
- }
|
|
|
|
96
|
- List<String> ids = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList());
|
|
|
|
97
|
- for (ProcurementDomesticCustomerCredit customerCredit : datas) {
|
|
|
|
98
|
- if (ids.contains(customerCredit.getId())) {
|
|
|
|
99
|
- customerCredit.setShowExamine(true);
|
|
|
|
100
|
- } else {
|
|
|
|
101
|
- customerCredit.setShowExamine(false);
|
|
|
|
102
|
- }
|
|
|
|
103
|
- }
|
78
|
+ fillShowExamineInfo(datas);
|
|
104
|
}
|
79
|
}
|
|
105
|
return PageResultUtil.convert(new PageInfo<>(datas));
|
80
|
return PageResultUtil.convert(new PageInfo<>(datas));
|
|
106
|
}
|
81
|
}
|
|
@@ -113,24 +88,7 @@ public class ProcurementDomesticCustomerCreditServiceImpl |
|
@@ -113,24 +88,7 @@ public class ProcurementDomesticCustomerCreditServiceImpl |
|
113
|
@Override
|
88
|
@Override
|
|
114
|
public ProcurementDomesticCustomerCredit findById(String id) {
|
89
|
public ProcurementDomesticCustomerCredit findById(String id) {
|
|
115
|
ProcurementDomesticCustomerCredit customerCredit = getBaseMapper().findById(id);
|
90
|
ProcurementDomesticCustomerCredit customerCredit = getBaseMapper().findById(id);
|
|
116
|
- //流程数据
|
|
|
|
117
|
- List<String> ids = new ArrayList<>();
|
|
|
|
118
|
- ids.add(customerCredit.getId());
|
|
|
|
119
|
- List<FlowInstanceWrapper> flowByBusinessIdList = flowInstanceWrapperService.getFlowByBusinessIdList(ids);
|
|
|
|
120
|
- if (org.apache.commons.collections.CollectionUtils.isNotEmpty(flowByBusinessIdList)) {
|
|
|
|
121
|
- List<String> collect = flowByBusinessIdList.stream().map(FlowInstanceWrapper::getBusinessId).collect(Collectors.toList());
|
|
|
|
122
|
- customerCredit.setShowExamineDetail(collect.contains(customerCredit.getId()));
|
|
|
|
123
|
- } else {
|
|
|
|
124
|
- customerCredit.setShowExamineDetail(false);
|
|
|
|
125
|
- }
|
|
|
|
126
|
- // 获取当前人员的待办任务数据
|
|
|
|
127
|
- List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId());
|
|
|
|
128
|
- if (org.apache.commons.collections.CollectionUtils.isNotEmpty(flowTaskList)) {
|
|
|
|
129
|
- List<String> businessIds = flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toList());
|
|
|
|
130
|
- customerCredit.setShowExamine(businessIds.contains(customerCredit.getId()));
|
|
|
|
131
|
- } else {
|
|
|
|
132
|
- customerCredit.setShowExamine(false);
|
|
|
|
133
|
- }
|
91
|
+ fillShowExamineInfo(java.util.Collections.singletonList(customerCredit));
|
|
134
|
return customerCredit;
|
92
|
return customerCredit;
|
|
135
|
}
|
93
|
}
|
|
136
|
|
94
|
|
|
@@ -339,6 +297,17 @@ public class ProcurementDomesticCustomerCreditServiceImpl |
|
@@ -339,6 +297,17 @@ public class ProcurementDomesticCustomerCreditServiceImpl |
|
339
|
}
|
297
|
}
|
|
340
|
|
298
|
|
|
341
|
@Override
|
299
|
@Override
|
|
|
|
300
|
+ public void updateReviewStatus(String id, String status) {
|
|
|
|
301
|
+ if (StringUtils.isBlank(id) || StringUtils.isBlank(status)) {
|
|
|
|
302
|
+ throw new DefaultClientException("资信ID、审核状态不能为空!");
|
|
|
|
303
|
+ }
|
|
|
|
304
|
+ LambdaUpdateWrapper<ProcurementDomesticCustomerCredit> updateWrapper = Wrappers.lambdaUpdate(ProcurementDomesticCustomerCredit.class)
|
|
|
|
305
|
+ .set(ProcurementDomesticCustomerCredit::getChangeReviewStatus, status)
|
|
|
|
306
|
+ .eq(ProcurementDomesticCustomerCredit::getId, id);
|
|
|
|
307
|
+ getBaseMapper().update(updateWrapper);
|
|
|
|
308
|
+ }
|
|
|
|
309
|
+
|
|
|
|
310
|
+ @Override
|
|
342
|
public void updateFreeze(List<String> ids, Boolean freeze) {
|
311
|
public void updateFreeze(List<String> ids, Boolean freeze) {
|
|
343
|
if (CollectionUtils.isEmpty(ids) || freeze == null) {
|
312
|
if (CollectionUtils.isEmpty(ids) || freeze == null) {
|
|
344
|
throw new DefaultClientException("资信IDs、冻结状态不能为空!");
|
313
|
throw new DefaultClientException("资信IDs、冻结状态不能为空!");
|
|
@@ -485,6 +454,48 @@ public class ProcurementDomesticCustomerCreditServiceImpl |
|
@@ -485,6 +454,48 @@ public class ProcurementDomesticCustomerCreditServiceImpl |
|
485
|
}
|
454
|
}
|
|
486
|
|
455
|
|
|
487
|
/**
|
456
|
/**
|
|
|
|
457
|
+ * 回填主审核和变更评审的审核按钮展示信息
|
|
|
|
458
|
+ *
|
|
|
|
459
|
+ * @param datas 数据列表
|
|
|
|
460
|
+ */
|
|
|
|
461
|
+ private void fillShowExamineInfo(List<ProcurementDomesticCustomerCredit> datas) {
|
|
|
|
462
|
+ if (CollectionUtils.isEmpty(datas)) {
|
|
|
|
463
|
+ return;
|
|
|
|
464
|
+ }
|
|
|
|
465
|
+
|
|
|
|
466
|
+ List<ProcurementDomesticCustomerCredit> validDatas = datas.stream()
|
|
|
|
467
|
+ .filter(java.util.Objects::nonNull)
|
|
|
|
468
|
+ .collect(Collectors.toList());
|
|
|
|
469
|
+ if (CollectionUtils.isEmpty(validDatas)) {
|
|
|
|
470
|
+ return;
|
|
|
|
471
|
+ }
|
|
|
|
472
|
+
|
|
|
|
473
|
+ List<String> businessIds = validDatas.stream().map(ProcurementDomesticCustomerCredit::getId).collect(Collectors.toList());
|
|
|
|
474
|
+ List<FlowInstanceWrapper> flowByConditionList = flowInstanceWrapperService.getFlowByBusinessIdList(businessIds);
|
|
|
|
475
|
+ Set<String> flowBusinessIdSet = CollectionUtils.isNotEmpty(flowByConditionList)
|
|
|
|
476
|
+ ? flowByConditionList.stream().map(FlowInstanceWrapper::getBusinessId).collect(Collectors.toSet())
|
|
|
|
477
|
+ : new HashSet<>();
|
|
|
|
478
|
+
|
|
|
|
479
|
+ List<FlowTaskDto> flowTaskList = flowTaskWrapperMapper.queryTodoList(new QueryTodoTaskListVo(), SecurityUtil.getCurrentUser().getId());
|
|
|
|
480
|
+ Set<String> todoBusinessIdSet = CollectionUtils.isNotEmpty(flowTaskList)
|
|
|
|
481
|
+ ? flowTaskList.stream().map(FlowTaskDto::getBusinessId).collect(Collectors.toSet())
|
|
|
|
482
|
+ : new HashSet<>();
|
|
|
|
483
|
+
|
|
|
|
484
|
+ for (ProcurementDomesticCustomerCredit customerCredit : validDatas) {
|
|
|
|
485
|
+ boolean hasFlow = flowBusinessIdSet.contains(customerCredit.getId());
|
|
|
|
486
|
+ boolean hasTodo = todoBusinessIdSet.contains(customerCredit.getId());
|
|
|
|
487
|
+
|
|
|
|
488
|
+ customerCredit.setShowExamineDetail(hasFlow && StringUtils.isNotBlank(customerCredit.getStatus()));
|
|
|
|
489
|
+ customerCredit.setShowExamine(hasTodo && "AUDIT".equals(customerCredit.getStatus()));
|
|
|
|
490
|
+
|
|
|
|
491
|
+ customerCredit.setShowChangeReviewExamineDetail(
|
|
|
|
492
|
+ hasFlow && StringUtils.isNotBlank(customerCredit.getChangeReviewStatus()));
|
|
|
|
493
|
+ customerCredit.setShowChangeReviewExamine(
|
|
|
|
494
|
+ hasTodo && "AUDIT".equals(customerCredit.getChangeReviewStatus()));
|
|
|
|
495
|
+ }
|
|
|
|
496
|
+ }
|
|
|
|
497
|
+
|
|
|
|
498
|
+ /**
|
|
488
|
* 获取节点首个审批人名称
|
499
|
* 获取节点首个审批人名称
|
|
489
|
*
|
500
|
*
|
|
490
|
* @param nodeJson 流程节点JSON
|
501
|
* @param nodeJson 流程节点JSON
|