a46cc2b6 康伟

kangwei: 1 药剂采购分析: /web/erp/purchaseAnalysis/analysis

         3 指挥中心-设备维修维护费用统计   /v1/algorithm/commandCentre/statisticsBySbwx
         4 药耗分析: /v1/algorithm/commandCentre/statisticsByYhfx
         5 指挥中心-能耗分析(新) /v1/algorithm/commandCentre/statisticsByElectricity
         6 消减量:/v1/algorithm/commandCentre/xjlByTbHb
1 个父辈 789b1431
...@@ -138,6 +138,7 @@ public class JSUtils { ...@@ -138,6 +138,7 @@ public class JSUtils {
138 Double aDouble = executeExpression( expression ); 138 Double aDouble = executeExpression( expression );
139 DecimalFormat df = new DecimalFormat(decimalFormat); 139 DecimalFormat df = new DecimalFormat(decimalFormat);
140 result = df.format(aDouble); 140 result = df.format(aDouble);
141 result = convertStringToInt(result);//去掉.00后缀
141 }catch(Exception e ){ 142 }catch(Exception e ){
142 // e.printStackTrace(); 143 // e.printStackTrace();
143 } 144 }
......
...@@ -365,23 +365,52 @@ public class ReportItemvService { ...@@ -365,23 +365,52 @@ public class ReportItemvService {
365 return sql ; 365 return sql ;
366 } 366 }
367 367
368
369 /***
370 * 能耗分析*(新)
371 * @param departIds
372 * @param startDate
373 * @param endDate
374 * @return
375 */
376 public List<FRportlCommandCenterVO> statisticsByElectricityNew(String departIds, String startDate, String endDate) {
377 //出水量:+同比+环比
378 ReportItemVO csl_reportVO = ReportViewUtil.getSumValueByTBHB(ReportConstant.view2119,ReportConstant.field_CSL, departIds, startDate, endDate);
379 //总药耗:value ; 同比 环比
380
381 ReportItemVO zyhReportVO = ReportViewUtil.getSumValueByTBHB( ReportConstant.view3a24, "DLHJ", departIds, startDate,endDate);
382 //日均药耗 value ,同比,环比
383 ReportItemVO zyhReportAVG = ReportViewUtil.getSumValueByTBHB( ReportConstant.view3a24, "DLHJ", departIds, startDate,endDate,"avg");
384 //出水量:+同比+环比
385 ReportItemVO csl_avg_reportVO = ReportViewUtil.getSumValueByTBHB(ReportConstant.view2119,ReportConstant.field_CSL, departIds, startDate, endDate);
386
387 List<FRportlCommandCenterVO> dataList = new ArrayList<>();
388 dataList.add( new FRportlCommandCenterVO("月总电耗" ,"monthValue","万吨",JSUtils.divide(zyhReportVO.getValue(),"10000"),JSUtils.divide(zyhReportVO.getValueTb(),"10000"),JSUtils.divide(zyhReportVO.getValueHb(),"10000")) );
389 dataList.add( new FRportlCommandCenterVO("吨水电费" ,"dsdfValue","kwh/t",JSUtils.divide(zyhReportAVG.getValue(),"10000"),JSUtils.divide(zyhReportAVG.getValueTb(),"10000"),JSUtils.divide(zyhReportAVG.getValueHb(),"10000")) );
390 dataList.add( new FRportlCommandCenterVO("吨水电耗" ,"dsdhValue","kwh/t",JSUtils.divide(zyhReportVO.getValue(), csl_reportVO.getValue()),JSUtils.divide(zyhReportVO.getValueTb(), csl_reportVO.getValueTb()),JSUtils.divide(zyhReportVO.getValueHb(), csl_reportVO.getValueHb())) );
391 return dataList;
392 }
393
394 /***
395 * 药耗分析
396 * @param departIds
397 * @param startDate
398 * @param endDate
399 * @return
400 */
368 public List<FRportlCommandCenterVO> statisticsByYh(String departIds, String startDate, String endDate) { 401 public List<FRportlCommandCenterVO> statisticsByYh(String departIds, String startDate, String endDate) {
369 //出水量:+同比+环比 402 //出水量:+同比+环比
370 ReportItemVO csl_reportVO = ReportViewUtil.getSumValueByTBHB(ReportConstant.view2119,ReportConstant.field_CSL, departIds, startDate, endDate); 403 ReportItemVO csl_reportVO = ReportViewUtil.getSumValueByTBHB(ReportConstant.view2119,ReportConstant.field_CSL, departIds, startDate, endDate);
371 //总药耗:value ; 同比 环比 404 //总药耗:value ; 同比 环比
372 ReportItemVO zyhReportVO = ReportViewUtil.getSumValueByTBHB( ReportConstant.view3a24,ReportConstant.fieldYj, departIds, startDate,endDate); 405 ReportItemVO zyhReportVO = ReportViewUtil.getSumValueByTBHB( ReportConstant.view3a24,ReportConstant.fieldYj, departIds, startDate,endDate);
373 //日均药耗 value ,同比,环比 406 //日均 value ,同比,环比
374 ReportItemVO zyhReportAVG = ReportViewUtil.getSumValueByTBHB( ReportConstant.view3a24,ReportConstant.fieldYj, departIds, startDate,endDate,"avg"); 407 ReportItemVO zyhReportAVG = ReportViewUtil.getSumValueByTBHB( ReportConstant.view3a24,ReportConstant.fieldYj, departIds, startDate,endDate,"avg");
375 408
376 //计算药耗
377 DrugConsumptionDisplayVO displayVO = new DrugConsumptionDisplayVO(ConvertUtils.getDouble(csl_reportVO.getValue(),0d) , ConvertUtils.getDouble(csl_reportVO.getValueHb(),0d), ConvertUtils.getDouble(csl_reportVO.getValueTb(),0d),
378 ConvertUtils.getDouble(zyhReportVO.getValue(),0d), ConvertUtils.getDouble(zyhReportVO.getValueHb(),0d), ConvertUtils.getDouble(zyhReportVO.getValueTb(),0d));
379
380 List<FRportlCommandCenterVO> dataList = new ArrayList<>(); 409 List<FRportlCommandCenterVO> dataList = new ArrayList<>();
381 410 dataList.add( new FRportlCommandCenterVO("月总药耗" ,"monthValue","万吨",JSUtils.divide(zyhReportVO.getValue(),"10000"),JSUtils.divide(zyhReportVO.getValueTb(),"10000"),JSUtils.divide(zyhReportVO.getValueHb(),"10000")) );
382 dataList.add( new FRportlCommandCenterVO("月总药耗" ,zyhReportVO.getValue(),zyhReportVO.getValueTb(),zyhReportVO.getValueHb()) ); 411 dataList.add( new FRportlCommandCenterVO("吨水药费" ,"dsyfValue","元/吨",JSUtils.divide(zyhReportAVG.getValue(),"10000"),JSUtils.divide(zyhReportAVG.getValueTb(),"10000"),JSUtils.divide(zyhReportAVG.getValueHb(),"10000")) );
383 dataList.add( new FRportlCommandCenterVO("日均药耗" ,zyhReportAVG.getValue(),zyhReportAVG.getValueTb(),zyhReportAVG.getValueHb()) ); 412 dataList.add( new FRportlCommandCenterVO("吨水药耗" ,"dsyhValue","kg/吨",JSUtils.divide(zyhReportVO.getValue(), csl_reportVO.getValue()),JSUtils.divide(zyhReportVO.getValueTb(), csl_reportVO.getValueTb()),JSUtils.divide(zyhReportVO.getValueHb(), csl_reportVO.getValueHb())) );
384 dataList.add( new FRportlCommandCenterVO("吨水药耗" ,displayVO.getDsyh()+"",displayVO.getTbqndsyh()+"",displayVO.getHbsydsyh()+"") ); 413 return dataList;
385 return null;
386 } 414 }
415
387 } 416 }
......
1 package com.skua.modules.dataAnalysis.controller;
2
3 /**
4 * @auther kangwei
5 * @create 2025-02-20-10:27
6 */
7
8 import com.skua.core.api.vo.Result;
9 import com.skua.core.aspect.annotation.AutoLog;
10 import com.skua.core.context.BaseContextHandler;
11 import com.skua.modules.algorithm.service.impl.ReportItemvService;
12 import com.skua.modules.custom.service.IFCustomReportDatasetService;
13 import com.skua.modules.report.vo.FRportlCommandCenterVO;
14 import com.skua.modules.report.vo.ReportItemvParam;
15 import com.skua.modules.report.vo.largeScreen.ResultNumberVO;
16 import io.swagger.annotations.Api;
17 import io.swagger.annotations.ApiOperation;
18 import lombok.extern.slf4j.Slf4j;
19 import org.apache.commons.lang3.StringUtils;
20 import org.springframework.beans.factory.annotation.Autowired;
21 import org.springframework.web.bind.annotation.GetMapping;
22 import org.springframework.web.bind.annotation.RequestMapping;
23 import org.springframework.web.bind.annotation.RestController;
24
25 import java.util.List;
26
27 /**
28 * 报表数据分析
29 */
30 @Slf4j
31 @Api(tags="报表数据分析")
32 @RestController
33 @RequestMapping("/v1/dataAnalysis")
34 public class DataAnalysisController {
35
36 @Autowired
37 private ReportItemvService reportItemvService;
38 @Autowired
39 private IFCustomReportDatasetService reportDatasetService;
40
41
42 }
...@@ -5,6 +5,7 @@ import com.skua.core.api.vo.Result; ...@@ -5,6 +5,7 @@ import com.skua.core.api.vo.Result;
5 import com.skua.core.aspect.annotation.AutoLog; 5 import com.skua.core.aspect.annotation.AutoLog;
6 import com.skua.core.context.BaseContextHandler; 6 import com.skua.core.context.BaseContextHandler;
7 import com.skua.core.util.ConvertUtils; 7 import com.skua.core.util.ConvertUtils;
8 import com.skua.modules.custom.service.IFCustomReportDatasetService;
8 import com.skua.modules.dataAnalysis.service.ICommandCentreService; 9 import com.skua.modules.dataAnalysis.service.ICommandCentreService;
9 import com.skua.modules.algorithm.service.impl.ReportItemvService; 10 import com.skua.modules.algorithm.service.impl.ReportItemvService;
10 import com.skua.modules.algorithm.vo.DepartLoadRateResultVO; 11 import com.skua.modules.algorithm.vo.DepartLoadRateResultVO;
...@@ -17,12 +18,14 @@ import com.skua.modules.report.vo.DepartDrugResult; ...@@ -17,12 +18,14 @@ import com.skua.modules.report.vo.DepartDrugResult;
17 import com.skua.modules.report.vo.FRportlCommandCenterVO; 18 import com.skua.modules.report.vo.FRportlCommandCenterVO;
18 import com.skua.modules.report.vo.ReportDateTrendVO; 19 import com.skua.modules.report.vo.ReportDateTrendVO;
19 import com.skua.modules.report.vo.ReportItemvParam; 20 import com.skua.modules.report.vo.ReportItemvParam;
21 import com.skua.modules.report.vo.largeScreen.ResultNumberVO;
20 import com.skua.modules.system.service.ISysFactoryInfoService; 22 import com.skua.modules.system.service.ISysFactoryInfoService;
21 import com.skua.tool.util.DateUtils; 23 import com.skua.tool.util.DateUtils;
22 import com.skua.tool.util.JSUtils; 24 import com.skua.tool.util.JSUtils;
23 import io.swagger.annotations.Api; 25 import io.swagger.annotations.Api;
24 import io.swagger.annotations.ApiOperation; 26 import io.swagger.annotations.ApiOperation;
25 import lombok.extern.slf4j.Slf4j; 27 import lombok.extern.slf4j.Slf4j;
28 import org.apache.commons.lang3.StringUtils;
26 import org.springframework.beans.factory.annotation.Autowired; 29 import org.springframework.beans.factory.annotation.Autowired;
27 import org.springframework.web.bind.annotation.GetMapping; 30 import org.springframework.web.bind.annotation.GetMapping;
28 import org.springframework.web.bind.annotation.RequestMapping; 31 import org.springframework.web.bind.annotation.RequestMapping;
...@@ -51,6 +54,9 @@ public class SysCommandCentreController { ...@@ -51,6 +54,9 @@ public class SysCommandCentreController {
51 private ICommandCentreService commandCentreService; 54 private ICommandCentreService commandCentreService;
52 @Autowired 55 @Autowired
53 private ReportItemvService reportItemvService; 56 private ReportItemvService reportItemvService;
57 @Autowired
58 private IFCustomReportDatasetService reportDatasetService;
59
54 60
55 /** 61 /**
56 * 分页列表查询 62 * 分页列表查询
...@@ -156,7 +162,33 @@ public class SysCommandCentreController { ...@@ -156,7 +162,33 @@ public class SysCommandCentreController {
156 result.setResult(dataList ); 162 result.setResult(dataList );
157 return result; 163 return result;
158 } 164 }
165 @AutoLog(value = "消减量(同比、环比)")
166 @ApiOperation(value="消减量(同比、环比)", notes="消减量(同比、环比)")
167 @GetMapping(value = "/xjlByTbHb")
168 public Result<List<ResultNumberVO>> queryXjlByTbHb(String departId , String startDate, String endDate) {
169 Result<List<ResultNumberVO>> result = new Result();
170 String departIds = departId;
171 if(StringUtils.isEmpty(departId)){
172 departIds = BaseContextHandler.getDeparts();
173 }
174 List<ResultNumberVO> dataList = reportDatasetService.queryXjlByTbHb(departId,startDate,endDate);
175 result.setResult(dataList);
176 return result;
177 }
159 178
179 @AutoLog(value = "指挥中心-药耗分析")
180 @ApiOperation(value="指挥中心-药耗分析", notes="指挥中心-药耗分析")
181 @GetMapping(value = "/statisticsByYhfx")
182 public Result<List<FRportlCommandCenterVO>> statisticsByYh(ReportItemvParam reportItemvParam) {
183 Result<List<FRportlCommandCenterVO>> result = new Result();
184 String departId = BaseContextHandler.getDeparts();
185 if(reportItemvParam.getDepartIds()!=null){
186 departId = reportItemvParam.getDepartIds();
187 }
188 List<FRportlCommandCenterVO> dataList = reportItemvService.statisticsByYh(departId,reportItemvParam.getStartDate(),reportItemvParam.getEndDate());
189 result.setResult(dataList);
190 return result;
191 }
160 192
161 //cement水泥 electricity 193 //cement水泥 electricity
162 @AutoLog(value = "指挥中心-能耗分析") 194 @AutoLog(value = "指挥中心-能耗分析")
...@@ -172,21 +204,21 @@ public class SysCommandCentreController { ...@@ -172,21 +204,21 @@ public class SysCommandCentreController {
172 result.setResult(dataList ); 204 result.setResult(dataList );
173 return result; 205 return result;
174 } 206 }
175 207 @AutoLog(value = "指挥中心-能耗分析(新)")
176 @AutoLog(value = "指挥中心-药耗分析") 208 @ApiOperation(value="指挥中心-能耗分析(新)", notes="指挥中心-能耗分析(新)")
177 @ApiOperation(value="指挥中心-药耗分析", notes="指挥中心-药耗分析") 209 @GetMapping(value = "/statisticsByElectricity")
178 @GetMapping(value = "/statisticsByYh") 210 public Result<List<FRportlCommandCenterVO>> statisticsByElectricityNew(ReportItemvParam reportItemvParam) {
179 public Result<List<FRportlCommandCenterVO>> statisticsByYh(ReportItemvParam reportItemvParam) {
180 Result<List<FRportlCommandCenterVO>> result = new Result(); 211 Result<List<FRportlCommandCenterVO>> result = new Result();
181 String departId = BaseContextHandler.getDeparts(); 212 String departId = BaseContextHandler.getDeparts();
182 if(reportItemvParam.getDepartIds()!=null){ 213 if(reportItemvParam.getDepartIds()!=null){
183 departId = reportItemvParam.getDepartIds(); 214 departId = reportItemvParam.getDepartIds();
184 } 215 }
185 List<FRportlCommandCenterVO> dataList = reportItemvService.statisticsByYh(departId,reportItemvParam.getStartDate(),reportItemvParam.getEndDate()); 216 List<FRportlCommandCenterVO> dataList = reportItemvService.statisticsByElectricityNew(departId,reportItemvParam.getStartDate(),reportItemvParam.getEndDate());
186 result.setResult(dataList); 217 result.setResult(dataList );
187 return result; 218 return result;
188 } 219 }
189 220
221
190 @AutoLog(value = "指挥中心-能耗分析") 222 @AutoLog(value = "指挥中心-能耗分析")
191 @ApiOperation(value="指挥中心-能耗分析--详情列表", notes="指挥中心-能耗分析--详情列表") 223 @ApiOperation(value="指挥中心-能耗分析--详情列表", notes="指挥中心-能耗分析--详情列表")
192 @GetMapping(value = "/statisticsByElectricityList") 224 @GetMapping(value = "/statisticsByElectricityList")
......
...@@ -136,7 +136,10 @@ public class CommandCentreServiceImpl implements ICommandCentreService { ...@@ -136,7 +136,10 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
136 startDate = startDate+" 00:00:00"; 136 startDate = startDate+" 00:00:00";
137 endDate = endDate+" 23:59:59"; 137 endDate = endDate+" 23:59:59";
138 String sql = "select round( ifnull(sum( er.total_cost),0) ,2) 'cost' from equipment_repair er where er.reality_maintenance_end_time >='"+startDate+"' and er.reality_maintenance_end_time <='"+endDate+"'"; 138 String sql = "select round( ifnull(sum( er.total_cost),0) ,2) 'cost' from equipment_repair er where er.reality_maintenance_end_time >='"+startDate+"' and er.reality_maintenance_end_time <='"+endDate+"'";
139 String totalCost = getJdbcTemplate().queryForObject(sql,String.class); 139 String repairCost = getJdbcTemplate().queryForObject(sql,String.class);//维修费用
140 sql = "select round( ifnull(sum( t.maintenance_cost),0) ,2) 'cost' from equipment_maintain_task t where t.real_end_time >='"+startDate+"' and t.real_end_time <='"+endDate+"'";
141 String maintainCost = getJdbcTemplate().queryForObject(sql,String.class);//维护费用
142
140 sql = "select aaa.* from ( select er.depart_id,d.depart_name, ei.equipment_name,er.fault_content,er.fault_library_id ,ei.equipment_level from equipment_repair er "; 143 sql = "select aaa.* from ( select er.depart_id,d.depart_name, ei.equipment_name,er.fault_content,er.fault_library_id ,ei.equipment_level from equipment_repair er ";
141 sql += " left join equipment_info ei on er.info_id = ei.id "; 144 sql += " left join equipment_info ei on er.info_id = ei.id ";
142 sql +=" left join sys_depart d on d.id = er.depart_id"; 145 sql +=" left join sys_depart d on d.id = er.depart_id";
...@@ -144,7 +147,7 @@ public class CommandCentreServiceImpl implements ICommandCentreService { ...@@ -144,7 +147,7 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
144 sql += " where aaa.equipment_level = '6bf727eb7e7cca6a95c694dab0036b2c'";//A类设备 147 sql += " where aaa.equipment_level = '6bf727eb7e7cca6a95c694dab0036b2c'";//A类设备
145 List<EquipmentRepairAnalysisVO> dataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<EquipmentRepairAnalysisVO>(EquipmentRepairAnalysisVO.class));; 148 List<EquipmentRepairAnalysisVO> dataList = getJdbcTemplate().query(sql,new BeanPropertyRowMapper<EquipmentRepairAnalysisVO>(EquipmentRepairAnalysisVO.class));;
146 149
147 dataMap.put("totalCost",totalCost); 150 dataMap.put("totalCost",JSUtils.multiply(repairCost,maintainCost));
148 dataMap.put("dataList",dataList); 151 dataMap.put("dataList",dataList);
149 return dataMap; 152 return dataMap;
150 } 153 }
......
...@@ -27,10 +27,10 @@ import javax.servlet.http.HttpServletRequest; ...@@ -27,10 +27,10 @@ import javax.servlet.http.HttpServletRequest;
27 @RestController("testReportController") 27 @RestController("testReportController")
28 public class TestReportSqlController { 28 public class TestReportSqlController {
29 29
30 @AutoLog(value = "测试报表") 30 @AutoLog(value = "测试报表like")
31 @ApiOperation(value="测试报表", notes="测试报表") 31 @ApiOperation(value="测试报表like", notes="测试报表")
32 @GetMapping(value = "/testReportSql") 32 @GetMapping(value = "/testReportLikeSql")
33 public Result<String> testReportSql( 33 public Result<String> testReportLikeSql(
34 @RequestParam(name="reportId") String reportId, 34 @RequestParam(name="reportId") String reportId,
35 @RequestParam(name="fields") String fields, 35 @RequestParam(name="fields") String fields,
36 @RequestParam(name="departIds") String departIds , 36 @RequestParam(name="departIds") String departIds ,
...@@ -43,4 +43,21 @@ public class TestReportSqlController { ...@@ -43,4 +43,21 @@ public class TestReportSqlController {
43 result.setResult(dataViewName2); 43 result.setResult(dataViewName2);
44 return result; 44 return result;
45 } 45 }
46
47 @AutoLog(value = "测试报表")
48 @ApiOperation(value="测试报表", notes="测试报表")
49 @GetMapping(value = "/testReportSql")
50 public Result<String> testReportSql(
51 @RequestParam(name="reportId") String reportId,
52 @RequestParam(name="fields") String fields,
53 @RequestParam(name="departIds") String departIds ,
54 @RequestParam(name="startTime") String startTime,
55 @RequestParam(name="endTime") String endTime,
56 HttpServletRequest req) {
57 Result<String> result = new Result();
58 String dataViewName2 = ReportViewUtil.buildView(reportId,fields,departIds, startTime, endTime);
59 result.setSuccess(true);
60 result.setResult(dataViewName2);
61 return result;
62 }
46 } 63 }
......
1 package com.skua.modules.erp.controller; 1 package com.skua.modules.erp.controller;
2 2
3 import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; 3
4 import com.baomidou.mybatisplus.core.metadata.IPage;
5 import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
6 import com.skua.core.api.vo.Result; 4 import com.skua.core.api.vo.Result;
7 import com.skua.core.aspect.annotation.AutoLog; 5 import com.skua.core.aspect.annotation.AutoLog;
8 import com.skua.core.context.SpringContextUtils; 6 import com.skua.core.context.SpringContextUtils;
...@@ -15,11 +13,7 @@ import lombok.extern.slf4j.Slf4j; ...@@ -15,11 +13,7 @@ import lombok.extern.slf4j.Slf4j;
15 import org.springframework.jdbc.core.JdbcTemplate; 13 import org.springframework.jdbc.core.JdbcTemplate;
16 import org.springframework.web.bind.annotation.GetMapping; 14 import org.springframework.web.bind.annotation.GetMapping;
17 import org.springframework.web.bind.annotation.RequestMapping; 15 import org.springframework.web.bind.annotation.RequestMapping;
18 import org.springframework.web.bind.annotation.RequestParam;
19 import org.springframework.web.bind.annotation.RestController; 16 import org.springframework.web.bind.annotation.RestController;
20
21 import javax.servlet.http.HttpServletRequest;
22
23 /** 17 /**
24 * 采购数据分析 18 * 采购数据分析
25 * @auther kangwei 19 * @auther kangwei
......
...@@ -16,6 +16,15 @@ import com.skua.modules.report.vo.largeScreen.ResultNumberVO; ...@@ -16,6 +16,15 @@ import com.skua.modules.report.vo.largeScreen.ResultNumberVO;
16 */ 16 */
17 public interface IFCustomReportDatasetService extends IService<FCustomReportDataset> { 17 public interface IFCustomReportDatasetService extends IService<FCustomReportDataset> {
18 18
19
20 /***
21 * 消减量同比环比
22 * @param departIds
23 * @param startDate
24 * @param endDate
25 * @return
26 */
27 public List<ResultNumberVO> queryXjlByTbHb(String departIds, String startDate,String endDate);
19 /** 28 /**
20 * <pre> 29 * <pre>
21 * 获取填报报表数据集 30 * 获取填报报表数据集
......
...@@ -415,16 +415,21 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa ...@@ -415,16 +415,21 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
415 public List<ResultNumberVO> jnhbLargeScreenShowResultNumber(String departIds, String time){ 415 public List<ResultNumberVO> jnhbLargeScreenShowResultNumber(String departIds, String time){
416 long startTime = System.currentTimeMillis(); 416 long startTime = System.currentTimeMillis();
417 DateVO dataVO = new DateVO(time); 417 DateVO dataVO = new DateVO(time);
418 return queryXjlByTbHb(departIds,dataVO.getNowMonthStartDate(),dataVO.getNowMonthEndDate());
419 }
420
421 public List<ResultNumberVO> queryXjlByTbHb(String departIds, String startDate,String endDate){
422 long startTime = System.currentTimeMillis();
418 List<ResultNumberVO> reduceStatisticsList = new ArrayList<>(4); 423 List<ResultNumberVO> reduceStatisticsList = new ArrayList<>(4);
419 //头部统计数据 424 //头部统计数据
420 JnhbReportData nowMonthData = getJnhbReportSumDataByResultNumber(departIds,dataVO.getNowMonthStartDate(),dataVO.getNowMonthEndDate()); 425 JnhbReportData valueData = getJnhbReportSumDataByResultNumber(departIds,startDate,endDate);
421 JnhbReportData lastMonthData = getJnhbReportSumDataByResultNumber(departIds,dataVO.getLastMonthStartTime(),dataVO.getLastMonthEndTime()); 426 JnhbReportData valueHbDate = getJnhbReportSumDataByResultNumber(departIds,DateUtils.getHbDate(startDate),DateUtils.getHbDate(endDate));
422 JnhbReportData lastYearMonthData = getJnhbReportSumDataByResultNumber(departIds,dataVO.getLastYearMonthStartTime(),dataVO.getLastYearMonthEndTime()); 427 JnhbReportData valueTbData = getJnhbReportSumDataByResultNumber(departIds,DateUtils.getTbDate(startDate),DateUtils.getTbDate(endDate));
423 //ResultNumberVO(tring name, String unit, String value, String valueTb, String valueHb) 428 //ResultNumberVO(tring name, String unit, String value, String valueTb, String valueHb)
424 reduceStatisticsList.add( new ResultNumberVO( "COD", "吨",nowMonthData.getCodxjl(),lastMonthData.getCodxjl(),lastYearMonthData.getCodxjl() ) );//COD消减量(吨) codxjl 429 reduceStatisticsList.add( new ResultNumberVO( "COD", "吨",valueData.getCodxjl(),valueTbData.getCodxjl(),valueHbDate.getCodxjl() ) );//COD消减量(吨) codxjl
425 reduceStatisticsList.add( new ResultNumberVO( "NH₃-N","吨",nowMonthData.getAdxjl(),lastMonthData.getAdxjl(),lastYearMonthData.getAdxjl() ));//NH3-N消减量(吨)adxjl 430 reduceStatisticsList.add( new ResultNumberVO( "NH₃-N","吨",valueData.getAdxjl(),valueTbData.getAdxjl(),valueHbDate.getAdxjl() ));//NH3-N消减量(吨)adxjl
426 reduceStatisticsList.add( new ResultNumberVO( "TP","吨",nowMonthData.getTpxjl(),lastMonthData.getTpxjl(),lastYearMonthData.getTpxjl() ));//TP消减量(吨)tpxjl 431 reduceStatisticsList.add( new ResultNumberVO( "TP","吨",valueData.getTpxjl(),valueTbData.getTpxjl(),valueHbDate.getTpxjl() ));//TP消减量(吨)tpxjl
427 reduceStatisticsList.add( new ResultNumberVO( "TN","吨",nowMonthData.getTnxjl(),lastMonthData.getTnxjl(),lastYearMonthData.getTnxjl() ));//TN消减量(吨)tnxjl 432 reduceStatisticsList.add( new ResultNumberVO( "TN","吨",valueData.getTnxjl(),valueTbData.getTnxjl(),valueHbDate.getTnxjl() ));//TN消减量(吨)tnxjl
428 433
429 long endTime = System.currentTimeMillis(); 434 long endTime = System.currentTimeMillis();
430 long elapsedTime = endTime - startTime; 435 long elapsedTime = endTime - startTime;
...@@ -432,6 +437,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa ...@@ -432,6 +437,7 @@ public class FCustomReportDatasetServiceImpl extends ServiceImpl<FCustomReportDa
432 return reduceStatisticsList; 437 return reduceStatisticsList;
433 } 438 }
434 439
440
435 @Override 441 @Override
436 public List<Map<String, Object>> querySzYynbReport(String dataViewName2119, String startTime, String endTime, String departId) { 442 public List<Map<String, Object>> querySzYynbReport(String dataViewName2119, String startTime, String endTime, String departId) {
437 List<Map<String, Object>> list = mapper.querySzYynbReport(dataViewName2119, startTime, endTime, departId); 443 List<Map<String, Object>> list = mapper.querySzYynbReport(dataViewName2119, startTime, endTime, departId);
......
...@@ -12,8 +12,14 @@ import java.io.Serializable; ...@@ -12,8 +12,14 @@ import java.io.Serializable;
12 @Data 12 @Data
13 @ApiModel(value="控制中心报表结果接收对象", description="控制中心报表结果接收对象") 13 @ApiModel(value="控制中心报表结果接收对象", description="控制中心报表结果接收对象")
14 public class FRportlCommandCenterVO implements Serializable { 14 public class FRportlCommandCenterVO implements Serializable {
15 @ApiModelProperty(value = "标题") 15 @ApiModelProperty(value = "label描述")
16 private String title; 16 private String label;
17
18 @ApiModelProperty(value = "code")
19 private String code;
20
21 @ApiModelProperty(value = "单位")
22 private String unit;
17 23
18 @ApiModelProperty(value = "结果") 24 @ApiModelProperty(value = "结果")
19 private String value; 25 private String value;
...@@ -35,8 +41,17 @@ public class FRportlCommandCenterVO implements Serializable { ...@@ -35,8 +41,17 @@ public class FRportlCommandCenterVO implements Serializable {
35 this.valueTb = valueTb; 41 this.valueTb = valueTb;
36 this.valueHb = valueHb; 42 this.valueHb = valueHb;
37 } 43 }
38 public FRportlCommandCenterVO(String title ,String value, String valueTb, String valueHb) { 44 public FRportlCommandCenterVO(String label ,String value, String valueTb, String valueHb) {
39 this.title = title; 45 this.label = label;
46 this.value = value;
47 this.valueTb = valueTb;
48 this.valueHb = valueHb;
49 }
50
51 public FRportlCommandCenterVO(String label, String code, String unit, String value, String valueTb, String valueHb) {
52 this.label = label;
53 this.code = code;
54 this.unit = unit;
40 this.value = value; 55 this.value = value;
41 this.valueTb = valueTb; 56 this.valueTb = valueTb;
42 this.valueHb = valueHb; 57 this.valueHb = valueHb;
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!