Parcourir la source

[task-2026]风险管理功能重构 / 添加系统消息去提醒组长

Li Yuan il y a 1 an
Parent
commit
6513be833e

+ 3 - 0
ibps-comp-root/modules/comp-message-server/src/main/java/com/lc/ibps/cloud/message/handler/message/InnerMessageQueueHandler.java

@@ -81,6 +81,9 @@ public class InnerMessageQueueHandler<M extends Message<?>> implements IMessageQ
 			if (BeanUtils.isNotEmpty(message.getVariables().get("taskId"))){
 				vo.setTaskId(message.getVariables().get("taskId").toString());
 			}
+			if (BeanUtils.isNotEmpty(message.getVariables().get("skipTypeMsg"))){
+				vo.setSkipTypeMsg(message.getVariables().get("skipTypeMsg").toString());
+			}
 			
 			if(TenantUtil.isTenantEnabled()) {
 				try {

+ 40 - 0
ibps-provider-root/modules/provider-platform/src/main/java/com/lc/ibps/platform/plan/job/RiskIdentification2Job.java

@@ -0,0 +1,40 @@
+package com.lc.ibps.platform.plan.job;
+
+import com.lc.ibps.cloud.message.util.MessageQueueProductorUtil;
+import org.quartz.JobExecutionContext;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+public class RiskIdentification2Job extends AbstractJob{
+    @Override
+    public void executeJob(JobExecutionContext context) throws Exception {
+        String code = "t_fxpgjlb2";
+        List<Map<String, Object>> list = fetchRecords(code);
+        if(list == null) return ;
+        String fetchSql = "select guan_lian_biao_ from t_ptdsrwpzb where ren_wu_bian_ma_ = '%s' limit 1";
+        Map<String, Object> sqlMap = commonDao.queryOne(String.format(fetchSql,code));
+        String tableName = sqlMap.get("guan_lian_biao_").toString();
+        try {
+            generateRecords(list,tableName);
+        } catch (Exception e) {
+            //ignore it.
+        }
+        for (Map<String, Object> map : list) {
+            // 提醒
+            List<String> receiver = new ArrayList<>();
+            String zuChangId = map.get("zu_chang_id_").toString();
+            String jiHuaBianHao = map.get("ji_hua_bian_hao_").toString();
+            receiver.add(zuChangId);
+            String title = "风险评估与措施表单待提交";
+            String content = "您有一份评估与措施表单待提交,请前往-风险控制-风险评估与措施页面提交,计划编号:"+jiHuaBianHao+"。";
+            Map<String, Object> map2 = new HashMap<>();
+            map2.put("skipTypeMsg","{\"skipType\": 3,\"pathInfo\": \"/tygl/fxkzV2/fxpgycslb\"}");
+            MessageQueueProductorUtil.send("RiskIdentification2Job", "system" , "inner" , receiver,null , title, content, null, null, map2);
+
+        }
+
+    }
+}