Commit 1a94506d4721cddcf89239f335ca9e73da01cdac
Merge branch 'pudong_jdk8' of 192.168.168.201:panzhaov5/bsth_control into pudong_jdk8
Showing
3 changed files
with
82 additions
and
50 deletions
src/main/java/com/bsth/service/report/impl/CalcSheetServiceImpl.java
| @@ -124,6 +124,33 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im | @@ -124,6 +124,33 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im | ||
| 124 | } | 124 | } |
| 125 | } | 125 | } |
| 126 | } | 126 | } |
| 127 | + | ||
| 128 | + CalcSheet temp = new CalcSheet(); | ||
| 129 | + temp.setGsname(""); | ||
| 130 | + temp.setFgsname(""); | ||
| 131 | + temp.setXlName("合计"); | ||
| 132 | + for(CalcSheet s : list){ | ||
| 133 | + temp.setJhszfcs(Long.valueOf(s.getJhszfcs()!=null?s.getJhszfcs():"0") | ||
| 134 | + + Long.valueOf(temp.getJhszfcs()!=null?temp.getJhszfcs():"0") + ""); | ||
| 135 | + temp.setSjszfczds(Long.valueOf(s.getSjszfczds()!=null?s.getSjszfczds():"0") | ||
| 136 | + + Long.valueOf(temp.getSjszfczds()!=null?temp.getSjszfczds():"0") + ""); | ||
| 137 | + temp.setSjszddzds(Long.valueOf(s.getSjszddzds()!=null?s.getSjszddzds():"0") | ||
| 138 | + + Long.valueOf(temp.getSjszddzds()!=null?temp.getSjszddzds():"0") + ""); | ||
| 139 | + } | ||
| 140 | + Long jhfc = Long.valueOf(temp.getJhszfcs()!=null?temp.getJhszfcs():"0"); | ||
| 141 | + Long zdfc = Long.valueOf(temp.getSjszfczds()!=null?temp.getSjszfczds():"0"); | ||
| 142 | + Long zddd = Long.valueOf(temp.getSjszddzds()!=null?temp.getSjszddzds():"0"); | ||
| 143 | + if(jhfc > 0l){ | ||
| 144 | + double zdl = (zdfc*1.0)/(jhfc*1.0)*100; | ||
| 145 | + temp.setSzfczdl(df.format(zdl)+"%"); | ||
| 146 | + zdl = (zddd*1.0)/(jhfc*1.0)*100; | ||
| 147 | + temp.setSzddzdl(df.format(zdl)+"%"); | ||
| 148 | + }else{ | ||
| 149 | + temp.setSzfczdl("0.0%"); | ||
| 150 | + temp.setSzddzdl("0.0%"); | ||
| 151 | + } | ||
| 152 | + list.add(temp); | ||
| 153 | + | ||
| 127 | if(map.get("type").equals("export")){ | 154 | if(map.get("type").equals("export")){ |
| 128 | String lineName=""; | 155 | String lineName=""; |
| 129 | if(!line.equals("")){ | 156 | if(!line.equals("")){ |
| @@ -137,9 +164,9 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im | @@ -137,9 +164,9 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im | ||
| 137 | for (int i = 0; i < list.size(); i++) { | 164 | for (int i = 0; i < list.size(); i++) { |
| 138 | CalcSheet c=list.get(i); | 165 | CalcSheet c=list.get(i); |
| 139 | Map<String, Object> m=new HashMap<String,Object>(); | 166 | Map<String, Object> m=new HashMap<String,Object>(); |
| 140 | - m.put("gs", c.getGsname()); | ||
| 141 | - m.put("fgs", c.getFgsname()); | ||
| 142 | - m.put("line", c.getXlName()); | 167 | + m.put("gs", c.getGsname()!=null?c.getGsname():""); |
| 168 | + m.put("fgs", c.getFgsname()!=null?c.getFgsname():""); | ||
| 169 | + m.put("line", c.getXlName()!=null?c.getXlName():""); | ||
| 143 | m.put("bcs", c.getJhszfcs()); | 170 | m.put("bcs", c.getJhszfcs()); |
| 144 | m.put("zdbcs", c.getSjszfczds()); | 171 | m.put("zdbcs", c.getSjszfczds()); |
| 145 | m.put("zdlv", c.getSzfczdl()); | 172 | m.put("zdlv", c.getSzfczdl()); |
src/main/resources/application-dev.properties
| 1 | -server.port=9088 | ||
| 2 | - | ||
| 3 | -# dubbo服务化使用开关flag | ||
| 4 | -dubbo.use=false | ||
| 5 | - | ||
| 6 | -#JPA | ||
| 7 | -spring.jpa.hibernate.ddl-auto= update | ||
| 8 | -spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl | ||
| 9 | -spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy | ||
| 10 | -spring.jpa.database= MYSQL | ||
| 11 | -spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true | ||
| 12 | -spring.jpa.show-sql= true | ||
| 13 | - | ||
| 14 | -#DATABASE | ||
| 15 | -spring.datasource.driver-class-name= com.mysql.jdbc.Driver | ||
| 16 | -spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 17 | -#spring.datasource.url= jdbc:mysql://192.168.168.222/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 18 | -spring.datasource.username= root | ||
| 19 | -spring.datasource.password= | ||
| 20 | -#spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 21 | -#spring.datasource.username= root | ||
| 22 | -#spring.datasource.password= root | ||
| 23 | -spring.datasource.type= com.zaxxer.hikari.HikariDataSource | ||
| 24 | - | ||
| 25 | -#DATASOURCE SETTING | ||
| 26 | -spring.datasource.hikari.minimum-idle= 8 | ||
| 27 | -spring.datasource.hikari.maximum-pool-size= 100 | ||
| 28 | -#spring.datasource.hikari.auto-commit= true | ||
| 29 | -spring.datasource.hikari.idle-timeout= 60000 | ||
| 30 | -#spring.datasource.hikari.pool-name= HikariPool | ||
| 31 | -spring.datasource.hikari.max-lifetime= 1800000 | ||
| 32 | -spring.datasource.hikari.connection-timeout= 3000 | ||
| 33 | -spring.datasource.hikari.connection-test-query= SELECT 1 | ||
| 34 | -spring.datasource.hikari.validation-timeout= 3000 | ||
| 35 | -spring.datasource.hikari.register-mbeans=true | ||
| 36 | - | ||
| 37 | -## gps client data | ||
| 38 | -http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all | ||
| 39 | -## gateway real data | ||
| 40 | -http.gps.real.url= http://114.80.178.12:18080/transport_server/rtgps/ | ||
| 41 | -## gateway send directive | ||
| 42 | -http.send.directive = http://192.168.168.201:9090/transport_server/message/ | ||
| 43 | -## rfid data | ||
| 44 | -http.rfid.url= http://114.80.178.12:29000/rfid | 1 | +server.port=9088 |
| 2 | + | ||
| 3 | +# dubbo服务化使用开关flag | ||
| 4 | +dubbo.use=false | ||
| 5 | + | ||
| 6 | +#JPA | ||
| 7 | +spring.jpa.hibernate.ddl-auto= none | ||
| 8 | +spring.jpa.hibernate.naming.implicit-strategy=org.hibernate.boot.model.naming.ImplicitNamingStrategyLegacyHbmImpl | ||
| 9 | +spring.jpa.hibernate.naming.physical-strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy | ||
| 10 | +spring.jpa.database= MYSQL | ||
| 11 | +spring.jpa.properties.hibernate.enable_lazy_load_no_trans=true | ||
| 12 | +spring.jpa.show-sql= true | ||
| 13 | + | ||
| 14 | +#DATABASE | ||
| 15 | +spring.datasource.driver-class-name= com.mysql.jdbc.Driver | ||
| 16 | +#spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 17 | +##spring.datasource.url= jdbc:mysql://192.168.168.222/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 18 | +#spring.datasource.username= root | ||
| 19 | +#spring.datasource.password= | ||
| 20 | +spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 21 | +spring.datasource.username= root | ||
| 22 | +spring.datasource.password= root | ||
| 23 | +#spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 24 | +#spring.datasource.username= root | ||
| 25 | +#spring.datasource.password= root | ||
| 26 | +spring.datasource.type= com.zaxxer.hikari.HikariDataSource | ||
| 27 | + | ||
| 28 | +#DATASOURCE SETTING | ||
| 29 | +spring.datasource.hikari.minimum-idle= 8 | ||
| 30 | +spring.datasource.hikari.maximum-pool-size= 100 | ||
| 31 | +#spring.datasource.hikari.auto-commit= true | ||
| 32 | +spring.datasource.hikari.idle-timeout= 60000 | ||
| 33 | +#spring.datasource.hikari.pool-name= HikariPool | ||
| 34 | +spring.datasource.hikari.max-lifetime= 1800000 | ||
| 35 | +spring.datasource.hikari.connection-timeout= 3000 | ||
| 36 | +spring.datasource.hikari.connection-test-query= SELECT 1 | ||
| 37 | +spring.datasource.hikari.validation-timeout= 3000 | ||
| 38 | +spring.datasource.hikari.register-mbeans=true | ||
| 39 | + | ||
| 40 | +## gps client data | ||
| 41 | +http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all | ||
| 42 | +## gateway real data | ||
| 43 | +http.gps.real.url= http://114.80.178.12:18080/transport_server/rtgps/ | ||
| 44 | +## gateway send directive | ||
| 45 | +http.send.directive = http://192.168.168.201:9090/transport_server/message/ | ||
| 46 | +## rfid data | ||
| 47 | +http.rfid.url= http://114.80.178.12:29000/rfid |
src/main/resources/static/pages/report/sheet/calcSheetList.html
| @@ -373,8 +373,10 @@ | @@ -373,8 +373,10 @@ | ||
| 373 | <td>{{obj.sjszddzds}}</td> | 373 | <td>{{obj.sjszddzds}}</td> |
| 374 | <td>{{obj.szddzdl}}</td> | 374 | <td>{{obj.szddzdl}}</td> |
| 375 | <td> | 375 | <td> |
| 376 | - <button type="button" class="btn btn-sm blue btn-calcSheetList" | ||
| 377 | - data-id="{{obj.xl}}">查看</button> | 376 | + {{if obj.xl && obj.xl > 0}} |
| 377 | + <button type="button" class="btn btn-sm blue btn-calcSheetList" | ||
| 378 | + data-id="{{obj.xl}}">查看</button> | ||
| 379 | + {{/if}} | ||
| 378 | </td> | 380 | </td> |
| 379 | </tr> | 381 | </tr> |
| 380 | {{/each}} | 382 | {{/each}} |
| @@ -411,7 +413,7 @@ | @@ -411,7 +413,7 @@ | ||
| 411 | {{/each}} | 413 | {{/each}} |
| 412 | {{if list.length == 0}} | 414 | {{if list.length == 0}} |
| 413 | <tr> | 415 | <tr> |
| 414 | - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | 416 | + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td> |
| 415 | </tr> | 417 | </tr> |
| 416 | {{/if}} | 418 | {{/if}} |
| 417 | </script> | 419 | </script> |