Commit 804f06f816d4d13fd0f20f895020288c0d839998
1 parent
b7655003
发车准点率sql查询合计int出现小数点.0,去小数
Showing
1 changed file
with
3 additions
and
3 deletions
src/main/java/com/bsth/service/report/impl/CalcSheetServiceImpl.java
| ... | ... | @@ -124,9 +124,9 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im |
| 124 | 124 | s.setJhszfcs(rs.getString("jhszfcs")); |
| 125 | 125 | s.setSjszfczds(rs.getString("sjszfczds")); |
| 126 | 126 | s.setSjszddzds(rs.getString("sjszddzds")); |
| 127 | - int jhfc=Integer.parseInt(rs.getString("jhszfcs")); | |
| 128 | - int zdfc=Integer.parseInt(rs.getString("sjszfczds")); | |
| 129 | - int zddd=Integer.parseInt(rs.getString("sjszddzds")); | |
| 127 | + int jhfc=Integer.parseInt(rs.getString("jhszfcs").split("\\.")[0]); | |
| 128 | + int zdfc=Integer.parseInt(rs.getString("sjszfczds").split("\\.")[0]); | |
| 129 | + int zddd=Integer.parseInt(rs.getString("sjszddzds").split("\\.")[0]); | |
| 130 | 130 | if(jhfc>0){ |
| 131 | 131 | double zdl=(zdfc*1.0)/(jhfc*1.0)*100; |
| 132 | 132 | s.setSzfczdl(df.format(zdl)+"%"); | ... | ... |