Merge remote-tracking branch 'origin/master' into master
正在显示
4 个修改的文件
包含
22 行增加
和
7 行删除
... | @@ -114,6 +114,7 @@ public class SysCommandCentreController { | ... | @@ -114,6 +114,7 @@ public class SysCommandCentreController { |
114 | return result; | 114 | return result; |
115 | } | 115 | } |
116 | 116 | ||
117 | |||
117 | //cement水泥 electricity | 118 | //cement水泥 electricity |
118 | @AutoLog(value = "指挥中心-泥量统计") | 119 | @AutoLog(value = "指挥中心-泥量统计") |
119 | @ApiOperation(value="指挥中心-泥量统计", notes="指挥中心-泥量统计") | 120 | @ApiOperation(value="指挥中心-泥量统计", notes="指挥中心-泥量统计") | ... | ... |
... | @@ -14,6 +14,7 @@ import com.skua.modules.report.mapper.FReportItemMapper; | ... | @@ -14,6 +14,7 @@ import com.skua.modules.report.mapper.FReportItemMapper; |
14 | import com.skua.modules.report.vo.*; | 14 | import com.skua.modules.report.vo.*; |
15 | import com.skua.modules.report.mapper.FReportItemvMapper; | 15 | import com.skua.modules.report.mapper.FReportItemvMapper; |
16 | import com.skua.tool.util.DateUtils; | 16 | import com.skua.tool.util.DateUtils; |
17 | import com.skua.tool.util.JSUtils; | ||
17 | import org.springframework.jdbc.core.BeanPropertyRowMapper; | 18 | import org.springframework.jdbc.core.BeanPropertyRowMapper; |
18 | import org.springframework.jdbc.core.JdbcTemplate; | 19 | import org.springframework.jdbc.core.JdbcTemplate; |
19 | import org.springframework.stereotype.Service; | 20 | import org.springframework.stereotype.Service; |
... | @@ -201,7 +202,7 @@ public class CommandCentreServiceImpl implements ICommandCentreService { | ... | @@ -201,7 +202,7 @@ public class CommandCentreServiceImpl implements ICommandCentreService { |
201 | for(WaterTreatmentVO waterTreatmentVO : dateList){ | 202 | for(WaterTreatmentVO waterTreatmentVO : dateList){ |
202 | waterTreatmentVO.setRank(index++);//设置排名 | 203 | waterTreatmentVO.setRank(index++);//设置排名 |
203 | if(waterTreatmentVO.getCSL() != null ){ | 204 | if(waterTreatmentVO.getCSL() != null ){ |
204 | waterTreatmentVO.setDayCsl( waterTreatmentVO.getCSL() / differenceDay ); | 205 | waterTreatmentVO.setDayCsl(Double.parseDouble(JSUtils.divide( waterTreatmentVO.getCSL() ,differenceDay )) ); |
205 | } | 206 | } |
206 | /* waterTreatmentVO.setRank( index++);//设置排名 | 207 | /* waterTreatmentVO.setRank( index++);//设置排名 |
207 | if(cslMap.get(waterTreatmentVO.getDepartId()) != null ){ | 208 | if(cslMap.get(waterTreatmentVO.getDepartId()) != null ){ |
... | @@ -209,10 +210,10 @@ public class CommandCentreServiceImpl implements ICommandCentreService { | ... | @@ -209,10 +210,10 @@ public class CommandCentreServiceImpl implements ICommandCentreService { |
209 | waterTreatmentVO.setDayCsl( waterTreatmentVO.getCsl() / differenceDay ); | 210 | waterTreatmentVO.setDayCsl( waterTreatmentVO.getCsl() / differenceDay ); |
210 | }*/ | 211 | }*/ |
211 | if(hbCslMap.get(waterTreatmentVO.getDepartId()) != null ){ | 212 | if(hbCslMap.get(waterTreatmentVO.getDepartId()) != null ){ |
212 | waterTreatmentVO.setHbcsl(Double.parseDouble(hbCslMap.get(waterTreatmentVO.getDepartId())) ); | 213 | waterTreatmentVO.setHbcsl(Double.parseDouble( JSUtils.format( hbCslMap.get(waterTreatmentVO.getDepartId())) ) ); |
213 | } | 214 | } |
214 | if(tbCslMap.get(waterTreatmentVO.getDepartId()) != null ){ | 215 | if(tbCslMap.get(waterTreatmentVO.getDepartId()) != null ){ |
215 | waterTreatmentVO.setTbcsl(Double.parseDouble(tbCslMap.get(waterTreatmentVO.getDepartId())) ); | 216 | waterTreatmentVO.setTbcsl(Double.parseDouble( JSUtils.format(tbCslMap.get(waterTreatmentVO.getDepartId())) ) ); |
216 | } | 217 | } |
217 | } | 218 | } |
218 | } | 219 | } | ... | ... |
... | @@ -313,6 +313,8 @@ public class ReportItemvService { | ... | @@ -313,6 +313,8 @@ public class ReportItemvService { |
313 | } | 313 | } |
314 | 314 | ||
315 | 315 | ||
316 | |||
317 | |||
316 | private String getStatisticsByLoadRate(String dataViewName2119 ,Integer loadRateType ){ | 318 | private String getStatisticsByLoadRate(String dataViewName2119 ,Integer loadRateType ){ |
317 | String sql = "select count(1) from ( "; | 319 | String sql = "select count(1) from ( "; |
318 | sql += " select aaa.depart_id , round( (sum(aaa.CSL)/(fi.pro_scale*10000) ),2) 'loadRate' from "+ dataViewName2119 +" aaa"; | 320 | sql += " select aaa.depart_id , round( (sum(aaa.CSL)/(fi.pro_scale*10000) ),2) 'loadRate' from "+ dataViewName2119 +" aaa"; | ... | ... |
... | @@ -9,6 +9,7 @@ import com.skua.modules.equipment.vo.DrugConsumptionTrendChartVO; | ... | @@ -9,6 +9,7 @@ import com.skua.modules.equipment.vo.DrugConsumptionTrendChartVO; |
9 | import io.swagger.annotations.Api; | 9 | import io.swagger.annotations.Api; |
10 | import io.swagger.annotations.ApiOperation; | 10 | import io.swagger.annotations.ApiOperation; |
11 | import lombok.extern.slf4j.Slf4j; | 11 | import lombok.extern.slf4j.Slf4j; |
12 | import org.apache.commons.lang3.StringUtils; | ||
12 | import org.springframework.beans.factory.annotation.Autowired; | 13 | import org.springframework.beans.factory.annotation.Autowired; |
13 | import org.springframework.web.bind.annotation.GetMapping; | 14 | import org.springframework.web.bind.annotation.GetMapping; |
14 | import org.springframework.web.bind.annotation.RequestMapping; | 15 | import org.springframework.web.bind.annotation.RequestMapping; |
... | @@ -67,8 +68,8 @@ public class DrugConsumptionAnalysisController { | ... | @@ -67,8 +68,8 @@ public class DrugConsumptionAnalysisController { |
67 | @GetMapping("/correlation/analysisType") | 68 | @GetMapping("/correlation/analysisType") |
68 | public Result<List<DrugConsumptionDisplayVO>> analysisType() { | 69 | public Result<List<DrugConsumptionDisplayVO>> analysisType() { |
69 | Result<List<DrugConsumptionDisplayVO>> result = new Result<>(); | 70 | Result<List<DrugConsumptionDisplayVO>> result = new Result<>(); |
70 | List<DrugConsumptionDisplayVO> data = drugConsumptionAnalysisService.analysisType(); | 71 | List<DrugConsumptionDisplayVO> dataList = drugConsumptionAnalysisService.analysisType(); |
71 | result.setResult(data); | 72 | result.setResult(dataList); |
72 | return result; | 73 | return result; |
73 | } | 74 | } |
74 | @AutoLog(value = "相关性分析") | 75 | @AutoLog(value = "相关性分析") |
... | @@ -76,8 +77,18 @@ public class DrugConsumptionAnalysisController { | ... | @@ -76,8 +77,18 @@ public class DrugConsumptionAnalysisController { |
76 | @GetMapping("/correlation/analysis") | 77 | @GetMapping("/correlation/analysis") |
77 | public Result<List<CorrelationAnalysisVO>> correlationAnalysis(String time, String drugCode, String departId) { | 78 | public Result<List<CorrelationAnalysisVO>> correlationAnalysis(String time, String drugCode, String departId) { |
78 | Result<List<CorrelationAnalysisVO>> result = new Result<>(); | 79 | Result<List<CorrelationAnalysisVO>> result = new Result<>(); |
79 | List<CorrelationAnalysisVO> data = drugConsumptionAnalysisService.correlationAnalysis(time,drugCode ,departId); | 80 | if(StringUtils.isEmpty(drugCode)){ |
80 | result.setResult(data); | 81 | List<DrugConsumptionDisplayVO> dataList = drugConsumptionAnalysisService.analysisType(); |
82 | if(dataList != null && !dataList.isEmpty() ){ | ||
83 | drugCode = dataList.get(0).getDrugCode(); | ||
84 | } | ||
85 | } | ||
86 | if(StringUtils.isEmpty(drugCode)){ | ||
87 | result.error500("参数不识别"); | ||
88 | }else{ | ||
89 | List<CorrelationAnalysisVO> list = drugConsumptionAnalysisService.correlationAnalysis(time,drugCode ,departId); | ||
90 | result.setResult(list); | ||
91 | } | ||
81 | return result; | 92 | return result; |
82 | } | 93 | } |
83 | 94 | ... | ... |
-
请 注册 或 登录 后发表评论