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"),
|
GREEN("其他","green"),
|
||||||
RED("任务被拒绝","red"),
|
RED("任务被拒绝","red"),
|
||||||
YELLOW("任务预期","yellow");
|
YELLOW("任务逾期","yellow");
|
||||||
|
|
||||||
String label;
|
String label;
|
||||||
String value;
|
String value;
|
||||||
|
|||||||
+2
@@ -161,6 +161,8 @@ public class ShiroConfig {
|
|||||||
filterChainDefinitionMap.put("/lark/larkCardMessageConfig", "anon"); //飞书调用接口,卡片消息配置。
|
filterChainDefinitionMap.put("/lark/larkCardMessageConfig", "anon"); //飞书调用接口,卡片消息配置。
|
||||||
filterChainDefinitionMap.put("/sys/user/querySysUserListByIdList", "anon"); // 工作流根据用户idList获取用户信息接口
|
filterChainDefinitionMap.put("/sys/user/querySysUserListByIdList", "anon"); // 工作流根据用户idList获取用户信息接口
|
||||||
filterChainDefinitionMap.put("/project/projectTaskInventoryConditionAssessmentEO/initConditionAssessment", "anon"); // 初始化项目当前状态数据接口
|
filterChainDefinitionMap.put("/project/projectTaskInventoryConditionAssessmentEO/initConditionAssessment", "anon"); // 初始化项目当前状态数据接口
|
||||||
|
filterChainDefinitionMap.put("/todoCenter/projectProcess/initHistoryData", "anon"); // 待办中心-初始化历史数据接口排除
|
||||||
|
filterChainDefinitionMap.put("/project/projectTaskInventoryEO/disposeHistoryData", "anon"); // 项目库-任务清单 处理历史数据接口
|
||||||
|
|
||||||
// 添加自己的过滤器并且取名为jwt
|
// 添加自己的过滤器并且取名为jwt
|
||||||
Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
|
Map<String, Filter> filterMap = new HashMap<String, Filter>(1);
|
||||||
|
|||||||
+3
-3
@@ -158,11 +158,11 @@ public class CommonController {
|
|||||||
// bizPath = "";
|
// bizPath = "";
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
if(file.getOriginalFilename().length()>70){
|
if(file.getOriginalFilename().length()>100){
|
||||||
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
if(StringUtils.equals(cut,CutEnum.CN.getValue())){
|
||||||
throw new JeroBootException("文件名长度不能超过70位,请检查!");
|
throw new JeroBootException("文件名长度不能超过100位,请检查!");
|
||||||
}else if(StringUtils.equals(cut,CutEnum.EN.getValue())){
|
}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);
|
// 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 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),
|
ADMIN_ID("R&H Manager","R&H Manager","manager","1534020391015444481",2),
|
||||||
MANAGER_ID("系统管理员","Administrator","admin","f6817f48af4fb3af11b9e8bf182f618b",3),
|
MANAGER_ID("系统管理员","Administrator","admin","f6817f48af4fb3af11b9e8bf182f618b",3),
|
||||||
COUNTRU_CARD_MANAGE("countryCard管理员","countryCardManage","countryCardManage","1564916346120916993",4),
|
COUNTRU_CARD_MANAGE("countryCard管理员","countryCardManage","countryCardManage","1564916346120916993",4),
|
||||||
|
ENGINEERING_INTERFACE_PERSON("工程接口人","engineeringInterfacePerson","engineeringInterfacePerson","1534020084667674626",5),
|
||||||
|
ENGINEER("工程师","engineer","engineer","1534020318437208065",6),
|
||||||
;
|
;
|
||||||
|
|
||||||
String name;
|
String name;
|
||||||
|
|||||||
+5
-1
@@ -18,6 +18,8 @@
|
|||||||
<result column="open_page" property="openPage" jdbcType="VARCHAR"/>
|
<result column="open_page" property="openPage" jdbcType="VARCHAR"/>
|
||||||
<result column="document_id" property="documentId" jdbcType="VARCHAR"/>
|
<result column="document_id" property="documentId" jdbcType="VARCHAR"/>
|
||||||
<result column="initiator" property="initiator" 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>
|
</resultMap>
|
||||||
|
|
||||||
<select id="queryByUserId" parameterType="String" resultType="String">
|
<select id="queryByUserId" parameterType="String" resultType="String">
|
||||||
@@ -43,7 +45,9 @@
|
|||||||
sa.open_page as open_page,
|
sa.open_page as open_page,
|
||||||
sa.msg_abstract,
|
sa.msg_abstract,
|
||||||
sa.document_id as document_id,
|
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
|
from sys_announcement_send sas
|
||||||
left join sys_announcement sa ON sas.annt_id = sa.id
|
left join sys_announcement sa ON sas.annt_id = sa.id
|
||||||
where sa.del_flag = '0'
|
where sa.del_flag = '0'
|
||||||
|
|||||||
+4
@@ -87,4 +87,8 @@ public class AnnouncementSendModel implements Serializable {
|
|||||||
*/
|
*/
|
||||||
private java.lang.String initiator;
|
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.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.IService;
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
|
import com.jero.common.system.vo.LoginUser;
|
||||||
import com.jero.common.system.vo.SysUserCacheInfo;
|
import com.jero.common.system.vo.SysUserCacheInfo;
|
||||||
import com.jero.modules.system.entity.PPEmployee;
|
import com.jero.modules.system.entity.PPEmployee;
|
||||||
import com.jero.modules.system.entity.SysRole;
|
import com.jero.modules.system.entity.SysRole;
|
||||||
@@ -276,4 +277,16 @@ public interface ISysUserService extends IService<SysUser> {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
boolean isAdministrator();
|
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;
|
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")
|
// @RequiresPermissions("params:collectManifest:list")
|
||||||
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "paramsManifestId") String paramsManifestId,
|
public Result<List<Map<String, Object>>> getHeader(@RequestParam(name = "paramsManifestId") String paramsManifestId,
|
||||||
@RequestParam(name = "flag") String flag,
|
@RequestParam(name = "flag") String flag,
|
||||||
@RequestParam(name = "userType", required = false) String userType,
|
|
||||||
@RequestParam(name = "cut") String cut) {
|
@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);
|
return Result.OK(list);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
@@ -128,6 +128,7 @@
|
|||||||
pm.state as state,
|
pm.state as state,
|
||||||
pm.project_id as project_id,
|
pm.project_id as project_id,
|
||||||
pm.create_time as create_time,
|
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
|
concat(pni.project_name,'-',pyni.year_name,'-',plb.target_market,'-',pm.version) as project_name
|
||||||
from params_manifest pm
|
from params_manifest pm
|
||||||
left join project_library_base as plb on plb.id = pm.project_id
|
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
|
* @param cut
|
||||||
* @return
|
* @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
|
* @return
|
||||||
*/
|
*/
|
||||||
@Override
|
@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
|
List<OnlCgformField> fieldList = onlCgformFieldService.getFieldList(flag); // flag--->7
|
||||||
if (fieldList.size() != 0) {
|
if (fieldList.size() != 0) {
|
||||||
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
//过滤列表字段(is_show_list-->列表是否显示0否 1是)
|
||||||
@@ -779,10 +779,6 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
OnlCgformField onlCgformField = fieldList.get(i);
|
OnlCgformField onlCgformField = fieldList.get(i);
|
||||||
Map<String, Object> map = new HashMap<>();
|
Map<String, Object> map = new HashMap<>();
|
||||||
String dbFieldName = onlCgformField.getDbFieldName();
|
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)) {
|
if ("nio_number".equals(dbFieldName) || "params_name".equals(dbFieldName)) {
|
||||||
map.put("click5", true);
|
map.put("click5", true);
|
||||||
if("nio_number".equals(dbFieldName)) {
|
if("nio_number".equals(dbFieldName)) {
|
||||||
@@ -1309,14 +1305,19 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
String urlParamsStr = parseUrlParams(paramsManifestEO);
|
||||||
String hrefFeishu = backUrl + "/ParameterItemCollection" + urlParamsStr;
|
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());
|
List<ProjectLibraryBase> projectLibraryBases = projectLibraryBaseMapper.queryById(paramsManifestEO.getProjectId());
|
||||||
if (ObjectUtils.isNotEmpty(projectLibraryBases)) {
|
if (ObjectUtils.isNotEmpty(projectLibraryBases)) {
|
||||||
SysUser engineer = sysUserService.getById(projectLibraryBases.get(0).getCertificationEngineer());
|
String[] ids = projectLibraryBases.get(0).getCertificationEngineer().split(",");
|
||||||
if (ObjectUtils.isNotEmpty(engineer)) {
|
if (ObjectUtils.isNotEmpty(ids)) {
|
||||||
engThirdIds[0] = engineer.getThirdId();
|
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())) {
|
if (CollectManifestStateEnum.SDT_BACK.getValue().equals(paramsCollectManifestEO.getState())) {
|
||||||
//通知认证工程师
|
//通知认证工程师
|
||||||
@@ -1333,14 +1334,14 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
"\nDue Date: " + deadline);
|
"\nDue Date: " + deadline);
|
||||||
feishuMsgVo.setUrl(hrefFeishu);
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||||
feishuService.sendCard(engThirdIds, feishuMsgVo);
|
feishuService.sendCard(engThirdIds.toArray(new String[engThirdIds.size()]), feishuMsgVo);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("飞书消息推送失败");
|
log.error("飞书消息推送失败");
|
||||||
}
|
}
|
||||||
} else if (CollectManifestStateEnum.DRE_BACK.getValue().equals(paramsCollectManifestEO.getState())) {
|
} else if (CollectManifestStateEnum.DRE_BACK.getValue().equals(paramsCollectManifestEO.getState())) {
|
||||||
|
|
||||||
//通知认证工程师
|
//通知认证工程师
|
||||||
try {
|
/*try {
|
||||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
|
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
|
||||||
feishuMsgVo.setCnContentUpper("您好,"+ currentUser.getUsername() +"申请撤回参数NIO-"+ paramsCollectManifestEO.getNioNumber() +",请及时处理");
|
feishuMsgVo.setCnContentUpper("您好,"+ currentUser.getUsername() +"申请撤回参数NIO-"+ paramsCollectManifestEO.getNioNumber() +",请及时处理");
|
||||||
@@ -1353,16 +1354,19 @@ public class ParamsCollectManifestEOServiceImpl extends ServiceImpl<ParamsCollec
|
|||||||
"\nDue Date: " + deadline);
|
"\nDue Date: " + deadline);
|
||||||
feishuMsgVo.setUrl(hrefFeishu);
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||||
feishuService.sendCard(engThirdIds, feishuMsgVo);
|
feishuService.sendCard(engThirdIds.toArray(new String[engThirdIds.size()]), feishuMsgVo);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("飞书消息推送失败");
|
log.error("飞书消息推送失败");
|
||||||
}
|
}*/
|
||||||
//通知工程接口人
|
//通知工程接口人
|
||||||
SysUser sdtUser = sysUserService.getUserByName(paramsCollectManifestEO.getSdt());
|
List<String> SdtThirdIds = new ArrayList<>();
|
||||||
String[] SdtThirdIds = new String[1];
|
for (String sdt : paramsCollectManifestEO.getSdt().split(",")) {
|
||||||
if (ObjectUtils.isNotEmpty(sdtUser)) {
|
SysUser sdtUser = sysUserService.getUserByName(sdt);
|
||||||
SdtThirdIds[0] = sdtUser.getThirdId();
|
if (ObjectUtils.isNotEmpty(sdtUser)) {
|
||||||
|
SdtThirdIds.add(sdtUser.getThirdId());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
feishuMsgVo.setTitle(MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn());
|
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);
|
"\nDue Date: " + deadline);
|
||||||
feishuMsgVo.setUrl(hrefFeishu);
|
feishuMsgVo.setUrl(hrefFeishu);
|
||||||
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
feishuMsgVo.setColor(MsgColorEnum.RED.getValue()); // 颜色
|
||||||
feishuService.sendCard(engThirdIds, feishuMsgVo);
|
feishuService.sendCard(SdtThirdIds.toArray(new String[SdtThirdIds.size()]), feishuMsgVo);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
log.error("飞书消息推送失败");
|
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 title = MessageType2Enum.HOMO_PARAMETER_COLLECTION.getCn() + "/" + MessageType2Enum.HOMO_PARAMETER_COLLECTION.getEn();
|
||||||
String cnContentLower = "项目: " + projectInfo.getProjectName() +
|
String cnContentLower = "项目: " + projectInfo.getProjectName() +
|
||||||
"\n发起人: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
"\n发起人: 系统通知";
|
||||||
String enContentLower = "Project: " + projectInfo.getProjectName() +
|
String enContentLower = "Project: " + projectInfo.getProjectName() +
|
||||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
if (!seven.isEmpty()) {
|
if (!seven.isEmpty()) {
|
||||||
|
|||||||
+8
@@ -59,6 +59,14 @@ public class ParamsConfigEOServiceImpl extends ServiceImpl<ParamsConfigEOMapper,
|
|||||||
public void addBatch(ParamsConfigVO paramsConfigVO) {
|
public void addBatch(ParamsConfigVO paramsConfigVO) {
|
||||||
String paramsManifestId = paramsConfigVO.getParamsManifestId();
|
String paramsManifestId = paramsConfigVO.getParamsManifestId();
|
||||||
List<ParamsConfigEO> paramsConfigEOList = paramsConfigVO.getParamsConfigEOList();
|
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;
|
int ind = 1;
|
||||||
List<ParamsConfigEO> addConfigList = new ArrayList<>(); // 新增的配置
|
List<ParamsConfigEO> addConfigList = new ArrayList<>(); // 新增的配置
|
||||||
|
|||||||
+25
-16
@@ -419,27 +419,36 @@ public class SarFileCompareItemCommentServiceImpl extends ServiceImpl<SarFileCom
|
|||||||
log.info("-------------- 开始处理需要合并的单元格 -----------------");
|
log.info("-------------- 开始处理需要合并的单元格 -----------------");
|
||||||
Set<SarFileCompareExcelMergeCell> mergeCellSet = new HashSet<>(mergeCells);
|
Set<SarFileCompareExcelMergeCell> mergeCellSet = new HashSet<>(mergeCells);
|
||||||
for (SarFileCompareExcelMergeCell mergeCell : mergeCellSet) {
|
for (SarFileCompareExcelMergeCell mergeCell : mergeCellSet) {
|
||||||
Integer leftCount = mergeCell.getLeftEnd() - mergeCell.getLeftStart() + 1;
|
Integer leftCount = 0;
|
||||||
Integer rightCount = mergeCell.getRightEnd() - mergeCell.getRightStart() + 1;
|
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();
|
Integer start = leftCount - rightCount >= 0 ? mergeCell.getLeftStart() : mergeCell.getRightStart();
|
||||||
log.info("-------------- 合并开始行数:" + start + " -----------------");
|
log.info("-------------- 合并开始行数:" + start + " -----------------");
|
||||||
Integer end = leftCount - rightCount >= 0 ? mergeCell.getLeftEnd() : mergeCell.getRightEnd();
|
Integer end = leftCount - rightCount >= 0 ? mergeCell.getLeftEnd() : mergeCell.getRightEnd();
|
||||||
log.info("-------------- 合并结束行数: " + end + " -----------------");
|
log.info("-------------- 合并结束行数: " + end + " -----------------");
|
||||||
//合并
|
//合并
|
||||||
CellRangeAddress region0 = new CellRangeAddress(start, end, 0, 0);
|
if (ObjectUtils.isNotEmpty(start)&&ObjectUtils.isNotEmpty(end)) {
|
||||||
sheet.addMergedRegion(region0);
|
CellRangeAddress region0 = new CellRangeAddress(start, end, 0, 0);
|
||||||
CellRangeAddress region1 = new CellRangeAddress(start, end, 1, 1);
|
sheet.addMergedRegion(region0);
|
||||||
sheet.addMergedRegion(region1);
|
CellRangeAddress region1 = new CellRangeAddress(start, end, 1, 1);
|
||||||
CellRangeAddress region2 = new CellRangeAddress(start, end, 2, 2);
|
sheet.addMergedRegion(region1);
|
||||||
sheet.addMergedRegion(region2);
|
CellRangeAddress region2 = new CellRangeAddress(start, end, 2, 2);
|
||||||
CellRangeAddress region4 = new CellRangeAddress(start, end, 4, 4);
|
sheet.addMergedRegion(region2);
|
||||||
sheet.addMergedRegion(region4);
|
CellRangeAddress region4 = new CellRangeAddress(start, end, 4, 4);
|
||||||
CellRangeAddress region5 = new CellRangeAddress(start, end, 5, 5);
|
sheet.addMergedRegion(region4);
|
||||||
sheet.addMergedRegion(region5);
|
CellRangeAddress region5 = new CellRangeAddress(start, end, 5, 5);
|
||||||
CellRangeAddress region6 = new CellRangeAddress(start, end, 6, 6);
|
sheet.addMergedRegion(region5);
|
||||||
sheet.addMergedRegion(region6);
|
CellRangeAddress region6 = new CellRangeAddress(start, end, 6, 6);
|
||||||
CellRangeAddress region7 = new CellRangeAddress(start, end, 8, 8);
|
sheet.addMergedRegion(region6);
|
||||||
sheet.addMergedRegion(region7);
|
CellRangeAddress region7 = new CellRangeAddress(start, end, 8, 8);
|
||||||
|
sheet.addMergedRegion(region7);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
log.info("-------------- 单元格合并成功 -----------------");
|
log.info("-------------- 单元格合并成功 -----------------");
|
||||||
}
|
}
|
||||||
|
|||||||
+112
-27
@@ -316,7 +316,14 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
String contentInfo =content;
|
String contentInfo =content;
|
||||||
String title = 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);
|
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||||
sendWebsocket(StringUtils.join(serialNumberList, ","), contentInfo);
|
sendWebsocket(StringUtils.join(serialNumberList, ","), contentInfo);
|
||||||
}
|
}
|
||||||
@@ -2201,8 +2208,39 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
+ " technical field you subscribed to, the "
|
+ " technical field you subscribed to, the "
|
||||||
+ href +" has been updated.";
|
+ href +" has been updated.";
|
||||||
String msgTitle = "The " + technologyTerritoryName + " technical field you subscribed to 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);
|
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||||
sendWebsocket(idTemp, contentInfo);
|
sendWebsocket(idTemp, contentInfo);
|
||||||
//飞书
|
//飞书
|
||||||
@@ -2210,7 +2248,7 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
String contentInfoFeiShu = "In the "+ technologyTerritoryName
|
String contentInfoFeiShu = "In the "+ technologyTerritoryName
|
||||||
+ " technical field you subscribed to, the "+
|
+ " technical field you subscribed to, the "+
|
||||||
category + " " + serialNumber +" has been updated.";
|
category + " " + serialNumber +" has been updated.";
|
||||||
String contentInfoFeiShuCn = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + category + " " + serialNumber;;
|
String contentInfoFeiShuCn = "您所订阅的" + technologyTerritoryName + "技术领域中更新了" + category + " " + serialNumber;
|
||||||
|
|
||||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
feishuMsgVo.setTitle(MessageTypeEnum.READ.getNameCn()+"/"+MessageTypeEnum.READ.getName());
|
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("domainId", map.get("technology_territory"));
|
||||||
mapTemp.put("documentId", map.get("id"));
|
mapTemp.put("documentId", map.get("id"));
|
||||||
//订阅技术领域的人和订阅该条标准的人
|
//订阅技术领域的人和订阅该条标准的人
|
||||||
// List<String> userIdList = domainUserRelService.queryDomainUserRelInfo(mapTemp);
|
|
||||||
//订阅技术领域发消息
|
//订阅技术领域发消息
|
||||||
List<DomainUserRel> domainUserRelList = domainManageService.list();
|
List<DomainUserRel> domainUserRelList = domainManageService.list();
|
||||||
// List<String> thirdIdListAll = new ArrayList<>();
|
|
||||||
// List<String> userListAll = new ArrayList<>();
|
|
||||||
List<String> thirdIdList = new ArrayList<>();
|
List<String> thirdIdList = new ArrayList<>();
|
||||||
List<String> userList = new ArrayList<>();
|
List<String> userList = new ArrayList<>();
|
||||||
String technologyTerritoryNameEn = "";
|
String technologyTerritoryNameEn = "";
|
||||||
@@ -3388,12 +3423,6 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
if(sysUsersFeishu.size() != 0){
|
if(sysUsersFeishu.size() != 0){
|
||||||
thirdIdList = sysUsersFeishu.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
thirdIdList = sysUsersFeishu.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||||
userList = sysUsersFeishu.stream().map(SysUser::getId).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){
|
if(domainIdList.size() != 0){
|
||||||
@@ -3429,19 +3458,12 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(sysUsers)) {
|
if (org.apache.commons.collections4.CollectionUtils.isNotEmpty(sysUsers)) {
|
||||||
userIdListUpdate = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList());
|
userIdListUpdate = sysUsers.stream().map(SysUser::getId).collect(Collectors.toList());
|
||||||
userIdListUpdateFeishu = sysUsers.stream().map(SysUser::getThirdId).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){
|
if(thirdIdList.size() != 0){
|
||||||
// thirdIdListAll = thirdIdListAll.stream().distinct().collect(Collectors.toList());
|
|
||||||
String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
String contentInfoFei = "In the " + technologyTerritoryNameEn + " technical field you subscribed to, the " +
|
||||||
category + " " + serialNumber+" has been updated.";
|
category + " " + serialNumber+" has been updated.";
|
||||||
String contentInfoFeiCn = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + serialNumber;
|
String contentInfoFeiCn = "您所订阅的" + technologyTerritoryNameEn + "技术领域中更新了" + categoryCn + " " + serialNumber;
|
||||||
@@ -3472,8 +3494,30 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
//您订阅的XXX已被修改
|
//您订阅的XXX已被修改
|
||||||
String contentInfo = "In the " + technologyTerritoryNameEn + " technical field you subscribed to," +sysUser.getUsername()+" changed the "+ href + " " + sbStr.toString();
|
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 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);
|
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||||
sendWebsocket((String) map.get("id"), contentInfo);
|
sendWebsocket((String) map.get("id"), contentInfo);
|
||||||
}
|
}
|
||||||
@@ -3487,17 +3531,36 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
"&title=" + title +
|
"&title=" + title +
|
||||||
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>";
|
"&serial_number=" + serialNumber + "'" + " target='_blank'>" + serialNumber + "</a>";
|
||||||
String content = "";
|
String content = "";
|
||||||
if (StringUtils.isNotBlank(sbStr.toString())) {
|
if (StringUtils.isNotBlank(sbStr.toString()) && StringUtils.isNotBlank(sbStrCn)) {
|
||||||
//去掉a标签
|
//去掉a标签
|
||||||
sbStr = sbStr.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", "");
|
sbStr = sbStr.replaceAll("<text class='highlight-class'>", "").replaceAll("</text>", "");
|
||||||
//您订阅的XXX已被修改
|
//您订阅的XXX已被修改
|
||||||
content = "In the "+category + " " + serialNumber+" you subscribed to, has been modified,Please pay attention to check.";
|
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 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);
|
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||||
sendWebsocket((String) map.get("id"), contentInfo);
|
sendWebsocket((String) map.get("id"), contentInfoYes);
|
||||||
}
|
}
|
||||||
//订阅文档的飞书消息
|
//订阅文档的飞书消息
|
||||||
try {
|
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 contentInfo = "New numbering implemented, please note update status of alternate numbering " + sbStr;
|
||||||
String msgTitle = contentInfo;
|
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);
|
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||||
sendWebsocket(StringUtils.join(serialNumberListTemp, ","), contentInfo);
|
sendWebsocket(StringUtils.join(serialNumberListTemp, ","), contentInfo);
|
||||||
//飞书
|
//飞书
|
||||||
@@ -3621,7 +3690,9 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
String content,
|
String content,
|
||||||
String contentInfo,
|
String contentInfo,
|
||||||
String messageType,
|
String messageType,
|
||||||
String initiator) {
|
String initiator,
|
||||||
|
String contentCn,
|
||||||
|
String contentInfoCn) {
|
||||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||||
sysAnnouncement.setInitiator(initiator);
|
sysAnnouncement.setInitiator(initiator);
|
||||||
sysAnnouncement.setDelFlag("0");
|
sysAnnouncement.setDelFlag("0");
|
||||||
@@ -3633,6 +3704,8 @@ public class BussDocumentLibraryEOServiceImpl extends ServiceImpl<BussDocumentLi
|
|||||||
sysAnnouncement.setTitile(title);
|
sysAnnouncement.setTitile(title);
|
||||||
sysAnnouncement.setMsgContent(content);
|
sysAnnouncement.setMsgContent(content);
|
||||||
sysAnnouncement.setMsgContentInfo(contentInfo);
|
sysAnnouncement.setMsgContentInfo(contentInfo);
|
||||||
|
sysAnnouncement.setMsgContentCn(contentCn);
|
||||||
|
sysAnnouncement.setMsgContentInfoCn(contentInfoCn);
|
||||||
sysAnnouncement.setUserIds(StringUtils.join(userIdList, ","));
|
sysAnnouncement.setUserIds(StringUtils.join(userIdList, ","));
|
||||||
return sysAnnouncement;
|
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 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 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);
|
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||||
sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
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 com.jero.modules.system.service.impl.SysCategoryServiceImpl;
|
||||||
import org.apache.commons.collections.MapUtils;
|
import org.apache.commons.collections.MapUtils;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.apache.shiro.SecurityUtils;
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -251,10 +252,14 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
@Override
|
@Override
|
||||||
public IPage<DummyInventoryBaseEO> getPageInfo(Page<DummyInventoryBaseEO> page, QueryWrapper<DummyInventoryBaseEO> queryWrapper) {
|
public IPage<DummyInventoryBaseEO> getPageInfo(Page<DummyInventoryBaseEO> page, QueryWrapper<DummyInventoryBaseEO> queryWrapper) {
|
||||||
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
queryWrapper.and(query->{
|
//系统管理
|
||||||
query.in("create_by",sysUser.getUsername()).in("state",InventoryStateEnum.DRAFT.getValue())
|
boolean administrator = sysUserService.isAdministrator();
|
||||||
.or().in("state",InventoryStateEnum.ISSUE.getValue());
|
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->{
|
// queryWrapper.or(query->{
|
||||||
// query.in("state",InventoryStateEnum.ISSUE.getValue());
|
// query.in("state",InventoryStateEnum.ISSUE.getValue());
|
||||||
// });
|
// });
|
||||||
@@ -320,19 +325,19 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
|
|
||||||
DummyInventoryBaseEO baseEO = queryById(dummyInventoryBaseEO.getId());
|
DummyInventoryBaseEO baseEO = queryById(dummyInventoryBaseEO.getId());
|
||||||
List<String> createByNameList =new ArrayList<>();
|
List<String> createByNameList =new ArrayList<>();
|
||||||
if (StringUtils.isNotBlank(baseEO.getCreateBy())) {
|
// if (StringUtils.isNotBlank(baseEO.getCreateBy())) {
|
||||||
createByNameList = Arrays.asList(baseEO.getCreateBy().split(","));
|
// createByNameList = Arrays.asList(baseEO.getCreateBy().split(","));
|
||||||
|
//
|
||||||
if (CollectionUtils.isNotEmpty(createByNameList)){
|
// if (CollectionUtils.isNotEmpty(createByNameList)){
|
||||||
if (!createByNameList.contains(loginUserName)) {
|
// if (!createByNameList.contains(loginUserName)) {
|
||||||
if (CutEnum.CN.getValue().equals(dummyInventoryBaseEO.getCut())) {
|
// if (CutEnum.CN.getValue().equals(dummyInventoryBaseEO.getCut())) {
|
||||||
throw new JeroBootException("当前用户非创建者,无法发布");
|
// throw new JeroBootException("当前用户非创建者,无法发布");
|
||||||
} else {
|
// } else {
|
||||||
throw new JeroBootException("The current user is not the creator and cannot be issued.");
|
// throw new JeroBootException("The current user is not the creator and cannot be issued.");
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
UpdateWrapper<DummyInventoryBaseEO> baseWrapper=new UpdateWrapper<>();
|
UpdateWrapper<DummyInventoryBaseEO> baseWrapper=new UpdateWrapper<>();
|
||||||
baseWrapper.set("state",dummyInventoryBaseEO.getState());
|
baseWrapper.set("state",dummyInventoryBaseEO.getState());
|
||||||
@@ -409,31 +414,83 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
|
|
||||||
//发消息
|
//发消息
|
||||||
int count = 1;
|
int count = 1;
|
||||||
|
List<String> hrefListAdd = new ArrayList<>();
|
||||||
if(serialNumberAddList.size() != 0){
|
if(serialNumberAddList.size() != 0){
|
||||||
List<String> hrefList = new ArrayList<>();
|
|
||||||
for (DummyInventoryInfoEO dummyInventoryInfoEO : collectAdd) {
|
for (DummyInventoryInfoEO dummyInventoryInfoEO : collectAdd) {
|
||||||
String href = "<a href='/docManage/library/detail?id=" + dummyInventoryInfoEO.getBussDocumentLibraryId() +
|
String href = "<a href='/docManage/library/detail?id=" + dummyInventoryInfoEO.getBussDocumentLibraryId() +
|
||||||
"&title=" + dummyInventoryInfoEO.getTitle() +
|
"&title=" + dummyInventoryInfoEO.getTitle() +
|
||||||
"&serial_number=" + dummyInventoryInfoEO.getSerialNumber() + "'" + " target='_blank'>" + dummyInventoryInfoEO.getSerialNumber() + "</a>";
|
"&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,",") + " ";
|
contentLogFeishu += count+". New regulations: " + StringUtils.join(serialNumberAddList,",") + " ";
|
||||||
count++;
|
count++;
|
||||||
}
|
}
|
||||||
|
List<String> hrefListDelete = new ArrayList<>();
|
||||||
if(serialNumberDeleteList.size() != 0){
|
if(serialNumberDeleteList.size() != 0){
|
||||||
List<String> hrefList = new ArrayList<>();
|
|
||||||
for (DummyInventoryInfoEO dummyInventoryInfoEO : collectDelete) {
|
for (DummyInventoryInfoEO dummyInventoryInfoEO : collectDelete) {
|
||||||
String href = "<a href='/docManage/library/detail?id=" + dummyInventoryInfoEO.getBussDocumentLibraryId() +
|
String href = "<a href='/docManage/library/detail?id=" + dummyInventoryInfoEO.getBussDocumentLibraryId() +
|
||||||
"&title=" + dummyInventoryInfoEO.getTitle() +
|
"&title=" + dummyInventoryInfoEO.getTitle() +
|
||||||
"&serial_number=" + dummyInventoryInfoEO.getSerialNumber() + "'" + " target='_blank'>" + dummyInventoryInfoEO.getSerialNumber() + "</a>";
|
"&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,",") + " ";
|
contentLogFeishu += count + ". Remove regulations: " + StringUtils.join(serialNumberDeleteList,",") + " ";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(serialNumberAddList.size() != 0 || serialNumberDeleteList.size() != 0){
|
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> userNameList = dummyReadEOService.queryReadUserInfo(dummyInventoryBaseEO.getId());
|
||||||
List<String> thirdIdList = new ArrayList<>();
|
List<String> thirdIdList = new ArrayList<>();
|
||||||
if(userNameList.size() != 0){
|
if(userNameList.size() != 0){
|
||||||
@@ -442,7 +499,14 @@ public class DummyInventoryBaseEOServiceImpl extends ServiceImpl<DummyInventoryB
|
|||||||
if(userIdList.size() != 0){
|
if(userIdList.size() != 0){
|
||||||
//封装消息的实体类
|
//封装消息的实体类
|
||||||
String title = "The "+ baseEO.getName()+" virtual list you subscribed to has been updated.";
|
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);
|
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||||
bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title);
|
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.";
|
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.
|
//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.";
|
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);
|
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||||
bussDocumentLibraryEOService.sendWebsocket(dummyInventoryBaseEO.getId(), title);
|
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";
|
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);
|
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||||
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo);
|
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.";
|
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";
|
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);
|
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||||
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo);
|
bussDocumentLibraryEOService.sendWebsocket(idTemp, contentInfo);
|
||||||
//飞书
|
//飞书
|
||||||
|
|||||||
+25
-6
@@ -512,9 +512,19 @@ public class FeishuServiceImpl implements IFeishuService {
|
|||||||
contentSb.append("\"tag\": \"div\",");
|
contentSb.append("\"tag\": \"div\",");
|
||||||
contentSb.append("\"text\": {");
|
contentSb.append("\"text\": {");
|
||||||
contentSb.append("\"content\": \"" + "编号: " + feishuMsgVo.getRegulationNo() + "\n")
|
contentSb.append("\"content\": \"" + "编号: " + feishuMsgVo.getRegulationNo() + "\n")
|
||||||
.append("标题: "+feishuMsgVo.getDocumentTitleCn() + "\n")
|
.append("标题: "+feishuMsgVo.getDocumentTitleCn() + "\n");
|
||||||
.append("新车型实施日期: "+feishuMsgVo.getNewTypeExecutionDate()+ "\n")
|
if (StringUtils.isNotBlank(feishuMsgVo.getNewTypeExecutionDate())) {
|
||||||
.append("在产车实施日期: "+feishuMsgVo.getNewVehicleExecutionDate()+ "\",");
|
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("\"tag\": \"lark_md\"");
|
||||||
contentSb.append("}");
|
contentSb.append("}");
|
||||||
contentSb.append("},");
|
contentSb.append("},");
|
||||||
@@ -535,9 +545,18 @@ public class FeishuServiceImpl implements IFeishuService {
|
|||||||
contentSb.append("\"tag\": \"div\",");
|
contentSb.append("\"tag\": \"div\",");
|
||||||
contentSb.append("\"text\": {");
|
contentSb.append("\"text\": {");
|
||||||
contentSb.append("\"content\": \"" + "Regulation No: " + feishuMsgVo.getRegulationNo() + "\n")
|
contentSb.append("\"content\": \"" + "Regulation No: " + feishuMsgVo.getRegulationNo() + "\n")
|
||||||
.append("Title: " + feishuMsgVo.getDocumentTitleEn() + "\n")
|
.append("Title: " + feishuMsgVo.getDocumentTitleEn() + "\n");
|
||||||
.append("New Type Execution Date: " + feishuMsgVo.getNewTypeExecutionDate() + "\n")
|
if (StringUtils.isNotBlank(feishuMsgVo.getNewTypeExecutionDate())) {
|
||||||
.append("New Vehicle Execution Date: " + feishuMsgVo.getNewVehicleExecutionDate() + "\",");
|
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("\"tag\": \"lark_md\"");
|
||||||
contentSb.append("}");
|
contentSb.append("}");
|
||||||
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.constant.enums.MsgColorEnum;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
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.service.IFeishuService;
|
||||||
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
import com.jero.modules.feishu.vo.FeishuMsg2Vo;
|
||||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||||
@@ -85,6 +87,8 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
|||||||
private IProcessInfoEOService processInfoEOService;
|
private IProcessInfoEOService processInfoEOService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IFeishuService feishuService;
|
private IFeishuService feishuService;
|
||||||
|
@Autowired
|
||||||
|
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 保存
|
* 保存
|
||||||
@@ -296,12 +300,15 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
|||||||
//String msgTitle = "";
|
//String msgTitle = "";
|
||||||
|
|
||||||
LawsOpinionGatherEO lawsOpinionGatherEO = queryById(lawsOpinionGatherId);
|
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 initiator = "";
|
||||||
String title = MessageType2Enum.REGULATION_OPINION_COLLECTION.getCn() + "/" + MessageType2Enum.REGULATION_OPINION_COLLECTION.getEn();
|
String title = MessageType2Enum.REGULATION_OPINION_COLLECTION.getCn() + "/" + MessageType2Enum.REGULATION_OPINION_COLLECTION.getEn();
|
||||||
String endTime = new SimpleDateFormat("yyyy-MM-dd").format(lawsOpinionGatherEO.getEndTime());//截止日期
|
String endTime = new SimpleDateFormat("yyyy-MM-dd").format(lawsOpinionGatherEO.getEndTime());//截止日期
|
||||||
String prcNum = lawsOpinionGatherPrcInfo.get("prcNum");
|
//String prcNum = lawsOpinionGatherPrcInfo.get("prcNum");
|
||||||
String prcName = lawsOpinionGatherPrcInfo.get("prcName");
|
//String prcName = lawsOpinionGatherPrcInfo.get("prcName");
|
||||||
String cnContentUpper = "";
|
String cnContentUpper = "";
|
||||||
String cnContentLower = "";
|
String cnContentLower = "";
|
||||||
String enContentUpper = "";
|
String enContentUpper = "";
|
||||||
@@ -317,13 +324,13 @@ public class LawsOpinionGatherEOServiceImpl extends ServiceImpl<LawsOpinionGathe
|
|||||||
|
|
||||||
initiator = currentUser.getUsername();
|
initiator = currentUser.getUsername();
|
||||||
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
|
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
|
||||||
cnContentLower = "编号: " + prcNum +
|
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||||
"\n标题: " + prcName +
|
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||||
"\n发起人: " + initiator +
|
"\n发起人: " + initiator +
|
||||||
"\n截止时间: " + endTime;
|
"\n截止时间: " + endTime;
|
||||||
enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!";
|
enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!";
|
||||||
enContentLower = "Regulation No: " + prcNum +
|
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||||
"\nTitle: " + prcName +
|
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator +
|
"\nInitiator: " + initiator +
|
||||||
"\nDue Date: " + endTime;
|
"\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.";
|
//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";
|
//msgTitle = "You have a Collection of Legislative Comments task completed";
|
||||||
|
|
||||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
initiator = currentUser.getUsername();
|
||||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"已提交反馈意见,请查看";
|
cnContentUpper = "您好,"+ currentUser.getUsername() +"已提交反馈意见,请查看";
|
||||||
cnContentLower = "编号: " + prcNum +
|
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||||
"\n标题: " + prcName +
|
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||||
"\n发起人: " + initiator +
|
"\n发起人: " + initiator +
|
||||||
"\n截止时间: " + endTime;
|
"\n截止时间: " + endTime;
|
||||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has submitted the comments. Please check it";
|
enContentUpper = "Hello! "+ currentUser.getUsername() +" has submitted the comments. Please check it";
|
||||||
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") +
|
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||||
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") +
|
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator +
|
"\nInitiator: " + initiator +
|
||||||
"\nDue Date: " + endTime;
|
"\nDue Date: " + endTime;
|
||||||
|
|
||||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) {
|
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) {
|
||||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
|
||||||
|
|
||||||
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
|
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
|
||||||
cnContentLower = "编号: " + prcNum +
|
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||||
"\n标题: " + prcName +
|
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||||
"\n发起人: " + initiator +
|
"\n发起人: 系统通知" ;
|
||||||
"\n截止时间: " + endTime;
|
|
||||||
enContentUpper = "Hello! This task will expire in 3 days. Please check and address the task in a timely manner. Thank you!";
|
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") +
|
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||||
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") +
|
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator +
|
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
"\nDue Date: " + endTime;
|
|
||||||
|
|
||||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_TODAY_MSG.getValue())){
|
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_TODAY_MSG.getValue())){
|
||||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
|
||||||
|
|
||||||
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
|
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
|
||||||
cnContentLower = "编号: " + prcNum +
|
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||||
"\n标题: " + prcName +
|
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||||
"\n发起人: " + initiator;
|
"\n发起人: 系统通知";
|
||||||
enContentUpper = "Hello! This task will expire today. Please check and address the task ASAP. Thank you!";
|
enContentUpper = "Hello! This task will expire today. Please check and address the task ASAP. Thank you!";
|
||||||
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") +
|
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||||
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") +
|
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator;
|
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
|
|
||||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_COMPLETE_MSG.getValue())) {
|
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_COMPLETE_MSG.getValue())) {
|
||||||
userIdList.add((String) jsonObject.get("initiatorUserId"));
|
userIdList.add((String) jsonObject.get("initiatorUserId"));
|
||||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
|
||||||
|
|
||||||
cnContentUpper = "您好,该任务已完成,请查看";
|
cnContentUpper = "您好,该任务已完成,请查看";
|
||||||
cnContentLower = "编号: " + prcNum +
|
cnContentLower = "编号: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||||
"\n标题: " + prcName +
|
"\n标题: " + lawsOpinionGatherEO.getTitle() +
|
||||||
"\n发起人: " + initiator;
|
"\n发起人: 系统通知"+
|
||||||
|
"\n截止时间: " + endTime;
|
||||||
enContentUpper = "Hello! The task is completed. Please check it.";
|
enContentUpper = "Hello! The task is completed. Please check it.";
|
||||||
enContentLower = "Regulation No: " + lawsOpinionGatherPrcInfo.get("prcNum") +
|
enContentLower = "Regulation No: " + lawsOpinionGatherEO.getSerialNumber() +
|
||||||
"\nTitle: " + lawsOpinionGatherPrcInfo.get("prcName") +
|
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator;
|
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName() +
|
||||||
|
"\nDue Date: " + endTime;
|
||||||
}
|
}
|
||||||
/*else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_MSG.getValue())){
|
/*else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_OPOMOPM_GATHER_ENALUATOR_EXPIRE_REMIND_MSG.getValue())){
|
||||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
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());
|
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 {
|
try {
|
||||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
feishuMsgVo.setTitle(title);
|
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.common.system.vo.LoginUser;
|
||||||
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
import com.jero.generater.modules.online.cgform.entity.OnlCgformField;
|
||||||
import com.jero.generater.modules.online.cgform.service.impl.OnlCgformFieldServiceImpl;
|
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.enums.FieldTypeEnum;
|
||||||
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
import com.jero.modules.document.mapper.BussDocumentLibraryEOMapper;
|
||||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||||
@@ -628,11 +629,14 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
String initiator = "";
|
String initiator = "";
|
||||||
String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId");
|
String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId");
|
||||||
LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = queryById(lawsTechnologyEvaluationId);
|
LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = queryById(lawsTechnologyEvaluationId);
|
||||||
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId);
|
//LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId);
|
||||||
String number = flowDetailEO.getPrcNum();
|
//String number = flowDetailEO.getPrcNum();
|
||||||
String name = flowDetailEO.getPrcName();
|
//String name = flowDetailEO.getPrcName();
|
||||||
String endTime = new SimpleDateFormat("yyyy-MM-dd").format(lawsTechnologyEvaluationEO.getEndTime());
|
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 title = MessageType2Enum.REGULATION_TECHNICAL_ASSESSMENT.getCn() + "/" + MessageType2Enum.REGULATION_TECHNICAL_ASSESSMENT.getEn();
|
||||||
String cnContentUpper = "";
|
String cnContentUpper = "";
|
||||||
String cnContentLower = "";
|
String cnContentLower = "";
|
||||||
@@ -650,13 +654,13 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
|
|
||||||
initiator = currentUser.getUsername();
|
initiator = currentUser.getUsername();
|
||||||
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
|
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
|
||||||
cnContentLower = "编号:" + number +
|
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\n标题: " + name +
|
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||||
"\n发起人: " + initiator +
|
"\n发起人: " + initiator +
|
||||||
"\n截止时间: " + endTime;
|
"\n截止时间: " + endTime;
|
||||||
enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!";
|
enContentUpper = "Hello! Please check and address the task in a timely manner. Thank you!";
|
||||||
enContentLower = "Regulation No :" + number +
|
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\nTitle: " + name +
|
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator +
|
"\nInitiator: " + initiator +
|
||||||
"\nDue Date: " + endTime;
|
"\nDue Date: " + endTime;
|
||||||
}else if(StringUtils.equals(msgType,MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_ENALUATOR_SUBMIT_MSG.getValue())){
|
}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.";
|
//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";
|
//msgTitle = "You have a Regulatory and technical assessment task to complete";
|
||||||
|
|
||||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
initiator = currentUser.getUsername();
|
||||||
cnContentUpper = "您好,"+ currentUser.getUsername() +"已提交评估结果,请审核";
|
cnContentUpper = "您好,"+ currentUser.getUsername() +"已提交评估结果,请审核";
|
||||||
cnContentLower = "编号:" + number +
|
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\n标题: " + name +
|
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||||
"\n发起人: " + initiator +
|
"\n发起人: " + initiator +
|
||||||
"\n截止时间: " + endTime;
|
"\n截止时间: " + endTime;
|
||||||
enContentUpper = "Hello! "+ currentUser.getUsername() +" has submitted the assessment result. Please review it";
|
enContentUpper = "Hello! "+ currentUser.getUsername() +" has submitted the assessment result. Please review it";
|
||||||
enContentLower = "Regulation No :" + number +
|
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\nTitle: " + name +
|
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator +
|
"\nInitiator: " + initiator +
|
||||||
"\nDue Date: " + endTime;
|
"\nDue Date: " + endTime;
|
||||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_ACCEPTED_MSG.getValue())){
|
}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 的法规技术评估流程已通过。
|
//您提交的GB 7258 的法规技术评估流程已通过。
|
||||||
//msgContentEN = "The regulatory and technical assessment process for "+serialNumber+" you submitted has passed.";
|
//msgContentEN = "The regulatory and technical assessment process for "+serialNumber+" you submitted has passed.";
|
||||||
//msgTitle = "You have a Regulatory and technical assessment task completed";
|
//msgTitle = "You have a Regulatory and technical assessment task completed";
|
||||||
|
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
||||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
||||||
|
initiator = currentUser.getUsername();
|
||||||
cnContentUpper = "您好,您提交的评估结果已通过";
|
cnContentUpper = "您好,您提交的评估结果已通过";
|
||||||
cnContentLower = "编号:" + number +
|
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\n标题: " + name +
|
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||||
"\n发起人: " + initiator +
|
"\n发起人: " + initiator +
|
||||||
"\n截止时间: " + endTime;
|
"\n截止时间: " + endTime;
|
||||||
enContentUpper = "Hello! The assessment result you submitted has passed";
|
enContentUpper = "Hello! The assessment result you submitted has passed";
|
||||||
enContentLower = "Regulation No :" + number +
|
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\nTitle: " + name +
|
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator +
|
"\nInitiator: " + initiator +
|
||||||
"\nDue Date: " + endTime;
|
"\nDue Date: " + endTime;
|
||||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_AUDIT_REJECTED_MSG.getValue())){
|
}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 的法规技术评估流程已被退回,请及时查看处理。
|
//您提交的GB 7258 的法规技术评估流程已被退回,请及时查看处理。
|
||||||
//msgContentEN = "The regulatory and technical assessment process of "+serialNumber+" you submitted has been returned, Please check and address it in time.";
|
//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";
|
//msgTitle = "You have a Regulatory and technical assessment task to complete";
|
||||||
|
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
||||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
||||||
|
initiator = currentUser.getUsername();
|
||||||
cnContentUpper = "您好,您提交的评估结果被退回,请及时查看处理";
|
cnContentUpper = "您好,您提交的评估结果被退回,请及时查看处理";
|
||||||
cnContentLower = "编号:" + number +
|
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\n标题: " + name +
|
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||||
"\n发起人: " + initiator +
|
"\n发起人: " + initiator +
|
||||||
"\n截止时间: " + endTime;
|
"\n截止时间: " + endTime;
|
||||||
enContentUpper = "Hello! The assessment result you submitted has been rejected. Please check and address it in a timely manner";
|
enContentUpper = "Hello! The assessment result you submitted has been rejected. Please check and address it in a timely manner";
|
||||||
enContentLower = "Regulation No :" + number +
|
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\nTitle: " + name +
|
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator +
|
"\nInitiator: " + initiator +
|
||||||
"\nDue Date: " + endTime;
|
"\nDue Date: " + endTime;
|
||||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) {
|
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())) {
|
||||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
|
||||||
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
|
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
|
||||||
cnContentLower = "编号:" + number +
|
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\n标题: " + name +
|
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||||
"\n发起人: " + initiator;
|
"\n发起人: 系统通知";
|
||||||
enContentUpper = "Hello! This task will expire in 3 days. Please check and address the task in a timely manner. Thank you!";
|
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 +
|
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\nTitle: " + name +
|
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator;
|
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||||
|
|
||||||
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_TODAY_MSG.getValue())) {
|
} else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_TODAY_MSG.getValue())) {
|
||||||
initiator = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
|
||||||
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
|
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
|
||||||
cnContentLower = "编号:" + number +
|
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\n标题: " + name +
|
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||||
"\n发起人: " + initiator;
|
"\n发起人: 系统通知";
|
||||||
enContentUpper = "Hello! This task will expire today. Please check and address the task ASAP. Thank you!";
|
enContentUpper = "Hello! This task will expire today. Please check and address the task ASAP. Thank you!";
|
||||||
enContentLower = "Regulation No :" + number +
|
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\nTitle: " + name +
|
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator;
|
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
userIdList = (List<String>) jsonObject.get("userIdList");
|
userIdList = (List<String>) jsonObject.get("userIdList");
|
||||||
|
|
||||||
} /*else if (StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_MSG.getValue())) {
|
} /*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());
|
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 {
|
try {
|
||||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
feishuMsgVo.setTitle(title);
|
feishuMsgVo.setTitle(title);
|
||||||
|
|||||||
+78
-8
@@ -1,29 +1,43 @@
|
|||||||
package com.jero.modules.problemKnowledgeBase.service.impl;
|
package com.jero.modules.problemKnowledgeBase.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
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.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.ProblemKnowledgeBaseCommentEO;
|
||||||
|
import com.jero.modules.problemKnowledgeBase.entity.ProblemKnowledgeBaseEO;
|
||||||
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseCommentEOMapper;
|
import com.jero.modules.problemKnowledgeBase.mapper.ProblemKnowledgeBaseCommentEOMapper;
|
||||||
import com.jero.modules.problemKnowledgeBase.service.IProblemKnowledgeBaseCommentEOService;
|
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.problemKnowledgeBase.vo.ProblemKnowledgeBaseCommentVO;
|
||||||
import com.jero.modules.project.entity.ProblemKnowledgeBaseReplyEO;
|
import com.jero.modules.project.entity.ProblemKnowledgeBaseReplyEO;
|
||||||
import com.jero.modules.project.service.IProblemKnowledgeBaseReplyEOService;
|
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.collections4.CollectionUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
import org.apache.shiro.SecurityUtils;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
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.Propagation;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
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: 问题知识库评论表
|
* @Description: 问题知识库评论表
|
||||||
@@ -37,6 +51,24 @@ public class ProblemKnowledgeBaseCommentEOServiceImpl extends ServiceImpl<Proble
|
|||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
private IProblemKnowledgeBaseReplyEOService problemKnowledgeBaseReplyEOService;
|
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.setCreateTime(now);
|
||||||
problemKnowledgeBaseCommentEO.setUpdateTime(now);
|
problemKnowledgeBaseCommentEO.setUpdateTime(now);
|
||||||
save(problemKnowledgeBaseCommentEO);
|
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
|
@Override
|
||||||
public void add(ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
public void add(ProblemKnowledgeBaseEO problemKnowledgeBaseEO) {
|
||||||
Date now = new Date();
|
Date now = new Date();
|
||||||
|
String problemKnowledgeBaseId = UUID.randomUUID().toString().replace("-", "");
|
||||||
|
problemKnowledgeBaseEO.setId(problemKnowledgeBaseId);
|
||||||
problemKnowledgeBaseEO.setCreateTime(now);
|
problemKnowledgeBaseEO.setCreateTime(now);
|
||||||
problemKnowledgeBaseEO.setUpdateTime(now);
|
problemKnowledgeBaseEO.setUpdateTime(now);
|
||||||
|
|
||||||
@@ -881,8 +883,24 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
+ "'>" + " View details" + "</a>";
|
+ "'>" + " View details" + "</a>";
|
||||||
String contentInfo = msgContentEN + " " + href;
|
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.sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
||||||
this.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
this.sendWebsocket(StringUtils.join(thirdIdList, ","), contentInfo);
|
||||||
//飞书
|
//飞书
|
||||||
@@ -922,7 +940,9 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
String content,
|
String content,
|
||||||
String contentInfo,
|
String contentInfo,
|
||||||
String messageType,
|
String messageType,
|
||||||
String initiator) {
|
String initiator,
|
||||||
|
String contentCn,
|
||||||
|
String contentInfoCn) {
|
||||||
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
SysAnnouncement sysAnnouncement = new SysAnnouncement();
|
||||||
sysAnnouncement.setInitiator(initiator);
|
sysAnnouncement.setInitiator(initiator);
|
||||||
sysAnnouncement.setDelFlag("0");
|
sysAnnouncement.setDelFlag("0");
|
||||||
@@ -934,6 +954,8 @@ public class ProblemKnowledgeBaseEOServiceImpl extends ServiceImpl<ProblemKnowle
|
|||||||
sysAnnouncement.setMsgContent(content);
|
sysAnnouncement.setMsgContent(content);
|
||||||
sysAnnouncement.setMsgContentInfo(contentInfo);
|
sysAnnouncement.setMsgContentInfo(contentInfo);
|
||||||
sysAnnouncement.setUserIds(StringUtils.join(userIdList, ","));
|
sysAnnouncement.setUserIds(StringUtils.join(userIdList, ","));
|
||||||
|
sysAnnouncement.setMsgContentCn(contentCn);
|
||||||
|
sysAnnouncement.setMsgContentInfoCn(contentInfoCn);
|
||||||
return sysAnnouncement;
|
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.dummy.service.IDummyInventoryBaseEOService;
|
||||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||||
|
import com.jero.modules.project.vo.ProjectTaskUrgVo;
|
||||||
import com.jero.modules.system.entity.SysRole;
|
import com.jero.modules.system.entity.SysRole;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
@@ -456,4 +457,13 @@ public class ProjectLawsInventoryEOController extends JeroController<ProjectLaws
|
|||||||
return result;
|
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 javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 项目库-任务清单表
|
* @Description: 项目库-任务清单表
|
||||||
* @Author: jero-boot
|
* @Author: jero-boot
|
||||||
* @Date: 2022-04-29
|
* @Date: 2022-04-29
|
||||||
@@ -231,4 +232,16 @@ public class ProjectTaskInventoryEOController extends JeroController<ProjectTask
|
|||||||
List<String> msgList = projectTaskInventoryEOService.verifyRoleCode(projectTaskInventoryVO);
|
List<String> msgList = projectTaskInventoryEOService.verifyRoleCode(projectTaskInventoryVO);
|
||||||
return Result.OK(msgList);
|
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 = "序号")
|
@ApiModelProperty(value = "序号")
|
||||||
private String serialNumber;
|
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"),
|
VERIFY_AFFIRM_LINK("验证符合性确认链接","3","/ProjectDetails?id=","&type=103"),
|
||||||
DESIGN_AFFIRM_LINK("设计符合性确认链接","4","/ProjectDetails?id=","&type=103"),
|
DESIGN_AFFIRM_LINK("设计符合性确认链接","4","/ProjectDetails?id=","&type=103"),
|
||||||
TASK_AFFIRM_LINK("任务确认链接","2","/ProcessCenter",""),
|
TASK_AFFIRM_LINK("任务确认链接","2","/ProcessCenter",""),
|
||||||
|
FGPG_TODO_CENTER_LINK("法规评估任务待办中心链接","88","/regulatoryAssessmentTasks",""),
|
||||||
|
XMCS_TODO_CENTER_LINK("项目参数任务待办中心链接","99","/projectParameterTasks",""),
|
||||||
COMPLIANCE_PROCESS_DETAIL_LINK("符合性流程明细页路由","2","/taskListProcess",""),
|
COMPLIANCE_PROCESS_DETAIL_LINK("符合性流程明细页路由","2","/taskListProcess",""),
|
||||||
|
|
||||||
PROBLEM_KNOWLEDGE_BASE_DETAIL("问题知识库,详情页","","/problemKnowledgeBaseView",""),
|
PROBLEM_KNOWLEDGE_BASE_DETAIL("问题知识库,详情页","","/problemKnowledgeBaseView",""),
|
||||||
|
|||||||
+241
-79
@@ -1,7 +1,13 @@
|
|||||||
package com.jero.modules.project.job;
|
package com.jero.modules.project.job;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
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.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.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
||||||
import com.jero.modules.project.entity.ProjectLibraryBase;
|
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.ProjectNameInfoEOMapper;
|
||||||
import com.jero.modules.project.mapper.ProjectYearNameInfoEOMapper;
|
import com.jero.modules.project.mapper.ProjectYearNameInfoEOMapper;
|
||||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
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 lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.quartz.Job;
|
import org.quartz.Job;
|
||||||
import org.quartz.JobExecutionContext;
|
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.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -49,16 +59,24 @@ public class InventoryAffirmJob implements Job {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private ProjectYearNameInfoEOMapper projectYearNameInfoEOMapper;
|
private ProjectYearNameInfoEOMapper projectYearNameInfoEOMapper;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IFeishuService feishuService;
|
||||||
|
|
||||||
@Value(value = "${jero.backUrl}")
|
@Value(value = "${jero.backUrl}")
|
||||||
private String backUrl;
|
private String backUrl;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService sysUserService;
|
||||||
|
@Autowired
|
||||||
|
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 清单任务到达截止时间后,给用户发送消息
|
* 清单任务到达截止时间后,给用户发送消息
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||||
log.info("清单确认流程,定时任务开启 =====================================================");
|
log.info("清单确认流程,定时任务开启 =====================================================");
|
||||||
//获取状态为待确认的数据
|
/* //获取状态为待确认的数据
|
||||||
QueryWrapper<ProjectLawsInventoryEO> queryWrapperInventory = new QueryWrapper<>();
|
QueryWrapper<ProjectLawsInventoryEO> queryWrapperInventory = new QueryWrapper<>();
|
||||||
queryWrapperInventory.lambda().eq(ProjectLawsInventoryEO::getInventoryAffirmStatus, InventoryAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
|
queryWrapperInventory.lambda().eq(ProjectLawsInventoryEO::getInventoryAffirmStatus, InventoryAffirmStatusEnum.LIST_TO_CONFIRM.getValue());
|
||||||
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = projectLawsInventoryEOMapper.selectList(queryWrapperInventory);
|
List<ProjectLawsInventoryEO> projectLawsInventoryEOList = projectLawsInventoryEOMapper.selectList(queryWrapperInventory);
|
||||||
@@ -96,125 +114,269 @@ public class InventoryAffirmJob implements Job {
|
|||||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
||||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
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) {
|
for (ProjectLawsInventoryEO projectLawsInventoryEO : projectLawsInventoryEOList) {
|
||||||
if(StringUtils.equals(projectLibraryBase.getId(),projectLawsInventoryEO.getProjectLibraryId())){
|
if(StringUtils.equals(projectLibraryBase.getId(),projectLawsInventoryEO.getProjectLibraryId())){
|
||||||
if(projectLawsInventoryEO.getInventoryAffirmDueDate() != null){
|
if(projectLawsInventoryEO.getInventoryAffirmDueDate() != null){
|
||||||
//如果清单确认结束日期是当前日期
|
//如果清单确认结束日期是当前日期
|
||||||
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){
|
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){
|
||||||
|
List<String> currentDaysUserIdList = new ArrayList<>();
|
||||||
if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgFlag())){
|
if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgFlag())){
|
||||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())){
|
//if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())){
|
||||||
currentDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
|
// currentDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
|
||||||
}
|
//}
|
||||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){
|
//if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){
|
||||||
currentDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
|
// 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());
|
projectLawsInventoryEO.setSendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
|
||||||
projectLawsInventoryEOMapper.updateById(projectLawsInventoryEO);
|
projectLawsInventoryEOMapper.updateById(projectLawsInventoryEO);
|
||||||
}
|
}
|
||||||
|
if (ObjectUtils.isNotEmpty(currentDaysUserIdList)) {
|
||||||
|
currentDaysMap.put(projectLawsInventoryEO.getId(), currentDaysUserIdList);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//如果清单确认结束时间是当前系统时间后三天
|
//如果清单确认结束时间是当前系统时间后三天
|
||||||
if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){
|
if(StringUtils.equals(threeDaysStr,sdf.format(projectLawsInventoryEO.getInventoryAffirmDueDate()))){
|
||||||
|
List<String> threeDaysUserIdList = new ArrayList<>();
|
||||||
if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgCurrentFlag())){
|
if(StringUtils.isEmpty(projectLawsInventoryEO.getSendMsgCurrentFlag())){
|
||||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())){
|
//if(StringUtils.isNotEmpty(projectLawsInventoryEO.getRegulationOwnerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getRegulationOwnerSubmitStatus())){
|
||||||
threeDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
|
// threeDaysUserIdList.add(projectLawsInventoryEO.getRegulationOwnerId());
|
||||||
}
|
//}
|
||||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){
|
//if(StringUtils.isNotEmpty(projectLawsInventoryEO.getHomologationEngineerId()) && StringUtils.isEmpty(projectLawsInventoryEO.getHomologationEngineerSubmitStatus())){
|
||||||
threeDaysUserIdList.add(projectLawsInventoryEO.getHomologationEngineerId());
|
// 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());
|
projectLawsInventoryEO.setSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
|
||||||
projectLawsInventoryEOMapper.updateById(projectLawsInventoryEO);
|
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 .
|
// XXX .
|
||||||
String msgContentEN = "The remaining processing time for the regulation task confirmation for "
|
//String msgContentEN = "The remaining processing time for the regulation task confirmation for "
|
||||||
+ projectNameInfoEO.getProjectName() + "-"
|
// + projectNameInfoEO.getProjectName() + "-"
|
||||||
+ projectYearNameInfoEO.getYearName()+ " "
|
// + projectYearNameInfoEO.getYearName()+ " "
|
||||||
+ projectLibraryBase.getTargetMarket()
|
// + projectLibraryBase.getTargetMarket()
|
||||||
+ " are 3 days. Please check and address it in a timely manner.";
|
// + " are 3 days. Please check and address it in a timely manner.";
|
||||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a regulation task confirmation to complete";
|
// + ": 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='"
|
//String href = "<a href='"
|
||||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||||
+ projectYearNameInfoEO.getYearName()
|
// + projectYearNameInfoEO.getYearName()
|
||||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
// + "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||||
+ "'>" + " View details" + "</a>";
|
// + "'>" + " View details" + "</a>";
|
||||||
String contentInfo = msgContentEN + " " + href;
|
//String contentInfo = msgContentEN + " " + href;
|
||||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
// sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||||
sendMessageMap.put("contentInfo",contentInfo);
|
//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)){
|
if(!currentDaysMap.isEmpty()){
|
||||||
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
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();
|
*//*String msgContentCN = "您" + projectLibraryBase.getProjectName() + "(项目名称)法规清单的任务今天即将结束,请及时查看处理*//*
|
||||||
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
//String msgContentEN = "The regulation task confirmation for "
|
||||||
feishuMsgVo.setTaskType("Regulation Task Confirmation");
|
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
feishuMsgVo.setProject(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='"
|
//String href = "<a href='"
|
||||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||||
+ projectYearNameInfoEO.getYearName()
|
// + projectYearNameInfoEO.getYearName()
|
||||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
// + "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||||
+ "'>" + " View details" + "</a>";
|
// + "'>" + " View details" + "</a>";
|
||||||
String contentInfo = msgContentEN + " " + href;
|
//String contentInfo = msgContentEN + " " + href;
|
||||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||||
sendMessageMap.put("contentInfo",contentInfo);
|
//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("清单确认流程,定时任务结束 =====================================================");
|
log.info("清单确认流程,定时任务结束 =====================================================");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+235
-87
@@ -1,7 +1,13 @@
|
|||||||
package com.jero.modules.project.job;
|
package com.jero.modules.project.job;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
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.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.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.project.entity.*;
|
import com.jero.modules.project.entity.*;
|
||||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
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.mapper.ProjectYearNameInfoEOMapper;
|
||||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||||
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
|
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 lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.quartz.Job;
|
import org.quartz.Job;
|
||||||
import org.quartz.JobExecutionContext;
|
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.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -53,6 +63,13 @@ public class PrehomoJob implements Job {
|
|||||||
@Value(value = "${jero.backUrl}")
|
@Value(value = "${jero.backUrl}")
|
||||||
private String backUrl;
|
private String backUrl;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService sysUserService;
|
||||||
|
@Autowired
|
||||||
|
private IFeishuService feishuService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||||
log.info("prehomo流程,定时任务开启 =====================================================");
|
log.info("prehomo流程,定时任务开启 =====================================================");
|
||||||
@@ -60,7 +77,10 @@ public class PrehomoJob implements Job {
|
|||||||
//查询出已经启动了prehomo流程的数据。 并且流程没有结束。
|
//查询出已经启动了prehomo流程的数据。 并且流程没有结束。
|
||||||
QueryWrapper<ProjectTaskInventoryEO> queryProjectTaskInventoryWrapper = new QueryWrapper<>();
|
QueryWrapper<ProjectTaskInventoryEO> queryProjectTaskInventoryWrapper = new QueryWrapper<>();
|
||||||
queryProjectTaskInventoryWrapper.isNotNull("prehomo_p_id");
|
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);
|
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = projectTaskInventoryEOService.getBaseMapper().selectList(queryProjectTaskInventoryWrapper);
|
||||||
|
|
||||||
if(CollectionUtils.isNotEmpty(projectTaskInventoryEOList)){
|
if(CollectionUtils.isNotEmpty(projectTaskInventoryEOList)){
|
||||||
@@ -81,15 +101,24 @@ public class PrehomoJob implements Job {
|
|||||||
|
|
||||||
Date currentDate = new Date();
|
Date currentDate = new Date();
|
||||||
|
|
||||||
//获取后三天前的时间
|
//两周
|
||||||
Calendar calendar=new GregorianCalendar();
|
Calendar twoWeeksLaterCalendar=new GregorianCalendar();
|
||||||
calendar.setTime(new Date());
|
twoWeeksLaterCalendar.setTime(new Date());
|
||||||
calendar.add(Calendar.DATE,3);
|
twoWeeksLaterCalendar.add(Calendar.DATE,14);
|
||||||
Date threeDays = calendar.getTime();
|
Date twoWeeksLaterDays = twoWeeksLaterCalendar.getTime();
|
||||||
|
String twoWeeksLaterDaysStr = sdf.format(twoWeeksLaterDays);
|
||||||
String threeDaysStr = sdf.format(threeDays);
|
//一周
|
||||||
|
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 currentDateStr = sdf.format(currentDate);
|
||||||
|
|
||||||
|
String msgTitle = MessageType2Enum.PRE_HOMO_CONFIRMATION.getCn() + "/" + MessageType2Enum.PRE_HOMO_CONFIRMATION.getEn();
|
||||||
|
|
||||||
|
|
||||||
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
||||||
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
||||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||||
@@ -99,115 +128,234 @@ public class PrehomoJob implements Job {
|
|||||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
||||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
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) {
|
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())){
|
String LAW_CN = projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle();//法规
|
||||||
if(projectLawsInventoryEO.getPrehomoDueDate() != null){
|
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||||
//如果prehomo - 结束日期是当前日期
|
String LAW_EN = "";
|
||||||
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getPrehomoDueDate()))){
|
if (ObjectUtils.isEmpty(bussDocumentLibraryEO)) {
|
||||||
if(StringUtils.isEmpty(projectTaskInventoryEO.getPrehomoSendMsgFlag())){
|
LAW_EN = LAW_CN;
|
||||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDutyId())){
|
} else {
|
||||||
currentDaysUserIdList.add(projectLawsInventoryEO.getPrehomoDutyId());
|
LAW_EN = projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn();//法规
|
||||||
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())){
|
}
|
||||||
currentDaysUserIdList.add(projectLawsInventoryEO.getPrehomoInitiatorId());
|
|
||||||
}
|
List<String> twoWeeksLaterUserIdList = new ArrayList<>();
|
||||||
projectTaskInventoryEO.setPrehomoSendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
|
List<String> oneWeeksLaterUserIdList = new ArrayList<>();
|
||||||
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
|
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()))){
|
//如果prehomo - 结束日期是两周后的日期
|
||||||
if(StringUtils.isEmpty(projectTaskInventoryEO.getPrehomoSendMsgCurrentFlag())){
|
if(StringUtils.equals(twoWeeksLaterDaysStr,sdf.format(projectLawsInventoryEO.getPrehomoDueDate()))){
|
||||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDutyId())){
|
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoDutyId())){
|
||||||
threeDaysUserIdList.add(projectLawsInventoryEO.getPrehomoDutyId());
|
twoWeeksLaterUserIdList.add(projectLawsInventoryEO.getPrehomoDutyId());
|
||||||
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getPrehomoInitiatorId())){
|
}
|
||||||
threeDaysUserIdList.add(projectLawsInventoryEO.getPrehomoInitiatorId());
|
}
|
||||||
}
|
//如果prehomo - 结束日期是一周后的日期
|
||||||
projectTaskInventoryEO.setPrehomoSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
|
if(StringUtils.equals(oneWeekLaterDaysStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
|
||||||
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
|
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天,请及时查看处理
|
//您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.
|
//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 "
|
//String msgContentEN = "The remaining processing time for the Pre-Homo confirmation of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-"
|
// + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-"
|
||||||
+ projectYearNameInfoEO.getYearName()+ " "
|
// + projectYearNameInfoEO.getYearName()+ " "
|
||||||
+ projectLibraryBase.getTargetMarket()
|
// + projectLibraryBase.getTargetMarket()
|
||||||
+ " are 3 days. Please check and handle it in time.";
|
// + " are 3 days. Please check and handle it in time.";
|
||||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a Pre-Homo task to complete";
|
// + ": You have a Pre-Homo task to complete";
|
||||||
|
|
||||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
//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.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.setTaskType("Pre-Homo Confirmation");
|
||||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||||
|
|
||||||
//飞书跳转链接
|
//飞书跳转链接
|
||||||
String hrefFeishu = backUrl
|
//String hrefFeishu = backUrl
|
||||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
||||||
+ projectLibraryBase.getId()
|
// + projectLibraryBase.getId()
|
||||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
// + "&projectName=" + projectNameInfoEO.getProjectName();
|
||||||
//系统内部跳转链接
|
//系统内部跳转链接
|
||||||
String href = "<a href='"
|
//String href = "<a href='"
|
||||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
// + "&projectName=" + projectNameInfoEO.getProjectName()
|
||||||
+ "'>" + " View details" + "</a>";
|
// + "'>" + " View details" + "</a>";
|
||||||
String contentInfo = msgContentEN + " " + href;
|
//String contentInfo = msgContentEN + " " + href;
|
||||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
// Map<String,Object> sendMessageMap = new HashMap<>();
|
||||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||||
sendMessageMap.put("contentInfo",contentInfo);
|
//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)){
|
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||||
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
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确认任务今天即将结束,请及时查看处理
|
//您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
|
//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 "
|
//String msgContentEN = "The the Pre-Homo confirmation of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
// + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ " will expire today. Please check and address it in time.";
|
// + " will expire today. Please check and address it in time.";
|
||||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a Pre-Homo task to complete";
|
// + ": You have a Pre-Homo task to complete";
|
||||||
|
|
||||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
//feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
//feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||||
|
|
||||||
//飞书跳转链接
|
//飞书跳转链接
|
||||||
String hrefFeishu = backUrl
|
// String hrefFeishu = backUrl
|
||||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink()
|
||||||
+ projectLibraryBase.getId()
|
// + projectLibraryBase.getId()
|
||||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
// + "&projectName=" + projectNameInfoEO.getProjectName();
|
||||||
//系统内部跳转链接
|
//系统内部跳转链接
|
||||||
String href = "<a href='"
|
//String href = "<a href='"
|
||||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
// + "&projectName=" + projectNameInfoEO.getProjectName()
|
||||||
+ "'>" + " View details" + "</a>";
|
// + "'>" + " View details" + "</a>";
|
||||||
String contentInfo = msgContentEN + " " + href;
|
//String contentInfo = msgContentEN + " " + href;
|
||||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||||
sendMessageMap.put("contentInfo",contentInfo);
|
//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;
|
package com.jero.modules.project.job;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
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.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.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.project.entity.*;
|
import com.jero.modules.project.entity.*;
|
||||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
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.mapper.ProjectYearNameInfoEOMapper;
|
||||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||||
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
|
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 lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.quartz.Job;
|
import org.quartz.Job;
|
||||||
import org.quartz.JobExecutionContext;
|
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.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -52,13 +62,23 @@ public class VerifyComplianceJob implements Job {
|
|||||||
@Value(value = "${jero.backUrl}")
|
@Value(value = "${jero.backUrl}")
|
||||||
private String backUrl;
|
private String backUrl;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService sysUserService;
|
||||||
|
@Autowired
|
||||||
|
private IFeishuService feishuService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||||
log.info("验证符合性流程,定时任务开启 =====================================================");
|
log.info("验证符合性流程,定时任务开启 =====================================================");
|
||||||
//查询出已经启动了验证符合性流程的数据。 并且流程没有结束。
|
//查询出已经启动了验证符合性流程的数据。 并且流程没有结束。
|
||||||
QueryWrapper<ProjectTaskInventoryEO> queryProjectTaskInventoryWrapper = new QueryWrapper<>();
|
QueryWrapper<ProjectTaskInventoryEO> queryProjectTaskInventoryWrapper = new QueryWrapper<>();
|
||||||
queryProjectTaskInventoryWrapper.isNotNull("verify_p_id");
|
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);
|
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = projectTaskInventoryEOService.getBaseMapper().selectList(queryProjectTaskInventoryWrapper);
|
||||||
|
|
||||||
if(CollectionUtils.isNotEmpty(projectTaskInventoryEOList)){
|
if(CollectionUtils.isNotEmpty(projectTaskInventoryEOList)){
|
||||||
@@ -79,15 +99,24 @@ public class VerifyComplianceJob implements Job {
|
|||||||
|
|
||||||
Date currentDate = new Date();
|
Date currentDate = new Date();
|
||||||
|
|
||||||
//获取后三天前的时间
|
//两周
|
||||||
Calendar calendar=new GregorianCalendar();
|
Calendar twoWeeksLaterCalendar=new GregorianCalendar();
|
||||||
calendar.setTime(new Date());
|
twoWeeksLaterCalendar.setTime(new Date());
|
||||||
calendar.add(Calendar.DATE,3);
|
twoWeeksLaterCalendar.add(Calendar.DATE,14);
|
||||||
Date threeDays = calendar.getTime();
|
Date twoWeeksLaterDays = twoWeeksLaterCalendar.getTime();
|
||||||
|
String twoWeeksLaterDaysStr = sdf.format(twoWeeksLaterDays);
|
||||||
String threeDaysStr = sdf.format(threeDays);
|
//一周
|
||||||
|
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 currentDateStr = sdf.format(currentDate);
|
||||||
|
|
||||||
|
String msgTitle = MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.VALIDATION_COMPLIANCE_CONFIRMATION.getEn();
|
||||||
|
|
||||||
|
|
||||||
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
||||||
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
||||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||||
@@ -97,114 +126,235 @@ public class VerifyComplianceJob implements Job {
|
|||||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
||||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
||||||
|
|
||||||
for (ProjectLawsInventoryEO projectLawsInventoryEO: projectLawsInventoryEOList) {
|
//项目名称
|
||||||
List<String> threeDaysUserIdList = 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();
|
||||||
List<String> currentDaysUserIdList = new ArrayList<>();
|
String projectName = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + "-" + projectLibraryBase.getTargetMarket() + "-" + projectVersion;
|
||||||
|
|
||||||
for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) {
|
|
||||||
if(StringUtils.equals(projectTaskInventoryEO.getProjectLawsInventoryId(),projectLawsInventoryEO.getId())){
|
for (ProjectLawsInventoryEO projectLawsInventoryEO: projectLawsInventoryEOList) {
|
||||||
if(projectLawsInventoryEO.getVerifyDueDate() != null){
|
|
||||||
//如果验证符合性 - 结束日期是当前日期
|
//法规中英文
|
||||||
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))){
|
String LAW_CN = projectLawsInventoryEO.getSerialNumber() + " " + projectLawsInventoryEO.getTitle();//法规
|
||||||
if(StringUtils.isEmpty(projectTaskInventoryEO.getVerifySendMsgFlag())){
|
BussDocumentLibraryEO bussDocumentLibraryEO = bussDocumentLibraryEOService.queryById(projectLawsInventoryEO.getStandId());
|
||||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){
|
String LAW_EN = "";
|
||||||
currentDaysUserIdList.add(projectLawsInventoryEO.getVerifyDutyId());
|
if (ObjectUtils.isEmpty(bussDocumentLibraryEO)) {
|
||||||
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyInitiatorId())){
|
LAW_EN = LAW_CN;
|
||||||
currentDaysUserIdList.add(projectLawsInventoryEO.getVerifyInitiatorId());
|
} else {
|
||||||
}
|
LAW_EN = projectLawsInventoryEO.getSerialNumber() + " " + bussDocumentLibraryEO.getTitleEn();//法规
|
||||||
projectTaskInventoryEO.setVerifySendMsgFlag(SendMsgFlagEnum.FALSE.getValue());
|
}
|
||||||
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
|
|
||||||
}
|
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.equals(twoWeeksLaterDaysStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))){
|
||||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){
|
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyDutyId())){
|
||||||
threeDaysUserIdList.add(projectLawsInventoryEO.getVerifyDutyId());
|
currentDaysUserIdList.add(projectLawsInventoryEO.getVerifyDutyId());
|
||||||
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getVerifyInitiatorId())){
|
}
|
||||||
threeDaysUserIdList.add(projectLawsInventoryEO.getVerifyInitiatorId());
|
}
|
||||||
}
|
//如果验证符合性 - 结束日期是一周后的日期
|
||||||
projectTaskInventoryEO.setVerifySendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
|
if(StringUtils.equals(oneWeekLaterDaysStr,sdf.format(projectLawsInventoryEO.getVerifyDueDate()))){
|
||||||
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
|
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天,请及时查看处理
|
//您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.
|
//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 "
|
//String msgContentEN = "The remaining processing time for the validation compliance confirmation of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-"
|
// + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-"
|
||||||
+ projectYearNameInfoEO.getYearName()+ " "
|
// + projectYearNameInfoEO.getYearName()+ " "
|
||||||
+ projectLibraryBase.getTargetMarket()
|
// + projectLibraryBase.getTargetMarket()
|
||||||
+ " are 3 days. Please check and handle it in time.";
|
// + " are 3 days. Please check and handle it in time.";
|
||||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a validation compliance task to complete";
|
// + ": You have a validation compliance task to complete";
|
||||||
|
|
||||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
// 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.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.setTaskType("Validation Compliance Confirmation");
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||||
|
|
||||||
//飞书跳转链接
|
//飞书跳转链接
|
||||||
String hrefFeishu = backUrl
|
//String hrefFeishu = backUrl
|
||||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
|
// + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
|
||||||
+ projectLibraryBase.getId()
|
// + projectLibraryBase.getId()
|
||||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
// + "&projectName=" + projectNameInfoEO.getProjectName();
|
||||||
//系统内部跳转链接
|
//系统内部跳转链接
|
||||||
String href = "<a href='"
|
//String href = "<a href='"
|
||||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
// + "&projectName=" + projectNameInfoEO.getProjectName()
|
||||||
+ "'>" + " View details" + "</a>";
|
// + "'>" + " View details" + "</a>";
|
||||||
String contentInfo = msgContentEN + " " + href;
|
//String contentInfo = msgContentEN + " " + href;
|
||||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||||
sendMessageMap.put("contentInfo",contentInfo);
|
//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)){
|
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||||
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
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的验证符合性确认任务今天即将结束,请及时查看处理
|
//您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
|
//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 "
|
//String msgContentEN = "The the validation compliance confirmation of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
// + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ " will expire today. Please check and address it in time.";
|
// + " will expire today. Please check and address it in time.";
|
||||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a validation compliance task to complete";
|
// + ": You have a validation compliance task to complete";
|
||||||
|
|
||||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
//feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
//feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
// feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||||
|
|
||||||
//飞书跳转链接
|
//飞书跳转链接
|
||||||
String hrefFeishu = backUrl
|
// String hrefFeishu = backUrl
|
||||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
|
// + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink()
|
||||||
+ projectLibraryBase.getId()
|
// + projectLibraryBase.getId()
|
||||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
// + "&projectName=" + projectNameInfoEO.getProjectName();
|
||||||
//系统内部跳转链接
|
//系统内部跳转链接
|
||||||
String href = "<a href='"
|
//String href = "<a href='"
|
||||||
+ JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.VERIFY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.VERIFY_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
// + "&projectName=" + projectNameInfoEO.getProjectName()
|
||||||
+ "'>" + " View details" + "</a>";
|
// + "'>" + " View details" + "</a>";
|
||||||
String contentInfo = msgContentEN + " " + href;
|
// String contentInfo = msgContentEN + " " + href;
|
||||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
// Map<String,Object> sendMessageMap = new HashMap<>();
|
||||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
// sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||||
sendMessageMap.put("contentInfo",contentInfo);
|
// 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;
|
package com.jero.modules.project.job;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
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.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.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.project.entity.*;
|
import com.jero.modules.project.entity.*;
|
||||||
import com.jero.modules.project.enums.DesignComplianceStatusEnum;
|
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.mapper.ProjectYearNameInfoEOMapper;
|
||||||
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
import com.jero.modules.project.service.IProjectLawsInventoryEOService;
|
||||||
import com.jero.modules.project.service.IProjectTaskInventoryEOService;
|
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 lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.collections4.CollectionUtils;
|
import org.apache.commons.collections4.CollectionUtils;
|
||||||
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
import org.quartz.Job;
|
import org.quartz.Job;
|
||||||
import org.quartz.JobExecutionContext;
|
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.Autowired;
|
||||||
import org.springframework.beans.factory.annotation.Value;
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -52,13 +62,23 @@ public class designComplianceJob implements Job {
|
|||||||
@Value(value = "${jero.backUrl}")
|
@Value(value = "${jero.backUrl}")
|
||||||
private String backUrl;
|
private String backUrl;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IBussDocumentLibraryEOService bussDocumentLibraryEOService;
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService sysUserService;
|
||||||
|
@Autowired
|
||||||
|
private IFeishuService feishuService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
public void execute(JobExecutionContext jobExecutionContext) throws JobExecutionException {
|
||||||
log.info("设计符合性确认流程,定时任务开启 =====================================================");
|
log.info("设计符合性确认流程,定时任务开启 =====================================================");
|
||||||
//查询出已经启动了设计符合性流程的数据。 并且流程没有结束。
|
//查询出已经启动了设计符合性流程的数据。 并且流程没有结束。
|
||||||
QueryWrapper<ProjectTaskInventoryEO> queryProjectTaskInventoryWrapper = new QueryWrapper<>();
|
QueryWrapper<ProjectTaskInventoryEO> queryProjectTaskInventoryWrapper = new QueryWrapper<>();
|
||||||
queryProjectTaskInventoryWrapper.isNotNull("design_p_id");
|
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);
|
List<ProjectTaskInventoryEO> projectTaskInventoryEOList = projectTaskInventoryEOService.getBaseMapper().selectList(queryProjectTaskInventoryWrapper);
|
||||||
|
|
||||||
if(CollectionUtils.isNotEmpty(projectTaskInventoryEOList)){
|
if(CollectionUtils.isNotEmpty(projectTaskInventoryEOList)){
|
||||||
@@ -79,15 +99,24 @@ public class designComplianceJob implements Job {
|
|||||||
|
|
||||||
Date currentDate = new Date();
|
Date currentDate = new Date();
|
||||||
|
|
||||||
//获取后三天前的时间
|
//两周
|
||||||
Calendar calendar=new GregorianCalendar();
|
Calendar twoWeeksLaterCalendar=new GregorianCalendar();
|
||||||
calendar.setTime(new Date());
|
twoWeeksLaterCalendar.setTime(new Date());
|
||||||
calendar.add(Calendar.DATE,3);
|
twoWeeksLaterCalendar.add(Calendar.DATE,14);
|
||||||
Date threeDays = calendar.getTime();
|
Date twoWeeksLaterDays = twoWeeksLaterCalendar.getTime();
|
||||||
|
String twoWeeksLaterDaysStr = sdf.format(twoWeeksLaterDays);
|
||||||
String threeDaysStr = sdf.format(threeDays);
|
//一周
|
||||||
|
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 currentDateStr = sdf.format(currentDate);
|
||||||
|
|
||||||
|
|
||||||
|
String msgTitle = MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getCn() + "/" + MessageType2Enum.DESIGN_COMPLIANCE_CONFIRMATION.getEn();
|
||||||
|
|
||||||
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
for (ProjectLibraryBase projectLibraryBase : projectLibraryBaseList) {
|
||||||
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<ProjectNameInfoEO> projectNameInfoEOQueryWrapper = new QueryWrapper<>();
|
||||||
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
projectNameInfoEOQueryWrapper.lambda().eq(ProjectNameInfoEO::getId,projectLibraryBase.getProjectNameId());
|
||||||
@@ -97,109 +126,249 @@ public class designComplianceJob implements Job {
|
|||||||
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
||||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
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) {
|
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> currentDaysUserIdList = new ArrayList<>();
|
||||||
|
List<String> dueUserIdList = new ArrayList<>();
|
||||||
|
|
||||||
for (ProjectTaskInventoryEO projectTaskInventoryEO : projectTaskInventoryEOList) {
|
if(StringUtils.equals(projectLawsInventoryEO.getProjectLibraryId(),projectLibraryBase.getId())){
|
||||||
if(StringUtils.equals(projectTaskInventoryEO.getProjectLawsInventoryId(),projectLawsInventoryEO.getId())){
|
//如果设计符合性 - 结束日期是当前日期
|
||||||
//如果设计符合性 - 结束日期是当前日期
|
if(projectLawsInventoryEO.getDesignDueDate() != null){
|
||||||
if(projectLawsInventoryEO.getDesignDueDate() != null){
|
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
|
||||||
if(StringUtils.equals(currentDateStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
|
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){
|
||||||
if(StringUtils.isEmpty(projectTaskInventoryEO.getDesignSendMsgFlag())){
|
currentDaysUserIdList.add(projectLawsInventoryEO.getDesignDutyId());
|
||||||
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(threeDaysStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
|
if(StringUtils.equals(twoWeeksLaterDaysStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
|
||||||
if(StringUtils.isEmpty(projectTaskInventoryEO.getDesignSendMsgCurrentFlag())){
|
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){
|
||||||
if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignDutyId())){
|
twoWeeksLaterUserIdList.add(projectLawsInventoryEO.getDesignDutyId());
|
||||||
threeDaysUserIdList.add(projectLawsInventoryEO.getDesignDutyId());
|
}
|
||||||
}if(StringUtils.isNotEmpty(projectLawsInventoryEO.getDesignInitiatorId())){
|
}
|
||||||
threeDaysUserIdList.add(projectLawsInventoryEO.getDesignInitiatorId());
|
|
||||||
}
|
//如果设计符合性 - 结束日期是一周后的日期
|
||||||
projectTaskInventoryEO.setDesignSendMsgCurrentFlag(SendMsgFlagEnum.FALSE.getValue());
|
if(StringUtils.equals(oneWeekLaterDaysStr,sdf.format(projectLawsInventoryEO.getDesignDueDate()))){
|
||||||
projectTaskInventoryEOService.updateById(projectTaskInventoryEO);
|
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天,请及时查看处理
|
//您XXX(项目名称)中GB 7258的设计符合性确认剩余处理时间还有3天,请及时查看处理
|
||||||
String msgContentEN = "The remaining processing time for the design compliance confirmation for "
|
//String msgContentEN = "The remaining processing time for the design compliance confirmation for "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
// + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||||
+ projectYearNameInfoEO.getYearName()+ " "
|
// + projectYearNameInfoEO.getYearName()+ " "
|
||||||
+ projectLibraryBase.getTargetMarket()
|
// + projectLibraryBase.getTargetMarket()
|
||||||
+ " are 3 days. Please check and address it in a timely manner.";
|
// + " are 3 days. Please check and address it in a timely manner.";
|
||||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a design compliance task to complete";
|
// + ": You have a design compliance task to complete";
|
||||||
|
|
||||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
//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.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.setTaskType("Design Compliance Confirmation");
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
//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='"
|
//String href = "<a href='"
|
||||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||||
+ "'>" + " View details" + "</a>";
|
// + "'>" + " View details" + "</a>";
|
||||||
String contentInfo = msgContentEN + " " + href;
|
//String contentInfo = msgContentEN + " " + href;
|
||||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||||
sendMessageMap.put("contentInfo",contentInfo);
|
//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)){
|
if(CollectionUtils.isNotEmpty(currentDaysUserIdList)){
|
||||||
currentDaysUserIdList = currentDaysUserIdList.stream().distinct().collect(Collectors.toList());
|
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的设计符合性确认任务今天即将结束,请及时查看处理
|
//您XXX(项目名称)中GB 7258的设计符合性确认任务今天即将结束,请及时查看处理
|
||||||
String msgContentEN = "The design compliance confirmation of "
|
//String msgContentEN = "The design compliance confirmation of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
// + projectLawsInventoryEO.getSerialNumber() + " in " + projectNameInfoEO.getProjectName()
|
||||||
+ " will expire today. Please check and address it in time.";
|
// + " will expire today. Please check and address it in time.";
|
||||||
String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
//String msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName()+ " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a design compliance task to complete";
|
// + ": You have a design compliance task to complete";
|
||||||
|
|
||||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
//feishuMsgVo.setContent("Hello! The task will expire today. Please check and address it in a timely manner.");
|
||||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||||
|
|
||||||
//飞书跳转链接
|
//飞书跳转链接
|
||||||
String hrefFeishu = backUrl
|
//String hrefFeishu = backUrl
|
||||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
// + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
||||||
+ projectLibraryBase.getId()
|
// + projectLibraryBase.getId()
|
||||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
// + "&projectName=" + projectNameInfoEO.getProjectName();
|
||||||
|
|
||||||
|
|
||||||
//系统内部跳转链接
|
//系统内部跳转链接
|
||||||
String href = "<a href='"
|
//String href = "<a href='"
|
||||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
// + "&projectName=" + projectNameInfoEO.getProjectName()
|
||||||
+ "'>" + " View details" + "</a>";
|
// + "'>" + " View details" + "</a>";
|
||||||
String contentInfo = msgContentEN + " " + href;
|
//String contentInfo = msgContentEN + " " + href;
|
||||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||||
sendMessageMap.put("contentInfo",contentInfo);
|
//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_laws_inventory pli ON ( pli.stand_id = bdl.id )
|
||||||
LEFT JOIN project_task_inventory pti ON ( pli.id = pti.project_laws_inventory_id )
|
LEFT JOIN project_task_inventory pti ON ( pli.id = pti.project_laws_inventory_id )
|
||||||
WHERE
|
WHERE
|
||||||
(
|
<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})
|
bdl.id IN (
|
||||||
or pti.design_p_id IS NOT NULL
|
SELECT
|
||||||
OR pti.prehomo_p_id IS NOT NULL
|
DISTINCT stand_id
|
||||||
OR pti.verify_p_id IS NOT NULL
|
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}
|
${params.condition}
|
||||||
GROUP BY bdl.id
|
GROUP BY bdl.id
|
||||||
order by bdl.create_time desc
|
order by bdl.create_time desc
|
||||||
@@ -34,6 +75,12 @@
|
|||||||
pli.serial_number as "serialNumber",
|
pli.serial_number as "serialNumber",
|
||||||
pli.title as "title",
|
pli.title as "title",
|
||||||
pli.project_library_id as "projectLibraryId",
|
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.project_name as "projectName",
|
||||||
pni.id as "projectNameId",
|
pni.id as "projectNameId",
|
||||||
pyni.year_name as "yearName",
|
pyni.year_name as "yearName",
|
||||||
@@ -80,6 +127,16 @@
|
|||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</foreach>
|
||||||
</if>
|
</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
|
order by pli.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@@ -96,16 +153,57 @@
|
|||||||
LEFT JOIN project_laws_inventory pli ON ( pli.stand_id = bdl.id )
|
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 )
|
LEFT JOIN project_task_inventory pti ON ( pli.id = pti.project_laws_inventory_id )
|
||||||
WHERE
|
WHERE
|
||||||
|
<if test="params.isEngineerOrEngineeringInterfacePerson != true">
|
||||||
(
|
(
|
||||||
bdl.id IN ( SELECT DISTINCT stand_id FROM laws_opinion_gather)
|
bdl.id IN (
|
||||||
OR bdl.id IN ( SELECT DISTINCT stand_id FROM laws_technology_evaluation)
|
SELECT
|
||||||
or pti.design_p_id IS NOT NULL
|
DISTINCT stand_id
|
||||||
OR pti.prehomo_p_id IS NOT NULL
|
FROM laws_opinion_gather
|
||||||
OR pti.verify_p_id IS NOT NULL
|
where gather_result = #{params.gatherResult}
|
||||||
)
|
)
|
||||||
<if test="params.condition != '' ">
|
OR bdl.id IN (
|
||||||
${params.condition}
|
SELECT
|
||||||
</if>
|
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
|
GROUP BY bdl.id
|
||||||
order by bdl.create_time desc
|
order by bdl.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|||||||
+9
-6
@@ -80,12 +80,15 @@
|
|||||||
or prehomo_flow_task_status =#{ncrTrackVO.inconformity} or prehomo_flow_task_status =#{ncrTrackVO.track}
|
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}
|
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}
|
<if test="ncrTrackVO.administrator == 'false'">
|
||||||
or pli.homologation_engineer_id =#{ncrTrackVO.userId}
|
<if test="ncrTrackVO.userId != null and ncrTrackVO.userId != ''">
|
||||||
or pli.engineering_interface_person =#{ncrTrackVO.userId}
|
and (pli.regulation_owner_id =#{ncrTrackVO.userId}
|
||||||
or ptid.user_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>
|
</if>
|
||||||
order by pli.create_time desc
|
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.common.system.vo.LoginUser;
|
||||||
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
import com.jero.modules.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.project.entity.ProjectLawsInventoryEO;
|
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.system.entity.SysRole;
|
||||||
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
|
import com.jero.modules.todoCenter.entity.ProcessInfoDetailEO;
|
||||||
import com.jero.modules.todoCenter.entity.ProcessInfoEO;
|
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 addProcessInfo(ProcessInfoEO processInfoEO, String projectLibraryId, Date endTime);
|
||||||
|
|
||||||
void addProcessInfoDetail(String processInfoId, List<ProcessInfoDetailEO> processInfoDetailEOList, 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.HttpServletRequest;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 项目库-任务清单表
|
* @Description: 项目库-任务清单表
|
||||||
@@ -102,4 +103,11 @@ public interface IProjectTaskInventoryEOService extends IService<ProjectTaskInve
|
|||||||
List<String> verifyRoleCode(ProjectTaskInventoryVO projectTaskInventoryVO);
|
List<String> verifyRoleCode(ProjectTaskInventoryVO projectTaskInventoryVO);
|
||||||
|
|
||||||
void exportXls(HttpServletResponse response, HttpServletRequest request, ProjectTaskInventoryEO projectTaskInventoryEO);
|
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.SysCategory;
|
||||||
import com.jero.modules.system.entity.SysDictItem;
|
import com.jero.modules.system.entity.SysDictItem;
|
||||||
import com.jero.modules.system.service.ISysDictItemService;
|
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.SysCategoryServiceImpl;
|
||||||
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
import com.jero.modules.system.service.impl.SysDictItemServiceImpl;
|
||||||
import com.jero.modules.system.util.StringUtils;
|
import com.jero.modules.system.util.StringUtils;
|
||||||
@@ -68,6 +69,8 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
|||||||
private ISysDictItemService sysDictItemService;
|
private ISysDictItemService sysDictItemService;
|
||||||
@Autowired
|
@Autowired
|
||||||
private ProjectTaskInventoryDetailEOMapper projectTaskInventoryDetailEOMapper;
|
private ProjectTaskInventoryDetailEOMapper projectTaskInventoryDetailEOMapper;
|
||||||
|
@Autowired
|
||||||
|
private ISysUserService sysUserService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public IPage queryPageList(Map<String, Object> params) {
|
public IPage queryPageList(Map<String, Object> params) {
|
||||||
@@ -81,6 +84,18 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
|||||||
//只查询 法规技术评估流程状态、法规意见收集 收集结果 为已完成的数据
|
//只查询 法规技术评估流程状态、法规意见收集 收集结果 为已完成的数据
|
||||||
params.put("flowStatus", GatherResultEnum.COMPLETED.getValue());
|
params.put("flowStatus", GatherResultEnum.COMPLETED.getValue());
|
||||||
params.put("gatherResult", 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 page = new Page(pageNo, pageSize);
|
||||||
IPage infoPage = this.lawsComplianceBoardMapper.queryPageList(page, params);
|
IPage infoPage = this.lawsComplianceBoardMapper.queryPageList(page, params);
|
||||||
List records = infoPage.getRecords();
|
List records = infoPage.getRecords();
|
||||||
@@ -142,18 +157,28 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public JSONObject queryComplianceResultList(Map<String, Object> params) {
|
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();
|
JSONObject result = new JSONObject();
|
||||||
String id = (String) params.get("id");
|
String id = (String) params.get("id");
|
||||||
String cut = (String) params.get("cut");
|
String cut = (String) params.get("cut");
|
||||||
List<Map<String,Object>> complianceResultList = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
List<Map<String,Object>> complianceResultList = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
||||||
if(CollectionUtils.isNotEmpty(complianceResultList)){
|
if(CollectionUtils.isNotEmpty(complianceResultList)){
|
||||||
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
|
||||||
List<String> projectLawsInventoryIdList = complianceResultList.stream().map(map-> (String) map.get("id")).collect(Collectors.toList());
|
List<String> projectLawsInventoryIdList = complianceResultList.stream().map(map-> (String) map.get("id")).collect(Collectors.toList());
|
||||||
QueryWrapper<ProjectTaskInventoryDetailEO> taskDetailQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<ProjectTaskInventoryDetailEO> taskDetailQueryWrapper = new QueryWrapper<>();
|
||||||
taskDetailQueryWrapper.lambda().in(ProjectTaskInventoryDetailEO::getProjectTaskInventoryId,projectLawsInventoryIdList);
|
taskDetailQueryWrapper.lambda().in(ProjectTaskInventoryDetailEO::getProjectTaskInventoryId,projectLawsInventoryIdList);
|
||||||
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOList = this.projectTaskInventoryDetailEOMapper.selectList(taskDetailQueryWrapper);
|
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOList = this.projectTaskInventoryDetailEOMapper.selectList(taskDetailQueryWrapper);
|
||||||
this.createTaskInventoryEOList(complianceResultList,projectTaskInventoryDetailEOList,currentUser);
|
this.createTaskInventoryEOList(complianceResultList,projectTaskInventoryDetailEOList,currentUser,isEngineer,isEngineeringInterfacePerson);
|
||||||
this.disposeComplianceResult(complianceResultList,cut);
|
this.disposeComplianceResult(complianceResultList,cut,isEngineer,isEngineeringInterfacePerson);
|
||||||
}
|
}
|
||||||
result.put("complianceResultList",complianceResultList);
|
result.put("complianceResultList",complianceResultList);
|
||||||
|
|
||||||
@@ -161,6 +186,10 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
|||||||
QueryWrapper<LawsOpinionGatherEO> opinionGatherEOQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<LawsOpinionGatherEO> opinionGatherEOQueryWrapper = new QueryWrapper<>();
|
||||||
opinionGatherEOQueryWrapper.lambda().eq(LawsOpinionGatherEO::getStandId,id);
|
opinionGatherEOQueryWrapper.lambda().eq(LawsOpinionGatherEO::getStandId,id);
|
||||||
opinionGatherEOQueryWrapper.lambda().eq(LawsOpinionGatherEO::getGatherResult,GatherResultEnum.COMPLETED.getValue());
|
opinionGatherEOQueryWrapper.lambda().eq(LawsOpinionGatherEO::getGatherResult,GatherResultEnum.COMPLETED.getValue());
|
||||||
|
//如果当前登录用户是工程师或工程接口人,只查询自己为评估人的法规意见收集数据。
|
||||||
|
if(isEngineer || isEngineeringInterfacePerson){
|
||||||
|
opinionGatherEOQueryWrapper.lambda().like(LawsOpinionGatherEO::getEvaluatorIds,currentUser.getId());
|
||||||
|
}
|
||||||
int opinionGatherCount = this.lawsOpinionGatherEOService.count(opinionGatherEOQueryWrapper);
|
int opinionGatherCount = this.lawsOpinionGatherEOService.count(opinionGatherEOQueryWrapper);
|
||||||
result.put("opinionGather",opinionGatherCount);
|
result.put("opinionGather",opinionGatherCount);
|
||||||
|
|
||||||
@@ -168,6 +197,10 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
|||||||
QueryWrapper<LawsTechnologyEvaluationEO> evaluationEOQueryWrapper = new QueryWrapper<>();
|
QueryWrapper<LawsTechnologyEvaluationEO> evaluationEOQueryWrapper = new QueryWrapper<>();
|
||||||
evaluationEOQueryWrapper.lambda().eq(LawsTechnologyEvaluationEO::getStandId,id);
|
evaluationEOQueryWrapper.lambda().eq(LawsTechnologyEvaluationEO::getStandId,id);
|
||||||
evaluationEOQueryWrapper.lambda().eq(LawsTechnologyEvaluationEO::getFlowStatus,GatherResultEnum.COMPLETED.getValue());
|
evaluationEOQueryWrapper.lambda().eq(LawsTechnologyEvaluationEO::getFlowStatus,GatherResultEnum.COMPLETED.getValue());
|
||||||
|
//如果当前登录用户是工程师或工程接口人,只查询自己为评估人的法规技术评估数据。
|
||||||
|
if(isEngineer || isEngineeringInterfacePerson){
|
||||||
|
this.lawsTechnologyEvaluationEOService.createQueryPermission(evaluationEOQueryWrapper,null,false);
|
||||||
|
}
|
||||||
int evaluationCount = this.lawsTechnologyEvaluationEOService.count(evaluationEOQueryWrapper);
|
int evaluationCount = this.lawsTechnologyEvaluationEOService.count(evaluationEOQueryWrapper);
|
||||||
result.put("technologyEvaluation",evaluationCount);
|
result.put("technologyEvaluation",evaluationCount);
|
||||||
return result;
|
return result;
|
||||||
@@ -178,8 +211,14 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
|||||||
* @param complianceResultList
|
* @param complianceResultList
|
||||||
* @param projectTaskInventoryDetailEOList
|
* @param projectTaskInventoryDetailEOList
|
||||||
* @param currentUser
|
* @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)){
|
if(CollectionUtils.isNotEmpty(complianceResultList) && CollectionUtils.isNotEmpty(projectTaskInventoryDetailEOList)){
|
||||||
for (Map<String, Object> complianceResult : complianceResultList) {
|
for (Map<String, Object> complianceResult : complianceResultList) {
|
||||||
String designPid = "";
|
String designPid = "";
|
||||||
@@ -199,44 +238,97 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
|||||||
String verifyTaskStatus = "";
|
String verifyTaskStatus = "";
|
||||||
String verifyTaskDefinitionKey = "";
|
String verifyTaskDefinitionKey = "";
|
||||||
String verifyTaskDetailId = "";
|
String verifyTaskDetailId = "";
|
||||||
|
//2022-11-01 增加数据权限:如果当前登录用户,是工程师、工程接口人角色,只能查看到跟自己相关的数据。其余角色保留之前的查询结果。
|
||||||
for (ProjectTaskInventoryDetailEO projectTaskInventoryDetail : projectTaskInventoryDetailEOList) {
|
if((isEngineer || isEngineeringInterfacePerson)){
|
||||||
if(StringUtils.equals(complianceResult.get("id").toString(),projectTaskInventoryDetail.getProjectTaskInventoryId())){
|
for (ProjectTaskInventoryDetailEO projectTaskInventoryDetail : projectTaskInventoryDetailEOList) {
|
||||||
/**
|
if(StringUtils.equals(complianceResult.get("id").toString(),projectTaskInventoryDetail.getProjectTaskInventoryId())){
|
||||||
* 查询数据权限,所有用户都是,自己的待办,可以跳转到处理任务详情页进行处理。
|
/**
|
||||||
* 不是自己的待办,只能跳转到处理任务的详情页。
|
* 查询数据权限,所有用户都是,自己的待办,可以跳转到处理任务详情页进行处理。
|
||||||
*/
|
* 不是自己的待办,只能跳转到处理任务的详情页。
|
||||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(), FlowTypeEnum.SJFHXSHLC.getValue())){
|
*/
|
||||||
designPid = projectTaskInventoryDetail.getActiProcInstId();
|
if(StringUtils.equals(complianceResult.get("designInitiatorId").toString(),currentUser.getId())
|
||||||
designTaskId = projectTaskInventoryDetail.getTaskId();
|
|| StringUtils.equals(complianceResult.get("designDutyId").toString(),currentUser.getId())){
|
||||||
designTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(), FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||||
designTaskDetailId = projectTaskInventoryDetail.getId();
|
designPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
designTaskId = projectTaskInventoryDetail.getTaskId();
|
||||||
designTaskStatus = projectTaskInventoryDetail.getStatus();
|
designTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||||
}else {
|
designTaskDetailId = projectTaskInventoryDetail.getId();
|
||||||
designTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
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();
|
}else {
|
||||||
prehomoTaskId = projectTaskInventoryDetail.getTaskId();
|
for (ProjectTaskInventoryDetailEO projectTaskInventoryDetail : projectTaskInventoryDetailEOList) {
|
||||||
prehomoTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
if(StringUtils.equals(complianceResult.get("id").toString(),projectTaskInventoryDetail.getProjectTaskInventoryId())){
|
||||||
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.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.PREHOMOQRLC.getValue())){
|
||||||
if(StringUtils.equals(projectTaskInventoryDetail.getFlowType(),FlowTypeEnum.YZFHXSCLC.getValue())){
|
prehomoPid = projectTaskInventoryDetail.getActiProcInstId();
|
||||||
verifyPid = projectTaskInventoryDetail.getActiProcInstId();
|
prehomoTaskId = projectTaskInventoryDetail.getTaskId();
|
||||||
verifyTaskId = projectTaskInventoryDetail.getTaskId();
|
prehomoTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
||||||
verifyTaskDefinitionKey = projectTaskInventoryDetail.getTaskDefinitionKey();
|
prehomoTaskDetailId = projectTaskInventoryDetail.getId();
|
||||||
verifyTaskDetailId = projectTaskInventoryDetail.getId();
|
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
||||||
if(StringUtils.equals(currentUser.getId(),projectTaskInventoryDetail.getUserId())){
|
prehomoTaskStatus = projectTaskInventoryDetail.getStatus();
|
||||||
verifyTaskStatus = projectTaskInventoryDetail.getStatus();
|
}else {
|
||||||
}else {
|
prehomoTaskStatus = TaskStatusEnum.SHOW_FLAG.getValue();
|
||||||
verifyTaskStatus = 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)){
|
if(CollectionUtils.isNotEmpty(complianceResultList)){
|
||||||
|
LoginUser currentUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
List<SysDictItem> dutyTerritoryDictItemList = sysDictItemService.selectItemsByDictCode("duty_territory");
|
List<SysDictItem> dutyTerritoryDictItemList = sysDictItemService.selectItemsByDictCode("duty_territory");
|
||||||
for (Map<String, Object> complianceResult : complianceResultList) {
|
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) {
|
if (complianceResult.get("designStatus") != null) {
|
||||||
String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("designStatus").toString(), cut);
|
String textByValue = DesignComplianceStatusEnum.getTextByValue(complianceResult.get("designStatus").toString(), cut);
|
||||||
complianceResult.put("designStatus_dicText",textByValue);
|
complianceResult.put("designStatus_dicText",textByValue);
|
||||||
@@ -342,6 +459,15 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
|||||||
String condition = this.getConditionStr(params);
|
String condition = this.getConditionStr(params);
|
||||||
params.put("condition",StringUtils.isNotEmpty(condition) ? condition : "");
|
params.put("condition",StringUtils.isNotEmpty(condition) ? condition : "");
|
||||||
List<Map<String,Object>> exportData = new ArrayList<>();
|
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")){
|
if(StringUtils.equals(exportAll,"no")){
|
||||||
IPage page = this.queryPageList(params);
|
IPage page = this.queryPageList(params);
|
||||||
exportData = page.getRecords();
|
exportData = page.getRecords();
|
||||||
@@ -358,7 +484,7 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
|||||||
List<Map<String,Object>> complianceResultList = new ArrayList<>();
|
List<Map<String,Object>> complianceResultList = new ArrayList<>();
|
||||||
if(CollectionUtils.isNotEmpty(idList)){
|
if(CollectionUtils.isNotEmpty(idList)){
|
||||||
complianceResultList = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
complianceResultList = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
||||||
this.disposeComplianceResult(complianceResultList,cut);
|
this.disposeComplianceResult(complianceResultList,cut,isEngineer,isEngineeringInterfacePerson);
|
||||||
}
|
}
|
||||||
|
|
||||||
String title = "";
|
String title = "";
|
||||||
@@ -468,8 +594,18 @@ public class LawsComplianceBoardServiceImpl implements ILawsComplianceBoardServi
|
|||||||
@Override
|
@Override
|
||||||
public void exportComplianceResultDetail(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params) {
|
public void exportComplianceResultDetail(HttpServletResponse response, HttpServletRequest request, Map<String, Object> params) {
|
||||||
String cut = (String) params.get("cut");
|
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);
|
List<Map<String,Object>> exportData = this.lawsComplianceBoardMapper.queryComplianceResultList(params);
|
||||||
this.disposeComplianceResult(exportData,cut);
|
this.disposeComplianceResult(exportData,cut,isEngineer,isEngineeringInterfacePerson);
|
||||||
String title = "";
|
String title = "";
|
||||||
String fileName = "";
|
String fileName = "";
|
||||||
if(StringUtils.equals(cut, CutEnum.CN.getValue())){
|
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.setInconformity(ReviewResultEnum.INCONFORMITY.getValue());
|
||||||
ncrTrackVO.setTrack(ReviewResultEnum.TO_TRACK.getValue());
|
ncrTrackVO.setTrack(ReviewResultEnum.TO_TRACK.getValue());
|
||||||
|
|
||||||
|
//如果当前登录用户是系统管理员角色,可以查看所有的数据
|
||||||
|
boolean administrator = this.sysUserService.isAdministrator();
|
||||||
|
ncrTrackVO.setAdministrator(administrator ? "true":"false");
|
||||||
|
|
||||||
List<NcrTrackVO> infoList = ncrTrackMapper.getInfoList(ncrTrackVO);
|
List<NcrTrackVO> infoList = ncrTrackMapper.getInfoList(ncrTrackVO);
|
||||||
infoList = infoList.stream().distinct().collect(Collectors.toList());
|
infoList = infoList.stream().distinct().collect(Collectors.toList());
|
||||||
List<NcrTrackVO> trackVOList = new ArrayList<>();
|
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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.constant.enums.CutEnum;
|
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.MessageTypeEnum;
|
||||||
|
import com.jero.common.constant.enums.MsgColorEnum;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
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.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.project.entity.*;
|
import com.jero.modules.project.entity.*;
|
||||||
import com.jero.modules.project.enums.JumpLinkEnum;
|
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.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@@ -71,6 +79,11 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
|
|||||||
@Value(value = "${jero.backUrl}")
|
@Value(value = "${jero.backUrl}")
|
||||||
private String 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());
|
projectYearInfoEOQueryWrapper.lambda().eq(ProjectYearNameInfoEO::getId,projectLibraryBase.getYearNameId());
|
||||||
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
ProjectYearNameInfoEO projectYearNameInfoEO = projectYearNameInfoEOMapper.selectOne(projectYearInfoEOQueryWrapper);
|
||||||
|
|
||||||
String id = UUID.randomUUID().toString().replace("-", "");
|
//String id = UUID.randomUUID().toString().replace("-", "");
|
||||||
|
|
||||||
MessageTypeEnum messageTypeEnum = null;
|
//MessageTypeEnum messageTypeEnum = null;
|
||||||
String msgContentEN = "";
|
//String msgContentEN = "";
|
||||||
String msgTitle = "";
|
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())){
|
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.
|
//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 "
|
//msgContentEN = currentUser.getUsername() + " has assigned the design compliance confirmation process of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ " to you. Please check and handle it in time.";
|
// + " to you. Please check and handle it in time.";
|
||||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a design compliance task to complete";
|
// + ": 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.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||||
|
|
||||||
|
//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())){
|
}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.
|
//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 "
|
//msgContentEN = currentUser.getUsername() + " has assigned the Pre-Homo confirmation process of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ " to you. Please check and handle it in time.";
|
// + " to you. Please check and handle it in time.";
|
||||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a Pre-Homo task to complete";
|
// + ": 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.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
//feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||||
|
|
||||||
|
//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())){
|
}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.
|
//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 "
|
//msgContentEN = currentUser.getUsername() + " has assigned the validation compliance confirmation process of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ " to you. Please check and handle it in time.";
|
// + " to you. Please check and handle it in time.";
|
||||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a validation compliance task to complete";
|
// + ": 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.setContent("Hello! " + currentUser.getUsername() + " has assigned the task to you. Please check and handle it in time.");
|
||||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
//feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||||
|
|
||||||
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
|
String hrefFeishu = backUrl
|
||||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink()
|
||||||
@@ -403,17 +468,36 @@ public class ProjectTaskInventoryDetailEOServiceImpl extends ServiceImpl<Project
|
|||||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
+ "&projectName=" + projectNameInfoEO.getProjectName();
|
||||||
//系统内部跳转链接
|
//系统内部跳转链接
|
||||||
String href = "<a href='"
|
//String href = "<a href='"
|
||||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName()
|
// + "&projectName=" + projectNameInfoEO.getProjectName()
|
||||||
+ "'>" + " View details" + "</a>";
|
// + "'>" + " View details" + "</a>";
|
||||||
String contentInfo = msgContentEN + " " + href;
|
//String contentInfo = msgContentEN + " " + href;
|
||||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||||
sendMessageMap.put("contentInfo",contentInfo);
|
//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.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.jero.common.api.vo.Result;
|
import com.jero.common.api.vo.Result;
|
||||||
import com.jero.common.constant.enums.CutEnum;
|
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.MessageTypeEnum;
|
||||||
|
import com.jero.common.constant.enums.MsgColorEnum;
|
||||||
import com.jero.common.exception.JeroBootException;
|
import com.jero.common.exception.JeroBootException;
|
||||||
import com.jero.common.system.query.QueryGenerator;
|
import com.jero.common.system.query.QueryGenerator;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
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.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.project.entity.*;
|
import com.jero.modules.project.entity.*;
|
||||||
import com.jero.modules.project.enums.*;
|
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.entity.SysUserRole;
|
||||||
import com.jero.modules.system.mapper.SysUserMapper;
|
import com.jero.modules.system.mapper.SysUserMapper;
|
||||||
import com.jero.modules.system.service.ISysUserRoleService;
|
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.system.service.impl.SysDictItemServiceImpl;
|
||||||
import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
|
import com.jero.modules.wkflow.enums.DesignComplianceNodeEnum;
|
||||||
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
import com.jero.modules.wkflow.enums.FlowTypeEnum;
|
||||||
@@ -91,6 +98,12 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
|||||||
@Value(value = "${jero.backUrl}")
|
@Value(value = "${jero.backUrl}")
|
||||||
private String 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
|
String dreUserIds = jsonObject.getString("dreUserIds"); //dre用户id
|
||||||
userIdList.addAll(Arrays.asList(dreUserIds.split(",")));
|
userIdList.addAll(Arrays.asList(dreUserIds.split(",")));
|
||||||
|
|
||||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
|
|
||||||
String msgContentEN = "";
|
//String msgContentEN = "";
|
||||||
String msgTitle = "";
|
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())){
|
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.
|
//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 "
|
//msgContentEN = "Please check and deal with the design compliance confirmation process of "
|
||||||
+ serialNumber + " in "
|
// + serialNumber + " in "
|
||||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ " in time.";
|
// + " in time.";
|
||||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a design compliance task to complete";
|
// + ": You have a design compliance task to complete";
|
||||||
|
|
||||||
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
//feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
||||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||||
feishuMsgVo.setRegulationNo(serialNumber);
|
//feishuMsgVo.setRegulationNo(serialNumber);
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
//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())){
|
}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.
|
//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 "
|
//msgContentEN = "Please check and address the Pre-Homo confirmation process of "
|
||||||
+ serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
// + serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||||
+ " in time.";
|
// + " in time.";
|
||||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a Pre-Homo task to complete";
|
// + ": You have a Pre-Homo task to complete";
|
||||||
|
|
||||||
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
//feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
||||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
//feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||||
feishuMsgVo.setRegulationNo(serialNumber);
|
//feishuMsgVo.setRegulationNo(serialNumber);
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
//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())){
|
}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.
|
//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 "
|
//msgContentEN = "Please check and address the validation compliance confirmation process of "
|
||||||
+ serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
// + serialNumber + " in "+ projectNameInfoEO.getProjectName()
|
||||||
+ " in time.";
|
// + " in time.";
|
||||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a validation compliance task to complete";
|
// + ": You have a validation compliance task to complete";
|
||||||
|
|
||||||
feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
//feishuMsgVo.setContent("Hello! Please address the task ASAP. ");
|
||||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
//feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||||
feishuMsgVo.setRegulationNo(serialNumber);
|
//feishuMsgVo.setRegulationNo(serialNumber);
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
//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
|
String hrefFeishu = backUrl
|
||||||
@@ -441,20 +512,40 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
|||||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||||
+ projectYearNameInfoEO.getYearName()
|
+ projectYearNameInfoEO.getYearName()
|
||||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket();
|
+ "&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='"
|
//String href = "<a href='"
|
||||||
+ JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.INVENTORY_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||||
+ projectYearNameInfoEO.getYearName()
|
// + projectYearNameInfoEO.getYearName()
|
||||||
+ "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
// + "&targetMarket=" + projectLibraryBase.getTargetMarket()
|
||||||
+ "'>" + " View details" + "</a>";
|
// + "'>" + " View details" + "</a>";
|
||||||
String contentInfo = msgContentEN + " " + href;
|
//String contentInfo = msgContentEN + " " + href;
|
||||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||||
sendMessageMap.put("contentInfo",contentInfo);
|
//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("提醒办理成功!");
|
return new Result<>().success("提醒办理成功!");
|
||||||
}
|
}
|
||||||
@@ -918,7 +1009,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
|||||||
String personChargeFeedback = "";
|
String personChargeFeedback = "";
|
||||||
|
|
||||||
|
|
||||||
FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
//FeishuMsgVo feishuMsgVo = new FeishuMsgVo();
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
String dutDateStr = "";
|
String dutDateStr = "";
|
||||||
|
|
||||||
@@ -926,90 +1017,138 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
|||||||
String msgContentEN = "";
|
String msgContentEN = "";
|
||||||
String msgTitle = "";
|
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())) {
|
if (StringUtils.equals(msgType, MsgTypeEnum.DESIGN_ISSUE_DRE_MSG.getValue())) {
|
||||||
taskKey = DesignComplianceNodeEnum.DRE_DISPOSE.getKey();
|
//taskKey = DesignComplianceNodeEnum.DRE_DISPOSE.getKey();
|
||||||
|
|
||||||
if(projectLawsInventoryEO.getDesignDueDate() != null){
|
if(projectLawsInventoryEO.getDesignDueDate() != null){
|
||||||
dutDateStr = sdf.format(projectLawsInventoryEO.getDesignDueDate());
|
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())){
|
}else if(StringUtils.equals(msgType, MsgTypeEnum.DESIGN_RETURN_MSG.getValue())){
|
||||||
String designDutyId = jsonObject.getString("designDutyId");//设计符合性流程责任人id
|
String designDutyId = jsonObject.getString("designDutyId");//设计符合性流程责任人id
|
||||||
userIdList.add(designDutyId);
|
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){
|
if(projectLawsInventoryEO.getDesignDueDate() != null){
|
||||||
dutDateStr = sdf.format(projectLawsInventoryEO.getDesignDueDate());
|
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 "
|
//feishuMsgVo.setContent("Hello! The compliance information you submitted has been rejected after review. Please check and address it in a timely manner.");
|
||||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||||
+ " 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.");
|
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
|
||||||
|
|
||||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
|
||||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_RETURN_MSG.getValue())){
|
}else if(StringUtils.equals(msgType, MsgTypeEnum.PREHOMO_RETURN_MSG.getValue())){
|
||||||
String prehomoDutyId = jsonObject.getString("prehomoDutyId");//prehomo流程责任人id
|
String prehomoDutyId = jsonObject.getString("prehomoDutyId");//prehomo流程责任人id
|
||||||
userIdList.add(prehomoDutyId);
|
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){
|
if(projectLawsInventoryEO.getPrehomoDueDate() != null){
|
||||||
dutDateStr = sdf.format(projectLawsInventoryEO.getPrehomoDueDate());
|
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 "
|
//msgContentEN = "The Pre-Homo confirmation of " + serialNumber + " in "
|
||||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
// + projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ " you sumitted has been rejected after review. Please check and address it in time.";
|
// + " you sumitted has been rejected after review. Please check and address it in time.";
|
||||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
||||||
+ ": You have a Pre-Homo task to complete";
|
// + ": 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.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.setTaskType("Pre-Homo Confirmation");
|
||||||
|
|
||||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||||
}else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_RETURN_MSG.getValue())){
|
}else if(StringUtils.equals(msgType, MsgTypeEnum.VERIFY_RETURN_MSG.getValue())){
|
||||||
String verifyDutyId = jsonObject.getString("verifyDutyId");//验证符合性流程责任人id
|
String verifyDutyId = jsonObject.getString("verifyDutyId");//验证符合性流程责任人id
|
||||||
userIdList.add(verifyDutyId);
|
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){
|
if(projectLawsInventoryEO.getVerifyDueDate() != null){
|
||||||
dutDateStr = sdf.format(projectLawsInventoryEO.getVerifyDueDate());
|
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 "
|
//feishuMsgVo.setContent("Hello! The compliance information you submitted has been rejected after review. Please check and address it in a timely manner.");
|
||||||
+ projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket()
|
//feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||||
+ " 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.");
|
//messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
||||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
|
||||||
|
|
||||||
messageTypeEnum = MessageTypeEnum.COMPLIANCE_CONFIRMATION;
|
|
||||||
}
|
}
|
||||||
/*55360问题。
|
/*55360问题。
|
||||||
feishuMsgVo.setDueDate(dutDateStr);
|
feishuMsgVo.setDueDate(dutDateStr);
|
||||||
feishuMsgVo.setInitiator(sysUser.getUsername());
|
feishuMsgVo.setInitiator(sysUser.getUsername());
|
||||||
*/
|
*/
|
||||||
feishuMsgVo.setRegulationNo(serialNumber);
|
//feishuMsgVo.setRegulationNo(serialNumber);
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBase.getTargetMarket());
|
||||||
|
|
||||||
|
|
||||||
/*//根据流程实例id,查询待办id
|
/*//根据流程实例id,查询待办id
|
||||||
@@ -1065,7 +1204,7 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
|||||||
personChargeFeedback = projectTaskInventoryEO.getVerifyPersonChargeFeedback();
|
personChargeFeedback = projectTaskInventoryEO.getVerifyPersonChargeFeedback();
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgContentEN)){
|
if(CollectionUtils.isNotEmpty(userIdList) && StringUtils.isNotEmpty(msgTitle)){
|
||||||
|
|
||||||
//飞书跳转链接
|
//飞书跳转链接
|
||||||
String hrefFeishu = backUrl
|
String hrefFeishu = backUrl
|
||||||
@@ -1075,13 +1214,32 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
|||||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||||
+ projectYearNameInfoEO.getYearName()
|
+ projectYearNameInfoEO.getYearName()
|
||||||
+ projectLibraryBase.getTargetMarket();
|
+ 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='"
|
//String href = "<a href='"
|
||||||
+ JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.DESIGN_AFFIRM_LINK.getLink() + projectLibraryBase.getId() + JumpLinkEnum.DESIGN_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||||
+ projectYearNameInfoEO.getYearName()
|
// + projectYearNameInfoEO.getYearName()
|
||||||
+ projectLibraryBase.getTargetMarket()
|
// + projectLibraryBase.getTargetMarket()
|
||||||
+ "'>" + " View details" + "</a>";
|
// + "'>" + " View details" + "</a>";
|
||||||
|
|
||||||
//飞书跳转链接 拼接跳转至任务详情页参数
|
//飞书跳转链接 拼接跳转至任务详情页参数
|
||||||
/*String hrefFeishu = backUrl
|
/*String hrefFeishu = backUrl
|
||||||
@@ -1133,13 +1291,13 @@ public class ProjectTaskInventoryEOServiceImpl extends ServiceImpl<ProjectTaskIn
|
|||||||
+ "&primaryKeyId=" + primaryKeyId
|
+ "&primaryKeyId=" + primaryKeyId
|
||||||
+ "&PersonChargeFeedback=" + personChargeFeedback
|
+ "&PersonChargeFeedback=" + personChargeFeedback
|
||||||
+ "'>" + " View details" + "</a>";*/
|
+ "'>" + " View details" + "</a>";*/
|
||||||
String contentInfo = msgContentEN + " " + href;
|
//String contentInfo = msgContentEN + " " + href;
|
||||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||||
sendMessageMap.put("contentInfo",contentInfo);
|
//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){
|
public void setSheetStyle(HSSFSheet sheet){
|
||||||
for (int i = 0; i <= 19; i++){
|
for (int i = 0; i <= 19; i++){
|
||||||
sheet.setColumnWidth(i,4000);
|
sheet.setColumnWidth(i,4000);
|
||||||
|
|||||||
+264
-95
@@ -1,8 +1,14 @@
|
|||||||
package com.jero.modules.project.service.impl;
|
package com.jero.modules.project.service.impl;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
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.MessageTypeEnum;
|
||||||
|
import com.jero.common.constant.enums.MsgColorEnum;
|
||||||
import com.jero.common.system.vo.LoginUser;
|
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.feishu.vo.FeishuMsgVo;
|
||||||
import com.jero.modules.project.entity.*;
|
import com.jero.modules.project.entity.*;
|
||||||
import com.jero.modules.project.enums.FeedBackHistoryDataStatusEnum;
|
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.beans.factory.annotation.Value;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
@@ -63,6 +70,12 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
|||||||
@Value(value = "${jero.backUrl}")
|
@Value(value = "${jero.backUrl}")
|
||||||
private String 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);
|
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.setContent("Hello! " + currentUser.getUsername() + " has replied to your engineering deliverable information. Please check and address it in a timely manner.");
|
||||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
|
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
|
||||||
|
|
||||||
MessageTypeEnum messageTypeEnum = null;
|
//MessageTypeEnum messageTypeEnum = null;
|
||||||
|
|
||||||
//消息内容
|
//消息内容
|
||||||
String msgContentEN = "";
|
//String msgContentEN = "";
|
||||||
String msgTitle = "";
|
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();
|
String flowType = projectTaskInventoryFeedbackEO.getFlowType();
|
||||||
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
|
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||||
msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
//msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||||
+ projectNameInfoEO.getProjectName() + " for design compliance confirmation. Please check and address it in time.";
|
// + projectNameInfoEO.getProjectName() + " for design compliance confirmation. Please check and address it in time.";
|
||||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||||
+ ": You have a design compliance task to complete";
|
// + ": You have a design compliance task to complete";
|
||||||
|
|
||||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
//feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
||||||
initiatorId = projectLawsInventoryEO.getDesignInitiatorId();
|
//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())){
|
}else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||||
msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
//msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||||
+ projectNameInfoEO.getProjectName() + " for Pre-Homo compliance confirmation. Please check and address it in time.";
|
// + projectNameInfoEO.getProjectName() + " for Pre-Homo compliance confirmation. Please check and address it in time.";
|
||||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||||
+ ": You have a Pre-Homo task to complete";
|
// + ": You have a Pre-Homo task to complete";
|
||||||
|
|
||||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
//feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
|
//feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
|
||||||
initiatorId = projectLawsInventoryEO.getPrehomoInitiatorId();
|
//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())){
|
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||||
msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
//msgContentEN = currentUser.getUsername() + " has replied to your engineering deliverable information of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||||
+ projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
|
// + projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
|
||||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||||
+ ": You have a validation compliance task to complete";
|
// + ": You have a validation compliance task to complete";
|
||||||
|
|
||||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
//feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
|
//feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
|
||||||
initiatorId = projectLawsInventoryEO.getVerifyInitiatorId();
|
//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() + "-"
|
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||||
+ projectYearNameInfoEO.getYearName()
|
+ projectYearNameInfoEO.getYearName()
|
||||||
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket();
|
+ "&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 = "";
|
List<SysUser> sysUsers = sysUserService.listByIds(userIdList);
|
||||||
if(StringUtils.isNotEmpty(initiatorId)){
|
List<String> thirdIdList = new ArrayList<>();
|
||||||
QueryWrapper<SysUser> queryOneWrapper = new QueryWrapper<>();
|
if(CollectionUtils.isNotEmpty(sysUsers)){
|
||||||
queryOneWrapper.lambda().eq(SysUser::getId,initiatorId);
|
thirdIdList = sysUsers.stream().map(SysUser::getThirdId).collect(Collectors.toList());
|
||||||
SysUser sysUser = this.sysUserService.getBaseMapper().selectOne(queryOneWrapper);
|
|
||||||
initiator = sysUser.getUsername();
|
|
||||||
}
|
}
|
||||||
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);
|
List<ProjectTaskInventoryFeedbackEO> projectTaskInventoryFeedbackEOS = this.baseMapper.selectList(queryWrapper);
|
||||||
if(CollectionUtils.isNotEmpty(projectTaskInventoryFeedbackEOS)){
|
if(CollectionUtils.isNotEmpty(projectTaskInventoryFeedbackEOS)){
|
||||||
List<String> idList = projectTaskInventoryFeedbackEOS.stream().distinct().map(ProjectTaskInventoryFeedbackEO::getProjectTaskInventoryId).collect(Collectors.toList());
|
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<>();
|
QueryWrapper<ProjectTaskInventoryDetailEO> inventoryDetailEOQueryWrapper = new QueryWrapper<>();
|
||||||
inventoryDetailEOQueryWrapper.lambda().in(ProjectTaskInventoryDetailEO::getId,idList);
|
inventoryDetailEOQueryWrapper.lambda().in(ProjectTaskInventoryDetailEO::getId,idList);
|
||||||
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOList = projectTaskInventoryDetailEOMapper.selectList(inventoryDetailEOQueryWrapper);
|
List<ProjectTaskInventoryDetailEO> projectTaskInventoryDetailEOList = projectTaskInventoryDetailEOMapper.selectList(inventoryDetailEOQueryWrapper);
|
||||||
@@ -302,6 +389,18 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
|||||||
if(CollectionUtils.isNotEmpty(projectTaskInventoryDetailList)){
|
if(CollectionUtils.isNotEmpty(projectTaskInventoryDetailList)){
|
||||||
projectTaskInventoryFeedbackEO.setStatus(projectTaskInventoryDetailList.get(0).getStatus());
|
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;
|
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.setContent("Hello! " + currentUser.getUsername() + " has submitted the engineering deliverable information. Please check and address it in a timely manner.");
|
||||||
feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
//feishuMsgVo.setRegulationNo(projectLawsInventoryEO.getSerialNumber());
|
||||||
feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
|
//feishuMsgVo.setProject(projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket());
|
||||||
|
|
||||||
String initiator = "";
|
String initiator = "";
|
||||||
if (StringUtils.isNotEmpty(initiatorId)) {
|
if (StringUtils.isNotEmpty(initiatorId)) {
|
||||||
@@ -385,48 +484,99 @@ public class ProjectTaskInventoryFeedbackEOServiceImpl extends ServiceImpl<Proje
|
|||||||
SysUser sysUser = this.sysUserService.getBaseMapper().selectOne(queryOneWrapper);
|
SysUser sysUser = this.sysUserService.getBaseMapper().selectOne(queryOneWrapper);
|
||||||
initiator = sysUser.getUsername();
|
initiator = sysUser.getUsername();
|
||||||
}
|
}
|
||||||
feishuMsgVo.setInitiator(initiator);
|
//feishuMsgVo.setInitiator(initiator);
|
||||||
|
|
||||||
MessageTypeEnum messageTypeEnum = null;
|
//MessageTypeEnum messageTypeEnum = null;
|
||||||
|
|
||||||
//消息内容
|
//消息内容
|
||||||
String msgContentEN = "";
|
//String msgContentEN = "";
|
||||||
String msgTitle = "";
|
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();
|
String flowType = projectTaskInventoryFeedbackEO.getFlowType();
|
||||||
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
|
if(StringUtils.equals(flowType,FlowTypeEnum.SJFHXSHLC.getValue())){
|
||||||
msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
|
//msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||||
+ projectNameInfoEO.getProjectName() + "for design compliance confirmation. Please check and address it in time.";
|
// + projectNameInfoEO.getProjectName() + "for design compliance confirmation. Please check and address it in time.";
|
||||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||||
+ ": You have a design compliance task to complete";
|
// + ": You have a design compliance task to complete";
|
||||||
|
|
||||||
feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
//feishuMsgVo.setTaskType("Design Compliance Confirmation");
|
||||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getDesignDueDate()));
|
//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())){
|
}else if(StringUtils.equals(flowType,FlowTypeEnum.PREHOMOQRLC.getValue())){
|
||||||
msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
|
//msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||||
+ projectNameInfoEO.getProjectName() + " for Pre-Homo confirmation. Please check and address it in time.";
|
// + projectNameInfoEO.getProjectName() + " for Pre-Homo confirmation. Please check and address it in time.";
|
||||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||||
+ ": You have a Pre-Homo task to complete";
|
// + ": You have a Pre-Homo task to complete";
|
||||||
|
|
||||||
feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
//feishuMsgVo.setTaskType("Pre-Homo Confirmation");
|
||||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getPrehomoDueDate()));
|
//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())){
|
}else if(StringUtils.equals(flowType,FlowTypeEnum.YZFHXSCLC.getValue())){
|
||||||
msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
|
//msgContentEN = currentUser.getUsername() + " has submitted the engineering deliverable information of "
|
||||||
+ projectLawsInventoryEO.getSerialNumber() + " in "
|
// + projectLawsInventoryEO.getSerialNumber() + " in "
|
||||||
+ projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
|
// + projectNameInfoEO.getProjectName() + " for validation compliance confirmation. Please check and address it in time.";
|
||||||
msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
//msgTitle = projectNameInfoEO.getProjectName() + "-" + projectYearNameInfoEO.getYearName() + " " + projectLibraryBaseInfo.getTargetMarket()
|
||||||
+ ": You have a validation compliance task to complete";
|
// + ": You have a validation compliance task to complete";
|
||||||
|
|
||||||
feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
//feishuMsgVo.setTaskType("Validation Compliance Confirmation");
|
||||||
feishuMsgVo.setDueDate(sdf.format(projectLawsInventoryEO.getVerifyDueDate()));
|
//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() + "-"
|
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||||
+ projectYearNameInfoEO.getYearName()
|
+ projectYearNameInfoEO.getYearName()
|
||||||
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket();
|
+ "&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='"
|
//String href = "<a href='"
|
||||||
+ JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
// + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getLink() + projectLibraryBaseInfo.getId() + JumpLinkEnum.PREHOMO_AFFIRM_LINK.getType()
|
||||||
+ "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
// + "&projectName=" + projectNameInfoEO.getProjectName() + "-"
|
||||||
+ projectYearNameInfoEO.getYearName()
|
// + projectYearNameInfoEO.getYearName()
|
||||||
+ "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket()
|
// + "&targetMarket=" + projectLibraryBaseInfo.getTargetMarket()
|
||||||
+ "'>" + " View details" + "</a>";
|
// + "'>" + " View details" + "</a>";
|
||||||
String contentInfo = msgContentEN + " " + href;
|
//String contentInfo = msgContentEN + " " + href;
|
||||||
Map<String,Object> sendMessageMap = new HashMap<>();
|
//Map<String,Object> sendMessageMap = new HashMap<>();
|
||||||
sendMessageMap.put("hrefFeishu",hrefFeishu);
|
//sendMessageMap.put("hrefFeishu",hrefFeishu);
|
||||||
sendMessageMap.put("contentInfo",contentInfo);
|
//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;
|
private String projectTaskInventoryDetailId;
|
||||||
//任务节点定义key
|
//任务节点定义key
|
||||||
private String taskDefinitionKey;
|
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
|
from
|
||||||
process_info_detail detail
|
process_info_detail detail
|
||||||
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId}
|
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}
|
and detail.`status` = #{params.taskStatus}
|
||||||
</if>
|
</if>
|
||||||
order by detail.submit_time desc
|
order by detail.submit_time desc
|
||||||
@@ -269,7 +269,7 @@
|
|||||||
from
|
from
|
||||||
process_info_detail detail
|
process_info_detail detail
|
||||||
where detail.process_info_id = pi.id and detail.user_id = #{params.currentUserId}
|
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}
|
and detail.`status` = #{params.taskStatus}
|
||||||
</if>
|
</if>
|
||||||
order by detail.submit_time desc
|
order by detail.submit_time desc
|
||||||
@@ -287,20 +287,22 @@
|
|||||||
<foreach collection="params.flowTypeList" index="index" item="item" open="(" separator="," close=")">
|
<foreach collection="params.flowTypeList" index="index" item="item" open="(" separator="," close=")">
|
||||||
#{item}
|
#{item}
|
||||||
</foreach>
|
</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'">
|
<if test="params.queryType == 'issuedProcess'">
|
||||||
and pi.create_by = #{params.createBy}
|
and pi.create_by = #{params.createBy}
|
||||||
</if>
|
</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>
|
</where>
|
||||||
) temp
|
) temp
|
||||||
<include refid="BaseQuerySql"/>
|
<include refid="BaseQuerySql"/>
|
||||||
|
|||||||
+6
-3
@@ -152,7 +152,8 @@ public class ParamsManifestTodoCenterServiceImpl implements IParamsManifestTodoC
|
|||||||
List<ParamsCollectManifestEO> pcmList = paramsManifestEOListMap.get(paramsManifestTodoCenterEO.getId());
|
List<ParamsCollectManifestEO> pcmList = paramsManifestEOListMap.get(paramsManifestTodoCenterEO.getId());
|
||||||
int count = 0;
|
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())
|
count = (int) pcmList.stream().filter(e-> CollectManifestStateEnum.WAIT_COLLECT.getValue().equals(e.getState())
|
||||||
|| CollectManifestStateEnum.SDT_BACK.getValue().equals(e.getState())
|
|| CollectManifestStateEnum.SDT_BACK.getValue().equals(e.getState())
|
||||||
@@ -172,7 +173,8 @@ public class ParamsManifestTodoCenterServiceImpl implements IParamsManifestTodoC
|
|||||||
if (count > 0) {
|
if (count > 0) {
|
||||||
paramsManifestTodoCenterEO.setWaitFillNum(count);
|
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())
|
count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_SDT.getValue().equals(e.getState())
|
||||||
|| CollectManifestStateEnum.DRE_BACK.getValue().equals(e.getState()))
|
|| CollectManifestStateEnum.DRE_BACK.getValue().equals(e.getState()))
|
||||||
@@ -187,7 +189,8 @@ public class ParamsManifestTodoCenterServiceImpl implements IParamsManifestTodoC
|
|||||||
paramsManifestTodoCenterEO.setWaitFillNum(count);
|
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())
|
count = (int) pcmList.stream().filter(e-> (CollectManifestStateEnum.WAIT_FILL.getValue().equals(e.getState())
|
||||||
|| CollectManifestStateEnum.CERT_BACK.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());
|
flowTypeList.add(FlowTypeEnum.FGJSPG.getValue());
|
||||||
params.put("flowTypeList",flowTypeList);
|
params.put("flowTypeList",flowTypeList);
|
||||||
params.put("currentUserId",currentUser.getId());
|
params.put("currentUserId",currentUser.getId());
|
||||||
|
params.put("taskStatus", TaskStatusEnum.HAVE_DONE.getValue());
|
||||||
|
|
||||||
IPage page = new Page(pageNo, pageSize);
|
IPage page = new Page(pageNo, pageSize);
|
||||||
IPage<ProcessInfoVO> result = this.baseMapper.queryLawsAssessPageList(page,params);
|
IPage<ProcessInfoVO> result = this.baseMapper.queryLawsAssessPageList(page,params);
|
||||||
|
|||||||
+45
-14
@@ -373,7 +373,7 @@ public class LawsWarnService {
|
|||||||
thirdIdList.addAll(thirdId);
|
thirdIdList.addAll(thirdId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
LoginUser sysUser = (LoginUser) SecurityUtils.getSubject().getPrincipal();
|
||||||
//查询文档
|
//查询文档
|
||||||
List<Map<String, Object>> mapList = bussDocumentLibraryEOMapper.selectMapsAll(documentIds);
|
List<Map<String, Object>> mapList = bussDocumentLibraryEOMapper.selectMapsAll(documentIds);
|
||||||
List<String> serialNumberList = new ArrayList<>();
|
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>";
|
"&serial_number=" + map.get("serial_number") + "'" + " target='_blank'>" + map.get("serial_number") + "</a>";
|
||||||
urlList.add(url);
|
urlList.add(url);
|
||||||
hrefList.add(href+timeContent);
|
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 {
|
try {
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
@@ -467,7 +498,7 @@ public class LawsWarnService {
|
|||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
bussDocumentLibraryEOService.sendWebsocket(documentIds, contentInfo);
|
bussDocumentLibraryEOService.sendWebsocket(documentIds, documentIds);
|
||||||
return "推送成功";
|
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.entity.BussDocumentLibraryEO;
|
||||||
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
import com.jero.modules.document.service.impl.BussDocumentLibraryEOServiceImpl;
|
||||||
import com.jero.modules.feishu.service.IFeishuService;
|
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.entity.OnlCgformSubscribe;
|
||||||
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
|
import com.jero.modules.subscribe.service.IOnlCgformSubscribeService;
|
||||||
import com.jero.modules.system.entity.SysAnnouncement;
|
import com.jero.modules.system.entity.SysAnnouncement;
|
||||||
@@ -123,15 +124,33 @@ public class TimedTaskWarn implements Job {
|
|||||||
//当前时间的前12个月
|
//当前时间的前12个月
|
||||||
String beforeTimeSixTen = beforeTime(12,xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
String beforeTimeSixTen = beforeTime(12,xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||||
|
|
||||||
if(currentTime.equals(beforeTimeSix) || currentTime.equals(beforeTimeSixTen) || currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str)){
|
// if(currentTime.equals(beforeTimeSix) || currentTime.equals(beforeTimeSixTen) || currentTime.equals(xin1Che1Xing2Shi2Shi1Ri4Qi1Str)){
|
||||||
//发送站内消息和飞书消息
|
// //发送站内消息和飞书消息
|
||||||
String format = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
// String format = sdf.format(xin1Che1Xing2Shi2Shi1Ri4Qi1);
|
||||||
String content = "The implementation date of the " + category +" "+ serialNumber
|
// String content = "The implementation date of the " + category +" "+ serialNumber
|
||||||
+ " new model you subscribed to is "+format+",please pay attention to check";
|
// + " new model you subscribed to is "+format+",please pay attention to check";
|
||||||
String contentInfo = "The implementation date of the " + category +" "+ href
|
// String contentInfo = "The implementation date of the " + category +" "+ href
|
||||||
+ " new model you subscribed to is "+format+",please pay attention to check";
|
// + " new model you subscribed to is "+format+",please pay attention to check";
|
||||||
String msgTitle = content;
|
// 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(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
|
String contentInfo = "The implementation date of the " + category +" "+ href
|
||||||
+ " production vehicle you subscribed to is "+format+",please pay attention to check";
|
+ " production vehicle you subscribed to is "+format+",please pay attention to check";
|
||||||
String msgTitle = content;
|
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) {
|
private void sendFeishu(SimpleDateFormat sdf,
|
||||||
//站内消息
|
BussDocumentLibraryEO bussDocumentLibraryEO,
|
||||||
//封装消息的实体类
|
String url,
|
||||||
SysAnnouncement sysAnnouncement = bussDocumentLibraryEOService.getSysAnnouncement(userIdList, title, content, contentInfo,MessageTypeEnum.WARN.getValue(),MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName());
|
List<String> thirdIdList,
|
||||||
sysAnnouncementService.saveAnnouncement(sysAnnouncement);
|
String flag) {
|
||||||
bussDocumentLibraryEOService.sendWebsocket(StringUtils.join(userIdList, ","), content);
|
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 {
|
try {
|
||||||
iFeishuService.batchSendMessage(thirdIdList.toArray(new String[]{}), contentFeiShu, MessageTypeEnum.WARN.getName(), url);
|
iFeishuService.sendCardMsgWarn(thirdIdList.toArray(new String[]{}),feishuMsgVo);
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
e.printStackTrace();
|
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){
|
private String beforeTime (int month,Date date){
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
Calendar calendarBefore = Calendar.getInstance();
|
Calendar calendarBefore = Calendar.getInstance();
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ public class BusMes {
|
|||||||
private String handlingTime; // 待办流程-批量办理专用
|
private String handlingTime; // 待办流程-批量办理专用
|
||||||
private String projectLawsInventoryIds; // 待办流程-批量办理专用
|
private String projectLawsInventoryIds; // 待办流程-批量办理专用
|
||||||
private String taskDefinitionKey; // 待办流程-批量办理专用
|
private String taskDefinitionKey; // 待办流程-批量办理专用
|
||||||
|
private String cut;//中英文切换标识
|
||||||
|
|
||||||
|
|
||||||
public String getUserId() {
|
public String getUserId() {
|
||||||
@@ -193,4 +194,12 @@ public class BusMes {
|
|||||||
public void setTaskDefinitionKey(String taskDefinitionKey) {
|
public void setTaskDefinitionKey(String taskDefinitionKey) {
|
||||||
this.taskDefinitionKey = 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',
|
cancelTopping:'Cancel Topping',
|
||||||
relatedProjectVersion:'Related project version',
|
relatedProjectVersion:'Related project version',
|
||||||
Importfailure:'Import failure',
|
Importfailure:'Import failure',
|
||||||
|
CuiBan:'CuiBan',
|
||||||
}
|
}
|
||||||
@@ -1461,4 +1461,5 @@ module.exports = {
|
|||||||
cancelTopping:'取消置顶',
|
cancelTopping:'取消置顶',
|
||||||
relatedProjectVersion:'相关项目版本',
|
relatedProjectVersion:'相关项目版本',
|
||||||
Importfailure:'导入失败',
|
Importfailure:'导入失败',
|
||||||
|
CuiBan:'催办',
|
||||||
}
|
}
|
||||||
@@ -21,11 +21,11 @@
|
|||||||
<!-- <span v-if="ol.text==$t('check')">-->
|
<!-- <span v-if="ol.text==$t('check')">-->
|
||||||
<!-- {{record.resultContent=='转换成功'&&record.syncState=='未同步'?ol.text:''}}-->
|
<!-- {{record.resultContent=='转换成功'&&record.syncState=='未同步'?ol.text:''}}-->
|
||||||
<!-- </span>-->
|
<!-- </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'">
|
v-has="'ocr:ocrRestful:downFile'">
|
||||||
{{record.resultContent=='转换成功'?ol.text:''}}
|
{{record.resultContent=='转换成功'?ol.text:''}}
|
||||||
</span>
|
</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}}
|
{{ol.text}}
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
@@ -105,7 +105,8 @@
|
|||||||
searchParmes: {},
|
searchParmes: {},
|
||||||
loading: false,
|
loading: false,
|
||||||
orderBy: '1',
|
orderBy: '1',
|
||||||
orderByField: ''
|
orderByField: '',
|
||||||
|
administrators:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -131,6 +132,14 @@
|
|||||||
this.getData()
|
this.getData()
|
||||||
this.getTableList()
|
this.getTableList()
|
||||||
this.userData = this.userInfo()
|
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(){
|
beforeDestroy(){
|
||||||
eventBUs.$off('searchQuery')
|
eventBUs.$off('searchQuery')
|
||||||
|
|||||||
@@ -18,7 +18,7 @@
|
|||||||
<!-- <span class="text">-->
|
<!-- <span class="text">-->
|
||||||
<!-- {{ol.text}}-->
|
<!-- {{ol.text}}-->
|
||||||
<!-- </span>-->
|
<!-- </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"
|
class="text"
|
||||||
v-has="'split:sarFileSplitInfo:bind'">
|
v-has="'split:sarFileSplitInfo:bind'">
|
||||||
{{ol.text}}
|
{{ol.text}}
|
||||||
@@ -27,7 +27,7 @@
|
|||||||
v-has="'split:sarFileSplitItems:page'">
|
v-has="'split:sarFileSplitItems:page'">
|
||||||
{{ol.text}}
|
{{ol.text}}
|
||||||
</span>
|
</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'">
|
v-has="'split:sarFileSplitInfo:delete'">
|
||||||
{{ol.text}}
|
{{ol.text}}
|
||||||
</span>
|
</span>
|
||||||
@@ -109,7 +109,8 @@
|
|||||||
loading: false,
|
loading: false,
|
||||||
orderBy: '1',
|
orderBy: '1',
|
||||||
userData: {},
|
userData: {},
|
||||||
orderByField: ''
|
orderByField: '',
|
||||||
|
administrators:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
@@ -141,6 +142,14 @@
|
|||||||
this.getData()
|
this.getData()
|
||||||
this.getTableList()
|
this.getTableList()
|
||||||
this.userData = this.userInfo()
|
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() {
|
beforeDestroy() {
|
||||||
eventBUs.$off('searchQuery')
|
eventBUs.$off('searchQuery')
|
||||||
|
|||||||
@@ -639,8 +639,7 @@
|
|||||||
}
|
}
|
||||||
let params = {
|
let params = {
|
||||||
paramsManifestId: paramsManifestid,
|
paramsManifestId: paramsManifestid,
|
||||||
flag: '7',
|
flag: '7'
|
||||||
userType: userType
|
|
||||||
}
|
}
|
||||||
getAction(url, params).then((res) => {
|
getAction(url, params).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
|
|||||||
@@ -15,7 +15,10 @@
|
|||||||
<a-list-item :key="index" v-for="(record, index) in announcement1" v-if="index <= 4">
|
<a-list-item :key="index" v-for="(record, index) in announcement1" v-if="index <= 4">
|
||||||
<div style="margin-left: 5%;width: 80%;">
|
<div style="margin-left: 5%;width: 80%;">
|
||||||
<p style="overflow: hidden; text-overflow: ellipsis;white-space: nowrap;color:#00B3BE">
|
<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>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</a-list-item>
|
</a-list-item>
|
||||||
@@ -50,6 +53,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loadding: false,
|
loadding: false,
|
||||||
|
language: '',
|
||||||
url: {
|
url: {
|
||||||
listCementByUser: '/sys/sysAnnouncementSend/getMessageUnreadList',
|
listCementByUser: '/sys/sysAnnouncementSend/getMessageUnreadList',
|
||||||
editCementSend: '/sys/sysAnnouncementSend/editByAnntIdAndUserId',
|
editCementSend: '/sys/sysAnnouncementSend/editByAnntIdAndUserId',
|
||||||
@@ -91,6 +95,7 @@
|
|||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.loadData()
|
this.loadData()
|
||||||
|
this.language = localStorage.getItem('language') || ''
|
||||||
// this.initWebSocket()
|
// this.initWebSocket()
|
||||||
if (store.getters.userInfo) {
|
if (store.getters.userInfo) {
|
||||||
this.$socketPublic.dispatch('webSocketInit')//初始化ws
|
this.$socketPublic.dispatch('webSocketInit')//初始化ws
|
||||||
@@ -139,7 +144,11 @@
|
|||||||
showAnnouncement(record) {
|
showAnnouncement(record) {
|
||||||
getAction(this.url.readAllMsg, { ids: record.id }).then((res) => {
|
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({
|
this.$router.push({
|
||||||
path: '/isps/userAnnouncement',
|
path: '/isps/userAnnouncement',
|
||||||
query: {
|
query: {
|
||||||
|
|||||||
+13
-9
@@ -32,10 +32,10 @@
|
|||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
<span class="Required">*</span>
|
<span class="Required">*</span>
|
||||||
<span class="title-text-text"
|
<span class="title-text-text"
|
||||||
:title="$t('problemClassification')">{{$t('problemClassification')}}</span>
|
:title="$t('classification')">{{$t('classification')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel itemModel-multi" prop="problemType">
|
<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"
|
@change="problemTypeChange"
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
v-model="formInline.problemType">
|
v-model="formInline.problemType">
|
||||||
@@ -125,14 +125,16 @@
|
|||||||
</span>
|
</span>
|
||||||
</a-select-option>
|
</a-select-option>
|
||||||
</a-select>
|
</a-select>
|
||||||
<a-button class="box-button-index"
|
|
||||||
:title="$t('addStandardInformation')"
|
|
||||||
type="primary" @click="bringInDocumentInformationClick">
|
|
||||||
{{$t('addStandardInformation')}}
|
|
||||||
</a-button>
|
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</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>
|
||||||
<a-row :gutter="24">
|
<a-row :gutter="24">
|
||||||
<a-col :span="24" style="height: 380px">
|
<a-col :span="24" style="height: 380px">
|
||||||
@@ -799,8 +801,9 @@
|
|||||||
width: 120px;
|
width: 120px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding: 0 0;
|
padding: 0 0;
|
||||||
float: right;
|
/*float: right;*/
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .box-button-index span {
|
::v-deep .box-button-index span {
|
||||||
@@ -843,8 +846,9 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.box-input-index {
|
.box-input-index {
|
||||||
width: calc(100% - 130px);
|
/*width: calc(100% - 130px);*/
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
width: 100%;
|
||||||
height: 48px;
|
height: 48px;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,8 +11,8 @@
|
|||||||
<div class="myNews-box-content-box" v-for="(item,index) in dataSource" :key="index" @click="magClick(item)">
|
<div class="myNews-box-content-box" v-for="(item,index) in dataSource" :key="index" @click="magClick(item)">
|
||||||
<img src="../../../assets/wdxx.png" alt="">
|
<img src="../../../assets/wdxx.png" alt="">
|
||||||
<div class="content-box">
|
<div class="content-box">
|
||||||
<div class="top" :title="item.msgContent">
|
<div class="top" :title="language == 'zh-cn'?item.msgContentCn:item.msgContent">
|
||||||
{{item.msgContent}}
|
{{language == 'zh-cn'?item.msgContentCn:item.msgContent}}
|
||||||
</div>
|
</div>
|
||||||
<div class="botton">
|
<div class="botton">
|
||||||
{{item.sendTime}}
|
{{item.sendTime}}
|
||||||
@@ -44,11 +44,13 @@
|
|||||||
loading: false,
|
loading: false,
|
||||||
pageNo: 1,
|
pageNo: 1,
|
||||||
pageSize: 4,
|
pageSize: 4,
|
||||||
dataSource: []
|
dataSource: [],
|
||||||
|
language: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList()
|
||||||
|
this.language = localStorage.getItem('language') || ''
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getList() {
|
getList() {
|
||||||
@@ -69,7 +71,11 @@
|
|||||||
magClick(row) {
|
magClick(row) {
|
||||||
getAction(this.url.readAllMsg, { ids: row.id }).then((res) => {
|
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({
|
this.$router.push({
|
||||||
path: '/isps/userAnnouncement',
|
path: '/isps/userAnnouncement',
|
||||||
query: {
|
query: {
|
||||||
|
|||||||
@@ -65,16 +65,16 @@
|
|||||||
<span slot="operation" slot-scope="text,record">
|
<span slot="operation" slot-scope="text,record">
|
||||||
<a class="text-operation" @click="edit(record)"
|
<a class="text-operation" @click="edit(record)"
|
||||||
v-has="'dummyInventoryBase:deleteBatch'"
|
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>
|
:disabled="record.state == 1?true:false">{{$t('edit')}}</a>
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
v-if="record.createBy == userData.username"
|
v-if="record.createBy == userData.username || administrators"
|
||||||
v-has="'dummyInventoryBase:issue'"
|
v-has="'dummyInventoryBase:issue'"
|
||||||
@click="withdraw(record)">
|
@click="withdraw(record)">
|
||||||
{{record.state == 2 ? $t('release') : $t('withdraw')}}
|
{{record.state == 2 ? $t('release') : $t('withdraw')}}
|
||||||
</a>
|
</a>
|
||||||
<a class="text-operation" :disabled="record.state == 1?true:false"
|
<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'"
|
v-has="'dummyInventoryBase:deleteBatch'"
|
||||||
@click="maintenanceList(record)">{{$t('maintenanceList')}}</a>
|
@click="maintenanceList(record)">{{$t('maintenanceList')}}</a>
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
@@ -84,7 +84,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<a class="text-operation" :disabled="record.state == 1?true:false"
|
<a class="text-operation" :disabled="record.state == 1?true:false"
|
||||||
v-has="'dummyInventoryBase:deleteBatch'"
|
v-has="'dummyInventoryBase:deleteBatch'"
|
||||||
v-if="record.createBy == userData.username"
|
v-if="record.createBy == userData.username || administrators"
|
||||||
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -244,13 +244,21 @@
|
|||||||
scopedSlots: { customRender: 'operation' }
|
scopedSlots: { customRender: 'operation' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
queryParam: {}
|
queryParam: {},
|
||||||
|
administrators:false,
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList()
|
||||||
this.userData = this.userInfo()
|
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: {
|
methods: {
|
||||||
...mapGetters(['userInfo']),
|
...mapGetters(['userInfo']),
|
||||||
|
|||||||
@@ -107,7 +107,7 @@
|
|||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,24 +8,24 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="header-content">
|
<div class="header-content">
|
||||||
<div class="operator-text"
|
<a-button class="header-btn submit"
|
||||||
v-if="$route.query.TaskKey == 'zrrclrw' && this.$route.query.isDisplay"
|
v-if="$route.query.TaskKey == 'zrrclrw' && this.$route.query.isDisplay"
|
||||||
@click="distributionEngineerClick($t('distributionEngineer'),1)">
|
@click="distributionEngineerClick($t('distributionEngineer'),1)"
|
||||||
<a-icon type="audit"/>
|
type="primary">
|
||||||
{{ $t('distributionEngineer') }}
|
{{$t('distributionEngineer')}}
|
||||||
</div>
|
</a-button>
|
||||||
<div class="operator-text"
|
<a-button class="header-btn submit"
|
||||||
v-if="$route.query.TaskKey == 'zrrclrw' && this.$route.query.isDisplay"
|
v-if="$route.query.TaskKey == 'zrrclrw' && this.$route.query.isDisplay"
|
||||||
@click="reminderHandling()">
|
@click="distributionEngineerClick($t('addFeedback'),2)"
|
||||||
<a-icon type="sound"/>
|
type="primary">
|
||||||
{{ $t('reminderHandling') }}
|
{{$t('addFeedback')}}
|
||||||
</div>
|
</a-button>
|
||||||
<div class="operator-text"
|
<!-- <div class="operator-text"-->
|
||||||
v-if="$route.query.TaskKey == 'zrrclrw' && this.$route.query.isDisplay"
|
<!-- v-if="$route.query.TaskKey == 'zrrclrw' && this.$route.query.isDisplay"-->
|
||||||
@click="distributionEngineerClick($t('addFeedback'),2)">
|
<!-- @click="reminderHandling()">-->
|
||||||
<a-icon type="plus-circle"/>
|
<!-- <a-icon type="sound"/>-->
|
||||||
{{ $t('addFeedback') }}
|
<!-- {{ $t('reminderHandling') }}-->
|
||||||
</div>
|
<!-- </div>-->
|
||||||
</div>
|
</div>
|
||||||
<a-table
|
<a-table
|
||||||
ref="table"
|
ref="table"
|
||||||
@@ -74,6 +74,11 @@
|
|||||||
@click="deleted(result)">
|
@click="deleted(result)">
|
||||||
{{$t('deleteLib')}}
|
{{$t('deleteLib')}}
|
||||||
</a>
|
</a>
|
||||||
|
<a class="text"
|
||||||
|
@click="reminderClick(result)"
|
||||||
|
v-if="$route.query.TaskKey == 'zrrclrw' && !result.createUser">
|
||||||
|
{{ $t('reminderHandling') }}
|
||||||
|
</a>
|
||||||
</span>
|
</span>
|
||||||
</a-table>
|
</a-table>
|
||||||
<a-modal
|
<a-modal
|
||||||
@@ -279,31 +284,31 @@
|
|||||||
</div>
|
</div>
|
||||||
<JLoading :loading="pageLoading">{{$t('dataLoading')}}</JLoading>
|
<JLoading :loading="pageLoading">{{$t('dataLoading')}}</JLoading>
|
||||||
</a-modal>
|
</a-modal>
|
||||||
<a-modal
|
<!-- <a-modal-->
|
||||||
:title="$t('reminderHandling')"
|
<!-- :title="$t('reminderHandling')"-->
|
||||||
:width="800"
|
<!-- :width="800"-->
|
||||||
:visible="visibleTable"
|
<!-- :visible="visibleTable"-->
|
||||||
:maskClosable="false"
|
<!-- :maskClosable="false"-->
|
||||||
@cancel="visibleTable = false"
|
<!-- @cancel="visibleTable = false"-->
|
||||||
>
|
<!-- >-->
|
||||||
<template slot="footer">
|
<!-- <template slot="footer">-->
|
||||||
<a-button key="back" @click="visibleTable = false">
|
<!-- <a-button key="back" @click="visibleTable = false">-->
|
||||||
{{$t('cancel')}}
|
<!-- {{$t('cancel')}}-->
|
||||||
</a-button>
|
<!-- </a-button>-->
|
||||||
</template>
|
<!-- </template>-->
|
||||||
<a-table
|
<!-- <a-table-->
|
||||||
ref="table"
|
<!-- ref="table"-->
|
||||||
:loading="loadingTable"
|
<!-- :loading="loadingTable"-->
|
||||||
:pagination="false"
|
<!-- :pagination="false"-->
|
||||||
:scroll="{x: true,y:400}"
|
<!-- :scroll="{x: true,y:400}"-->
|
||||||
:data-source="dataSourceTable"
|
<!-- :data-source="dataSourceTable"-->
|
||||||
:columns="columnsTable"
|
<!-- :columns="columnsTable"-->
|
||||||
>
|
<!-- >-->
|
||||||
<span slot="operationTable" slot-scope="result">
|
<!-- <span slot="operationTable" slot-scope="result">-->
|
||||||
<a @click="reminderClick(result)">{{$t('reminder')}}</a>
|
<!-- <a @click="reminderClick(result)">{{$t('reminder')}}</a>-->
|
||||||
</span>
|
<!-- </span>-->
|
||||||
</a-table>
|
<!-- </a-table>-->
|
||||||
</a-modal>
|
<!-- </a-modal>-->
|
||||||
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
<uploadFile ref="uploadFile" @uploadSuccess="uploadSuccess"/>
|
||||||
<viewFileModel ref="viewFileModelRef"/>
|
<viewFileModel ref="viewFileModelRef"/>
|
||||||
</div>
|
</div>
|
||||||
@@ -436,7 +441,7 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('operation'),
|
title: this.$t('operation'),
|
||||||
align: 'left',
|
align: 'left',
|
||||||
width: 160,
|
width: 190,
|
||||||
scopedSlots: { customRender: 'operation' }
|
scopedSlots: { customRender: 'operation' }
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
@@ -722,7 +727,7 @@
|
|||||||
_this.formInline.userId.splice(num, 1)
|
_this.formInline.userId.splice(num, 1)
|
||||||
_this.formInline.userId = _this.formInline.userId.join(',')
|
_this.formInline.userId = _this.formInline.userId.join(',')
|
||||||
_this.formInline = { ..._this.formInline }
|
_this.formInline = { ..._this.formInline }
|
||||||
if (id){
|
if (id) {
|
||||||
deleteAction('/project/projectTaskInventoryDetailEO/delete', { id: id }).then((res) => {
|
deleteAction('/project/projectTaskInventoryDetailEO/delete', { id: id }).then((res) => {
|
||||||
if (res.success) {
|
if (res.success) {
|
||||||
_this.$message.success(_this.$t('OperationSuccessful'))
|
_this.$message.success(_this.$t('OperationSuccessful'))
|
||||||
@@ -829,7 +834,7 @@
|
|||||||
line-height: 80px;
|
line-height: 80px;
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
}
|
}
|
||||||
@@ -960,4 +965,9 @@
|
|||||||
line-height: 200px;
|
line-height: 200px;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.header-btn {
|
||||||
|
height: 38px;
|
||||||
|
margin-left: 16px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -384,7 +384,7 @@
|
|||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -478,7 +478,7 @@
|
|||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -223,7 +223,7 @@
|
|||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -238,7 +238,7 @@
|
|||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -111,7 +111,7 @@
|
|||||||
line-height: 80px;
|
line-height: 80px;
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -127,7 +127,7 @@
|
|||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -325,7 +325,7 @@
|
|||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -116,7 +116,7 @@
|
|||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -110,7 +110,7 @@
|
|||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
|
|
||||||
.header-text {
|
.header-text {
|
||||||
font-size: 16px;
|
font-size: 18px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
color: #000F16;
|
color: #000F16;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -339,7 +339,7 @@
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.$message.warning(this.$t('operationFailed'))
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -268,7 +268,7 @@
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.$message.warning(this.$t('operationFailed'))
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -209,7 +209,7 @@
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.$message.warning(this.$t('operationFailed'))
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -367,7 +367,7 @@
|
|||||||
this.edit()
|
this.edit()
|
||||||
} else {
|
} else {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
this.$message.warning(this.$t('operationFailed'))
|
this.$message.warning(res.message)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
{{$t('basicInformationOfParameters')}}
|
{{$t('basicInformationOfParameters')}}
|
||||||
</div>
|
</div>
|
||||||
<div class="header-tight">
|
<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">
|
style="line-height: 32px" @click="edit">
|
||||||
{{$t('edit')}}
|
{{$t('edit')}}
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -115,7 +115,8 @@
|
|||||||
{{$t('regulatoryCertificationTaskPlan')}}
|
{{$t('regulatoryCertificationTaskPlan')}}
|
||||||
</div>
|
</div>
|
||||||
<div class="header-tight">
|
<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"
|
style="line-height: 32px"
|
||||||
@click="settingClick">{{$t('setting')}}
|
@click="settingClick">{{$t('setting')}}
|
||||||
</a-button>
|
</a-button>
|
||||||
@@ -183,6 +184,7 @@
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
queryForm: {},
|
queryForm: {},
|
||||||
|
administrators:false,
|
||||||
activeKey: this.$t('CurrentStatusOfTheProject'),
|
activeKey: this.$t('CurrentStatusOfTheProject'),
|
||||||
url: {
|
url: {
|
||||||
queryById: 'project/projectLibraryBase/queryById',
|
queryById: 'project/projectLibraryBase/queryById',
|
||||||
@@ -199,6 +201,14 @@
|
|||||||
mounted() {
|
mounted() {
|
||||||
this.getForm()
|
this.getForm()
|
||||||
this.getSetting()
|
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: {
|
methods: {
|
||||||
...mapGetters(['userInfo']),
|
...mapGetters(['userInfo']),
|
||||||
|
|||||||
@@ -76,10 +76,10 @@
|
|||||||
</a-form>
|
</a-form>
|
||||||
</div>
|
</div>
|
||||||
<div class="table-operator">
|
<div class="table-operator">
|
||||||
<!-- <div class="operator-text" @click="batSettingClick">-->
|
<div class="operator-text" @click="cuibanClick">
|
||||||
<!-- <a-icon type="setting"/>-->
|
<a-icon type="sound"/>
|
||||||
<!-- {{ $t('batSetting') }}-->
|
{{ $t('CuiBan') }}
|
||||||
<!-- </div>-->
|
</div>
|
||||||
<div @click="BatchMaintenanceProgress" class="operator-text">
|
<div @click="BatchMaintenanceProgress" class="operator-text">
|
||||||
<a-icon type="setting"/>
|
<a-icon type="setting"/>
|
||||||
{{$t('BatchMaintenanceProgress')}}
|
{{$t('BatchMaintenanceProgress')}}
|
||||||
@@ -190,6 +190,7 @@
|
|||||||
<taskBatSetting @taskBatSettingForm="taskBatSettingForm" ref="taskBatSettingRef"></taskBatSetting>
|
<taskBatSetting @taskBatSettingForm="taskBatSettingForm" ref="taskBatSettingRef"></taskBatSetting>
|
||||||
<batchChangeModel @batchChangeModel="batchChangeModel" ref="batchChangeModelRef"/>
|
<batchChangeModel @batchChangeModel="batchChangeModel" ref="batchChangeModelRef"/>
|
||||||
<batchModel @batchModel="batchModel" ref="batchModelRef"/>
|
<batchModel @batchModel="batchModel" ref="batchModelRef"/>
|
||||||
|
<cuibanModel @cibanModel="cibanModel" ref="cModelRef"/>
|
||||||
<!-- 错误数据提示-->
|
<!-- 错误数据提示-->
|
||||||
<a-modal
|
<a-modal
|
||||||
:title="$t('operationFailed')"
|
:title="$t('operationFailed')"
|
||||||
@@ -222,6 +223,7 @@
|
|||||||
import batchModel from './batchModel'
|
import batchModel from './batchModel'
|
||||||
import TaskListModel from './TaskListModel'
|
import TaskListModel from './TaskListModel'
|
||||||
import taskBatSetting from './taskBatSetting'
|
import taskBatSetting from './taskBatSetting'
|
||||||
|
import cuibanModel from './cuibanModel'
|
||||||
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
import { getAction, postAction, deleteAction, downloadFile } from '@/api/manage'
|
||||||
import { mapGetters } from 'vuex'
|
import { mapGetters } from 'vuex'
|
||||||
import store from '@/store/'
|
import store from '@/store/'
|
||||||
@@ -233,6 +235,7 @@
|
|||||||
TaskListModel,
|
TaskListModel,
|
||||||
batchChangeModel,
|
batchChangeModel,
|
||||||
batchModel,
|
batchModel,
|
||||||
|
cuibanModel,
|
||||||
taskBatSetting
|
taskBatSetting
|
||||||
},
|
},
|
||||||
props: ['isDisplayNum', 'areaOfResponsibility'],
|
props: ['isDisplayNum', 'areaOfResponsibility'],
|
||||||
@@ -536,6 +539,17 @@
|
|||||||
let item = JSON.parse(JSON.stringify(val))
|
let item = JSON.parse(JSON.stringify(val))
|
||||||
this.$refs.TaskListModelRef.getData(item, this.$t('CurrentStatus'))
|
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() {
|
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>
|
</div>
|
||||||
<div v-if="!isDisplay" style="float: right;margin-top: 1px;margin-bottom: 0px">
|
<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">
|
class="operator-text">
|
||||||
<a-icon type="export" :rotate="-90"/>
|
<a-icon type="export" :rotate="-90"/>
|
||||||
{{ $t('export') }}
|
{{ $t('export') }}
|
||||||
|
|||||||
@@ -83,14 +83,14 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="operator-text"
|
<div class="operator-text"
|
||||||
v-has="'projectRelatedPersonnel:importExcel'"
|
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'"
|
<ImportFile :url="url" :projectId="$route.query.id" :isTrue="true" :accept="'.xls'"
|
||||||
@getList="getPersonnelList"/>
|
@getList="getPersonnelList"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="operator-text"
|
<div class="operator-text"
|
||||||
@click="batSettingClick"
|
@click="batSettingClick"
|
||||||
v-has="'projectRelatedPersonnel:setting'"
|
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"/>
|
<a-icon type="setting"/>
|
||||||
{{$t('batSetting')}}
|
{{$t('batSetting')}}
|
||||||
</div>
|
</div>
|
||||||
@@ -388,13 +388,15 @@
|
|||||||
queryCertificationEngineer: '/project/projectRelatedPersonnel/queryCertificationEngineer'
|
queryCertificationEngineer: '/project/projectRelatedPersonnel/queryCertificationEngineer'
|
||||||
},
|
},
|
||||||
selectedRowKeys: [],
|
selectedRowKeys: [],
|
||||||
dictOptionsValue: []
|
dictOptionsValue: [],
|
||||||
|
administrators: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
columns() {
|
columns() {
|
||||||
let columnResult = JSON.parse(JSON.stringify(this.columnsAll))
|
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++) {
|
for (var i = 0; i < columnResult.length; i++) {
|
||||||
if (columnResult[i].title === this.$t('operation')) {
|
if (columnResult[i].title === this.$t('operation')) {
|
||||||
columnResult.splice(i, 1)
|
columnResult.splice(i, 1)
|
||||||
@@ -441,6 +443,14 @@
|
|||||||
getData() {
|
getData() {
|
||||||
this.visible = true
|
this.visible = true
|
||||||
this.queryParam = {}
|
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.getList()
|
||||||
this.queryCertificationEngineer()
|
this.queryCertificationEngineer()
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -139,7 +139,7 @@
|
|||||||
</a>
|
</a>
|
||||||
<a class="text-operation"
|
<a class="text-operation"
|
||||||
v-has="'projectLibraryBase:delete'"
|
v-has="'projectLibraryBase:delete'"
|
||||||
v-if="record.createBy == userInfoQuery.username"
|
v-if="record.createBy == userInfoQuery.username || administrators"
|
||||||
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
@click="deleteLib(record)">{{$t('deleteLib')}}</a>
|
||||||
<!-- <a class="text-operation" @click="entryNameClick(record)">{{$t('see')}}</a>-->
|
<!-- <a class="text-operation" @click="entryNameClick(record)">{{$t('see')}}</a>-->
|
||||||
</span>
|
</span>
|
||||||
@@ -264,12 +264,21 @@
|
|||||||
}
|
}
|
||||||
],
|
],
|
||||||
userInfoQuery: {},
|
userInfoQuery: {},
|
||||||
queryParam: {}
|
queryParam: {},
|
||||||
|
administrators: false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getList()
|
this.getList()
|
||||||
this.userInfoQuery = this.userInfo()
|
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: {
|
methods: {
|
||||||
...mapGetters(['userInfo']),
|
...mapGetters(['userInfo']),
|
||||||
|
|||||||
@@ -126,6 +126,13 @@
|
|||||||
description: '定时任务在线管理',
|
description: '定时任务在线管理',
|
||||||
// 查询条件
|
// 查询条件
|
||||||
queryParam: {},
|
queryParam: {},
|
||||||
|
ipagination: {
|
||||||
|
total: 0,
|
||||||
|
pageSize: 20,//每页中显示10条数据
|
||||||
|
showSizeChanger: true,
|
||||||
|
pageSizeOptions: ["10", "20", "50", "100"],//每页中显示的数据
|
||||||
|
showTotal: total => `共有 ${total} 条数据`, //分页中显示总的数据
|
||||||
|
},
|
||||||
// 表头
|
// 表头
|
||||||
columns: [
|
columns: [
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -71,8 +71,9 @@
|
|||||||
@change="handleTableChange">
|
@change="handleTableChange">
|
||||||
<span slot="msgTitile" slot-scope="text,scope">
|
<span slot="msgTitile" slot-scope="text,scope">
|
||||||
<!-- @click="msgContentClick(scope)"-->
|
<!-- @click="msgContentClick(scope)"-->
|
||||||
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}" :title="text">
|
<a :style="{'color':scope.readFlag == 0 ? 'red':'#00A0E9'}"
|
||||||
{{text}}
|
:title="language == 'zh-cn' ? scope.msgContentCn : scope.msgContent">
|
||||||
|
{{language == 'zh-cn' ? scope.msgContentCn : scope.msgContent}}
|
||||||
</a>
|
</a>
|
||||||
</span>
|
</span>
|
||||||
<span slot="msgCategory" slot-scope="text,scope">
|
<span slot="msgCategory" slot-scope="text,scope">
|
||||||
@@ -82,7 +83,7 @@
|
|||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
<p slot="expandedRowRender" slot-scope="record" style="margin: 0;padding-left: 58px;">
|
<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>
|
</span>
|
||||||
</p>
|
</p>
|
||||||
</a-table>
|
</a-table>
|
||||||
@@ -163,10 +164,10 @@
|
|||||||
dataIndex: 'sendTime'
|
dataIndex: 'sendTime'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title:'',
|
title: '',
|
||||||
align: 'left',
|
align: 'left',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
width: 50,
|
width: 50
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
url: {
|
url: {
|
||||||
@@ -177,7 +178,8 @@
|
|||||||
},
|
},
|
||||||
loading: false,
|
loading: false,
|
||||||
openPath: '',
|
openPath: '',
|
||||||
formData: ''
|
formData: '',
|
||||||
|
language: ''
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
@@ -186,16 +188,25 @@
|
|||||||
this.loadData()
|
this.loadData()
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
mounted() {
|
||||||
|
this.language = localStorage.getItem('language') || ''
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
expandIcon(props) {
|
expandIcon(props) {
|
||||||
if (props.expanded) {
|
if (props.expanded) {
|
||||||
return <a-icon type='down' onClick={e => {
|
return <a-icon type = 'down'onClick = { e=>
|
||||||
props.onExpand(props.record, e);
|
{
|
||||||
}}/>;
|
props.onExpand(props.record, e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/>;
|
||||||
} else {
|
} else {
|
||||||
return <a-icon type='right' onClick={e => {
|
return <a-icon type = 'right' onClick = { e =>
|
||||||
props.onExpand(props.record, e);
|
{
|
||||||
}}/>;
|
props.onExpand(props.record, e)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
/>;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getQueryParams() {
|
getQueryParams() {
|
||||||
@@ -359,8 +370,9 @@
|
|||||||
height: 38px;
|
height: 38px;
|
||||||
/*margin-top: 2px;*/
|
/*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>
|
||||||
<style>
|
<style>
|
||||||
|
|||||||
@@ -21,29 +21,32 @@
|
|||||||
|
|
||||||
<a-spin :spinning="confirmLoading">
|
<a-spin :spinning="confirmLoading">
|
||||||
<a-form :form="form">
|
<a-form :form="form">
|
||||||
<!-- v-if="!disabled"-->
|
<!-- v-if="!disabled"-->
|
||||||
<a-form-item :label="$t('userAccount')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<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"/>
|
:readOnly="!!model.id"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
<!-- v-if="!model.id && !disabled"-->
|
<!-- v-if="!model.id && !disabled"-->
|
||||||
<template>
|
<template>
|
||||||
<!-- <a-form-item :label="$t('LoginPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
<!-- <a-form-item :label="$t('LoginPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
<!-- <a-input type="password" :placeholder="$t('enterLoginPassword')" autocomplete='new-password'-->
|
<!-- <a-input type="password" :placeholder="$t('enterLoginPassword')" autocomplete='new-password'-->
|
||||||
<!-- v-decorator="[ 'password',validatorRules.password]"/>-->
|
<!-- v-decorator="[ 'password',validatorRules.password]"/>-->
|
||||||
<!-- </a-form-item>-->
|
<!-- </a-form-item>-->
|
||||||
<!-- v-if="!disabled"-->
|
<!-- v-if="!disabled"-->
|
||||||
<!-- <a-form-item :label="$t('ConfirmPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
<!-- <a-form-item :label="$t('ConfirmPassword')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
<!-- <a-input type="password" @blur="handleConfirmBlur" :placeholder="$t('reenterLoginPassword')"-->
|
<!-- <a-input type="password" @blur="handleConfirmBlur" :placeholder="$t('reenterLoginPassword')"-->
|
||||||
<!-- v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>-->
|
<!-- v-decorator="[ 'confirmpassword', validatorRules.confirmpassword]"/>-->
|
||||||
<!-- </a-form-item>-->
|
<!-- </a-form-item>-->
|
||||||
</template>
|
</template>
|
||||||
<!-- v-if="!disabled"-->
|
<!-- v-if="!disabled"-->
|
||||||
<a-form-item :label="$t('userName')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<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>
|
||||||
<a-form-item :label="$t('position')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<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>
|
||||||
|
|
||||||
<!--<a-form-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
<!--<a-form-item label="工号" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
@@ -53,9 +56,9 @@
|
|||||||
<!--<a-form-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
<!--<a-form-item label="职务" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
<!--<j-select-position placeholder="请选择职务" :multiple="false" v-decorator="['post', {}]"/>-->
|
<!--<j-select-position placeholder="请选择职务" :multiple="false" v-decorator="['post', {}]"/>-->
|
||||||
<!--</a-form-item>-->
|
<!--</a-form-item>-->
|
||||||
<!-- v-show="!roleDisabled"-->
|
<!-- v-show="!roleDisabled"-->
|
||||||
<a-form-item :label="$t('RoleAssignment')" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
<a-form-item :label="$t('RoleAssignment')" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||||
>
|
>
|
||||||
<a-select
|
<a-select
|
||||||
mode="multiple"
|
mode="multiple"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
@@ -63,7 +66,7 @@
|
|||||||
:placeholder="$t('selectUserRole')"
|
:placeholder="$t('selectUserRole')"
|
||||||
optionFilterProp="children"
|
optionFilterProp="children"
|
||||||
v-model="selectedRole"
|
v-model="selectedRole"
|
||||||
:disabled='isdisabled'
|
:disabled='false'
|
||||||
:getPopupContainer="(target) => target.parentNode">
|
:getPopupContainer="(target) => target.parentNode">
|
||||||
<a-select-option v-for="(role,roleindex) in roleList" :key="roleindex.toString()" :value="role.id">
|
<a-select-option v-for="(role,roleindex) in roleList" :key="roleindex.toString()" :value="role.id">
|
||||||
{{ role.roleName }}
|
{{ role.roleName }}
|
||||||
@@ -72,9 +75,9 @@
|
|||||||
</a-form-item>
|
</a-form-item>
|
||||||
|
|
||||||
<!--部门分配-->
|
<!--部门分配-->
|
||||||
<!-- v-show="!departDisabled && !disabled"-->
|
<!-- v-show="!departDisabled && !disabled"-->
|
||||||
<a-form-item :label="$t('DepartmentAllocation')" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
<a-form-item :label="$t('DepartmentAllocation')" :labelCol="labelCol" :wrapperCol="wrapperCol"
|
||||||
>
|
>
|
||||||
<a-input-search
|
<a-input-search
|
||||||
:placeholder="$t('ClickSelectDepartment')"
|
:placeholder="$t('ClickSelectDepartment')"
|
||||||
v-model="checkedDepartNameString"
|
v-model="checkedDepartNameString"
|
||||||
@@ -101,34 +104,34 @@
|
|||||||
<!--</a-form-item>-->
|
<!--</a-form-item>-->
|
||||||
|
|
||||||
<!-- update--begin--autor:wangshuai-----date:20200108------for:新增身份和负责部门------ -->
|
<!-- update--begin--autor:wangshuai-----date:20200108------for:新增身份和负责部门------ -->
|
||||||
<!-- v-if="!disabled"-->
|
<!-- v-if="!disabled"-->
|
||||||
<!-- <a-form-item :label="$t('identity')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
<!-- <a-form-item :label="$t('identity')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
<!-- <a-radio-group-->
|
<!-- <a-radio-group-->
|
||||||
<!-- v-model="identity"-->
|
<!-- v-model="identity"-->
|
||||||
<!-- @change="identityChange">-->
|
<!-- @change="identityChange">-->
|
||||||
<!-- <a-radio value="1">{{$t('OrdinaryUsers')}}</a-radio>-->
|
<!-- <a-radio value="1">{{$t('OrdinaryUsers')}}</a-radio>-->
|
||||||
<!-- <a-radio value="2">{{$t('superior')}}</a-radio>-->
|
<!-- <a-radio value="2">{{$t('superior')}}</a-radio>-->
|
||||||
<!-- </a-radio-group>-->
|
<!-- </a-radio-group>-->
|
||||||
<!-- </a-form-item>-->
|
<!-- </a-form-item>-->
|
||||||
<!-- v-if="departIdShow==true && !disabled"-->
|
<!-- v-if="departIdShow==true && !disabled"-->
|
||||||
<!-- <a-form-item :label="$t('ResponsibleDepartment')" :labelCol="labelCol" :wrapperCol="wrapperCol"-->
|
<!-- <a-form-item :label="$t('ResponsibleDepartment')" :labelCol="labelCol" :wrapperCol="wrapperCol"-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
<!-- <a-select-->
|
<!-- <a-select-->
|
||||||
<!-- :disabled="disabled"-->
|
<!-- :disabled="disabled"-->
|
||||||
<!-- mode="multiple"-->
|
<!-- mode="multiple"-->
|
||||||
<!-- style="width: 100%"-->
|
<!-- style="width: 100%"-->
|
||||||
<!-- :placeholder="$t('selectResponsibleDepartment')"-->
|
<!-- :placeholder="$t('selectResponsibleDepartment')"-->
|
||||||
<!-- v-model="departIds"-->
|
<!-- v-model="departIds"-->
|
||||||
<!-- optionFilterProp="children"-->
|
<!-- optionFilterProp="children"-->
|
||||||
<!-- :getPopupContainer="(target) => target.parentNode"-->
|
<!-- :getPopupContainer="(target) => target.parentNode"-->
|
||||||
<!-- :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"-->
|
<!-- :dropdownStyle="{maxHeight:'200px',overflow:'auto'}"-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
<!-- <a-select-option v-for="item in resultDepartOptions" :key="item.key" :value="item.key"-->
|
<!-- <a-select-option v-for="item in resultDepartOptions" :key="item.key" :value="item.key"-->
|
||||||
<!-- >{{item.title}}-->
|
<!-- >{{item.title}}-->
|
||||||
<!-- </a-select-option-->
|
<!-- </a-select-option-->
|
||||||
<!-- >-->
|
<!-- >-->
|
||||||
<!-- </a-select>-->
|
<!-- </a-select>-->
|
||||||
<!-- </a-form-item>-->
|
<!-- </a-form-item>-->
|
||||||
<!-- update--end--autor:wangshuai-----date:20200108------for:新增身份和负责部门------ -->
|
<!-- update--end--autor:wangshuai-----date:20200108------for:新增身份和负责部门------ -->
|
||||||
<!-- <a-form-item label="头像" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
<!-- <a-form-item label="头像" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
<!-- <j-image-upload class="avatar-uploader" text="上传" v-model="fileList" ></j-image-upload>-->
|
<!-- <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)}]"-->
|
<!--v-decorator="['birthday', {initialValue:!model.birthday?null:moment(model.birthday,dateFormat)}]"-->
|
||||||
<!--:getCalendarContainer="node => node.parentNode"/>-->
|
<!--:getCalendarContainer="node => node.parentNode"/>-->
|
||||||
<!--</a-form-item>-->
|
<!--</a-form-item>-->
|
||||||
<!-- v-if="!disabled"-->
|
<!-- v-if="!disabled"-->
|
||||||
<!-- <a-form-item :label="$t('Gender')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
<!-- <a-form-item :label="$t('Gender')" :labelCol="labelCol" :wrapperCol="wrapperCol">-->
|
||||||
<!-- <a-select v-decorator="[ 'sex', {}]" :placeholder="$t('selectGender')"-->
|
<!-- <a-select v-decorator="[ 'sex', {}]" :placeholder="$t('selectGender')"-->
|
||||||
<!-- :getPopupContainer="(target) => target.parentNode">-->
|
<!-- :getPopupContainer="(target) => target.parentNode">-->
|
||||||
<!-- <a-select-option :value="1">{{$t('male')}}</a-select-option>-->
|
<!-- <a-select-option :value="1">{{$t('male')}}</a-select-option>-->
|
||||||
<!-- <a-select-option :value="2">{{$t('female')}}</a-select-option>-->
|
<!-- <a-select-option :value="2">{{$t('female')}}</a-select-option>-->
|
||||||
<!-- </a-select>-->
|
<!-- </a-select>-->
|
||||||
<!-- </a-form-item>-->
|
<!-- </a-form-item>-->
|
||||||
<!-- v-if="!disabled"-->
|
<!-- v-if="!disabled"-->
|
||||||
<a-form-item :label="$t('mailbox')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<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>
|
</a-form-item>
|
||||||
<!-- v-if="!disabled"-->
|
<!-- v-if="!disabled"-->
|
||||||
<!-- :disabled="isDisabledAuth('user:form:phone')"-->
|
<!-- :disabled="isDisabledAuth('user:form:phone')"-->
|
||||||
<a-form-item :label="$t('phoneNumber')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
<a-form-item :label="$t('phoneNumber')" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||||
<a-input :placeholder="$t('enterMobileNumber')" :disabled='isdisabled'
|
<a-input :placeholder="$t('enterMobileNumber')" :disabled='isdisabled'
|
||||||
v-decorator="[ 'telephone', validatorRules.telephone]"/>
|
v-decorator="[ 'telephone', validatorRules.telephone]"/>
|
||||||
@@ -173,11 +177,11 @@
|
|||||||
<depart-window ref="departWindow" @ok="modalFormOk"></depart-window>
|
<depart-window ref="departWindow" @ok="modalFormOk"></depart-window>
|
||||||
|
|
||||||
<div class="drawer-bootom-button" v-show="!disableSubmit">
|
<div class="drawer-bootom-button" v-show="!disableSubmit">
|
||||||
<!-- <a-popconfirm :title="$t('AreYouWantDiscardEditing')" @confirm="handleCancel" :okText="$t('determine')"-->
|
<!-- <a-popconfirm :title="$t('AreYouWantDiscardEditing')" @confirm="handleCancel" :okText="$t('determine')"-->
|
||||||
<!-- :cancelText="$t('cancel')">-->
|
<!-- :cancelText="$t('cancel')">-->
|
||||||
<a-button style="margin-right: .8rem" @click="handleSubmit">{{$t('cancel')}}</a-button>
|
<a-button style="margin-right: .8rem" @click="handleSubmit">{{$t('cancel')}}</a-button>
|
||||||
<!-- </a-popconfirm>-->
|
<!-- </a-popconfirm>-->
|
||||||
<!-- <a-button @click="handleSubmit" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>-->
|
<a-button @click="handleSubmitOk" type="primary" :loading="confirmLoading">{{$t('submit')}}</a-button>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
@@ -189,7 +193,7 @@
|
|||||||
// 引入搜索部门弹出框的组件
|
// 引入搜索部门弹出框的组件
|
||||||
import departWindow from './DepartWindow'
|
import departWindow from './DepartWindow'
|
||||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
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 { addUser, editUser, queryUserRole, queryall } from '@/api/api'
|
||||||
import { disabledAuthFilter } from '@/utils/authFilter'
|
import { disabledAuthFilter } from '@/utils/authFilter'
|
||||||
import { duplicateCheck } from '@/api/api'
|
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() {
|
refresh() {
|
||||||
this.selectedDepartKeys = []
|
this.selectedDepartKeys = []
|
||||||
this.checkedDepartKeys = []
|
this.checkedDepartKeys = []
|
||||||
@@ -383,7 +406,7 @@
|
|||||||
that.visible = true
|
that.visible = true
|
||||||
that.model = Object.assign({}, record)
|
that.model = Object.assign({}, record)
|
||||||
that.$nextTick(() => {
|
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') {
|
if (this.model.userIdentity == '2') {
|
||||||
@@ -728,7 +751,7 @@
|
|||||||
.drawer-bootom-button {
|
.drawer-bootom-button {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: -8px;
|
bottom: -8px;
|
||||||
z-index:100;
|
z-index: 100;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
border-top: 1px solid #e8e8e8;
|
border-top: 1px solid #e8e8e8;
|
||||||
padding: 10px 16px;
|
padding: 10px 16px;
|
||||||
@@ -740,6 +763,6 @@
|
|||||||
</style>
|
</style>
|
||||||
<style>
|
<style>
|
||||||
.selectUserRole .ant-select-selection--multiple {
|
.selectUserRole .ant-select-selection--multiple {
|
||||||
height: 100px!important;
|
height: 100px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
@@ -18,7 +18,7 @@
|
|||||||
<span>{{$t('standardInformation')}}</span>
|
<span>{{$t('standardInformation')}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standardInformation')"
|
<a-input class="box-input" :placeholder="$t('PleaseEnter')+$t('standardInformation')"
|
||||||
v-model="queryParam.serialNumber"></a-input>
|
v-model="queryParam.standardInfo"></a-input>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
|
||||||
@@ -104,7 +104,7 @@
|
|||||||
{
|
{
|
||||||
title: this.$t('standardInformation'),
|
title: this.$t('standardInformation'),
|
||||||
align: 'center',
|
align: 'center',
|
||||||
dataIndex: 'serialNumber',
|
dataIndex: 'standardInfo',
|
||||||
ellipsis: true,
|
ellipsis: true,
|
||||||
scopedSlots: { customRender: 'standardInformation' },
|
scopedSlots: { customRender: 'standardInformation' },
|
||||||
width: 170
|
width: 170
|
||||||
|
|||||||
Reference in New Issue
Block a user