11f519d6 张雷

药剂分析组件接口开发

1 个父辈 44d441e0
...@@ -363,4 +363,21 @@ public class ReportItemvService { ...@@ -363,4 +363,21 @@ public class ReportItemvService {
363 sql += " ) bbb "; 363 sql += " ) bbb ";
364 return sql ; 364 return sql ;
365 } 365 }
366
367 public List<FRportlCommandCenterVO> statisticsByYh(String departIds, String startDate, String endDate) {
368 String startDateTb = DateUtils.getTbDate(startDate);
369 String endDateTb = DateUtils.getTbDate(endDate);
370 String startDateHb = DateUtils.getHbDate(startDate);
371 String endDateHb = DateUtils.getHbDate(endDate);
372 //药剂SQL
373 String dataViewName3a24 = ReportViewUtil.buildView(ReportConstant.view3a24, ReportConstant.fieldYj, departIds, startDate, endDate);
374 String dataViewName3a24Tb = ReportViewUtil.buildView(ReportConstant.view3a24, ReportConstant.fieldYj, departIds, startDateTb, endDateTb);
375 String dataViewName3a24Hb = ReportViewUtil.buildView(ReportConstant.view3a24, ReportConstant.fieldYj, departIds, startDateHb, endDateHb);
376 //处理水量
377 String dataViewName2119 = ReportViewUtil.buildView(ReportConstant.view2119, ReportConstant.fieldClsl, departIds, startDate, endDate);
378 String dataViewName2119Tb = ReportViewUtil.buildView(ReportConstant.view2119, ReportConstant.fieldClsl, departIds, startDateTb, endDateTb);
379 String dataViewName2119Hb = ReportViewUtil.buildView(ReportConstant.view2119, ReportConstant.fieldClsl, departIds, startDateHb, endDateHb);
380
381 return null;
382 }
366 } 383 }
......
...@@ -89,13 +89,13 @@ spring: ...@@ -89,13 +89,13 @@ spring:
89 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000 89 connectionProperties: druid.stat.mergeSql\=true;druid.stat.slowSqlMillis\=5000
90 datasource: 90 datasource:
91 master: 91 master:
92 url: jdbc:mysql://47.104.179.187:6003/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false 92 url: jdbc:mysql://113.249.91.27:3306/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false
93 username: root 93 username: root
94 password: jkauto@123 94 password: jkauto@123
95 driver-class-name: com.mysql.jdbc.Driver 95 driver-class-name: com.mysql.jdbc.Driver
96 # 恩菲数据同步 96 # 恩菲数据同步
97 nf-db: 97 nf-db:
98 url: jdbc:mysql://47.104.179.187:6003/sk-zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false 98 url: jdbc:mysql://113.249.91.27:3306/zhongye?characterEncoding=UTF-8&useUnicode=true&useSSL=false
99 username: root 99 username: root
100 password: jkauto@123 100 password: jkauto@123
101 driver-class-name: com.mysql.jdbc.Driver 101 driver-class-name: com.mysql.jdbc.Driver
......
...@@ -151,4 +151,6 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData ...@@ -151,4 +151,6 @@ public interface IFCustomReportDatasetService extends IService<FCustomReportData
151 151
152 List<Map<String, Object>> queryHjtjReport(String dataViewName9bff,String dataViewName3a24,String dataViewName2119, 152 List<Map<String, Object>> queryHjtjReport(String dataViewName9bff,String dataViewName3a24,String dataViewName2119,
153 String startTime, String endTime, String departId); 153 String startTime, String endTime, String departId);
154
155 List<ResultNumberVO> statisticsByXjl(String departIds, String startDate, String endDate);
154 } 156 }
......
...@@ -500,6 +500,25 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa ...@@ -500,6 +500,25 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
500 return list; 500 return list;
501 } 501 }
502 502
503 @Override
504 public List<ResultNumberVO> statisticsByXjl(String departIds, String startDate, String endDate) {
505 List<ResultNumberVO> reduceStatisticsList = new ArrayList<>(4);
506 String startDateTb = DateUtils.getTbDate(startDate);
507 String endDateTb = DateUtils.getTbDate(endDate);
508 String startDateHb = DateUtils.getHbDate(startDate);
509 String endDateHb = DateUtils.getHbDate(endDate);
510 //头部统计数据
511 JnhbReportData nowMonthData = getJnhbReportSumDataByResultNumber(departIds, startDate, endDate);
512 JnhbReportData lastMonthData = getJnhbReportSumDataByResultNumber(departIds, startDateHb, endDateHb);
513 JnhbReportData lastYearMonthData = getJnhbReportSumDataByResultNumber(departIds, startDateTb, endDateTb);
514 //ResultNumberVO(tring name, String unit, String value, String valueTb, String valueHb)
515 reduceStatisticsList.add( new ResultNumberVO( "COD", "吨",nowMonthData.getCodxjl(),lastMonthData.getCodxjl(),lastYearMonthData.getCodxjl() ) );//COD消减量(吨) codxjl
516 reduceStatisticsList.add( new ResultNumberVO( "NH₃-N","吨",nowMonthData.getAdxjl(),lastMonthData.getAdxjl(),lastYearMonthData.getAdxjl() ));//NH3-N消减量(吨)adxjl
517 reduceStatisticsList.add( new ResultNumberVO( "TP","吨",nowMonthData.getTpxjl(),lastMonthData.getTpxjl(),lastYearMonthData.getTpxjl() ));//TP消减量(吨)tpxjl
518 reduceStatisticsList.add( new ResultNumberVO( "TN","吨",nowMonthData.getTnxjl(),lastMonthData.getTnxjl(),lastYearMonthData.getTnxjl() ));//TN消减量(吨)tnxjl
519 return reduceStatisticsList;
520 }
521
503 /**转换为Map<部门编号,JnhbReportData> */ 522 /**转换为Map<部门编号,JnhbReportData> */
504 private Map<String,JnhbReportData> convertJnhbReportDataMap(List<JnhbReportData> dataList){// Map<部门编号,JnhbReportData> 523 private Map<String,JnhbReportData> convertJnhbReportDataMap(List<JnhbReportData> dataList){// Map<部门编号,JnhbReportData>
505 Map<String,JnhbReportData> dataMap = new HashMap<>(); 524 Map<String,JnhbReportData> dataMap = new HashMap<>();
......
...@@ -12,6 +12,7 @@ import com.skua.modules.custom.service.IFCustomReportDatasetService; ...@@ -12,6 +12,7 @@ import com.skua.modules.custom.service.IFCustomReportDatasetService;
12 import com.skua.modules.report.service.IReportDataService; 12 import com.skua.modules.report.service.IReportDataService;
13 import com.skua.modules.report.vo.JnhbLargeScreenVO; 13 import com.skua.modules.report.vo.JnhbLargeScreenVO;
14 import com.skua.modules.report.vo.JnhbReportData; 14 import com.skua.modules.report.vo.JnhbReportData;
15 import com.skua.modules.report.vo.ReportItemvParam;
15 import com.skua.modules.report.vo.largeScreen.ResultNumberVO; 16 import com.skua.modules.report.vo.largeScreen.ResultNumberVO;
16 import io.swagger.annotations.Api; 17 import io.swagger.annotations.Api;
17 import io.swagger.annotations.ApiOperation; 18 import io.swagger.annotations.ApiOperation;
...@@ -237,4 +238,18 @@ public class ReportDataController { ...@@ -237,4 +238,18 @@ public class ReportDataController {
237 result.setResult(dataLIst); 238 result.setResult(dataLIst);
238 return result; 239 return result;
239 } 240 }
241
242 @AutoLog(value = "节能环保-大屏展示")
243 @ApiOperation(value = "节能环保-消减量", notes = "节能环保-消减量")
244 @GetMapping(value = "/statisticsByXjl")
245 public Result<List<ResultNumberVO>> statisticsByXjl(ReportItemvParam reportItemvParam) { //time
246 Result<List<ResultNumberVO>> result = new Result<>();
247 String departIds = BaseContextHandler.getDeparts();
248 if(reportItemvParam.getDepartIds()!=null){
249 departIds = reportItemvParam.getDepartIds();
250 }
251 List<ResultNumberVO> dataLIst = fCustomReportDatasetService.statisticsByXjl(departIds,reportItemvParam.getStartDate(),reportItemvParam.getEndDate());
252 result.setResult(dataLIst);
253 return result;
254 }
240 } 255 }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!