cad9fde2 张雷

禅道BUG修改

1 个父辈 378fb5a4
1 package com.skua.common.constant;
2
3 /**
4 * 报表缓存常量
5 */
6 public interface ReportConstant {
7
8 //水质水量报表
9 public static final String view2119 = "2119ecbf53a1d2d0708258ff67cfd9e1";
10
11
12 public static final String view3a24 = "3a243d5715b9e1a3753c180872ca0df9";
13
14
15 public static final String view4411 = "4411ed3d78634bcdcd700f6e33724025";
16
17 //化验日报
18 public static final String view9bff = "9bffaf9187093d6e6a4390e8c56acca8";
19
20 }
...@@ -235,7 +235,7 @@ public class DangerousOperationController { ...@@ -235,7 +235,7 @@ public class DangerousOperationController {
235 dangerousOperationService.updateById(dangerOperation); 235 dangerousOperationService.updateById(dangerOperation);
236 //流程进入下一节点,并行网关设置判定条件 236 //流程进入下一节点,并行网关设置判定条件
237 Map<String, Object> mapVariable = new HashMap<String,Object>(); 237 Map<String, Object> mapVariable = new HashMap<String,Object>();
238 mapVariable.put("dangerDeal", "taskUser_"+dangerousOperation.getOperationUser()); 238 mapVariable.put("dangerDeal", "taskUser_"+dangerousOperation.getAppointUser());
239 flowService.configureVariables(executionId, mapVariable); 239 flowService.configureVariables(executionId, mapVariable);
240 //动态设置流程接收人 240 //动态设置流程接收人
241 flowBusinessService.completeTask(ProcessConstant.PASS_KEY, dangerousOperation.getFlow()); 241 flowBusinessService.completeTask(ProcessConstant.PASS_KEY, dangerousOperation.getFlow());
......
...@@ -145,4 +145,8 @@ public class DangerousOperation extends FlowEntity { ...@@ -145,4 +145,8 @@ public class DangerousOperation extends FlowEntity {
145 @TableField(exist = false) 145 @TableField(exist = false)
146 @ApiModelProperty(value = "结束时间") 146 @ApiModelProperty(value = "结束时间")
147 private String endTime; 147 private String endTime;
148
149 @TableField(exist = false)
150 @ApiModelProperty(value = "指定人")
151 private String appointUser;
148 } 152 }
......
1 package com.skua.modules.job; 1 package com.skua.modules.job;
2 2
3 import com.skua.common.constant.ReportConstant;
3 import com.skua.core.context.SpringContextUtils; 4 import com.skua.core.context.SpringContextUtils;
4 import com.skua.core.util.DateUtils; 5 import com.skua.core.util.DateUtils;
5 import com.skua.modules.report.service.IReportDataService; 6 import com.skua.modules.report.service.IReportDataService;
...@@ -23,15 +24,23 @@ public class NFDataSyncJob implements Job { ...@@ -23,15 +24,23 @@ public class NFDataSyncJob implements Job {
23 24
24 @Autowired 25 @Autowired
25 private IReportDataService reportDataService; 26 private IReportDataService reportDataService;
26 //水质水量报表 27
27 private static final String SZSL = "2119ecbf53a1d2d0708258ff67cfd9e1"; 28 /**
28 //化验日报 29 * 若参数变量名修改 QuartzJobController中也需对应修改
29 private static final String HYRB = "9bffaf9187093d6e6a4390e8c56acca8"; 30 */
31 private String parameter;
32
33 public void setParameter(String parameter) {
34 this.parameter = parameter;
35 }
30 36
31 @Override 37 @Override
32 public void execute(JobExecutionContext jobExecutionContext) { 38 public void execute(JobExecutionContext jobExecutionContext) {
33 log.info("开始同步昨日恩菲的数据入报表");
34 String yesterday = DateUtils.getYesterday(); 39 String yesterday = DateUtils.getYesterday();
40 if(StringUtils.isNotEmpty(this.parameter)){
41 yesterday = this.parameter;
42 }
43 log.info("开始同步【"+yesterday+"】恩菲的数据入报表");
35 JdbcTemplate nfDb = (JdbcTemplate) SpringContextUtils.getBean("nf-db"); 44 JdbcTemplate nfDb = (JdbcTemplate) SpringContextUtils.getBean("nf-db");
36 String sql = "select * from day_report_data where update_time like '"+yesterday+"%'"; 45 String sql = "select * from day_report_data where update_time like '"+yesterday+"%'";
37 List<Map<String, Object>> dataList = nfDb.queryForList(sql); 46 List<Map<String, Object>> dataList = nfDb.queryForList(sql);
...@@ -47,23 +56,23 @@ public class NFDataSyncJob implements Job { ...@@ -47,23 +56,23 @@ public class NFDataSyncJob implements Job {
47 data.put("time",yesterday); 56 data.put("time",yesterday);
48 if("szsl".equals(itemType)){ 57 if("szsl".equals(itemType)){
49 data.put(itemCode, itemValue); 58 data.put(itemCode, itemValue);
50 data.put("reportId", SZSL); 59 data.put("reportId", ReportConstant.view2119);
51 reportDataService.insertOrUpdateReportData(departId, time, data, SZSL); 60 reportDataService.insertOrUpdateReportData(departId, time, data, ReportConstant.view2119);
52 }else if("hyrb".equals(itemType)){ 61 }else if("hyrb".equals(itemType)){
53 String indexs = "JSCOD,JSAD,JSPH,JSZD,JSZL,JSSS,CSCOD,CSAD,CSPH,CSTN,CSZL,CSSS"; 62 String indexs = "JSCOD,JSAD,JSPH,JSZD,JSZL,JSSS,CSCOD,CSAD,CSPH,CSTN,CSZL,CSSS";
54 if(itemCode.indexOf(indexs) > 0){ 63 if(indexs.indexOf(itemCode) > 0){
55 data.put(itemCode+"HY", itemValue); 64 data.put(itemCode+"HY", itemValue);
56 }else{ 65 }else{
57 data.put(itemCode, itemValue); 66 data.put(itemCode, itemValue);
58 } 67 }
59 data.put("reportId", HYRB); 68 data.put("reportId", ReportConstant.view9bff);
60 reportDataService.insertOrUpdateReportData(departId, time, data, HYRB); 69 reportDataService.insertOrUpdateReportData(departId, time, data, ReportConstant.view9bff);
61 }else { 70 }else {
62 log.info("恩菲【"+itemType+"】类型数据未进行数据同步"); 71 log.info("恩菲【"+itemType+"】类型数据未进行数据同步");
63 } 72 }
64 } 73 }
65 } 74 }
66 log.info("同步昨日恩菲的数据入报表完成"); 75 log.info("恩菲的数据入报表完成");
67 } 76 }
68 77
69 } 78 }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!