|
|
@@ -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);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+}
|