f470c6e2 康伟

kangwei 格式化小数点位数

1 个父辈 8dd8c848
......@@ -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";
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!