|
@@ -97,6 +97,9 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
@Resource
|
|
@Resource
|
|
TBSopPlanDateLogService tbSopPlanDateLogService;
|
|
TBSopPlanDateLogService tbSopPlanDateLogService;
|
|
|
|
|
|
|
|
+ @Resource
|
|
|
|
+ TBUserArchivesService tbUserArchivesService;
|
|
|
|
+
|
|
/**
|
|
/**
|
|
* 查询动态sop表名是否存在
|
|
* 查询动态sop表名是否存在
|
|
*
|
|
*
|
|
@@ -333,6 +336,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
if (flowApproveParam.getApprove() != FlowApprovePassEnum.DRAFT) {
|
|
if (flowApproveParam.getApprove() != FlowApprovePassEnum.DRAFT) {
|
|
map.put(SystemConstant.CRM_INFO, crmProjectResult);
|
|
map.put(SystemConstant.CRM_INFO, crmProjectResult);
|
|
map.put(SystemConstant.SOP_ID, tbSopInfo.getId());
|
|
map.put(SystemConstant.SOP_ID, tbSopInfo.getId());
|
|
|
|
+ map.put(SystemConstant.SOURCE, "sopApprove");
|
|
tbSopInfoService.saveJobRemind(map);
|
|
tbSopInfoService.saveJobRemind(map);
|
|
}
|
|
}
|
|
TFFlowApprove tfFlowApprove = (TFFlowApprove) map.get(SystemConstant.FLOW_APPROVE);
|
|
TFFlowApprove tfFlowApprove = (TFFlowApprove) map.get(SystemConstant.FLOW_APPROVE);
|
|
@@ -623,7 +627,11 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
approveUserIds = Arrays.asList(String.valueOf(tbSopInfoDetail.getLeadId()), String.valueOf(tbSopInfoDetail.getEngineerUserId()));
|
|
approveUserIds = Arrays.asList(String.valueOf(tbSopInfoDetail.getLeadId()), String.valueOf(tbSopInfoDetail.getEngineerUserId()));
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
- approveUserIds = Arrays.asList(String.valueOf(tbSopInfoDetail.getEngineerUserId()));
|
|
|
|
|
|
+ if (flowTaskResult.getSetup().intValue() >= 8 && tbSopInfoDetail.getAfterRegionToEnginess()) {
|
|
|
|
+ approveUserIds = Arrays.asList(String.valueOf(tbSopInfoDetail.getRegionUserId()));
|
|
|
|
+ } else {
|
|
|
|
+ approveUserIds = Arrays.asList(String.valueOf(tbSopInfoDetail.getEngineerUserId()));
|
|
|
|
+ }
|
|
}
|
|
}
|
|
} else if (type == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {//研究生sop流程待审核人
|
|
} else if (type == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {//研究生sop流程待审核人
|
|
if (flowTaskResult.getSetup().intValue() == 1) {
|
|
if (flowTaskResult.getSetup().intValue() == 1) {
|
|
@@ -748,6 +756,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
if (approve != FlowApprovePassEnum.DRAFT) {
|
|
if (approve != FlowApprovePassEnum.DRAFT) {
|
|
map.put(SystemConstant.CRM_INFO, crmProjectResult);
|
|
map.put(SystemConstant.CRM_INFO, crmProjectResult);
|
|
map.put(SystemConstant.SOP_ID, null);
|
|
map.put(SystemConstant.SOP_ID, null);
|
|
|
|
+ map.put(SystemConstant.SOURCE, "sopApplyOrPublish");
|
|
tbSopInfoService.saveJobRemind(map);
|
|
tbSopInfoService.saveJobRemind(map);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -817,18 +826,58 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
|
|
FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
|
|
processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.SCAN_END_TIME.getKey());
|
|
processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.SCAN_END_TIME.getKey());
|
|
execField = ProcessLimitedEnum.SCAN_END_TIME.getKey();
|
|
execField = ProcessLimitedEnum.SCAN_END_TIME.getKey();
|
|
- } else if (tfFlowApprove.getSetup().intValue() == 8) {//评卷准备
|
|
|
|
|
|
+ } else if (tfFlowApprove.getSetup().intValue() == 8) {//设备入库登记
|
|
|
|
+ FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 1);
|
|
|
|
+ String source = (String) map.get(SystemConstant.SOURCE);
|
|
|
|
+ //审批过程中,如果外包服务范围为"仅扫描",则释放实施工程师资源,后续有区域协调人兼任
|
|
|
|
+ if (Objects.nonNull(source) && Objects.equals(source, "sopApprove")) {
|
|
|
|
+ List<FlowFormWidgetResult> formProperty = flowTaskResult.getFormProperty();
|
|
|
|
+ Long engineerUserId = null;
|
|
|
|
+ for (FlowFormWidgetResult f : formProperty) {
|
|
|
|
+ if (f.getFormId().contains(SystemConstant.THIRD_SERVICE_REGION_CB) && Objects.nonNull(f.getValue()) && !f.getValue().contains("null")) {
|
|
|
|
+ JSONObject jsonObject = JSONObject.parseObject(f.getValue());
|
|
|
|
+ String value = jsonObject.getString(SystemConstant.VALUE);
|
|
|
|
+ if (Objects.nonNull(value) && Objects.nonNull(sopId) && value.equals("SCAN")) {
|
|
|
|
+ TBSopInfoDetail tbSopInfoDetail = tbSopInfoDetailService.getOne(new QueryWrapper<TBSopInfoDetail>().lambda().eq(TBSopInfoDetail::getSopInfoId, sopId));
|
|
|
|
+ engineerUserId = tbSopInfoDetail.getEngineerUserId();
|
|
|
|
+ tbSopInfoDetail.setAfterRegionToEnginess(true);
|
|
|
|
+ tbSopInfoDetailService.updateById(tbSopInfoDetail);
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ if (Objects.nonNull(engineerUserId)) {
|
|
|
|
+ List<Map<String, Object>> sopPassageMap = this.findSopPassage(null);
|
|
|
|
+ if (!CollectionUtils.isEmpty(sopPassageMap)) {
|
|
|
|
+ for (Map m : sopPassageMap) {
|
|
|
|
+ String engineerUserStr = Objects.nonNull(m) && Objects.nonNull(m.get("engineerUserIds")) ? m.get("engineerUserIds").toString() : null;
|
|
|
|
+ if (Objects.nonNull(engineerUserStr)) {
|
|
|
|
+ String[] strs = engineerUserStr.split(",");
|
|
|
|
+ Set<String> set = new HashSet<>(Arrays.asList(strs));
|
|
|
|
+ if (!set.contains(engineerUserId)) {
|
|
|
|
+ TBUserArchives tbUserArchives = tbUserArchivesService.findByUserId(engineerUserId);
|
|
|
|
+ if (Objects.nonNull(tbUserArchives)) {
|
|
|
|
+ tbUserArchives.setStatus(UserArchivesStatusEnum.FREE);
|
|
|
|
+ tbUserArchives.updateInfo(sysUser.getId());
|
|
|
|
+ tbUserArchivesService.updateById(tbUserArchives);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ break;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.SERVICE_FINISH_PLAN_DATE.getKey());
|
|
|
|
+ execField = ProcessLimitedEnum.SERVICE_FINISH_PLAN_DATE.getKey();
|
|
|
|
+ } else if (tfFlowApprove.getSetup().intValue() == 9) {//评卷准备
|
|
FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
|
|
FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
|
|
processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.MARK_START_TIME.getKey());
|
|
processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.MARK_START_TIME.getKey());
|
|
execField = ProcessLimitedEnum.MARK_START_TIME.getKey();
|
|
execField = ProcessLimitedEnum.MARK_START_TIME.getKey();
|
|
- } else if (tfFlowApprove.getSetup().intValue() == 9) {//评卷收尾
|
|
|
|
|
|
+ } else if (tfFlowApprove.getSetup().intValue() == 10) {//评卷收尾
|
|
FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
|
|
FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 2);
|
|
processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.MARK_END_TIME.getKey());
|
|
processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.MARK_END_TIME.getKey());
|
|
execField = ProcessLimitedEnum.MARK_END_TIME.getKey();
|
|
execField = ProcessLimitedEnum.MARK_END_TIME.getKey();
|
|
- } else if (tfFlowApprove.getSetup().intValue() == 10) {//设备入库登记
|
|
|
|
- FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 1);
|
|
|
|
- processLimitedTime = this.getProcessLimitedTime(flowTaskResult, ProcessLimitedEnum.SERVICE_FINISH_PLAN_DATE.getKey());
|
|
|
|
- execField = ProcessLimitedEnum.SERVICE_FINISH_PLAN_DATE.getKey();
|
|
|
|
}
|
|
}
|
|
} else if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {//研究生sop
|
|
} else if (tfCustomFlow.getType() == TFCustomTypeEnum.CLOUD_MARK_SOP_FLOW) {//研究生sop
|
|
if (tfFlowApprove.getSetup().intValue() == 2) {//项目关键信息
|
|
if (tfFlowApprove.getSetup().intValue() == 2) {//项目关键信息
|
|
@@ -1040,6 +1089,7 @@ public class TBSopInfoServiceImpl extends ServiceImpl<TBSopInfoMapper, TBSopInfo
|
|
map.put(SystemConstant.FLOW_APPROVE_LOG, tfFlowLog);
|
|
map.put(SystemConstant.FLOW_APPROVE_LOG, tfFlowLog);
|
|
map.put(SystemConstant.CRM_INFO, crmProjectResult);
|
|
map.put(SystemConstant.CRM_INFO, crmProjectResult);
|
|
map.put(SystemConstant.SOP_ID, tbSopInfo.getId());
|
|
map.put(SystemConstant.SOP_ID, tbSopInfo.getId());
|
|
|
|
+ map.put(SystemConstant.SOURCE, "save");
|
|
tbSopInfoService.saveJobRemind(map);
|
|
tbSopInfoService.saveJobRemind(map);
|
|
|
|
|
|
FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 1);
|
|
FlowTaskResult flowTaskResult = this.getFormProperties(tfCustomFlowEntity, 1);
|