wangliang 9 months ago
parent
commit
1e39cc825d

+ 5 - 0
sop-business/src/main/java/com/qmth/sop/business/activiti/service/impl/ActivitiServiceImpl.java

@@ -339,6 +339,11 @@ public class ActivitiServiceImpl implements ActivitiService {
                             currFlowTaskResult.getSetup(), Long.parseLong(processFlowId), Long.parseLong(task.getId()),
                             tfCustomFlowEntity.getId(),
                             StringUtils.join(approveUserIds, SystemConstant.LIST_JOIN_SPLIT));
+                    if (Objects.nonNull(flowApproveParam.getApproveRemark()) && Objects.equals(
+                            flowApproveParam.getApproveRemark(), SystemConstant.SYSTEM_AUTO_APPROVE)
+                            && !approveUserIds.contains(sysUser.getId().toString())) {
+                        tfFlowLog.setApproveId(Long.parseLong(approveUserIds.get(0)));
+                    }
                     if (flowApproveParam.getApprove() == FlowApprovePassEnum.PASS
                             || flowApproveParam.getApprove() == FlowApprovePassEnum.DRAFT
                             || flowApproveParam.getApprove() == FlowApprovePassEnum.START) {

+ 11 - 0
sop-business/src/main/java/com/qmth/sop/business/service/impl/TBSopInfoServiceImpl.java

@@ -567,6 +567,17 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
         tbSopInfoService.updateFlowInfo(sopAllocationParam.getAllocationParams(), tfCustomFlow, tfCustomFlowEntity,
                 tfFlowApprove, tbCrmDetail);
         tbUserArchivesAllocationService.editCrmAllocation(new UserArchivesAllocationParam(sopAllocationParam));
+//        FlowResult flowResult = JSONObject.parseObject(tfCustomFlow.getFlowProcessVar(), FlowResult.class);
+//        FlowResult flowResultEntity = JSONObject.parseObject(tfCustomFlowEntity.getFlowProcessVar(), FlowResult.class);
+//        LinkedHashMap<String, FlowTaskResult> setupMap = flowResult.getSetupMap();
+//        LinkedHashMap<String, FlowTaskResult> setupEntityMap = flowResultEntity.getSetupMap();
+//        FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, tfFlowApprove.getSetup());
+//        FlowTaskResult currFlowTaskResult = GsonUtil.fromJson(
+//                GsonUtil.toJson(setupMap.get(flowTaskResult.getTaskKey())), FlowTaskResult.class);
+//        setupEntityMap.put(flowTaskResult.getTaskKey(), currFlowTaskResult);
+//        flowResultEntity.setSetupMap(setupEntityMap);
+//        tfCustomFlowEntity.setFlowProcessVar(JacksonUtil.parseJson(flowResultEntity));
+//        tfCustomFlowEntityService.updateById(tfCustomFlowEntity);
         tbSopInfoService.sopProxySystemApprove(tfCustomFlowEntity.getFlowId(), tfCustomFlowEntity.getCode());
         return true;
     }