合并分支 'dev_2nd_period_test' 到 'master'

Dev 2nd period test

查看合并请求 laws-nio/laws-weilai!241
This commit is contained in:
高嵩
2022-11-08 20:34:27 +08:00
9 changed files with 124 additions and 34 deletions
@@ -387,10 +387,12 @@ public class OSSFileServiceImpl extends ServiceImpl<OSSFileMapper, OSSFile> impl
}
LambdaQueryWrapper<OSSFile> wrapper = new LambdaQueryWrapper<>();
wrapper.in(OSSFile::getId, id.split(","));
wrapper.orderByAsc(OSSFile::getCreateTime);
List<OSSFile> list = this.list(wrapper);
if (list.size() == 0) {
LambdaQueryWrapper<OSSFile> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.in(OSSFile::getConnectId, id.split(","));
lambdaQueryWrapper.orderByAsc(OSSFile::getCreateTime);
list = this.list(lambdaQueryWrapper);
}
return list;
@@ -144,6 +144,19 @@ public class HomeFunctionModuleEOServiceImpl extends ServiceImpl<HomeFunctionMod
return homeFunctionModuleEOListTemp;
}else{
List<HomeFunctionModuleEO> homeFunctionModuleEOSTemp = new ArrayList<>();
//第一次配置后, 重新添加权限的图标
for (HomeFunctionModuleEO homeFunctionModuleEO : homeFunctionModuleEOList) {
List<SysPermission> collect = metaList.stream().filter(e -> homeFunctionModuleEO.getIconName().equals(e.getName())).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(collect)){
List<String> iconNameList = homeFunctionModuleEOS.stream().map(HomeFunctionModuleEO::getIconName).collect(Collectors.toList());
//有权限但是配有配置的图标
if(!iconNameList.contains(homeFunctionModuleEO.getIconName())){
homeFunctionModuleEOSTemp.add(homeFunctionModuleEO);
}
}
}
//有权限且第一次配置的图标(每个用户会将配置的和没有配置的数据存一套)
for (SysPermission sysPermission : metaList) {
List<HomeFunctionModuleEO> collect = homeFunctionModuleEOS.stream().filter(e -> e.getIconName().equals(sysPermission.getName())).collect(Collectors.toList());
if(ObjectUtils.isNotEmpty(collect)){
@@ -17,10 +17,7 @@ import org.quartz.JobExecutionException;
import org.springframework.beans.factory.annotation.Autowired;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.GregorianCalendar;
import java.util.List;
import java.util.*;
/**
* 法规意见收集表 - 定时器
@@ -62,22 +59,30 @@ public class LawsOpinionGatherRemindJob implements Job {
throw new JeroBootException("日期转换错误");
}
if (days == 3) {
List<String> userIdList = this.workFlowFeignClient.getLawsOpinionGatherFlowAssigneeList(lawsOpinionGatherEO.getId());
if(CollectionUtils.isNotEmpty(userIdList)){
JSONObject sendJsonObject = new JSONObject();
sendJsonObject.put("msgType", MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue());
sendJsonObject.put("lawsOpinionGatherId",lawsOpinionGatherEO.getId());
sendJsonObject.put("userIdList",userIdList);
this.lawsOpinionGatherEOService.workFlowSendMsg(sendJsonObject);
Map<String, String> map = this.workFlowFeignClient.getLawsOpinionGatherFlowAssigneeList(lawsOpinionGatherEO.getId());
if(!map.isEmpty()){
for (String key : map.keySet()) {
JSONObject sendJsonObject = new JSONObject();
sendJsonObject.put("msgType", MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue());
sendJsonObject.put("lawsOpinionGatherId",lawsOpinionGatherEO.getId());
sendJsonObject.put("taskId",map.get(key));
sendJsonObject.put("actiProcInstId",lawsOpinionGatherEO.getActiProcInstId());
sendJsonObject.put("evaluatorIds",key);
this.lawsOpinionGatherEOService.workFlowSendMsg(sendJsonObject);
}
}
} else if (endTime.equals(now)) {
List<String> userIdList = this.workFlowFeignClient.getLawsOpinionGatherFlowAssigneeList(lawsOpinionGatherEO.getId());
if(CollectionUtils.isNotEmpty(userIdList)){
JSONObject sendJsonObject = new JSONObject();
sendJsonObject.put("msgType", MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_TODAY_MSG.getValue());
sendJsonObject.put("lawsOpinionGatherId",lawsOpinionGatherEO.getId());
sendJsonObject.put("userIdList",userIdList);
this.lawsOpinionGatherEOService.workFlowSendMsg(sendJsonObject);
Map<String, String> map = this.workFlowFeignClient.getLawsOpinionGatherFlowAssigneeList(lawsOpinionGatherEO.getId());
if(!map.isEmpty()){
for (String key : map.keySet()) {
JSONObject sendJsonObject = new JSONObject();
sendJsonObject.put("msgType", MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_TODAY_MSG.getValue());
sendJsonObject.put("lawsOpinionGatherId",lawsOpinionGatherEO.getId());
sendJsonObject.put("taskId",map.get(key));
sendJsonObject.put("actiProcInstId",lawsOpinionGatherEO.getActiProcInstId());
sendJsonObject.put("evaluatorIds",key);
this.lawsOpinionGatherEOService.workFlowSendMsg(sendJsonObject);
}
}
}
/*if(StringUtils.equals(nextDayStr,sdf.format(lawsOpinionGatherEO.getEndTime()))){
@@ -214,6 +214,8 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
sendMsgJson.put("lawsOpinionGatherId",jsonObject.getString("id"));
sendMsgJson.put("initiatorUserId",jsonObject.getString("initiatorUserId"));
sendMsgJson.put("msgType", MsgTypeEnum.LAWS_OPOMOPM_GATHER_COMPLETE_MSG.getValue());
sendMsgJson.put("taskId",jsonObject.getString("taskId"));
sendMsgJson.put("actiProcInstId",jsonObject.getString("actiProcInstId"));
workFlowSendMsg(sendMsgJson);
}
@@ -291,6 +293,9 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
throw new JeroBootException("发送消息类型不能为空,请检查!");
}
String hrefFeishu = "";
String taskId = jsonObject.getString("taskId");
String actiProcInstId = jsonObject.getString("actiProcInstId");
String lawsOpinionGatherId = jsonObject.getString("lawsOpinionGatherId");
//String serialNumber = jsonObject.getString("serialNumber"); //文档库编号
@@ -314,7 +319,7 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
String enContentUpper = "";
String enContentLower = "";
if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_OPOMOPM_GATHER_START_MSG.getValue())){
userIdList.addAll(Arrays.asList(jsonObject.getString("evaluatorIds").split(",")));
userIdList.add(jsonObject.getString("evaluatorIds"));
//msgContentEN = "You recieved the Collection of Legislative Comments of "+serialNumber+" . The due date is "+endTime+". Please check and address it in a timely manner.";
//msgTitle = "You have a Collection of Legislative Comments task to complete";
@@ -333,6 +338,8 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + initiator +
"\nDue Date: " + endTime;
//飞书跳转链接
hrefFeishu = backUrl + "/regulatoryProcessReview?prcId="+ actiProcInstId +"&taskIds="+ taskId +"&prcType=5&router=%2FregulatoryAssessmentTasks&prcNum="+ lawsOpinionGatherEO.getPrcNum() +"&taskDefinitionKey=pgrpg&isDisabled=false";
}else if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_SUBMIT_MSG.getValue())){
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
@@ -353,9 +360,10 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + initiator +
"\nDue Date: " + endTime;
hrefFeishu = backUrl + "/regulatoryProcessReview?prcId="+ actiProcInstId +"&taskIds="+ taskId +"&prcType=5&router=%2FregulatoryAssessmentTasks&prcNum="+ lawsOpinionGatherEO.getPrcNum() +"&taskDefinitionKey=pgrpg&isDisabled=true";
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) {
userIdList = (List<String>) jsonObject.get("userIdList");
userIdList.add(jsonObject.getString("evaluatorIds"));
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
@@ -366,9 +374,10 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_TODAY_MSG.getValue())){
userIdList = (List<String>) jsonObject.get("userIdList");
hrefFeishu = backUrl + "/regulatoryProcessReview?prcId="+ actiProcInstId +"&taskIds="+ taskId +"&prcType=5&router=%2FregulatoryAssessmentTasks&prcNum="+ lawsOpinionGatherEO.getPrcNum() +"&taskDefinitionKey=pgrpg&isDisabled=false";
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_TODAY_MSG.getValue())){
userIdList.add(jsonObject.getString("evaluatorIds"));
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
"\n标题: " + lawsOpinionGatherEO.getTitle() +
@@ -378,6 +387,8 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
hrefFeishu = backUrl + "/regulatoryProcessReview?prcId="+ actiProcInstId +"&taskIds="+ taskId +"&prcType=5&router=%2FregulatoryAssessmentTasks&prcNum="+ lawsOpinionGatherEO.getPrcNum() +"&taskDefinitionKey=pgrpg&isDisabled=false";
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_COMPLETE_MSG.getValue())) {
userIdList.add((String) jsonObject.get("initiatorUserId"));
@@ -391,6 +402,9 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName() +
"\nDue Date: " + endTime;
hrefFeishu = backUrl + "/regulatoryProcessReview?prcId="+ actiProcInstId +"&taskIds="+ taskId +"&prcType=5&router=%2FregulatoryAssessmentTasks&prcNum="+ lawsOpinionGatherEO.getPrcNum() +"&taskDefinitionKey=pgrpg&isDisabled=true";
}
/*else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_MSG.getValue())){
userIdList = (List<String>) jsonObject.get("userIdList");
@@ -405,8 +419,7 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
if (ObjectUtils.isNotEmpty(sysUsers)) {
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
}
//飞书跳转链接
String hrefFeishu = backUrl + JumpLinkEnum.FGPG_TODO_CENTER_LINK.getLink();
try {
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
feishuMsgVo.setTitle(title);
@@ -212,11 +212,13 @@ public class ProjectLibraryBaseServiceImpl extends ServiceImpl<ProjectLibraryBas
//初始化当前项目的studio与项目库 角色关系 projectLibraryRoleRelEOService
LambdaQueryWrapper<ProjectLibraryRoleRelEO> queryWrapper = new LambdaQueryWrapper<>();
queryWrapper.in(ProjectLibraryRoleRelEO::getProjectLibraryId,projectLibraryBase.getId());
ProjectLibraryRoleRelEO projectLibraryRoleRelEO = projectLibraryRoleRelEOService.getOne(queryWrapper);
if(ObjectUtils.isNotEmpty(projectLibraryRoleRelEO)){
projectLibraryRoleRelEO.setId(UUID.randomUUID().toString().replace("-", ""));
projectLibraryRoleRelEO.setProjectLibraryId(projectId);
projectLibraryRoleRelEOService.add(projectLibraryRoleRelEO);
List<ProjectLibraryRoleRelEO> projectLibraryRoleRelEOList = projectLibraryRoleRelEOService.list(queryWrapper);
if(ObjectUtils.isNotEmpty(projectLibraryRoleRelEOList)){
for (ProjectLibraryRoleRelEO projectLibraryRoleRelEO : projectLibraryRoleRelEOList) {
projectLibraryRoleRelEO.setId(UUID.randomUUID().toString().replace("-", ""));
projectLibraryRoleRelEO.setProjectLibraryId(projectId);
projectLibraryRoleRelEOService.add(projectLibraryRoleRelEO);
}
}
}
@@ -78,7 +78,9 @@
pi.prc_name,
plb.project_name_id,
plb.target_market,
plb.studio_engineer
plb.studio_engineer,
plb.project_version,
plb.parent_id
FROM
process_info pi
left join project_library_base plb on plb.id = pi.project_library_id
@@ -160,7 +162,9 @@
pi.prc_name,
plb.project_name_id,
plb.target_market,
plb.studio_engineer
plb.studio_engineer,
plb.project_version,
plb.parent_id
FROM
process_info pi
LEFT JOIN project_library_base plb ON plb.id = pi.project_library_id
@@ -212,7 +216,9 @@
pi.prc_name,
plb.project_name_id,
plb.target_market,
plb.studio_engineer
plb.studio_engineer,
plb.project_version,
plb.parent_id
FROM
process_info pi
LEFT JOIN project_library_base plb ON plb.id = pi.project_library_id
@@ -5,7 +5,9 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jero.common.api.vo.Result;
import com.jero.common.constant.enums.CutEnum;
import com.jero.common.exception.JeroBootException;
import com.jero.common.system.vo.DictModel;
import com.jero.common.system.vo.LoginUser;
import com.jero.modules.lawsOpinionGather.entity.LawsOpinionGatherEO;
import com.jero.modules.lawsOpinionGather.service.ILawsOpinionGatherEOService;
@@ -23,6 +25,8 @@ import com.jero.modules.project.service.IProjectLibraryBaseService;
import com.jero.modules.project.service.IProjectTaskInventoryDetailEOService;
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
import com.jero.modules.system.entity.SysUser;
import com.jero.modules.system.enums.DicCodeEnum;
import com.jero.modules.system.service.ISysDictService;
import com.jero.modules.system.service.ISysUserService;
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
@@ -78,6 +82,8 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
private ILawsTechnologyEvaluationEOService lawsTechnologyEvaluationEOService;
@Autowired
private ILawsTechnologyEvaluationFlowDetailEOService lawsTechnologyEvaluationFlowDetailEOService;
@Autowired
private ISysDictService sysDictService;
/**
* 保存
@@ -511,7 +517,22 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
}
}
}
data.setProjectName(data.getProjectName() + "-" + data.getYearName());
if (StringUtils.isNotBlank(data.getTargetMarket())) {
//目标市场
List<DictModel> targetMarketList = this.sysDictService.queryDictItemsByCode(DicCodeEnum.REGION.getCode());
String targetMarket = getMarket(cut, targetMarketList, data.getTargetMarket());
//主项目的版本号
String projectVersion = "";
if(StringUtils.isBlank(data.getParentId())){
projectVersion = "00";
}else{
projectVersion = data.getProjectVersion();
}
data.setProjectName(data.getProjectName() + "-" + data.getYearName() + "-" + targetMarket + "-" + projectVersion);
}
//设置任务清单明细表id
if(CollectionUtils.isNotEmpty(finalTaskInventoryDetailList)){
@@ -1063,4 +1084,28 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
this.processInfoDetailEOService.saveBatch(processInfoDetailEOList);
}
private String getMarket(String cut, List<DictModel> targetMarketList, String targetMarkets) {
List<DictModel> dictModelList = new ArrayList<>();
for (String s : targetMarkets.split(",")) {
List<DictModel> dictModelListTemp = targetMarketList.stream()
.filter(e -> s.equals(e.getValue())).collect(Collectors.toList());
dictModelList.addAll(dictModelListTemp);
}
String targetMarket = "";
if(dictModelList.size() != 0){
StringBuilder sb = new StringBuilder();
for (DictModel dictModel : dictModelList) {
if(CutEnum.CN.getValue().equals(cut)){
sb.append(dictModel.getText()+",");
}else{
sb.append(dictModel.getTextEn()+",");
}
}
if(com.jero.modules.system.util.StringUtils.isNotBlank(sb)){
targetMarket = sb.substring(0,sb.length()-1);
}
}
return targetMarket;
}
}
@@ -107,4 +107,8 @@ public class ProcessInfoVO implements Serializable {
/**标准信息**/
private String standardInfo;
/**项目版本**/
private String projectVersion;
/**主项目id parent_id**/
private String parentId;
}
@@ -174,7 +174,7 @@ public interface WorkFlowFeignClient {
Result<String> deleteProcessInstanceByTaskId(@RequestParam("taskId") String taskId);
@RequestMapping(value = "/bat-wkflow/task/getLawsOpinionGatherFlowAssigneeList",method = RequestMethod.GET)
List<String> getLawsOpinionGatherFlowAssigneeList(@RequestParam("lawsOpinionGatherId") String lawsOpinionGatherId);
Map<String,String> getLawsOpinionGatherFlowAssigneeList(@RequestParam("lawsOpinionGatherId") String lawsOpinionGatherId);
@RequestMapping(value = "/bat-wkflow/task/getTaskAssigneeListByPrcIds",method = RequestMethod.GET)
List<String> getTaskAssigneeListByPrcIds(@RequestParam("actiProcInstIds") String actiProcInstIds);