|
@@ -802,6 +802,9 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
Optional.ofNullable(tfCustomFlowEntity).orElseThrow(() -> ExceptionResultEnum.FLOW_ENTITY_NO_DATA.exception());
|
|
Optional.ofNullable(tfCustomFlowEntity).orElseThrow(() -> ExceptionResultEnum.FLOW_ENTITY_NO_DATA.exception());
|
|
flowId = Objects.isNull(flowId) ? tfCustomFlowEntity.getFlowId() : flowId;
|
|
flowId = Objects.isNull(flowId) ? tfCustomFlowEntity.getFlowId() : flowId;
|
|
|
|
|
|
|
|
+ TFCustomFlow tfCustomFlow = tfCustomFlowService.getById(tfCustomFlowEntity.gettFCustomFlowId());
|
|
|
|
+ Optional.ofNullable(tfCustomFlow).orElseThrow(() -> ExceptionResultEnum.FLOW_CUSTOM_NO_DATA.exception());
|
|
|
|
+
|
|
//获取当前流程节点
|
|
//获取当前流程节点
|
|
TFFlowApprove tfFlowApprove = tfFlowApproveService.getOne(new QueryWrapper<TFFlowApprove>().lambda().eq(TFFlowApprove::getFlowId, flowId));
|
|
TFFlowApprove tfFlowApprove = tfFlowApproveService.getOne(new QueryWrapper<TFFlowApprove>().lambda().eq(TFFlowApprove::getFlowId, flowId));
|
|
Optional.ofNullable(tfFlowApprove).orElseThrow(() -> ExceptionResultEnum.FLOW_APPROVE_NO_DATA.exception());
|
|
Optional.ofNullable(tfFlowApprove).orElseThrow(() -> ExceptionResultEnum.FLOW_APPROVE_NO_DATA.exception());
|
|
@@ -815,6 +818,9 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
|
|
|
|
List<TFFlowViewLogResult> flowApproveHistoryList = null;
|
|
List<TFFlowViewLogResult> flowApproveHistoryList = null;
|
|
Map<Integer, Integer> approveSetupMap = new HashMap<>();
|
|
Map<Integer, Integer> approveSetupMap = new HashMap<>();
|
|
|
|
+
|
|
|
|
+ List<FlowFormSuggestionJiaResult> flowFormSuggestionJiaResultList = new ArrayList<>();
|
|
|
|
+ List<FlowFormSuggestionYiResult> flowFormSuggestionYiResultList = new ArrayList<>();
|
|
//获取流程审批历史
|
|
//获取流程审批历史
|
|
List<TFFlowLogResult> tfFlowLogResultList = tfFlowLogService.findByObjectId(tfCustomFlowEntity.getId());
|
|
List<TFFlowLogResult> tfFlowLogResultList = tfFlowLogService.findByObjectId(tfCustomFlowEntity.getId());
|
|
if (!CollectionUtils.isEmpty(tfFlowLogResultList)) {
|
|
if (!CollectionUtils.isEmpty(tfFlowLogResultList)) {
|
|
@@ -823,11 +829,36 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
for (TFFlowViewLogResult t : flowApproveHistoryList) {
|
|
for (TFFlowViewLogResult t : flowApproveHistoryList) {
|
|
t.setMessageType(FlowMsgTypeEnum.STANDARD);
|
|
t.setMessageType(FlowMsgTypeEnum.STANDARD);
|
|
approveSetupMap.put(t.getApproveSetup(), t.getApproveSetup());
|
|
approveSetupMap.put(t.getApproveSetup(), t.getApproveSetup());
|
|
|
|
+ if (Objects.nonNull(t.getApproveRemark()) && t.getApproveRemark().contains(";") && tfCustomFlow.getType() == TFCustomTypeEnum.QUALITY_PROBLEM_FLOW
|
|
|
|
+ && (t.getApproveSetup().intValue() == 3 || t.getApproveSetup().intValue() == 4)) {
|
|
|
|
+ String[] strs = t.getApproveRemark().split(";");
|
|
|
|
+ StringJoiner stringJoiner = new StringJoiner("");
|
|
|
|
+ for (int i = 1; i < strs.length; i++) {
|
|
|
|
+ stringJoiner.add(strs[i]);
|
|
|
|
+ }
|
|
|
|
+ t.setApproveFormSuggestion(stringJoiner.toString());
|
|
|
|
+ if (t.getApproveSetup().intValue() == 3) {
|
|
|
|
+ flowFormSuggestionJiaResultList.add(new FlowFormSuggestionJiaResult(t.getCreateTime(), t.getApproveUserName(),
|
|
|
|
+ t.getApproveOperation() == FlowApproveOperationEnum.APPROVE ? "同意" : "不同意", t.getApproveFormSuggestion(),
|
|
|
|
+ strs[0]));
|
|
|
|
+ } else {
|
|
|
|
+ flowFormSuggestionYiResultList.add(new FlowFormSuggestionYiResult(t.getCreateTime(), t.getApproveUserName(),
|
|
|
|
+ t.getApproveOperation() == FlowApproveOperationEnum.APPROVE ? "同意" : "不同意", t.getApproveFormSuggestion(),
|
|
|
|
+ strs[0]));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
if (Objects.nonNull(t.getApproveOperation())) {
|
|
if (Objects.nonNull(t.getApproveOperation())) {
|
|
t.setApproveRemark(t.getApproveOperation().getTitle());
|
|
t.setApproveRemark(t.getApproveOperation().getTitle());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ if (tfCustomFlow.getType() != TFCustomTypeEnum.QUALITY_PROBLEM_FLOW) {
|
|
|
|
+ flowFormSuggestionJiaResultList = null;
|
|
|
|
+ flowFormSuggestionYiResultList = null;
|
|
|
|
+ } else {
|
|
|
|
+ Collections.sort(flowFormSuggestionJiaResultList);
|
|
|
|
+ Collections.sort(flowFormSuggestionYiResultList);
|
|
|
|
+ }
|
|
for (Map.Entry<String, FlowTaskResult> entry : setupMap.entrySet()) {
|
|
for (Map.Entry<String, FlowTaskResult> entry : setupMap.entrySet()) {
|
|
FlowTaskResult flowTaskResult = GsonUtil.fromJson(GsonUtil.toJson(entry.getValue()), FlowTaskResult.class);
|
|
FlowTaskResult flowTaskResult = GsonUtil.fromJson(GsonUtil.toJson(entry.getValue()), FlowTaskResult.class);
|
|
if (flowTaskResult.getSetup() > 0) {
|
|
if (flowTaskResult.getSetup() > 0) {
|
|
@@ -845,8 +876,6 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
- TFCustomFlow tfCustomFlow = tfCustomFlowService.getById(tfCustomFlowEntity.gettFCustomFlowId());
|
|
|
|
- Optional.ofNullable(tfCustomFlow).orElseThrow(() -> ExceptionResultEnum.FLOW_DEPLOYMENT_NO_DATA.exception());
|
|
|
|
if ((tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW ||
|
|
if ((tfCustomFlow.getType() == TFCustomTypeEnum.OFFICE_SOP_FLOW ||
|
|
tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW)) {
|
|
tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW)) {
|
|
if (Objects.nonNull(currFlowTaskResult) && currFlowTaskResult.getSetup().intValue() == 3) {
|
|
if (Objects.nonNull(currFlowTaskResult) && currFlowTaskResult.getSetup().intValue() == 3) {
|
|
@@ -930,7 +959,7 @@ public class ActivitiServiceImpl implements ActivitiService {
|
|
if (Objects.nonNull(tfCustomFlowEntity.getCrmNo())) {
|
|
if (Objects.nonNull(tfCustomFlowEntity.getCrmNo())) {
|
|
crmProjectResult = tbCrmService.findCrmProjectBySopNoOrCrmNo(tfCustomFlowEntity.getCode(), tfCustomFlowEntity.getCrmNo());
|
|
crmProjectResult = tbCrmService.findCrmProjectBySopNoOrCrmNo(tfCustomFlowEntity.getCode(), tfCustomFlowEntity.getCrmNo());
|
|
}
|
|
}
|
|
- return new FlowViewResult(flowId, tfFlowApprove.getStatus(), tfCustomFlowEntity.getCode(), taskIdList, flowTaskHistoryList, currFlowTaskResult, flowApproveHistoryList, crmProjectResult);
|
|
|
|
|
|
+ return new FlowViewResult(flowId, tfFlowApprove.getStatus(), tfCustomFlowEntity.getCode(), taskIdList, flowTaskHistoryList, currFlowTaskResult, flowApproveHistoryList, crmProjectResult, flowFormSuggestionJiaResultList, flowFormSuggestionYiResultList);
|
|
}
|
|
}
|
|
|
|
|
|
/**
|
|
/**
|