|
@@ -1009,6 +1009,23 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
|
Optional.ofNullable(tfCustomFlow).orElseThrow(() -> ExceptionResultEnum.FLOW_CUSTOM_NO_DATA.exception());
|
|
|
|
|
|
SysUser sysUser = (SysUser) ServletUtil.getRequestUser();
|
|
|
+ FlowResult flowResultParam = JSONObject.parseObject(sopSaveParam.getFormProperties(), FlowResult.class);
|
|
|
+ LinkedHashMap<String, FlowTaskResult> setupParamMap = flowResultParam.getSetupMap();
|
|
|
+ for (Map.Entry<String, FlowTaskResult> entry : setupParamMap.entrySet()) {
|
|
|
+ if (entry.getValue().getSetup() != 0) {//更新动态表单字段和处理时限
|
|
|
+ tbSopInfoService.saveDynamicSop(tfCustomFlow, tfCustomFlowEntity.getCode(), tfCustomFlowEntity.getFlowId(), entry.getValue());
|
|
|
+ }
|
|
|
+ }
|
|
|
+ FlowResult flowResult = JSONObject.parseObject(tfCustomFlowEntity.getFlowProcessVar(), FlowResult.class);
|
|
|
+ LinkedHashMap<String, FlowTaskResult> setupMap = flowResult.getSetupMap();
|
|
|
+ for (Map.Entry<String, FlowTaskResult> entry : setupMap.entrySet()) {
|
|
|
+ if (Objects.nonNull(setupParamMap.get(entry.getKey()))) {
|
|
|
+ setupMap.put(entry.getKey(), setupParamMap.get(entry.getKey()));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ flowResult.setSetupMap(setupMap);
|
|
|
+ tfCustomFlowEntity.updateInfo(sysUser.getId());
|
|
|
+ tfCustomFlowEntity.setFlowProcessVar(JacksonUtil.parseJson(flowResult));
|
|
|
if (tfFlowApprove.getStatus() != FlowStatusEnum.FINISH && tfFlowApprove.getStatus() != FlowStatusEnum.END) {
|
|
|
Map<String, Object> map = new HashMap<>();
|
|
|
CrmProjectResult crmProjectResult = tbCrmService.findCrmProjectBySopNoOrCrmNo(tfCustomFlowEntity.getCode(), tfCustomFlowEntity.getCrmNo());
|
|
@@ -1028,24 +1045,6 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
|
FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 1);
|
|
|
tbSopInfoService.saveSopPlanDate(flowTaskResult, tbSopInfo.getId(), tfCustomFlowEntity.getFlowId(), sysUser.getId());
|
|
|
}
|
|
|
-
|
|
|
- FlowResult flowResultParam = JSONObject.parseObject(sopSaveParam.getFormProperties(), FlowResult.class);
|
|
|
- LinkedHashMap<String, FlowTaskResult> setupParamMap = flowResultParam.getSetupMap();
|
|
|
- for (Map.Entry<String, FlowTaskResult> entry : setupParamMap.entrySet()) {
|
|
|
- if (entry.getValue().getSetup() != 0) {//更新动态表单字段和处理时限
|
|
|
- tbSopInfoService.saveDynamicSop(tfCustomFlow, tfCustomFlowEntity.getCode(), tfCustomFlowEntity.getFlowId(), entry.getValue());
|
|
|
- }
|
|
|
- }
|
|
|
- FlowResult flowResult = JSONObject.parseObject(tfCustomFlowEntity.getFlowProcessVar(), FlowResult.class);
|
|
|
- LinkedHashMap<String, FlowTaskResult> setupMap = flowResult.getSetupMap();
|
|
|
- for (Map.Entry<String, FlowTaskResult> entry : setupMap.entrySet()) {
|
|
|
- if (Objects.nonNull(setupParamMap.get(entry.getKey()))) {
|
|
|
- setupMap.put(entry.getKey(), setupParamMap.get(entry.getKey()));
|
|
|
- }
|
|
|
- }
|
|
|
- flowResult.setSetupMap(setupMap);
|
|
|
- tfCustomFlowEntity.updateInfo(sysUser.getId());
|
|
|
- tfCustomFlowEntity.setFlowProcessVar(JacksonUtil.parseJson(flowResult));
|
|
|
return tfCustomFlowEntityService.updateById(tfCustomFlowEntity);
|
|
|
}
|
|
|
|
|
@@ -1123,7 +1122,6 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
|
Long serviceFinishPlanBeginDate = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.SERVICE_FINISH_PLAN_BEGIN_DATE.getKey());
|
|
|
Long serviceFinishPlanEndDate = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.SERVICE_FINISH_PLAN_DATE.getKey());
|
|
|
if (Objects.nonNull(serviceFinishPlanBeginDate)) {
|
|
|
- serviceFinishPlanBeginDate = serviceFinishPlanBeginDate + 1000;
|
|
|
TBSopPlanDateLog tbSopPlanDateLog = tbSopPlanDateLogService.getOne(new QueryWrapper<TBSopPlanDateLog>().lambda().eq(TBSopPlanDateLog::getFlowId, flowId).orderByDesc(TBSopPlanDateLog::getCreateTime).last(" limit 1 "));
|
|
|
if (Objects.isNull(tbSopPlanDateLog)) {
|
|
|
tbSopPlanDateLog = new TBSopPlanDateLog(sopId, flowId, serviceFinishPlanBeginDate, serviceFinishPlanEndDate, userId);
|