kangwei 格式化小数点位数
正在显示
3 个修改的文件
包含
7 行增加
和
3 行删除
... | @@ -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"; | ... | ... |
-
请 注册 或 登录 后发表评论