Merge remote-tracking branch 'origin/dev_third_stage' into dev_third_stage

This commit is contained in:
zhn
2022-08-10 08:22:29 +08:00
11 changed files with 327 additions and 84 deletions
@@ -377,8 +377,8 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
@AutoLog(value = "变更") @AutoLog(value = "变更")
@ApiOperation(value="变更", notes="变更") @ApiOperation(value="变更", notes="变更")
@GetMapping(value = "/change") @PostMapping(value = "/change")
public Result<?> change(@RequestParam Map<String,Object> params) { public Result<?> change(@RequestBody JSONObject params) {
return this.projectLawsInventoryEOService.change(params); return this.projectLawsInventoryEOService.change(params);
} }
@@ -105,9 +105,10 @@ public class InventoryAffirmJob implements Job {
//如果清单确认结束日期是当前日期 //如果清单确认结束日期是当前日期
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){ if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){
if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgFlag())){ if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgFlag())){
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId())){ if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())){
currentDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId()); currentDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId())){ }
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){
currentDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId()); currentDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
} }
projectLawsInventoryEO.setSendMsgFlag(SendMsgFlagEnum.FALSE.getValue()); projectLawsInventoryEO.setSendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
@@ -118,9 +119,10 @@ public class InventoryAffirmJob implements Job {
//如果清单确认结束时间是当前系统时间后三天 //如果清单确认结束时间是当前系统时间后三天
if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){ if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){
if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgCurrentFlag())){ if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgCurrentFlag())){
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId())){ if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())){
threeDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId()); threeDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId())){ }
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){
threeDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId()); threeDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
} }
projectLawsInventoryEO.setSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue()); projectLawsInventoryEO.setSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
@@ -122,7 +122,7 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
void dataDispose(List<ProjectLawsInventoryEO> list, LoginUser currentUser, int isProjectRole, String cut); void dataDispose(List<ProjectLawsInventoryEO> list, LoginUser currentUser, int isProjectRole, String cut);
Result<?> change(Map<String, Object> parmas); Result<?> change(JSONObject parmas);
/** /**
* 下载pdf报告 * 下载pdf报告
@@ -1290,6 +1290,11 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>() ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>()
.lambda().eq(ProjectLibraryBase::getId, projectLibraryId)); .lambda().eq(ProjectLibraryBase::getId, projectLibraryId));
// studio信息
SysUser studioUserInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
);
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>(); QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId()); projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper); ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
@@ -1354,7 +1359,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
feishuMsgVo.setContent("Hello! Please check and address this task in a timely manner."); feishuMsgVo.setContent("Hello! Please check and address this task in a timely manner.");
feishuMsgVo.setTaskType("Regulation List Confirmation"); feishuMsgVo.setTaskType("Regulation List Confirmation");
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()); feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername()); feishuMsgVo.setInitiator(studioUserInfo.getUsername());
feishuMsgVo.setDueDate(inventoryAffirmDueDate); feishuMsgVo.setDueDate(inventoryAffirmDueDate);
//飞书跳转链接 //飞书跳转链接
@@ -1466,10 +1471,6 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
}*/ }*/
} }
SysUser studioUserInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
);
//只要有一个人拒绝,就改为拒绝。 //只要有一个人拒绝,就改为拒绝。
if(StringUtils.equals(operatorResult, OperatorResultEnum.REJECTED.getValue())){ if(StringUtils.equals(operatorResult, OperatorResultEnum.REJECTED.getValue())){
inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue(); inventoryAffirmStatus = InventoryAffirmStatusEnum.REJECTED.getValue();
@@ -1493,7 +1494,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
feishuMsgVo.setTaskType("Regulation List Confirmation"); feishuMsgVo.setTaskType("Regulation List Confirmation");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber()); feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()); feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername()); feishuMsgVo.setInitiator(studioUserInfo.getUsername());
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate())); feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()));
//飞书跳转链接 //飞书跳转链接
@@ -1534,7 +1535,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
feishuMsgVo.setTaskType("Regulation List Confirmation"); feishuMsgVo.setTaskType("Regulation List Confirmation");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber()); feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()); feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername()); feishuMsgVo.setInitiator(studioUserInfo.getUsername());
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate())); feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()));
//飞书跳转链接 //飞书跳转链接
@@ -1584,7 +1585,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
feishuMsgVo.setTaskType("Regulation List Confirmation"); feishuMsgVo.setTaskType("Regulation List Confirmation");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber()); feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()); feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername()); feishuMsgVo.setInitiator(studioUserInfo.getUsername());
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate())); feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()));
//飞书跳转链接 //飞书跳转链接
@@ -2088,6 +2089,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>() ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>()
.lambda().eq(ProjectLibraryBase::getId, projectLibraryId)); .lambda().eq(ProjectLibraryBase::getId, projectLibraryId));
ProjectLawsInventoryEO projectLawsInventoryEO = this.baseMapper.selectOne(
new QueryWrapper<ProjectLawsInventoryEO>().lambda().eq(ProjectLawsInventoryEO::getId, id)
);
SysUser studioUserInfo = this.sysUserMapper.selectOne( SysUser studioUserInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer()) new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLibraryBase.getStudioEngineer())
@@ -2112,6 +2116,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
MessageTypeEnum messageTypeEnum = null; MessageTypeEnum messageTypeEnum = null;
String taskType = ""; String taskType = "";
String initiator = ""; String initiator = "";
String initiatorLark = "";
if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) { if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())) {
userIdList.add(engineeringInterfacePerson); userIdList.add(engineeringInterfacePerson);
@@ -2126,6 +2131,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
taskType = "Regulation Task Confirmation"; taskType = "Regulation Task Confirmation";
initiator = studioUserInfo.getUsername(); initiator = studioUserInfo.getUsername();
initiatorLark = studioUserInfo.getUsername();
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())) {
String dreUserId = jsonObject.getString("dreUserId"); //dre用户id String dreUserId = jsonObject.getString("dreUserId"); //dre用户id
userIdList.add(dreUserId); userIdList.add(dreUserId);
@@ -2138,7 +2144,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION; messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
taskType = "Regulation Task Confirmation"; taskType = "Regulation Task Confirmation";
initiator = studioUserInfo.getUsername(); initiator = studioUserInfo.getUsername();
initiatorLark = studioUserInfo.getUsername();
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_REJECTED.getValue())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_REJECTED.getValue())) {
userIdList.add(engineeringInterfacePerson); userIdList.add(engineeringInterfacePerson);
msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName() msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
@@ -2150,7 +2158,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION; messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
taskType = "Regulation Task Confirmation"; taskType = "Regulation Task Confirmation";
initiator = studioUserInfo.getUsername(); initiator = studioUserInfo.getUsername();
initiatorLark = studioUserInfo.getUsername();
} else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_ACCEPTED.getValue())) { } else if (StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_DRE_ACCEPTED.getValue())) {
userIdList.add(engineeringInterfacePerson); userIdList.add(engineeringInterfacePerson);
msgContentEN = sysUser.getUsername() + " has submitted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName() msgContentEN = sysUser.getUsername() + " has submitted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
@@ -2162,7 +2172,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION; messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
taskType = "Regulation Task Confirmation"; taskType = "Regulation Task Confirmation";
initiator = studioUserInfo.getUsername(); initiator = studioUserInfo.getUsername();
initiatorLark = studioUserInfo.getUsername();
} else if(StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_REJECTED_MSG.getValue())){ } else if(StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_REJECTED_MSG.getValue())){
userIdList.add(projectLibraryBase.getStudioEngineer()); userIdList.add(projectLibraryBase.getStudioEngineer());
msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName() msgContentEN = sysUser.getUsername() + " has rejected the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
@@ -2174,7 +2186,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION; messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
taskType = "Regulation Task Confirmation"; taskType = "Regulation Task Confirmation";
initiator = studioUserInfo.getUsername(); initiator = studioUserInfo.getUsername();
initiatorLark = studioUserInfo.getUsername();
} else if(StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ACCEPTED_MSG.getValue())){ } else if(StringUtils.equals(msgType, MsgTypeEnum.TASK_AFFIRM_ACCEPTED_MSG.getValue())){
userIdList.add(projectLibraryBase.getStudioEngineer()); userIdList.add(projectLibraryBase.getStudioEngineer());
msgContentEN = sysUser.getUsername() + " has accepted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName() msgContentEN = sysUser.getUsername() + " has accepted the regulation task confirmation of " + serialNumber +" in "+ projectNameInfoEO.getProjectName()
@@ -2186,7 +2200,9 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION; messageTypeEnum = MessageTypeEnum.TASK_CONFIRMATION;
taskType = "Regulation Task Confirmation"; taskType = "Regulation Task Confirmation";
initiator = studioUserInfo.getUsername(); initiator = studioUserInfo.getUsername();
initiatorLark = studioUserInfo.getUsername();
} else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_START_MSG.getValue())){ } else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_START_MSG.getValue())){
String designDutyId = jsonObject.getString("designDutyId"); //设计符合性责任人id String designDutyId = jsonObject.getString("designDutyId"); //设计符合性责任人id
userIdList.add(designDutyId); userIdList.add(designDutyId);
@@ -2199,7 +2215,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION; messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
taskType = "Design Compliance Confirmation"; taskType = "Design Compliance Confirmation";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getDesignInitiatorId())
);
initiatorLark = initiatorLarkInfo.getUsername();
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_START_MSG.getValue())){ } else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_START_MSG.getValue())){
String prehomoDutyId = jsonObject.getString("prehomoDutyId"); //pre-Home责任人id String prehomoDutyId = jsonObject.getString("prehomoDutyId"); //pre-Home责任人id
userIdList.add(prehomoDutyId); userIdList.add(prehomoDutyId);
@@ -2212,7 +2233,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION; messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
taskType = "Pre-Homo Confirmation"; taskType = "Pre-Homo Confirmation";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getPrehomoInitiatorId())
);
initiatorLark = initiatorLarkInfo.getUsername();
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_START_MSG.getValue())){ } else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_START_MSG.getValue())){
String verifyDutyId = jsonObject.getString("verifyDutyId"); //验证符合性责任人id String verifyDutyId = jsonObject.getString("verifyDutyId"); //验证符合性责任人id
userIdList.add(verifyDutyId); userIdList.add(verifyDutyId);
@@ -2225,7 +2252,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION; messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
taskType = "Validation Compliance Confirmation"; taskType = "Validation Compliance Confirmation";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getVerifyInitiatorId())
);
initiatorLark = initiatorLarkInfo.getUsername();
} else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_CHARGE_PERSON_SUBMIT_MSG.getValue())){ } else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_CHARGE_PERSON_SUBMIT_MSG.getValue())){
String designInitiatorId = jsonObject.getString("designInitiatorId"); //设计符合性发起人id String designInitiatorId = jsonObject.getString("designInitiatorId"); //设计符合性发起人id
userIdList.add(designInitiatorId); userIdList.add(designInitiatorId);
@@ -2238,7 +2270,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION; messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
taskType = "Design Compliance Confirmation"; taskType = "Design Compliance Confirmation";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getDesignInitiatorId())
);
initiatorLark = initiatorLarkInfo.getUsername();
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_CHARGE_PERSON_SUBMIT_MSG.getValue())){ } else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_CHARGE_PERSON_SUBMIT_MSG.getValue())){
String prehomoInitiatorId = jsonObject.getString("prehomoInitiatorId"); //pre-Home发起人id String prehomoInitiatorId = jsonObject.getString("prehomoInitiatorId"); //pre-Home发起人id
userIdList.add(prehomoInitiatorId); userIdList.add(prehomoInitiatorId);
@@ -2251,7 +2288,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION; messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
taskType = "Pre-Homo Confirmation"; taskType = "Pre-Homo Confirmation";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getPrehomoInitiatorId())
);
initiatorLark = initiatorLarkInfo.getUsername();
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_CHARGE_PERSON_SUBMIT_MSG.getValue())){ } else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_CHARGE_PERSON_SUBMIT_MSG.getValue())){
String verifyInitiatorId = jsonObject.getString("verifyInitiatorId"); //验证符合性发起人id String verifyInitiatorId = jsonObject.getString("verifyInitiatorId"); //验证符合性发起人id
userIdList.add(verifyInitiatorId); userIdList.add(verifyInitiatorId);
@@ -2264,7 +2306,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION; messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
taskType = "Validation Compliance Confirmation"; taskType = "Validation Compliance Confirmation";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getVerifyInitiatorId())
);
initiatorLark = initiatorLarkInfo.getUsername();
}else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_INITIATOR_ACCEPTED_MSG.getValue())){ }else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_INITIATOR_ACCEPTED_MSG.getValue())){
String designDutyId = jsonObject.getString("designDutyId"); //设计符合性责任人id String designDutyId = jsonObject.getString("designDutyId"); //设计符合性责任人id
userIdList.add(designDutyId); userIdList.add(designDutyId);
@@ -2277,7 +2324,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION; messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
taskType = "Design Compliance Confirmation"; taskType = "Design Compliance Confirmation";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getDesignInitiatorId())
);
initiatorLark = initiatorLarkInfo.getUsername();
} else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_INITIATOR_ACCEPTED_MSG.getValue())){ } else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_INITIATOR_ACCEPTED_MSG.getValue())){
String prehomoDutyId = jsonObject.getString("prehomoDutyId"); //pre-Home责任人id String prehomoDutyId = jsonObject.getString("prehomoDutyId"); //pre-Home责任人id
userIdList.add(prehomoDutyId); userIdList.add(prehomoDutyId);
@@ -2290,7 +2342,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION; messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
taskType = "Pre-Homo Confirmation"; taskType = "Pre-Homo Confirmation";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getPrehomoInitiatorId())
);
initiatorLark = initiatorLarkInfo.getUsername();
} else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_INITIATOR_ACCEPTED_MSG.getValue())){ } else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_INITIATOR_ACCEPTED_MSG.getValue())){
String verifyDutyId = jsonObject.getString("verifyDutyId"); //验证符合性责任人id String verifyDutyId = jsonObject.getString("verifyDutyId"); //验证符合性责任人id
userIdList.add(verifyDutyId); userIdList.add(verifyDutyId);
@@ -2303,7 +2360,12 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION; messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
taskType = "Validation Compliance Confirmation"; taskType = "Validation Compliance Confirmation";
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(); initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
SysUser initiatorLarkInfo = this.sysUserMapper.selectOne(
new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, projectLawsInventoryEO.getVerifyInitiatorId())
);
initiatorLark = initiatorLarkInfo.getUsername();
} }
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){ if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
@@ -2311,15 +2373,48 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
feishuMsgVo.setTaskType(taskType); feishuMsgVo.setTaskType(taskType);
feishuMsgVo.setRegulationNo(serialNumber); feishuMsgVo.setRegulationNo(serialNumber);
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()); feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
feishuMsgVo.setInitiator(sysUser.getUsername()); feishuMsgVo.setInitiator(initiatorLark);
feishuMsgVo.setDueDate(taskAffirmDueDate); feishuMsgVo.setDueDate(taskAffirmDueDate);
//飞书跳转链接 //飞书跳转链接
String hrefFeishu = backUrl String hrefFeishu = "";
+ JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
//系统内部跳转链接 //系统内部跳转链接
String href = "<a href='" + JumpLinkEnum.TASK_AFFIRM_LINK.getLink() + "'>" + " View details" + "</a>"; String href = "";
if(StringUtils.equals(msgType,MsgTypeEnum.TASK_AFFIRM_START_MSG.getValue())
||StringUtils.equals(msgType,MsgTypeEnum.TASK_AFFIRM_ISSUE_DRE_MSG.getValue())
||StringUtils.equals(msgType,MsgTypeEnum.TASK_AFFIRM_DRE_REJECTED.getValue())
||StringUtils.equals(msgType,MsgTypeEnum.TASK_AFFIRM_DRE_ACCEPTED.getValue())
||StringUtils.equals(msgType,MsgTypeEnum.TASK_AFFIRM_REJECTED_MSG.getValue())
||StringUtils.equals(msgType,MsgTypeEnum.TASK_AFFIRM_ACCEPTED_MSG.getValue()))
{
hrefFeishu = backUrl
+ JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
href = "<a href='" + JumpLinkEnum.TASK_AFFIRM_LINK.getLink() + "'>" + " View details" + "</a>";
}else if(StringUtils.equals(msgType,MsgTypeEnum.DESIGN_START_MSG.getValue())
||StringUtils.equals(msgType,MsgTypeEnum.PREHOMO_START_MSG.getValue())
||StringUtils.equals(msgType,MsgTypeEnum.VERIFY_START_MSG.getValue())
||StringUtils.equals(msgType,MsgTypeEnum.DESIGN_CHARGE_PERSON_SUBMIT_MSG.getValue())
||StringUtils.equals(msgType,MsgTypeEnum.PREHOMO_CHARGE_PERSON_SUBMIT_MSG.getValue())
||StringUtils.equals(msgType,MsgTypeEnum.VERIFY_CHARGE_PERSON_SUBMIT_MSG.getValue())
||StringUtils.equals(msgType,MsgTypeEnum.DESIGN_INITIATOR_ACCEPTED_MSG.getValue())
||StringUtils.equals(msgType,MsgTypeEnum.PREHOMO_INITIATOR_ACCEPTED_MSG.getValue())
||StringUtils.equals(msgType,MsgTypeEnum.VERIFY_INITIATOR_ACCEPTED_MSG.getValue()))
{
hrefFeishu = backUrl
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
+ projectLibraryBase.getId()
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ projectLibraryBase.getTargetMarket();
href = "<a href='"
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
+ projectYearNameInfoEO.getYearName()
+ projectLibraryBase.getTargetMarket()
+ "'>" + " View details" + "</a>";
}
String contentInfo = msgContentEN + " " + href; String contentInfo = msgContentEN + " " + href;
Map<String,Object> sendMessageMap = new HashMap<>(); Map<String,Object> sendMessageMap = new HashMap<>();
sendMessageMap.put("hrefFeishu",hrefFeishu); sendMessageMap.put("hrefFeishu",hrefFeishu);
@@ -4087,8 +4182,8 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
@Override @Override
@Transactional @Transactional
public Result<?> change(Map<String, Object> parmas) { public Result<?> change(JSONObject parmas) {
String ids = parmas.get("ids").toString(); String ids = parmas.getString("ids");
if(StringUtils.isNotEmpty(ids)){ if(StringUtils.isNotEmpty(ids)){
List<String> idList = Arrays.asList(ids.split(",")); List<String> idList = Arrays.asList(ids.split(","));
String projectLawsInventoryIds = ids; String projectLawsInventoryIds = ids;
@@ -4102,6 +4197,13 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
updateWrapper.in(ProjectLawsInventoryEO::getId,idList); updateWrapper.in(ProjectLawsInventoryEO::getId,idList);
updateWrapper.set(ProjectLawsInventoryEO::getRegulationOwnerSubmitStatus,null); updateWrapper.set(ProjectLawsInventoryEO::getRegulationOwnerSubmitStatus,null);
updateWrapper.set(ProjectLawsInventoryEO::getHomologationEngineerSubmitStatus,null); updateWrapper.set(ProjectLawsInventoryEO::getHomologationEngineerSubmitStatus,null);
updateWrapper.set(ProjectLawsInventoryEO::getSendMsgFlag,null);
updateWrapper.set(ProjectLawsInventoryEO::getSendMsgCurrentFlag,null);
updateWrapper.set(ProjectLawsInventoryEO::getDesignDueDate,null);
updateWrapper.set(ProjectLawsInventoryEO::getPrehomoDueDate,null);
updateWrapper.set(ProjectLawsInventoryEO::getVerifyDueDate,null);
updateWrapper.set(ProjectLawsInventoryEO::getInventoryAffirmDueDate,null);
updateWrapper.set(ProjectLawsInventoryEO::getTaskAffirmDueDate,null);
super.update(projectLawsInventoryEO, updateWrapper); super.update(projectLawsInventoryEO, updateWrapper);
QueryWrapper<ProjectTaskInventoryEO> taskInventoryQueryWrapper = new QueryWrapper<>(); QueryWrapper<ProjectTaskInventoryEO> taskInventoryQueryWrapper = new QueryWrapper<>();
@@ -4178,7 +4280,7 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
deleteConditionAssessmentWrapper.lambda().in(ConditionAssessmentEO::getProjectLawsInventoryId,idList); deleteConditionAssessmentWrapper.lambda().in(ConditionAssessmentEO::getProjectLawsInventoryId,idList);
this.conditionAssessmentEOService.remove(deleteConditionAssessmentWrapper); this.conditionAssessmentEOService.remove(deleteConditionAssessmentWrapper);
Map<String,Object> params = new HashMap<>(); JSONObject params = new JSONObject();
params.put("projectLawsInventoryIds",projectLawsInventoryIds); params.put("projectLawsInventoryIds",projectLawsInventoryIds);
params.put("pIds",pIds); params.put("pIds",pIds);
//根据流程实例id 、 法规清单id 删除相关流程。 //根据流程实例id 、 法规清单id 删除相关流程。
@@ -155,13 +155,13 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has replied to your engineering deliverable information. Please check and address it in a timely manner."); feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has replied to your engineering deliverable information. Please check and address it in a timely manner.");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber()); feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()); feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername());
MessageTypeEnum messageTypeEnum = null; MessageTypeEnum messageTypeEnum = null;
//消息内容 //消息内容
String msgContentEN = ""; String msgContentEN = "";
String msgTitle = ""; String msgTitle = "";
String initiatorId = "";
String flowType = projectTaskInventoryFeedbackEO.getFlowType(); String flowType = projectTaskInventoryFeedbackEO.getFlowType();
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){ if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
@@ -173,6 +173,7 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
feishuMsgVo.setTaskType("Design Compliance Confirmation"); feishuMsgVo.setTaskType("Design Compliance Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate())); feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
initiatorId = projectLawsInventoryEO.getDesignInitiatorId();
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION; messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
}else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){ }else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){
@@ -184,6 +185,7 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
feishuMsgVo.setTaskType("Pre-Homo Confirmation"); feishuMsgVo.setTaskType("Pre-Homo Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate())); feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
initiatorId = projectLawsInventoryEO.getPrehomoInitiatorId();
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION; messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){ }else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
@@ -195,6 +197,7 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
feishuMsgVo.setTaskType("Validation Compliance Confirmation"); feishuMsgVo.setTaskType("Validation Compliance Confirmation");
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate())); feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
initiatorId = projectLawsInventoryEO.getVerifyInitiatorId();
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION; messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
} }
@@ -218,6 +221,14 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
sendMessageMap.put("hrefFeishu",hrefFeishu); sendMessageMap.put("hrefFeishu",hrefFeishu);
sendMessageMap.put("contentInfo",contentInfo); sendMessageMap.put("contentInfo",contentInfo);
String initiator = "";
if(StringUtils.isNotEmpty(initiatorId)){
QueryWrapper<SysUser> queryOneWrapper = new QueryWrapper<>();
queryOneWrapper.lambda().eq(SysUser::getId,initiatorId);
SysUser sysUser = this.sysUserService.getBaseMapper().selectOne(queryOneWrapper);
initiator = sysUser.getUsername();
}
feishuMsgVo.setInitiator(initiator);
//发送消息 //发送消息
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName()); SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryBaseInfo.getId(),sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
} }
@@ -351,13 +362,30 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBaseInfo.getYearNameId()); projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBaseInfo.getYearNameId());
ProjectYearNameInfoEO projectYearNameInfoEO = this.projectYearNameInfoEOService.getOne(projectYearInfoEOQueryWrapper); ProjectYearNameInfoEO projectYearNameInfoEO = this.projectYearNameInfoEOService.getOne(projectYearInfoEOQueryWrapper);
String initiatorId = "";
if (StringUtils.equals(projectTaskInventoryFeedbackEO.getFlowType(), FlowTypeEnum.SJFHXSHLC.getValue())) {
initiatorId = projectLawsInventoryEO.getDesignInitiatorId();
}else if(StringUtils.equals(projectTaskInventoryFeedbackEO.getFlowType(), FlowTypeEnum.PREHOMOQRLC.getValue())){
initiatorId = projectLawsInventoryEO.getPrehomoInitiatorId();
}else if(StringUtils.equals(projectTaskInventoryFeedbackEO.getFlowType(), FlowTypeEnum.YZFHXSCLC.getValue())){
initiatorId = projectLawsInventoryEO.getVerifyInitiatorId();
}
// 飞书消息封装 // 飞书消息封装
FeishuMsgVo feishuMsgVo = new FeishuMsgVo(); FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has submitted the engineering deliverable information. Please check and address it in a timely manner."); feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has submitted the engineering deliverable information. Please check and address it in a timely manner.");
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber()); feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()); feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
feishuMsgVo.setInitiator(currentUser.getUsername());
String initiator = "";
if (StringUtils.isNotEmpty(initiatorId)) {
QueryWrapper<SysUser> queryOneWrapper = new QueryWrapper<>();
queryOneWrapper.lambda().eq(SysUser::getId,initiatorId);
SysUser sysUser = this.sysUserService.getBaseMapper().selectOne(queryOneWrapper);
initiator = sysUser.getUsername();
}
feishuMsgVo.setInitiator(initiator);
MessageTypeEnum messageTypeEnum = null; MessageTypeEnum messageTypeEnum = null;
@@ -54,8 +54,10 @@ public class workFlowController {
jsonObject.put("loginUserId", currentUser.getId()); jsonObject.put("loginUserId", currentUser.getId());
jsonObject.put("loginUserName", currentUser.getUsername()); jsonObject.put("loginUserName", currentUser.getUsername());
if(StringUtils.equals(type,FlowTypeEnum.RWQRLC.getValue())){ if(StringUtils.equals(type,FlowTypeEnum.RWQRLC.getValue())){
jsonObject.put("id", FlowTypeEnum.RWQRLC.getProcessDefinitionKey()); //流程定义id /*jsonObject.put("id", FlowTypeEnum.RWQRLC.getProcessDefinitionKey()); //流程定义id
return this.activiti_define_start(jsonObject); return this.activiti_define_start(jsonObject);*/
jsonObject.put("processDefinitionKey", FlowTypeEnum.RWQRLC.getProcessDefinitionKey());
return this.startTaskToConfirmProcess(jsonObject);
}else if(StringUtils.equals(type,FlowTypeEnum.SJFHXSHLC.getValue())){ }else if(StringUtils.equals(type,FlowTypeEnum.SJFHXSHLC.getValue())){
jsonObject.put("id", FlowTypeEnum.SJFHXSHLC.getProcessDefinitionKey()); jsonObject.put("id", FlowTypeEnum.SJFHXSHLC.getProcessDefinitionKey());
initConditionAssessmentEO(jsonObject); initConditionAssessmentEO(jsonObject);
@@ -203,4 +205,13 @@ public class workFlowController {
public Result startLawsTechnologyEvaluationProcess(@RequestBody JSONObject jsonObject){ public Result startLawsTechnologyEvaluationProcess(@RequestBody JSONObject jsonObject){
return workFlowFeignClient.startLawsTechnologyEvaluationProcess(jsonObject); return workFlowFeignClient.startLawsTechnologyEvaluationProcess(jsonObject);
} }
/**
* 启动流程-任务确认流程
* @param jsonObject
* @return
*/
public Result startTaskToConfirmProcess(@RequestBody JSONObject jsonObject){
return workFlowFeignClient.startTaskToConfirmProcess(jsonObject);
}
} }
@@ -84,8 +84,8 @@ public interface WorkFlowFeignClient {
* @param params * @param params
* @return * @return
*/ */
@RequestMapping(value = "/bat-wkflow/deleteProcessInstanceByProjectLawsInventoryIds",method = RequestMethod.GET) @RequestMapping(value = "/bat-wkflow/deleteProcessInstanceByProjectLawsInventoryIds",method = RequestMethod.POST,headers = {"content-type=application/json"})
Result<String> deleteProcessInstanceByProjectLawsInventoryIds(@RequestParam Map<String,Object> params); Result<String> deleteProcessInstanceByProjectLawsInventoryIds(String params);
/** /**
* 流程实例明细列表 * 流程实例明细列表
@@ -146,6 +146,14 @@ public interface WorkFlowFeignClient {
@RequestMapping(value = "/bat-wkflow/startLawsTechnologyEvaluationProcess",method = RequestMethod.POST,headers = {"content-type=application/json"}) @RequestMapping(value = "/bat-wkflow/startLawsTechnologyEvaluationProcess",method = RequestMethod.POST,headers = {"content-type=application/json"})
Result<String> startLawsTechnologyEvaluationProcess(String jsonObject); Result<String> startLawsTechnologyEvaluationProcess(String jsonObject);
/**
* 启动流程-任务确认流程
* @param jsonObject
* @return
*/
@RequestMapping(value = "/bat-wkflow/startTaskToConfirmProcess",method = RequestMethod.POST,headers = {"content-type=application/json"})
Result<String> startTaskToConfirmProcess(String jsonObject);
@RequestMapping(value = "/bat-wkflow/task/completeLawsTechnologyEvaluationTaskByPids",method = RequestMethod.GET) @RequestMapping(value = "/bat-wkflow/task/completeLawsTechnologyEvaluationTaskByPids",method = RequestMethod.GET)
Result<String> completeLawsTechnologyEvaluationTaskByPids(@RequestParam("actiProcInstIds") String actiProcInstIds); Result<String> completeLawsTechnologyEvaluationTaskByPids(@RequestParam("actiProcInstIds") String actiProcInstIds);
} }
@@ -101,8 +101,8 @@ public class WorkFlowFeignClientImpl{
* @param params * @param params
* @return * @return
*/ */
public Result<String> deleteProcessInstanceByProjectLawsInventoryIds(@RequestParam Map<String,Object> params){ public Result<String> deleteProcessInstanceByProjectLawsInventoryIds(@RequestBody JSONObject params){
return workFlowFeignClient.deleteProcessInstanceByProjectLawsInventoryIds(params); return workFlowFeignClient.deleteProcessInstanceByProjectLawsInventoryIds(params.toString());
} }
/** /**
@@ -167,4 +167,14 @@ public class WorkFlowFeignClientImpl{
Result<String> stringWrapper = workFlowFeignClient.startLawsTechnologyEvaluationProcess(jsonObject.toString()); Result<String> stringWrapper = workFlowFeignClient.startLawsTechnologyEvaluationProcess(jsonObject.toString());
return Result.OK(stringWrapper.getResult()); return Result.OK(stringWrapper.getResult());
} }
/**
* 启动流程-任务确认流程
* @param jsonObject
* @return
*/
public Result startTaskToConfirmProcess(@RequestBody net.sf.json.JSONObject jsonObject){
Result<String> stringWrapper = workFlowFeignClient.startTaskToConfirmProcess(jsonObject.toString());
return Result.OK(stringWrapper.getResult());
}
} }
@@ -50,13 +50,8 @@
<span class="text-header-text" style="cursor: pointer" v-html="item.title"></span> <span class="text-header-text" style="cursor: pointer" v-html="item.title"></span>
</a-tooltip> </a-tooltip>
</div> </div>
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5">
<template slot="title">
<span v-html="item.content"></span>
</template>
<div class="text-content" v-html="item.content"> <div class="text-content" v-html="item.content">
</div> </div>
</a-tooltip>
</div> </div>
</div> </div>
</li> </li>
@@ -11,6 +11,17 @@
</div> </div>
<div style="padding-top: 68px;background: #fff"> <div style="padding-top: 68px;background: #fff">
<div class="detail-content" style="padding: 30px"> <div class="detail-content" style="padding: 30px">
<div class="search-detail-wrap">
<div class="box-title-text">
<div class="title-text" :title="$t('searchContent')">
<span>{{$t('searchContent')}}</span>
</div>
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('searchContent')"
v-model="searchStr"></a-input>
<a-button class="box-button" type="primary" @click="onSearch">{{$t('query')}}</a-button>
<a-button class="box-button" style="margin-left: 8px" @click="ResetSearch">{{$t('reset')}}</a-button>
</div>
</div>
<div v-if="conList.length > 0" style="height: calc(100vh - 180px);overflow:auto;"> <div v-if="conList.length > 0" style="height: calc(100vh - 180px);overflow:auto;">
<div v-for="(item,index) in conList" :key="item.id"> <div v-for="(item,index) in conList" :key="item.id">
<div style="margin-bottom: 10px;position: relative;overflow: hidden"> <div style="margin-bottom: 10px;position: relative;overflow: hidden">
@@ -25,41 +36,36 @@
<span class="text-header-text" style="cursor: pointer" v-html="item.title"></span> <span class="text-header-text" style="cursor: pointer" v-html="item.title"></span>
</a-tooltip> </a-tooltip>
</div> </div>
<a-tooltip placement="topLeft" :mouseEnterDelay="0.5"> <div class="text-content" v-html="item.content">
<template slot="title"> </div>
<span v-html="item.content"></span> <div class="text-text-right-text">
</template> <a style="margin-right: 10px" @click="edit(item)">{{$t('edit')}}</a>
<div class="text-content" v-html="item.content"> <a @click="deleteData(item)">{{$t('delete')}}</a>
</div> </div>
</a-tooltip>
</div>
<div class="text-text-right-text">
<a style="margin-right: 10px" @click="edit(item)">{{$t('edit')}}</a>
<a @click="deleteData(item)">{{$t('delete')}}</a>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="noData" v-else> <div class="noData" v-else>
暂无数据 暂无数据
</div> </div>
<div class="page" v-if="conList.length > 0"> <div class="page" v-if="conList.length > 0">
<a-pagination <a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')" :show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper show-quick-jumper
show-size-changer show-size-changer
:page-size.sync="pageSize" :page-size.sync="pageSize"
:total="total" :total="total"
:current="pageNo" :current="pageNo"
@change="pageOnChange" @change="pageOnChange"
@showSizeChange="SizeChange" @showSizeChange="SizeChange"
/> />
</div>
</div> </div>
</div> </div>
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
</div> </div>
<JLoading :loading="loading">{{$t('dataLoading')}}</JLoading>
</div> </div>
</div>
</template> </template>
<script> <script>
@@ -74,6 +80,7 @@
conList: [], conList: [],
total: 0, total: 0,
pageSize: 10, pageSize: 10,
searchStr: '',
loading: false, loading: false,
downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download',
pageNo: 1, pageNo: 1,
@@ -97,11 +104,21 @@
this.pageSize = pageSize this.pageSize = pageSize
this.getList() this.getList()
}, },
onSearch() {
this.pageNo = 1
this.getList()
},
ResetSearch() {
this.searchStr = ''
this.pageNo = 1
this.getList()
},
getList() { getList() {
let query = { let query = {
pageNo: this.pageNo, pageNo: this.pageNo,
pageSize: this.pageSize, pageSize: this.pageSize,
createBy: this.userInfo().username createBy: this.userInfo().username,
searchStr: this.searchStr
} }
this.loading = true this.loading = true
getAction(this.url.getInfoList, query).then((res) => { getAction(this.url.getInfoList, query).then((res) => {
@@ -299,4 +316,45 @@
text-align: center; text-align: center;
line-height: 10; line-height: 10;
} }
.search-detail-wrap {
width: 100%;
margin: 0 auto;
}
.box-title-text {
line-height: 1.4;
display: flex;
align-items: center;
margin-bottom: 10px;
text-align: center;
justify-content: center;
}
.title-text {
width: 110px;
color: #000F16;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
margin-top: 3px;
text-align: right;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.box-input {
/*min-width: 200px;*/
display: inline-block;
width: 50%;
height: 38px;
margin-top: 2px;
margin-right: 16px;
}
.box-button {
height: 38px;
}
</style> </style>
@@ -212,7 +212,7 @@
((record.roleCode == 1 && !record.regulationOwnerSubmitStatus) || ((record.roleCode == 1 && !record.regulationOwnerSubmitStatus) ||
(record.roleCode == 2 && !record.homologationEngineerSubmitStatus) || (record.roleCode == 2 && !record.homologationEngineerSubmitStatus) ||
(record.roleCode == 4 && !record.regulationOwnerSubmitStatus && !record.homologationEngineerSubmitStatus))) (record.roleCode == 4 && !record.regulationOwnerSubmitStatus && !record.homologationEngineerSubmitStatus)))
|| record.roleCode == 0" || (record.roleCode == 0 && record.taskAffirmStatus != 'List to confirm')"
@click="edit(record)"> @click="edit(record)">
{{ $t('edit') }} {{ $t('edit') }}
</a> </a>
@@ -1080,7 +1080,7 @@
...this.queryParam, ...this.queryParam,
ids: selectedRowKeys.join(','), ids: selectedRowKeys.join(','),
...this.queryParamQuery, ...this.queryParamQuery,
roleCode:roleCodeIndex, roleCode: roleCodeIndex,
projectLibraryId: this.$route.query.id projectLibraryId: this.$route.query.id
} }
downloadFile(this.url.exportData, this.$route.query.projectName + this.$t('listOfRegulations') + '.zip', query, this.Deselect) downloadFile(this.url.exportData, this.$route.query.projectName + this.$t('listOfRegulations') + '.zip', query, this.Deselect)
@@ -1211,7 +1211,7 @@
content: _this.$t('NoteConfirmTheChange'), content: _this.$t('NoteConfirmTheChange'),
onOk() { onOk() {
let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys)) let idList = JSON.parse(JSON.stringify(_this.selectedRowKeys))
getAction('/project/projectLawsInventoryEO/change', { postAction('/project/projectLawsInventoryEO/change', {
ids: idList.join(','), ids: idList.join(','),
projectLibraryId: _this.$route.query.id projectLibraryId: _this.$route.query.id
}).then((res) => { }).then((res) => {
@@ -1629,30 +1629,42 @@
this.detailedWarningList = [] this.detailedWarningList = []
}) })
} else { } else {
for (let i = 0; i < this.TaskSuccessList.length; i++) { // for (let i = 0; i < this.TaskSuccessList.length; i++) {
((i) => { // ((i) => {
this.TaskSuccessList[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate // this.TaskSuccessList[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
Object.keys(this.TaskSuccessList[i]).forEach(res => { // Object.keys(this.TaskSuccessList[i]).forEach(res => {
if (this.TaskSuccessList[i][res] && this.TaskSuccessList[i][res] instanceof String) { // if (this.TaskSuccessList[i][res] && this.TaskSuccessList[i][res] instanceof String) {
this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\"/g, '“') // this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\"/g, '“')
this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\'/g, '‘') // this.TaskSuccessList[i][res] = this.TaskSuccessList[i][res].replace(/\'/g, '‘')
} // }
}) // })
setTimeout(() => { // setTimeout(() => {
this.confirmLoading = true // this.confirmLoading = true
this.startProcess(this.TaskSuccessList[i], (i + 1)) // this.startProcess(this.TaskSuccessList[i], (i + 1))
}, 500) // }, 500)
})(i) // })(i)
// }
let TaskSuccessList = JSON.parse(JSON.stringify(this.TaskSuccessList))
for (let i = 0; i < TaskSuccessList.length; i++) {
TaskSuccessList[i].taskAffirmDueDate = this.formInline.taskAffirmDueDate
Object.keys(TaskSuccessList[i]).forEach(res => {
if (TaskSuccessList[i][res] && TaskSuccessList[i][res] instanceof String) {
TaskSuccessList[i][res] = TaskSuccessList[i][res].replace(/\"/g, '“')
TaskSuccessList[i][res] = TaskSuccessList[i][res].replace(/\'/g, '‘')
}
})
} }
this.confirmLoading = true
this.startProcess(TaskSuccessList)
} }
} }
}) })
}, },
startProcess(value, index) { startProcess(value) {
let query = { let query = {
type: 1, type: 1,
msg: JSON.stringify(value).replace(/\"/g, '\''), projectLawsInvnetoryList: value,
projectNameId: this.$route.query.projectNameId, projectNameId: this.$route.query.projectNameId,
projectName: this.$route.query.projectName, projectName: this.$route.query.projectName,
projectLawsInventoryId: value.id, projectLawsInventoryId: value.id,
@@ -1660,7 +1672,24 @@
} }
postAction('/workFlow/startProcess', query).then((res) => { postAction('/workFlow/startProcess', query).then((res) => {
if (res.success) { if (res.success) {
this.completeTask(value, res.result, index) this.visible = false
this.selectedRowKeys = []
this.$message.success(this.$t('OperationSuccessful'))
this.confirmLoading = false
this.getList()
let that = this
if (this.TaskWarningList.length > 0) {
this.$warning({
content: (
< div >
{ that.TaskWarningList }
< /div>
)
})
}
// this.completeTask(value, res.result, index)
} else {
this.$message.warning(this.$t('operationFailed'))
} }
}) })
}, },