Commit 08ec98e288b2ed5c585193726048758371656055
1 parent
5e75991d
update
Showing
2 changed files
with
35 additions
and
8 deletions
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -2846,11 +2846,29 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2846,11 +2846,29 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2846 | map.put("dtbc_m", 0); | 2846 | map.put("dtbc_m", 0); |
| 2847 | map.put("dtbc_a", 0); | 2847 | map.put("dtbc_a", 0); |
| 2848 | if(list.size()>0){ | 2848 | if(list.size()>0){ |
| 2849 | - Map<String, Object> m_=culateService.culateDjg(list_s, list.get(0).getXlBm()); | ||
| 2850 | - map.put("djg", m_.get("djgcsq")); | ||
| 2851 | - map.put("djg_m", m_.get("djgcsz")); | ||
| 2852 | - map.put("djg_a", m_.get("djgcsw")); | ||
| 2853 | - map.put("djg_time", m_.get("djgsj")); | 2849 | + int djg = 0, djg_m = 0, djg_a = 0, djg_time = 0; |
| 2850 | + for(Map<String, Object> m : lMap){ | ||
| 2851 | + if(m.containsKey("djg") && m.get("djg") != null) | ||
| 2852 | + djg += Integer.valueOf(m.get("djg").toString()); | ||
| 2853 | + if(m.containsKey("djg_m") && m.get("djg_m") != null) | ||
| 2854 | + djg_m += Integer.valueOf(m.get("djg_m").toString()); | ||
| 2855 | + if(m.containsKey("djg_a") && m.get("djg_a") != null) | ||
| 2856 | + djg_a += Integer.valueOf(m.get("djg_a").toString()); | ||
| 2857 | + if(m.containsKey("djg_time") && m.get("djg_time") != null){ | ||
| 2858 | + int t = Integer.valueOf(m.get("djg_time").toString()); | ||
| 2859 | + if(t > djg_time) | ||
| 2860 | + djg_time = t; | ||
| 2861 | + } | ||
| 2862 | + } | ||
| 2863 | + map.put("djg", djg); | ||
| 2864 | + map.put("djg_m", djg_m); | ||
| 2865 | + map.put("djg_a", djg_a); | ||
| 2866 | + map.put("djg_time", djg_time); | ||
| 2867 | +// Map<String, Object> m_=culateService.culateDjg(list_s, list.get(0).getXlBm()); | ||
| 2868 | +// map.put("djg", m_.get("djgcsq")); | ||
| 2869 | +// map.put("djg_m", m_.get("djgcsz")); | ||
| 2870 | +// map.put("djg_a", m_.get("djgcsw")); | ||
| 2871 | +// map.put("djg_time", m_.get("djgsj")); | ||
| 2854 | }else{ | 2872 | }else{ |
| 2855 | map.put("djg", "0"); | 2873 | map.put("djg", "0"); |
| 2856 | map.put("djg_m", "0"); | 2874 | map.put("djg_m", "0"); |
src/main/resources/static/pages/forms/statement/correctForm.html
| @@ -233,6 +233,7 @@ | @@ -233,6 +233,7 @@ | ||
| 233 | var endDate = $("#endDate").val(); | 233 | var endDate = $("#endDate").val(); |
| 234 | var code = $("#code").val(); | 234 | var code = $("#code").val(); |
| 235 | var changType=$("#changType").val(); | 235 | var changType=$("#changType").val(); |
| 236 | + var lineName = $('#line option:selected').text(); | ||
| 236 | $("#query").on("click",function(){ | 237 | $("#query").on("click",function(){ |
| 237 | line = $("#line").val(); | 238 | line = $("#line").val(); |
| 238 | date = $("#date").val(); | 239 | date = $("#date").val(); |
| @@ -240,6 +241,9 @@ | @@ -240,6 +241,9 @@ | ||
| 240 | code = $("#code").val(); | 241 | code = $("#code").val(); |
| 241 | endDate = $("#endDate").val(); | 242 | endDate = $("#endDate").val(); |
| 242 | changType=$("#changType").val(); | 243 | changType=$("#changType").val(); |
| 244 | + lineName = $('#line option:selected').text(); | ||
| 245 | + if(lineName == "全部线路") | ||
| 246 | + lineName = $('#subCompany option:selected').text(); | ||
| 243 | var type = "query"; | 247 | var type = "query"; |
| 244 | $get("/realSchedule/correctForm",{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type,changType:changType},function(result){ | 248 | $get("/realSchedule/correctForm",{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type,changType:changType},function(result){ |
| 245 | var list_correctForm = template('list_correctForm',{list:result}); | 249 | var list_correctForm = template('list_correctForm',{list:result}); |
| @@ -260,10 +264,15 @@ | @@ -260,10 +264,15 @@ | ||
| 260 | $("#export").on("click",function(){ | 264 | $("#export").on("click",function(){ |
| 261 | var type = "export"; | 265 | var type = "export"; |
| 262 | $get('/realSchedule/correctForm',{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type,changType:changType},function(result){ | 266 | $get('/realSchedule/correctForm',{line:line,date:date,endDate:endDate,lpName:lpName,code:code,type:type,changType:changType},function(result){ |
| 263 | - | 267 | + var dateTime = ""; |
| 268 | + if(date == endDate){ | ||
| 269 | + dateTime = moment(date).format("YYYYMMDD"); | ||
| 270 | + } else { | ||
| 271 | + dateTime = moment(date).format("YYYYMMDD")+"-"+ | ||
| 272 | + moment(endDate).format("YYYYMMDD"); | ||
| 273 | + } | ||
| 264 | window.open("/downloadFile/download?fileName=" | 274 | window.open("/downloadFile/download?fileName=" |
| 265 | - +moment(date).format("YYYYMMDD") | ||
| 266 | - +"-"+date+"-修正报表"); | 275 | + +dateTime+"-"+lineName+"-修正报表"); |
| 267 | }); | 276 | }); |
| 268 | }); | 277 | }); |
| 269 | 278 |