飞书消息-法规技术评估
This commit is contained in:
+5
@@ -87,6 +87,11 @@ public enum TemplateInfoEnum2 {
|
|||||||
*/
|
*/
|
||||||
REGULATION_OPINION_COLLECTION("法规意见收集","ctp_AArfYGLozU47","Regulation Opinion Collection"),
|
REGULATION_OPINION_COLLECTION("法规意见收集","ctp_AArfYGLozU47","Regulation Opinion Collection"),
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 法规技术评估
|
||||||
|
*/
|
||||||
|
REGULATION_TECHNICAL_ASSESSMENT("法规技术评估","ctp_AArfYGLozU47","Regulation Technical Assessment"),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
;
|
;
|
||||||
|
|||||||
+1
-1
@@ -146,7 +146,7 @@ public interface IFeishuService {
|
|||||||
void sendMessageLawsWarn(String templeteId,Map<String,Object> params);
|
void sendMessageLawsWarn(String templeteId,Map<String,Object> params);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 飞书消息模板--法规意见收集
|
* 飞书消息模板--法规意见收集和法规技术评估
|
||||||
* @param templeteId
|
* @param templeteId
|
||||||
* @param params
|
* @param params
|
||||||
*/
|
*/
|
||||||
|
|||||||
+2
-2
@@ -82,9 +82,9 @@ public class LawsTechnologyEvaluationRemindJob implements Job {
|
|||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
String endTime = sdf.format(lawsTechnologyEvaluationEO.getEndTime());
|
String endTime = sdf.format(lawsTechnologyEvaluationEO.getEndTime());
|
||||||
int days = 0;
|
long days = 0;
|
||||||
try {
|
try {
|
||||||
days = (int) (sdf.parse(endTime).getTime() - sdf.parse(now).getTime()) / (24 * 60 * 60 * 1000);
|
days = (sdf.parse(endTime).getTime() - sdf.parse(now).getTime()) / (24 * 60 * 60 * 1000L);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
throw new JeroBootException("日期转换错误");
|
throw new JeroBootException("日期转换错误");
|
||||||
|
|||||||
+156
-92
@@ -16,6 +16,7 @@ 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;
|
||||||
import com.jero.modules.enums.DictCodeEnum;
|
import com.jero.modules.enums.DictCodeEnum;
|
||||||
|
import com.jero.modules.feishu.enums.TemplateInfoEnum2;
|
||||||
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.lawsOpinionGather.enums.GatherResultEnum;
|
import com.jero.modules.lawsOpinionGather.enums.GatherResultEnum;
|
||||||
@@ -652,6 +653,7 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
//String msgContentEN = "";
|
//String msgContentEN = "";
|
||||||
//String msgTitle = "";
|
//String msgTitle = "";
|
||||||
String initiator = "";
|
String initiator = "";
|
||||||
|
String initiatorEn = "";
|
||||||
String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId");
|
String lawsTechnologyEvaluationId = jsonObject.getString("lawsTechnologyEvaluationId");
|
||||||
LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = queryById(lawsTechnologyEvaluationId);
|
LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO = queryById(lawsTechnologyEvaluationId);
|
||||||
|
|
||||||
@@ -678,15 +680,15 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
|
|
||||||
initiator = currentUser.getUsername();
|
initiator = currentUser.getUsername();
|
||||||
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
|
cnContentUpper = "您好,请及时查看处理此项任务,谢谢!";
|
||||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
// cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
// "\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 :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
// enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
// "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator +
|
// "\nInitiator: " + initiator +
|
||||||
"\nDue Date: " + endTime;
|
// "\nDue Date: " + endTime;
|
||||||
|
|
||||||
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId,jsonObject.getString("evaluators"));
|
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId,jsonObject.getString("evaluators"));
|
||||||
if (ObjectUtils.isNotEmpty(flowDetailEO)) {
|
if (ObjectUtils.isNotEmpty(flowDetailEO)) {
|
||||||
@@ -696,18 +698,24 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
SysUser sysUser = sysUserService.getById(jsonObject.getString("evaluators"));
|
SysUser sysUser = sysUserService.getById(jsonObject.getString("evaluators"));
|
||||||
if (ObjectUtils.isNotEmpty(sysUser)) {
|
if (ObjectUtils.isNotEmpty(sysUser)) {
|
||||||
thirdId[0] = sysUser.getThirdId();
|
thirdId[0] = sysUser.getThirdId();
|
||||||
|
userIdList.add(sysUser.getId());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
// FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
feishuMsgVo.setTitle(title);
|
// feishuMsgVo.setTitle(title);
|
||||||
feishuMsgVo.setCnContentUpper(cnContentUpper);
|
// feishuMsgVo.setCnContentUpper(cnContentUpper);
|
||||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
// feishuMsgVo.setCnContentLower(cnContentLower);
|
||||||
feishuMsgVo.setEnContentUpper(enContentUpper);
|
// feishuMsgVo.setEnContentUpper(enContentUpper);
|
||||||
feishuMsgVo.setEnContentLower(enContentLower);
|
// feishuMsgVo.setEnContentLower(enContentLower);
|
||||||
feishuMsgVo.setUrl(hrefFeishu);
|
// feishuMsgVo.setUrl(hrefFeishu);
|
||||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
// feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||||
feishuService.sendCard(thirdId, feishuMsgVo);
|
// feishuService.sendCard(thirdId, feishuMsgVo);
|
||||||
} catch (IOException e) {
|
|
||||||
|
//飞书消息(模板-20230410)
|
||||||
|
sendMsgFeiShu(msgType, userIdList, hrefFeishu, initiator,
|
||||||
|
initiatorEn, lawsTechnologyEvaluationEO, endTime,
|
||||||
|
bussDocumentLibraryEO, cnContentUpper, enContentUpper);
|
||||||
|
} catch (Exception e) {
|
||||||
log.error("飞书消息推送失败");
|
log.error("飞书消息推送失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -724,16 +732,16 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
//msgTitle = "You have a Regulatory and technical assessment task to complete";
|
//msgTitle = "You have a Regulatory and technical assessment task to complete";
|
||||||
|
|
||||||
initiator = currentUser.getUsername();
|
initiator = currentUser.getUsername();
|
||||||
cnContentUpper = "您好,"+ initiator +"已提交评估结果,请审核";
|
cnContentUpper = "您好,"+ initiator +"已提交评估结果,请审核。";
|
||||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||||
"\n发起人: " + initiator +
|
"\n发起人: " + initiator +
|
||||||
"\n截止时间: " + endTime;
|
"\n截止时间: " + endTime;
|
||||||
enContentUpper = "Hello! "+ initiator +" has submitted the assessment result. Please review it";
|
enContentUpper = "Hello! "+ initiator +" has submitted the assessment result. Please review it.";
|
||||||
enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
// enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
// "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator +
|
// "\nInitiator: " + initiator +
|
||||||
"\nDue Date: " + endTime;
|
// "\nDue Date: " + endTime;
|
||||||
|
|
||||||
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId,jsonObject.getString("evaluators"));
|
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId,jsonObject.getString("evaluators"));
|
||||||
if (ObjectUtils.isNotEmpty(flowDetailEO)) {
|
if (ObjectUtils.isNotEmpty(flowDetailEO)) {
|
||||||
@@ -743,18 +751,23 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
SysUser sysUser = sysUserService.getById(jsonObject.getString("evaluators"));
|
SysUser sysUser = sysUserService.getById(jsonObject.getString("evaluators"));
|
||||||
if (ObjectUtils.isNotEmpty(sysUser)) {
|
if (ObjectUtils.isNotEmpty(sysUser)) {
|
||||||
thirdId[0] = sysUser.getThirdId();
|
thirdId[0] = sysUser.getThirdId();
|
||||||
|
userIdList.add(sysUser.getId());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
// FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
feishuMsgVo.setTitle(title);
|
// feishuMsgVo.setTitle(title);
|
||||||
feishuMsgVo.setCnContentUpper(cnContentUpper);
|
// feishuMsgVo.setCnContentUpper(cnContentUpper);
|
||||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
// feishuMsgVo.setCnContentLower(cnContentLower);
|
||||||
feishuMsgVo.setEnContentUpper(enContentUpper);
|
// feishuMsgVo.setEnContentUpper(enContentUpper);
|
||||||
feishuMsgVo.setEnContentLower(enContentLower);
|
// feishuMsgVo.setEnContentLower(enContentLower);
|
||||||
feishuMsgVo.setUrl(hrefFeishu);
|
// feishuMsgVo.setUrl(hrefFeishu);
|
||||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
// feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||||
feishuService.sendCard(thirdId, feishuMsgVo);
|
// feishuService.sendCard(thirdId, feishuMsgVo);
|
||||||
} catch (IOException e) {
|
//飞书消息(模板-20230410)
|
||||||
|
sendMsgFeiShu(msgType, userIdList, hrefFeishu, initiator,
|
||||||
|
initiatorEn, lawsTechnologyEvaluationEO, endTime,
|
||||||
|
bussDocumentLibraryEO, cnContentUpper, enContentUpper);
|
||||||
|
} catch (Exception e) {
|
||||||
log.error("飞书消息推送失败");
|
log.error("飞书消息推送失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -770,16 +783,16 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
||||||
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
||||||
initiator = currentUser.getUsername();
|
initiator = currentUser.getUsername();
|
||||||
cnContentUpper = "您好,您提交的评估结果已通过";
|
cnContentUpper = "您好,您提交的评估结果已通过。";
|
||||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
"\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 :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
// enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
// "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator +
|
// "\nInitiator: " + initiator +
|
||||||
"\nDue Date: " + endTime;
|
// "\nDue Date: " + endTime;
|
||||||
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId,jsonObject.getString("evaluationId"));
|
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId,jsonObject.getString("evaluationId"));
|
||||||
if (ObjectUtils.isNotEmpty(flowDetailEO)) {
|
if (ObjectUtils.isNotEmpty(flowDetailEO)) {
|
||||||
hrefFeishu = backUrl + "/evaluationProcess?taskDefinitionKey=fqrsc&taskIds="+ taskId +"&prcType=6&prcNum="+ flowDetailEO.getPrcNum() +"&prcId="+ flowDetailEO.getActiProcInstId() +"&router=%2FregulatoryAssessmentTasks&isDisabled=true";
|
hrefFeishu = backUrl + "/evaluationProcess?taskDefinitionKey=fqrsc&taskIds="+ taskId +"&prcType=6&prcNum="+ flowDetailEO.getPrcNum() +"&prcId="+ flowDetailEO.getActiProcInstId() +"&router=%2FregulatoryAssessmentTasks&isDisabled=true";
|
||||||
@@ -788,18 +801,23 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
SysUser sysUser = sysUserService.getById(jsonObject.getString("evaluationId"));
|
SysUser sysUser = sysUserService.getById(jsonObject.getString("evaluationId"));
|
||||||
if (ObjectUtils.isNotEmpty(sysUser)) {
|
if (ObjectUtils.isNotEmpty(sysUser)) {
|
||||||
thirdId[0] = sysUser.getThirdId();
|
thirdId[0] = sysUser.getThirdId();
|
||||||
|
userIdList.add(sysUser.getId());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
// FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
feishuMsgVo.setTitle(title);
|
// feishuMsgVo.setTitle(title);
|
||||||
feishuMsgVo.setCnContentUpper(cnContentUpper);
|
// feishuMsgVo.setCnContentUpper(cnContentUpper);
|
||||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
// feishuMsgVo.setCnContentLower(cnContentLower);
|
||||||
feishuMsgVo.setEnContentUpper(enContentUpper);
|
// feishuMsgVo.setEnContentUpper(enContentUpper);
|
||||||
feishuMsgVo.setEnContentLower(enContentLower);
|
// feishuMsgVo.setEnContentLower(enContentLower);
|
||||||
feishuMsgVo.setUrl(hrefFeishu);
|
// feishuMsgVo.setUrl(hrefFeishu);
|
||||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
// feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||||
feishuService.sendCard(thirdId, feishuMsgVo);
|
// feishuService.sendCard(thirdId, feishuMsgVo);
|
||||||
} catch (IOException e) {
|
//飞书消息(模板-20230410)
|
||||||
|
sendMsgFeiShu(msgType, userIdList, hrefFeishu, initiator,
|
||||||
|
initiatorEn, lawsTechnologyEvaluationEO, endTime,
|
||||||
|
bussDocumentLibraryEO, cnContentUpper, enContentUpper);
|
||||||
|
} catch (Exception e) {
|
||||||
log.error("飞书消息推送失败");
|
log.error("飞书消息推送失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -813,16 +831,16 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
String currentUserId = jsonObject.getString("currentUserId"); //当前操作用户id
|
||||||
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
SysUser currentUser = this.sysUserService.getBaseMapper().selectOne(new QueryWrapper<SysUser>().lambda().eq(SysUser::getId, currentUserId));
|
||||||
initiator = currentUser.getUsername();
|
initiator = currentUser.getUsername();
|
||||||
cnContentUpper = "您好,您提交的评估结果被退回,请及时查看处理";
|
cnContentUpper = "您好,您提交的评估结果被退回,请及时查看处理。";
|
||||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
"\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 :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
// enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
// "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + initiator +
|
// "\nInitiator: " + initiator +
|
||||||
"\nDue Date: " + endTime;
|
// "\nDue Date: " + endTime;
|
||||||
|
|
||||||
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId,jsonObject.getString("evaluators"));
|
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId,jsonObject.getString("evaluators"));
|
||||||
if (ObjectUtils.isNotEmpty(flowDetailEO)) {
|
if (ObjectUtils.isNotEmpty(flowDetailEO)) {
|
||||||
@@ -831,31 +849,38 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
SysUser sysUser = sysUserService.getById(jsonObject.getString("evaluators"));
|
SysUser sysUser = sysUserService.getById(jsonObject.getString("evaluators"));
|
||||||
if (ObjectUtils.isNotEmpty(sysUser)) {
|
if (ObjectUtils.isNotEmpty(sysUser)) {
|
||||||
thirdId[0] = sysUser.getThirdId();
|
thirdId[0] = sysUser.getThirdId();
|
||||||
|
userIdList.add(sysUser.getId());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
// FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
feishuMsgVo.setTitle(title);
|
// feishuMsgVo.setTitle(title);
|
||||||
feishuMsgVo.setCnContentUpper(cnContentUpper);
|
// feishuMsgVo.setCnContentUpper(cnContentUpper);
|
||||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
// feishuMsgVo.setCnContentLower(cnContentLower);
|
||||||
feishuMsgVo.setEnContentUpper(enContentUpper);
|
// feishuMsgVo.setEnContentUpper(enContentUpper);
|
||||||
feishuMsgVo.setEnContentLower(enContentLower);
|
// feishuMsgVo.setEnContentLower(enContentLower);
|
||||||
feishuMsgVo.setUrl(hrefFeishu);
|
// feishuMsgVo.setUrl(hrefFeishu);
|
||||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
// feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||||
feishuService.sendCard(thirdId, feishuMsgVo);
|
// feishuService.sendCard(thirdId, feishuMsgVo);
|
||||||
} catch (IOException e) {
|
//飞书消息(模板-20230410)
|
||||||
|
sendMsgFeiShu(msgType, userIdList, hrefFeishu, initiator,
|
||||||
|
initiatorEn, lawsTechnologyEvaluationEO, endTime,
|
||||||
|
bussDocumentLibraryEO, cnContentUpper, enContentUpper);
|
||||||
|
} catch (Exception e) {
|
||||||
log.error("飞书消息推送失败");
|
log.error("飞书消息推送失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} 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 = "系统通知";
|
||||||
|
initiatorEn = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
|
cnContentUpper = "您好,该任务将于3天后到期,请及时查看处理,谢谢!";
|
||||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||||
"\n发起人: 系统通知";
|
"\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 :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
// enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
// "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
// "\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
|
|
||||||
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId,jsonObject.getString("userId"));
|
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId,jsonObject.getString("userId"));
|
||||||
if (ObjectUtils.isNotEmpty(flowDetailEO)) {
|
if (ObjectUtils.isNotEmpty(flowDetailEO)) {
|
||||||
@@ -864,31 +889,38 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
SysUser sysUser = sysUserService.getById(jsonObject.getString("userId"));
|
SysUser sysUser = sysUserService.getById(jsonObject.getString("userId"));
|
||||||
if (ObjectUtils.isNotEmpty(sysUser)) {
|
if (ObjectUtils.isNotEmpty(sysUser)) {
|
||||||
thirdId[0] = sysUser.getThirdId();
|
thirdId[0] = sysUser.getThirdId();
|
||||||
|
userIdList.add(sysUser.getId());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
// FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
feishuMsgVo.setTitle(title);
|
// feishuMsgVo.setTitle(title);
|
||||||
feishuMsgVo.setCnContentUpper(cnContentUpper);
|
// feishuMsgVo.setCnContentUpper(cnContentUpper);
|
||||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
// feishuMsgVo.setCnContentLower(cnContentLower);
|
||||||
feishuMsgVo.setEnContentUpper(enContentUpper);
|
// feishuMsgVo.setEnContentUpper(enContentUpper);
|
||||||
feishuMsgVo.setEnContentLower(enContentLower);
|
// feishuMsgVo.setEnContentLower(enContentLower);
|
||||||
feishuMsgVo.setUrl(hrefFeishu);
|
// feishuMsgVo.setUrl(hrefFeishu);
|
||||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
// feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||||
feishuService.sendCard(thirdId, feishuMsgVo);
|
// feishuService.sendCard(thirdId, feishuMsgVo);
|
||||||
} catch (IOException e) {
|
//飞书消息(模板-20230410)
|
||||||
|
sendMsgFeiShu(msgType, userIdList, hrefFeishu, initiator,
|
||||||
|
initiatorEn, lawsTechnologyEvaluationEO, endTime,
|
||||||
|
bussDocumentLibraryEO, cnContentUpper, enContentUpper);
|
||||||
|
} catch (Exception e) {
|
||||||
log.error("飞书消息推送失败");
|
log.error("飞书消息推送失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
} 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 = "系统通知";
|
||||||
|
initiatorEn = MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
|
cnContentUpper = "您好,该任务将于今天到期,请尽快查看处理,谢谢!";
|
||||||
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
cnContentLower = "编号:" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
"\n标题: " + lawsTechnologyEvaluationEO.getTitle() +
|
||||||
"\n发起人: 系统通知";
|
"\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 :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
// enContentLower = "Regulation No :" + lawsTechnologyEvaluationEO.getSerialNumber() +
|
||||||
"\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
// "\nTitle: " + bussDocumentLibraryEO.getTitleEn() +
|
||||||
"\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
// "\nInitiator: " + MessageTypeEnum.SYSTEMATIC_NOTIFICATION.getName();
|
||||||
|
|
||||||
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId,jsonObject.getString("userId"));
|
LawsTechnologyEvaluationFlowDetailEO flowDetailEO = flowDetailEOMapper.queryByEvaluationId(lawsTechnologyEvaluationId,jsonObject.getString("userId"));
|
||||||
if (ObjectUtils.isNotEmpty(flowDetailEO)) {
|
if (ObjectUtils.isNotEmpty(flowDetailEO)) {
|
||||||
@@ -897,18 +929,23 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
SysUser sysUser = sysUserService.getById(jsonObject.getString("userId"));
|
SysUser sysUser = sysUserService.getById(jsonObject.getString("userId"));
|
||||||
if (ObjectUtils.isNotEmpty(sysUser)) {
|
if (ObjectUtils.isNotEmpty(sysUser)) {
|
||||||
thirdId[0] = sysUser.getThirdId();
|
thirdId[0] = sysUser.getThirdId();
|
||||||
|
userIdList.add(sysUser.getId());
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
// FeishuMsg2Vo feishuMsgVo = new FeishuMsg2Vo();
|
||||||
feishuMsgVo.setTitle(title);
|
// feishuMsgVo.setTitle(title);
|
||||||
feishuMsgVo.setCnContentUpper(cnContentUpper);
|
// feishuMsgVo.setCnContentUpper(cnContentUpper);
|
||||||
feishuMsgVo.setCnContentLower(cnContentLower);
|
// feishuMsgVo.setCnContentLower(cnContentLower);
|
||||||
feishuMsgVo.setEnContentUpper(enContentUpper);
|
// feishuMsgVo.setEnContentUpper(enContentUpper);
|
||||||
feishuMsgVo.setEnContentLower(enContentLower);
|
// feishuMsgVo.setEnContentLower(enContentLower);
|
||||||
feishuMsgVo.setUrl(hrefFeishu);
|
// feishuMsgVo.setUrl(hrefFeishu);
|
||||||
feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
// feishuMsgVo.setColor(MsgColorEnum.GREEN.getValue()); // 颜色
|
||||||
feishuService.sendCard(thirdId, feishuMsgVo);
|
// feishuService.sendCard(thirdId, feishuMsgVo);
|
||||||
} catch (IOException e) {
|
//飞书消息(模板-20230410)
|
||||||
|
sendMsgFeiShu(msgType, userIdList, hrefFeishu, initiator,
|
||||||
|
initiatorEn, lawsTechnologyEvaluationEO, endTime,
|
||||||
|
bussDocumentLibraryEO, cnContentUpper, enContentUpper);
|
||||||
|
} catch (Exception e) {
|
||||||
log.error("飞书消息推送失败");
|
log.error("飞书消息推送失败");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -933,6 +970,33 @@ public class LawsTechnologyEvaluationEOServiceImpl extends ServiceImpl<LawsTechn
|
|||||||
//SendMessageUtils.sendMessage(msgTitle,msgContentEN,userIdList,lawsTechnologyEvaluationId,sendMessageMap,null, MessageTypeEnum.REGULATORY_AND_TECHNICAL_ASSESSMENT,initiator);
|
//SendMessageUtils.sendMessage(msgTitle,msgContentEN,userIdList,lawsTechnologyEvaluationId,sendMessageMap,null, MessageTypeEnum.REGULATORY_AND_TECHNICAL_ASSESSMENT,initiator);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void sendMsgFeiShu(String msgType, List<String> userIdList, String hrefFeishu, String initiator, String initiatorEn, LawsTechnologyEvaluationEO lawsTechnologyEvaluationEO, String endTime, BussDocumentLibraryEO bussDocumentLibraryEO, String cnContentUpper, String enContentUpper) {
|
||||||
|
//飞书消息(模板-20230410)
|
||||||
|
Map<String,Object> params = new HashMap<>();
|
||||||
|
params.put("contentInfoFeiCn",cnContentUpper);
|
||||||
|
params.put("contentInfoFeiEn",enContentUpper);
|
||||||
|
params.put("userIdList",userIdList);
|
||||||
|
params.put("back_url",hrefFeishu);
|
||||||
|
params.put("titleCn"," "+lawsTechnologyEvaluationEO.getTitle());
|
||||||
|
if(ObjectUtils.isNotEmpty(bussDocumentLibraryEO)){
|
||||||
|
params.put("titleEn"," "+bussDocumentLibraryEO.getTitleEn());
|
||||||
|
}else{
|
||||||
|
params.put("titleEn","");
|
||||||
|
}
|
||||||
|
params.put("regulationNo"," "+lawsTechnologyEvaluationEO.getSerialNumber());
|
||||||
|
params.put("initiator"," "+initiator);
|
||||||
|
params.put("carTitleCn", TemplateInfoEnum2.REGULATION_TECHNICAL_ASSESSMENT.getNameCn());
|
||||||
|
params.put("carTitleEn",TemplateInfoEnum2.REGULATION_TECHNICAL_ASSESSMENT.getNameEn());
|
||||||
|
if(StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_TODAY_MSG.getValue())
|
||||||
|
|| StringUtils.equals(msgType, MsgTypeEnum.LAWS_TECHNOLOGY_EVALUATION_EXPIRE_REMIND_THREE_DAYS_BEFORE_MSG.getValue())){
|
||||||
|
params.put("initiatorEn"," "+initiatorEn);
|
||||||
|
}else{
|
||||||
|
params.put("initiatorEn"," "+initiator);
|
||||||
|
}
|
||||||
|
params.put("dueDate"," "+endTime);
|
||||||
|
feishuService.sendMessageRegulationOpinionCollection(TemplateInfoEnum2.REGULATION_TECHNICAL_ASSESSMENT.getValue(),params);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Result<?> batchCompleteTask(JSONObject jsonObject) {
|
public Result<?> batchCompleteTask(JSONObject jsonObject) {
|
||||||
String ids = jsonObject.getString("ids");
|
String ids = jsonObject.getString("ids");
|
||||||
|
|||||||
Reference in New Issue
Block a user