Merge branch 'dev_2nd_period_test' into 'feature_dev_20221010_extend'
# Conflicts: # jero-web/src/common/lang/en-us.js # jero-web/src/common/lang/zh-cn.js
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ public enum MsgColorEnum {
|
||||
|
||||
GREEN("其他","green"),
|
||||
RED("任务被拒绝","red"),
|
||||
YELLOW("任务预期","yellow");
|
||||
YELLOW("任务逾期","yellow");
|
||||
|
||||
String label;
|
||||
String value;
|
||||
|
||||
+2
@@ -161,6 +161,8 @@ public class ShiroConfig {
|
||||
filterChainDefinitionMap.put("/lark/larkCardMessageConfig", "anon"); //飞书调用接口,卡片消息配置。
|
||||
filterChainDefinitionMap.put("/sys/user/querySysUserListByIdList", "anon"); // 工作流根据用户idList获取用户信息接口
|
||||
filterChainDefinitionMap.put("/project/projectTaskInventoryConditionAssessmentEO/initConditionAssessment", "anon"); // 初始化项目当前状态数据接口
|
||||
filterChainDefinitionMap.put("/todoCenter/projectProcess/initHistoryData", "anon"); // 待办中心-初始化历史数据接口排除
|
||||
filterChainDefinitionMap.put("/project/projectTaskInventoryEO/disposeHistoryData", "anon"); // 项目库-任务清单 处理历史数据接口
|
||||
|
||||
// 添加自己的过滤器并且取名为jwt
|
||||
Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
|
||||
|
||||
+3
-3
@@ -158,11 +158,11 @@ public class CommonController {
|
||||
// bizPath = "";
|
||||
// }
|
||||
}
|
||||
if(file.getOriginalFilename().length()>70){
|
||||
if(file.getOriginalFilename().length()>100){
|
||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||
throw new JeroBootException("文件名长度不能超过70位,请检查!");
|
||||
throw new JeroBootException("文件名长度不能超过100位,请检查!");
|
||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
||||
throw new JeroBootException("File name length cannot exceed 70 characters, please check!");
|
||||
throw new JeroBootException("File name length cannot exceed 100 characters, please check!");
|
||||
}
|
||||
}
|
||||
// OSSFile oSSFile = ossFileService.uploadLocal(file, bizPath,state,cut);
|
||||
|
||||
+4
@@ -157,4 +157,8 @@ public class SysAnnouncement implements Serializable {
|
||||
* 发起人
|
||||
*/
|
||||
private java.lang.String initiator;
|
||||
|
||||
private java.lang.String msgContentCn;//消息的中文(不带标签)
|
||||
|
||||
private java.lang.String msgContentInfoCn;//消息的中文(带标签)
|
||||
}
|
||||
|
||||
+2
@@ -4,6 +4,8 @@ public enum RoleEnum {
|
||||
ADMIN_ID("R&H Manager","R&H Manager","manager","1534020391015444481",2),
|
||||
MANAGER_ID("系统管理员","Administrator","admin","f6817f48af4fb3af11b9e8bf182f618b",3),
|
||||
COUNTRU_CARD_MANAGE("countryCard管理员","countryCardManage","countryCardManage","1564916346120916993",4),
|
||||
ENGINEERING_INTERFACE_PERSON("工程接口人","engineeringInterfacePerson","engineeringInterfacePerson","1534020084667674626",5),
|
||||
ENGINEER("工程师","engineer","engineer","1534020318437208065",6),
|
||||
;
|
||||
|
||||
String name;
|
||||
|
||||
+5
-1
@@ -18,6 +18,8 @@
|
||||
<result column="open_page" property="openPage" jdbcType="VARCHAR"/>
|
||||
<result column="document_id" property="documentId" jdbcType="VARCHAR"/>
|
||||
<result column="initiator" property="initiator" jdbcType="VARCHAR"/>
|
||||
<result column="msg_content_cn" property="msgContentCn" jdbcType="VARCHAR"/>
|
||||
<result column="msg_content_info_cn" property="msgContentInfoCn" jdbcType="VARCHAR"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="queryByUserId" parameterType="String" resultType="String">
|
||||
@@ -43,7 +45,9 @@
|
||||
sa.open_page as open_page,
|
||||
sa.msg_abstract,
|
||||
sa.document_id as document_id,
|
||||
sa.initiator as initiator
|
||||
sa.initiator as initiator,
|
||||
sa.msg_content_cn as msg_content_cn,
|
||||
sa.msg_content_info_cn as msg_content_info_cn
|
||||
from sys_announcement_send sas
|
||||
left join sys_announcement sa ON sas.annt_id = sa.id
|
||||
where sa.del_flag = '0'
|
||||
|
||||
+4
@@ -87,4 +87,8 @@ public class AnnouncementSendModel implements Serializable {
|
||||
*/
|
||||
private java.lang.String initiator;
|
||||
|
||||
private java.lang.String msgContentCn;//消息的中文(不带标签)
|
||||
|
||||
private java.lang.String msgContentInfoCn;//消息的中文(带标签)
|
||||
|
||||
}
|
||||
|
||||
+13
@@ -6,6 +6,7 @@ import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.common.system.vo.SysUserCacheInfo;
|
||||
import com.jero.modules.system.entity.PPEmployee;
|
||||
import com.jero.modules.system.entity.SysRole;
|
||||
@@ -276,4 +277,16 @@ public interface ISysUserService extends IService<SysUser> {
|
||||
* @return
|
||||
*/
|
||||
boolean isAdministrator();
|
||||
|
||||
/**
|
||||
* 验证当前登录用户是否是工程接口人角色
|
||||
* @return
|
||||
*/
|
||||
boolean isEngineeringInterfacePerson(LoginUser currentUser);
|
||||
|
||||
/**
|
||||
* 验证当前登录用户是否是工程师角色
|
||||
* @return
|
||||
*/
|
||||
boolean isEngineer(LoginUser currentUser);
|
||||
}
|
||||
|
||||
+42
@@ -614,4 +614,46 @@ public class SysUserServiceImpl extends ServiceImpl<SysUserMapper, SysUser> impl
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEngineeringInterfacePerson(LoginUser currentUser) {
|
||||
boolean result = false;
|
||||
RoleEnum engineeringInterfacePerson = RoleEnum.ENGINEERING_INTERFACE_PERSON;
|
||||
List<SysUserRole> userRoleList = this.sysUserRoleMapper.selectList(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, currentUser.getId()));
|
||||
if(CollectionUtils.isNotEmpty(userRoleList)){
|
||||
List<SysUserRole> userRoles = userRoleList.stream().filter(userRole -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(userRole.getRoleId(),engineeringInterfacePerson.getId())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userRoles)){
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isEngineer(LoginUser currentUser) {
|
||||
boolean result = false;
|
||||
RoleEnum engineer = RoleEnum.ENGINEER;
|
||||
List<SysUserRole> userRoleList = this.sysUserRoleMapper.selectList(new QueryWrapper<SysUserRole>().lambda().eq(SysUserRole::getUserId, currentUser.getId()));
|
||||
if(CollectionUtils.isNotEmpty(userRoleList)){
|
||||
List<SysUserRole> userRoles = userRoleList.stream().filter(userRole -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(userRole.getRoleId(),engineer.getId())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userRoles)){
|
||||
result = true;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
||||
+1
-2
@@ -57,9 +57,8 @@ public class ParamsCollectManifestEOController extends JeroController<ParamsColl
|
||||
// @RequiresPermissions("params:collectManifest:list")
|
||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "paramsManifestId") String paramsManifestId,
|
||||
@RequestParam(name = "flag") String flag,
|
||||
@RequestParam(name = "userType", required = false) String userType,
|
||||
@RequestParam(name = "cut") String cut) {
|
||||
List<Map<String, Object>> list = paramsCollectManifestEOService.getHeader(paramsManifestId, flag, userType, cut);
|
||||
List<Map<String, Object>> list = paramsCollectManifestEOService.getHeader(paramsManifestId, flag, cut);
|
||||
return Result.OK(list);
|
||||
}
|
||||
|
||||
|
||||
+1
@@ -128,6 +128,7 @@
|
||||
pm.state as state,
|
||||
pm.project_id as project_id,
|
||||
pm.create_time as create_time,
|
||||
pm.project_version as project_version,
|
||||
concat(pni.project_name,'-',pyni.year_name,'-',plb.target_market,'-',pm.version) as project_name
|
||||
from params_manifest pm
|
||||
left join project_library_base as plb on plb.id = pm.project_id
|
||||
|
||||
+1
-1
@@ -86,7 +86,7 @@ public interface IParamsCollectManifestEOService extends IService<ParamsCollectM
|
||||
* @param cut
|
||||
* @return
|
||||
*/
|
||||
List<Map<String, Object>> getHeader(String paramsManifestId, String flag, String userType, String cut);
|
||||
List<Map<String, Object>> getHeader(String paramsManifestId, String flag, String cut);
|
||||
|
||||
/**
|
||||
* 提交
|
||||
|
||||
+24
-20
@@ -756,7 +756,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public List<Map<String, Object>> getHeader(String paramsManifestId, String flag, String userType, String cut) {
|
||||
public List<Map<String, Object>> getHeader(String paramsManifestId, String flag, String cut) {
|
||||
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag); // flag--->7
|
||||
if (fieldList.size() != 0) {
|
||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
||||
@@ -779,10 +779,6 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
OnlCgformField onlCgformField = fieldList.get(i);
|
||||
Map<String, Object> map = new HashMap<>();
|
||||
String dbFieldName = onlCgformField.getDbFieldName();
|
||||
if ("report_time".equals(dbFieldName)
|
||||
&& (CollectManifestUserTypeEnum.SDT.getValue().equals(userType) || CollectManifestUserTypeEnum.DRE.getValue().equals(userType))) {
|
||||
continue;
|
||||
}
|
||||
if ("nio_number".equals(dbFieldName) || "params_name".equals(dbFieldName)) {
|
||||
map.put("click5", true);
|
||||
if("nio_number".equals(dbFieldName)) {
|
||||
@@ -1309,14 +1305,19 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
||||
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
||||
//认证工程师
|
||||
String[] engThirdIds = new String[1];
|
||||
//String[] engThirdIds = new String[1];
|
||||
List<String> engThirdIds = new ArrayList<>();
|
||||
List<ProjectLibraryBase> projectLibraryBases = projectLibraryBaseMapper.queryById(paramsManifestEO.getProjectId());
|
||||
if (ObjectUtils.isNotEmpty(projectLibraryBases)) {
|
||||
SysUser engineer = sysUserService.getById(projectLibraryBases.get(0).getCertificationEngineer());
|
||||
if (ObjectUtils.isNotEmpty(engineer)) {
|
||||
engThirdIds[0] = engineer.getThirdId();
|
||||
String[] ids = projectLibraryBases.get(0).getCertificationEngineer().split(",");
|
||||
if (ObjectUtils.isNotEmpty(ids)) {
|
||||
for (String id : ids) {
|
||||
SysUser engineer = sysUserService.getById(id);
|
||||
if (ObjectUtils.isNotEmpty(engineer)) {
|
||||
engThirdIds.add(engineer.getThirdId());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
if (CollectManifestStateEnum.SDT_BACK.getValue().equals(paramsCollectManifestEO.getState())) {
|
||||
//通知认证工程师
|
||||
@@ -1333,14 +1334,14 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
"\nDue Date: " + deadline);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||
feishuService.sendCard(engThirdIds, feishuMsgVo);
|
||||
feishuService.sendCard(engThirdIds.toArray(new String[engThirdIds.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
} else if (CollectManifestStateEnum.DRE_BACK.getValue().equals(paramsCollectManifestEO.getState())) {
|
||||
|
||||
//通知认证工程师
|
||||
try {
|
||||
/*try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
|
||||
feishuMsgVo.setCnContentUpper("您好,"+ currentUser.getUsername() +"申请撤回参数NIO-"+ paramsCollectManifestEO.getNioNumber() +",请及时处理");
|
||||
@@ -1353,16 +1354,19 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
"\nDue Date: " + deadline);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||
feishuService.sendCard(engThirdIds, feishuMsgVo);
|
||||
feishuService.sendCard(engThirdIds.toArray(new String[engThirdIds.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}*/
|
||||
//通知工程接口人
|
||||
SysUser sdtUser = sysUserService.getUserByName(paramsCollectManifestEO.getSdt());
|
||||
String[] SdtThirdIds = new String[1];
|
||||
if (ObjectUtils.isNotEmpty(sdtUser)) {
|
||||
SdtThirdIds[0] = sdtUser.getThirdId();
|
||||
List<String> SdtThirdIds = new ArrayList<>();
|
||||
for (String sdt : paramsCollectManifestEO.getSdt().split(",")) {
|
||||
SysUser sdtUser = sysUserService.getUserByName(sdt);
|
||||
if (ObjectUtils.isNotEmpty(sdtUser)) {
|
||||
SdtThirdIds.add(sdtUser.getThirdId());
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
|
||||
@@ -1376,7 +1380,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
"\nDue Date: " + deadline);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||
feishuService.sendCard(engThirdIds, feishuMsgVo);
|
||||
feishuService.sendCard(SdtThirdIds.toArray(new String[SdtThirdIds.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
@@ -4304,7 +4308,7 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
||||
|
||||
String title = MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn();
|
||||
String cnContentLower = "项目: " + projectInfo.getProjectName() +
|
||||
"\n发起人: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
"\n发起人: 系统通知";
|
||||
String enContentLower = "Project: " + projectInfo.getProjectName() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
if (!seven.isEmpty()) {
|
||||
|
||||
+8
@@ -59,6 +59,14 @@ public class ParamsConfigEOServiceImpl extends ServiceImpl<ParamsConfigEOMapper,
|
||||
public void addBatch(ParamsConfigVO paramsConfigVO) {
|
||||
String paramsManifestId = paramsConfigVO.getParamsManifestId();
|
||||
List<ParamsConfigEO> paramsConfigEOList = paramsConfigVO.getParamsConfigEOList();
|
||||
int count = (int) paramsConfigEOList.stream().map(ParamsConfigEO::getConfigName).distinct().count();
|
||||
if (count < paramsConfigEOList.size()) {
|
||||
if (CutEnum.CN.getValue().equals(paramsConfigVO.getCut())) {
|
||||
throw new JeroBootException("配置名称不能重复!");
|
||||
} else {
|
||||
throw new JeroBootException("Configuration Name cannot be duplicated!");
|
||||
}
|
||||
}
|
||||
|
||||
int ind = 1;
|
||||
List<ParamsConfigEO> addConfigList = new ArrayList<>(); // 新增的配置
|
||||
|
||||
+25
-16
@@ -419,27 +419,36 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
||||
log.info("-------------- 开始处理需要合并的单元格 -----------------");
|
||||
Set<SarFileCompareExcelMergeCell> mergeCellSet = new HashSet<>(mergeCells);
|
||||
for (SarFileCompareExcelMergeCell mergeCell : mergeCellSet) {
|
||||
Integer leftCount = mergeCell.getLeftEnd() - mergeCell.getLeftStart() + 1;
|
||||
Integer rightCount = mergeCell.getRightEnd() - mergeCell.getRightStart() + 1;
|
||||
Integer leftCount = 0;
|
||||
if (ObjectUtils.isNotEmpty(mergeCell.getLeftEnd())&&ObjectUtils.isNotEmpty(mergeCell.getLeftStart())) {
|
||||
leftCount = mergeCell.getLeftEnd() - mergeCell.getLeftStart() + 1;
|
||||
}
|
||||
Integer rightCount = 0;
|
||||
if (ObjectUtils.isNotEmpty(mergeCell.getRightEnd())&&ObjectUtils.isNotEmpty(mergeCell.getRightStart())) {
|
||||
rightCount = mergeCell.getRightEnd() - mergeCell.getRightStart() + 1;
|
||||
}
|
||||
Integer start = leftCount - rightCount >= 0 ? mergeCell.getLeftStart() : mergeCell.getRightStart();
|
||||
log.info("-------------- 合并开始行数:" + start + " -----------------");
|
||||
Integer end = leftCount - rightCount >= 0 ? mergeCell.getLeftEnd() : mergeCell.getRightEnd();
|
||||
log.info("-------------- 合并结束行数: " + end + " -----------------");
|
||||
//合并
|
||||
CellRangeAddress region0 = new CellRangeAddress(start, end, 0, 0);
|
||||
sheet.addMergedRegion(region0);
|
||||
CellRangeAddress region1 = new CellRangeAddress(start, end, 1, 1);
|
||||
sheet.addMergedRegion(region1);
|
||||
CellRangeAddress region2 = new CellRangeAddress(start, end, 2, 2);
|
||||
sheet.addMergedRegion(region2);
|
||||
CellRangeAddress region4 = new CellRangeAddress(start, end, 4, 4);
|
||||
sheet.addMergedRegion(region4);
|
||||
CellRangeAddress region5 = new CellRangeAddress(start, end, 5, 5);
|
||||
sheet.addMergedRegion(region5);
|
||||
CellRangeAddress region6 = new CellRangeAddress(start, end, 6, 6);
|
||||
sheet.addMergedRegion(region6);
|
||||
CellRangeAddress region7 = new CellRangeAddress(start, end, 8, 8);
|
||||
sheet.addMergedRegion(region7);
|
||||
if (ObjectUtils.isNotEmpty(start)&&ObjectUtils.isNotEmpty(end)) {
|
||||
CellRangeAddress region0 = new CellRangeAddress(start, end, 0, 0);
|
||||
sheet.addMergedRegion(region0);
|
||||
CellRangeAddress region1 = new CellRangeAddress(start, end, 1, 1);
|
||||
sheet.addMergedRegion(region1);
|
||||
CellRangeAddress region2 = new CellRangeAddress(start, end, 2, 2);
|
||||
sheet.addMergedRegion(region2);
|
||||
CellRangeAddress region4 = new CellRangeAddress(start, end, 4, 4);
|
||||
sheet.addMergedRegion(region4);
|
||||
CellRangeAddress region5 = new CellRangeAddress(start, end, 5, 5);
|
||||
sheet.addMergedRegion(region5);
|
||||
CellRangeAddress region6 = new CellRangeAddress(start, end, 6, 6);
|
||||
sheet.addMergedRegion(region6);
|
||||
CellRangeAddress region7 = new CellRangeAddress(start, end, 8, 8);
|
||||
sheet.addMergedRegion(region7);
|
||||
}
|
||||
|
||||
}
|
||||
log.info("-------------- 单元格合并成功 -----------------");
|
||||
}
|
||||
|
||||
+112
-27
@@ -316,7 +316,14 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String contentInfo =content;
|
||||
String title = content;
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList,
|
||||
title,
|
||||
content,
|
||||
contentInfo,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
null,
|
||||
null);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(StringUtils.join(serialNumberList, ","), contentInfo);
|
||||
}
|
||||
@@ -2201,8 +2208,39 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
+ " technical field you subscribed to, the "
|
||||
+ href +" has been updated.";
|
||||
String msgTitle = "The " + technologyTerritoryName + " technical field you subscribed to has been updated";
|
||||
|
||||
|
||||
String hrefYes = category + " " + "<a href='/docManage/library/detail?id=" + idTemp +
|
||||
"&title=" + title +
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>";
|
||||
|
||||
//消息英文--不带标签
|
||||
String contentNo = "In the "+ technologyTerritoryName
|
||||
+ " technical field you subscribed to, the "+
|
||||
category + " " + serialNumber +" has been updated.";;
|
||||
|
||||
//消息英文--带标签
|
||||
String contentYes = "In the "+ technologyTerritoryName
|
||||
+ " technical field you subscribed to, the "+
|
||||
category + " " + hrefYes +" has been updated.";;
|
||||
|
||||
//消息中文--不带标签
|
||||
String contentInfoNo = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + category + " " + serialNumber;;
|
||||
|
||||
//消息中文--带标签
|
||||
|
||||
String contentInfoYes = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + category + " " + hrefYes;;
|
||||
|
||||
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList,
|
||||
msgTitle,
|
||||
contentNo,
|
||||
contentYes,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
contentInfoNo,
|
||||
contentInfoYes);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(idTemp, contentInfo);
|
||||
//飞书
|
||||
@@ -2210,7 +2248,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String contentInfoFeiShu = "In the "+ technologyTerritoryName
|
||||
+ " technical field you subscribed to, the "+
|
||||
category + " " + serialNumber +" has been updated.";
|
||||
String contentInfoFeiShuCn = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + category + " " + serialNumber;;
|
||||
String contentInfoFeiShuCn = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + category + " " + serialNumber;
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
|
||||
@@ -3368,11 +3406,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
mapTemp.put("domainId", map.get("technology_territory"));
|
||||
mapTemp.put("documentId", map.get("id"));
|
||||
//订阅技术领域的人和订阅该条标准的人
|
||||
// List<String> userIdList = domainUserRelService.queryDomainUserRelInfo(mapTemp);
|
||||
//订阅技术领域发消息
|
||||
List<DomainUserRel> domainUserRelList = domainManageService.list();
|
||||
// List<String> thirdIdListAll = new ArrayList<>();
|
||||
// List<String> userListAll = new ArrayList<>();
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
List<String> userList = new ArrayList<>();
|
||||
String technologyTerritoryNameEn = "";
|
||||
@@ -3388,12 +3423,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
if(sysUsersFeishu.size() != 0){
|
||||
thirdIdList = sysUsersFeishu.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
userList = sysUsersFeishu.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
// if(thirdIdList.size() != 0){
|
||||
// thirdIdListAll.addAll(thirdIdList);
|
||||
// }
|
||||
// if(userList.size() != 0){
|
||||
// userListAll.addAll(userList);
|
||||
// }
|
||||
}
|
||||
}
|
||||
if(domainIdList.size() != 0){
|
||||
@@ -3429,19 +3458,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(sysUsers)) {
|
||||
userIdListUpdate = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||
userIdListUpdateFeishu = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
// if(userIdListUpdate.size() != 0){
|
||||
// userListAll.addAll(userIdListUpdate);
|
||||
// }
|
||||
// if(userIdListUpdateFeishu.size() != 0){
|
||||
// thirdIdListAll.addAll(userIdListUpdateFeishu);
|
||||
// }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//订阅管理
|
||||
if(thirdIdList.size() != 0){
|
||||
// thirdIdListAll = thirdIdListAll.stream().distinct().collect(Collectors.toList());
|
||||
String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
||||
category + " " + serialNumber+" has been updated.";
|
||||
String contentInfoFeiCn = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + serialNumber;
|
||||
@@ -3472,8 +3494,30 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
//您订阅的XXX已被修改
|
||||
String contentInfo = "In the " + technologyTerritoryNameEn + " technical field you subscribed to," +sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString();
|
||||
String msgTitle = "The " + technologyTerritoryNameEn + " technical field you subscribed to has been updated";
|
||||
//消息英文--不带标签
|
||||
String contentNo = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
||||
category + " " + serialNumber+" has been updated.";;
|
||||
|
||||
//消息英文--带标签
|
||||
String contentYes = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
||||
category + " " + href+" has been updated.";;
|
||||
|
||||
//消息中文--不带标签
|
||||
String contentInfoNo = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + serialNumber;;
|
||||
|
||||
//消息中文--带标签
|
||||
String contentInfoYes = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + href;;
|
||||
|
||||
|
||||
// 封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userList, msgTitle, contentInfoFei, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userList,
|
||||
msgTitle,
|
||||
contentNo,
|
||||
contentYes,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
contentInfoNo,
|
||||
contentInfoYes);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket((String) map.get("id"), contentInfo);
|
||||
}
|
||||
@@ -3487,17 +3531,36 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
"&title=" + title +
|
||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>";
|
||||
String content = "";
|
||||
if (StringUtils.isNotBlank(sbStr.toString())) {
|
||||
if (StringUtils.isNotBlank(sbStr.toString()) && StringUtils.isNotBlank(sbStrCn)) {
|
||||
//去掉a标签
|
||||
sbStr = sbStr.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", "");
|
||||
//您订阅的XXX已被修改
|
||||
content = "In the "+category + " " + serialNumber+" you subscribed to, has been modified,Please pay attention to check.";
|
||||
String contentInfo = "In the "+category + " " + href+" you subscribed to, "+sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString();
|
||||
//内容详情--英文(不带标签)
|
||||
String contentInfoNo = "In the "+category + " " + serialNumber+" you subscribed to, "+ sbStr.toString();
|
||||
|
||||
//内容详情--英文(带标签)
|
||||
String contentInfoYes = "In the "+category + " " + href+" you subscribed to, "+ sbStr.toString();
|
||||
|
||||
String msgTitle = serialNumber + " you subscribed to has been updated";
|
||||
//内容详情-中文(不带标签)
|
||||
String sbStrCnTemp = sbStrCn.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", "");
|
||||
String contentCnNo = "您所订阅的"+categoryCn+serialNumber+","+sbStrCnTemp;
|
||||
|
||||
//内容详情--中文(带标签)
|
||||
String contentInfoCnReplace = sbStrCn.replaceAll("<text class='highlight-class'>","").replaceAll("</text>","");
|
||||
String contentInfoCnYes ="您所订阅的"+categoryCn+href+","+contentInfoCnReplace;;
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdListUpdate, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdListUpdate,
|
||||
msgTitle,
|
||||
contentInfoNo,
|
||||
contentInfoYes,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
contentCnNo,
|
||||
contentInfoCnYes);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket((String) map.get("id"), contentInfo);
|
||||
sendWebsocket((String) map.get("id"), contentInfoYes);
|
||||
}
|
||||
//订阅文档的飞书消息
|
||||
try {
|
||||
@@ -3593,7 +3656,13 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String contentInfo = "New numbering implemented, please note update status of alternate numbering " + sbStr;
|
||||
String msgTitle = contentInfo;
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList,
|
||||
msgTitle,
|
||||
content,
|
||||
contentInfo,MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
null,
|
||||
null);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(StringUtils.join(serialNumberListTemp, ","), contentInfo);
|
||||
//飞书
|
||||
@@ -3621,7 +3690,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
String content,
|
||||
String contentInfo,
|
||||
String messageType,
|
||||
String initiator) {
|
||||
String initiator,
|
||||
String contentCn,
|
||||
String contentInfoCn) {
|
||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||
sysAnnouncement.setInitiator(initiator);
|
||||
sysAnnouncement.setDelFlag("0");
|
||||
@@ -3633,6 +3704,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
sysAnnouncement.setTitile(title);
|
||||
sysAnnouncement.setMsgContent(content);
|
||||
sysAnnouncement.setMsgContentInfo(contentInfo);
|
||||
sysAnnouncement.setMsgContentCn(contentCn);
|
||||
sysAnnouncement.setMsgContentInfoCn(contentInfoCn);
|
||||
sysAnnouncement.setUserIds(StringUtils.join(userIdList, ","));
|
||||
return sysAnnouncement;
|
||||
}
|
||||
@@ -5192,8 +5265,20 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
||||
// String contentInfo = sysUser.getUsername() + " pushed " + StringUtils.join(hrefList, ",") + " to you. Please be reminded to check it out.";
|
||||
// String title = StringUtils.join(serialNumberList, ",") + " has been pushed to you, please check";
|
||||
|
||||
String contentEnNo = sysUser.getUsername() + " shared " + StringUtils.join(serialNumberList, ",") + " with you, please be reminded to check it out.";
|
||||
String contentInfoEnYes = sysUser.getUsername() + " shared " + StringUtils.join(hrefList, ",") + " with you, please be reminded to check it out.";
|
||||
String contentInfoCnNo = sysUser.getUsername() + "向您分享了" + StringUtils.join(serialNumberList, ",") + "请查看.";
|
||||
String contentInfoCnYes = sysUser.getUsername() + "向您分享了" + StringUtils.join(hrefList, ",") + "请查看.";
|
||||
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.PUSH.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList,
|
||||
title,
|
||||
contentEnNo,
|
||||
contentInfoEnYes,
|
||||
MessageTypeEnum.PUSH.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
contentInfoCnNo,
|
||||
contentInfoCnYes);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||
//飞书
|
||||
|
||||
+113
-27
@@ -42,6 +42,7 @@ import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import org.apache.commons.collections.MapUtils;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@@ -251,10 +252,14 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
@Override
|
||||
public IPage<DummyInventoryBaseEO> getPageInfo(Page<DummyInventoryBaseEO> page, QueryWrapper<DummyInventoryBaseEO> queryWrapper) {
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
queryWrapper.and(query->{
|
||||
query.in("create_by",sysUser.getUsername()).in("state",InventoryStateEnum.DRAFT.getValue())
|
||||
.or().in("state",InventoryStateEnum.ISSUE.getValue());
|
||||
});
|
||||
//系统管理
|
||||
boolean administrator = sysUserService.isAdministrator();
|
||||
if(!administrator){
|
||||
queryWrapper.and(query->{
|
||||
query.in("create_by",sysUser.getUsername()).in("state",InventoryStateEnum.DRAFT.getValue())
|
||||
.or().in("state",InventoryStateEnum.ISSUE.getValue());
|
||||
});
|
||||
}
|
||||
// queryWrapper.or(query->{
|
||||
// query.in("state",InventoryStateEnum.ISSUE.getValue());
|
||||
// });
|
||||
@@ -320,19 +325,19 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
|
||||
DummyInventoryBaseEO baseEO = queryById(dummyInventoryBaseEO.getId());
|
||||
List<String> createByNameList =new ArrayList<>();
|
||||
if (StringUtils.isNotBlank(baseEO.getCreateBy())) {
|
||||
createByNameList = Arrays.asList(baseEO.getCreateBy().split(","));
|
||||
|
||||
if (CollectionUtils.isNotEmpty(createByNameList)){
|
||||
if (!createByNameList.contains(loginUserName)) {
|
||||
if (CutEnum.CN.getValue().equals(dummyInventoryBaseEO.getCut())) {
|
||||
throw new JeroBootException("当前用户非创建者,无法发布");
|
||||
} else {
|
||||
throw new JeroBootException("The current user is not the creator and cannot be issued.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
// if (StringUtils.isNotBlank(baseEO.getCreateBy())) {
|
||||
// createByNameList = Arrays.asList(baseEO.getCreateBy().split(","));
|
||||
//
|
||||
// if (CollectionUtils.isNotEmpty(createByNameList)){
|
||||
// if (!createByNameList.contains(loginUserName)) {
|
||||
// if (CutEnum.CN.getValue().equals(dummyInventoryBaseEO.getCut())) {
|
||||
// throw new JeroBootException("当前用户非创建者,无法发布");
|
||||
// } else {
|
||||
// throw new JeroBootException("The current user is not the creator and cannot be issued.");
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
Date now = new Date();
|
||||
UpdateWrapper<DummyInventoryBaseEO> baseWrapper=new UpdateWrapper<>();
|
||||
baseWrapper.set("state",dummyInventoryBaseEO.getState());
|
||||
@@ -409,31 +414,83 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
|
||||
//发消息
|
||||
int count = 1;
|
||||
List<String> hrefListAdd = new ArrayList<>();
|
||||
if(serialNumberAddList.size() != 0){
|
||||
List<String> hrefList = new ArrayList<>();
|
||||
|
||||
for (DummyInventoryInfoEO dummyInventoryInfoEO : collectAdd) {
|
||||
String href = "<a href='/docManage/library/detail?id=" + dummyInventoryInfoEO.getBussDocumentLibraryId() +
|
||||
"&title=" + dummyInventoryInfoEO.getTitle() +
|
||||
"&serial_number=" + dummyInventoryInfoEO.getSerialNumber() + "'" + " target='_blank'>" + dummyInventoryInfoEO.getSerialNumber() + "</a>";
|
||||
hrefList.add(href);
|
||||
hrefListAdd.add(href);
|
||||
}
|
||||
contentLog += count+". New regulations: " + StringUtils.join(hrefList,",") + "</br>";
|
||||
contentLog += count+". New regulations: " + StringUtils.join(hrefListAdd,",") + "</br>";
|
||||
contentLogFeishu += count+". New regulations: " + StringUtils.join(serialNumberAddList,",") + " ";
|
||||
count++;
|
||||
}
|
||||
List<String> hrefListDelete = new ArrayList<>();
|
||||
if(serialNumberDeleteList.size() != 0){
|
||||
List<String> hrefList = new ArrayList<>();
|
||||
for (DummyInventoryInfoEO dummyInventoryInfoEO : collectDelete) {
|
||||
String href = "<a href='/docManage/library/detail?id=" + dummyInventoryInfoEO.getBussDocumentLibraryId() +
|
||||
"&title=" + dummyInventoryInfoEO.getTitle() +
|
||||
"&serial_number=" + dummyInventoryInfoEO.getSerialNumber() + "'" + " target='_blank'>" + dummyInventoryInfoEO.getSerialNumber() + "</a>";
|
||||
hrefList.add(href);
|
||||
hrefListDelete.add(href);
|
||||
}
|
||||
contentLog += count + ". Remove regulations: " + StringUtils.join(hrefList,",") + "</br>";
|
||||
contentLog += count + ". Remove regulations: " + StringUtils.join(hrefListDelete,",") + "</br>";
|
||||
contentLogFeishu += count + ". Remove regulations: " + StringUtils.join(serialNumberDeleteList,",") + " ";
|
||||
}
|
||||
|
||||
if(serialNumberAddList.size() != 0 || serialNumberDeleteList.size() != 0){
|
||||
int countNo = 1;
|
||||
StringBuilder sbContentNo = new StringBuilder();
|
||||
if(ObjectUtils.isNotEmpty(serialNumberAddList)){
|
||||
sbContentNo.append(countNo+". New regulations: "+StringUtils.join(serialNumberAddList,",")+", ");
|
||||
countNo ++;
|
||||
}
|
||||
if(ObjectUtils.isNotEmpty(serialNumberDeleteList)){
|
||||
sbContentNo.append(countNo+". Remove regulations: "+StringUtils.join(serialNumberDeleteList,","));
|
||||
}
|
||||
|
||||
int countYes = 1;
|
||||
StringBuilder sbContentYes = new StringBuilder();
|
||||
if(ObjectUtils.isNotEmpty(serialNumberAddList)){
|
||||
sbContentYes.append(countYes+". New regulations: "+StringUtils.join(hrefListAdd,",")+"</br>");
|
||||
countYes ++;
|
||||
}
|
||||
if(ObjectUtils.isNotEmpty(serialNumberDeleteList)){
|
||||
sbContentYes.append(countYes+". Remove regulations: "+StringUtils.join(hrefListDelete,","));
|
||||
}
|
||||
//消息英文--不带标签
|
||||
String contentNo = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows:" + sbContentNo;
|
||||
//消息英文--带标签
|
||||
String contentYes = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated as follows:"+ "</br>" + sbContentYes;;
|
||||
|
||||
int countInfoNo = 1;
|
||||
StringBuilder sbContentINfoNo = new StringBuilder();
|
||||
if(ObjectUtils.isNotEmpty(serialNumberAddList)){
|
||||
sbContentINfoNo.append(countInfoNo+". 新增文档: "+StringUtils.join(serialNumberAddList,",")+", ");
|
||||
countInfoNo ++;
|
||||
}
|
||||
if(ObjectUtils.isNotEmpty(serialNumberDeleteList)){
|
||||
sbContentINfoNo.append(countInfoNo+". 删除文档: "+StringUtils.join(serialNumberDeleteList,","));
|
||||
}
|
||||
|
||||
int countInfoYes = 1;
|
||||
StringBuilder sbContentInfoYes = new StringBuilder();
|
||||
if(ObjectUtils.isNotEmpty(serialNumberAddList)){
|
||||
sbContentInfoYes.append(countInfoYes+". 新增文档: "+StringUtils.join(hrefListAdd,",")+"</br>");
|
||||
countInfoYes ++;
|
||||
}
|
||||
if(ObjectUtils.isNotEmpty(serialNumberDeleteList)){
|
||||
sbContentInfoYes.append(countInfoYes+". 删除文档: "+StringUtils.join(hrefListDelete,","));
|
||||
}
|
||||
|
||||
//消息中文--不带标签
|
||||
String contentInfoNo = "您所订阅的"+baseEO.getName()+"虚拟清单已更新,更新内容如下:"+sbContentINfoNo;
|
||||
//消息中文--带标签
|
||||
String contentInfoYes = "您所订阅的"+baseEO.getName()+"虚拟清单已更新,更新内容如下:"+"</br>"+sbContentInfoYes;
|
||||
|
||||
|
||||
|
||||
List<String> userNameList = dummyReadEOService.queryReadUserInfo(dummyInventoryBaseEO.getId());
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(userNameList.size() != 0){
|
||||
@@ -442,7 +499,14 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
if(userIdList.size() != 0){
|
||||
//封装消息的实体类
|
||||
String title = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated.";
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, title, contentLog,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
|
||||
title,
|
||||
contentNo,
|
||||
contentYes,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
contentInfoNo,
|
||||
contentInfoYes);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title);
|
||||
}
|
||||
@@ -492,7 +556,16 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
String title = "The "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn.";
|
||||
//Please note that the XX virtual list you subscribed to has been withdrawn.
|
||||
String contentLog = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn.";
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, title, contentLog,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
|
||||
String contentCn = "您订阅的虚拟清单"+ baseEO.getName()+"已被撤回.";
|
||||
String contentInfoEn = "Please note that the "+ baseEO.getName()+" virtual list you subscribed to has been withdrawn.";
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
|
||||
title,
|
||||
contentInfoEn,
|
||||
contentInfoEn,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
contentCn,contentCn);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title);
|
||||
}
|
||||
@@ -1371,7 +1444,14 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
|
||||
msgTitle = "The " + baseName + " virtual list you subscribed to has been updated";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
|
||||
msgTitle,
|
||||
content,
|
||||
contentInfo,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
null,
|
||||
null);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo);
|
||||
//飞书
|
||||
@@ -1385,7 +1465,13 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
||||
contentInfo = "Please note that the "+baseName+" virtual list you subscribed to has been withdrawn.";
|
||||
msgTitle = "The " + baseName + " virtual list you subscribed to has been withdrawn";
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, msgTitle, content, contentInfo,MessageTypeEnum.READ.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
|
||||
msgTitle,
|
||||
content,
|
||||
contentInfo,
|
||||
MessageTypeEnum.READ.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
null,null);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo);
|
||||
//飞书
|
||||
|
||||
+25
-6
@@ -512,9 +512,19 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
contentSb.append("\"tag\": \"div\",");
|
||||
contentSb.append("\"text\": {");
|
||||
contentSb.append("\"content\": \"" + "编号: " + feishuMsgVo.getRegulationNo() + "\n")
|
||||
.append("标题: "+feishuMsgVo.getDocumentTitleCn() + "\n")
|
||||
.append("新车型实施日期: "+feishuMsgVo.getNewTypeExecutionDate()+ "\n")
|
||||
.append("在产车实施日期: "+feishuMsgVo.getNewVehicleExecutionDate()+ "\",");
|
||||
.append("标题: "+feishuMsgVo.getDocumentTitleCn() + "\n");
|
||||
if (StringUtils.isNotBlank(feishuMsgVo.getNewTypeExecutionDate())) {
|
||||
contentSb.append("新车型实施日期: " + feishuMsgVo.getNewTypeExecutionDate() + "\n");
|
||||
} else {
|
||||
contentSb.append("新车型实施日期: "+ "\n");
|
||||
}
|
||||
if (StringUtils.isNotBlank(feishuMsgVo.getNewVehicleExecutionDate())) {
|
||||
contentSb.append("在产车实施日期: " + feishuMsgVo.getNewVehicleExecutionDate());
|
||||
} else {
|
||||
contentSb.append("在产车实施日期: ");
|
||||
}
|
||||
contentSb.append("\",");
|
||||
|
||||
contentSb.append("\"tag\": \"lark_md\"");
|
||||
contentSb.append("}");
|
||||
contentSb.append("},");
|
||||
@@ -535,9 +545,18 @@ public class FeishuServiceImpl implements IFeishuService {
|
||||
contentSb.append("\"tag\": \"div\",");
|
||||
contentSb.append("\"text\": {");
|
||||
contentSb.append("\"content\": \"" + "Regulation No: " + feishuMsgVo.getRegulationNo() + "\n")
|
||||
.append("Title: " + feishuMsgVo.getDocumentTitleEn() + "\n")
|
||||
.append("New Type Execution Date: " + feishuMsgVo.getNewTypeExecutionDate() + "\n")
|
||||
.append("New Vehicle Execution Date: " + feishuMsgVo.getNewVehicleExecutionDate() + "\",");
|
||||
.append("Title: " + feishuMsgVo.getDocumentTitleEn() + "\n");
|
||||
if (StringUtils.isNotBlank(feishuMsgVo.getNewTypeExecutionDate())) {
|
||||
contentSb.append("New Type Execution Date: " + feishuMsgVo.getNewTypeExecutionDate() + "\n");
|
||||
} else {
|
||||
contentSb.append("New Type Execution Date: "+ "\n");
|
||||
}
|
||||
if (StringUtils.isNotBlank(feishuMsgVo.getNewVehicleExecutionDate())) {
|
||||
contentSb.append("New Vehicle Execution Date: " + feishuMsgVo.getNewVehicleExecutionDate());
|
||||
} else {
|
||||
contentSb.append("New Vehicle Execution Date: ");
|
||||
}
|
||||
contentSb.append("\",");
|
||||
contentSb.append("\"tag\": \"lark_md\"");
|
||||
contentSb.append("}");
|
||||
contentSb.append("},");
|
||||
|
||||
+40
-36
@@ -10,6 +10,8 @@ import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.MsgColorEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
@@ -85,6 +87,8 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
private IProcessInfoEOService processInfoEOService;
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -296,12 +300,15 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
//String msgTitle = "";
|
||||
|
||||
LawsOpinionGatherEO lawsOpinionGatherEO = queryById(lawsOpinionGatherId);
|
||||
Map<String, String> lawsOpinionGatherPrcInfo = this.workFlowFeignClient.getLawsOpinionGatherPrcInfo(lawsOpinionGatherId);
|
||||
//英文标题
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(lawsOpinionGatherEO.getStandId());
|
||||
|
||||
//Map<String, String> lawsOpinionGatherPrcInfo = this.workFlowFeignClient.getLawsOpinionGatherPrcInfo(lawsOpinionGatherId);
|
||||
String initiator = "";
|
||||
String title = MessageType2Enum.REGULATION_OPINION_COLLECTION.getCn() + "/" + MessageType2Enum.REGULATION_OPINION_COLLECTION.getEn();
|
||||
String endTime = new SimpleDateFormat("yyyy-MM-dd").format(lawsOpinionGatherEO.getEndTime());//截止日期
|
||||
String prcNum = lawsOpinionGatherPrcInfo.get("prcNum");
|
||||
String prcName = lawsOpinionGatherPrcInfo.get("prcName");
|
||||
//String prcNum = lawsOpinionGatherPrcInfo.get("prcNum");
|
||||
//String prcName = lawsOpinionGatherPrcInfo.get("prcName");
|
||||
String cnContentUpper = "";
|
||||
String cnContentLower = "";
|
||||
String enContentUpper = "";
|
||||
@@ -317,13 +324,13 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
|
||||
initiator = currentUser.getUsername();
|
||||
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
|
||||
cnContentLower = "编号: " + prcNum +
|
||||
"\n标题: " + prcName +
|
||||
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||
"\n发起人: " + initiator +
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!";
|
||||
enContentLower = "Regulation No: " + prcNum +
|
||||
"\nTitle: " + prcName +
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + initiator +
|
||||
"\nDue Date: " + endTime;
|
||||
|
||||
@@ -335,58 +342,55 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
//msgContentEN = currentUser.getUsername() + " has submitted the collection process of Collection of Legislative Comments of "+serialNumber+", please check it in time.";
|
||||
//msgTitle = "You have a Collection of Legislative Comments task completed";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
initiator = currentUser.getUsername();
|
||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"已提交反馈意见,请查看";
|
||||
cnContentLower = "编号: " + prcNum +
|
||||
"\n标题: " + prcName +
|
||||
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||
"\n发起人: " + initiator +
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has submitted the comments. Please check it";
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") +
|
||||
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") +
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + initiator +
|
||||
"\nDue Date: " + endTime;
|
||||
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) {
|
||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
|
||||
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
|
||||
cnContentLower = "编号: " + prcNum +
|
||||
"\n标题: " + prcName +
|
||||
"\n发起人: " + initiator +
|
||||
"\n截止时间: " + endTime;
|
||||
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||
"\n发起人: 系统通知" ;
|
||||
enContentUpper = "Hello! This task will expire in 3 days. Please check and address the task in a timely manner. Thank you!";
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") +
|
||||
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") +
|
||||
"\nInitiator: " + initiator +
|
||||
"\nDue Date: " + endTime;
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\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");
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
|
||||
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
|
||||
cnContentLower = "编号: " + prcNum +
|
||||
"\n标题: " + prcName +
|
||||
"\n发起人: " + initiator;
|
||||
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||
"\n发起人: 系统通知";
|
||||
enContentUpper = "Hello! This task will expire today. Please check and address the task ASAP. Thank you!";
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") +
|
||||
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") +
|
||||
"\nInitiator: " + initiator;
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_COMPLETE_MSG.getValue())) {
|
||||
userIdList.add((String) jsonObject.get("initiatorUserId"));
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
|
||||
cnContentUpper = "您好,该任务已完成,请查看";
|
||||
cnContentLower = "编号: " + prcNum +
|
||||
"\n标题: " + prcName +
|
||||
"\n发起人: " + initiator;
|
||||
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||
"\n发起人: 系统通知"+
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! The task is completed. Please check it.";
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") +
|
||||
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") +
|
||||
"\nInitiator: " + initiator;
|
||||
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName() +
|
||||
"\nDue Date: " + endTime;
|
||||
}
|
||||
/*else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_MSG.getValue())){
|
||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||
@@ -402,7 +406,7 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.FGPG_TODO_CENTER_LINK.getLink();
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(title);
|
||||
|
||||
+43
-39
@@ -11,6 +11,7 @@ import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.enums.FieldTypeEnum;
|
||||
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||
@@ -628,11 +629,14 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
String initiator = "";
|
||||
String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId");
|
||||
LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = queryById(lawsTechnologyEvaluationId);
|
||||
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId);
|
||||
String number = flowDetailEO.getPrcNum();
|
||||
String name = flowDetailEO.getPrcName();
|
||||
//LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId);
|
||||
//String number = flowDetailEO.getPrcNum();
|
||||
//String name = flowDetailEO.getPrcName();
|
||||
String endTime = new SimpleDateFormat("yyyy-MM-dd").format(lawsTechnologyEvaluationEO.getEndTime());
|
||||
|
||||
//英文标题
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(lawsTechnologyEvaluationEO.getStandId());
|
||||
|
||||
String title = MessageType2Enum.REGULATION_TECHNICAL_ASSESSMENT.getCn() + "/" + MessageType2Enum.REGULATION_TECHNICAL_ASSESSMENT.getEn();
|
||||
String cnContentUpper = "";
|
||||
String cnContentLower = "";
|
||||
@@ -650,13 +654,13 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
|
||||
initiator = currentUser.getUsername();
|
||||
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
|
||||
cnContentLower = "编号:" + number +
|
||||
"\n标题: " + name +
|
||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||
"\n发起人: " + initiator +
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!";
|
||||
enContentLower = "Regulation No :" + number +
|
||||
"\nTitle: " + name +
|
||||
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + initiator +
|
||||
"\nDue Date: " + endTime;
|
||||
}else if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_ENALUATOR_SUBMIT_MSG.getValue())){
|
||||
@@ -668,15 +672,15 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
//msgContentEN = currentUser.getUsername() + " has submitted the collection process of Regulatory and technical assessment of "+serialNumber+", Please check and address it in time.";
|
||||
//msgTitle = "You have a Regulatory and technical assessment task to complete";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
initiator = currentUser.getUsername();
|
||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"已提交评估结果,请审核";
|
||||
cnContentLower = "编号:" + number +
|
||||
"\n标题: " + name +
|
||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||
"\n发起人: " + initiator +
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has submitted the assessment result. Please review it";
|
||||
enContentLower = "Regulation No :" + number +
|
||||
"\nTitle: " + name +
|
||||
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + initiator +
|
||||
"\nDue Date: " + endTime;
|
||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_ACCEPTED_MSG.getValue())){
|
||||
@@ -684,16 +688,17 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
//您提交的GB 7258 的法规技术评估流程已通过。
|
||||
//msgContentEN = "The regulatory and technical assessment process for "+serialNumber+" you submitted has passed.";
|
||||
//msgTitle = "You have a Regulatory and technical assessment task completed";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
||||
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
||||
initiator = currentUser.getUsername();
|
||||
cnContentUpper = "您好,您提交的评估结果已通过";
|
||||
cnContentLower = "编号:" + number +
|
||||
"\n标题: " + name +
|
||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||
"\n发起人: " + initiator +
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! The assessment result you submitted has passed";
|
||||
enContentLower = "Regulation No :" + number +
|
||||
"\nTitle: " + name +
|
||||
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + initiator +
|
||||
"\nDue Date: " + endTime;
|
||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_REJECTED_MSG.getValue())){
|
||||
@@ -701,40 +706,39 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
//您提交的GB 7258 的法规技术评估流程已被退回,请及时查看处理。
|
||||
//msgContentEN = "The regulatory and technical assessment process of "+serialNumber+" you submitted has been returned, Please check and address it in time.";
|
||||
//msgTitle = "You have a Regulatory and technical assessment task to complete";
|
||||
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
||||
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
||||
initiator = currentUser.getUsername();
|
||||
cnContentUpper = "您好,您提交的评估结果被退回,请及时查看处理";
|
||||
cnContentLower = "编号:" + number +
|
||||
"\n标题: " + name +
|
||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||
"\n发起人: " + initiator +
|
||||
"\n截止时间: " + endTime;
|
||||
enContentUpper = "Hello! The assessment result you submitted has been rejected. Please check and address it in a timely manner";
|
||||
enContentLower = "Regulation No :" + number +
|
||||
"\nTitle: " + name +
|
||||
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + initiator +
|
||||
"\nDue Date: " + endTime;
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) {
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
|
||||
cnContentLower = "编号:" + number +
|
||||
"\n标题: " + name +
|
||||
"\n发起人: " + initiator;
|
||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||
"\n发起人: 系统通知";
|
||||
enContentUpper = "Hello! This task will expire in 3 days. Please check and address the task in a timely manner. Thank you!";
|
||||
enContentLower = "Regulation No :" + number +
|
||||
"\nTitle: " + name +
|
||||
"\nInitiator: " + initiator;
|
||||
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||
|
||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_TODAY_MSG.getValue())) {
|
||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
|
||||
cnContentLower = "编号:" + number +
|
||||
"\n标题: " + name +
|
||||
"\n发起人: " + initiator;
|
||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||
"\n发起人: 系统通知";
|
||||
enContentUpper = "Hello! This task will expire today. Please check and address the task ASAP. Thank you!";
|
||||
enContentLower = "Regulation No :" + number +
|
||||
"\nTitle: " + name +
|
||||
"\nInitiator: " + initiator;
|
||||
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||
|
||||
} /*else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_MSG.getValue())) {
|
||||
@@ -752,7 +756,7 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.TASK_AFFIRM_LINK.getLink();
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.FGPG_TODO_CENTER_LINK.getLink();
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(title);
|
||||
|
||||
+78
-8
@@ -1,29 +1,43 @@
|
||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseCommentEO;
|
||||
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseCommentEOMapper;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCommentEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseEOService;
|
||||
import com.jero.modules.problemKnowledgeBase.vo.ProblemKnowledgeBaseCommentVO;
|
||||
import com.jero.modules.project.entity.ProblemKnowledgeBaseReplyEO;
|
||||
import com.jero.modules.project.service.IProblemKnowledgeBaseReplyEOService;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysAnnouncementService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.shiro.SecurityUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.Date;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import org.springframework.transaction.annotation.Propagation;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
* @Description: 问题知识库评论表
|
||||
@@ -37,6 +51,24 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl<Proble
|
||||
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseReplyEOService problemKnowledgeBaseReplyEOService;
|
||||
|
||||
@Autowired
|
||||
private BussDocumentLibraryEOServiceImpl bussDocumentLibraryEOService;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
@Resource
|
||||
private IFeishuService iFeishuService;
|
||||
|
||||
@Autowired
|
||||
private ISysAnnouncementService sysAnnouncementService;
|
||||
|
||||
@Autowired
|
||||
private IProblemKnowledgeBaseEOService problemKnowledgeBaseEOService;
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -49,7 +81,45 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl<Proble
|
||||
problemKnowledgeBaseCommentEO.setCreateTime(now);
|
||||
problemKnowledgeBaseCommentEO.setUpdateTime(now);
|
||||
save(problemKnowledgeBaseCommentEO);
|
||||
}
|
||||
|
||||
ProblemKnowledgeBaseEO problemKnowledgeBaseEO = problemKnowledgeBaseEOService.getById(problemKnowledgeBaseCommentEO.getProblemKnowledgeBaseId());
|
||||
|
||||
LoginUser loginUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String createBy = problemKnowledgeBaseEO.getCreateBy();
|
||||
//自己回复的时候不发消息
|
||||
// if(!loginUser.getUsername().equals(createBy)){
|
||||
SysUser sysUser = sysUserService.getUserByName(createBy);
|
||||
String contentCNNo = "您发布的问题知识库信息"+problemKnowledgeBaseEO.getTitle()+"有新评论,请注意查看.";
|
||||
String contentENNo = "In the Q&A knowledge "+problemKnowledgeBaseEO.getTitle()+" you created, a new comment has been added. Please be reminded to check it out.";
|
||||
|
||||
//发送消息(站内和飞书)
|
||||
//您发布的问题知识库信息XXXXXXXX有新评论,请注意查看。
|
||||
//In the Q&A knowledge xxxxxxxx you created, a new comment has been added. Please be reminded to check it out.
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(Arrays.asList(sysUser.getId().split(",")),
|
||||
"msgTitle",
|
||||
contentENNo,
|
||||
contentENNo,
|
||||
MessageTypeEnum.PUSH.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
contentCNNo,
|
||||
contentCNNo);
|
||||
this.sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(com.jero.modules.system.util.StringUtils.join(sysUser.getThirdId(), ","), sysUser.getThirdId());
|
||||
|
||||
String href = backUrl +"/problemknowledgeBase";
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setTitle(MessageTypeEnum.PUSH.getNameCn()+"/"+MessageTypeEnum.PUSH.getName());
|
||||
feishuMsgVo.setUrl(href);
|
||||
feishuMsgVo.setContentEn(contentENNo);
|
||||
feishuMsgVo.setContent(contentCNNo);
|
||||
|
||||
try {
|
||||
this.iFeishuService.sendCardMsgTerritory(sysUser.getThirdId().split(","), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新
|
||||
|
||||
+24
-2
@@ -114,6 +114,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
@Override
|
||||
public void add(ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||
Date now = new Date();
|
||||
String problemKnowledgeBaseId = UUID.randomUUID().toString().replace("-", "");
|
||||
problemKnowledgeBaseEO.setId(problemKnowledgeBaseId);
|
||||
problemKnowledgeBaseEO.setCreateTime(now);
|
||||
problemKnowledgeBaseEO.setUpdateTime(now);
|
||||
|
||||
@@ -881,8 +883,24 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
|
||||
|
||||
String ContentENNo = currentUser.getUsername()+" shared " + problemKnowledgeBaseTitle + " with you.Please be reminded to check it out.";
|
||||
String ContentInfoENYes = currentUser.getUsername()+" shared " + problemKnowledgeBaseTitle + " with you.Please be reminded to check it out."+ " " + href;
|
||||
|
||||
String contentCnNo = currentUser.getUsername()+"向您分享了"+problemKnowledgeBaseTitle+",请查看.";
|
||||
String contentInfoCnYes = currentUser.getUsername()+"向您分享了"+problemKnowledgeBaseTitle+",请查看"+ " " + href;
|
||||
|
||||
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList, msgTitle, msgContentEN, contentInfo,MessageTypeEnum.PUSH.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
SysAnnouncement sysAnnouncement = getSysAnnouncement(userIdList,
|
||||
msgTitle,
|
||||
ContentENNo,
|
||||
ContentInfoENYes,
|
||||
MessageTypeEnum.PUSH.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
contentCnNo,
|
||||
contentInfoCnYes);
|
||||
|
||||
this.sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
this.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||
//飞书
|
||||
@@ -922,7 +940,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
String content,
|
||||
String contentInfo,
|
||||
String messageType,
|
||||
String initiator) {
|
||||
String initiator,
|
||||
String contentCn,
|
||||
String contentInfoCn) {
|
||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||
sysAnnouncement.setInitiator(initiator);
|
||||
sysAnnouncement.setDelFlag("0");
|
||||
@@ -934,6 +954,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
||||
sysAnnouncement.setMsgContent(content);
|
||||
sysAnnouncement.setMsgContentInfo(contentInfo);
|
||||
sysAnnouncement.setUserIds(StringUtils.join(userIdList, ","));
|
||||
sysAnnouncement.setMsgContentCn(contentCn);
|
||||
sysAnnouncement.setMsgContentInfoCn(contentInfoCn);
|
||||
return sysAnnouncement;
|
||||
}
|
||||
}
|
||||
|
||||
+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(@RequestBody ProjectTaskUrgVo projectTaskUrgVo) {
|
||||
return this.projectLawsInventoryEOService.taskUrg(projectTaskUrgVo);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
+14
-1
@@ -22,9 +22,10 @@ import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* @Description: 项目库-任务清单表
|
||||
* @Author: jero-boot
|
||||
* @Date: 2022-04-29
|
||||
@@ -231,4 +232,16 @@ public class ProjectTaskInventoryEOController extends JeroController<ProjectTask
|
||||
List<String> msgList = projectTaskInventoryEOService.verifyRoleCode(projectTaskInventoryVO);
|
||||
return Result.OK(msgList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 处理历史数据
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
@AutoLog(value = "项目库-任务清单表-处理历史数据")
|
||||
@ApiOperation(value="项目库-任务清单表-处理历史数据", notes="项目库-任务清单表-处理历史数据")
|
||||
@GetMapping(value = "/disposeHistoryData")
|
||||
public Result<?> disposeHistoryData(@RequestParam Map<String,Object> params){
|
||||
return this.projectTaskInventoryEOService.disposeHistoryData(params);
|
||||
}
|
||||
}
|
||||
|
||||
+2
@@ -108,4 +108,6 @@ public class ProjectTaskInventoryFeedbackEO implements Serializable {
|
||||
@ApiModelProperty(value = "序号")
|
||||
private String serialNumber;
|
||||
|
||||
@TableField(exist = false)
|
||||
private String userId;
|
||||
}
|
||||
|
||||
+2
@@ -18,6 +18,8 @@ public enum JumpLinkEnum {
|
||||
VERIFY_AFFIRM_LINK("验证符合性确认链接","3","/ProjectDetails?id=","&type=103"),
|
||||
DESIGN_AFFIRM_LINK("设计符合性确认链接","4","/ProjectDetails?id=","&type=103"),
|
||||
TASK_AFFIRM_LINK("任务确认链接","2","/ProcessCenter",""),
|
||||
FGPG_TODO_CENTER_LINK("法规评估任务待办中心链接","88","/regulatoryAssessmentTasks",""),
|
||||
XMCS_TODO_CENTER_LINK("项目参数任务待办中心链接","99","/projectParameterTasks",""),
|
||||
COMPLIANCE_PROCESS_DETAIL_LINK("符合性流程明细页路由","2","/taskListProcess",""),
|
||||
|
||||
PROBLEM_KNOWLEDGE_BASE_DETAIL("问题知识库,详情页","","/problemKnowledgeBaseView",""),
|
||||
|
||||
+241
-79
@@ -1,7 +1,13 @@
|
||||
package com.jero.modules.project.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.MessageType2Enum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.MsgColorEnum;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
@@ -15,8 +21,11 @@ import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectYearNameInfoEOMapper;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
@@ -24,6 +33,7 @@ import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -49,16 +59,24 @@ public class InventoryAffirmJob implements Job {
|
||||
@Autowired
|
||||
private ProjectYearNameInfoEOMapper projectYearNameInfoEOMapper;
|
||||
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
|
||||
/**
|
||||
* 清单任务到达截止时间后,给用户发送消息
|
||||
*/
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.info("清单确认流程,定时任务开启 =====================================================");
|
||||
//获取状态为待确认的数据
|
||||
log.info("清单确认流程,定时任务开启 =====================================================");
|
||||
/* //获取状态为待确认的数据
|
||||
QueryWrapper<ProjectLawsInventoryEO> queryWrapperInventory = new QueryWrapper<>();
|
||||
queryWrapperInventory.lambda().eq(ProjectLawsInventoryEO::getInventoryAffirmStatus, InventoryAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = projectLawsInventoryEOMapper.selectList(queryWrapperInventory);
|
||||
@@ -96,125 +114,269 @@ public class InventoryAffirmJob implements Job {
|
||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
||||
|
||||
List<String> threeDaysUserIdList = new ArrayList<>();
|
||||
List<String> currentDaysUserIdList = new ArrayList<>();
|
||||
|
||||
Map<String, List<String>> threeDaysMap = new HashMap<>();
|
||||
Map<String, List<String>> currentDaysMap = new HashMap<>();
|
||||
Map<String, List<String>> overdueMap = new HashMap<>();
|
||||
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOList) {
|
||||
if(StringUtils.equals(projectLibraryBase.getId(),projectLawsInventoryEO.getProjectLibraryId())){
|
||||
if(projectLawsInventoryEO.getInventoryAffirmDueDate() != null){
|
||||
//如果清单确认结束日期是当前日期
|
||||
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){
|
||||
List<String> currentDaysUserIdList = new ArrayList<>();
|
||||
if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgFlag())){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
|
||||
//if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())){
|
||||
// currentDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
|
||||
//}
|
||||
//if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){
|
||||
// currentDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
|
||||
//}
|
||||
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())||StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())) {
|
||||
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getEngineeringInterfacePerson());
|
||||
}
|
||||
}
|
||||
projectLawsInventoryEO.setSendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
|
||||
projectLawsInventoryEOMapper.updateById(projectLawsInventoryEO);
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(currentDaysUserIdList)) {
|
||||
currentDaysMap.put(projectLawsInventoryEO.getId(), currentDaysUserIdList);
|
||||
}
|
||||
}
|
||||
|
||||
//如果清单确认结束时间是当前系统时间后三天
|
||||
if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){
|
||||
List<String> threeDaysUserIdList = new ArrayList<>();
|
||||
if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgCurrentFlag())){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())){
|
||||
threeDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
|
||||
}
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){
|
||||
threeDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
|
||||
//if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())){
|
||||
// threeDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
|
||||
//}
|
||||
//if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){
|
||||
// threeDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
|
||||
//}
|
||||
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())||StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())) {
|
||||
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
|
||||
threeDaysUserIdList.add(projectLawsInventoryEO.getEngineeringInterfacePerson());
|
||||
}
|
||||
}
|
||||
projectLawsInventoryEO.setSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
|
||||
projectLawsInventoryEOMapper.updateById(projectLawsInventoryEO);
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(threeDaysUserIdList)) {
|
||||
threeDaysMap.put(projectLawsInventoryEO.getId(), threeDaysUserIdList);
|
||||
}
|
||||
}
|
||||
|
||||
//逾期3天、七天、14天
|
||||
Calendar day3Later=new GregorianCalendar();
|
||||
day3Later.setTime(projectLawsInventoryEO.getInventoryAffirmDueDate());
|
||||
day3Later.add(Calendar.DATE,3);
|
||||
Date overdue3Days = day3Later.getTime();
|
||||
|
||||
Calendar day7Later=new GregorianCalendar();
|
||||
day7Later.setTime(projectLawsInventoryEO.getInventoryAffirmDueDate());
|
||||
day7Later.add(Calendar.DATE,7);
|
||||
Date overdue7Days = day7Later.getTime();
|
||||
|
||||
Calendar day14Later=new GregorianCalendar();
|
||||
day14Later.setTime(projectLawsInventoryEO.getInventoryAffirmDueDate());
|
||||
day14Later.add(Calendar.DATE,14);
|
||||
Date overdue14Days = day14Later.getTime();
|
||||
|
||||
if(StringUtils.equals(sdf.format(overdue3Days),sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))
|
||||
||StringUtils.equals(sdf.format(overdue7Days),sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))
|
||||
||StringUtils.equals(sdf.format(overdue14Days),sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){
|
||||
List<String> overdueUserIdList = new ArrayList<>();
|
||||
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())||StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())) {
|
||||
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
|
||||
overdueUserIdList.add(projectLawsInventoryEO.getEngineeringInterfacePerson());
|
||||
}
|
||||
}
|
||||
if (ObjectUtils.isNotEmpty(overdueUserIdList)) {
|
||||
overdueMap.put(projectLawsInventoryEO.getId(), overdueUserIdList);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(threeDaysUserIdList)){
|
||||
threeDaysUserIdList = threeDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
||||
|
||||
/*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务确认剩余处理时间还有3天,请及时查看处理";*/
|
||||
//项目名称
|
||||
String PRN = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + "-" + projectLibraryBase.getTargetMarket() + "-" + projectLibraryBase.getProjectVersion();
|
||||
if(!threeDaysMap.isEmpty()){
|
||||
for (String key : threeDaysMap.keySet()) {
|
||||
List<String> threeDaysUserIdList = threeDaysMap.get(key);
|
||||
threeDaysUserIdList = threeDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(threeDaysUserIdList);
|
||||
if (ObjectUtils.isNotEmpty(sysUsers)) {
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//法规中英文
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOMapper.selectById(key);
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(MessageType2Enum.REGULATION_TASK_CONFIRMATION.getCn() + "/" + MessageType2Enum.REGULATION_TASK_CONFIRMATION.getEn());
|
||||
feishuMsgVo.setCnContentUpper("您好,该任务将于3天后到期,请及时查看处理,谢谢!");
|
||||
feishuMsgVo.setCnContentLower("项目: " + PRN +
|
||||
"\n法规: " + projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle() +
|
||||
"\n发起人: 系统通知");
|
||||
feishuMsgVo.setEnContentUpper("Hello! This task will expire in 3 days. Please check and address it in a timely manner. Thank you!");
|
||||
feishuMsgVo.setEnContentLower("Project:" + PRN +
|
||||
"\nRegulation No: " + projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
*//*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务确认剩余处理时间还有3天,请及时查看处理";*//*
|
||||
// XXX .
|
||||
String msgContentEN = "The remaining processing time for the regulation task confirmation for "
|
||||
+ projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()+ " "
|
||||
+ projectLibraryBase.getTargetMarket()
|
||||
+ " are 3 days. Please check and address it in a timely manner.";
|
||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
//String msgContentEN = "The remaining processing time for the regulation task confirmation for "
|
||||
// + projectNameInfoEO.getProjectName() + "-"
|
||||
// + projectYearNameInfoEO.getYearName()+ " "
|
||||
// + projectLibraryBase.getTargetMarket()
|
||||
// + " are 3 days. Please check and address it in a timely manner.";
|
||||
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a regulation task confirmation to complete";
|
||||
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Regulation Task Confirmation");
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Regulation Task Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
// + projectYearNameInfoEO.getYearName()
|
||||
// + "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
// sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, threeDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.LIST_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
//projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, threeDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.LIST_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
if(!currentDaysMap.isEmpty()){
|
||||
for (String key : currentDaysMap.keySet()) {
|
||||
List<String> currentDaysUserIdList = currentDaysMap.get(key);
|
||||
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(currentDaysUserIdList);
|
||||
if (ObjectUtils.isNotEmpty(sysUsers)) {
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//法规中英文
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOMapper.selectById(key);
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(MessageType2Enum.REGULATION_TASK_CONFIRMATION.getCn() + "/" + MessageType2Enum.REGULATION_TASK_CONFIRMATION.getEn());
|
||||
feishuMsgVo.setCnContentUpper("您好,该任务今天即将到期,请尽快查看处理,谢谢!");
|
||||
feishuMsgVo.setCnContentLower("项目: " + PRN +
|
||||
"\n法规: " + projectLawsInventoryEO.getSerialNumber() + " " +projectLawsInventoryEO.getTitle() +
|
||||
"\n发起人: 系统通知");
|
||||
feishuMsgVo.setEnContentUpper("Hello! This task will expire today. Please check and address the task ASAP. Thank you!");
|
||||
feishuMsgVo.setEnContentLower("Project:" + PRN +
|
||||
"\nRegulation No: " + projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
|
||||
/*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务今天即将结束,请及时查看处理*/
|
||||
String msgContentEN = "The regulation task confirmation for "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " will expire today. Please check and address it in a timely manner.";
|
||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a regulation task confirmation to complete";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Regulation Task Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
*//*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务今天即将结束,请及时查看处理*//*
|
||||
//String msgContentEN = "The regulation task confirmation for "
|
||||
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + " will expire today. Please check and address it in a timely manner.";
|
||||
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a regulation task confirmation to complete";
|
||||
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Regulation Task Confirmation");
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
// + projectYearNameInfoEO.getYearName()
|
||||
// + "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, currentDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.LIST_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
//projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN, currentDaysUserIdList, projectLibraryBase.getId(), sendMessageMap, feishuMsgVo, MessageTypeEnum.LIST_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(!overdueMap.isEmpty()){
|
||||
for (String key : overdueMap.keySet()) {
|
||||
List<String> overdueUserIdList = overdueMap.get(key);
|
||||
overdueUserIdList = overdueUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(overdueUserIdList);
|
||||
if (ObjectUtils.isNotEmpty(sysUsers)) {
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//法规中英文
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOMapper.selectById(key);
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
|
||||
String dueDate = sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate());
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(MessageType2Enum.REGULATION_TASK_CONFIRMATION.getCn() + "/" + MessageType2Enum.REGULATION_TASK_CONFIRMATION.getEn());
|
||||
feishuMsgVo.setCnContentUpper("您好,该任务已逾期,请尽快处理,谢谢!");
|
||||
feishuMsgVo.setCnContentLower("项目: " + PRN +
|
||||
"\n法规: " + projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle() +
|
||||
"\n发起人: 系统通知" +
|
||||
"\n截止时间: " + dueDate);
|
||||
feishuMsgVo.setEnContentUpper("Hello! This task is overdue. Please address it ASAP. Thank you!");
|
||||
feishuMsgVo.setEnContentLower("Project:" + PRN +
|
||||
"\nRegulation No: " + projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName() +
|
||||
"\nDue Date: " + dueDate);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.YELLOW.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}*/
|
||||
log.info("清单确认流程,定时任务结束 =====================================================");
|
||||
}
|
||||
}
|
||||
|
||||
+235
-87
@@ -1,7 +1,13 @@
|
||||
package com.jero.modules.project.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.MessageType2Enum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.MsgColorEnum;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
||||
@@ -14,8 +20,11 @@ import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectYearNameInfoEOMapper;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
@@ -23,6 +32,7 @@ import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -53,6 +63,13 @@ public class PrehomoJob implements Job {
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.info("prehomo流程,定时任务开启 =====================================================");
|
||||
@@ -60,7 +77,10 @@ public class PrehomoJob implements Job {
|
||||
//查询出已经启动了prehomo流程的数据。 并且流程没有结束。
|
||||
QueryWrapper<ProjectTaskInventoryEO> queryProjectTaskInventoryWrapper = new QueryWrapper<>();
|
||||
queryProjectTaskInventoryWrapper.isNotNull("prehomo_p_id");
|
||||
queryProjectTaskInventoryWrapper.lambda().ne(ProjectTaskInventoryEO::getPrehomoStatus, DesignComplianceStatusEnum.REVIEW_COMPLETED.getValue());
|
||||
List<String> status = new ArrayList<>();
|
||||
status.add(DesignComplianceStatusEnum.TO_SUBMIT.getValue());
|
||||
status.add(DesignComplianceStatusEnum.REVIEW_THE_RETURN.getValue());
|
||||
queryProjectTaskInventoryWrapper.lambda().in(ProjectTaskInventoryEO::getPrehomoStatus, status);
|
||||
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = projectTaskInventoryEOService.getBaseMapper().selectList(queryProjectTaskInventoryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectTaskInventoryEOList)){
|
||||
@@ -81,15 +101,24 @@ public class PrehomoJob implements Job {
|
||||
|
||||
Date currentDate = new Date();
|
||||
|
||||
//获取后三天前的时间
|
||||
Calendar calendar=new GregorianCalendar();
|
||||
calendar.setTime(new Date());
|
||||
calendar.add(Calendar.DATE,3);
|
||||
Date threeDays = calendar.getTime();
|
||||
|
||||
String threeDaysStr = sdf.format(threeDays);
|
||||
//两周
|
||||
Calendar twoWeeksLaterCalendar=new GregorianCalendar();
|
||||
twoWeeksLaterCalendar.setTime(new Date());
|
||||
twoWeeksLaterCalendar.add(Calendar.DATE,14);
|
||||
Date twoWeeksLaterDays = twoWeeksLaterCalendar.getTime();
|
||||
String twoWeeksLaterDaysStr = sdf.format(twoWeeksLaterDays);
|
||||
//一周
|
||||
Calendar oneWeekLaterCalendar=new GregorianCalendar();
|
||||
oneWeekLaterCalendar.setTime(new Date());
|
||||
oneWeekLaterCalendar.add(Calendar.DATE,7);
|
||||
Date oneWeekLaterDays = oneWeekLaterCalendar.getTime();
|
||||
String oneWeekLaterDaysStr = sdf.format(oneWeekLaterDays);
|
||||
//当天
|
||||
String currentDateStr = sdf.format(currentDate);
|
||||
|
||||
String msgTitle = MessageType2Enum.PRE_HOMO_CONFIRMATION.getCn() + "/" + MessageType2Enum.PRE_HOMO_CONFIRMATION.getEn();
|
||||
|
||||
|
||||
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
||||
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||
@@ -99,115 +128,234 @@ public class PrehomoJob implements Job {
|
||||
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;
|
||||
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO: projectLawsInventoryEOList) {
|
||||
List<String> threeDaysUserIdList = new ArrayList<>();
|
||||
List<String> currentDaysUserIdList = new ArrayList<>();
|
||||
|
||||
for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) {
|
||||
if(StringUtils.equals(projectTaskInventoryEO.getProjectLawsInventoryId(),projectLawsInventoryEO.getId())){
|
||||
if(projectLawsInventoryEO.getPrehomoDueDate() != null){
|
||||
//如果prehomo - 结束日期是当前日期
|
||||
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getPrehomoDueDate()))){
|
||||
if(StringUtils.isEmpty(projectTaskInventoryEO.getPrehomoSendMsgFlag())){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDutyId())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getPrehomoDutyId());
|
||||
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getPrehomoInitiatorId());
|
||||
}
|
||||
projectTaskInventoryEO.setPrehomoSendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
|
||||
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
|
||||
}
|
||||
//法规中英文
|
||||
String LAW_CN = projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle();//法规
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
String LAW_EN = "";
|
||||
if (ObjectUtils.isEmpty(bussDocumentLibraryEO)) {
|
||||
LAW_EN = LAW_CN;
|
||||
} else {
|
||||
LAW_EN = projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn();//法规
|
||||
}
|
||||
|
||||
List<String> twoWeeksLaterUserIdList = new ArrayList<>();
|
||||
List<String> oneWeeksLaterUserIdList = new ArrayList<>();
|
||||
List<String> currentDaysUserIdList = new ArrayList<>();
|
||||
List<String> dueUserIdList = new ArrayList<>();
|
||||
|
||||
if(StringUtils.equals(projectLawsInventoryEO.getProjectLibraryId(),projectLibraryBase.getId())){
|
||||
if(projectLawsInventoryEO.getPrehomoDueDate() != null){
|
||||
//如果prehomo - 结束日期是当前日期
|
||||
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getPrehomoDueDate()))){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDutyId())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getPrehomoDutyId());
|
||||
}
|
||||
//如果prehomo - 结束日期是三天后的日期
|
||||
if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getPrehomoDueDate()))){
|
||||
if(StringUtils.isEmpty(projectTaskInventoryEO.getPrehomoSendMsgCurrentFlag())){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDutyId())){
|
||||
threeDaysUserIdList.add(projectLawsInventoryEO.getPrehomoDutyId());
|
||||
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())){
|
||||
threeDaysUserIdList.add(projectLawsInventoryEO.getPrehomoInitiatorId());
|
||||
}
|
||||
projectTaskInventoryEO.setPrehomoSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
|
||||
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
|
||||
}
|
||||
}
|
||||
//如果prehomo - 结束日期是两周后的日期
|
||||
if(StringUtils.equals(twoWeeksLaterDaysStr,sdf.format(projectLawsInventoryEO.getPrehomoDueDate()))){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDutyId())){
|
||||
twoWeeksLaterUserIdList.add(projectLawsInventoryEO.getPrehomoDutyId());
|
||||
}
|
||||
}
|
||||
//如果prehomo - 结束日期是一周后的日期
|
||||
if(StringUtils.equals(oneWeekLaterDaysStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){
|
||||
oneWeeksLaterUserIdList.add(projectLawsInventoryEO.getDesignDutyId());
|
||||
}
|
||||
}
|
||||
//如果prehomo - 逾期后每天通知
|
||||
if (!StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getPrehomoDueDate()))&&projectLawsInventoryEO.getDesignDueDate().before(currentDate)) {
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){
|
||||
dueUserIdList.add(projectLawsInventoryEO.getDesignDutyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(threeDaysUserIdList)){
|
||||
threeDaysUserIdList = threeDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
|
||||
if (ObjectUtils.isNotEmpty(dueUserIdList)) {
|
||||
dueUserIdList = dueUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(dueUserIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper("您好,您的任务已逾期,请尽快查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: 系统通知"+
|
||||
"\n截止时间: "+ sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||
feishuMsgVo.setEnContentUpper("Hello! Your task is overdue. Please check and address it ASAP");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName()+
|
||||
"\nDue Date: "+ sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.YELLOW.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(oneWeeksLaterUserIdList)) {
|
||||
oneWeeksLaterUserIdList = oneWeeksLaterUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(oneWeeksLaterUserIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper("您好,您的任务将于7天后结束,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: 系统通知");
|
||||
feishuMsgVo.setEnContentUpper("Hello! Your task will end in 7 days. Please check and address it in a timely manner");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(twoWeeksLaterUserIdList)){
|
||||
twoWeeksLaterUserIdList = twoWeeksLaterUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(twoWeeksLaterUserIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper("您好,您的任务将于14天后结束,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: 系统通知");
|
||||
feishuMsgVo.setEnContentUpper("Hello! Your task will end in 14 days. Please check and address it in a timely manner");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
|
||||
//您XXX(项目名称)中GB 7258的Pre-Homo确认剩余处理时间还有3天,请及时查看处理
|
||||
//The remaining processing time for the Pre-Homo confirmation of GB 7258 in XXX (project name) is 3 days. Please check and handle it in time.
|
||||
String msgContentEN = "The remaining processing time for the Pre-Homo confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()+ " "
|
||||
+ projectLibraryBase.getTargetMarket()
|
||||
+ " are 3 days. Please check and handle it in time.";
|
||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
//String msgContentEN = "The remaining processing time for the Pre-Homo confirmation of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-"
|
||||
// + projectYearNameInfoEO.getYearName()+ " "
|
||||
// + projectLibraryBase.getTargetMarket()
|
||||
// + " are 3 days. Please check and handle it in time.";
|
||||
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a Pre-Homo task to complete";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//String hrefFeishu = backUrl
|
||||
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
||||
// + projectLibraryBase.getId()
|
||||
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
// Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.COMPLIANCE_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
//projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.COMPLIANCE_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(currentDaysUserIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper("您好,您的任务将于今天到期,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: 系统通知");
|
||||
feishuMsgVo.setEnContentUpper("Hello! Your task will expire today. Please check and address it ASAP");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
|
||||
//您XXX(项目名称)中GB 7258的Pre-Homo确认任务今天即将结束,请及时查看处理
|
||||
//The the Pre-Homo confirmation of GB 7258 in XXX (project name) is coming to an end today. Please check and deal with it in time
|
||||
String msgContentEN = "The the Pre-Homo confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " will expire today. Please check and address it in time.";
|
||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
//String msgContentEN = "The the Pre-Homo confirmation of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + " will expire today. Please check and address it in time.";
|
||||
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a Pre-Homo task to complete";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
// String hrefFeishu = backUrl
|
||||
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
||||
// + projectLibraryBase.getId()
|
||||
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.COMPLIANCE_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
//projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.COMPLIANCE_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+268
@@ -0,0 +1,268 @@
|
||||
package com.jero.modules.project.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.MessageType2Enum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.MsgColorEnum;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
||||
import com.jero.modules.project.entity.ProjectNameInfoEO;
|
||||
import com.jero.modules.project.entity.ProjectYearNameInfoEO;
|
||||
import com.jero.modules.project.enums.InventoryAffirmStatusEnum;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
import com.jero.modules.project.mapper.ProjectLawsInventoryEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectLibraryBaseMapper;
|
||||
import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectYearNameInfoEOMapper;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Slf4j
|
||||
public class TaskAffirmJob implements Job {
|
||||
|
||||
@Autowired
|
||||
private ProjectLawsInventoryEOMapper projectLawsInventoryEOMapper;
|
||||
|
||||
@Autowired
|
||||
private ProjectLibraryBaseMapper projectLibraryBaseMapper;
|
||||
|
||||
@Autowired
|
||||
private ProjectNameInfoEOMapper projectNameInfoEOMapper;
|
||||
|
||||
@Autowired
|
||||
private ProjectYearNameInfoEOMapper projectYearNameInfoEOMapper;
|
||||
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
|
||||
|
||||
/**
|
||||
* 任务确认流程定时
|
||||
* @param context
|
||||
* @throws JobExecutionException
|
||||
*/
|
||||
@Override
|
||||
public void execute(JobExecutionContext context) throws JobExecutionException {
|
||||
log.info("任务确认流程,定时任务开启 =====================================================");
|
||||
|
||||
QueryWrapper<ProjectLawsInventoryEO> queryWrapperInventory = new QueryWrapper<>();
|
||||
queryWrapperInventory.lambda().eq(ProjectLawsInventoryEO::getTaskAffirmStatus, InventoryAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = projectLawsInventoryEOMapper.selectList(queryWrapperInventory);
|
||||
if (ObjectUtils.isNotEmpty(projectLawsInventoryEOList)) {
|
||||
List<String> projectLibraryIdList = projectLawsInventoryEOList.stream().distinct()
|
||||
.map(ProjectLawsInventoryEO::getProjectLibraryId).collect(Collectors.toList());
|
||||
|
||||
QueryWrapper<ProjectLibraryBase> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.lambda().in(ProjectLibraryBase::getId,projectLibraryIdList);
|
||||
List<ProjectLibraryBase> projectLibraryBaseList = projectLibraryBaseMapper.selectList(queryWrapper);
|
||||
if (ObjectUtils.isNotEmpty(projectLibraryBaseList)) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
|
||||
Date currentDate = new Date();
|
||||
|
||||
//获取后三天前的时间
|
||||
Calendar calendar=new GregorianCalendar();
|
||||
calendar.setTime(new Date());
|
||||
calendar.add(Calendar.DATE,3);
|
||||
Date threeDays = calendar.getTime();
|
||||
|
||||
String threeDaysStr = sdf.format(threeDays);
|
||||
String currentDateStr = sdf.format(currentDate);
|
||||
|
||||
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
||||
|
||||
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);
|
||||
|
||||
|
||||
Map<String, String> threeDaysMap = new HashMap<>();
|
||||
Map<String, String> currentDaysMap = new HashMap<>();
|
||||
Map<String, String> overdueMap = new HashMap<>();
|
||||
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOList) {
|
||||
if (StringUtils.equals(projectLibraryBase.getId(), projectLawsInventoryEO.getProjectLibraryId())) {
|
||||
if (projectLawsInventoryEO.getTaskAffirmDueDate() != null) {
|
||||
//结束日期是当前日期
|
||||
if (StringUtils.equals(currentDateStr, sdf.format(projectLawsInventoryEO.getTaskAffirmDueDate()))) {
|
||||
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
|
||||
currentDaysMap.put(projectLawsInventoryEO.getId(), projectLawsInventoryEO.getEngineeringInterfacePerson());
|
||||
}
|
||||
}
|
||||
|
||||
//如果清单确认结束时间是当前系统时间后三天
|
||||
if (StringUtils.equals(threeDaysStr, sdf.format(projectLawsInventoryEO.getTaskAffirmDueDate()))) {
|
||||
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
|
||||
threeDaysMap.put(projectLawsInventoryEO.getId(), projectLawsInventoryEO.getEngineeringInterfacePerson());
|
||||
}
|
||||
}
|
||||
|
||||
//逾期3天、七天、14天
|
||||
Calendar day3Later = new GregorianCalendar();
|
||||
day3Later.setTime(projectLawsInventoryEO.getTaskAffirmDueDate());
|
||||
day3Later.add(Calendar.DATE, 3);
|
||||
Date overdue3Days = day3Later.getTime();
|
||||
|
||||
Calendar day7Later = new GregorianCalendar();
|
||||
day7Later.setTime(projectLawsInventoryEO.getTaskAffirmDueDate());
|
||||
day7Later.add(Calendar.DATE, 7);
|
||||
Date overdue7Days = day7Later.getTime();
|
||||
|
||||
Calendar day14Later = new GregorianCalendar();
|
||||
day14Later.setTime(projectLawsInventoryEO.getTaskAffirmDueDate());
|
||||
day14Later.add(Calendar.DATE, 14);
|
||||
Date overdue14Days = day14Later.getTime();
|
||||
|
||||
if (StringUtils.equals(sdf.format(overdue3Days), sdf.format(currentDate))
|
||||
|| StringUtils.equals(sdf.format(overdue7Days), sdf.format(currentDate))
|
||||
|| StringUtils.equals(sdf.format(overdue14Days), sdf.format(currentDate))) {
|
||||
if (StringUtils.isNotEmpty(projectLawsInventoryEO.getEngineeringInterfacePerson())) {
|
||||
overdueMap.put(projectLawsInventoryEO.getId(), projectLawsInventoryEO.getEngineeringInterfacePerson());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//飞书跳转链接
|
||||
|
||||
String hrefFeishu = backUrl
|
||||
+ "/projectRegulationTasks";
|
||||
|
||||
//项目名称
|
||||
String projectVersion = (com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBase.getParentId()) && com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBase.getProjectVersion())) ? "00" : projectLibraryBase.getProjectVersion();
|
||||
String PRN = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + "-" + projectLibraryBase.getTargetMarket() + "-" + projectVersion;
|
||||
if (!threeDaysMap.isEmpty()) {
|
||||
for (String key : threeDaysMap.keySet()) {
|
||||
String[] ids = threeDaysMap.get(key).split(",");
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(Arrays.asList(ids));
|
||||
if (ObjectUtils.isNotEmpty(sysUsers)) {
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//法规中英文
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOMapper.selectById(key);
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(MessageType2Enum.REGULATION_TASK_CONFIRMATION.getCn() + "/" + MessageType2Enum.REGULATION_TASK_CONFIRMATION.getEn());
|
||||
feishuMsgVo.setCnContentUpper("您好,该任务将于3天后到期,请及时查看处理,谢谢!");
|
||||
feishuMsgVo.setCnContentLower("项目: " + PRN +
|
||||
"\n法规: " + projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle() +
|
||||
"\n发起人: 系统通知");
|
||||
feishuMsgVo.setEnContentUpper("Hello! This task will expire in 3 days. Please check and address it in a timely manner. Thank you!");
|
||||
feishuMsgVo.setEnContentLower("Project:" + PRN +
|
||||
"\nRegulation No: " + projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (!currentDaysMap.isEmpty()) {
|
||||
for (String key : currentDaysMap.keySet()) {
|
||||
String[] ids = currentDaysMap.get(key).split(",");
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(Arrays.asList(ids));
|
||||
if (ObjectUtils.isNotEmpty(sysUsers)) {
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//法规中英文
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOMapper.selectById(key);
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(MessageType2Enum.REGULATION_TASK_CONFIRMATION.getCn() + "/" + MessageType2Enum.REGULATION_TASK_CONFIRMATION.getEn());
|
||||
feishuMsgVo.setCnContentUpper("您好,该任务今天即将到期,请尽快查看处理,谢谢!");
|
||||
feishuMsgVo.setCnContentLower("项目: " + PRN +
|
||||
"\n法规: " + projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle() +
|
||||
"\n发起人: 系统通知");
|
||||
feishuMsgVo.setEnContentUpper("Hello! This task will expire today. Please check and address the task ASAP. Thank you!");
|
||||
feishuMsgVo.setEnContentLower("Project:" + PRN +
|
||||
"\nRegulation No: " + projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!overdueMap.isEmpty()) {
|
||||
for (String key : overdueMap.keySet()) {
|
||||
String[] ids = overdueMap.get(key).split(",");
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(Arrays.asList(ids));
|
||||
if (ObjectUtils.isNotEmpty(sysUsers)) {
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
//法规中英文
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOMapper.selectById(key);
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
|
||||
String dueDate = sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate());
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(MessageType2Enum.REGULATION_TASK_CONFIRMATION.getCn() + "/" + MessageType2Enum.REGULATION_TASK_CONFIRMATION.getEn());
|
||||
feishuMsgVo.setCnContentUpper("您好,该任务已逾期,请尽快处理,谢谢!");
|
||||
feishuMsgVo.setCnContentLower("项目: " + PRN +
|
||||
"\n法规: " + projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle() +
|
||||
"\n发起人: 系统通知" +
|
||||
"\n截止时间: " + dueDate);
|
||||
feishuMsgVo.setEnContentUpper("Hello! This task is overdue. Please address it ASAP. Thank you!");
|
||||
feishuMsgVo.setEnContentLower("Project:" + PRN +
|
||||
"\nRegulation No: " + projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn() +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName() +
|
||||
"\nDue Date: " + dueDate);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.YELLOW.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
log.info("任务确认流程,定时任务结束 =====================================================");
|
||||
}
|
||||
}
|
||||
+238
-88
@@ -1,7 +1,13 @@
|
||||
package com.jero.modules.project.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.MessageType2Enum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.MsgColorEnum;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
||||
@@ -13,8 +19,11 @@ import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectYearNameInfoEOMapper;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
@@ -22,6 +31,7 @@ import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -52,13 +62,23 @@ public class VerifyComplianceJob implements Job {
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.info("验证符合性流程,定时任务开启 =====================================================");
|
||||
//查询出已经启动了验证符合性流程的数据。 并且流程没有结束。
|
||||
QueryWrapper<ProjectTaskInventoryEO> queryProjectTaskInventoryWrapper = new QueryWrapper<>();
|
||||
queryProjectTaskInventoryWrapper.isNotNull("verify_p_id");
|
||||
queryProjectTaskInventoryWrapper.lambda().ne(ProjectTaskInventoryEO::getVerifyStatus, DesignComplianceStatusEnum.REVIEW_COMPLETED.getValue());
|
||||
List<String> status = new ArrayList<>();
|
||||
status.add(DesignComplianceStatusEnum.TO_SUBMIT.getValue());
|
||||
status.add(DesignComplianceStatusEnum.REVIEW_THE_RETURN.getValue());
|
||||
queryProjectTaskInventoryWrapper.lambda().in(ProjectTaskInventoryEO::getVerifyStatus, status);
|
||||
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = projectTaskInventoryEOService.getBaseMapper().selectList(queryProjectTaskInventoryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectTaskInventoryEOList)){
|
||||
@@ -79,15 +99,24 @@ public class VerifyComplianceJob implements Job {
|
||||
|
||||
Date currentDate = new Date();
|
||||
|
||||
//获取后三天前的时间
|
||||
Calendar calendar=new GregorianCalendar();
|
||||
calendar.setTime(new Date());
|
||||
calendar.add(Calendar.DATE,3);
|
||||
Date threeDays = calendar.getTime();
|
||||
|
||||
String threeDaysStr = sdf.format(threeDays);
|
||||
//两周
|
||||
Calendar twoWeeksLaterCalendar=new GregorianCalendar();
|
||||
twoWeeksLaterCalendar.setTime(new Date());
|
||||
twoWeeksLaterCalendar.add(Calendar.DATE,14);
|
||||
Date twoWeeksLaterDays = twoWeeksLaterCalendar.getTime();
|
||||
String twoWeeksLaterDaysStr = sdf.format(twoWeeksLaterDays);
|
||||
//一周
|
||||
Calendar oneWeekLaterCalendar=new GregorianCalendar();
|
||||
oneWeekLaterCalendar.setTime(new Date());
|
||||
oneWeekLaterCalendar.add(Calendar.DATE,7);
|
||||
Date oneWeekLaterDays = oneWeekLaterCalendar.getTime();
|
||||
String oneWeekLaterDaysStr = sdf.format(oneWeekLaterDays);
|
||||
//当天
|
||||
String currentDateStr = sdf.format(currentDate);
|
||||
|
||||
String msgTitle = MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getEn();
|
||||
|
||||
|
||||
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
||||
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||
@@ -97,114 +126,235 @@ public class VerifyComplianceJob implements Job {
|
||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
||||
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO: projectLawsInventoryEOList) {
|
||||
List<String> threeDaysUserIdList = new ArrayList<>();
|
||||
List<String> currentDaysUserIdList = new ArrayList<>();
|
||||
//项目名称
|
||||
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;
|
||||
|
||||
for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) {
|
||||
if(StringUtils.equals(projectTaskInventoryEO.getProjectLawsInventoryId(),projectLawsInventoryEO.getId())){
|
||||
if(projectLawsInventoryEO.getVerifyDueDate() != null){
|
||||
//如果验证符合性 - 结束日期是当前日期
|
||||
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))){
|
||||
if(StringUtils.isEmpty(projectTaskInventoryEO.getVerifySendMsgFlag())){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getVerifyDutyId());
|
||||
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyInitiatorId())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getVerifyInitiatorId());
|
||||
}
|
||||
projectTaskInventoryEO.setVerifySendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
|
||||
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
|
||||
}
|
||||
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO: projectLawsInventoryEOList) {
|
||||
|
||||
//法规中英文
|
||||
String LAW_CN = projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle();//法规
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
String LAW_EN = "";
|
||||
if (ObjectUtils.isEmpty(bussDocumentLibraryEO)) {
|
||||
LAW_EN = LAW_CN;
|
||||
} else {
|
||||
LAW_EN = projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn();//法规
|
||||
}
|
||||
|
||||
List<String> twoWeeksLaterUserIdList = new ArrayList<>();
|
||||
List<String> oneWeeksLaterUserIdList = new ArrayList<>();
|
||||
List<String> currentDaysUserIdList = new ArrayList<>();
|
||||
List<String> dueUserIdList = new ArrayList<>();
|
||||
|
||||
if(StringUtils.equals(projectLawsInventoryEO.getProjectLibraryId(),projectLibraryBase.getId())){
|
||||
if(projectLawsInventoryEO.getVerifyDueDate() != null){
|
||||
//如果验证符合性 - 结束日期是当前日期
|
||||
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getVerifyDutyId());
|
||||
}
|
||||
//如果验证符合性 - 结束日期是三天后的日期
|
||||
if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))){
|
||||
if(StringUtils.isEmpty(projectTaskInventoryEO.getVerifySendMsgCurrentFlag())){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){
|
||||
threeDaysUserIdList.add(projectLawsInventoryEO.getVerifyDutyId());
|
||||
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyInitiatorId())){
|
||||
threeDaysUserIdList.add(projectLawsInventoryEO.getVerifyInitiatorId());
|
||||
}
|
||||
projectTaskInventoryEO.setVerifySendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
|
||||
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
|
||||
}
|
||||
}
|
||||
//如果验证符合性 - 结束日期是两周后的日期
|
||||
if(StringUtils.equals(twoWeeksLaterDaysStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getVerifyDutyId());
|
||||
}
|
||||
}
|
||||
//如果验证符合性 - 结束日期是一周后的日期
|
||||
if(StringUtils.equals(oneWeekLaterDaysStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){
|
||||
oneWeeksLaterUserIdList.add(projectLawsInventoryEO.getVerifyDutyId());
|
||||
}
|
||||
}
|
||||
//如果验证符合性 - 逾期后每天通知
|
||||
if (!StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))&&projectLawsInventoryEO.getVerifyDueDate().before(currentDate)) {
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){
|
||||
dueUserIdList.add(projectLawsInventoryEO.getVerifyDutyId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(threeDaysUserIdList)){
|
||||
threeDaysUserIdList = threeDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
|
||||
if (ObjectUtils.isNotEmpty(dueUserIdList)) {
|
||||
dueUserIdList = dueUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(dueUserIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper("您好,您的任务已逾期,请尽快查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: 系统通知"+
|
||||
"\n截止时间: "+ sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||
feishuMsgVo.setEnContentUpper("Hello! Your task is overdue. Please check and address it ASAP");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName()+
|
||||
"\nDue Date: "+ sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.YELLOW.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(oneWeeksLaterUserIdList)) {
|
||||
oneWeeksLaterUserIdList = oneWeeksLaterUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(oneWeeksLaterUserIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper("您好,您的任务将于7天后结束,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: 系统通知");
|
||||
feishuMsgVo.setEnContentUpper("Hello! Your task will end in 7 days. Please check and address it in a timely manner");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(twoWeeksLaterUserIdList)){
|
||||
twoWeeksLaterUserIdList = twoWeeksLaterUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(twoWeeksLaterUserIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper("您好,您的任务将于14天后结束,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: 系统通知");
|
||||
feishuMsgVo.setEnContentUpper("Hello! Your task will end in 14 days. Please check and address it in a timely manner");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
|
||||
//您XXX(项目名称)中GB 7258的验证符合性确认剩余处理时间还有3天,请及时查看处理
|
||||
//The remaining processing time for the Verify compliance confirmation of GB 7258 in XXX (project name) is 3 days. Please check and handle it in time.
|
||||
String msgContentEN = "The remaining processing time for the validation compliance confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()+ " "
|
||||
+ projectLibraryBase.getTargetMarket()
|
||||
+ " are 3 days. Please check and handle it in time.";
|
||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
//String msgContentEN = "The remaining processing time for the validation compliance confirmation of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-"
|
||||
// + projectYearNameInfoEO.getYearName()+ " "
|
||||
// + projectLibraryBase.getTargetMarket()
|
||||
// + " are 3 days. Please check and handle it in time.";
|
||||
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a validation compliance task to complete";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
// FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//String hrefFeishu = backUrl
|
||||
// + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
|
||||
// + projectLibraryBase.getId()
|
||||
// + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.COMPLIANCE_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
//projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.COMPLIANCE_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(currentDaysUserIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper("您好,您的任务将于今天到期,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: 系统通知");
|
||||
feishuMsgVo.setEnContentUpper("Hello! Your task will expire today. Please check and address it ASAP");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
|
||||
//您XXX(项目名称)中GB 7258的验证符合性确认任务今天即将结束,请及时查看处理
|
||||
//The the Verify compliance confirmation of GB 7258 in XXX (project name) is coming to an end today. Please check and deal with it in time
|
||||
String msgContentEN = "The the validation compliance confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " will expire today. Please check and address it in time.";
|
||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
//String msgContentEN = "The the validation compliance confirmation of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + " will expire today. Please check and address it in time.";
|
||||
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a validation compliance task to complete";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
// feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
// String hrefFeishu = backUrl
|
||||
// + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
|
||||
// + projectLibraryBase.getId()
|
||||
// + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
// String contentInfo = msgContentEN + " " + href;
|
||||
// Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
// sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
// sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.COMPLIANCE_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
// projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.COMPLIANCE_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+251
-82
@@ -1,7 +1,13 @@
|
||||
package com.jero.modules.project.job;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.MessageType2Enum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.MsgColorEnum;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
||||
@@ -13,8 +19,11 @@ import com.jero.modules.project.mapper.ProjectNameInfoEOMapper;
|
||||
import com.jero.modules.project.mapper.ProjectYearNameInfoEOMapper;
|
||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
|
||||
import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.quartz.Job;
|
||||
import org.quartz.JobExecutionContext;
|
||||
@@ -22,6 +31,7 @@ import org.quartz.JobExecutionException;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -52,13 +62,23 @@ public class designComplianceJob implements Job {
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
|
||||
@Override
|
||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||
log.info("设计符合性确认流程,定时任务开启 =====================================================");
|
||||
//查询出已经启动了设计符合性流程的数据。 并且流程没有结束。
|
||||
QueryWrapper<ProjectTaskInventoryEO> queryProjectTaskInventoryWrapper = new QueryWrapper<>();
|
||||
queryProjectTaskInventoryWrapper.isNotNull("design_p_id");
|
||||
queryProjectTaskInventoryWrapper.lambda().ne(ProjectTaskInventoryEO::getDesignStatus, DesignComplianceStatusEnum.REVIEW_COMPLETED.getValue());
|
||||
List<String> status = new ArrayList<>();
|
||||
status.add(DesignComplianceStatusEnum.TO_SUBMIT.getValue());
|
||||
status.add(DesignComplianceStatusEnum.REVIEW_THE_RETURN.getValue());
|
||||
queryProjectTaskInventoryWrapper.lambda().in(ProjectTaskInventoryEO::getDesignStatus, status);
|
||||
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = projectTaskInventoryEOService.getBaseMapper().selectList(queryProjectTaskInventoryWrapper);
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectTaskInventoryEOList)){
|
||||
@@ -79,15 +99,24 @@ public class designComplianceJob implements Job {
|
||||
|
||||
Date currentDate = new Date();
|
||||
|
||||
//获取后三天前的时间
|
||||
Calendar calendar=new GregorianCalendar();
|
||||
calendar.setTime(new Date());
|
||||
calendar.add(Calendar.DATE,3);
|
||||
Date threeDays = calendar.getTime();
|
||||
|
||||
String threeDaysStr = sdf.format(threeDays);
|
||||
//两周
|
||||
Calendar twoWeeksLaterCalendar=new GregorianCalendar();
|
||||
twoWeeksLaterCalendar.setTime(new Date());
|
||||
twoWeeksLaterCalendar.add(Calendar.DATE,14);
|
||||
Date twoWeeksLaterDays = twoWeeksLaterCalendar.getTime();
|
||||
String twoWeeksLaterDaysStr = sdf.format(twoWeeksLaterDays);
|
||||
//一周
|
||||
Calendar oneWeekLaterCalendar=new GregorianCalendar();
|
||||
oneWeekLaterCalendar.setTime(new Date());
|
||||
oneWeekLaterCalendar.add(Calendar.DATE,7);
|
||||
Date oneWeekLaterDays = oneWeekLaterCalendar.getTime();
|
||||
String oneWeekLaterDaysStr = sdf.format(oneWeekLaterDays);
|
||||
//当天
|
||||
String currentDateStr = sdf.format(currentDate);
|
||||
|
||||
|
||||
String msgTitle = MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getEn();
|
||||
|
||||
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
||||
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||
@@ -97,109 +126,249 @@ public class designComplianceJob implements Job {
|
||||
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;
|
||||
|
||||
|
||||
for (ProjectLawsInventoryEO projectLawsInventoryEO: projectLawsInventoryEOList) {
|
||||
List<String> threeDaysUserIdList = new ArrayList<>();
|
||||
|
||||
//法规中英文
|
||||
String LAW_CN = projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle();//法规
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
String LAW_EN = "";
|
||||
if (ObjectUtils.isEmpty(bussDocumentLibraryEO)) {
|
||||
LAW_EN = LAW_CN;
|
||||
} else {
|
||||
LAW_EN = projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn();//法规
|
||||
}
|
||||
|
||||
|
||||
List<String> twoWeeksLaterUserIdList = new ArrayList<>();
|
||||
List<String> oneWeeksLaterUserIdList = new ArrayList<>();
|
||||
List<String> currentDaysUserIdList = new ArrayList<>();
|
||||
List<String> dueUserIdList = new ArrayList<>();
|
||||
|
||||
for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) {
|
||||
if(StringUtils.equals(projectTaskInventoryEO.getProjectLawsInventoryId(),projectLawsInventoryEO.getId())){
|
||||
//如果设计符合性 - 结束日期是当前日期
|
||||
if(projectLawsInventoryEO.getDesignDueDate() != null){
|
||||
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
|
||||
if(StringUtils.isEmpty(projectTaskInventoryEO.getDesignSendMsgFlag())){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getDesignDutyId());
|
||||
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignInitiatorId())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getDesignInitiatorId());
|
||||
}
|
||||
projectTaskInventoryEO.setDesignSendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
|
||||
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
|
||||
}
|
||||
if(StringUtils.equals(projectLawsInventoryEO.getProjectLibraryId(),projectLibraryBase.getId())){
|
||||
//如果设计符合性 - 结束日期是当前日期
|
||||
if(projectLawsInventoryEO.getDesignDueDate() != null){
|
||||
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){
|
||||
currentDaysUserIdList.add(projectLawsInventoryEO.getDesignDutyId());
|
||||
}
|
||||
}
|
||||
|
||||
//如果设计符合性 - 结束日期是三天后的日期
|
||||
if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
|
||||
if(StringUtils.isEmpty(projectTaskInventoryEO.getDesignSendMsgCurrentFlag())){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){
|
||||
threeDaysUserIdList.add(projectLawsInventoryEO.getDesignDutyId());
|
||||
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignInitiatorId())){
|
||||
threeDaysUserIdList.add(projectLawsInventoryEO.getDesignInitiatorId());
|
||||
}
|
||||
projectTaskInventoryEO.setDesignSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
|
||||
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
|
||||
}
|
||||
//如果设计符合性 - 结束日期是两周后的日期
|
||||
if(StringUtils.equals(twoWeeksLaterDaysStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){
|
||||
twoWeeksLaterUserIdList.add(projectLawsInventoryEO.getDesignDutyId());
|
||||
}
|
||||
}
|
||||
|
||||
//如果设计符合性 - 结束日期是一周后的日期
|
||||
if(StringUtils.equals(oneWeekLaterDaysStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){
|
||||
oneWeeksLaterUserIdList.add(projectLawsInventoryEO.getDesignDutyId());
|
||||
}
|
||||
}
|
||||
//逾期三天、七天、十四天
|
||||
Calendar due3Days = new GregorianCalendar();
|
||||
due3Days.setTime(projectLawsInventoryEO.getDesignDueDate());
|
||||
due3Days.add(Calendar.DATE, 3);
|
||||
Date overdue3Days = due3Days.getTime();
|
||||
|
||||
Calendar due7Days = new GregorianCalendar();
|
||||
due7Days.setTime(projectLawsInventoryEO.getDesignDueDate());
|
||||
due7Days.add(Calendar.DATE, 7);
|
||||
Date overdue7Days = due7Days.getTime();
|
||||
|
||||
Calendar due14Days = new GregorianCalendar();
|
||||
due14Days.setTime(projectLawsInventoryEO.getDesignDueDate());
|
||||
due14Days.add(Calendar.DATE, 14);
|
||||
Date overdue14Days = due14Days.getTime();
|
||||
if (StringUtils.equals(sdf.format(overdue3Days), currentDateStr)
|
||||
|| StringUtils.equals(sdf.format(overdue7Days), currentDateStr)
|
||||
|| StringUtils.equals(sdf.format(overdue14Days), currentDateStr)) {
|
||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){
|
||||
dueUserIdList.add(projectLawsInventoryEO.getDesignDutyId());
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(threeDaysUserIdList)){
|
||||
threeDaysUserIdList = threeDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
|
||||
if (ObjectUtils.isNotEmpty(dueUserIdList)) {
|
||||
dueUserIdList = dueUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(dueUserIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper("您好,您的任务已逾期,请尽快查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: 系统通知"+
|
||||
"\n截止时间: "+ sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||
feishuMsgVo.setEnContentUpper("Hello! Your task is overdue. Please check and address it ASAP");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName()+
|
||||
"\nDue Date: "+ sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.YELLOW.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(oneWeeksLaterUserIdList)) {
|
||||
oneWeeksLaterUserIdList = oneWeeksLaterUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(oneWeeksLaterUserIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper("您好,您的任务将于7天后结束,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: 系统通知");
|
||||
feishuMsgVo.setEnContentUpper("Hello! Your task will end in 7 days. Please check and address it in a timely manner");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(twoWeeksLaterUserIdList)){
|
||||
twoWeeksLaterUserIdList = twoWeeksLaterUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(twoWeeksLaterUserIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper("您好,您的任务将于14天后结束,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: 系统通知");
|
||||
feishuMsgVo.setEnContentUpper("Hello! Your task will end in 14 days. Please check and address it in a timely manner");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
//您XXX(项目名称)中GB 7258的设计符合性确认剩余处理时间还有3天,请及时查看处理
|
||||
String msgContentEN = "The remaining processing time for the design compliance confirmation for "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ projectYearNameInfoEO.getYearName()+ " "
|
||||
+ projectLibraryBase.getTargetMarket()
|
||||
+ " are 3 days. Please check and address it in a timely manner.";
|
||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
//String msgContentEN = "The remaining processing time for the design compliance confirmation for "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
// + projectYearNameInfoEO.getYearName()+ " "
|
||||
// + projectLibraryBase.getTargetMarket()
|
||||
// + " are 3 days. Please check and address it in a timely manner.";
|
||||
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a design compliance task to complete";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//feishuMsgVo.setContent("Hello! The remaining processing time for the task are 3 days. Please check and address it in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType();
|
||||
//String hrefFeishu = backUrl + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.COMPLIANCE_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
//projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,threeDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.COMPLIANCE_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(currentDaysUserIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper("您好,您的任务将于今天到期,请及时查看处理");
|
||||
feishuMsgVo.setCnContentLower("项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: 系统通知");
|
||||
feishuMsgVo.setEnContentUpper("Hello! Your task will expire today. Please check and address it ASAP");
|
||||
feishuMsgVo.setEnContentLower("Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
//您XXX(项目名称)中GB 7258的设计符合性确认任务今天即将结束,请及时查看处理
|
||||
String msgContentEN = "The design compliance confirmation of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
+ " will expire today. Please check and address it in time.";
|
||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
//String msgContentEN = "The design compliance confirmation of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||
// + " will expire today. Please check and address it in time.";
|
||||
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a design compliance task to complete";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
||||
+ projectLibraryBase.getId()
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//String hrefFeishu = backUrl
|
||||
// + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
||||
// + projectLibraryBase.getId()
|
||||
// + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
|
||||
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.COMPLIANCE_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
//projectLawsInventoryEOService.sendMessage(msgTitle, msgContentEN,currentDaysUserIdList,projectLawsInventoryEO.getId(),sendMessageMap, feishuMsgVo, MessageTypeEnum.COMPLIANCE_CONFIRMATION,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+113
-15
@@ -15,13 +15,54 @@
|
||||
LEFT JOIN project_laws_inventory pli ON ( pli.stand_id = bdl.id )
|
||||
LEFT JOIN project_task_inventory pti ON ( pli.id = pti.project_laws_inventory_id )
|
||||
WHERE
|
||||
(
|
||||
bdl.id IN ( SELECT DISTINCT stand_id FROM laws_opinion_gather where gather_result = #{params.gatherResult})
|
||||
OR bdl.id IN ( SELECT DISTINCT stand_id FROM laws_technology_evaluation where flow_status = #{params.flowStatus})
|
||||
or pti.design_p_id IS NOT NULL
|
||||
OR pti.prehomo_p_id IS NOT NULL
|
||||
OR pti.verify_p_id IS NOT NULL
|
||||
)
|
||||
<if test="params.isEngineerOrEngineeringInterfacePerson != true">
|
||||
(
|
||||
bdl.id IN (
|
||||
SELECT
|
||||
DISTINCT stand_id
|
||||
FROM laws_opinion_gather
|
||||
where gather_result = #{params.gatherResult}
|
||||
)
|
||||
OR bdl.id IN (
|
||||
SELECT
|
||||
DISTINCT stand_id
|
||||
FROM laws_technology_evaluation
|
||||
where flow_status = #{params.flowStatus}
|
||||
)
|
||||
OR pti.design_p_id IS NOT NULL
|
||||
OR pti.prehomo_p_id IS NOT NULL
|
||||
OR pti.verify_p_id IS NOT NULL
|
||||
)
|
||||
</if>
|
||||
<!--2022-11-01 增加数据权限:如果当前登录用户,是工程师、工程接口人角色,只能查看到跟自己相关的数据。其余角色保留之前的查询结果。-->
|
||||
<if test="params.isEngineerOrEngineeringInterfacePerson == true">
|
||||
(
|
||||
bdl.id IN (
|
||||
SELECT
|
||||
DISTINCT stand_id
|
||||
FROM
|
||||
laws_opinion_gather
|
||||
where gather_result = #{params.gatherResult} and evaluator_ids like CONCAT(CONCAT('%',#{params.currentUserId}),'%')
|
||||
)
|
||||
OR bdl.id IN (
|
||||
SELECT
|
||||
DISTINCT stand_id
|
||||
FROM
|
||||
laws_technology_evaluation
|
||||
where flow_status = #{params.flowStatus}
|
||||
and id in (
|
||||
select
|
||||
laws_technology_evaluation_id
|
||||
from
|
||||
laws_technology_evaluation_flow_detail
|
||||
where evaluator_id = #{params.currentUserId}
|
||||
)
|
||||
)
|
||||
OR (pti.design_p_id IS NOT NULL and (pli.design_initiator_id = #{params.currentUserId} or pli.design_duty_id = #{params.currentUserId}))
|
||||
OR (pti.prehomo_p_id IS NOT NULL and (pli.prehomo_initiator_id = #{params.currentUserId} or pli.prehomo_duty_id = #{params.currentUserId}))
|
||||
OR (pti.verify_p_id IS NOT NULL and (pli.verify_initiator_id = #{params.currentUserId} or pli.verify_duty_id = #{params.currentUserId}))
|
||||
)
|
||||
</if>
|
||||
${params.condition}
|
||||
GROUP BY bdl.id
|
||||
order by bdl.create_time desc
|
||||
@@ -34,6 +75,12 @@
|
||||
pli.serial_number as "serialNumber",
|
||||
pli.title as "title",
|
||||
pli.project_library_id as "projectLibraryId",
|
||||
pli.design_initiator_id as "designInitiatorId",
|
||||
pli.design_duty_id as "designDutyId",
|
||||
pli.prehomo_initiator_id as "prehomoInitiatorId",
|
||||
pli.prehomo_duty_id as "prehomoDutyId",
|
||||
pli.verify_initiator_id as "verifyInitiatorId",
|
||||
pli.verify_duty_id as "verifyDutyId",
|
||||
pni.project_name as "projectName",
|
||||
pni.id as "projectNameId",
|
||||
pyni.year_name as "yearName",
|
||||
@@ -80,6 +127,16 @@
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="params.isEngineerOrEngineeringInterfacePerson == true">
|
||||
and(
|
||||
pli.design_initiator_id = #{params.currentUserId}
|
||||
or pli.design_duty_id = #{params.currentUserId}
|
||||
or pli.prehomo_initiator_id = #{params.currentUserId}
|
||||
or pli.prehomo_duty_id = #{params.currentUserId}
|
||||
or pli.verify_initiator_id = #{params.currentUserId}
|
||||
or pli.verify_duty_id = #{params.currentUserId}
|
||||
)
|
||||
</if>
|
||||
order by pli.create_time desc
|
||||
</select>
|
||||
|
||||
@@ -96,16 +153,57 @@
|
||||
LEFT JOIN project_laws_inventory pli ON ( pli.stand_id = bdl.id )
|
||||
LEFT JOIN project_task_inventory pti ON ( pli.id = pti.project_laws_inventory_id )
|
||||
WHERE
|
||||
<if test="params.isEngineerOrEngineeringInterfacePerson != true">
|
||||
(
|
||||
bdl.id IN ( SELECT DISTINCT stand_id FROM laws_opinion_gather)
|
||||
OR bdl.id IN ( SELECT DISTINCT stand_id FROM laws_technology_evaluation)
|
||||
or pti.design_p_id IS NOT NULL
|
||||
OR pti.prehomo_p_id IS NOT NULL
|
||||
OR pti.verify_p_id IS NOT NULL
|
||||
bdl.id IN (
|
||||
SELECT
|
||||
DISTINCT stand_id
|
||||
FROM laws_opinion_gather
|
||||
where gather_result = #{params.gatherResult}
|
||||
)
|
||||
<if test="params.condition != '' ">
|
||||
${params.condition}
|
||||
</if>
|
||||
OR bdl.id IN (
|
||||
SELECT
|
||||
DISTINCT stand_id
|
||||
FROM laws_technology_evaluation
|
||||
where flow_status = #{params.flowStatus}
|
||||
)
|
||||
OR pti.design_p_id IS NOT NULL
|
||||
OR pti.prehomo_p_id IS NOT NULL
|
||||
OR pti.verify_p_id IS NOT NULL
|
||||
)
|
||||
</if>
|
||||
<!--2022-11-01 增加数据权限:如果当前登录用户,是工程师、工程接口人角色,只能查看到跟自己相关的数据。其余角色保留之前的查询结果。-->
|
||||
<if test="params.isEngineerOrEngineeringInterfacePerson == true">
|
||||
(
|
||||
bdl.id IN (
|
||||
SELECT
|
||||
DISTINCT stand_id
|
||||
FROM
|
||||
laws_opinion_gather
|
||||
where gather_result = #{params.gatherResult} and evaluator_ids like CONCAT(CONCAT('%',#{params.currentUserId}),'%')
|
||||
)
|
||||
OR bdl.id IN (
|
||||
SELECT
|
||||
DISTINCT stand_id
|
||||
FROM
|
||||
laws_technology_evaluation
|
||||
where flow_status = #{params.flowStatus}
|
||||
and id in (
|
||||
select
|
||||
laws_technology_evaluation_id
|
||||
from
|
||||
laws_technology_evaluation_flow_detail
|
||||
where evaluator_id = #{params.currentUserId}
|
||||
)
|
||||
)
|
||||
OR (pti.design_p_id IS NOT NULL and (pli.design_initiator_id = #{params.currentUserId} or pli.design_duty_id = #{params.currentUserId}))
|
||||
OR (pti.prehomo_p_id IS NOT NULL and (pli.prehomo_initiator_id = #{params.currentUserId} or pli.prehomo_duty_id = #{params.currentUserId}))
|
||||
OR (pti.verify_p_id IS NOT NULL and (pli.verify_initiator_id = #{params.currentUserId} or pli.verify_duty_id = #{params.currentUserId}))
|
||||
)
|
||||
</if>
|
||||
<if test="params.condition != '' ">
|
||||
${params.condition}
|
||||
</if>
|
||||
GROUP BY bdl.id
|
||||
order by bdl.create_time desc
|
||||
</select>
|
||||
|
||||
+9
-6
@@ -80,12 +80,15 @@
|
||||
or prehomo_flow_task_status =#{ncrTrackVO.inconformity} or prehomo_flow_task_status =#{ncrTrackVO.track}
|
||||
or verify_flow_task_status =#{ncrTrackVO.inconformity} or verify_flow_task_status =#{ncrTrackVO.track}
|
||||
)
|
||||
<if test="ncrTrackVO.userId != null and ncrTrackVO.userId != ''">
|
||||
and (pli.regulation_owner_id =#{ncrTrackVO.userId}
|
||||
or pli.homologation_engineer_id =#{ncrTrackVO.userId}
|
||||
or pli.engineering_interface_person =#{ncrTrackVO.userId}
|
||||
or ptid.user_id =#{ncrTrackVO.userId}
|
||||
)
|
||||
<!--如果当前操作人不是系统管理员角色,查询跟自己相关的数据,如果是系统管理员,查询所有的-->
|
||||
<if test="ncrTrackVO.administrator == 'false'">
|
||||
<if test="ncrTrackVO.userId != null and ncrTrackVO.userId != ''">
|
||||
and (pli.regulation_owner_id =#{ncrTrackVO.userId}
|
||||
or pli.homologation_engineer_id =#{ncrTrackVO.userId}
|
||||
or pli.engineering_interface_person =#{ncrTrackVO.userId}
|
||||
or ptid.user_id =#{ncrTrackVO.userId}
|
||||
)
|
||||
</if>
|
||||
</if>
|
||||
order by pli.create_time desc
|
||||
|
||||
|
||||
+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);
|
||||
|
||||
}
|
||||
|
||||
+8
@@ -9,6 +9,7 @@ import com.jero.modules.project.vo.ProjectTaskInventoryVO;
|
||||
import javax.servlet.http.HttpServletRequest;
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* @Description: 项目库-任务清单表
|
||||
@@ -102,4 +103,11 @@ public interface IProjectTaskInventoryEOService extends IService<ProjectTaskInve
|
||||
List<String> verifyRoleCode(ProjectTaskInventoryVO projectTaskInventoryVO);
|
||||
|
||||
void exportXls(HttpServletResponse response, HttpServletRequest request, ProjectTaskInventoryEO projectTaskInventoryEO);
|
||||
|
||||
/**
|
||||
* 处理历史数据
|
||||
* @param params
|
||||
* @return
|
||||
*/
|
||||
Result<?> disposeHistoryData(Map<String, Object> params);
|
||||
}
|
||||
|
||||
+178
-42
@@ -25,6 +25,7 @@ import com.jero.modules.project.service.ILawsComplianceBoardService;
|
||||
import com.jero.modules.system.entity.SysCategory;
|
||||
import com.jero.modules.system.entity.SysDictItem;
|
||||
import com.jero.modules.system.service.ISysDictItemService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.jero.modules.system.util.StringUtils;
|
||||
@@ -68,6 +69,8 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
private ISysDictItemService sysDictItemService;
|
||||
@Autowired
|
||||
private ProjectTaskInventoryDetailEOMapper projectTaskInventoryDetailEOMapper;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
|
||||
@Override
|
||||
public IPage queryPageList(Map<String, Object> params) {
|
||||
@@ -81,6 +84,18 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
//只查询 法规技术评估流程状态、法规意见收集 收集结果 为已完成的数据
|
||||
params.put("flowStatus", GatherResultEnum.COMPLETED.getValue());
|
||||
params.put("gatherResult", GatherResultEnum.COMPLETED.getValue());
|
||||
|
||||
/**
|
||||
* 2022-11-01 增加数据权限:如果当前登录用户,是工程师、工程接口人角色,只能查看到跟自己相关的数据。其余角色保留之前的查询结果。
|
||||
*/
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
boolean isEngineer = this.sysUserService.isEngineer(currentUser);
|
||||
boolean isEngineeringInterfacePerson = this.sysUserService.isEngineeringInterfacePerson(currentUser);
|
||||
if(isEngineer || isEngineeringInterfacePerson){
|
||||
params.put("currentUserId",currentUser.getId());
|
||||
params.put("isEngineerOrEngineeringInterfacePerson",true);
|
||||
}
|
||||
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage infoPage = this.lawsComplianceBoardMapper.queryPageList(page, params);
|
||||
List records = infoPage.getRecords();
|
||||
@@ -142,18 +157,28 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
|
||||
@Override
|
||||
public JSONObject queryComplianceResultList(Map<String, Object> params) {
|
||||
/**
|
||||
* 2022-11-01 增加数据权限:如果当前登录用户,是工程师、工程接口人角色,只能查看到跟自己相关的数据。其余角色保留之前的查询结果。
|
||||
*/
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
boolean isEngineer = this.sysUserService.isEngineer(currentUser);
|
||||
boolean isEngineeringInterfacePerson = this.sysUserService.isEngineeringInterfacePerson(currentUser);
|
||||
if(isEngineer || isEngineeringInterfacePerson){
|
||||
params.put("currentUserId",currentUser.getId());
|
||||
params.put("isEngineerOrEngineeringInterfacePerson",true);
|
||||
}
|
||||
|
||||
JSONObject result = new JSONObject();
|
||||
String id = (String) params.get("id");
|
||||
String cut = (String) params.get("cut");
|
||||
List<Map<String,Object>> complianceResultList = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
||||
if(CollectionUtils.isNotEmpty(complianceResultList)){
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<String> projectLawsInventoryIdList = complianceResultList.stream().map(map-> (String) map.get("id")).collect(Collectors.toList());
|
||||
QueryWrapper<ProjectTaskInventoryDetailEO> taskDetailQueryWrapper = new QueryWrapper<>();
|
||||
taskDetailQueryWrapper.lambda().in(ProjectTaskInventoryDetailEO::getProjectTaskInventoryId,projectLawsInventoryIdList);
|
||||
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOList = this.projectTaskInventoryDetailEOMapper.selectList(taskDetailQueryWrapper);
|
||||
this.createTaskInventoryEOList(complianceResultList,projectTaskInventoryDetailEOList,currentUser);
|
||||
this.disposeComplianceResult(complianceResultList,cut);
|
||||
this.createTaskInventoryEOList(complianceResultList,projectTaskInventoryDetailEOList,currentUser,isEngineer,isEngineeringInterfacePerson);
|
||||
this.disposeComplianceResult(complianceResultList,cut,isEngineer,isEngineeringInterfacePerson);
|
||||
}
|
||||
result.put("complianceResultList",complianceResultList);
|
||||
|
||||
@@ -161,6 +186,10 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
QueryWrapper<LawsOpinionGatherEO> opinionGatherEOQueryWrapper = new QueryWrapper<>();
|
||||
opinionGatherEOQueryWrapper.lambda().eq(LawsOpinionGatherEO::getStandId,id);
|
||||
opinionGatherEOQueryWrapper.lambda().eq(LawsOpinionGatherEO::getGatherResult,GatherResultEnum.COMPLETED.getValue());
|
||||
//如果当前登录用户是工程师或工程接口人,只查询自己为评估人的法规意见收集数据。
|
||||
if(isEngineer || isEngineeringInterfacePerson){
|
||||
opinionGatherEOQueryWrapper.lambda().like(LawsOpinionGatherEO::getEvaluatorIds,currentUser.getId());
|
||||
}
|
||||
int opinionGatherCount = this.lawsOpinionGatherEOService.count(opinionGatherEOQueryWrapper);
|
||||
result.put("opinionGather",opinionGatherCount);
|
||||
|
||||
@@ -168,6 +197,10 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
QueryWrapper<LawsTechnologyEvaluationEO> evaluationEOQueryWrapper = new QueryWrapper<>();
|
||||
evaluationEOQueryWrapper.lambda().eq(LawsTechnologyEvaluationEO::getStandId,id);
|
||||
evaluationEOQueryWrapper.lambda().eq(LawsTechnologyEvaluationEO::getFlowStatus,GatherResultEnum.COMPLETED.getValue());
|
||||
//如果当前登录用户是工程师或工程接口人,只查询自己为评估人的法规技术评估数据。
|
||||
if(isEngineer || isEngineeringInterfacePerson){
|
||||
this.lawsTechnologyEvaluationEOService.createQueryPermission(evaluationEOQueryWrapper,null,false);
|
||||
}
|
||||
int evaluationCount = this.lawsTechnologyEvaluationEOService.count(evaluationEOQueryWrapper);
|
||||
result.put("technologyEvaluation",evaluationCount);
|
||||
return result;
|
||||
@@ -178,8 +211,14 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
* @param complianceResultList
|
||||
* @param projectTaskInventoryDetailEOList
|
||||
* @param currentUser
|
||||
* @param isEngineer 是否是工程师角色
|
||||
* @param isEngineeringInterfacePerson 是否是工程接口人角色
|
||||
*/
|
||||
private void createTaskInventoryEOList(List<Map<String, Object>> complianceResultList, List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOList, LoginUser currentUser) {
|
||||
private void createTaskInventoryEOList(List<Map<String, Object>> complianceResultList,
|
||||
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOList,
|
||||
LoginUser currentUser,
|
||||
boolean isEngineer,
|
||||
boolean isEngineeringInterfacePerson) {
|
||||
if(CollectionUtils.isNotEmpty(complianceResultList) && CollectionUtils.isNotEmpty(projectTaskInventoryDetailEOList)){
|
||||
for (Map<String, Object> complianceResult : complianceResultList) {
|
||||
String designPid = "";
|
||||
@@ -199,44 +238,97 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
String verifyTaskStatus = "";
|
||||
String verifyTaskDefinitionKey = "";
|
||||
String verifyTaskDetailId = "";
|
||||
|
||||
for (ProjectTaskInventoryDetailEO projectTaskInventoryDetail : projectTaskInventoryDetailEOList) {
|
||||
if(StringUtils.equals(complianceResult.get("id").toString(),projectTaskInventoryDetail.getProjectTaskInventoryId())){
|
||||
/**
|
||||
* 查询数据权限,所有用户都是,自己的待办,可以跳转到处理任务详情页进行处理。
|
||||
* 不是自己的待办,只能跳转到处理任务的详情页。
|
||||
*/
|
||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(), FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||
designPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||
designTaskId = projectTaskInventoryDetail.getTaskId();
|
||||
designTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||
designTaskDetailId = projectTaskInventoryDetail.getId();
|
||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
||||
designTaskStatus = projectTaskInventoryDetail.getStatus();
|
||||
}else {
|
||||
designTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
||||
//2022-11-01 增加数据权限:如果当前登录用户,是工程师、工程接口人角色,只能查看到跟自己相关的数据。其余角色保留之前的查询结果。
|
||||
if((isEngineer || isEngineeringInterfacePerson)){
|
||||
for (ProjectTaskInventoryDetailEO projectTaskInventoryDetail : projectTaskInventoryDetailEOList) {
|
||||
if(StringUtils.equals(complianceResult.get("id").toString(),projectTaskInventoryDetail.getProjectTaskInventoryId())){
|
||||
/**
|
||||
* 查询数据权限,所有用户都是,自己的待办,可以跳转到处理任务详情页进行处理。
|
||||
* 不是自己的待办,只能跳转到处理任务的详情页。
|
||||
*/
|
||||
if(StringUtils.equals(complianceResult.get("designInitiatorId").toString(),currentUser.getId())
|
||||
|| StringUtils.equals(complianceResult.get("designDutyId").toString(),currentUser.getId())){
|
||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(), FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||
designPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||
designTaskId = projectTaskInventoryDetail.getTaskId();
|
||||
designTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||
designTaskDetailId = projectTaskInventoryDetail.getId();
|
||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
||||
designTaskStatus = projectTaskInventoryDetail.getStatus();
|
||||
}else {
|
||||
designTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.equals(complianceResult.get("prehomoInitiatorId").toString(),currentUser.getId())
|
||||
|| StringUtils.equals(complianceResult.get("prehomoDutyId").toString(),currentUser.getId())){
|
||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(),FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||
prehomoPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||
prehomoTaskId = projectTaskInventoryDetail.getTaskId();
|
||||
prehomoTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||
prehomoTaskDetailId = projectTaskInventoryDetail.getId();
|
||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
||||
prehomoTaskStatus = projectTaskInventoryDetail.getStatus();
|
||||
}else {
|
||||
prehomoTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.equals(complianceResult.get("verifyInitiatorId").toString(),currentUser.getId())
|
||||
|| StringUtils.equals(complianceResult.get("verifyDutyId").toString(),currentUser.getId())){
|
||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(),FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||
verifyPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||
verifyTaskId = projectTaskInventoryDetail.getTaskId();
|
||||
verifyTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||
verifyTaskDetailId = projectTaskInventoryDetail.getId();
|
||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
||||
verifyTaskStatus = projectTaskInventoryDetail.getStatus();
|
||||
}else {
|
||||
verifyTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(),FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||
prehomoPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||
prehomoTaskId = projectTaskInventoryDetail.getTaskId();
|
||||
prehomoTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||
prehomoTaskDetailId = projectTaskInventoryDetail.getId();
|
||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
||||
prehomoTaskStatus = projectTaskInventoryDetail.getStatus();
|
||||
}else {
|
||||
prehomoTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
||||
}
|
||||
}else {
|
||||
for (ProjectTaskInventoryDetailEO projectTaskInventoryDetail : projectTaskInventoryDetailEOList) {
|
||||
if(StringUtils.equals(complianceResult.get("id").toString(),projectTaskInventoryDetail.getProjectTaskInventoryId())){
|
||||
/**
|
||||
* 查询数据权限,所有用户都是,自己的待办,可以跳转到处理任务详情页进行处理。
|
||||
* 不是自己的待办,只能跳转到处理任务的详情页。
|
||||
*/
|
||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(), FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||
designPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||
designTaskId = projectTaskInventoryDetail.getTaskId();
|
||||
designTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||
designTaskDetailId = projectTaskInventoryDetail.getId();
|
||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
||||
designTaskStatus = projectTaskInventoryDetail.getStatus();
|
||||
}else {
|
||||
designTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(),FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||
verifyPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||
verifyTaskId = projectTaskInventoryDetail.getTaskId();
|
||||
verifyTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||
verifyTaskDetailId = projectTaskInventoryDetail.getId();
|
||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
||||
verifyTaskStatus = projectTaskInventoryDetail.getStatus();
|
||||
}else {
|
||||
verifyTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(),FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||
prehomoPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||
prehomoTaskId = projectTaskInventoryDetail.getTaskId();
|
||||
prehomoTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||
prehomoTaskDetailId = projectTaskInventoryDetail.getId();
|
||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
||||
prehomoTaskStatus = projectTaskInventoryDetail.getStatus();
|
||||
}else {
|
||||
prehomoTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
||||
}
|
||||
}
|
||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(),FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||
verifyPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||
verifyTaskId = projectTaskInventoryDetail.getTaskId();
|
||||
verifyTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||
verifyTaskDetailId = projectTaskInventoryDetail.getId();
|
||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
||||
verifyTaskStatus = projectTaskInventoryDetail.getStatus();
|
||||
}else {
|
||||
verifyTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -267,10 +359,35 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
}
|
||||
}
|
||||
|
||||
public void disposeComplianceResult(List<Map<String,Object>> complianceResultList,String cut){
|
||||
public void disposeComplianceResult(List<Map<String,Object>> complianceResultList,String cut,boolean isEngineer,boolean isEngineeringInterfacePerson){
|
||||
if(CollectionUtils.isNotEmpty(complianceResultList)){
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
List<SysDictItem> dutyTerritoryDictItemList = sysDictItemService.selectItemsByDictCode("duty_territory");
|
||||
for (Map<String, Object> complianceResult : complianceResultList) {
|
||||
if(isEngineer || isEngineeringInterfacePerson){
|
||||
if(!StringUtils.equals(complianceResult.get("designInitiatorId").toString(),currentUser.getId())
|
||||
|| !StringUtils.equals(complianceResult.get("designDutyId").toString(),currentUser.getId())){
|
||||
complianceResult.put("designStatus","");
|
||||
complianceResult.put("designFlowTaskStatus","");
|
||||
complianceResult.put("designPId","");
|
||||
complianceResult.put("designPersonChargeFeedback","");
|
||||
}
|
||||
if(!StringUtils.equals(complianceResult.get("prehomoInitiatorId").toString(),currentUser.getId())
|
||||
&& !StringUtils.equals(complianceResult.get("prehomoDutyId").toString(),currentUser.getId())){
|
||||
complianceResult.put("prehomoStatus","");
|
||||
complianceResult.put("prehomoFlowTaskStatus","");
|
||||
complianceResult.put("prehomoPId","");
|
||||
complianceResult.put("prehomoPersonChargeFeedback","");
|
||||
}
|
||||
if(!StringUtils.equals(complianceResult.get("verifyInitiatorId").toString(),currentUser.getId())
|
||||
&& !StringUtils.equals(complianceResult.get("verifyDutyId").toString(),currentUser.getId())){
|
||||
complianceResult.put("verifyStatus","");
|
||||
complianceResult.put("verifyFlowTaskStatus","");
|
||||
complianceResult.put("verifyPId","");
|
||||
complianceResult.put("verifyPersonChargeFeedback","");
|
||||
}
|
||||
}
|
||||
|
||||
if (complianceResult.get("designStatus") != null) {
|
||||
String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("designStatus").toString(), cut);
|
||||
complianceResult.put("designStatus_dicText",textByValue);
|
||||
@@ -342,6 +459,15 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
String condition = this.getConditionStr(params);
|
||||
params.put("condition",StringUtils.isNotEmpty(condition) ? condition : "");
|
||||
List<Map<String,Object>> exportData = new ArrayList<>();
|
||||
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
boolean isEngineer = this.sysUserService.isEngineer(currentUser);
|
||||
boolean isEngineeringInterfacePerson = this.sysUserService.isEngineeringInterfacePerson(currentUser);
|
||||
if(isEngineer || isEngineeringInterfacePerson){
|
||||
params.put("currentUserId",currentUser.getId());
|
||||
params.put("isEngineerOrEngineeringInterfacePerson",true);
|
||||
}
|
||||
|
||||
if(StringUtils.equals(exportAll,"no")){
|
||||
IPage page = this.queryPageList(params);
|
||||
exportData = page.getRecords();
|
||||
@@ -358,7 +484,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
List<Map<String,Object>> complianceResultList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(idList)){
|
||||
complianceResultList = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
||||
this.disposeComplianceResult(complianceResultList,cut);
|
||||
this.disposeComplianceResult(complianceResultList,cut,isEngineer,isEngineeringInterfacePerson);
|
||||
}
|
||||
|
||||
String title = "";
|
||||
@@ -468,8 +594,18 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
||||
@Override
|
||||
public void exportComplianceResultDetail(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params) {
|
||||
String cut = (String) params.get("cut");
|
||||
/**
|
||||
* 2022-11-01 增加数据权限:如果当前登录用户,是工程师、工程接口人角色,只能查看到跟自己相关的数据。其余角色保留之前的查询结果。
|
||||
*/
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
boolean isEngineer = this.sysUserService.isEngineer(currentUser);
|
||||
boolean isEngineeringInterfacePerson = this.sysUserService.isEngineeringInterfacePerson(currentUser);
|
||||
if(isEngineer || isEngineeringInterfacePerson){
|
||||
params.put("currentUserId",currentUser.getId());
|
||||
params.put("isEngineerOrEngineeringInterfacePerson",true);
|
||||
}
|
||||
List<Map<String,Object>> exportData = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
||||
this.disposeComplianceResult(exportData,cut);
|
||||
this.disposeComplianceResult(exportData,cut,isEngineer,isEngineeringInterfacePerson);
|
||||
String title = "";
|
||||
String fileName = "";
|
||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
||||
|
||||
+5
@@ -80,6 +80,11 @@ public class NcrTrackServiceImpl extends ServiceImpl<NcrTrackMapper, NcrTrackVO>
|
||||
|
||||
ncrTrackVO.setInconformity(ReviewResultEnum.INCONFORMITY.getValue());
|
||||
ncrTrackVO.setTrack(ReviewResultEnum.TO_TRACK.getValue());
|
||||
|
||||
//如果当前登录用户是系统管理员角色,可以查看所有的数据
|
||||
boolean administrator = this.sysUserService.isAdministrator();
|
||||
ncrTrackVO.setAdministrator(administrator ? "true":"false");
|
||||
|
||||
List<NcrTrackVO> infoList = ncrTrackMapper.getInfoList(ncrTrackVO);
|
||||
infoList = infoList.stream().distinct().collect(Collectors.toList());
|
||||
List<NcrTrackVO> trackVOList = new ArrayList<>();
|
||||
|
||||
+834
-280
File diff suppressed because it is too large
Load Diff
+131
-47
@@ -7,9 +7,15 @@ import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.MessageType2Enum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.MsgColorEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
||||
@@ -32,6 +38,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -71,6 +79,11 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -341,61 +354,113 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
|
||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
||||
|
||||
String id = UUID.randomUUID().toString().replace("-", "");
|
||||
//String id = UUID.randomUUID().toString().replace("-", "");
|
||||
|
||||
MessageTypeEnum messageTypeEnum = null;
|
||||
String msgContentEN = "";
|
||||
//MessageTypeEnum messageTypeEnum = null;
|
||||
//String msgContentEN = "";
|
||||
String msgTitle = "";
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
String cnContentUpper = "";//中文上部分
|
||||
String cnContentLower = "";//中文下部分
|
||||
String enContentUpper = "";//英文上部分
|
||||
String enContentLower = "";//英文下部分
|
||||
|
||||
//项目名称
|
||||
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;
|
||||
//法规中英文
|
||||
String LAW_CN = projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle();//法规
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
String LAW_EN = projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn();//法规
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//给工程师下发消息
|
||||
if(org.apache.commons.lang3.StringUtils.equals(projectTaskInventoryDetailEO.getMsgType(), MsgTypeEnum.DESIGN_ISSUE_DRE_MSG.getValue())){
|
||||
//XXX has distributed the design compliance confirmation process of GB 7258 in XXX (project name) to you. Please check and handle it in time.
|
||||
msgContentEN = currentUser.getUsername() + " has assigned the design compliance confirmation process of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " to you. Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
//msgContentEN = currentUser.getUsername() + " has assigned the design compliance confirmation process of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + " to you. Please check and handle it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a design compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
|
||||
msgTitle = MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"向您分发了该任务,请及时查看处理";
|
||||
cnContentLower = "项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getDesignDueDate());
|
||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has assigned the task to you. Please check and address the task in a timely manner.";
|
||||
enContentLower = "Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getDesignDueDate());
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}else if(org.apache.commons.lang3.StringUtils.equals(projectTaskInventoryDetailEO.getMsgType(), MsgTypeEnum.PREHOMO_ISSUE_DRE_MSG.getValue())){
|
||||
//XXX has distributed the Pre-Homo confirmation process of GB 7258 in XXX (project name) to you. Please check and handle it in time.
|
||||
msgContentEN = currentUser.getUsername() + " has assigned the Pre-Homo confirmation process of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " to you. Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
//msgContentEN = currentUser.getUsername() + " has assigned the Pre-Homo confirmation process of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + " to you. Please check and handle it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a Pre-Homo task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||
//feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
|
||||
msgTitle = MessageType2Enum.PRE_HOMO_CONFIRMATION.getCn() + "/" + MessageType2Enum.PRE_HOMO_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"向您分发了该任务,请及时查看处理";
|
||||
cnContentLower = "项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getPrehomoDueDate());
|
||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has assigned the task to you. Please check and address the task in a timely manner.";
|
||||
enContentLower = "Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getPrehomoDueDate());
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}else if(org.apache.commons.lang3.StringUtils.equals(projectTaskInventoryDetailEO.getMsgType(), MsgTypeEnum.VERIFY_ISSUE_DRE_MSG.getValue())){
|
||||
//XXX has distributed the Verify compliance confirmation process of GB 7258 in XXX (project name) to you. Please check and handle it in time.
|
||||
msgContentEN = currentUser.getUsername() + " has assigned the validation compliance confirmation process of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " to you. Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
//msgContentEN = currentUser.getUsername() + " has assigned the validation compliance confirmation process of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + " to you. Please check and handle it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a validation compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||
//feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
|
||||
msgTitle = MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"向您分发了该任务,请及时查看处理";
|
||||
cnContentLower = "项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has assigned the task to you. Please check and address the task in a timely manner.";
|
||||
enContentLower = "Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && org.apache.commons.lang3.StringUtils.isNotEmpty(msgContentEN)){
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && org.apache.commons.lang3.StringUtils.isNotEmpty(msgTitle)){
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
||||
@@ -403,17 +468,36 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
//SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper(cnContentUpper);
|
||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
||||
feishuMsgVo.setEnContentUpper(enContentUpper);
|
||||
feishuMsgVo.setEnContentLower(enContentLower);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+324
-99
@@ -6,10 +6,16 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.jero.common.api.vo.Result;
|
||||
import com.jero.common.constant.enums.CutEnum;
|
||||
import com.jero.common.constant.enums.MessageType2Enum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.MsgColorEnum;
|
||||
import com.jero.common.exception.JeroBootException;
|
||||
import com.jero.common.system.query.QueryGenerator;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.*;
|
||||
@@ -24,6 +30,7 @@ import com.jero.modules.system.entity.SysUser;
|
||||
import com.jero.modules.system.entity.SysUserRole;
|
||||
import com.jero.modules.system.mapper.SysUserMapper;
|
||||
import com.jero.modules.system.service.ISysUserRoleService;
|
||||
import com.jero.modules.system.service.ISysUserService;
|
||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||
import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
|
||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||
@@ -91,6 +98,12 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private ISysUserService sysUserService;
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
|
||||
/**
|
||||
* 保存
|
||||
@@ -380,58 +393,116 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
String dreUserIds = jsonObject.getString("dreUserIds"); //dre用户id
|
||||
userIdList.addAll(Arrays.asList(dreUserIds.split(",")));
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
|
||||
String msgContentEN = "";
|
||||
//String msgContentEN = "";
|
||||
String msgTitle = "";
|
||||
MessageTypeEnum messageTypeEnum = null;
|
||||
//MessageTypeEnum messageTypeEnum = null;
|
||||
|
||||
String cnContentUpper = "";//中文上部分
|
||||
String cnContentLower = "";//中文下部分
|
||||
String enContentUpper = "";//英文上部分
|
||||
String enContentLower = "";//英文下部分
|
||||
|
||||
//项目名称
|
||||
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;
|
||||
//法规中英文
|
||||
QueryWrapper<ProjectLawsInventoryEO> projectLawsInventoryEOQueryWrapper = new QueryWrapper<>();
|
||||
projectLawsInventoryEOQueryWrapper.eq("project_library_id", projectLibraryId).eq("serial_number", serialNumber);
|
||||
ProjectLawsInventoryEO projectLawsInventoryEO = projectLawsInventoryEOMapper.selectOne(projectLawsInventoryEOQueryWrapper);
|
||||
String LAW_CN = projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle();//法规
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
String LAW_EN = projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn();//法规
|
||||
|
||||
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
|
||||
if(StringUtils.equals(msgType,MsgTypeEnum.DESIGN_REMIND_MSG.getValue())){
|
||||
//Please check and deal with the design compliance confirmation process of GB 7258 in XXX (project name) in time.
|
||||
msgContentEN = "Please check and deal with the design compliance confirmation process of "
|
||||
+ serialNumber + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
//msgContentEN = "Please check and deal with the design compliance confirmation process of "
|
||||
// + serialNumber + " in "
|
||||
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + " in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a design compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setRegulationNo(serialNumber);
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
||||
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
//feishuMsgVo.setRegulationNo(serialNumber);
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
|
||||
msgTitle = MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"向您分发了该任务,请尽快查看处理";
|
||||
cnContentLower = "项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getDesignDueDate());
|
||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has assigned the task to you. Please check and address the task ASAP";
|
||||
enContentLower = "Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getDesignDueDate());
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}else if(StringUtils.equals(msgType,MsgTypeEnum.PREHOMO_REMIND_MSG.getValue())){
|
||||
//Please check and deal with the Pre-Homo confirmation process of GB 7258 in XXX (project name) in time.
|
||||
msgContentEN = "Please check and address the Pre-Homo confirmation process of "
|
||||
+ serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||
+ " in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
//msgContentEN = "Please check and address the Pre-Homo confirmation process of "
|
||||
// + serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||
// + " in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a Pre-Homo task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
feishuMsgVo.setRegulationNo(serialNumber);
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
||||
//feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
//feishuMsgVo.setRegulationNo(serialNumber);
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
|
||||
msgTitle = MessageType2Enum.PRE_HOMO_CONFIRMATION.getCn() + "/" + MessageType2Enum.PRE_HOMO_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"向您分发了该任务,请尽快查看处理";
|
||||
cnContentLower = "项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getPrehomoDueDate());
|
||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has assigned the task to you. Please check and address the task ASAP";
|
||||
enContentLower = "Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getPrehomoDueDate());
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}else if(StringUtils.equals(msgType,MsgTypeEnum.VERIFY_REMIND_MSG.getValue())){
|
||||
//Please check and deal with the Verify compliance confirmation process of GB 7258 in XXX (project name) in time.
|
||||
msgContentEN = "Please check and address the validation compliance confirmation process of "
|
||||
+ serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||
+ " in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
//msgContentEN = "Please check and address the validation compliance confirmation process of "
|
||||
// + serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||
// + " in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a validation compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
feishuMsgVo.setRegulationNo(serialNumber);
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
||||
//feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
//feishuMsgVo.setRegulationNo(serialNumber);
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
|
||||
msgTitle = MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"向您分发了该任务,请尽快查看处理";
|
||||
cnContentLower = "项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has assigned the task to you. Please check and address the task ASAP";
|
||||
enContentLower = "Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
||||
}
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgTitle)){
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
@@ -441,20 +512,40 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
||||
|
||||
userIdList = userIdList.stream().distinct().collect(Collectors.toList());
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper(cnContentUpper);
|
||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
||||
feishuMsgVo.setEnContentUpper(enContentUpper);
|
||||
feishuMsgVo.setEnContentLower(enContentLower);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
// + projectYearNameInfoEO.getYearName()
|
||||
// + "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
//SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,projectLibraryId,sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
return new Result<>().success("提醒办理成功!");
|
||||
}
|
||||
@@ -918,7 +1009,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
String personChargeFeedback = "";
|
||||
|
||||
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String dutDateStr = "";
|
||||
|
||||
@@ -926,90 +1017,138 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
String msgContentEN = "";
|
||||
String msgTitle = "";
|
||||
|
||||
String cnContentUpper = "";//中文上部分
|
||||
String cnContentLower = "";//中文下部分
|
||||
String enContentUpper = "";//英文上部分
|
||||
String enContentLower = "";//英文下部分
|
||||
|
||||
|
||||
//项目名称
|
||||
String projectVersion = (com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBase.getParentId()) && com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBase.getProjectVersion())) ? "00" : projectLibraryBase.getProjectVersion();
|
||||
String PRN = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + "-" + projectLibraryBase.getTargetMarket() + "-" + projectVersion;
|
||||
|
||||
String LAW_CN = projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle();//法规
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
String LAW_EN = projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn();//法规
|
||||
|
||||
if (StringUtils.equals(msgType, MsgTypeEnum.DESIGN_ISSUE_DRE_MSG.getValue())) {
|
||||
taskKey = DesignComplianceNodeEnum.DRE_DISPOSE.getKey();
|
||||
//taskKey = DesignComplianceNodeEnum.DRE_DISPOSE.getKey();
|
||||
|
||||
if(projectLawsInventoryEO.getDesignDueDate() != null){
|
||||
dutDateStr = sdf.format(projectLawsInventoryEO.getDesignDueDate());
|
||||
}
|
||||
|
||||
msgContentEN = sysUser.getUsername() + "has assigned the design compliance confirmation process of " + serialNumber + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " to you. Please check and handle it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//msgContentEN = sysUser.getUsername() + "has assigned the design compliance confirmation process of " + serialNumber + " in "
|
||||
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + " to you. Please check and handle it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a design compliance task to complete";
|
||||
|
||||
//feishuMsgVo.setContent("Hello! " + sysUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_RETURN_MSG.getValue())){
|
||||
String designDutyId = jsonObject.getString("designDutyId");//设计符合性流程责任人id
|
||||
userIdList.add(designDutyId);
|
||||
|
||||
taskKey = DesignComplianceNodeEnum.THE_RESPONSIBLE_PERSON_HANDLES_THE_TASK.getKey();
|
||||
|
||||
//taskKey = DesignComplianceNodeEnum.THE_RESPONSIBLE_PERSON_HANDLES_THE_TASK.getKey();
|
||||
|
||||
if(projectLawsInventoryEO.getDesignDueDate() != null){
|
||||
dutDateStr = sdf.format(projectLawsInventoryEO.getDesignDueDate());
|
||||
}
|
||||
msgTitle = MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,该任务被发起人审查退回,请及时查看处理";
|
||||
cnContentLower = "项目: " + PRN +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + sysUser.getUsername() +
|
||||
"\n截止时间: " + dutDateStr;
|
||||
enContentUpper = "Hello! The task has been rejected by initiator after review. Please check and address it in a timely manner";
|
||||
enContentLower = "Project: " + PRN +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + sysUser.getUsername() +
|
||||
"\nDue Date: " + dutDateStr;
|
||||
//msgContentEN = "The design compliance information of " + serialNumber + " in "
|
||||
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + " you sumitted has been rejected after review. Please check and address it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a design compliance task to complete";
|
||||
|
||||
msgContentEN = "The design compliance information of " + serialNumber + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " you sumitted has been rejected after review. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
//feishuMsgVo.setContent("Hello! The compliance information you submitted has been rejected after review. Please check and address it in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance information you submitted has been rejected after review. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_RETURN_MSG.getValue())){
|
||||
String prehomoDutyId = jsonObject.getString("prehomoDutyId");//prehomo流程责任人id
|
||||
userIdList.add(prehomoDutyId);
|
||||
|
||||
taskKey = DesignComplianceNodeEnum.THE_RESPONSIBLE_PERSON_HANDLES_THE_TASK.getKey();
|
||||
//taskKey = DesignComplianceNodeEnum.THE_RESPONSIBLE_PERSON_HANDLES_THE_TASK.getKey();
|
||||
|
||||
if(projectLawsInventoryEO.getPrehomoDueDate() != null){
|
||||
dutDateStr = sdf.format(projectLawsInventoryEO.getPrehomoDueDate());
|
||||
}
|
||||
msgTitle = MessageType2Enum.PRE_HOMO_CONFIRMATION.getCn() + "/" + MessageType2Enum.PRE_HOMO_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,该任务被发起人审查退回,请及时查看处理";
|
||||
cnContentLower = "项目: " + PRN +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + sysUser.getUsername() +
|
||||
"\n截止时间: " + dutDateStr;
|
||||
enContentUpper = "Hello! The task has been rejected by initiator after review. Please check and address it in a timely manner";
|
||||
enContentLower = "Project: " + PRN +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + sysUser.getUsername() +
|
||||
"\nDue Date: " + dutDateStr;
|
||||
|
||||
msgContentEN = "The Pre-Homo confirmation of " + serialNumber + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " you sumitted has been rejected after review. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
//msgContentEN = "The Pre-Homo confirmation of " + serialNumber + " in "
|
||||
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + " you sumitted has been rejected after review. Please check and address it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a Pre-Homo task to complete";
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance information you submitted has been rejected after review. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
//feishuMsgVo.setContent("Hello! The compliance information you submitted has been rejected after review. Please check and address it in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_RETURN_MSG.getValue())){
|
||||
String verifyDutyId = jsonObject.getString("verifyDutyId");//验证符合性流程责任人id
|
||||
userIdList.add(verifyDutyId);
|
||||
|
||||
taskKey = DesignComplianceNodeEnum.THE_RESPONSIBLE_PERSON_HANDLES_THE_TASK.getKey();
|
||||
//taskKey = DesignComplianceNodeEnum.THE_RESPONSIBLE_PERSON_HANDLES_THE_TASK.getKey();
|
||||
|
||||
if(projectLawsInventoryEO.getVerifyDueDate() != null){
|
||||
dutDateStr = sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
||||
}
|
||||
msgTitle = MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,该任务被发起人审查退回,请及时查看处理";
|
||||
cnContentLower = "项目: " + PRN +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + sysUser.getUsername() +
|
||||
"\n截止时间: " + dutDateStr;
|
||||
enContentUpper = "Hello! The task has been rejected by initiator after review. Please check and address it in a timely manner";
|
||||
enContentLower = "Project: " + PRN +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + sysUser.getUsername() +
|
||||
"\nDue Date: " + dutDateStr;
|
||||
//msgContentEN = "The validation compliance information of " + serialNumber + " in "
|
||||
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + " you sumitted has been rejected after review. Please check and address it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
// + ": You have a validation compliance task to complete";
|
||||
|
||||
msgContentEN = "The validation compliance information of " + serialNumber + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ " you sumitted has been rejected after review. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
//feishuMsgVo.setContent("Hello! The compliance information you submitted has been rejected after review. Please check and address it in a timely manner.");
|
||||
//feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
|
||||
feishuMsgVo.setContent("Hello! The compliance information you submitted has been rejected after review. Please check and address it in a timely manner.");
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}
|
||||
/*55360问题。
|
||||
feishuMsgVo.setDueDate(dutDateStr);
|
||||
feishuMsgVo.setInitiator(sysUser.getUsername());
|
||||
*/
|
||||
feishuMsgVo.setRegulationNo(serialNumber);
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
//feishuMsgVo.setRegulationNo(serialNumber);
|
||||
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||
|
||||
|
||||
/*//根据流程实例id,查询待办id
|
||||
@@ -1065,7 +1204,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
personChargeFeedback = projectTaskInventoryEO.getVerifyPersonChargeFeedback();
|
||||
}*/
|
||||
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
|
||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgTitle)){
|
||||
|
||||
//飞书跳转链接
|
||||
String hrefFeishu = backUrl
|
||||
@@ -1075,13 +1214,32 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ projectLibraryBase.getTargetMarket();
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper(cnContentUpper);
|
||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
||||
feishuMsgVo.setEnContentUpper(enContentUpper);
|
||||
feishuMsgVo.setEnContentLower(enContentLower);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
//系统内部跳转链接
|
||||
String 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 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 hrefFeishu = backUrl
|
||||
@@ -1133,13 +1291,13 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
+ "&primaryKeyId=" + primaryKeyId
|
||||
+ "&PersonChargeFeedback=" + personChargeFeedback
|
||||
+ "'>" + " View details" + "</a>";*/
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
//SendMessageUtils.sendMessage(msgTitle, msgContentEN,userIdList,id,sendMessageMap, feishuMsgVo, messageTypeEnum,MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1301,6 +1459,73 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public Result<?> disposeHistoryData(Map<String, Object> params) {
|
||||
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = this.projectTaskInventoryEOService.list();
|
||||
|
||||
//获取没有任务清单数据的法规清单数据
|
||||
List<String> projectLawsInventoryIdList = projectTaskInventoryEOList.stream().map(ProjectTaskInventoryEO::getProjectLawsInventoryId).distinct().collect(Collectors.toList());
|
||||
QueryWrapper<ProjectLawsInventoryEO> lawsInventoryQueryWrap = new QueryWrapper<>();
|
||||
lawsInventoryQueryWrap.lambda().notIn(ProjectLawsInventoryEO::getId,projectLawsInventoryIdList);
|
||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = this.projectLawsInventoryEOService.list(lawsInventoryQueryWrap);
|
||||
|
||||
//如果有(没有任务清单数据的法规清单数据),进行历史数据处理
|
||||
if(CollectionUtils.isNotEmpty(projectLawsInventoryEOList)){
|
||||
|
||||
List<String> projectLawsInventoryIds = projectLawsInventoryEOList.stream().map(ProjectLawsInventoryEO::getId).distinct().collect(Collectors.toList());
|
||||
|
||||
QueryWrapper<ProjectTaskInventoryDetailEO> taskInventoryDetailQueryWrap = new QueryWrapper<>();
|
||||
taskInventoryDetailQueryWrap.lambda().in(ProjectTaskInventoryDetailEO::getProjectTaskInventoryId,projectLawsInventoryIds);
|
||||
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOS = this.projectTaskInventoryDetailEOMapper.selectList(taskInventoryDetailQueryWrap);
|
||||
|
||||
List<ProjectTaskInventoryEO> projectTaskInventoryEOAddList = new ArrayList<>();
|
||||
projectLawsInventoryEOList.forEach(lawsInventoryEO -> {
|
||||
ProjectTaskInventoryEO projectTaskInventoryEO = new ProjectTaskInventoryEO();
|
||||
String projectTaskInventoryId = UUID.randomUUID().toString().replace("-", "");
|
||||
projectTaskInventoryEO.setId(projectTaskInventoryId);
|
||||
projectTaskInventoryEO.setProjectLawsInventoryId(lawsInventoryEO.getId());
|
||||
projectTaskInventoryEO.setStandId(lawsInventoryEO.getStandId());
|
||||
projectTaskInventoryEO.setCreateBy("admin");
|
||||
projectTaskInventoryEO.setSysOrgCode("A01");
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectTaskInventoryDetailEOS)){
|
||||
//获取当前法规清单数据 启动的符合性流程数据
|
||||
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailListTemp = projectTaskInventoryDetailEOS.stream().filter(taskInventoryDetail -> {
|
||||
boolean flag = false;
|
||||
if (StringUtils.equals(taskInventoryDetail.getProjectTaskInventoryId(), projectTaskInventoryEO.getProjectLawsInventoryId())) {
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
if(CollectionUtils.isNotEmpty(projectTaskInventoryDetailListTemp)){
|
||||
for (ProjectTaskInventoryDetailEO projectTaskInventoryDetailEO : projectTaskInventoryDetailListTemp) {
|
||||
//流程实例id
|
||||
String actiProcInstId = projectTaskInventoryDetailEO.getActiProcInstId();
|
||||
if(StringUtils.equals(projectTaskInventoryDetailEO.getFlowType(),FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||
projectTaskInventoryEO.setDesignPId(actiProcInstId);
|
||||
projectTaskInventoryEO.setDesignFlowTaskStatus(ReviewResultEnum.TO_BE_CONFIRMED.getValue());
|
||||
projectTaskInventoryEO.setDesignStatus(DesignComplianceStatusEnum.TO_SUBMIT.getValue());
|
||||
}else if(StringUtils.equals(projectTaskInventoryDetailEO.getFlowType(),FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||
projectTaskInventoryEO.setPrehomoPId(actiProcInstId);
|
||||
projectTaskInventoryEO.setPrehomoFlowTaskStatus(ReviewResultEnum.TO_BE_CONFIRMED.getValue());
|
||||
projectTaskInventoryEO.setPrehomoStatus(DesignComplianceStatusEnum.TO_SUBMIT.getValue());
|
||||
}else if(StringUtils.equals(projectTaskInventoryDetailEO.getFlowType(),FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||
projectTaskInventoryEO.setVerifyPId(actiProcInstId);
|
||||
projectTaskInventoryEO.setVerifyFlowTaskStatus(ReviewResultEnum.TO_BE_CONFIRMED.getValue());
|
||||
projectTaskInventoryEO.setVerifyStatus(DesignComplianceStatusEnum.TO_SUBMIT.getValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
projectTaskInventoryEOAddList.add(projectTaskInventoryEO);
|
||||
});
|
||||
this.projectTaskInventoryEOService.saveBatch(projectTaskInventoryEOAddList);
|
||||
}
|
||||
return new Result<>().success("处理任务清单历史数据成功!");
|
||||
}
|
||||
|
||||
public void setSheetStyle(HSSFSheet sheet){
|
||||
for (int i = 0; i <= 19; i++){
|
||||
sheet.setColumnWidth(i,4000);
|
||||
|
||||
+264
-95
@@ -1,8 +1,14 @@
|
||||
package com.jero.modules.project.service.impl;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.jero.common.constant.enums.MessageType2Enum;
|
||||
import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.common.constant.enums.MsgColorEnum;
|
||||
import com.jero.common.system.vo.LoginUser;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.IBussDocumentLibraryEOService;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.project.entity.*;
|
||||
import com.jero.modules.project.enums.FeedBackHistoryDataStatusEnum;
|
||||
@@ -24,6 +30,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.*;
|
||||
import java.util.stream.Collectors;
|
||||
@@ -63,6 +70,12 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
@Value(value = "${jero.backUrl}")
|
||||
private String backUrl;
|
||||
|
||||
@Autowired
|
||||
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||
@Autowired
|
||||
private IFeishuService feishuService;
|
||||
|
||||
|
||||
/**
|
||||
* 保存
|
||||
*
|
||||
@@ -150,56 +163,108 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
ProjectYearNameInfoEO projectYearNameInfoEO = this.projectYearNameInfoEOService.getOne(projectYearInfoEOQueryWrapper);
|
||||
|
||||
// 飞书消息封装
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
|
||||
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.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
|
||||
//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.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
|
||||
|
||||
MessageTypeEnum messageTypeEnum = null;
|
||||
//MessageTypeEnum messageTypeEnum = null;
|
||||
|
||||
//消息内容
|
||||
String msgContentEN = "";
|
||||
//String msgContentEN = "";
|
||||
String msgTitle = "";
|
||||
String initiatorId = "";
|
||||
//String initiatorId = "";
|
||||
|
||||
String cnContentUpper = "";//中文上部分
|
||||
String cnContentLower = "";//中文下部分
|
||||
String enContentUpper = "";//英文上部分
|
||||
String enContentLower = "";//英文下部分
|
||||
|
||||
//项目名称
|
||||
String projectVersion = (com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBaseInfo.getParentId()) && com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBaseInfo.getProjectVersion())) ? "00" : projectLibraryBaseInfo.getProjectVersion();
|
||||
String projectName = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + "-" + projectLibraryBaseInfo.getTargetMarket() + "-" + projectVersion;
|
||||
//法规中英文
|
||||
String LAW_CN = projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle();//法规
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
String LAW_EN = projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn();//法规
|
||||
|
||||
String flowType = projectTaskInventoryFeedbackEO.getFlowType();
|
||||
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||
msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + " for design compliance confirmation. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
//msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
// + projectNameInfoEO.getProjectName() + " for design compliance confirmation. Please check and address it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
// + ": You have a design compliance task to complete";
|
||||
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||
initiatorId = projectLawsInventoryEO.getDesignInitiatorId();
|
||||
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
//feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||
//initiatorId = projectLawsInventoryEO.getDesignInitiatorId();
|
||||
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
|
||||
msgTitle = MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"回复了您提交的工程交付信息,请及时查看处理";
|
||||
cnContentLower = "项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getDesignDueDate());
|
||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has replied to your engineering deliverable information. Please check and address the task in a timely manner";
|
||||
enContentLower = "Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getDesignDueDate());
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||
msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + " for Pre-Homo compliance confirmation. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
//msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
// + projectNameInfoEO.getProjectName() + " for Pre-Homo compliance confirmation. Please check and address it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
// + ": You have a Pre-Homo task to complete";
|
||||
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
|
||||
initiatorId = projectLawsInventoryEO.getPrehomoInitiatorId();
|
||||
//feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
//feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
|
||||
//initiatorId = projectLawsInventoryEO.getPrehomoInitiatorId();
|
||||
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
|
||||
msgTitle = MessageType2Enum.PRE_HOMO_CONFIRMATION.getCn() + "/" + MessageType2Enum.PRE_HOMO_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"回复了您提交的工程交付信息,请及时查看处理";
|
||||
cnContentLower = "项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getPrehomoDueDate());
|
||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has replied to your engineering deliverable information. Please check and address the task in a timely manner";
|
||||
enContentLower = "Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getPrehomoDueDate());
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||
msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
//msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
// + projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
// + ": You have a validation compliance task to complete";
|
||||
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
|
||||
initiatorId = projectLawsInventoryEO.getVerifyInitiatorId();
|
||||
//feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
//feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
|
||||
//initiatorId = projectLawsInventoryEO.getVerifyInitiatorId();
|
||||
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
|
||||
msgTitle = MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"回复了您提交的工程交付信息,请及时查看处理";
|
||||
cnContentLower = "项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has replied to your engineering deliverable information. Please check and address the task in a timely manner";
|
||||
enContentLower = "Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}
|
||||
|
||||
//飞书跳转链接
|
||||
@@ -209,28 +274,47 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket();
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
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();
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
feishuMsgVo.setInitiator(initiator);
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper(cnContentUpper);
|
||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
||||
feishuMsgVo.setEnContentUpper(enContentUpper);
|
||||
feishuMsgVo.setEnContentLower(enContentLower);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
//系统内部跳转链接
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
// + projectYearNameInfoEO.getYearName()
|
||||
// + "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//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());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -286,6 +370,9 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
List<ProjectTaskInventoryFeedbackEO> projectTaskInventoryFeedbackEOS = this.baseMapper.selectList(queryWrapper);
|
||||
if(CollectionUtils.isNotEmpty(projectTaskInventoryFeedbackEOS)){
|
||||
List<String> idList = projectTaskInventoryFeedbackEOS.stream().distinct().map(ProjectTaskInventoryFeedbackEO::getProjectTaskInventoryId).collect(Collectors.toList());
|
||||
List<String> userNameList = projectTaskInventoryFeedbackEOS.stream().distinct().map(ProjectTaskInventoryFeedbackEO::getCreateBy).collect(Collectors.toList());
|
||||
List<SysUser> userList = this.sysUserService.queryUserIdListByNameList(userNameList);
|
||||
|
||||
QueryWrapper<ProjectTaskInventoryDetailEO> inventoryDetailEOQueryWrapper = new QueryWrapper<>();
|
||||
inventoryDetailEOQueryWrapper.lambda().in(ProjectTaskInventoryDetailEO::getId,idList);
|
||||
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOList = projectTaskInventoryDetailEOMapper.selectList(inventoryDetailEOQueryWrapper);
|
||||
@@ -302,6 +389,18 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
if(CollectionUtils.isNotEmpty(projectTaskInventoryDetailList)){
|
||||
projectTaskInventoryFeedbackEO.setStatus(projectTaskInventoryDetailList.get(0).getStatus());
|
||||
}
|
||||
if(CollectionUtils.isNotEmpty(userList)){
|
||||
List<SysUser> userListTemp = userList.stream().filter(user -> {
|
||||
boolean flag = false;
|
||||
if(StringUtils.equals(projectTaskInventoryFeedbackEO.getCreateBy(),user.getUsername())){
|
||||
flag = true;
|
||||
}
|
||||
return flag;
|
||||
}).collect(Collectors.toList());
|
||||
if(CollectionUtils.isNotEmpty(userListTemp)){
|
||||
projectTaskInventoryFeedbackEO.setUserId(userListTemp.get(0).getId());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return projectTaskInventoryFeedbackEOS;
|
||||
@@ -372,11 +471,11 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
}
|
||||
|
||||
// 飞书消息封装
|
||||
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.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
|
||||
//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.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
|
||||
|
||||
String initiator = "";
|
||||
if (StringUtils.isNotEmpty(initiatorId)) {
|
||||
@@ -385,48 +484,99 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
SysUser sysUser = this.sysUserService.getBaseMapper().selectOne(queryOneWrapper);
|
||||
initiator = sysUser.getUsername();
|
||||
}
|
||||
feishuMsgVo.setInitiator(initiator);
|
||||
//feishuMsgVo.setInitiator(initiator);
|
||||
|
||||
MessageTypeEnum messageTypeEnum = null;
|
||||
//MessageTypeEnum messageTypeEnum = null;
|
||||
|
||||
//消息内容
|
||||
String msgContentEN = "";
|
||||
//String msgContentEN = "";
|
||||
String msgTitle = "";
|
||||
String cnContentUpper = "";//中文上部分
|
||||
String cnContentLower = "";//中文下部分
|
||||
String enContentUpper = "";//英文上部分
|
||||
String enContentLower = "";//英文下部分
|
||||
|
||||
//项目名称
|
||||
String projectVersion = (com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBaseInfo.getParentId()) && com.jero.modules.system.util.StringUtils.isBlank(projectLibraryBaseInfo.getProjectVersion())) ? "00" : projectLibraryBaseInfo.getProjectVersion();
|
||||
String projectName = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + "-" + projectLibraryBaseInfo.getTargetMarket() + "-" + projectVersion;
|
||||
//法规中英文
|
||||
String LAW_CN = projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle();//法规
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||
String LAW_EN = projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn();//法规
|
||||
|
||||
String flowType = projectTaskInventoryFeedbackEO.getFlowType();
|
||||
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||
msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + "for design compliance confirmation. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ ": You have a design compliance task to complete";
|
||||
//msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
// + projectNameInfoEO.getProjectName() + "for design compliance confirmation. Please check and address it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
// + ": You have a design compliance task to complete";
|
||||
|
||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||
//feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
|
||||
msgTitle = MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,"+ initiator +"向您提交了工程交付信息,请及时查看处理";
|
||||
cnContentLower = "项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getDesignDueDate());
|
||||
enContentUpper = "Hello! "+ initiator +" has submitted the engineering deliverable information to you. Please check and address the task in a timely manner";
|
||||
enContentLower = "Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getDesignDueDate());
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||
msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + " for Pre-Homo confirmation. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ ": You have a Pre-Homo task to complete";
|
||||
//msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
// + projectNameInfoEO.getProjectName() + " for Pre-Homo confirmation. Please check and address it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
// + ": You have a Pre-Homo task to complete";
|
||||
|
||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
|
||||
//feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||
//feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
|
||||
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
|
||||
msgTitle = MessageType2Enum.PRE_HOMO_CONFIRMATION.getCn() + "/" + MessageType2Enum.PRE_HOMO_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,"+ initiator +"向您提交了工程交付信息,请及时查看处理";
|
||||
cnContentLower = "项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getPrehomoDueDate());
|
||||
enContentUpper = "Hello! "+ initiator +" has submitted the engineering deliverable information to you. Please check and address the task in a timely manner";
|
||||
enContentLower = "Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getPrehomoDueDate());
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||
msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
|
||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
+ projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
|
||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ ": You have a validation compliance task to complete";
|
||||
//msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
|
||||
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||
// + projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
|
||||
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||
// + ": You have a validation compliance task to complete";
|
||||
|
||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
|
||||
//feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||
//feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
|
||||
|
||||
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
|
||||
msgTitle = MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getEn();
|
||||
cnContentUpper = "您好,"+ initiator +"向您提交了工程交付信息,请及时查看处理";
|
||||
cnContentLower = "项目: " + projectName +
|
||||
"\n法规: " + LAW_CN +
|
||||
"\n发起人: " + currentUser.getUsername() +
|
||||
"\n截止时间: " + sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
||||
enContentUpper = "Hello! "+ initiator +" has submitted the engineering deliverable information to you. Please check and address the task in a timely manner";
|
||||
enContentLower = "Project: " + projectName +
|
||||
"\nRegulation No: " + LAW_EN +
|
||||
"\nInitiator: " + currentUser.getUsername() +
|
||||
"\nDue Date: " + sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
||||
|
||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||
}
|
||||
|
||||
//飞书跳转链接
|
||||
@@ -436,20 +586,39 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket();
|
||||
|
||||
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||
List<String> thirdIdList = new ArrayList<>();
|
||||
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||
}
|
||||
try {
|
||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||
feishuMsgVo.setTitle(msgTitle);
|
||||
feishuMsgVo.setCnContentUpper(cnContentUpper);
|
||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
||||
feishuMsgVo.setEnContentUpper(enContentUpper);
|
||||
feishuMsgVo.setEnContentLower(enContentLower);
|
||||
feishuMsgVo.setUrl(hrefFeishu);
|
||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||
feishuService.sendCard(thirdIdList.toArray(new String[thirdIdList.size()]), feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
log.error("飞书消息推送失败");
|
||||
}
|
||||
//系统内部跳转链接
|
||||
String href = "<a href='"
|
||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
+ projectYearNameInfoEO.getYearName()
|
||||
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket()
|
||||
+ "'>" + " View details" + "</a>";
|
||||
String contentInfo = msgContentEN + " " + href;
|
||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
sendMessageMap.put("contentInfo",contentInfo);
|
||||
//String href = "<a href='"
|
||||
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||
// + projectYearNameInfoEO.getYearName()
|
||||
// + "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket()
|
||||
// + "'>" + " View details" + "</a>";
|
||||
//String contentInfo = msgContentEN + " " + href;
|
||||
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||
//sendMessageMap.put("contentInfo",contentInfo);
|
||||
|
||||
//发送消息
|
||||
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());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+2
-2
@@ -137,8 +137,8 @@ public class NcrTrackVO implements Serializable {
|
||||
private String projectTaskInventoryDetailId;
|
||||
//任务节点定义key
|
||||
private String taskDefinitionKey;
|
||||
|
||||
|
||||
//是否是系统管理员角色
|
||||
private String administrator;
|
||||
|
||||
|
||||
|
||||
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.jero.modules.project.vo;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
|
||||
@Data
|
||||
public class ProjectTaskUrgVo {
|
||||
|
||||
private String cut;
|
||||
|
||||
private String projectLawsInventoryIds;
|
||||
|
||||
private String type;
|
||||
|
||||
}
|
||||
+15
-13
@@ -257,7 +257,7 @@
|
||||
from
|
||||
process_info_detail detail
|
||||
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId}
|
||||
<if test="params.queryType == 'todoProcess'">
|
||||
<if test="params.taskStatus != null and params.taskStatus != ''">
|
||||
and detail.`status` = #{params.taskStatus}
|
||||
</if>
|
||||
order by detail.submit_time desc
|
||||
@@ -269,7 +269,7 @@
|
||||
from
|
||||
process_info_detail detail
|
||||
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId}
|
||||
<if test="params.queryType == 'todoProcess'">
|
||||
<if test="params.taskStatus != null and params.taskStatus != ''">
|
||||
and detail.`status` = #{params.taskStatus}
|
||||
</if>
|
||||
order by detail.submit_time desc
|
||||
@@ -287,20 +287,22 @@
|
||||
<foreach collection="params.flowTypeList" index="index" item="item" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
and (
|
||||
pi.id IN (
|
||||
SELECT
|
||||
pid.process_info_id
|
||||
FROM
|
||||
process_info_detail pid
|
||||
where pid.user_id = #{params.currentUserId}
|
||||
<if test="params.taskStatus != null and params.taskStatus != ''">
|
||||
and pid.status = #{params.taskStatus}
|
||||
</if>
|
||||
)
|
||||
)
|
||||
<if test="params.queryType == 'issuedProcess'">
|
||||
and pi.create_by = #{params.createBy}
|
||||
</if>
|
||||
<if test="params.queryType != 'issuedProcess'">
|
||||
and (
|
||||
pi.id IN (
|
||||
SELECT
|
||||
pid.process_info_id
|
||||
FROM
|
||||
process_info_detail pid
|
||||
where pid.user_id = #{params.currentUserId} and pid.status = #{params.taskStatus}
|
||||
)
|
||||
)
|
||||
</if>
|
||||
|
||||
</where>
|
||||
) temp
|
||||
<include refid="BaseQuerySql"/>
|
||||
|
||||
+6
-3
@@ -152,7 +152,8 @@ public class ParamsManifestTodoCenterServiceImpl implements IParamsManifestTodoC
|
||||
List<ParamsCollectManifestEO> pcmList = paramsManifestEOListMap.get(paramsManifestTodoCenterEO.getId());
|
||||
int count = 0;
|
||||
|
||||
if (ObjectUtil.isNotEmpty(paramsManifestTodoCenterEO.getId()) && manifestUserTypeOfHomo.get(paramsManifestTodoCenterEO.getId())) {
|
||||
if (ObjectUtil.isNotEmpty(paramsManifestTodoCenterEO.getId())
|
||||
&& ObjectUtil.isNotEmpty(manifestUserTypeOfHomo.get(paramsManifestTodoCenterEO.getId()))) {
|
||||
// 统计待发起数量 包括状态:待发起收集,变更,工程接口人退回
|
||||
count = (int) pcmList.stream().filter(e-> CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.getState())
|
||||
|| CollectManifestStateEnum.SDT_BACK.getValue().equals(e.getState())
|
||||
@@ -172,7 +173,8 @@ public class ParamsManifestTodoCenterServiceImpl implements IParamsManifestTodoC
|
||||
if (count > 0) {
|
||||
paramsManifestTodoCenterEO.setWaitFillNum(count);
|
||||
}
|
||||
} else if (ObjectUtil.isNotEmpty(paramsManifestTodoCenterEO.getId()) && manifestUserTypeOfSdt.get(paramsManifestTodoCenterEO.getId())) {
|
||||
} else if (ObjectUtil.isNotEmpty(paramsManifestTodoCenterEO.getId())
|
||||
&& ObjectUtil.isNotEmpty(manifestUserTypeOfSdt.get(paramsManifestTodoCenterEO.getId()))) {
|
||||
// 统计待分配数量 包括状态:待工程接口人处理,填写人退回
|
||||
count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_SDT.getValue().equals(e.getState())
|
||||
|| CollectManifestStateEnum.DRE_BACK.getValue().equals(e.getState()))
|
||||
@@ -187,7 +189,8 @@ public class ParamsManifestTodoCenterServiceImpl implements IParamsManifestTodoC
|
||||
paramsManifestTodoCenterEO.setWaitFillNum(count);
|
||||
}
|
||||
|
||||
} else if (ObjectUtil.isNotEmpty(paramsManifestTodoCenterEO.getId()) && manifestUserTypeOfDre.get(paramsManifestTodoCenterEO.getId())) {
|
||||
} else if (ObjectUtil.isNotEmpty(paramsManifestTodoCenterEO.getId())
|
||||
&& ObjectUtil.isNotEmpty(manifestUserTypeOfDre.get(paramsManifestTodoCenterEO.getId()))) {
|
||||
// 统计待填写数量 包括状态:待填写,认证工程师退回
|
||||
count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_FILL.getValue().equals(e.getState())
|
||||
|| CollectManifestStateEnum.CERT_BACK.getValue().equals(e.getState()))
|
||||
|
||||
+1
@@ -375,6 +375,7 @@ public class ProcessInfoEOServiceImpl extends ServiceImpl<ProcessInfoEOMapper, P
|
||||
flowTypeList.add(FlowTypeEnum.FGJSPG.getValue());
|
||||
params.put("flowTypeList",flowTypeList);
|
||||
params.put("currentUserId",currentUser.getId());
|
||||
params.put("taskStatus", TaskStatusEnum.HAVE_DONE.getValue());
|
||||
|
||||
IPage page = new Page(pageNo, pageSize);
|
||||
IPage<ProcessInfoVO> result = this.baseMapper.queryLawsAssessPageList(page,params);
|
||||
|
||||
+45
-14
@@ -373,7 +373,7 @@ public class LawsWarnService {
|
||||
thirdIdList.addAll(thirdId);
|
||||
}
|
||||
}
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
//查询文档
|
||||
List<Map<String, Object>> mapList = bussDocumentLibraryEOMapper.selectMapsAll(documentIds);
|
||||
List<String> serialNumberList = new ArrayList<>();
|
||||
@@ -409,21 +409,52 @@ public class LawsWarnService {
|
||||
"&serial_number=" + map.get("serial_number") + "'" + " target='_blank'>" + map.get("serial_number") + "</a>";
|
||||
urlList.add(url);
|
||||
hrefList.add(href+timeContent);
|
||||
|
||||
//推送多条时, 每条单独发消息
|
||||
//编号, 标题, 新车型实施日期, 在产车实施日期
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
String serialNumber = StringUtils.valueOf(map.get("serial_number"));
|
||||
String titleCn = StringUtils.valueOf(map.get("title"));
|
||||
String titleEn = StringUtils.valueOf(map.get("title_en"));
|
||||
String newType = "";
|
||||
if(ObjectUtils.isNotEmpty(map.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"))){
|
||||
newType = sdf.format(map.get("xin1_che1_xing2_shi2_shi1_ri4_qi1"));
|
||||
}
|
||||
String newVehicle = "";
|
||||
if(ObjectUtils.isNotEmpty(map.get("implement_time"))){
|
||||
newVehicle = sdf.format(map.get("implement_time"));
|
||||
}
|
||||
//消息-英文
|
||||
String contentNo = sysUser.getUsername() +" shared Regulation Early Warning infomation with you, "
|
||||
+"Regulation No: "+serialNumber+",Title: "+titleEn+",New Type Execution Date: "+newType+",New Vehicle Execution Date: "+newVehicle;
|
||||
String contentInfoYes = sysUser.getUsername() +" shared Regulation Early Warning infomation with you, "+"</br>"
|
||||
+"Regulation No: "+href+"</br>"
|
||||
+"Title: "+titleEn+"</br>"
|
||||
+"New Type Execution Date: "+newType+"</br>"
|
||||
+"New Vehicle Execution Date: "+newVehicle;
|
||||
|
||||
|
||||
//消息中文
|
||||
String contentCnNo = sysUser.getUsername() +"向您分享了法规预警信息, "+"编号: "+serialNumber+",标题: "+titleCn+",新车型实施日期: "+newType+",在产车实施日期: "+newVehicle;
|
||||
String contentInfoCnYes = sysUser.getUsername() +"向您分享了法规预警信息,"+"</br>"
|
||||
+"编号: "+href+"</br>"
|
||||
+"标题: "+titleCn+"</br>"
|
||||
+"新车型实施日期: "+newType+"</br>"
|
||||
+"在产车实施日期: "+newVehicle;
|
||||
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
|
||||
null,
|
||||
contentNo,
|
||||
contentInfoYes,
|
||||
MessageTypeEnum.PUSH.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
contentCnNo,contentInfoCnYes);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfoCnYes);
|
||||
}
|
||||
|
||||
|
||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||
String content = StringUtils.join(serialNumberList, ",") + " has been shared with you, please check.";
|
||||
//消息详情模板
|
||||
// XXX has pushed GB 7258 to you as the implementation date of vehicle production is XXXX-XX-XX,
|
||||
// GB 7258 to you as the implementation date of vehicle production is XXXX-XX-XX, Please be reminded to check it out.
|
||||
String contentInfo = sysUser.getUsername() + " has pushed " + StringUtils.join(hrefList, ",") + ", Please be reminded to check it out.";
|
||||
String title = content;
|
||||
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.PUSH.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||
//飞书
|
||||
try {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
@@ -467,7 +498,7 @@ public class LawsWarnService {
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
bussDocumentLibraryEOService.sendWebsocket(documentIds, contentInfo);
|
||||
bussDocumentLibraryEOService.sendWebsocket(documentIds, documentIds);
|
||||
return "推送成功";
|
||||
}
|
||||
|
||||
|
||||
+175
-18
@@ -4,6 +4,7 @@ import com.jero.common.constant.enums.MessageTypeEnum;
|
||||
import com.jero.modules.document.entity.BussDocumentLibraryEO;
|
||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||
import com.jero.modules.feishu.service.IFeishuService;
|
||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||
import com.jero.modules.subscribe.entity.OnlCgformSubscribe;
|
||||
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
|
||||
import com.jero.modules.system.entity.SysAnnouncement;
|
||||
@@ -123,15 +124,33 @@ public class TimedTaskWarn implements Job {
|
||||
//当前时间的前12个月
|
||||
String beforeTimeSixTen = beforeTime(12,xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
|
||||
if(currentTime.equals(beforeTimeSix) || currentTime.equals(beforeTimeSixTen) || currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str)){
|
||||
//发送站内消息和飞书消息
|
||||
String format = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
String content = "The implementation date of the " + category +" "+ serialNumber
|
||||
+ " new model you subscribed to is "+format+",please pay attention to check";
|
||||
String contentInfo = "The implementation date of the " + category +" "+ href
|
||||
+ " new model you subscribed to is "+format+",please pay attention to check";
|
||||
String msgTitle = content;
|
||||
sendMessage(msgTitle, content,contentInfo,content, url, userIdList, thirdIdList);
|
||||
// if(currentTime.equals(beforeTimeSix) || currentTime.equals(beforeTimeSixTen) || currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str)){
|
||||
// //发送站内消息和飞书消息
|
||||
// String format = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
// String content = "The implementation date of the " + category +" "+ serialNumber
|
||||
// + " new model you subscribed to is "+format+",please pay attention to check";
|
||||
// String contentInfo = "The implementation date of the " + category +" "+ href
|
||||
// + " new model you subscribed to is "+format+",please pay attention to check";
|
||||
// String msgTitle = content;
|
||||
// sendMessage(msgTitle, content,contentInfo,content, url, userIdList, thirdIdList);
|
||||
// }
|
||||
if(currentTime.equals(beforeTimeSixTen)){
|
||||
//发送飞书消息(提前一年)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1");
|
||||
//站内消息
|
||||
sendMessage(bussDocumentLibraryEO, userIdList,"1",sdf,href);
|
||||
}
|
||||
if(currentTime.equals(beforeTimeSix)){
|
||||
//发送飞书消息(提前6个月)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6");
|
||||
//站内消息
|
||||
sendMessage(bussDocumentLibraryEO, userIdList,"6",sdf,href);
|
||||
}
|
||||
if(currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str)){
|
||||
//发送飞书消息(当天)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0");
|
||||
//站内消息
|
||||
sendMessage(bussDocumentLibraryEO, userIdList,"0",sdf,href);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -152,27 +171,165 @@ public class TimedTaskWarn implements Job {
|
||||
String contentInfo = "The implementation date of the " + category +" "+ href
|
||||
+ " production vehicle you subscribed to is "+format+",please pay attention to check";
|
||||
String msgTitle = content;
|
||||
sendMessage(msgTitle, content,contentInfo,content, url, userIdList, thirdIdList);
|
||||
// sendMessage(msgTitle, content,contentInfo,content, url, userIdList, thirdIdList);
|
||||
}
|
||||
if(currentTime.equals(beforeTimeSixTen)){
|
||||
//发送飞书消息(提前一年)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"1");
|
||||
//站内消息
|
||||
sendMessage(bussDocumentLibraryEO, userIdList,"1",sdf,href);
|
||||
}
|
||||
if(currentTime.equals(beforeTimeSix)){
|
||||
//发送飞书消息(提前6个月)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"6");
|
||||
//站内消息
|
||||
sendMessage(bussDocumentLibraryEO, userIdList,"6",sdf,href);
|
||||
}
|
||||
if(currentTime.equals(implementTimeStr)){
|
||||
//发送飞书消息(当天)
|
||||
sendFeishu(sdf, bussDocumentLibraryEO, url, thirdIdList,"0");
|
||||
//站内消息
|
||||
sendMessage(bussDocumentLibraryEO, userIdList,"0",sdf,href);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void sendMessage(String title, String content,String contentInfo,String contentFeiShu, String url, List<String> userIdList, List<String> thirdIdList) {
|
||||
//站内消息
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.WARN.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(userIdList, ","), content);
|
||||
private void sendFeishu(SimpleDateFormat sdf,
|
||||
BussDocumentLibraryEO bussDocumentLibraryEO,
|
||||
String url,
|
||||
List<String> thirdIdList,
|
||||
String flag) {
|
||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||
feishuMsgVo.setTitle(MessageTypeEnum.WARN.getNameCn()+"/"+MessageTypeEnum.WARN.getName());
|
||||
feishuMsgVo.setUrl(url);
|
||||
String contentCn = "";
|
||||
String contentEn = "";
|
||||
if("1".equals(flag)){
|
||||
contentCn = "您所订阅的法规将于1年后实施.";
|
||||
contentEn = "The regulation you subscribed to will be implemented in one year.";
|
||||
}
|
||||
if("6".equals(flag)){
|
||||
contentCn = "您所订阅的法规将于6个月后实施.";
|
||||
contentEn = "The regulation you subscribed to will be implemented in six months.";
|
||||
}
|
||||
if("0".equals(flag)){
|
||||
contentCn = "您所订阅的法规已实施.";
|
||||
contentEn = "The regulation you subscribed to is implemented.";
|
||||
}
|
||||
feishuMsgVo.setContent(contentCn);
|
||||
feishuMsgVo.setContentEn(contentEn);
|
||||
feishuMsgVo.setRegulationNo(bussDocumentLibraryEO.getSerialNumber());
|
||||
feishuMsgVo.setDocumentTitleCn(bussDocumentLibraryEO.getTitle());
|
||||
feishuMsgVo.setDocumentTitleEn(bussDocumentLibraryEO.getTitleEn());
|
||||
if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1())){
|
||||
feishuMsgVo.setNewTypeExecutionDate(sdf.format(bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1()));
|
||||
}
|
||||
if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO.getImplementTime())){
|
||||
feishuMsgVo.setNewVehicleExecutionDate(sdf.format(bussDocumentLibraryEO.getImplementTime()));
|
||||
}
|
||||
|
||||
//飞书消息
|
||||
try {
|
||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentFeiShu, MessageTypeEnum.WARN.getName(), url);
|
||||
iFeishuService.sendCardMsgWarn(thirdIdList.toArray(new String[]{}),feishuMsgVo);
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
|
||||
// private void sendMessage(String title, String content,String contentInfo,String contentFeiShu, String url, List<String> userIdList, List<String> thirdIdList) {
|
||||
// //站内消息
|
||||
// //封装消息的实体类
|
||||
// SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
|
||||
// title,
|
||||
// content,
|
||||
// contentInfo,
|
||||
// MessageTypeEnum.WARN.getValue(),
|
||||
// MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
// null,null);
|
||||
// sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
// bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(userIdList, ","), content);
|
||||
//
|
||||
//// //飞书消息
|
||||
//// try {
|
||||
//// iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentFeiShu, MessageTypeEnum.WARN.getName(), url);
|
||||
//// } catch (IOException e) {
|
||||
//// e.printStackTrace();
|
||||
//// }
|
||||
// }
|
||||
private void sendMessage(BussDocumentLibraryEO bussDocumentLibraryEO,
|
||||
List<String> userIdList,
|
||||
String flag,
|
||||
SimpleDateFormat sdf,
|
||||
String href) {
|
||||
String number = bussDocumentLibraryEO.getSerialNumber();
|
||||
String title = bussDocumentLibraryEO.getTitle();
|
||||
String titleEn = bussDocumentLibraryEO.getTitleEn();
|
||||
Date xin1Che1Xing2Shi2Shi1Ri4Qi1 = bussDocumentLibraryEO.getXin1Che1Xing2Shi2Shi1Ri4Qi1();
|
||||
Date implementTime = bussDocumentLibraryEO.getImplementTime();
|
||||
String newType = "";
|
||||
String newVehicle = "";
|
||||
if(ObjectUtils.isNotEmpty(xin1Che1Xing2Shi2Shi1Ri4Qi1)){
|
||||
newType = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||
}
|
||||
if(ObjectUtils.isNotEmpty(implementTime)){
|
||||
newVehicle = sdf.format(implementTime);
|
||||
}
|
||||
String contentCn = "";
|
||||
String contentInfoCn = "";
|
||||
String contentEn = "";
|
||||
String contentInfoEn = "";
|
||||
//"</br>"
|
||||
|
||||
contentCn = ",编号: "+number
|
||||
+",标题: "+title
|
||||
+",新车型实施日期: "+newType
|
||||
+",在产车实施日期: "+newVehicle;
|
||||
contentInfoCn = "编号: "+href+"</br>"
|
||||
+"标题: "+title+"</br>"
|
||||
+"新车型实施日期: "+newType+"</br>"
|
||||
+"在产车实施日期: "+newVehicle;
|
||||
|
||||
contentEn = ",Regulation No: "+number
|
||||
+",Title: "+titleEn
|
||||
+",New Type Execution Date: "+newType
|
||||
+",New Vehicle Execution Date: "+newVehicle;
|
||||
|
||||
contentInfoEn = "Regulation No: "+href+"</br>"
|
||||
+"Title: "+titleEn+"</br>"
|
||||
+"New Type Execution Date: "+newType+"</br>"
|
||||
+"New Vehicle Execution Date: "+newVehicle;
|
||||
|
||||
if("1".equals(flag)){
|
||||
contentCn = "您所订阅的法规将于1年后实施"+contentCn;
|
||||
contentInfoCn = "您所订阅的法规将于1年后实施"+"</br>"+contentInfoCn;
|
||||
contentEn = "The regulation you subscribed to will be implemented in one year"+contentEn;
|
||||
contentInfoEn = "The regulation you subscribed to will be implemented in one year"+"</br>"+contentInfoEn;
|
||||
}
|
||||
if("6".equals(flag)){
|
||||
contentCn = "您所订阅的法规将于6个月后实施"+contentCn;
|
||||
contentInfoCn = "您所订阅的法规将于6个月后实施"+"</br>"+contentInfoCn;
|
||||
contentEn = "The regulation you subscribed to will be implemented in six months"+contentEn;
|
||||
contentInfoEn = "The regulation you subscribed to will be implemented in six months"+"</br>"+contentInfoEn;
|
||||
}
|
||||
if("0".equals(flag)){
|
||||
contentCn = "您所订阅的法规已实施"+contentCn;
|
||||
contentInfoCn = "您所订阅的法规已实施"+"</br>"+contentInfoCn;
|
||||
contentEn = "The regulation you subscribed to is implemented"+contentEn;
|
||||
contentInfoEn = "The regulation you subscribed to is implemented"+"</br>"+contentInfoEn;
|
||||
}
|
||||
|
||||
//封装消息的实体类
|
||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList,
|
||||
title,
|
||||
contentEn,
|
||||
contentInfoEn,
|
||||
MessageTypeEnum.WARN.getValue(),
|
||||
MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName(),
|
||||
contentCn,contentInfoCn);
|
||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(userIdList, ","), contentInfoEn);
|
||||
}
|
||||
|
||||
private String beforeTime (int month,Date date){
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||
Calendar calendarBefore = Calendar.getInstance();
|
||||
|
||||
@@ -35,6 +35,7 @@ public class BusMes {
|
||||
private String handlingTime; // 待办流程-批量办理专用
|
||||
private String projectLawsInventoryIds; // 待办流程-批量办理专用
|
||||
private String taskDefinitionKey; // 待办流程-批量办理专用
|
||||
private String cut;//中英文切换标识
|
||||
|
||||
|
||||
public String getUserId() {
|
||||
@@ -193,4 +194,12 @@ public class BusMes {
|
||||
public void setTaskDefinitionKey(String taskDefinitionKey) {
|
||||
this.taskDefinitionKey = taskDefinitionKey;
|
||||
}
|
||||
|
||||
public String getCut() {
|
||||
return cut;
|
||||
}
|
||||
|
||||
public void setCut(String cut) {
|
||||
this.cut = cut;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1360,4 +1360,5 @@ module.exports = {
|
||||
cancelTopping:'Cancel Topping',
|
||||
relatedProjectVersion:'Related project version',
|
||||
Importfailure:'Import failure',
|
||||
CuiBan:'CuiBan',
|
||||
}
|
||||
@@ -1461,4 +1461,5 @@ module.exports = {
|
||||
cancelTopping:'取消置顶',
|
||||
relatedProjectVersion:'相关项目版本',
|
||||
Importfailure:'导入失败',
|
||||
CuiBan:'催办',
|
||||
}
|
||||
@@ -21,11 +21,11 @@
|
||||
<!-- <span v-if="ol.text==$t('check')">-->
|
||||
<!-- {{record.resultContent=='转换成功'&&record.syncState=='未同步'?ol.text:''}}-->
|
||||
<!-- </span>-->
|
||||
<span v-if="ol.text==$t('download') && record.createBy == userData.username"
|
||||
<span v-if="ol.text==$t('download') && (record.createBy == userData.username || administrators)"
|
||||
v-has="'ocr:ocrRestful:downFile'">
|
||||
{{record.resultContent=='转换成功'?ol.text:''}}
|
||||
</span>
|
||||
<span v-if="ol.text==$t('delete') && record.createBy == userData.username" v-has="'ocr:ocrRecord:delete'">
|
||||
<span v-if="ol.text==$t('delete') && (record.createBy == userData.username || administrators)" v-has="'ocr:ocrRecord:delete'">
|
||||
{{ol.text}}
|
||||
</span>
|
||||
</a>
|
||||
@@ -105,7 +105,8 @@
|
||||
searchParmes: {},
|
||||
loading: false,
|
||||
orderBy: '1',
|
||||
orderByField: ''
|
||||
orderByField: '',
|
||||
administrators:false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -131,6 +132,14 @@
|
||||
this.getData()
|
||||
this.getTableList()
|
||||
this.userData = this.userInfo()
|
||||
this.administrators = false
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
beforeDestroy(){
|
||||
eventBUs.$off('searchQuery')
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<!-- <span class="text">-->
|
||||
<!-- {{ol.text}}-->
|
||||
<!-- </span>-->
|
||||
<span v-if="ol.text==$t('backDocument')&&record.flag==0 && record.createBy == userData.username"
|
||||
<span v-if="ol.text==$t('backDocument') && record.flag==0 && (record.createBy == userData.username || administrators)"
|
||||
class="text"
|
||||
v-has="'split:sarFileSplitInfo:bind'">
|
||||
{{ol.text}}
|
||||
@@ -27,7 +27,7 @@
|
||||
v-has="'split:sarFileSplitItems:page'">
|
||||
{{ol.text}}
|
||||
</span>
|
||||
<span v-if="ol.text==$t('delete') && record.createBy == userData.username"
|
||||
<span v-if="ol.text==$t('delete') && (record.createBy == userData.username || administrators)"
|
||||
v-has="'split:sarFileSplitInfo:delete'">
|
||||
{{ol.text}}
|
||||
</span>
|
||||
@@ -109,7 +109,8 @@
|
||||
loading: false,
|
||||
orderBy: '1',
|
||||
userData: {},
|
||||
orderByField: ''
|
||||
orderByField: '',
|
||||
administrators:false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
@@ -141,6 +142,14 @@
|
||||
this.getData()
|
||||
this.getTableList()
|
||||
this.userData = this.userInfo()
|
||||
this.administrators = false
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
beforeDestroy() {
|
||||
eventBUs.$off('searchQuery')
|
||||
|
||||
@@ -639,8 +639,7 @@
|
||||
}
|
||||
let params = {
|
||||
paramsManifestId: paramsManifestid,
|
||||
flag: '7',
|
||||
userType: userType
|
||||
flag: '7'
|
||||
}
|
||||
getAction(url, params).then((res) => {
|
||||
if (res.success) {
|
||||
|
||||
@@ -15,7 +15,10 @@
|
||||
<a-list-item :key="index" v-for="(record, index) in announcement1" v-if="index <= 4">
|
||||
<div style="margin-left: 5%;width: 80%;">
|
||||
<p style="overflow: hidden; text-overflow: ellipsis;white-space: nowrap;color:#00B3BE">
|
||||
<a :title="record.msgContent" @click="showAnnouncement(record)">{{ record.msgContent }}</a>
|
||||
<a :title="language == 'zh-cn'?record.msgContentCn:record.msgContent"
|
||||
@click="showAnnouncement(record)">
|
||||
{{ language == 'zh-cn'?record.msgContentCn:record.msgContent }}
|
||||
</a>
|
||||
</p>
|
||||
</div>
|
||||
</a-list-item>
|
||||
@@ -50,6 +53,7 @@
|
||||
data() {
|
||||
return {
|
||||
loadding: false,
|
||||
language: '',
|
||||
url: {
|
||||
listCementByUser: '/sys/sysAnnouncementSend/getMessageUnreadList',
|
||||
editCementSend: '/sys/sysAnnouncementSend/editByAnntIdAndUserId',
|
||||
@@ -91,6 +95,7 @@
|
||||
},
|
||||
created() {
|
||||
this.loadData()
|
||||
this.language = localStorage.getItem('language') || ''
|
||||
// this.initWebSocket()
|
||||
if (store.getters.userInfo) {
|
||||
this.$socketPublic.dispatch('webSocketInit')//初始化ws
|
||||
@@ -139,7 +144,11 @@
|
||||
showAnnouncement(record) {
|
||||
getAction(this.url.readAllMsg, { ids: record.id }).then((res) => {
|
||||
})
|
||||
localStorage.setItem('msgContent', record.msgContent)
|
||||
if (this.language == 'zh-cn') {
|
||||
localStorage.setItem('msgContent', record.msgContentCn)
|
||||
} else {
|
||||
localStorage.setItem('msgContent', record.msgContent)
|
||||
}
|
||||
this.$router.push({
|
||||
path: '/isps/userAnnouncement',
|
||||
query: {
|
||||
|
||||
+13
-9
@@ -32,10 +32,10 @@
|
||||
<div class="title-text">
|
||||
<span class="Required">*</span>
|
||||
<span class="title-text-text"
|
||||
:title="$t('problemClassification')">{{$t('problemClassification')}}</span>
|
||||
:title="$t('classification')">{{$t('classification')}}</span>
|
||||
</div>
|
||||
<a-form-model-item class="itemModel itemModel-multi" prop="problemType">
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('problemClassification')"
|
||||
<a-select :placeholder="$t('PleaseSelect')+$t('classification')"
|
||||
@change="problemTypeChange"
|
||||
mode="multiple"
|
||||
v-model="formInline.problemType">
|
||||
@@ -125,14 +125,16 @@
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
<a-button class="box-button-index"
|
||||
:title="$t('addStandardInformation')"
|
||||
type="primary" @click="bringInDocumentInformationClick">
|
||||
{{$t('addStandardInformation')}}
|
||||
</a-button>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
<a-col :span="8">
|
||||
<a-button class="box-button-index"
|
||||
:title="$t('addStandardInformation')"
|
||||
type="primary" @click="bringInDocumentInformationClick">
|
||||
{{$t('addStandardInformation')}}
|
||||
</a-button>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24" style="height: 380px">
|
||||
@@ -799,8 +801,9 @@
|
||||
width: 120px;
|
||||
overflow: hidden;
|
||||
padding: 0 0;
|
||||
float: right;
|
||||
/*float: right;*/
|
||||
text-align: center;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
::v-deep .box-button-index span {
|
||||
@@ -843,8 +846,9 @@
|
||||
}
|
||||
|
||||
.box-input-index {
|
||||
width: calc(100% - 130px);
|
||||
/*width: calc(100% - 130px);*/
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
height: 48px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
|
||||
@@ -11,8 +11,8 @@
|
||||
<div class="myNews-box-content-box" v-for="(item,index) in dataSource" :key="index" @click="magClick(item)">
|
||||
<img src="../../../assets/wdxx.png" alt="">
|
||||
<div class="content-box">
|
||||
<div class="top" :title="item.msgContent">
|
||||
{{item.msgContent}}
|
||||
<div class="top" :title="language == 'zh-cn'?item.msgContentCn:item.msgContent">
|
||||
{{language == 'zh-cn'?item.msgContentCn:item.msgContent}}
|
||||
</div>
|
||||
<div class="botton">
|
||||
{{item.sendTime}}
|
||||
@@ -44,11 +44,13 @@
|
||||
loading: false,
|
||||
pageNo: 1,
|
||||
pageSize: 4,
|
||||
dataSource: []
|
||||
dataSource: [],
|
||||
language: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.language = localStorage.getItem('language') || ''
|
||||
},
|
||||
methods: {
|
||||
getList() {
|
||||
@@ -69,7 +71,11 @@
|
||||
magClick(row) {
|
||||
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
|
||||
})
|
||||
localStorage.setItem('msgContent', row.msgContent)
|
||||
if (this.language == 'zh-cn'){
|
||||
localStorage.setItem('msgContent', row.msgContentCn)
|
||||
}else{
|
||||
localStorage.setItem('msgContent', row.msgContent)
|
||||
}
|
||||
this.$router.push({
|
||||
path: '/isps/userAnnouncement',
|
||||
query: {
|
||||
|
||||
@@ -65,16 +65,16 @@
|
||||
<span slot="operation" slot-scope="text,record">
|
||||
<a class="text-operation" @click="edit(record)"
|
||||
v-has="'dummyInventoryBase:deleteBatch'"
|
||||
v-if="record.createBy == userData.username"
|
||||
v-if="record.createBy == userData.username || administrators"
|
||||
:disabled="record.state == 1?true:false">{{$t('edit')}}</a>
|
||||
<a class="text-operation"
|
||||
v-if="record.createBy == userData.username"
|
||||
v-if="record.createBy == userData.username || administrators"
|
||||
v-has="'dummyInventoryBase:issue'"
|
||||
@click="withdraw(record)">
|
||||
{{record.state == 2 ? $t('release') : $t('withdraw')}}
|
||||
</a>
|
||||
<a class="text-operation" :disabled="record.state == 1?true:false"
|
||||
v-if="record.createBy == userData.username"
|
||||
v-if="record.createBy == userData.username || administrators"
|
||||
v-has="'dummyInventoryBase:deleteBatch'"
|
||||
@click="maintenanceList(record)">{{$t('maintenanceList')}}</a>
|
||||
<a class="text-operation"
|
||||
@@ -84,7 +84,7 @@
|
||||
</a>
|
||||
<a class="text-operation" :disabled="record.state == 1?true:false"
|
||||
v-has="'dummyInventoryBase:deleteBatch'"
|
||||
v-if="record.createBy == userData.username"
|
||||
v-if="record.createBy == userData.username || administrators"
|
||||
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
@@ -244,13 +244,21 @@
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
queryParam: {}
|
||||
|
||||
queryParam: {},
|
||||
administrators:false,
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.userData = this.userInfo()
|
||||
this.administrators = false
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
|
||||
@@ -107,7 +107,7 @@
|
||||
line-height: 40px;
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
@@ -8,24 +8,24 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="header-content">
|
||||
<div class="operator-text"
|
||||
v-if="$route.query.TaskKey == 'zrrclrw' && this.$route.query.isDisplay"
|
||||
@click="distributionEngineerClick($t('distributionEngineer'),1)">
|
||||
<a-icon type="audit"/>
|
||||
{{ $t('distributionEngineer') }}
|
||||
</div>
|
||||
<div class="operator-text"
|
||||
v-if="$route.query.TaskKey == 'zrrclrw' && this.$route.query.isDisplay"
|
||||
@click="reminderHandling()">
|
||||
<a-icon type="sound"/>
|
||||
{{ $t('reminderHandling') }}
|
||||
</div>
|
||||
<div class="operator-text"
|
||||
v-if="$route.query.TaskKey == 'zrrclrw' && this.$route.query.isDisplay"
|
||||
@click="distributionEngineerClick($t('addFeedback'),2)">
|
||||
<a-icon type="plus-circle"/>
|
||||
{{ $t('addFeedback') }}
|
||||
</div>
|
||||
<a-button class="header-btn submit"
|
||||
v-if="$route.query.TaskKey == 'zrrclrw' && this.$route.query.isDisplay"
|
||||
@click="distributionEngineerClick($t('distributionEngineer'),1)"
|
||||
type="primary">
|
||||
{{$t('distributionEngineer')}}
|
||||
</a-button>
|
||||
<a-button class="header-btn submit"
|
||||
v-if="$route.query.TaskKey == 'zrrclrw' && this.$route.query.isDisplay"
|
||||
@click="distributionEngineerClick($t('addFeedback'),2)"
|
||||
type="primary">
|
||||
{{$t('addFeedback')}}
|
||||
</a-button>
|
||||
<!-- <div class="operator-text"-->
|
||||
<!-- v-if="$route.query.TaskKey == 'zrrclrw' && this.$route.query.isDisplay"-->
|
||||
<!-- @click="reminderHandling()">-->
|
||||
<!-- <a-icon type="sound"/>-->
|
||||
<!-- {{ $t('reminderHandling') }}-->
|
||||
<!-- </div>-->
|
||||
</div>
|
||||
<a-table
|
||||
ref="table"
|
||||
@@ -74,6 +74,11 @@
|
||||
@click="deleted(result)">
|
||||
{{$t('deleteLib')}}
|
||||
</a>
|
||||
<a class="text"
|
||||
@click="reminderClick(result)"
|
||||
v-if="$route.query.TaskKey == 'zrrclrw' && !result.createUser">
|
||||
{{ $t('reminderHandling') }}
|
||||
</a>
|
||||
</span>
|
||||
</a-table>
|
||||
<a-modal
|
||||
@@ -279,31 +284,31 @@
|
||||
</div>
|
||||
<JLoading :loading="pageLoading">{{$t('dataLoading')}}</JLoading>
|
||||
</a-modal>
|
||||
<a-modal
|
||||
:title="$t('reminderHandling')"
|
||||
:width="800"
|
||||
:visible="visibleTable"
|
||||
:maskClosable="false"
|
||||
@cancel="visibleTable = false"
|
||||
>
|
||||
<template slot="footer">
|
||||
<a-button key="back" @click="visibleTable = false">
|
||||
{{$t('cancel')}}
|
||||
</a-button>
|
||||
</template>
|
||||
<a-table
|
||||
ref="table"
|
||||
:loading="loadingTable"
|
||||
:pagination="false"
|
||||
:scroll="{x: true,y:400}"
|
||||
:data-source="dataSourceTable"
|
||||
:columns="columnsTable"
|
||||
>
|
||||
<span slot="operationTable" slot-scope="result">
|
||||
<a @click="reminderClick(result)">{{$t('reminder')}}</a>
|
||||
</span>
|
||||
</a-table>
|
||||
</a-modal>
|
||||
<!-- <a-modal-->
|
||||
<!-- :title="$t('reminderHandling')"-->
|
||||
<!-- :width="800"-->
|
||||
<!-- :visible="visibleTable"-->
|
||||
<!-- :maskClosable="false"-->
|
||||
<!-- @cancel="visibleTable = false"-->
|
||||
<!-- >-->
|
||||
<!-- <template slot="footer">-->
|
||||
<!-- <a-button key="back" @click="visibleTable = false">-->
|
||||
<!-- {{$t('cancel')}}-->
|
||||
<!-- </a-button>-->
|
||||
<!-- </template>-->
|
||||
<!-- <a-table-->
|
||||
<!-- ref="table"-->
|
||||
<!-- :loading="loadingTable"-->
|
||||
<!-- :pagination="false"-->
|
||||
<!-- :scroll="{x: true,y:400}"-->
|
||||
<!-- :data-source="dataSourceTable"-->
|
||||
<!-- :columns="columnsTable"-->
|
||||
<!-- >-->
|
||||
<!-- <span slot="operationTable" slot-scope="result">-->
|
||||
<!-- <a @click="reminderClick(result)">{{$t('reminder')}}</a>-->
|
||||
<!-- </span>-->
|
||||
<!-- </a-table>-->
|
||||
<!-- </a-modal>-->
|
||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||
<viewFileModel ref="viewFileModelRef"/>
|
||||
</div>
|
||||
@@ -436,7 +441,7 @@
|
||||
{
|
||||
title: this.$t('operation'),
|
||||
align: 'left',
|
||||
width: 160,
|
||||
width: 190,
|
||||
scopedSlots: { customRender: 'operation' }
|
||||
}
|
||||
],
|
||||
@@ -722,7 +727,7 @@
|
||||
_this.formInline.userId.splice(num, 1)
|
||||
_this.formInline.userId = _this.formInline.userId.join(',')
|
||||
_this.formInline = { ..._this.formInline }
|
||||
if (id){
|
||||
if (id) {
|
||||
deleteAction('/project/projectTaskInventoryDetailEO/delete', { id: id }).then((res) => {
|
||||
if (res.success) {
|
||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||
@@ -829,7 +834,7 @@
|
||||
line-height: 80px;
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
}
|
||||
@@ -960,4 +965,9 @@
|
||||
line-height: 200px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.header-btn {
|
||||
height: 38px;
|
||||
margin-left: 16px;
|
||||
}
|
||||
</style>
|
||||
@@ -384,7 +384,7 @@
|
||||
line-height: 40px;
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
@@ -478,7 +478,7 @@
|
||||
line-height: 40px;
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@
|
||||
line-height: 40px;
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
@@ -238,7 +238,7 @@
|
||||
line-height: 40px;
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
@@ -111,7 +111,7 @@
|
||||
line-height: 80px;
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
@@ -127,7 +127,7 @@
|
||||
line-height: 40px;
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
@@ -325,7 +325,7 @@
|
||||
line-height: 40px;
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
@@ -116,7 +116,7 @@
|
||||
line-height: 40px;
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
@@ -110,7 +110,7 @@
|
||||
line-height: 40px;
|
||||
|
||||
.header-text {
|
||||
font-size: 16px;
|
||||
font-size: 18px;
|
||||
font-weight: 400;
|
||||
color: #000F16;
|
||||
}
|
||||
|
||||
@@ -339,7 +339,7 @@
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -268,7 +268,7 @@
|
||||
}
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -209,7 +209,7 @@
|
||||
})
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
this.edit()
|
||||
} else {
|
||||
this.loading = false
|
||||
this.$message.warning(this.$t('operationFailed'))
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
{{$t('basicInformationOfParameters')}}
|
||||
</div>
|
||||
<div class="header-tight">
|
||||
<a-button v-if="this.$route.query.studioEngineer == this.userInfo().id" class="box-button"
|
||||
<a-button v-if="this.$route.query.studioEngineer == this.userInfo().id || administrators" class="box-button"
|
||||
style="line-height: 32px" @click="edit">
|
||||
{{$t('edit')}}
|
||||
</a-button>
|
||||
@@ -115,7 +115,8 @@
|
||||
{{$t('regulatoryCertificationTaskPlan')}}
|
||||
</div>
|
||||
<div class="header-tight">
|
||||
<a-button class="box-button" v-if="this.$route.query.studioEngineer == this.userInfo().id"
|
||||
<a-button class="box-button"
|
||||
v-if="this.$route.query.studioEngineer == this.userInfo().id || administrators"
|
||||
style="line-height: 32px"
|
||||
@click="settingClick">{{$t('setting')}}
|
||||
</a-button>
|
||||
@@ -183,6 +184,7 @@
|
||||
data() {
|
||||
return {
|
||||
queryForm: {},
|
||||
administrators:false,
|
||||
activeKey: this.$t('CurrentStatusOfTheProject'),
|
||||
url: {
|
||||
queryById: 'project/projectLibraryBase/queryById',
|
||||
@@ -199,6 +201,14 @@
|
||||
mounted() {
|
||||
this.getForm()
|
||||
this.getSetting()
|
||||
this.administrators = false
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
|
||||
@@ -76,10 +76,10 @@
|
||||
</a-form>
|
||||
</div>
|
||||
<div class="table-operator">
|
||||
<!-- <div class="operator-text" @click="batSettingClick">-->
|
||||
<!-- <a-icon type="setting"/>-->
|
||||
<!-- {{ $t('batSetting') }}-->
|
||||
<!-- </div>-->
|
||||
<div class="operator-text" @click="cuibanClick">
|
||||
<a-icon type="sound"/>
|
||||
{{ $t('CuiBan') }}
|
||||
</div>
|
||||
<div @click="BatchMaintenanceProgress" class="operator-text">
|
||||
<a-icon type="setting"/>
|
||||
{{$t('BatchMaintenanceProgress')}}
|
||||
@@ -190,6 +190,7 @@
|
||||
<taskBatSetting @taskBatSettingForm="taskBatSettingForm" ref="taskBatSettingRef"></taskBatSetting>
|
||||
<batchChangeModel @batchChangeModel="batchChangeModel" ref="batchChangeModelRef"/>
|
||||
<batchModel @batchModel="batchModel" ref="batchModelRef"/>
|
||||
<cuibanModel @cibanModel="cibanModel" ref="cModelRef"/>
|
||||
<!-- 错误数据提示-->
|
||||
<a-modal
|
||||
:title="$t('operationFailed')"
|
||||
@@ -222,6 +223,7 @@
|
||||
import batchModel from './batchModel'
|
||||
import TaskListModel from './TaskListModel'
|
||||
import taskBatSetting from './taskBatSetting'
|
||||
import cuibanModel from './cuibanModel'
|
||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||
import { mapGetters } from 'vuex'
|
||||
import store from '@/store/'
|
||||
@@ -233,6 +235,7 @@
|
||||
TaskListModel,
|
||||
batchChangeModel,
|
||||
batchModel,
|
||||
cuibanModel,
|
||||
taskBatSetting
|
||||
},
|
||||
props: ['isDisplayNum', 'areaOfResponsibility'],
|
||||
@@ -536,6 +539,17 @@
|
||||
let item = JSON.parse(JSON.stringify(val))
|
||||
this.$refs.TaskListModelRef.getData(item, this.$t('CurrentStatus'))
|
||||
},
|
||||
// 催办
|
||||
cuibanClick(){
|
||||
if(this.selectionRowsArray.length <1){
|
||||
this.$message.warning(this.$t('selectLeastOne'))
|
||||
}else{
|
||||
this.$refs.cModelRef.getData(this.selectionRowsArray)
|
||||
}
|
||||
},
|
||||
cibanModel(){
|
||||
this.getList()
|
||||
},
|
||||
//批量维护进度
|
||||
|
||||
BatchMaintenanceProgress() {
|
||||
|
||||
@@ -0,0 +1,189 @@
|
||||
<!--催办-->
|
||||
<template>
|
||||
<a-modal
|
||||
:title="title"
|
||||
:width="700"
|
||||
:visible="visible"
|
||||
:confirm-loading="confirmLoading"
|
||||
:maskClosable="false"
|
||||
@ok="handleOk"
|
||||
@cancel="visible = false"
|
||||
>
|
||||
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
|
||||
<a-row :gutter="24">
|
||||
<a-col :span="24">
|
||||
<div class="box-title-text">
|
||||
<div class="title-text">
|
||||
<span class="title-text-text"
|
||||
:title="$t('taskType')">{{$t('taskType')}}</span>
|
||||
</div>
|
||||
<!-- mode="multiple"-->
|
||||
<a-form-model-item class="itemModel" prop="type">
|
||||
<a-select v-model="formInline.type"
|
||||
class='box-input'
|
||||
:placeholder="$t('PleaseSelect') + $t('taskType')"
|
||||
:getPopupContainer="triggerNode=> triggerNode.parentNode"
|
||||
allowClear>
|
||||
<a-select-option v-for="(item, key) in cuibanList" :key="key" :value="item.value">
|
||||
<span style="display: inline-block;width: 100%" :title=" item.label ">
|
||||
{{ item.label }}
|
||||
</span>
|
||||
</a-select-option>
|
||||
</a-select>
|
||||
</a-form-model-item>
|
||||
</div>
|
||||
</a-col>
|
||||
|
||||
</a-row>
|
||||
</a-form-model>
|
||||
</a-modal>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { postAction, putAction, getAction } from '@/api/manage'
|
||||
|
||||
export default {
|
||||
name: 'TaskListModel',
|
||||
data() {
|
||||
return {
|
||||
formInline: {},
|
||||
selectionRowsArray:[],
|
||||
rules: {
|
||||
type: [
|
||||
{
|
||||
required: true,
|
||||
message: this.$t('PleaseSelect') + this.$t('taskType'),
|
||||
trigger: 'change'
|
||||
}
|
||||
]
|
||||
},
|
||||
title:'',
|
||||
visible: false,
|
||||
confirmLoading: false,
|
||||
studioList: [],
|
||||
cuibanList:[
|
||||
{ label: this.$t('confirmationOfDesignConformity'), value: '2' },
|
||||
{ label: this.$t('PrehomoConfirmation'), value: '3' },
|
||||
{ label: this.$t('verificationAndConformityconfirmation'), value: '4' },
|
||||
],
|
||||
ids:'',
|
||||
disabled: false,
|
||||
url: {
|
||||
edit: '/project/projectTaskInventoryEO/edit',
|
||||
addOrUpdate: '/project/projectTaskInventoryConditionAssessmentEO/addOrUpdate',
|
||||
list: '/project/projectTaskInventoryConditionAssessmentEO/list'
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
|
||||
},
|
||||
methods: {
|
||||
getData(val) {
|
||||
this.visible = true
|
||||
this.title = this.$t('CuiBan')
|
||||
this.selectionRowsArray = val
|
||||
this.$nextTick(() => {
|
||||
this.formInline = {}
|
||||
this.$refs.ruleForm.clearValidate()
|
||||
})
|
||||
},
|
||||
getList(val) {
|
||||
getAction(this.url.list, { projectLawsInventoryId: val.projectLawsInventoryId }).then((res) => {
|
||||
if (res.success) {
|
||||
this.studioList = res.result || []
|
||||
} else {
|
||||
this.studioList = []
|
||||
}
|
||||
})
|
||||
},
|
||||
handleInput(value) {
|
||||
this.$nextTick(() => {
|
||||
this.formInline = { ...this.formInline }
|
||||
this.$refs.ruleForm.validateField([value])
|
||||
})
|
||||
},
|
||||
handleOk() {
|
||||
if (this.disabled) {
|
||||
this.visible = false
|
||||
return
|
||||
}
|
||||
this.$refs.ruleForm.validate(valid => {
|
||||
if (valid) {
|
||||
let ProjectTaskUrgVo = {}
|
||||
let projectLawsInventoryId = []
|
||||
this.selectionRowsArray.forEach((item) => {
|
||||
if(item.projectLawsInventoryId){
|
||||
projectLawsInventoryId.push(item.projectLawsInventoryId)
|
||||
}
|
||||
})
|
||||
ProjectTaskUrgVo = {
|
||||
projectLawsInventoryIds: projectLawsInventoryId.join(','),
|
||||
type: this.formInline.type,
|
||||
}
|
||||
this.confirmLoading = true
|
||||
postAction('/project/projectLawsInventoryEO/taskUrg', ProjectTaskUrgVo).then((res) => {
|
||||
if (res.success) {
|
||||
this.visible = false
|
||||
this.confirmLoading = false
|
||||
this.$message.success(this.$t('OperationSuccessful'))
|
||||
this.$emit('cibanModel')
|
||||
} else {
|
||||
this.$message.warning(res.message)
|
||||
this.confirmLoading = false
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.box-title-text {
|
||||
line-height: 1.4;
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.Required {
|
||||
color: red;
|
||||
margin-right: 4px;
|
||||
}
|
||||
|
||||
.title-text {
|
||||
width: 134px;
|
||||
text-align: right;
|
||||
display: inline-block;
|
||||
font-weight: 500;
|
||||
font-size: 14px;
|
||||
margin-right: 16px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
white-space: nowrap;
|
||||
height: 42px;
|
||||
line-height: 42px;
|
||||
}
|
||||
|
||||
.box-input {
|
||||
display: inline-block;
|
||||
height: 38px;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.itemModel {
|
||||
width: calc(100% - 130px);
|
||||
display: inline-block;
|
||||
margin-top: 2px;
|
||||
}
|
||||
|
||||
.title-text-text {
|
||||
margin-top: 9px;
|
||||
}
|
||||
|
||||
.headerText {
|
||||
margin-left: 30px;
|
||||
color: #040B29;
|
||||
font-weight: 400;
|
||||
}
|
||||
</style>
|
||||
@@ -173,7 +173,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div v-if="!isDisplay" style="float: right;margin-top: 1px;margin-bottom: 0px">
|
||||
<div @click="handleExport" v-has="'projectLawsInventory:exportData'" v-if="isRoleSwitching"
|
||||
<div @click="handleExport" v-has="'projectLawsInventory:exportData'"
|
||||
v-if="isRoleSwitching || formInlineRoleSwitching.roleSwitchingCode == '12'"
|
||||
class="operator-text">
|
||||
<a-icon type="export" :rotate="-90"/>
|
||||
{{ $t('export') }}
|
||||
|
||||
@@ -83,14 +83,14 @@
|
||||
</div>
|
||||
<div class="operator-text"
|
||||
v-has="'projectRelatedPersonnel:importExcel'"
|
||||
v-if="this.$route.query.studioEngineer == this.userInfo().id">
|
||||
v-if="this.$route.query.studioEngineer == this.userInfo().id || administrators">
|
||||
<ImportFile :url="url" :projectId="$route.query.id" :isTrue="true" :accept="'.xls'"
|
||||
@getList="getPersonnelList"/>
|
||||
</div>
|
||||
<div class="operator-text"
|
||||
@click="batSettingClick"
|
||||
v-has="'projectRelatedPersonnel:setting'"
|
||||
v-if="this.$route.query.studioEngineer == this.userInfo().id">
|
||||
v-if="this.$route.query.studioEngineer == this.userInfo().id || administrators">
|
||||
<a-icon type="setting"/>
|
||||
{{$t('batSetting')}}
|
||||
</div>
|
||||
@@ -388,13 +388,15 @@
|
||||
queryCertificationEngineer: '/project/projectRelatedPersonnel/queryCertificationEngineer'
|
||||
},
|
||||
selectedRowKeys: [],
|
||||
dictOptionsValue: []
|
||||
dictOptionsValue: [],
|
||||
administrators: false
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
columns() {
|
||||
let columnResult = JSON.parse(JSON.stringify(this.columnsAll))
|
||||
if (this.$route.query.studioEngineer != this.userInfo().id) {
|
||||
if (this.$route.query.studioEngineer == this.userInfo().id || this.administrators) {
|
||||
} else {
|
||||
for (var i = 0; i < columnResult.length; i++) {
|
||||
if (columnResult[i].title === this.$t('operation')) {
|
||||
columnResult.splice(i, 1)
|
||||
@@ -441,6 +443,14 @@
|
||||
getData() {
|
||||
this.visible = true
|
||||
this.queryParam = {}
|
||||
this.administrators = false
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
this.getList()
|
||||
this.queryCertificationEngineer()
|
||||
},
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
</a>
|
||||
<a class="text-operation"
|
||||
v-has="'projectLibraryBase:delete'"
|
||||
v-if="record.createBy == userInfoQuery.username"
|
||||
v-if="record.createBy == userInfoQuery.username || administrators"
|
||||
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||
<!-- <a class="text-operation" @click="entryNameClick(record)">{{$t('see')}}</a>-->
|
||||
</span>
|
||||
@@ -264,12 +264,21 @@
|
||||
}
|
||||
],
|
||||
userInfoQuery: {},
|
||||
queryParam: {}
|
||||
queryParam: {},
|
||||
administrators: false
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.getList()
|
||||
this.userInfoQuery = this.userInfo()
|
||||
this.administrators = false
|
||||
if (this.userInfo().userRoleList && this.userInfo().userRoleList.length > 0) {
|
||||
this.userInfo().userRoleList.forEach(res => {
|
||||
if (res.roleCode == 'admin') {
|
||||
this.administrators = true
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
...mapGetters(['userInfo']),
|
||||
|
||||
@@ -126,6 +126,13 @@
|
||||
description: '定时任务在线管理',
|
||||
// 查询条件
|
||||
queryParam: {},
|
||||
ipagination: {
|
||||
total: 0,
|
||||
pageSize: 20,//每页中显示10条数据
|
||||
showSizeChanger: true,
|
||||
pageSizeOptions: ["10", "20", "50", "100"],//每页中显示的数据
|
||||
showTotal: total => `共有 ${total} 条数据`, //分页中显示总的数据
|
||||
},
|
||||
// 表头
|
||||
columns: [
|
||||
{
|
||||
|
||||
@@ -71,8 +71,9 @@
|
||||
@change="handleTableChange">
|
||||
<span slot="msgTitile" slot-scope="text,scope">
|
||||
<!-- @click="msgContentClick(scope)"-->
|
||||
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" :title="text">
|
||||
{{text}}
|
||||
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}"
|
||||
:title="language == 'zh-cn' ? scope.msgContentCn : scope.msgContent">
|
||||
{{language == 'zh-cn' ? scope.msgContentCn : scope.msgContent}}
|
||||
</a>
|
||||
</span>
|
||||
<span slot="msgCategory" slot-scope="text,scope">
|
||||
@@ -82,7 +83,7 @@
|
||||
</span>
|
||||
</span>
|
||||
<p slot="expandedRowRender" slot-scope="record" style="margin: 0;padding-left: 58px;">
|
||||
<span v-html="record.msgContentInfo">
|
||||
<span v-html="language == 'zh-cn' ? record.msgContentInfoCn : record.msgContentInfo">
|
||||
</span>
|
||||
</p>
|
||||
</a-table>
|
||||
@@ -163,10 +164,10 @@
|
||||
dataIndex: 'sendTime'
|
||||
},
|
||||
{
|
||||
title:'',
|
||||
title: '',
|
||||
align: 'left',
|
||||
ellipsis: true,
|
||||
width: 50,
|
||||
width: 50
|
||||
}
|
||||
],
|
||||
url: {
|
||||
@@ -177,7 +178,8 @@
|
||||
},
|
||||
loading: false,
|
||||
openPath: '',
|
||||
formData: ''
|
||||
formData: '',
|
||||
language: ''
|
||||
}
|
||||
},
|
||||
watch: {
|
||||
@@ -186,16 +188,25 @@
|
||||
this.loadData()
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.language = localStorage.getItem('language') || ''
|
||||
},
|
||||
methods: {
|
||||
expandIcon(props) {
|
||||
if (props.expanded) {
|
||||
return <a-icon type='down' onClick={e => {
|
||||
props.onExpand(props.record, e);
|
||||
}}/>;
|
||||
return <a-icon type = 'down'onClick = { e=>
|
||||
{
|
||||
props.onExpand(props.record, e)
|
||||
}
|
||||
}
|
||||
/>;
|
||||
} else {
|
||||
return <a-icon type='right' onClick={e => {
|
||||
props.onExpand(props.record, e);
|
||||
}}/>;
|
||||
return <a-icon type = 'right' onClick = { e =>
|
||||
{
|
||||
props.onExpand(props.record, e)
|
||||
}
|
||||
}
|
||||
/>;
|
||||
}
|
||||
},
|
||||
getQueryParams() {
|
||||
@@ -359,8 +370,9 @@
|
||||
height: 38px;
|
||||
/*margin-top: 2px;*/
|
||||
}
|
||||
::v-deep .ant-table .ant-table-row-indent + .ant-table-row-expand-icon{
|
||||
margin-right: 0;
|
||||
|
||||
::v-deep .ant-table .ant-table-row-indent + .ant-table-row-expand-icon {
|
||||
margin-right: 0;
|
||||
}
|
||||
</style>
|
||||
<style>
|
||||
|
||||
@@ -21,29 +21,32 @@
|
||||
|
||||
<a-spin :spinning="confirmLoading">
|
||||
<a-form :form="form">
|
||||
<!-- v-if="!disabled"-->
|
||||
<!-- v-if="!disabled"-->
|
||||
<a-form-item :label="$t('userAccount')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('enterUserAccount')" v-decorator.trim="[ 'username', validatorRules.username]" :disabled='isdisabled'
|
||||
<a-input :placeholder="$t('enterUserAccount')" v-decorator.trim="[ 'username', validatorRules.username]"
|
||||
:disabled='isdisabled'
|
||||
:readOnly="!!model.id"/>
|
||||
</a-form-item>
|
||||
<!-- v-if="!model.id && !disabled"-->
|
||||
<!-- v-if="!model.id && !disabled"-->
|
||||
<template>
|
||||
<!-- <a-form-item :label="$t('LoginPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
<!-- <a-input type="password" :placeholder="$t('enterLoginPassword')" autocomplete='new-password'-->
|
||||
<!-- v-decorator="[ 'password',validatorRules.password]"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- v-if="!disabled"-->
|
||||
<!-- <a-form-item :label="$t('ConfirmPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
<!-- <a-input type="password" @blur="handleConfirmBlur" :placeholder="$t('reenterLoginPassword')"-->
|
||||
<!-- v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- <a-form-item :label="$t('LoginPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
<!-- <a-input type="password" :placeholder="$t('enterLoginPassword')" autocomplete='new-password'-->
|
||||
<!-- v-decorator="[ 'password',validatorRules.password]"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- v-if="!disabled"-->
|
||||
<!-- <a-form-item :label="$t('ConfirmPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
<!-- <a-input type="password" @blur="handleConfirmBlur" :placeholder="$t('reenterLoginPassword')"-->
|
||||
<!-- v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>-->
|
||||
<!-- </a-form-item>-->
|
||||
</template>
|
||||
<!-- v-if="!disabled"-->
|
||||
<!-- v-if="!disabled"-->
|
||||
<a-form-item :label="$t('userName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('enterUserName')" :disabled='isdisabled' v-decorator.trim="[ 'realname', validatorRules.realname]"/>
|
||||
<a-input :placeholder="$t('enterUserName')" :disabled='isdisabled'
|
||||
v-decorator.trim="[ 'realname', validatorRules.realname]"/>
|
||||
</a-form-item>
|
||||
<a-form-item :label="$t('position')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input type="textarea" style='height: 100px' :placeholder="$t('pleaseEnter')+$t('position')" :disabled='isdisabled' v-decorator.trim="[ 'jobTitle', validatorRules.jobTitle]"/>
|
||||
<a-input type="textarea" style='height: 100px' :placeholder="$t('pleaseEnter')+$t('position')"
|
||||
:disabled='isdisabled' v-decorator.trim="[ 'jobTitle', validatorRules.jobTitle]"/>
|
||||
</a-form-item>
|
||||
|
||||
<!--<a-form-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
@@ -53,9 +56,9 @@
|
||||
<!--<a-form-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
<!--<j-select-position placeholder="请选择职务" :multiple="false" v-decorator="['post', {}]"/>-->
|
||||
<!--</a-form-item>-->
|
||||
<!-- v-show="!roleDisabled"-->
|
||||
<!-- v-show="!roleDisabled"-->
|
||||
<a-form-item :label="$t('RoleAssignment')" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
>
|
||||
>
|
||||
<a-select
|
||||
mode="multiple"
|
||||
style="width: 100%"
|
||||
@@ -63,7 +66,7 @@
|
||||
:placeholder="$t('selectUserRole')"
|
||||
optionFilterProp="children"
|
||||
v-model="selectedRole"
|
||||
:disabled='isdisabled'
|
||||
:disabled='false'
|
||||
:getPopupContainer="(target) => target.parentNode">
|
||||
<a-select-option v-for="(role,roleindex) in roleList" :key="roleindex.toString()" :value="role.id">
|
||||
{{ role.roleName }}
|
||||
@@ -72,9 +75,9 @@
|
||||
</a-form-item>
|
||||
|
||||
<!--部门分配-->
|
||||
<!-- v-show="!departDisabled && !disabled"-->
|
||||
<!-- v-show="!departDisabled && !disabled"-->
|
||||
<a-form-item :label="$t('DepartmentAllocation')" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||
>
|
||||
>
|
||||
<a-input-search
|
||||
:placeholder="$t('ClickSelectDepartment')"
|
||||
v-model="checkedDepartNameString"
|
||||
@@ -101,34 +104,34 @@
|
||||
<!--</a-form-item>-->
|
||||
|
||||
<!-- update--begin--autor:wangshuai-----date:20200108------for:新增身份和负责部门------ -->
|
||||
<!-- v-if="!disabled"-->
|
||||
<!-- <a-form-item :label="$t('identity')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
<!-- <a-radio-group-->
|
||||
<!-- v-model="identity"-->
|
||||
<!-- @change="identityChange">-->
|
||||
<!-- <a-radio value="1">{{$t('OrdinaryUsers')}}</a-radio>-->
|
||||
<!-- <a-radio value="2">{{$t('superior')}}</a-radio>-->
|
||||
<!-- </a-radio-group>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- v-if="departIdShow==true && !disabled"-->
|
||||
<!-- <a-form-item :label="$t('ResponsibleDepartment')" :labelCol="labelCol" :wrapperCol="wrapperCol"-->
|
||||
<!-- >-->
|
||||
<!-- <a-select-->
|
||||
<!-- :disabled="disabled"-->
|
||||
<!-- mode="multiple"-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- :placeholder="$t('selectResponsibleDepartment')"-->
|
||||
<!-- v-model="departIds"-->
|
||||
<!-- optionFilterProp="children"-->
|
||||
<!-- :getPopupContainer="(target) => target.parentNode"-->
|
||||
<!-- :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"-->
|
||||
<!-- >-->
|
||||
<!-- <a-select-option v-for="item in resultDepartOptions" :key="item.key" :value="item.key"-->
|
||||
<!-- >{{item.title}}-->
|
||||
<!-- </a-select-option-->
|
||||
<!-- >-->
|
||||
<!-- </a-select>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- v-if="!disabled"-->
|
||||
<!-- <a-form-item :label="$t('identity')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
<!-- <a-radio-group-->
|
||||
<!-- v-model="identity"-->
|
||||
<!-- @change="identityChange">-->
|
||||
<!-- <a-radio value="1">{{$t('OrdinaryUsers')}}</a-radio>-->
|
||||
<!-- <a-radio value="2">{{$t('superior')}}</a-radio>-->
|
||||
<!-- </a-radio-group>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- v-if="departIdShow==true && !disabled"-->
|
||||
<!-- <a-form-item :label="$t('ResponsibleDepartment')" :labelCol="labelCol" :wrapperCol="wrapperCol"-->
|
||||
<!-- >-->
|
||||
<!-- <a-select-->
|
||||
<!-- :disabled="disabled"-->
|
||||
<!-- mode="multiple"-->
|
||||
<!-- style="width: 100%"-->
|
||||
<!-- :placeholder="$t('selectResponsibleDepartment')"-->
|
||||
<!-- v-model="departIds"-->
|
||||
<!-- optionFilterProp="children"-->
|
||||
<!-- :getPopupContainer="(target) => target.parentNode"-->
|
||||
<!-- :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"-->
|
||||
<!-- >-->
|
||||
<!-- <a-select-option v-for="item in resultDepartOptions" :key="item.key" :value="item.key"-->
|
||||
<!-- >{{item.title}}-->
|
||||
<!-- </a-select-option-->
|
||||
<!-- >-->
|
||||
<!-- </a-select>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- update--end--autor:wangshuai-----date:20200108------for:新增身份和负责部门------ -->
|
||||
<!-- <a-form-item label="头像" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
<!-- <j-image-upload class="avatar-uploader" text="上传" v-model="fileList" ></j-image-upload>-->
|
||||
@@ -141,20 +144,21 @@
|
||||
<!--v-decorator="['birthday', {initialValue:!model.birthday?null:moment(model.birthday,dateFormat)}]"-->
|
||||
<!--:getCalendarContainer="node => node.parentNode"/>-->
|
||||
<!--</a-form-item>-->
|
||||
<!-- v-if="!disabled"-->
|
||||
<!-- <a-form-item :label="$t('Gender')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
<!-- <a-select v-decorator="[ 'sex', {}]" :placeholder="$t('selectGender')"-->
|
||||
<!-- :getPopupContainer="(target) => target.parentNode">-->
|
||||
<!-- <a-select-option :value="1">{{$t('male')}}</a-select-option>-->
|
||||
<!-- <a-select-option :value="2">{{$t('female')}}</a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- v-if="!disabled"-->
|
||||
<!-- v-if="!disabled"-->
|
||||
<!-- <a-form-item :label="$t('Gender')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||
<!-- <a-select v-decorator="[ 'sex', {}]" :placeholder="$t('selectGender')"-->
|
||||
<!-- :getPopupContainer="(target) => target.parentNode">-->
|
||||
<!-- <a-select-option :value="1">{{$t('male')}}</a-select-option>-->
|
||||
<!-- <a-select-option :value="2">{{$t('female')}}</a-select-option>-->
|
||||
<!-- </a-select>-->
|
||||
<!-- </a-form-item>-->
|
||||
<!-- v-if="!disabled"-->
|
||||
<a-form-item :label="$t('mailbox')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('enterEmailAddress')" v-decorator="[ 'email', validatorRules.email]" :disabled='isdisabled'/>
|
||||
<a-input :placeholder="$t('enterEmailAddress')" v-decorator="[ 'email', validatorRules.email]"
|
||||
:disabled='isdisabled'/>
|
||||
</a-form-item>
|
||||
<!-- v-if="!disabled"-->
|
||||
<!-- :disabled="isDisabledAuth('user:form:phone')"-->
|
||||
<!-- v-if="!disabled"-->
|
||||
<!-- :disabled="isDisabledAuth('user:form:phone')"-->
|
||||
<a-form-item :label="$t('phoneNumber')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-input :placeholder="$t('enterMobileNumber')" :disabled='isdisabled'
|
||||
v-decorator="[ 'telephone', validatorRules.telephone]"/>
|
||||
@@ -173,11 +177,11 @@
|
||||
<depart-window ref="departWindow" @ok="modalFormOk"></depart-window>
|
||||
|
||||
<div class="drawer-bootom-button" v-show="!disableSubmit">
|
||||
<!-- <a-popconfirm :title="$t('AreYouWantDiscardEditing')" @confirm="handleCancel" :okText="$t('determine')"-->
|
||||
<!-- :cancelText="$t('cancel')">-->
|
||||
<a-button style="margin-right: .8rem" @click="handleSubmit">{{$t('cancel')}}</a-button>
|
||||
<!-- </a-popconfirm>-->
|
||||
<!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>-->
|
||||
<!-- <a-popconfirm :title="$t('AreYouWantDiscardEditing')" @confirm="handleCancel" :okText="$t('determine')"-->
|
||||
<!-- :cancelText="$t('cancel')">-->
|
||||
<a-button style="margin-right: .8rem" @click="handleSubmit">{{$t('cancel')}}</a-button>
|
||||
<!-- </a-popconfirm>-->
|
||||
<a-button @click="handleSubmitOk" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
@@ -189,7 +193,7 @@
|
||||
// 引入搜索部门弹出框的组件
|
||||
import departWindow from './DepartWindow'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { getAction } from '@/api/manage'
|
||||
import { getAction, postAction } from '@/api/manage'
|
||||
import { addUser, editUser, queryUserRole, queryall } from '@/api/api'
|
||||
import { disabledAuthFilter } from '@/utils/authFilter'
|
||||
import { duplicateCheck } from '@/api/api'
|
||||
@@ -347,6 +351,25 @@
|
||||
}
|
||||
})
|
||||
},
|
||||
handleSubmitOk() {
|
||||
this.confirmLoading = true
|
||||
let selectedRole = JSON.parse(JSON.stringify(this.selectedRole))
|
||||
let param = {
|
||||
ids: this.userId,
|
||||
selectedroles: selectedRole.join(',')
|
||||
}
|
||||
postAction('/sys/user/setRole', param).then((res) => {
|
||||
if (res.success) {
|
||||
this.$emit('ok')
|
||||
this.confirmLoading = false
|
||||
this.visible = false
|
||||
this.$message.success(res.message)
|
||||
} else {
|
||||
this.confirmLoading = false
|
||||
this.$message.warning(res.message)
|
||||
}
|
||||
})
|
||||
},
|
||||
refresh() {
|
||||
this.selectedDepartKeys = []
|
||||
this.checkedDepartKeys = []
|
||||
@@ -383,7 +406,7 @@
|
||||
that.visible = true
|
||||
that.model = Object.assign({}, record)
|
||||
that.$nextTick(() => {
|
||||
that.form.setFieldsValue(pick(this.model, 'username', 'sex', 'realname', 'jobTitle','email', 'phone', 'activitiSync', 'workNo', 'telephone', 'post'))
|
||||
that.form.setFieldsValue(pick(this.model, 'username', 'sex', 'realname', 'jobTitle', 'email', 'phone', 'activitiSync', 'workNo', 'telephone', 'post'))
|
||||
})
|
||||
//身份为上级显示负责部门,否则不显示
|
||||
if (this.model.userIdentity == '2') {
|
||||
@@ -728,7 +751,7 @@
|
||||
.drawer-bootom-button {
|
||||
position: absolute;
|
||||
bottom: -8px;
|
||||
z-index:100;
|
||||
z-index: 100;
|
||||
width: 100%;
|
||||
border-top: 1px solid #e8e8e8;
|
||||
padding: 10px 16px;
|
||||
@@ -740,6 +763,6 @@
|
||||
</style>
|
||||
<style>
|
||||
.selectUserRole .ant-select-selection--multiple {
|
||||
height: 100px!important;
|
||||
height: 100px !important;
|
||||
}
|
||||
</style>
|
||||
@@ -18,7 +18,7 @@
|
||||
<span>{{$t('standardInformation')}}</span>
|
||||
</div>
|
||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standardInformation')"
|
||||
v-model="queryParam.serialNumber"></a-input>
|
||||
v-model="queryParam.standardInfo"></a-input>
|
||||
</div>
|
||||
</a-col>
|
||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||
@@ -104,7 +104,7 @@
|
||||
{
|
||||
title: this.$t('standardInformation'),
|
||||
align: 'center',
|
||||
dataIndex: 'serialNumber',
|
||||
dataIndex: 'standardInfo',
|
||||
ellipsis: true,
|
||||
scopedSlots: { customRender: 'standardInformation' },
|
||||
width: 170
|
||||
|
||||
Reference in New Issue
Block a user