c223e47e 张雷

Merge remote-tracking branch 'origin/master' into master

2 个父辈 0d8961ee f470c6e2
......@@ -114,6 +114,7 @@ public class SysCommandCentreController {
return result;
}
//cement水泥 electricity
@AutoLog(value = "指挥中心-泥量统计")
@ApiOperation(value="指挥中心-泥量统计", notes="指挥中心-泥量统计")
......
......@@ -14,6 +14,7 @@ import com.skua.modules.report.mapper.FReportItemMapper;
import com.skua.modules.report.vo.*;
import com.skua.modules.report.mapper.FReportItemvMapper;
import com.skua.tool.util.DateUtils;
import com.skua.tool.util.JSUtils;
import org.springframework.jdbc.core.BeanPropertyRowMapper;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.stereotype.Service;
......@@ -201,7 +202,7 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
for(WaterTreatmentVO waterTreatmentVO : dateList){
waterTreatmentVO.setRank(index++);//设置排名
if(waterTreatmentVO.getCSL() != null ){
waterTreatmentVO.setDayCsl( waterTreatmentVO.getCSL() / differenceDay );
waterTreatmentVO.setDayCsl(Double.parseDouble(JSUtils.divide( waterTreatmentVO.getCSL() ,differenceDay )) );
}
/* waterTreatmentVO.setRank( index++);//设置排名
if(cslMap.get(waterTreatmentVO.getDepartId()) != null ){
......@@ -209,10 +210,10 @@ public class CommandCentreServiceImpl implements ICommandCentreService {
waterTreatmentVO.setDayCsl( waterTreatmentVO.getCsl() / differenceDay );
}*/
if(hbCslMap.get(waterTreatmentVO.getDepartId()) != null ){
waterTreatmentVO.setHbcsl(Double.parseDouble(hbCslMap.get(waterTreatmentVO.getDepartId())) );
waterTreatmentVO.setHbcsl(Double.parseDouble( JSUtils.format( hbCslMap.get(waterTreatmentVO.getDepartId())) ) );
}
if(tbCslMap.get(waterTreatmentVO.getDepartId()) != null ){
waterTreatmentVO.setTbcsl(Double.parseDouble(tbCslMap.get(waterTreatmentVO.getDepartId())) );
waterTreatmentVO.setTbcsl(Double.parseDouble( JSUtils.format(tbCslMap.get(waterTreatmentVO.getDepartId())) ) );
}
}
}
......
......@@ -313,6 +313,8 @@ public class ReportItemvService {
}
private String getStatisticsByLoadRate(String dataViewName2119 ,Integer loadRateType ){
String sql = "select count(1) from ( ";
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;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -67,8 +68,8 @@ public class DrugConsumptionAnalysisController {
@GetMapping("/correlation/analysisType")
public Result<List<DrugConsumptionDisplayVO>> analysisType() {
Result<List<DrugConsumptionDisplayVO>> result = new Result<>();
List<DrugConsumptionDisplayVO> data = drugConsumptionAnalysisService.analysisType();
result.setResult(data);
List<DrugConsumptionDisplayVO> dataList = drugConsumptionAnalysisService.analysisType();
result.setResult(dataList);
return result;
}
@AutoLog(value = "相关性分析")
......@@ -76,8 +77,18 @@ public class DrugConsumptionAnalysisController {
@GetMapping("/correlation/analysis")
public Result<List<CorrelationAnalysisVO>> correlationAnalysis(String time, String drugCode, String departId) {
Result<List<CorrelationAnalysisVO>> result = new Result<>();
List<CorrelationAnalysisVO> data = drugConsumptionAnalysisService.correlationAnalysis(time,drugCode ,departId);
result.setResult(data);
if(StringUtils.isEmpty(drugCode)){
List<DrugConsumptionDisplayVO> dataList = drugConsumptionAnalysisService.analysisType();
if(dataList != null && !dataList.isEmpty() ){
drugCode = dataList.get(0).getDrugCode();
}
}
if(StringUtils.isEmpty(drugCode)){
result.error500("参数不识别");
}else{
List<CorrelationAnalysisVO> list = drugConsumptionAnalysisService.correlationAnalysis(time,drugCode ,departId);
result.setResult(list);
}
return result;
}
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!