发起人催办责任人
This commit is contained in:
+10
@@ -16,6 +16,7 @@ import com.jero.modules.dummy.entity.DummyInventoryBaseEO;
|
||||
import com.jero.modules.dummy.service.IDummyInventoryBaseEOService;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.vo.ProjectTaskUrgVo;
|
||||
import com.jero.modules.system.entity.SysRole;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
@@ -456,4 +457,13 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
@AutoLog(value = "任务清单催办")
|
||||
@ApiOperation(value="任务清单催办", notes="任务清单催办")
|
||||
@PostMapping(value = "/taskUrg")
|
||||
public Result<?> taskUrg(ProjectTaskUrgVo projectTaskUrgVo) {
|
||||
return this.projectLawsInventoryEOService.taskUrg(projectTaskUrgVo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+4
@@ -8,6 +8,7 @@ import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.vo.ProjectTaskUrgVo;
|
||||
import com.jero.modules.system.entity.SysRole;
|
||||
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
|
||||
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
|
||||
@@ -156,4 +157,7 @@ public interface IProjectLawsInventoryEOService extends IService<ProjectLawsInve
|
||||
void addProcessInfo(ProcessInfoEO processInfoEO, String projectLibraryId, Date endTime);
|
||||
|
||||
void addProcessInfoDetail(String processInfoId, List<ProcessInfoDetailEO> processInfoDetailEOList, Date endTime);
|
||||
|
||||
Result<?> taskUrg(ProjectTaskUrgVo projectTaskUrgVo);
|
||||
|
||||
}
|
||||
|
||||
+137
@@ -47,6 +47,7 @@ import com.jero.modules.project.enums.*;
|
||||
import com.jero.modules.project.mapper.*;
|
||||
import com.jero.modules.project.service.*;
|
||||
import com.jero.modules.project.util.WordUtil;
|
||||
import com.jero.modules.project.vo.ProjectTaskUrgVo;
|
||||
import com.jero.modules.split.common.FileUnZip;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
@@ -9025,4 +9026,140 @@ public class ProjectLawsInventoryEOServiceImpl extends ServiceImpl<ProjectLawsIn
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 任务清单催办
|
||||
* @param projectTaskUrgVo
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Result<?> taskUrg(ProjectTaskUrgVo projectTaskUrgVo) {
|
||||
if (ObjectUtils.isEmpty(projectTaskUrgVo.getProjectLawsInventoryIds())) {
|
||||
throw new JeroBootException("请选择至少一条数据");
|
||||
}
|
||||
if (ObjectUtils.isEmpty(projectTaskUrgVo.getType())) {
|
||||
throw new JeroBootException("请选择催办类型");
|
||||
}
|
||||
|
||||
String title = "";
|
||||
|
||||
if (FlowTypeEnum.SJFHXSHLC.getValue().equals(projectTaskUrgVo.getCut())) {
|
||||
title = MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getEn();
|
||||
} else if (FlowTypeEnum.PREHOMOQRLC.getValue().equals(projectTaskUrgVo.getCut())) {
|
||||
title = MessageType2Enum.PRE_HOMO_CONFIRMATION.getCn() + "/" + MessageType2Enum.PRE_HOMO_CONFIRMATION.getEn();
|
||||
} else if (FlowTypeEnum.YZFHXSCLC.getValue().equals(projectTaskUrgVo.getCut())) {
|
||||
title = MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getEn();
|
||||
} else {
|
||||
if (CutEnum.CN.getValue().equals(projectTaskUrgVo.getCut())) {
|
||||
throw new JeroBootException("请选择正确的催办类型");
|
||||
} else {
|
||||
throw new JeroBootException("Please select the correct type of reminder");
|
||||
}
|
||||
}
|
||||
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = baseMapper.selectById(projectTaskUrgVo.getProjectLawsInventoryIds().get(0));
|
||||
if (ObjectUtils.isEmpty(projectLawsInventoryEO)) {
|
||||
if (CutEnum.CN.getValue().equals(projectTaskUrgVo.getCut())) {
|
||||
throw new JeroBootException("程序异常,请刷新页面并重新操作");
|
||||
} else {
|
||||
throw new JeroBootException("The program is abnormal, please refresh the page and operate again");
|
||||
}
|
||||
}
|
||||
|
||||
ProjectLibraryBase projectLibraryBase = projectLibraryBaseMapper.selectOne(new QueryWrapper<ProjectLibraryBase>()
|
||||
.lambda().eq(ProjectLibraryBase::getId, projectLawsInventoryEO.getProjectLibraryId()));
|
||||
|
||||
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||
ProjectNameInfoEO projectNameInfoEO = projectNameInfoEOMapper.selectOne(projectNameInfoEOQueryWrapper);
|
||||
|
||||
QueryWrapper<ProjectYearNameInfoEO> projectYearInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
||||
|
||||
//项目名称
|
||||
String projectVersion = (com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBase.getParentId()) && com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBase.getProjectVersion())) ? "00" : projectLibraryBase.getProjectVersion();
|
||||
String projectName = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + "-" + projectLibraryBase.getTargetMarket() + "-" + projectVersion;
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
||||
|
||||
for (String projectLawsInventoryId : projectTaskUrgVo.getProjectLawsInventoryIds()) {
|
||||
ProjectLawsInventoryEO lawsInventoryEO = baseMapper.selectById(projectLawsInventoryId);
|
||||
if (ObjectUtils.isEmpty(lawsInventoryEO)) {
|
||||
if (CutEnum.CN.getValue().equals(projectTaskUrgVo.getCut())) {
|
||||
throw new JeroBootException("程序异常,请刷新页面并重新操作");
|
||||
} else {
|
||||
throw new JeroBootException("The program is abnormal, please refresh the page and operate again");
|
||||
}
|
||||
}
|
||||
String LAW_CN = lawsInventoryEO.getSerialNumber() + " " + lawsInventoryEO.getTitle();//法规
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(lawsInventoryEO.getStandId());
|
||||
String LAW_EN = lawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn();//法规
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
String userId = "";
|
||||
String dueDate = null;
|
||||
if (FlowTypeEnum.SJFHXSHLC.getValue().equals(projectTaskUrgVo.getCut())) {
|
||||
dueDate = sdf.format(lawsInventoryEO.getDesignDueDate());
|
||||
if (ObjectUtils.isNotEmpty(lawsInventoryEO.getDesignDutyId())) {
|
||||
userId = lawsInventoryEO.getDesignDutyId();
|
||||
}
|
||||
} else if (FlowTypeEnum.PREHOMOQRLC.getValue().equals(projectTaskUrgVo.getCut())) {
|
||||
dueDate = sdf.format(lawsInventoryEO.getPrehomoDueDate());
|
||||
if (ObjectUtils.isNotEmpty(lawsInventoryEO.getPrehomoDutyId())) {
|
||||
userId = lawsInventoryEO.getPrehomoDutyId();
|
||||
}
|
||||
} else if (FlowTypeEnum.YZFHXSCLC.getValue().equals(projectTaskUrgVo.getCut())) {
|
||||
dueDate = sdf.format(lawsInventoryEO.getVerifyDueDate());
|
||||
if (ObjectUtils.isNotEmpty(lawsInventoryEO.getVerifyDutyId())) {
|
||||
userId = lawsInventoryEO.getVerifyDutyId();
|
||||
}
|
||||
}
|
||||
|
||||
String[] thirdId = new String[1];
|
||||
if (ObjectUtils.isNotEmpty(userId)) {
|
||||
SysUser user = sysUserMapper.selectById(userId);
|
||||
if (ObjectUtils.isNotEmpty(user)) {
|
||||
thirdId[0] = user.getThirdId();
|
||||
}
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(title);
|
||||
feishuMsgVo.setCnContentUpper("您好,请尽快查看处理此项任务,谢谢!");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + dueDate);
|
||||
feishuMsgVo.setEnContentUpper("Hello! Please check and address the task ASAP. Thank you!");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: " + dueDate);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdId, feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
if (CutEnum.CN.getValue().equals(projectTaskUrgVo.getCut())) {
|
||||
return new Result<>().success("催办成功!");
|
||||
} else {
|
||||
return new Result<>().success("Success of the urging!");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+16
@@ -0,0 +1,16 @@
|
||||
package com.jero.modules.project.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ProjectTaskUrgVo {
|
||||
|
||||
private String cut;
|
||||
|
||||
private List<String> projectLawsInventoryIds;
|
||||
|
||||
private String type;
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user