Commit 7319efb4b8438f51ec30161d66c606f3a7ef842e
Merge branch 'pudong' of http://192.168.168.201:8888/panzhaov5/bsth_control into pudong
Showing
10 changed files
with
555 additions
and
407 deletions
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| ... | ... | @@ -828,8 +828,10 @@ public class DayOfSchedule { |
| 828 | 828 | Collections.sort(list, schFCSJComparator); |
| 829 | 829 | ScheduleRealInfo sch = null; |
| 830 | 830 | for (ScheduleRealInfo temp : list) { |
| 831 | - if (temp.getFcsjActual() == null) | |
| 832 | - sch = temp; | |
| 831 | + if (temp.getFcsjActual() == null) { | |
| 832 | + sch = temp; | |
| 833 | + break; | |
| 834 | + } | |
| 833 | 835 | } |
| 834 | 836 | |
| 835 | 837 | return sch; | ... | ... |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| ... | ... | @@ -89,12 +89,12 @@ public class FormsServiceImpl implements FormsService { |
| 89 | 89 | String date=map.get("date").toString(); |
| 90 | 90 | |
| 91 | 91 | String sql="select " |
| 92 | - + " r.cl_zbh,r.j_gh,r.j_name" | |
| 92 | + + " r.cl_zbh,r.j_gh" | |
| 93 | 93 | + " from bsth_c_s_sp_info_real r where " |
| 94 | 94 | + " r.schedule_date_str = '"+date+"'" |
| 95 | 95 | + " and r.xl_bm = '"+line+"' " |
| 96 | - + " group by " | |
| 97 | - + " r.cl_zbh,r.j_gh,r.j_name"; | |
| 96 | + + " group by " | |
| 97 | + + " r.cl_zbh,r.j_gh"; | |
| 98 | 98 | |
| 99 | 99 | List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { |
| 100 | 100 | |
| ... | ... | @@ -102,7 +102,7 @@ public class FormsServiceImpl implements FormsService { |
| 102 | 102 | public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 103 | 103 | Waybillday w=new Waybillday(); |
| 104 | 104 | w.setJgh(arg0.getString("j_gh")); |
| 105 | - w.setjName(arg0.getString("j_name")); | |
| 105 | +// w.setjName(arg0.getString("j_name")); | |
| 106 | 106 | w.setNbbm(arg0.getString("cl_zbh")); |
| 107 | 107 | return w; |
| 108 | 108 | |
| ... | ... | @@ -118,14 +118,19 @@ public class FormsServiceImpl implements FormsService { |
| 118 | 118 | for (int j = 0; j < realList.size(); j++) { |
| 119 | 119 | ScheduleRealInfo s=realList.get(j); |
| 120 | 120 | if(w.getNbbm().equals(s.getClZbh()) && w.getJgh().equals(s.getjGh())){ |
| 121 | - Set<ChildTaskPlan> cts = s.getcTasks(); | |
| 122 | - if(cts != null && cts.size() > 0){ | |
| 121 | + Set<ChildTaskPlan> cts = s.getcTasks(); | |
| 122 | + if(cts != null && cts.size() > 0){ | |
| 123 | + listInfo.add(s); | |
| 124 | + }else{ | |
| 125 | + if(s.getZdsjActual()!=null && s.getFcsjActual()!=null){ | |
| 123 | 126 | listInfo.add(s); |
| 124 | - }else{ | |
| 125 | - if(s.getZdsjActual()!=null && s.getFcsjActual()!=null){ | |
| 126 | - listInfo.add(s); | |
| 127 | - } | |
| 128 | 127 | } |
| 128 | + } | |
| 129 | + | |
| 130 | + if((w.getjName() == null || w.getjName().trim().length() == 0) | |
| 131 | + && s.getjName() != null && s.getjName().length() > 0){ | |
| 132 | + w.setjName(s.getjName()); | |
| 133 | + } | |
| 129 | 134 | } |
| 130 | 135 | } |
| 131 | 136 | |
| ... | ... | @@ -255,11 +260,11 @@ public class FormsServiceImpl implements FormsService { |
| 255 | 260 | } |
| 256 | 261 | String sql ="select "; |
| 257 | 262 | if(empnames.equals("驾驶员")){ |
| 258 | - sql += " r.j_name,r.j_gh "; | |
| 263 | + sql += " r.j_gh "; | |
| 259 | 264 | }else if(empnames.equals("售票员")){ |
| 260 | - sql += " r.s_gh,r.s_name"; | |
| 265 | + sql += " r.s_gh "; | |
| 261 | 266 | }else{ |
| 262 | - sql += " r.cl_zbh"; | |
| 267 | + sql += " r.cl_zbh "; | |
| 263 | 268 | } |
| 264 | 269 | sql += " from bsth_c_s_sp_info_real r where " |
| 265 | 270 | + " r.schedule_date_str >= '" + map.get("startDate").toString() + "' " |
| ... | ... | @@ -271,9 +276,9 @@ public class FormsServiceImpl implements FormsService { |
| 271 | 276 | |
| 272 | 277 | if(empnames.equals("驾驶员")){ |
| 273 | 278 | sql += " GROUP BY " |
| 274 | - + "r.j_name,r.j_gh"; | |
| 279 | + + " r.j_gh "; | |
| 275 | 280 | }else if(empnames.equals("售票员")){ |
| 276 | - sql+="and r.s_name is not null AND r.s_name !='' GROUP BY r.s_gh,r.s_name"; | |
| 281 | + sql+="and r.s_gh is not null AND r.s_gh !='' GROUP BY r.s_gh"; | |
| 277 | 282 | }else{ |
| 278 | 283 | sql += " GROUP BY r.cl_zbh"; |
| 279 | 284 | } |
| ... | ... | @@ -284,17 +289,14 @@ public class FormsServiceImpl implements FormsService { |
| 284 | 289 | public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 285 | 290 | Shiftuehiclemanth shif = new Shiftuehiclemanth(); |
| 286 | 291 | if(empnames.equals("驾驶员")){ |
| 287 | - shif.setjName(arg0.getString("j_name")+"/"+arg0.getString("j_gh")); | |
| 292 | +// shif.setjName(arg0.getString("j_name")+"/"+arg0.getString("j_gh")); | |
| 288 | 293 | shif.setJgh(arg0.getString("j_gh")); |
| 289 | 294 | }else if(empnames.equals("售票员")){ |
| 290 | - shif.setjName(arg0.getString("s_name")+"/"+arg0.getString("s_gh")); | |
| 295 | +// shif.setjName(arg0.getString("s_name")+"/"+arg0.getString("s_gh")); | |
| 291 | 296 | shif.setSgh(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh")); |
| 292 | 297 | }else if(empnames.equals("车辆自编号")){ |
| 293 | 298 | shif.setjName(arg0.getString("cl_zbh")); |
| 294 | 299 | } |
| 295 | -// shif.setJgh(arg0.getString("j_gh")); | |
| 296 | -// shif.setZbh(arg0.getString("cl_zbh")); | |
| 297 | -// shif.setjName(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh")); | |
| 298 | 300 | return shif; |
| 299 | 301 | } |
| 300 | 302 | }); |
| ... | ... | @@ -322,7 +324,11 @@ public class FormsServiceImpl implements FormsService { |
| 322 | 324 | list_s.add(s); |
| 323 | 325 | } |
| 324 | 326 | } |
| 325 | - | |
| 327 | + | |
| 328 | + if((d.getjName() == null || d.getjName().trim().length() == 0) | |
| 329 | + && s.getjName() != null && s.getjName().length() > 0){ | |
| 330 | + d.setjName(s.getjName() + "/" + d.getJgh()); | |
| 331 | + } | |
| 326 | 332 | } |
| 327 | 333 | }else if(empnames.equals("售票员")){ |
| 328 | 334 | String sgh=s.getsGh()==null?"":s.getsGh(); |
| ... | ... | @@ -336,6 +342,11 @@ public class FormsServiceImpl implements FormsService { |
| 336 | 342 | list_s.add(s); |
| 337 | 343 | } |
| 338 | 344 | } |
| 345 | + | |
| 346 | + if((d.getjName() == null || d.getjName().trim().length() == 0) | |
| 347 | + && s.getjName() != null && s.getjName().length() > 0){ | |
| 348 | + d.setjName(s.getsName() + "/" + d.getSgh()); | |
| 349 | + } | |
| 339 | 350 | } |
| 340 | 351 | }else if(empnames.equals("车辆自编号")){ |
| 341 | 352 | if(d.getjName().equals(s.getClZbh())){ |
| ... | ... | @@ -413,19 +424,19 @@ public class FormsServiceImpl implements FormsService { |
| 413 | 424 | final String empnames=map.get("empnames").toString(); |
| 414 | 425 | String gsdmManth=""; |
| 415 | 426 | String fgsdmManth=""; |
| 416 | - if(map.get("gsdmManth")!=null){ | |
| 427 | + if(map.get("gsdmManth") != null){ | |
| 417 | 428 | gsdmManth=map.get("gsdmManth").toString(); |
| 418 | 429 | } |
| 419 | - if(map.get("fgsdmManth")!=null){ | |
| 430 | + if(map.get("fgsdmManth") != null){ | |
| 420 | 431 | fgsdmManth=map.get("fgsdmManth").toString(); |
| 421 | 432 | } |
| 422 | 433 | String sql ="select "; |
| 423 | 434 | if(empnames.equals("驾驶员")){ |
| 424 | - sql += " r.j_name,r.j_gh "; | |
| 435 | + sql += " r.j_gh "; | |
| 425 | 436 | }else if(empnames.equals("售票员")){ |
| 426 | - sql += " r.s_gh,r.s_name"; | |
| 437 | + sql += " r.s_gh "; | |
| 427 | 438 | }else{ |
| 428 | - sql += " r.cl_zbh"; | |
| 439 | + sql += " r.cl_zbh "; | |
| 429 | 440 | } |
| 430 | 441 | sql += " from bsth_c_s_sp_info_real r where " |
| 431 | 442 | + " r.schedule_date_str >= '" + map.get("startDate").toString() + "' " |
| ... | ... | @@ -437,9 +448,9 @@ public class FormsServiceImpl implements FormsService { |
| 437 | 448 | |
| 438 | 449 | if(empnames.equals("驾驶员")){ |
| 439 | 450 | sql += " GROUP BY " |
| 440 | - + "r.j_name,r.j_gh"; | |
| 451 | + + " r.j_gh "; | |
| 441 | 452 | }else if(empnames.equals("售票员")){ |
| 442 | - sql+="and r.s_name is not null AND r.s_name !='' GROUP BY r.s_gh,r.s_name"; | |
| 453 | + sql+="and r.s_gh is not null AND r.s_gh !='' GROUP BY r.s_gh"; | |
| 443 | 454 | }else{ |
| 444 | 455 | sql += " GROUP BY r.cl_zbh"; |
| 445 | 456 | } |
| ... | ... | @@ -450,17 +461,14 @@ public class FormsServiceImpl implements FormsService { |
| 450 | 461 | public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 451 | 462 | Shiftuehiclemanth shif = new Shiftuehiclemanth(); |
| 452 | 463 | if(empnames.equals("驾驶员")){ |
| 453 | - shif.setjName(arg0.getString("j_name")+"/"+arg0.getString("j_gh")); | |
| 464 | +// shif.setjName(arg0.getString("j_name")+"/"+arg0.getString("j_gh")); | |
| 454 | 465 | shif.setJgh(arg0.getString("j_gh")); |
| 455 | 466 | }else if(empnames.equals("售票员")){ |
| 456 | - shif.setjName(arg0.getString("s_name")+"/"+arg0.getString("s_gh")); | |
| 467 | +// shif.setjName(arg0.getString("s_name")+"/"+arg0.getString("s_gh")); | |
| 457 | 468 | shif.setSgh(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh")); |
| 458 | 469 | }else if(empnames.equals("车辆自编号")){ |
| 459 | 470 | shif.setjName(arg0.getString("cl_zbh")); |
| 460 | 471 | } |
| 461 | -// shif.setJgh(arg0.getString("j_gh")); | |
| 462 | -// shif.setZbh(arg0.getString("cl_zbh")); | |
| 463 | -// shif.setjName(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh")); | |
| 464 | 472 | return shif; |
| 465 | 473 | } |
| 466 | 474 | }); |
| ... | ... | @@ -488,7 +496,11 @@ public class FormsServiceImpl implements FormsService { |
| 488 | 496 | list_s.add(s); |
| 489 | 497 | } |
| 490 | 498 | } |
| 491 | - | |
| 499 | + | |
| 500 | + if((d.getjName() == null || d.getjName().trim().length() == 0) | |
| 501 | + && s.getjName() != null && s.getjName().length() > 0){ | |
| 502 | + d.setjName(s.getjName() + "/" + d.getJgh()); | |
| 503 | + } | |
| 492 | 504 | } |
| 493 | 505 | }else if(empnames.equals("售票员")){ |
| 494 | 506 | String sgh=s.getsGh()==null?"":s.getsGh(); |
| ... | ... | @@ -502,6 +514,11 @@ public class FormsServiceImpl implements FormsService { |
| 502 | 514 | list_s.add(s); |
| 503 | 515 | } |
| 504 | 516 | } |
| 517 | + | |
| 518 | + if((d.getjName() == null || d.getjName().trim().length() == 0) | |
| 519 | + && s.getjName() != null && s.getjName().length() > 0){ | |
| 520 | + d.setjName(s.getsName() + "/" + d.getSgh()); | |
| 521 | + } | |
| 505 | 522 | } |
| 506 | 523 | }else if(empnames.equals("车辆自编号")){ |
| 507 | 524 | if(d.getjName().equals(s.getClZbh())){ |
| ... | ... | @@ -885,7 +902,7 @@ public class FormsServiceImpl implements FormsService { |
| 885 | 902 | List<Singledata> list_=new ArrayList<Singledata>(); |
| 886 | 903 | if(tjtype.equals("jsy")){ |
| 887 | 904 | //油统计 |
| 888 | - String sql="select r.j_gh, r.xl_bm,r.cl_zbh,r.j_name,r.fgs_bm" | |
| 905 | + String sql="select r.j_gh, r.xl_bm,r.cl_zbh,r.fgs_bm" | |
| 889 | 906 | + " from bsth_c_s_sp_info_real r where " |
| 890 | 907 | + " r.schedule_date_str = '"+startDate+"'"; |
| 891 | 908 | if(xlbm.length() != 0){ |
| ... | ... | @@ -897,7 +914,7 @@ public class FormsServiceImpl implements FormsService { |
| 897 | 914 | if(fgsdm.length() != 0){ |
| 898 | 915 | sql += " and r.fgs_bm ='"+fgsdm+"'"; |
| 899 | 916 | } |
| 900 | - sql += " group by r.fgs_bm,r.j_gh,r.xl_bm,r.cl_zbh,r.j_name " + | |
| 917 | + sql += " group by r.fgs_bm,r.j_gh,r.xl_bm,r.cl_zbh " + | |
| 901 | 918 | "order by r.xl_bm,r.cl_zbh"; |
| 902 | 919 | |
| 903 | 920 | |
| ... | ... | @@ -907,7 +924,7 @@ public class FormsServiceImpl implements FormsService { |
| 907 | 924 | Singledata sin = new Singledata(); |
| 908 | 925 | sin.setxL(arg0.getString("xl_bm")); |
| 909 | 926 | sin.setJsy(arg0.getString("j_gh")); |
| 910 | - sin.setjName(arg0.getString("j_name")); | |
| 927 | +// sin.setjName(arg0.getString("j_name")); | |
| 911 | 928 | sin.setClzbh(arg0.getString("cl_zbh")); |
| 912 | 929 | sin.setgS(arg0.getString("fgs_bm")); |
| 913 | 930 | return sin; |
| ... | ... | @@ -968,7 +985,7 @@ public class FormsServiceImpl implements FormsService { |
| 968 | 985 | if(fages){ |
| 969 | 986 | Singledata s=new Singledata(); |
| 970 | 987 | s.setJsy(jsy); |
| 971 | - s.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); | |
| 988 | +// s.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); | |
| 972 | 989 | s.setClzbh(clzbh); |
| 973 | 990 | s.setSgh(""); |
| 974 | 991 | s.setsName(""); |
| ... | ... | @@ -1023,6 +1040,11 @@ public class FormsServiceImpl implements FormsService { |
| 1023 | 1040 | newList_.add(s); |
| 1024 | 1041 | } |
| 1025 | 1042 | } |
| 1043 | + | |
| 1044 | + if((sin.getjName() == null || sin.getjName().trim().length() == 0) | |
| 1045 | + && s.getjName() != null && s.getjName().length() > 0){ | |
| 1046 | + sin.setjName(s.getjName()); | |
| 1047 | + } | |
| 1026 | 1048 | } |
| 1027 | 1049 | } |
| 1028 | 1050 | double jhgl=culateMileageService.culateJhgl(newList); |
| ... | ... | @@ -1034,12 +1056,15 @@ public class FormsServiceImpl implements FormsService { |
| 1034 | 1056 | |
| 1035 | 1057 | double zyygl=Arith.add(yygl, ljgl); |
| 1036 | 1058 | double zksgl=Arith.add(ksgl, jcgl); |
| 1059 | + | |
| 1060 | + if(sin.getjName() == null || sin.getjName().trim().length() == 0){ | |
| 1061 | + sin.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); | |
| 1062 | + } | |
| 1037 | 1063 | sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl))); |
| 1038 | 1064 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 1039 | 1065 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 1040 | 1066 | sin.setXlmc(BasicData.lineCode2NameMap.get(line)); |
| 1041 | 1067 | sin.setrQ(startDate); |
| 1042 | -// sin.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); | |
| 1043 | 1068 | sin.setSgh(""); |
| 1044 | 1069 | sin.setsName(""); |
| 1045 | 1070 | sin.setgS(BasicData.businessFgsCodeNameMap.get(sin.getgS()+"_"+gsdm)); |
| ... | ... | @@ -1180,7 +1205,7 @@ public class FormsServiceImpl implements FormsService { |
| 1180 | 1205 | List<Singledata> list_=new ArrayList<Singledata>(); |
| 1181 | 1206 | if(tjtype.equals("jsy")){ |
| 1182 | 1207 | //油统计 |
| 1183 | - String sql="select r.j_gh, r.xl_bm,r.cl_zbh,r.j_name" | |
| 1208 | + String sql="select r.j_gh, r.xl_bm,r.cl_zbh" | |
| 1184 | 1209 | + " from bsth_c_s_sp_info_real r where " |
| 1185 | 1210 | + " r.schedule_date_str = '"+startDate+"'"; |
| 1186 | 1211 | if(!xlbm.equals("")){ |
| ... | ... | @@ -1192,14 +1217,14 @@ public class FormsServiceImpl implements FormsService { |
| 1192 | 1217 | if(!fgsdm.equals("")){ |
| 1193 | 1218 | sql += " and r.fgs_bm='"+fgsdm+"'"; |
| 1194 | 1219 | } |
| 1195 | - sql += " group by r.j_gh,r.xl_bm,r.cl_zbh,r.j_name order by r.xl_bm,r.cl_zbh"; | |
| 1220 | + sql += " group by r.j_gh,r.xl_bm,r.cl_zbh order by r.xl_bm,r.cl_zbh"; | |
| 1196 | 1221 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 1197 | 1222 | @Override |
| 1198 | 1223 | public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 1199 | 1224 | Singledata sin = new Singledata(); |
| 1200 | 1225 | sin.setxL(arg0.getString("xl_bm")); |
| 1201 | 1226 | sin.setJsy(arg0.getString("j_gh")); |
| 1202 | - sin.setjName(arg0.getString("j_name")); | |
| 1227 | +// sin.setjName(arg0.getString("j_name")); | |
| 1203 | 1228 | sin.setClzbh(arg0.getString("cl_zbh")); |
| 1204 | 1229 | return sin; |
| 1205 | 1230 | } |
| ... | ... | @@ -1310,6 +1335,11 @@ public class FormsServiceImpl implements FormsService { |
| 1310 | 1335 | newList_.add(s); |
| 1311 | 1336 | } |
| 1312 | 1337 | } |
| 1338 | + | |
| 1339 | + if((sin.getjName() == null || sin.getjName().trim().length() == 0) | |
| 1340 | + && s.getjName() != null && s.getjName().length() > 0){ | |
| 1341 | + sin.setjName(s.getjName()); | |
| 1342 | + } | |
| 1313 | 1343 | } |
| 1314 | 1344 | } |
| 1315 | 1345 | double jhgl=culateMileageService.culateJhgl(newList); |
| ... | ... | @@ -1319,6 +1349,9 @@ public class FormsServiceImpl implements FormsService { |
| 1319 | 1349 | double ksgl=culateMileageService.culateKsgl(newList_); |
| 1320 | 1350 | double jcgl=culateMileageService.culateJccgl(newList_); |
| 1321 | 1351 | |
| 1352 | + if(sin.getjName() == null || sin.getjName().trim().length() == 0){ | |
| 1353 | + sin.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); | |
| 1354 | + } | |
| 1322 | 1355 | double zyygl=Arith.add(yygl, ljgl); |
| 1323 | 1356 | double zksgl=Arith.add(ksgl, jcgl); |
| 1324 | 1357 | sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl))); |
| ... | ... | @@ -1326,7 +1359,6 @@ public class FormsServiceImpl implements FormsService { |
| 1326 | 1359 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 1327 | 1360 | sin.setXlmc(BasicData.lineCode2NameMap.get(line)); |
| 1328 | 1361 | sin.setrQ(startDate); |
| 1329 | -// sin.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); | |
| 1330 | 1362 | sin.setSgh(""); |
| 1331 | 1363 | sin.setsName(""); |
| 1332 | 1364 | sin.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); |
| ... | ... | @@ -1335,7 +1367,7 @@ public class FormsServiceImpl implements FormsService { |
| 1335 | 1367 | } |
| 1336 | 1368 | Collections.sort(list_,new SingledataByXlbm()); |
| 1337 | 1369 | }else{ |
| 1338 | - String sql="select r.s_gh,r.s_name, " | |
| 1370 | + String sql="select r.s_gh, " | |
| 1339 | 1371 | + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" |
| 1340 | 1372 | + " from bsth_c_s_sp_info_real r where " |
| 1341 | 1373 | + " r.schedule_date_str = '"+startDate+"'" |
| ... | ... | @@ -1349,7 +1381,7 @@ public class FormsServiceImpl implements FormsService { |
| 1349 | 1381 | if(!fgsdm.equals("")){ |
| 1350 | 1382 | sql += " and r.fgs_bm='"+fgsdm+"'"; |
| 1351 | 1383 | } |
| 1352 | - sql += " group by r.s_gh,r.s_name," | |
| 1384 | + sql += " group by r.s_gh," | |
| 1353 | 1385 | + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; |
| 1354 | 1386 | |
| 1355 | 1387 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| ... | ... | @@ -1361,7 +1393,7 @@ public class FormsServiceImpl implements FormsService { |
| 1361 | 1393 | sin.setxL(arg0.getString("xl_bm")); |
| 1362 | 1394 | sin.setClzbh(arg0.getString("cl_zbh")); |
| 1363 | 1395 | sin.setSgh(arg0.getString("s_gh")); |
| 1364 | - sin.setsName(arg0.getString("s_name")); | |
| 1396 | +// sin.setsName(arg0.getString("s_name")); | |
| 1365 | 1397 | return sin; |
| 1366 | 1398 | } |
| 1367 | 1399 | }); |
| ... | ... | @@ -1387,6 +1419,11 @@ public class FormsServiceImpl implements FormsService { |
| 1387 | 1419 | newList_.add(s); |
| 1388 | 1420 | } |
| 1389 | 1421 | } |
| 1422 | + | |
| 1423 | + if((sin.getsName() == null || sin.getsName().trim().length() == 0) | |
| 1424 | + && s.getsName() != null && s.getsName().length() > 0){ | |
| 1425 | + sin.setsName(s.getsName()); | |
| 1426 | + } | |
| 1390 | 1427 | } |
| 1391 | 1428 | } |
| 1392 | 1429 | double jhgl=culateMileageService.culateJhgl(newList); |
| ... | ... | @@ -1404,6 +1441,9 @@ public class FormsServiceImpl implements FormsService { |
| 1404 | 1441 | double zksgl=culateMileageService.culateSjfyylc_spy(newList_); |
| 1405 | 1442 | sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl))); |
| 1406 | 1443 | |
| 1444 | + if(sin.getsName() == null || sin.getsName().trim().length() == 0){ | |
| 1445 | + sin.setsName(BasicData.allPerson.get(gsdm+"-"+jsy)); | |
| 1446 | + } | |
| 1407 | 1447 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 1408 | 1448 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 1409 | 1449 | sin.setXlmc(BasicData.lineCode2NameMap.get(line)); |
| ... | ... | @@ -1730,7 +1770,7 @@ public class FormsServiceImpl implements FormsService { |
| 1730 | 1770 | startDate = map.get("startDate").toString(); |
| 1731 | 1771 | |
| 1732 | 1772 | String sql="select r.s_gh,r.s_name, " |
| 1733 | - + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm,xl_name" | |
| 1773 | + + " r.xl_bm,r.cl_zbh,r.j_gh,r.gs_bm,r.fgs_bm,xl_name" | |
| 1734 | 1774 | + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+startDate+"'"; |
| 1735 | 1775 | if(!xlbm.equals("")){ |
| 1736 | 1776 | sql += " and r.xl_bm = '"+xlbm+"'"; |
| ... | ... | @@ -1742,7 +1782,7 @@ public class FormsServiceImpl implements FormsService { |
| 1742 | 1782 | sql += " and r.fgs_bm='"+fgsdm+"'"; |
| 1743 | 1783 | } |
| 1744 | 1784 | sql += " group by r.s_gh,r.s_name," |
| 1745 | - + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm,xl_name order by r.xl_bm,r.cl_zbh"; | |
| 1785 | + + " r.xl_bm,r.cl_zbh,r.j_gh,r.gs_bm,r.fgs_bm,xl_name order by r.xl_bm,r.cl_zbh"; | |
| 1746 | 1786 | |
| 1747 | 1787 | List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 1748 | 1788 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| ... | ... | @@ -1753,7 +1793,7 @@ public class FormsServiceImpl implements FormsService { |
| 1753 | 1793 | sin.setxL(arg0.getString("xl_bm")); |
| 1754 | 1794 | sin.setClzbh(arg0.getString("cl_zbh")); |
| 1755 | 1795 | sin.setJsy(arg0.getString("j_gh")); |
| 1756 | - sin.setjName(arg0.getString("j_name")); | |
| 1796 | +// sin.setjName(arg0.getString("j_name")); | |
| 1757 | 1797 | sin.setSgh(arg0.getString("s_gh")); |
| 1758 | 1798 | sin.setsName(arg0.getString("s_name")); |
| 1759 | 1799 | sin.setXlmc(arg0.getString("xl_name")); |
| ... | ... | @@ -1780,6 +1820,11 @@ public class FormsServiceImpl implements FormsService { |
| 1780 | 1820 | if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh) |
| 1781 | 1821 | &&s.getXlBm().equals(xl)&&s.getsGh().equals(spy)){ |
| 1782 | 1822 | newList.add(s); |
| 1823 | + | |
| 1824 | + if((sin.getjName() == null || sin.getjName().trim().length() == 0) | |
| 1825 | + && s.getjName() != null && s.getjName().length() > 0){ | |
| 1826 | + sin.setjName(s.getjName()); | |
| 1827 | + } | |
| 1783 | 1828 | } |
| 1784 | 1829 | } |
| 1785 | 1830 | |
| ... | ... | @@ -2442,8 +2487,6 @@ public class FormsServiceImpl implements FormsService { |
| 2442 | 2487 | sql += " group by r.gs_bm, r.fgs_bm, r.xl_bm " + |
| 2443 | 2488 | "order by r.gs_bm, r.fgs_bm, r.xl_bm"; |
| 2444 | 2489 | |
| 2445 | - System.out.println(sql); | |
| 2446 | - | |
| 2447 | 2490 | List<Operationservice> query = jdbcTemplate.query(sql, new RowMapper<Operationservice>() { |
| 2448 | 2491 | @Override |
| 2449 | 2492 | public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { |
| ... | ... | @@ -2605,10 +2648,10 @@ public class FormsServiceImpl implements FormsService { |
| 2605 | 2648 | public List<Vehicleloading> vehicleloading(String line, String date) { |
| 2606 | 2649 | |
| 2607 | 2650 | String sql="select r.s_gh,r.s_name, " |
| 2608 | - + " r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm" | |
| 2651 | + + " r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.gs_bm,r.fgs_bm" | |
| 2609 | 2652 | + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+date+"' " |
| 2610 | 2653 | + " and r.xl_bm = '"+line+"' group by r.s_gh,r.s_name," |
| 2611 | - + " r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm"; | |
| 2654 | + + " r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.gs_bm,r.fgs_bm"; | |
| 2612 | 2655 | |
| 2613 | 2656 | List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() { |
| 2614 | 2657 | @Override |
| ... | ... | @@ -3089,7 +3132,7 @@ public class FormsServiceImpl implements FormsService { |
| 3089 | 3132 | + " on t.cl_zbh = x.nbbm and t.j_gh=x.jsy";*/ |
| 3090 | 3133 | |
| 3091 | 3134 | String sql="select r.schedule_date_str, " |
| 3092 | - + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm" | |
| 3135 | + + " r.xl_bm,r.cl_zbh,r.j_gh,r.gs_bm,r.fgs_bm" | |
| 3093 | 3136 | + " from bsth_c_s_sp_info_real r where " |
| 3094 | 3137 | + "r.schedule_date_str = '"+map.get("date").toString()+"'"; |
| 3095 | 3138 | if(!xlbm.equals("")){ |
| ... | ... | @@ -3101,8 +3144,8 @@ public class FormsServiceImpl implements FormsService { |
| 3101 | 3144 | if(!fgsbm.equals("")){ |
| 3102 | 3145 | sql += " and r.fgs_bm='"+fgsbm+"'"; |
| 3103 | 3146 | } |
| 3104 | - sql += " group by r.schedule_date_str," | |
| 3105 | - + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | |
| 3147 | + sql += " group by r.schedule_date_str," | |
| 3148 | + + " r.xl_bm,r.cl_zbh,r.j_gh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | |
| 3106 | 3149 | |
| 3107 | 3150 | List<Daily> list = jdbcTemplate.query(sql, new RowMapper<Daily>() { |
| 3108 | 3151 | @Override |
| ... | ... | @@ -3111,7 +3154,7 @@ public class FormsServiceImpl implements FormsService { |
| 3111 | 3154 | daily.setRq(arg0.getString("schedule_date_str")); |
| 3112 | 3155 | daily.setZbh(arg0.getString("cl_zbh")); |
| 3113 | 3156 | daily.setJgh(arg0.getString("j_gh")); |
| 3114 | - daily.setjName(arg0.getString("j_name")); | |
| 3157 | +// daily.setjName(arg0.getString("j_name")); | |
| 3115 | 3158 | return daily; |
| 3116 | 3159 | } |
| 3117 | 3160 | }); |
| ... | ... | @@ -3140,15 +3183,19 @@ public class FormsServiceImpl implements FormsService { |
| 3140 | 3183 | for (int j = 0; j < lists.size(); j++) { |
| 3141 | 3184 | ScheduleRealInfo s=lists.get(j); |
| 3142 | 3185 | if(d.getJgh().equals(s.getjGh()) && d.getZbh().equals(s.getClZbh())){ |
| 3143 | - Set<ChildTaskPlan> cts = s.getcTasks(); | |
| 3144 | - if(cts != null && cts.size() > 0){ | |
| 3186 | + Set<ChildTaskPlan> cts = s.getcTasks(); | |
| 3187 | + if(cts != null && cts.size() > 0){ | |
| 3188 | + sList.add(s); | |
| 3189 | + }else{ | |
| 3190 | + if(s.getZdsjActual()!=null && s.getFcsjActual()!=null){ | |
| 3145 | 3191 | sList.add(s); |
| 3146 | - }else{ | |
| 3147 | - if(s.getZdsjActual()!=null && s.getFcsjActual()!=null){ | |
| 3148 | - sList.add(s); | |
| 3149 | - } | |
| 3150 | 3192 | } |
| 3151 | - | |
| 3193 | + } | |
| 3194 | + | |
| 3195 | + if((d.getjName() == null || d.getjName().trim().length() == 0) | |
| 3196 | + && s.getjName() != null && s.getjName().length() > 0){ | |
| 3197 | + d.setjName(s.getjName()); | |
| 3198 | + } | |
| 3152 | 3199 | } |
| 3153 | 3200 | } |
| 3154 | 3201 | ... | ... |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| ... | ... | @@ -47,7 +47,6 @@ import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 47 | 47 | import com.bsth.service.BusIntervalService; |
| 48 | 48 | import com.bsth.service.LineService; |
| 49 | 49 | import com.bsth.service.report.CulateMileageService; |
| 50 | -import com.bsth.service.schedule.PeopleCarPlanService; | |
| 51 | 50 | import com.bsth.service.sys.DictionaryService; |
| 52 | 51 | import com.bsth.service.sys.DutyEmployeeService; |
| 53 | 52 | import com.bsth.util.Arith; |
| ... | ... | @@ -69,9 +68,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 69 | 68 | CulateMileageService culateService; |
| 70 | 69 | |
| 71 | 70 | @Autowired |
| 72 | - private PeopleCarPlanService peopleCarPlanService; | |
| 73 | - | |
| 74 | - @Autowired | |
| 75 | 71 | private ScheduleRealInfoRepository scheduleRealInfoRepository; |
| 76 | 72 | |
| 77 | 73 | @Autowired |
| ... | ... | @@ -103,33 +99,47 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 103 | 99 | |
| 104 | 100 | try { |
| 105 | 101 | |
| 106 | - String sql = "select * from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'"; | |
| 102 | + List<String> objList = new ArrayList<String>(); | |
| 103 | + String sql = "select * from bsth_c_s_sp_info_real where " + | |
| 104 | + "schedule_date_str >= ? and schedule_date_str <= ? " + | |
| 105 | + "and fcsj >= ? and fcsj <= ? and gs_bm like ? and fgs_bm like ? " + | |
| 106 | + "and bc_type != ? and bc_type != ? and bc_type != ?"; | |
| 107 | 107 | if(line.length() != 0){ |
| 108 | - sql += " and xl_bm = '"+line+"'"; | |
| 109 | - } | |
| 110 | - if(times.length() != 0){ | |
| 111 | - String[] split = times.split("-"); | |
| 112 | - String[] split0 = split[0].split(":"); | |
| 113 | - String[] split1 = split[1].split(":"); | |
| 114 | - int time0 = Integer.valueOf(split0[0])*60 + Integer.valueOf(split0[1]); | |
| 115 | - int time1 = Integer.valueOf(split1[0])*60 + Integer.valueOf(split1[1]); | |
| 116 | - if(time1 > time0){ | |
| 117 | - sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; | |
| 118 | - } else { | |
| 119 | - sql += " and (fcsj >= '"+split[0]+"' or fcsj <= '"+split[1]+"')"; | |
| 120 | - } | |
| 121 | - } | |
| 122 | - if(company.length() != 0){ | |
| 123 | - sql += " and gs_bm = '"+company+"'"; | |
| 108 | + sql = "select * from bsth_c_s_sp_info_real where xl_bm = ? " + | |
| 109 | + "and schedule_date_str >= ? and schedule_date_str <= ? " + | |
| 110 | + "and fcsj >= ? and fcsj <= ? and gs_bm like ? and fgs_bm like ? " + | |
| 111 | + "and bc_type != ? and bc_type != ? and bc_type != ?"; | |
| 112 | + objList.add(line); | |
| 113 | + } | |
| 114 | + objList.add(startDate); | |
| 115 | + objList.add(endDate); | |
| 116 | + | |
| 117 | + String[] split = times.split("-"); | |
| 118 | + if(split[0].length() > 0){ | |
| 119 | + objList.add(split[0]); | |
| 120 | + } else { | |
| 121 | + objList.add(""); | |
| 124 | 122 | } |
| 125 | - if(subCompany.length() != 0){ | |
| 126 | - sql += " and fgs_bm = '"+subCompany+"'"; | |
| 123 | + if(split.length > 1 && split[1].length() > 0){ | |
| 124 | + objList.add(split[1]); | |
| 125 | + } else { | |
| 126 | + objList.add("23:59"); | |
| 127 | 127 | } |
| 128 | + | |
| 129 | + objList.add("%" + company + "%"); | |
| 130 | + objList.add("%" + subCompany + "%"); | |
| 131 | + | |
| 128 | 132 | if(normal){ |
| 129 | - sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 133 | + objList.add("in"); | |
| 134 | + objList.add("out"); | |
| 135 | + objList.add("ldks"); | |
| 136 | + } else { | |
| 137 | + objList.add(""); | |
| 138 | + objList.add(""); | |
| 139 | + objList.add(""); | |
| 130 | 140 | } |
| 131 | - | |
| 132 | - list = jdbcTemplate.query(sql, | |
| 141 | + | |
| 142 | + list = jdbcTemplate.query(sql, objList.toArray(new Object[objList.size()]), | |
| 133 | 143 | new RowMapper<ScheduleRealInfo>(){ |
| 134 | 144 | @Override |
| 135 | 145 | public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -225,14 +235,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 225 | 235 | }); |
| 226 | 236 | |
| 227 | 237 | if(model.length() != 0){ |
| 228 | -// sql = "select * from bsth_c_s_ttinfo_detail where ttinfo = '"+model+"' and bc_type != 'in' and bc_type != 'out'"; | |
| 229 | - sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out'" + | |
| 230 | - " and bc_type != 'ldks' and schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'"; | |
| 231 | - if(line.length() != 0){ | |
| 232 | - sql += " and xl_bm = '"+line+"'"; | |
| 233 | - } | |
| 238 | + sql = "select id from bsth_c_s_sp_info where tt_info = ?" + | |
| 239 | + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'" + | |
| 240 | + " and schedule_date >= ? and schedule_date <= ? and xl_bm = ?"; | |
| 234 | 241 | |
| 235 | - ttList = jdbcTemplate.query(sql, | |
| 242 | + ttList = jdbcTemplate.query(sql, new Object[]{model, startDate, endDate, line}, | |
| 236 | 243 | new RowMapper<Long>(){ |
| 237 | 244 | @Override |
| 238 | 245 | public Long mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -308,15 +315,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 308 | 315 | |
| 309 | 316 | String sql = "select id,cc_id,mileage_type,destroy,destroy_reason," + |
| 310 | 317 | " mileage,type1,type2,schedule from bsth_c_s_child_task" + |
| 311 | - " where 1=1"; | |
| 312 | - if(schedule1 != null && schedule1 >= 0){ | |
| 313 | - sql += " and schedule >= '"+schedule1+"'"; | |
| 314 | - } | |
| 315 | - if(schedule2 != null && schedule2 >= 0){ | |
| 316 | - sql += " and schedule <= '"+schedule2+"'"; | |
| 317 | - } | |
| 318 | + " where schedule >= ? and schedule <= ?"; | |
| 318 | 319 | |
| 319 | - list = jdbcTemplate.query(sql, | |
| 320 | + list = jdbcTemplate.query(sql, new Object[]{schedule1, schedule2}, | |
| 320 | 321 | new RowMapper<ChildTaskPlan>(){ |
| 321 | 322 | @Override |
| 322 | 323 | public ChildTaskPlan mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -358,9 +359,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 358 | 359 | |
| 359 | 360 | try { |
| 360 | 361 | |
| 361 | - String sql = "select start_station_name, end_station_name from bsth_c_line where line_code = '"+line+"'"; | |
| 362 | + String sql = "select start_station_name, end_station_name from bsth_c_line where line_code = ?"; | |
| 362 | 363 | |
| 363 | - list = jdbcTemplate.query(sql, | |
| 364 | + list = jdbcTemplate.query(sql, new Object[]{line}, | |
| 364 | 365 | new RowMapper<Map<String, Object>>(){ |
| 365 | 366 | @Override |
| 366 | 367 | public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -393,19 +394,16 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 393 | 394 | List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); |
| 394 | 395 | |
| 395 | 396 | String line = map.get("line").toString(); |
| 396 | - String ttId = map.get("ttId").toString(); | |
| 397 | +// String ttId = map.get("ttId").toString(); | |
| 397 | 398 | |
| 398 | 399 | try { |
| 399 | - String sql = "select td.lp, lp.lp_name from bsth_c_s_ttinfo_detail td" + | |
| 400 | - " left join bsth_c_s_gbi lp on td.lp = lp.id" + | |
| 401 | - " left join bsth_c_line cl on cl.id = td.xl where 1=1"; | |
| 402 | - if(line.length() != 0) | |
| 403 | - sql += " and cl.line_code = '"+line+"'"; | |
| 404 | - if(ttId.length() != 0) | |
| 405 | - sql += " and td.ttinfo = '"+ttId+"'"; | |
| 406 | - sql += " group by td.lp, lp.lp_name"; | |
| 407 | 400 | |
| 408 | - list = jdbcTemplate.query(sql, | |
| 401 | + String sql = "select td.lp, lp.lp_name from bsth_c_line cl" + | |
| 402 | + " left join bsth_c_s_ttinfo_detail td on cl.id = td.xl" + | |
| 403 | + " left join bsth_c_s_gbi lp on td.lp = lp.id where" + | |
| 404 | + " cl.line_code = ? group by td.lp, lp.lp_name"; | |
| 405 | + | |
| 406 | + list = jdbcTemplate.query(sql, new Object[]{line}, | |
| 409 | 407 | new RowMapper<Map<String, Object>>(){ |
| 410 | 408 | @Override |
| 411 | 409 | public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -804,31 +802,36 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 804 | 802 | |
| 805 | 803 | try { |
| 806 | 804 | |
| 807 | - String where = ""; | |
| 805 | + List<String> strList = new ArrayList<String>(); | |
| 806 | + strList.add(startDate); | |
| 807 | + strList.add(endDate); | |
| 808 | 808 | if(line.length() != 0 && statu.equals("1")){ |
| 809 | - where += " and xl_bm = '"+line+"'"; | |
| 809 | + strList.add('%' + line + '%'); | |
| 810 | + } else { | |
| 811 | + strList.add("%%"); | |
| 810 | 812 | } |
| 811 | 813 | if(lp.length() != 0 && statu.equals("1")){ |
| 812 | - where += " and lp_name = '"+lp+"'"; | |
| 813 | - } | |
| 814 | - if(company.length() != 0){ | |
| 815 | - where += " and gs_bm = '"+company+"'"; | |
| 816 | - } | |
| 817 | - if(subCompany.length() != 0){ | |
| 818 | - where += " and fgs_bm = '"+subCompany+"'"; | |
| 814 | + strList.add('%' + lp + '%'); | |
| 815 | + } else { | |
| 816 | + strList.add("%%"); | |
| 819 | 817 | } |
| 818 | + strList.add('%' + company + '%'); | |
| 819 | + strList.add('%' + subCompany + '%'); | |
| 820 | 820 | if(sfqr == 1){ |
| 821 | - where += " and zdsj >= '"+times1+"' and fcsj <= '"+times2+"'"; | |
| 821 | + strList.add(times1); | |
| 822 | + strList.add(times2); | |
| 823 | + } else { | |
| 824 | + strList.add(""); | |
| 825 | + strList.add("23:59"); | |
| 822 | 826 | } |
| 823 | -// where += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 824 | - where += " and bc_type != 'ldks'"; | |
| 825 | 827 | |
| 826 | 828 | String sql = "select id, schedule_date_str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type, xl_bm, fgs_bm," |
| 827 | 829 | + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id" |
| 828 | - + " ,cc_service from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate+"'" | |
| 829 | - + " and schedule_date_str <= '"+endDate+"'"+where+""; | |
| 830 | + + " ,cc_service from bsth_c_s_sp_info_real where schedule_date_str >= ? and schedule_date_str <= ?" | |
| 831 | + + " and xl_bm like ? and lp_name like ? and gs_bm like ? and fgs_bm like ? and zdsj >= ? and fcsj <= ?" | |
| 832 | + + " and bc_type != 'ldks'"; | |
| 830 | 833 | |
| 831 | - list = jdbcTemplate.query(sql, | |
| 834 | + List<ScheduleRealInfo> query = jdbcTemplate.query(sql, strList.toArray(), | |
| 832 | 835 | new RowMapper<ScheduleRealInfo>(){ |
| 833 | 836 | @Override |
| 834 | 837 | public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -904,27 +907,39 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 904 | 907 | return schedule; |
| 905 | 908 | } |
| 906 | 909 | }); |
| 910 | + | |
| 911 | + for(ScheduleRealInfo s : query){ | |
| 912 | + if(line.length() != 0 && statu.equals("1")){ | |
| 913 | + if(!line.equals(s.getXlBm())){ | |
| 914 | + continue; | |
| 915 | + } | |
| 916 | + } | |
| 917 | + if(lp.length() != 0 && statu.equals("1")){ | |
| 918 | + if(!lp.equals(s.getLpName())){ | |
| 919 | + continue; | |
| 920 | + } | |
| 921 | + } | |
| 922 | + list.add(s); | |
| 923 | + } | |
| 907 | 924 | |
| 908 | 925 | { |
| 909 | 926 | List<Map<String, String>> temp1 = new ArrayList<Map<String, String>>(); |
| 910 | 927 | List<Map<String, String>> temp2 = new ArrayList<Map<String, String>>(); |
| 911 | - sql = "select id, lp, fcsj, xl_bm, tt_info from bsth_c_s_sp_info where bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 912 | - | |
| 913 | - if(startDate.equals(endDate)){ | |
| 914 | - sql += " and schedule_date = '"+startDate+"'"; | |
| 915 | - } else { | |
| 916 | - sql += " and schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'"; | |
| 917 | - } | |
| 928 | + List<String> strList1 = new ArrayList<String>(); | |
| 929 | + strList1.add(startDate); | |
| 930 | + strList1.add(endDate); | |
| 918 | 931 | if(line.length() != 0 && statu.equals("1")){ |
| 919 | - sql += " and xl_bm = '"+line+"'"; | |
| 920 | - } | |
| 921 | - if(company.length() != 0){ | |
| 922 | - sql += " and gs_bm = '"+company+"'"; | |
| 923 | - } | |
| 924 | - if(subCompany.length() != 0){ | |
| 925 | - sql += " and fgs_bm = '"+subCompany+"'"; | |
| 926 | - } | |
| 927 | - temp1 = jdbcTemplate.query(sql, | |
| 932 | + strList1.add("%" + line + "%"); | |
| 933 | + } else { | |
| 934 | + strList1.add("%%"); | |
| 935 | + } | |
| 936 | + strList1.add("%" + company + "%"); | |
| 937 | + strList1.add("%" + subCompany + "%"); | |
| 938 | + sql = "select id, lp, fcsj, xl_bm, tt_info from bsth_c_s_sp_info" + | |
| 939 | + " where bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'" + | |
| 940 | + " and schedule_date >= ? and schedule_date <= ? and xl_bm like ?" + | |
| 941 | + " and gs_bm like ? and fgs_bm like ?"; | |
| 942 | + List<Map<String, String>> query1 = jdbcTemplate.query(sql, strList1.toArray(), | |
| 928 | 943 | new RowMapper<Map<String, String>>(){ |
| 929 | 944 | @Override |
| 930 | 945 | public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -937,13 +952,22 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 937 | 952 | return m; |
| 938 | 953 | } |
| 939 | 954 | }); |
| 940 | - sql = "select * from bsth_c_s_ttinfo_detail where ists = 1" | |
| 941 | - + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 942 | - | |
| 943 | - if(line.length() != 0 && statu.equals("1")){ | |
| 944 | - sql += " and xl = '"+line+"'"; | |
| 955 | + for(Map<String, String> m : query1){ | |
| 956 | + if(line.length() != 0 && statu.equals("1")){ | |
| 957 | + if(!line.equals(m.get("xl_bm").toString())){ | |
| 958 | + continue; | |
| 959 | + } | |
| 960 | + } | |
| 961 | + temp1.add(m); | |
| 945 | 962 | } |
| 946 | - temp2 = jdbcTemplate.query(sql, | |
| 963 | + | |
| 964 | + sql = "select id, lp, xl, fcsj, ttinfo from bsth_c_s_ttinfo_detail where ists = 1" + | |
| 965 | + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'" + | |
| 966 | + " and xl like ?"; | |
| 967 | + | |
| 968 | + List<Map<String, String>> query2 = jdbcTemplate.query(sql, | |
| 969 | + (line.length() != 0 && statu.equals("1"))? | |
| 970 | + new Object[]{"%" + line + "%"}:new Object[]{"%%"}, | |
| 947 | 971 | new RowMapper<Map<String, String>>(){ |
| 948 | 972 | @Override |
| 949 | 973 | public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -956,6 +980,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 956 | 980 | return m; |
| 957 | 981 | } |
| 958 | 982 | }); |
| 983 | + for(Map<String, String> m : query2){ | |
| 984 | + if(line.length() != 0 && statu.equals("1")){ | |
| 985 | + if(!line.equals(m.get("xl").toString())){ | |
| 986 | + continue; | |
| 987 | + } | |
| 988 | + } | |
| 989 | + temp2.add(m); | |
| 990 | + } | |
| 959 | 991 | |
| 960 | 992 | for(Map<String, String> m2 : temp2){ |
| 961 | 993 | for(Map<String, String> m1 : temp1){ |
| ... | ... | @@ -974,10 +1006,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 974 | 1006 | if(id1 == 0 || id1 > s.getId()) |
| 975 | 1007 | id1 = s.getId(); |
| 976 | 1008 | } |
| 977 | - sql = "select destroy, start_date, end_date, mileage, mileage_type, schedule from bsth_c_s_child_task"; | |
| 978 | - sql += " where id >= "+id1+" and id <= "+id2+" order by start_date"; | |
| 1009 | + sql = "select destroy, start_date, end_date, mileage, mileage_type, schedule from bsth_c_s_child_task" | |
| 1010 | + + " where id >= ? and id <= ? order by start_date"; | |
| 979 | 1011 | |
| 980 | - cList = jdbcTemplate.query(sql, | |
| 1012 | + cList = jdbcTemplate.query(sql, new Object[]{id1, id2}, | |
| 981 | 1013 | new RowMapper<ChildTaskPlan>(){ |
| 982 | 1014 | @Override |
| 983 | 1015 | public ChildTaskPlan mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -994,21 +1026,20 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 994 | 1026 | |
| 995 | 1027 | if(model.length() != 0){ |
| 996 | 1028 | sql = "select sp.id from " |
| 997 | - + "(select id, tt_info, xl_bm, lp, fcsj from bsth_c_s_sp_info where schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'" | |
| 998 | - + " and tt_info = '" + model + "' and bc_type != 'ldks') sp" | |
| 1029 | + + "(select id, tt_info, xl_bm, lp, fcsj from bsth_c_s_sp_info where schedule_date >= ? and schedule_date <= ?" | |
| 1030 | + + " and tt_info = ? and bc_type != 'ldks') sp" | |
| 999 | 1031 | + " left join bsth_c_s_ttinfo_detail tt on sp.tt_info = tt.ttinfo and sp.xl_bm = tt.xl and sp.lp = tt.lp and sp.fcsj = tt.fcsj"; |
| 1000 | 1032 | |
| 1001 | - ttList = jdbcTemplate.query(sql, | |
| 1033 | + ttList = jdbcTemplate.query(sql, new Object[]{startDate, endDate, model}, | |
| 1002 | 1034 | new RowMapper<Map<String, Object>>(){ |
| 1003 | 1035 | @Override |
| 1004 | 1036 | public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { |
| 1005 | 1037 | Map<String, Object> m = new HashMap<String, Object>(); |
| 1006 | 1038 | m.put("id", rs.getString("id")); |
| 1007 | -// m.put("ists", rs.getString("ists")!=null?rs.getString("ists"):"0"); | |
| 1008 | 1039 | return m; |
| 1009 | 1040 | } |
| 1010 | 1041 | }); |
| 1011 | - | |
| 1042 | + | |
| 1012 | 1043 | for(Map<String, Object> m : ttList){ |
| 1013 | 1044 | ttSet.add(Long.valueOf(m.get("id").toString())); |
| 1014 | 1045 | } |
| ... | ... | @@ -1071,15 +1102,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1071 | 1102 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); |
| 1072 | 1103 | keyMap.get(key).add(schedule); |
| 1073 | 1104 | } |
| 1074 | -// for(Map<String, Object> tt : ttList){ | |
| 1075 | -// long id = Long.valueOf(tt.get("id").toString()); | |
| 1076 | -// if(id == (long)schedule.getSpId()){ | |
| 1077 | -// String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName(); | |
| 1078 | -// if(!keyMap.containsKey(key)) | |
| 1079 | -// keyMap.put(key, new ArrayList<ScheduleRealInfo>()); | |
| 1080 | -// keyMap.get(key).add(schedule); | |
| 1081 | -// } | |
| 1082 | -// } | |
| 1083 | 1105 | }else{ |
| 1084 | 1106 | if(!keyMap.containsKey(key)) |
| 1085 | 1107 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); |
| ... | ... | @@ -1087,7 +1109,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1087 | 1109 | } |
| 1088 | 1110 | } |
| 1089 | 1111 | |
| 1090 | - String companyName = "", subCompanyName = ""; | |
| 1091 | 1112 | for(String key : keyMap.keySet()){ |
| 1092 | 1113 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 1093 | 1114 | Map<Long, ScheduleRealInfo> sortMap = new HashMap<Long, ScheduleRealInfo>(); |
| ... | ... | @@ -1102,12 +1123,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1102 | 1123 | long jhyssj1 = 0, sjyssj1 = 0; |
| 1103 | 1124 | double jhlc = 0, sjlc = 0; |
| 1104 | 1125 | for(ScheduleRealInfo schedule : list2){ |
| 1105 | - if(companyName.trim().length() == 0 && schedule.getGsName() != null){ | |
| 1106 | - companyName = schedule.getGsName(); | |
| 1107 | - } | |
| 1108 | - if(subCompanyName.trim().length() == 0 && schedule.getFgsName() != null){ | |
| 1109 | - subCompanyName = schedule.getFgsName(); | |
| 1110 | - } | |
| 1111 | 1126 | long fcsj = schedule.getFcsjT(); |
| 1112 | 1127 | if(sortMap.containsKey(fcsj)){ |
| 1113 | 1128 | if(sortMap.get(fcsj).getFcsjActual() != null) |
| ... | ... | @@ -1275,8 +1290,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1275 | 1290 | } |
| 1276 | 1291 | } |
| 1277 | 1292 | String[] split = key.split("/"); |
| 1278 | - tempMap.put("company", companyName); | |
| 1279 | - tempMap.put("subCompany", split[3]); | |
| 1293 | + tempMap.put("company", BasicData.businessCodeNameMap.get(company)); | |
| 1294 | + tempMap.put("subCompany", BasicData.businessFgsCodeNameMap.get(split[3] + "_" + company)); | |
| 1280 | 1295 | tempMap.put("date", split[0]); |
| 1281 | 1296 | tempMap.put("line", split[1]); |
| 1282 | 1297 | tempMap.put("lp", split[2]); |
| ... | ... | @@ -1442,7 +1457,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1442 | 1457 | String[] split = key.split("/"); |
| 1443 | 1458 | tempMap.put("line", split[0]); |
| 1444 | 1459 | tempMap.put("lp", split[1]); |
| 1445 | - tempMap.put("company", companyName); | |
| 1460 | + tempMap.put("company", BasicData.businessCodeNameMap.get(company)); | |
| 1446 | 1461 | tempMap.put("subCompany", split[2]); |
| 1447 | 1462 | tempMap.put("date", date); |
| 1448 | 1463 | list4.add(tempMap); |
| ... | ... | @@ -1489,7 +1504,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1489 | 1504 | String[] split = key.split("/"); |
| 1490 | 1505 | tempMap.put("line", split[0]); |
| 1491 | 1506 | tempMap.put("lp", keyMap4.get(key).size()); |
| 1492 | - tempMap.put("company", companyName); | |
| 1507 | + tempMap.put("company", BasicData.businessCodeNameMap.get(company)); | |
| 1493 | 1508 | tempMap.put("subCompany", split[1]); |
| 1494 | 1509 | tempMap.put("date", date); |
| 1495 | 1510 | tempMap.put("work", keyMap4.get(key)); |
| ... | ... | @@ -1526,8 +1541,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1526 | 1541 | modelMap.put("sjyssj", sjyssj.equals(0)?0:sjyssj.divide(size, 2, RoundingMode.HALF_UP)); |
| 1527 | 1542 | modelMap.put("sjyycs", sjyycs.equals(0)?0:sjyycs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1528 | 1543 | modelMap.put("sjyscs", sjyscs.equals(0)?0:sjyscs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1529 | - modelMap.put("company", companyName); | |
| 1530 | - modelMap.put("subCompany", subCompanyName); | |
| 1531 | 1544 | modelMap.put("dataList", dataList); |
| 1532 | 1545 | } |
| 1533 | 1546 | |
| ... | ... | @@ -2225,9 +2238,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2225 | 2238 | String company = "", subCompany = ""; |
| 2226 | 2239 | String sfyy = map.get("sfyy").toString(); |
| 2227 | 2240 | String line = map.get("line").toString(); |
| 2228 | - if(map.get("company")!=null) | |
| 2241 | + if(map.containsKey("company") && map.get("company")!=null) | |
| 2229 | 2242 | company = map.get("company").toString(); |
| 2230 | - if(map.get("subCompany")!=null) | |
| 2243 | + if(map.containsKey("subCompany") && map.get("subCompany")!=null) | |
| 2231 | 2244 | subCompany = map.get("subCompany").toString(); |
| 2232 | 2245 | String startDate = map.get("startDate").toString(); |
| 2233 | 2246 | String endDate = map.get("endDate").toString(); |
| ... | ... | @@ -2243,32 +2256,26 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2243 | 2256 | } |
| 2244 | 2257 | try { |
| 2245 | 2258 | |
| 2246 | - String sql = "select * from bsth_c_s_sp_info_real where schedule_date_str" | |
| 2247 | - + " >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'"; | |
| 2248 | - if(line.length() != 0){ | |
| 2249 | - sql += " and xl_bm = '"+line+"'"; | |
| 2250 | - } | |
| 2259 | + String sql = "select * from bsth_c_s_sp_info_real where schedule_date_str" + | |
| 2260 | + " >= ? and schedule_date_str <= ? and xl_bm like ?" + | |
| 2261 | + " and fcsj >= ? and fcsj <= ? and gs_bm like ? and fgs_bm like ?" + | |
| 2262 | + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 2263 | + List<String> strList = new ArrayList<String>(); | |
| 2264 | + strList.add(startDate); | |
| 2265 | + strList.add(endDate); | |
| 2266 | + strList.add('%' + line + '%'); | |
| 2251 | 2267 | if(sfqr == 1 && times.length() != 0){ |
| 2252 | 2268 | String[] split = times.split("-"); |
| 2253 | - String[] split0 = split[0].split(":"); | |
| 2254 | - String[] split1 = split[1].split(":"); | |
| 2255 | - int time0 = Integer.valueOf(split0[0])*60 + Integer.valueOf(split0[1]); | |
| 2256 | - int time1 = Integer.valueOf(split1[0])*60 + Integer.valueOf(split1[1]); | |
| 2257 | - if(time1 > time0){ | |
| 2258 | - sql += " and fcsj >= '"+split[0]+"' and fcsj <= '"+split[1]+"'"; | |
| 2259 | - } else { | |
| 2260 | - sql += " and (fcsj >= '"+split[0]+"' or fcsj <= '"+split[1]+"')"; | |
| 2261 | - } | |
| 2262 | - } | |
| 2263 | - if(company.length() != 0){ | |
| 2264 | - sql += " and gs_bm = '"+company+"'"; | |
| 2265 | - } | |
| 2266 | - if(subCompany.length() != 0){ | |
| 2267 | - sql += " and fgs_bm = '"+subCompany+"'"; | |
| 2269 | + strList.add(split[0]); | |
| 2270 | + strList.add(split[1]); | |
| 2271 | + } else { | |
| 2272 | + strList.add(""); | |
| 2273 | + strList.add("23:59"); | |
| 2268 | 2274 | } |
| 2269 | - sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 2275 | + strList.add('%' + company + '%'); | |
| 2276 | + strList.add('%' + subCompany + '%'); | |
| 2270 | 2277 | |
| 2271 | - list = jdbcTemplate.query(sql, | |
| 2278 | + List<ScheduleRealInfo> query = jdbcTemplate.query(sql, strList.toArray(), | |
| 2272 | 2279 | new RowMapper<ScheduleRealInfo>(){ |
| 2273 | 2280 | @Override |
| 2274 | 2281 | public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -2311,6 +2318,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2311 | 2318 | return schedule; |
| 2312 | 2319 | } |
| 2313 | 2320 | }); |
| 2321 | + for(ScheduleRealInfo s : query){ | |
| 2322 | + if(line.length() != 0){ | |
| 2323 | + if(!line.equals(s.getXlBm())){ | |
| 2324 | + continue; | |
| 2325 | + } | |
| 2326 | + } | |
| 2327 | + list.add(s); | |
| 2328 | + } | |
| 2314 | 2329 | }catch (Exception e) { |
| 2315 | 2330 | // TODO: handle exception |
| 2316 | 2331 | e.printStackTrace(); |
| ... | ... | @@ -2408,71 +2423,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2408 | 2423 | resList.add(tempMap); |
| 2409 | 2424 | } |
| 2410 | 2425 | |
| 2411 | - /*for(String key : keyMap0.keySet()){ | |
| 2412 | - Map<String, Object> tempMap = new HashMap<String, Object>(); | |
| 2413 | - int sjbc = 0, sddf = 0, zddf = 0, | |
| 2414 | - dxtz = 0, lbtz = 0; | |
| 2415 | - for(Map<String, Object> m : keyMap0.get(key)){ | |
| 2416 | - sjbc += (int)m.get("sjbc"); | |
| 2417 | - sddf += (int)m.get("sddf"); | |
| 2418 | - zddf += (int)m.get("zddf"); | |
| 2419 | -// dxtz += (int)m.get("dxtz"); | |
| 2420 | - lbtz += (int)m.get("lbtz"); | |
| 2421 | - } | |
| 2422 | - tempMap.put("date", date); | |
| 2423 | - String[] keys = key.split("/"); | |
| 2424 | - tempMap.put("company", keys[0]); | |
| 2425 | - tempMap.put("subCompany", keys[1]); | |
| 2426 | - tempMap.put("lines", keyMap0.get(key).size()); | |
| 2427 | - tempMap.put("sjbc", sjbc); | |
| 2428 | - tempMap.put("sddf", sddf); | |
| 2429 | - tempMap.put("zddf", zddf); | |
| 2430 | - tempMap.put("dfhj", sddf + zddf); | |
| 2431 | -// tempMap.put("dxtz", dxtz); | |
| 2432 | - tempMap.put("lbtz", lbtz); | |
| 2433 | - tempMap.put("correct", sddf + zddf + dxtz + lbtz); | |
| 2434 | - tempMap.put("dfbl", df.format((double)(sddf + zddf)/sjbc*100) + "%"); | |
| 2435 | - tempMap.put("dxbl", df.format((double)(dxtz)/sjbc*100) + "%"); | |
| 2436 | - tempMap.put("lbbl", df.format((double)(lbtz)/sjbc*100) + "%"); | |
| 2437 | - tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%"); | |
| 2438 | -// tempMap.put("workList", keyMap0.get(key)); | |
| 2439 | - | |
| 2440 | - String key1 = keys[0]; | |
| 2441 | - if(!keyMap1.containsKey(key1)) | |
| 2442 | - keyMap1.put(key1, new ArrayList<Map<String, Object>>()); | |
| 2443 | - keyMap1.get(key1).add(tempMap); | |
| 2444 | - }*/ | |
| 2445 | - | |
| 2446 | - /*for(String key : keyMap1.keySet()){ | |
| 2447 | - Map<String, Object> tempMap = new HashMap<String, Object>(); | |
| 2448 | - int sjbc = 0, sddf = 0, zddf = 0, | |
| 2449 | - dxtz = 0, lbtz = 0, lines = 0; | |
| 2450 | - for(Map<String, Object> m : keyMap1.get(key)){ | |
| 2451 | - sjbc += (int)m.get("sjbc"); | |
| 2452 | - sddf += (int)m.get("sddf"); | |
| 2453 | - zddf += (int)m.get("zddf"); | |
| 2454 | -// dxtz += (int)m.get("dxtz"); | |
| 2455 | - lbtz += (int)m.get("lbtz"); | |
| 2456 | - lines += (int)m.get("lines"); | |
| 2457 | - } | |
| 2458 | - tempMap.put("date", date); | |
| 2459 | - tempMap.put("company", key); | |
| 2460 | - tempMap.put("lines", lines); | |
| 2461 | - tempMap.put("sjbc", sjbc); | |
| 2462 | - tempMap.put("sddf", sddf); | |
| 2463 | - tempMap.put("zddf", zddf); | |
| 2464 | - tempMap.put("dfhj", sddf + zddf); | |
| 2465 | -// tempMap.put("dxtz", dxtz); | |
| 2466 | - tempMap.put("lbtz", lbtz); | |
| 2467 | - tempMap.put("correct", sddf + zddf + dxtz + lbtz); | |
| 2468 | - tempMap.put("dfbl", df.format((double)(sddf + zddf)/sjbc*100) + "%"); | |
| 2469 | - tempMap.put("dxbl", df.format((double)(dxtz)/sjbc*100) + "%"); | |
| 2470 | - tempMap.put("lbbl", df.format((double)(lbtz)/sjbc*100) + "%"); | |
| 2471 | - tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%"); | |
| 2472 | -// tempMap.put("workList", keyMap1.get(key)); | |
| 2473 | - | |
| 2474 | - resList.add(tempMap); | |
| 2475 | - }*/ | |
| 2476 | 2426 | |
| 2477 | 2427 | if(resList.size() != 0){ |
| 2478 | 2428 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| ... | ... | @@ -2484,24 +2434,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2484 | 2434 | zddf += (int)m.get("zddf"); |
| 2485 | 2435 | // dxtz += (int)m.get("dxtz"); |
| 2486 | 2436 | lbtz += (int)m.get("lbtz"); |
| 2487 | -// lines += (int)m.get("lines"); | |
| 2488 | - /*for(Map<String, Object> m0 : (List<Map<String, Object>>)m.get("workList")){ | |
| 2489 | - Map<String, Object> temp = new HashMap<String, Object>(); | |
| 2490 | - temp.put("date", "合计"); | |
| 2491 | - temp.put("lines", m0.get("lines")); | |
| 2492 | - temp.put("sjbc", m0.get("sjbc")); | |
| 2493 | - temp.put("sddf", m0.get("sddf")); | |
| 2494 | - temp.put("zddf", m0.get("zddf")); | |
| 2495 | - temp.put("dfhj", m0.get("dfhj")); | |
| 2496 | -// temp.put("dxtz", m0.get("dxtz")); | |
| 2497 | - temp.put("lbtz", m0.get("lbtz")); | |
| 2498 | - temp.put("correct", m0.get("correct")); | |
| 2499 | - temp.put("dfbl", m0.get("dfbl")); | |
| 2500 | - temp.put("dxbl", m0.get("dxbl")); | |
| 2501 | - temp.put("lbbl", m0.get("lbbl")); | |
| 2502 | - temp.put("correctbl", m0.get("correctbl")); | |
| 2503 | -// ((List<Map<String, Object>>)m0.get("workList")).add(temp); | |
| 2504 | - }*/ | |
| 2505 | 2437 | Map<String, Object> temp = new HashMap<String, Object>(); |
| 2506 | 2438 | temp.put("date", "合计"); |
| 2507 | 2439 | temp.put("lines", m.get("lines")); |
| ... | ... | @@ -2515,8 +2447,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2515 | 2447 | temp.put("dfbl", m.get("dfbl")); |
| 2516 | 2448 | temp.put("dxbl", m.get("dxbl")); |
| 2517 | 2449 | temp.put("lbbl", m.get("lbbl")); |
| 2518 | -// temp.put("correctbl", m.get("correctbl")); | |
| 2519 | -// ((List<Map<String, Object>>)m.get("workList")).add(temp); | |
| 2520 | 2450 | } |
| 2521 | 2451 | tempMap.put("date", "合计"); |
| 2522 | 2452 | tempMap.put("lines", lines); |
| ... | ... | @@ -2534,13 +2464,17 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2534 | 2464 | resList.add(tempMap); |
| 2535 | 2465 | } |
| 2536 | 2466 | |
| 2467 | + String currDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | |
| 2468 | + | |
| 2537 | 2469 | //计算掉线调整 |
| 2538 | 2470 | String sqldot = "select * from " |
| 2539 | 2471 | + "logger_sch_modify where gsbm = ? and fgsbm like ? and rq BETWEEN ? and ? order by line_code,sch_id"; |
| 2540 | 2472 | |
| 2541 | 2473 | |
| 2542 | 2474 | List<SchEditInfoDto> listDot = jdbcTemplate.query(sqldot, |
| 2543 | - new BeanPropertyRowMapper(SchEditInfoDto.class),company,"%"+subCompany+"%",map.get("startDate").toString(),map.get("endDate").toString()); | |
| 2475 | + new BeanPropertyRowMapper(SchEditInfoDto.class),company,"%"+subCompany+"%", | |
| 2476 | + map.get("startDate")!=null?map.get("startDate"):"", | |
| 2477 | + map.get("endDate")!=null?map.get("endDate"):currDate); | |
| 2544 | 2478 | int dxtzz=0; |
| 2545 | 2479 | Map<String, Object> mapSchId=new HashMap<String,Object>(); |
| 2546 | 2480 | for (int i = 0; i < resList.size(); i++) { |
| ... | ... | @@ -2665,11 +2599,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2665 | 2599 | String minfcsj="02:00"; |
| 2666 | 2600 | List<Line> lineList=lineRepository.findLineByCode(line); |
| 2667 | 2601 | if(lineList.size()>0){ |
| 2668 | - String sqlMinYysj="select start_opt from bsth_c_line_config where " | |
| 2602 | + String sqlMinYysj = "select start_opt from bsth_c_line_config where " | |
| 2669 | 2603 | + " id = (" |
| 2670 | - + "select max(id) from bsth_c_line_config where line ='"+lineList.get(0).getId() +"'" | |
| 2604 | + + "select max(id) from bsth_c_line_config where line = ?" | |
| 2671 | 2605 | + ")"; |
| 2672 | - minfcsj=jdbcTemplate.queryForObject(sqlMinYysj, String.class); | |
| 2606 | + minfcsj = jdbcTemplate.queryForObject(sqlMinYysj, String.class, lineList.get(0).getId()); | |
| 2673 | 2607 | } |
| 2674 | 2608 | |
| 2675 | 2609 | for(Ylb ylb : queryYlbByRqXlbm){ |
| ... | ... | @@ -2885,18 +2819,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2885 | 2819 | Map.put("ljbc", culateService.culateLjbc(lists, "")); |
| 2886 | 2820 | int sjbc =culateService.culateLjbc(lists, "")+culateService.culateSjbc(lists, ""); |
| 2887 | 2821 | Map.put("sjbc", sjbc); |
| 2888 | -// map=new HashMap<String,Object>(); | |
| 2889 | 2822 | |
| 2890 | 2823 | SimpleDateFormat sdf2=new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| 2891 | -// String minfcsj="02:00"; | |
| 2892 | -// List<Line> lineList=lineRepository.findLineByCode(newList.get(0).getXlBm()); | |
| 2893 | -// if(lineList.size()>0){ | |
| 2894 | -// String sqlMinYysj="select start_opt from bsth_c_line_config where " | |
| 2895 | -// + " id = (" | |
| 2896 | -// + "select max(id) from bsth_c_line_config where line ='"+lineList.get(0).getId() +"'" | |
| 2897 | -// + ")"; | |
| 2898 | -// minfcsj=jdbcTemplate.queryForObject(sqlMinYysj, String.class); | |
| 2899 | -// } | |
| 2900 | 2824 | String[] minSjs = minfcsj.split(":"); |
| 2901 | 2825 | Long minSj=Long.parseLong(minSjs[0])*60+Long.parseLong(minSjs[1]); |
| 2902 | 2826 | |
| ... | ... | @@ -3081,17 +3005,17 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 3081 | 3005 | String sql = "select id, cl_zbh, fcsj, fcsj_actual, j_gh, j_name, lp_name, qdz_name, " + |
| 3082 | 3006 | "schedule_date_str, xl_name, zdsj, zdsj_actual, fgs_bm, fgs_name, gs_name, xl_dir, xl_bm " + |
| 3083 | 3007 | "from bsth_c_s_sp_info_real " + |
| 3084 | - "where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"' " + | |
| 3008 | + "where schedule_date_str >= ? and schedule_date_str <= ? " + | |
| 3009 | + "and gs_bm like ? and fgs_bm like ? and xl_bm like ? " + | |
| 3085 | 3010 | "and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and cc_service = 0"; |
| 3011 | + List<String> strList = new ArrayList<String>(); | |
| 3012 | + strList.add(startDate); | |
| 3013 | + strList.add(endDate); | |
| 3014 | + strList.add('%' + company + '%'); | |
| 3015 | + strList.add('%' + subCompany + '%'); | |
| 3016 | + strList.add('%' + line + '%'); | |
| 3086 | 3017 | |
| 3087 | - if(company.length() != 0) | |
| 3088 | - sql += " and gs_bm = '"+company+"'"; | |
| 3089 | - if(subCompany.length() != 0) | |
| 3090 | - sql += " and fgs_bm = '"+subCompany+"'"; | |
| 3091 | - if(line.length() != 0) | |
| 3092 | - sql += " and xl_bm = '"+line+"'"; | |
| 3093 | - | |
| 3094 | - List<ScheduleRealInfo> list = jdbcTemplate.query(sql, | |
| 3018 | + List<ScheduleRealInfo> query = jdbcTemplate.query(sql, strList.toArray(), | |
| 3095 | 3019 | new RowMapper<ScheduleRealInfo>(){ |
| 3096 | 3020 | @Override |
| 3097 | 3021 | public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -3114,7 +3038,17 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 3114 | 3038 | schedule.setjGh(rs.getString("j_gh")); |
| 3115 | 3039 | schedule.setjName(rs.getString("j_name")); |
| 3116 | 3040 | return schedule; |
| 3117 | - }}); | |
| 3041 | + }}); | |
| 3042 | + | |
| 3043 | + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | |
| 3044 | + for(ScheduleRealInfo s : query){ | |
| 3045 | + if(line.length() != 0){ | |
| 3046 | + if(!(line.equals(s.getXlBm()))){ | |
| 3047 | + continue; | |
| 3048 | + } | |
| 3049 | + } | |
| 3050 | + list.add(s); | |
| 3051 | + } | |
| 3118 | 3052 | |
| 3119 | 3053 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 3120 | 3054 | Map<String, Map<String, List<ScheduleRealInfo>>> sches = new HashMap<String, Map<String, List<ScheduleRealInfo>>>(); |
| ... | ... | @@ -3136,11 +3070,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 3136 | 3070 | |
| 3137 | 3071 | String xl = s.getXlName() + "/" + s.getFgsBm(); |
| 3138 | 3072 | String dateStr = s.getScheduleDateStr(); |
| 3139 | - if(!sches.containsKey(xl)){ | |
| 3073 | + if(!(sches.containsKey(xl))){ | |
| 3140 | 3074 | sches.put(xl, new HashMap<String, List<ScheduleRealInfo>>()); |
| 3141 | 3075 | keyMap.put(xl, new ArrayList<List<Map<String, Object>>>()); |
| 3142 | 3076 | } |
| 3143 | - if(!sches.get(xl).containsKey(dateStr)){ | |
| 3077 | + if(!(sches.get(xl).containsKey(dateStr))){ | |
| 3144 | 3078 | sches.get(xl).put(dateStr, new ArrayList<ScheduleRealInfo>()); |
| 3145 | 3079 | } |
| 3146 | 3080 | sches.get(xl).get(dateStr).add(s); |
| ... | ... | @@ -3242,7 +3176,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 3242 | 3176 | keyMap.put(xl, lists); |
| 3243 | 3177 | } |
| 3244 | 3178 | |
| 3245 | - if(!map.containsKey("flag")){ | |
| 3179 | + if(!(map.containsKey("flag"))){ | |
| 3246 | 3180 | for(String xl : keyMap.keySet()){ |
| 3247 | 3181 | List<List<Map<String, Object>>> list1 = keyMap.get(xl); |
| 3248 | 3182 | if(list1.size() == 0 || list1.get(0).size() == 0) | ... | ... |
src/main/java/com/bsth/service/jdtest/impl/JdtestServiceImpl.java
| ... | ... | @@ -105,20 +105,41 @@ public class JdtestServiceImpl implements JdtestService { |
| 105 | 105 | |
| 106 | 106 | @Override |
| 107 | 107 | public List<Map<String, Object>> daily(Map<String, Object> map) { |
| 108 | - String xlbm="";; | |
| 108 | + List<Map<String, Object>> listAll=new ArrayList<>(); | |
| 109 | + String xlbm=""; | |
| 109 | 110 | if(map.get("line")!=null){ |
| 110 | 111 | xlbm=map.get("line").toString().trim(); |
| 111 | 112 | } |
| 113 | + String gsbm=""; | |
| 114 | + if(map.get("gsbm")!=null){ | |
| 115 | + gsbm=map.get("gsbm").toString().trim(); | |
| 116 | + } | |
| 117 | + | |
| 118 | + String fgsbm=""; | |
| 119 | + if(map.get("fgsbm")!=null){ | |
| 120 | + fgsbm=map.get("fgsbm").toString().trim(); | |
| 121 | + } | |
| 112 | 122 | |
| 113 | - String sql="select r.cl_zbh,r.j_gh,r.lp_name " | |
| 123 | + String sql="select r.xl_bm, r.cl_zbh,r.j_gh,r.lp_name " | |
| 114 | 124 | + " from bsth_c_s_sp_info_real r where " |
| 115 | - + "r.schedule_date_str = '"+map.get("date").toString()+"' " | |
| 116 | - + " and r.xl_bm = '"+xlbm+"' group by r.cl_zbh,r.j_gh,r.lp_name order by r.cl_zbh"; | |
| 125 | + + "r.schedule_date_str = '"+map.get("date").toString()+"'"; | |
| 126 | + if(!gsbm.equals("")){ | |
| 127 | + sql += "and r.gs_bm ='"+gsbm+"'"; | |
| 128 | + } | |
| 129 | + if(!fgsbm.equals("")){ | |
| 130 | + sql += "and r.fgs_bm='"+fgsbm+"'"; | |
| 131 | + } | |
| 132 | + if(!xlbm.equals("")){ | |
| 133 | + sql += " and r.xl_bm = '"+xlbm+"'"; | |
| 134 | + } | |
| 135 | + | |
| 136 | + sql += " group by r.xl_bm, r.cl_zbh,r.j_gh,r.lp_name order by r.xl_bm,r.cl_zbh"; | |
| 117 | 137 | |
| 118 | 138 | List<Map<String, Object>> list = jdbcTemplate.query(sql, new RowMapper<Map<String, Object>>() { |
| 119 | 139 | @Override |
| 120 | 140 | public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 121 | 141 | Map<String, Object> m=new HashMap<>(); |
| 142 | + m.put("xlBm", arg0.getString("xl_bm")); | |
| 122 | 143 | m.put("lp", arg0.getString("lp_name")); |
| 123 | 144 | m.put("jGh", arg0.getString("j_gh")); |
| 124 | 145 | m.put("clZbh", arg0.getString("cl_zbh")); |
| ... | ... | @@ -132,19 +153,28 @@ public class JdtestServiceImpl implements JdtestService { |
| 132 | 153 | Dictionary d=it.next(); |
| 133 | 154 | dMap.put(d.getdCode(), d.getdName()); |
| 134 | 155 | } |
| 135 | - | |
| 136 | - List<Ylb> listYlb= ylbRepository.obtainYlEq(map.get("date").toString(), "", "", xlbm, "", "xlbm"); | |
| 156 | + List<Ylb> listYlb=new ArrayList<Ylb>(); | |
| 157 | + if(xlbm.equals("")){ | |
| 158 | + listYlb=ylbRepository.obtainYl(map.get("date").toString(), gsbm, fgsbm, xlbm, "", "xlbm"); | |
| 159 | + }else{ | |
| 160 | + listYlb=ylbRepository.obtainYlEq(map.get("date").toString(), "", "", xlbm, "", "xlbm"); | |
| 161 | + } | |
| 137 | 162 | Map<String, Ylb> mapYlb=new HashMap<>(); |
| 138 | 163 | for (int j = 0; j < listYlb.size(); j++) { |
| 139 | 164 | Ylb y=listYlb.get(j); |
| 140 | - if(mapYlb.get(y.getJsy()+y.getNbbm()+y.getLp())==null){ | |
| 141 | - mapYlb.put(y.getJsy()+y.getNbbm()+y.getLp(), y); | |
| 165 | + if(mapYlb.get(y.getXlbm()+y.getJsy()+y.getNbbm()+y.getLp())==null){ | |
| 166 | + mapYlb.put(y.getXlbm()+y.getJsy()+y.getNbbm()+y.getLp(), y); | |
| 142 | 167 | } |
| 143 | 168 | } |
| 144 | 169 | |
| 145 | 170 | List<ScheduleRealInfo> sList; |
| 146 | 171 | List<ScheduleRealInfo> jList; |
| 147 | - List<ScheduleRealInfo> lists=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(map.get("line").toString(), map.get("date").toString()); | |
| 172 | + List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>(); | |
| 173 | + if(xlbm.equals("")){ | |
| 174 | + lists=scheduleRealInfoRepository.scheduleByDateAndLineByGs_(gsbm, fgsbm, map.get("date").toString()); | |
| 175 | + }else{ | |
| 176 | + lists=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(xlbm, map.get("date").toString()); | |
| 177 | + } | |
| 148 | 178 | double jzyl_z=0.0; |
| 149 | 179 | double czyl_z=0.0; |
| 150 | 180 | double jzl_z=0.0; |
| ... | ... | @@ -155,6 +185,19 @@ public class JdtestServiceImpl implements JdtestService { |
| 155 | 185 | double sjzlc_z=0.0; |
| 156 | 186 | double kszlc_z=0.0; |
| 157 | 187 | double zlc_z=0.0; |
| 188 | + double zlc_z2=0.0; | |
| 189 | + | |
| 190 | + double jzyl_line=0.0; | |
| 191 | + double czyl_line=0.0; | |
| 192 | + double jzl_line=0.0; | |
| 193 | + double yh_line=0.0; | |
| 194 | + int jhbc_line=0; | |
| 195 | + double jhlc_line=0.0; | |
| 196 | + int sjbc_line=0; | |
| 197 | + double sjzlc_line=0.0; | |
| 198 | + double kszlc_line=0.0; | |
| 199 | + double zlc_line=0.0; | |
| 200 | + double zlc_line2=0.0; | |
| 158 | 201 | for(int i=0;i<list.size();i++){ |
| 159 | 202 | sList =new ArrayList<ScheduleRealInfo>(); |
| 160 | 203 | jList =new ArrayList<ScheduleRealInfo>(); |
| ... | ... | @@ -164,9 +207,8 @@ public class JdtestServiceImpl implements JdtestService { |
| 164 | 207 | double jzl=0.0; |
| 165 | 208 | double yh=0.0; |
| 166 | 209 | String rylx=""; |
| 167 | - | |
| 168 | - if(mapYlb.get(m.get("jGh").toString()+m.get("clZbh").toString()+m.get("lp").toString())!=null){ | |
| 169 | - Ylb t=mapYlb.get(m.get("jGh").toString()+m.get("clZbh").toString()+m.get("lp").toString()); | |
| 210 | + if(mapYlb.get(m.get("xlBm").toString()+m.get("jGh").toString()+m.get("clZbh").toString()+m.get("lp").toString())!=null){ | |
| 211 | + Ylb t=mapYlb.get(m.get("xlBm").toString()+m.get("jGh").toString()+m.get("clZbh").toString()+m.get("lp").toString()); | |
| 170 | 212 | jzyl=t.getJzyl(); |
| 171 | 213 | czyl=t.getCzyl(); |
| 172 | 214 | jzl=t.getJzl(); |
| ... | ... | @@ -191,7 +233,8 @@ public class JdtestServiceImpl implements JdtestService { |
| 191 | 233 | m.put("dh", ""); |
| 192 | 234 | for (int j = 0; j < lists.size(); j++) { |
| 193 | 235 | ScheduleRealInfo s=lists.get(j); |
| 194 | - if(m.get("clZbh").toString().equals(s.getClZbh()) && | |
| 236 | + if(m.get("xlBm").toString().equals(s.getXlBm()) && | |
| 237 | + m.get("clZbh").toString().equals(s.getClZbh()) && | |
| 195 | 238 | m.get("jGh").toString().equals(s.getjGh()) && |
| 196 | 239 | m.get("lp").toString().equals(s.getLpName()) ){ |
| 197 | 240 | jList.add(s); |
| ... | ... | @@ -206,7 +249,7 @@ public class JdtestServiceImpl implements JdtestService { |
| 206 | 249 | |
| 207 | 250 | } |
| 208 | 251 | } |
| 209 | - | |
| 252 | + m.put("xlName", jList.get(0).getXlName()); | |
| 210 | 253 | m.put("jName", jList.get(0).getjName()); |
| 211 | 254 | |
| 212 | 255 | int jhbc=culateMileageService.culateJhbc(jList, ""); |
| ... | ... | @@ -223,17 +266,137 @@ public class JdtestServiceImpl implements JdtestService { |
| 223 | 266 | double kszlc=Arith.add(ksgl, jccgl); |
| 224 | 267 | kszlc_z=Arith.add(kszlc, kszlc_z); |
| 225 | 268 | double zlc=Arith.add(sjzlc, kszlc); |
| 269 | + double zlc2=Math.round(Math.round(zlc)); | |
| 226 | 270 | zlc_z=Arith.add(zlc, zlc_z); |
| 271 | + zlc_z2=Arith.add(zlc2,zlc_z2); | |
| 227 | 272 | m.put("jhbc", jhbc); |
| 228 | 273 | m.put("jhlc", jhlc); |
| 229 | 274 | m.put("sjbc", sjbc); |
| 230 | 275 | m.put("sjzlc",sjzlc); |
| 231 | 276 | m.put("kszlc", kszlc); |
| 232 | 277 | m.put("zlc", zlc); |
| 233 | - | |
| 278 | + m.put("zlc2", zlc2); | |
| 279 | + listAll.add(m); | |
| 280 | + //线路小计 | |
| 281 | + if (i < list.size() - 1) { | |
| 282 | + if ((list.get(i+1).get("xlBm").toString()).equals(list.get(i).get("xlBm").toString())) { | |
| 283 | + jzyl_line=Arith.add(jzyl_line, jzyl); | |
| 284 | + czyl_line=Arith.add(czyl_line, czyl); | |
| 285 | + jzl_line=Arith.add(jzl_line, jzl); | |
| 286 | + yh_line=Arith.add(yh_line, yh); | |
| 287 | + jhbc_line=jhbc_line+jhbc; | |
| 288 | + jhlc_line=Arith.add(jhlc_line,jhlc); | |
| 289 | + sjbc_line=sjbc_line+sjbc; | |
| 290 | + sjzlc_line=Arith.add(sjzlc_line, sjzlc); | |
| 291 | + kszlc_line=Arith.add(kszlc_line,kszlc); | |
| 292 | + zlc_line=Arith.add(zlc_line, zlc); | |
| 293 | + zlc_line2=Arith.add(zlc_line2, zlc2); | |
| 294 | + } else { | |
| 295 | + jzyl_line=Arith.add(jzyl_line, jzyl); | |
| 296 | + czyl_line=Arith.add(czyl_line, czyl); | |
| 297 | + jzl_line=Arith.add(jzl_line, jzl); | |
| 298 | + yh_line=Arith.add(yh_line, yh); | |
| 299 | + jhbc_line=jhbc_line+jhbc; | |
| 300 | + jhlc_line=Arith.add(jhlc_line,jhlc); | |
| 301 | + sjbc_line=sjbc_line+sjbc; | |
| 302 | + sjzlc_line=Arith.add(sjzlc_line, sjzlc); | |
| 303 | + kszlc_line=Arith.add(kszlc_line,kszlc); | |
| 304 | + zlc_line=Arith.add(zlc_line, zlc); | |
| 305 | + zlc_line2=Arith.add(zlc_line2, zlc2); | |
| 306 | + | |
| 307 | + Map<String, Object> mmm=new HashMap<>(); | |
| 308 | + mmm.put("xlName", "小计"); | |
| 309 | + mmm.put("lp", ""); | |
| 310 | + mmm.put("jGh", ""); | |
| 311 | + mmm.put("clZbh", ""); | |
| 312 | + mmm.put("jName", ""); | |
| 313 | + mmm.put("jhbc", jhbc_line); | |
| 314 | + mmm.put("jhlc", jhlc_line); | |
| 315 | + mmm.put("sjbc", sjbc_line); | |
| 316 | + mmm.put("sjzlc", sjzlc_line); | |
| 317 | + mmm.put("kszlc",kszlc_line); | |
| 318 | + mmm.put("zlc", zlc_line); | |
| 319 | + mmm.put("zlc2", zlc_line2); | |
| 320 | + mmm.put("jzyl",jzyl_line); | |
| 321 | + mmm.put("czyl",czyl_line); | |
| 322 | + mmm.put("jzl", jzl_line); | |
| 323 | + mmm.put("yh", yh_line); | |
| 324 | + mmm.put("rylx", ""); | |
| 325 | + mmm.put("dh",""); | |
| 326 | + listAll.add(mmm); | |
| 327 | + jzyl_line=0.0; | |
| 328 | + czyl_line=0.0; | |
| 329 | + jzl_line=0.0; | |
| 330 | + yh_line=0.0; | |
| 331 | + jhbc_line=0; | |
| 332 | + jhlc_line=0.0; | |
| 333 | + sjbc_line=0; | |
| 334 | + sjzlc_line=0.0; | |
| 335 | + kszlc_line=0.0; | |
| 336 | + zlc_line=0.0; | |
| 337 | + zlc_line2=0.0; | |
| 338 | + } | |
| 339 | + } else { | |
| 340 | + if ((list.get(i).get("xlBm").toString()).equals(list.get(i - 1).get("xlBm").toString())) { | |
| 341 | + jzyl_line=Arith.add(jzyl_line, jzyl); | |
| 342 | + czyl_line=Arith.add(czyl_line, czyl); | |
| 343 | + jzl_line=Arith.add(jzl_line, jzl); | |
| 344 | + yh_line=Arith.add(yh_line, yh); | |
| 345 | + jhbc_line=jhbc_line+jhbc; | |
| 346 | + jhlc_line=Arith.add(jhlc_line,jhlc); | |
| 347 | + sjbc_line=sjbc_line+sjbc; | |
| 348 | + sjzlc_line=Arith.add(sjzlc_line, sjzlc); | |
| 349 | + kszlc_line=Arith.add(kszlc_line,kszlc); | |
| 350 | + zlc_line=Arith.add(zlc_line, zlc); | |
| 351 | + zlc_line2=Arith.add(zlc_line2, zlc2); | |
| 352 | + Map<String, Object> mmm=new HashMap<>(); | |
| 353 | + mmm.put("xlName", "小计"); | |
| 354 | + mmm.put("lp", ""); | |
| 355 | + mmm.put("jGh", ""); | |
| 356 | + mmm.put("clZbh", ""); | |
| 357 | + mmm.put("jName", ""); | |
| 358 | + mmm.put("jhbc", jhbc_line); | |
| 359 | + mmm.put("jhlc", jhlc_line); | |
| 360 | + mmm.put("sjbc", sjbc_line); | |
| 361 | + mmm.put("sjzlc", sjzlc_line); | |
| 362 | + mmm.put("kszlc",kszlc_line); | |
| 363 | + mmm.put("zlc", zlc_line); | |
| 364 | + mmm.put("zlc2", zlc_line2); | |
| 365 | + mmm.put("jzyl",jzyl_line); | |
| 366 | + mmm.put("czyl",czyl_line); | |
| 367 | + mmm.put("jzl", jzl_line); | |
| 368 | + mmm.put("yh", yh_line); | |
| 369 | + mmm.put("rylx", ""); | |
| 370 | + mmm.put("dh",""); | |
| 371 | + listAll.add(mmm); | |
| 372 | + } else { | |
| 373 | + | |
| 374 | + Map<String, Object> mmm=new HashMap<>(); | |
| 375 | + mmm.put("xlName", "小计"); | |
| 376 | + mmm.put("lp", ""); | |
| 377 | + mmm.put("jGh", ""); | |
| 378 | + mmm.put("clZbh", ""); | |
| 379 | + mmm.put("jName", ""); | |
| 380 | + mmm.put("jhbc", jhbc); | |
| 381 | + mmm.put("jhlc", jhlc); | |
| 382 | + mmm.put("sjbc", sjbc); | |
| 383 | + mmm.put("sjzlc", sjzlc); | |
| 384 | + mmm.put("kszlc",kszlc); | |
| 385 | + mmm.put("zlc", zlc); | |
| 386 | + mmm.put("zlc2", zlc2); | |
| 387 | + mmm.put("jzyl",jzyl); | |
| 388 | + mmm.put("czyl",czyl); | |
| 389 | + mmm.put("jzl", jzl); | |
| 390 | + mmm.put("yh", yh); | |
| 391 | + mmm.put("rylx", ""); | |
| 392 | + mmm.put("dh",""); | |
| 393 | + listAll.add(mmm); | |
| 394 | + } | |
| 395 | + } | |
| 234 | 396 | } |
| 235 | 397 | Map<String, Object> mmp=new HashMap<>(); |
| 236 | - mmp.put("lp", "合计"); | |
| 398 | + mmp.put("xlName", "合计"); | |
| 399 | + mmp.put("lp", ""); | |
| 237 | 400 | mmp.put("jGh", ""); |
| 238 | 401 | mmp.put("clZbh", ""); |
| 239 | 402 | mmp.put("jName", ""); |
| ... | ... | @@ -243,13 +406,14 @@ public class JdtestServiceImpl implements JdtestService { |
| 243 | 406 | mmp.put("sjzlc", sjzlc_z); |
| 244 | 407 | mmp.put("kszlc",kszlc_z); |
| 245 | 408 | mmp.put("zlc", zlc_z); |
| 409 | + mmp.put("zlc2", zlc_z2); | |
| 246 | 410 | mmp.put("jzyl",jzyl_z); |
| 247 | 411 | mmp.put("czyl",czyl_z); |
| 248 | 412 | mmp.put("jzl", jzl_z); |
| 249 | 413 | mmp.put("yh", yh_z); |
| 250 | 414 | mmp.put("rylx", ""); |
| 251 | 415 | mmp.put("dh",""); |
| 252 | - list.add(mmp); | |
| 253 | - return list; | |
| 416 | + listAll.add(mmp); | |
| 417 | + return listAll; | |
| 254 | 418 | } |
| 255 | 419 | } | ... | ... |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| ... | ... | @@ -2824,7 +2824,7 @@ public class ReportServiceImpl implements ReportService{ |
| 2824 | 2824 | } |
| 2825 | 2825 | }); |
| 2826 | 2826 | }else{ |
| 2827 | - sql+="select r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh,r.j_name,r.s_name" | |
| 2827 | + sql+="select r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh" | |
| 2828 | 2828 | + " from bsth_c_s_sp_info_real r where" |
| 2829 | 2829 | + " r.schedule_date_str BETWEEN '"+date+"' and '"+date2+"'"; |
| 2830 | 2830 | if(line.equals("")){ |
| ... | ... | @@ -2833,7 +2833,7 @@ public class ReportServiceImpl implements ReportService{ |
| 2833 | 2833 | }else{ |
| 2834 | 2834 | sql += " and r.xl_bm = '"+line+"'"; |
| 2835 | 2835 | } |
| 2836 | - sql += " group by r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh,r.j_name,r.s_name"; | |
| 2836 | + sql += " group by r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh"; | |
| 2837 | 2837 | listGroupBy=jdbcTemplate.query(sql, new RowMapper<Map<String, Object>>() { |
| 2838 | 2838 | @Override |
| 2839 | 2839 | public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException { |
| ... | ... | @@ -2842,8 +2842,8 @@ public class ReportServiceImpl implements ReportService{ |
| 2842 | 2842 | map.put("nbbm", arg0.getString("cl_zbh")); |
| 2843 | 2843 | map.put("jGh", arg0.getString("j_gh")); |
| 2844 | 2844 | map.put("sGh", arg0.getString("s_gh")); |
| 2845 | - map.put("jName", arg0.getString("j_name")); | |
| 2846 | - map.put("sName", arg0.getString("s_name")); | |
| 2845 | +// map.put("jName", arg0.getString("j_name")); | |
| 2846 | +// map.put("sName", arg0.getString("s_name")); | |
| 2847 | 2847 | return map; |
| 2848 | 2848 | } |
| 2849 | 2849 | }); |
| ... | ... | @@ -2870,6 +2870,15 @@ public class ReportServiceImpl implements ReportService{ |
| 2870 | 2870 | if(xl_bm.equals(s.getXlBm()) && nbbm.equals(s.getClZbh()) |
| 2871 | 2871 | && jGh.equals(s.getjGh()) && sGh.equals(s.getsGh())){ |
| 2872 | 2872 | lists.add(s); |
| 2873 | + | |
| 2874 | + if((m.get("jName") == null || m.get("jName").toString().length() == 0) | |
| 2875 | + && s.getjName() != null && s.getjName().length() > 0){ | |
| 2876 | + m.put("jName", s.getjName()); | |
| 2877 | + } | |
| 2878 | + if((m.get("sName") == null || m.get("sName").toString().length() == 0) | |
| 2879 | + && s.getsName() != null && s.getsName().length() > 0){ | |
| 2880 | + m.put("sName", s.getsName()); | |
| 2881 | + } | |
| 2873 | 2882 | } |
| 2874 | 2883 | } |
| 2875 | 2884 | } |
| ... | ... | @@ -2952,32 +2961,7 @@ public class ReportServiceImpl implements ReportService{ |
| 2952 | 2961 | |
| 2953 | 2962 | } |
| 2954 | 2963 | if(!zt.equals("zbh")){ |
| 2955 | - String sqls="select r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh,r.s_name,r.j_name" | |
| 2956 | - + " from bsth_c_s_sp_info_real r where" | |
| 2957 | - + " r.schedule_date_str BETWEEN '"+date+"' and '"+date2+"'"; | |
| 2958 | - if(line.equals("")){ | |
| 2959 | - sqls +="and r.gs_bm='"+gsdm+"' " | |
| 2960 | - + " and r.fgs_bm='"+fgsdm+"'"; | |
| 2961 | - }else{ | |
| 2962 | - sqls += " and r.xl_bm = '"+line+"'"; | |
| 2963 | - } | |
| 2964 | - sqls += " group by r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh,r.s_name,r.j_name"; | |
| 2965 | - | |
| 2966 | - List<Map<String, Object>> listGroupBys=jdbcTemplate.query(sqls, new RowMapper<Map<String, Object>>() { | |
| 2967 | - @Override | |
| 2968 | - public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException { | |
| 2969 | - Map<String, Object> map=new HashMap<String,Object>(); | |
| 2970 | - map.put("line",arg0.getString("xl_bm")); | |
| 2971 | - map.put("nbbm", arg0.getString("cl_zbh")); | |
| 2972 | - map.put("jGh", arg0.getString("j_gh")); | |
| 2973 | - map.put("sGh", arg0.getString("s_gh")); | |
| 2974 | - map.put("jName", arg0.getString("j_name")); | |
| 2975 | - map.put("sName", arg0.getString("s_name")); | |
| 2976 | - return map; | |
| 2977 | - } | |
| 2978 | - }); | |
| 2979 | - lMap=lists(listGroupBys, lMaps, gsdm, fgsdm, date, date2); | |
| 2980 | - | |
| 2964 | + lMap=lists(listGroupBy, lMaps, gsdm, fgsdm, date, date2); | |
| 2981 | 2965 | } |
| 2982 | 2966 | if(type.equals("export")){ |
| 2983 | 2967 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ... | ... |
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
| ... | ... | @@ -1270,8 +1270,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1270 | 1270 | |
| 1271 | 1271 | try { |
| 1272 | 1272 | String sql = "select a.schedule_date_str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name," |
| 1273 | - + " a.xl_bm, a.fgs_bm, a.cc_service, b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line" | |
| 1274 | - + " where schedule_date_str = '"+date+"'" | |
| 1273 | + + " a.xl_bm, a.fgs_bm, a.cc_service, (select start_opt from bsth_c_line_config where id =" | |
| 1274 | + + " (select max(id) from bsth_c_line_config where line = (select id from bsth_c_line where line_code = a.xl_bm))) start_opt" | |
| 1275 | + + " from bsth_c_s_sp_info_real a where schedule_date_str = '"+date+"'" | |
| 1275 | 1276 | + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'"; |
| 1276 | 1277 | if(line.trim().length() != 0) |
| 1277 | 1278 | sql += " and xl_bm = '"+line+"'"; |
| ... | ... | @@ -1302,7 +1303,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1302 | 1303 | schedule.setFgsBm(rs.getString("fgs_bm")); |
| 1303 | 1304 | schedule.setCcService(rs.getBoolean("cc_service")); |
| 1304 | 1305 | |
| 1305 | - int startOpt = 0; | |
| 1306 | + int startOpt = 120; | |
| 1306 | 1307 | if(rs.getString("start_opt") != null && rs.getString("start_opt").trim().length() != 0){ |
| 1307 | 1308 | String[] split = rs.getString("start_opt").split(":"); |
| 1308 | 1309 | startOpt = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); |
| ... | ... | @@ -1541,9 +1542,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1541 | 1542 | |
| 1542 | 1543 | try { |
| 1543 | 1544 | String sql = "select a.schedule_date_str, a.real_exec_date, a.xl_bm, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name," |
| 1544 | - + " a.fgs_bm, a.cc_service, a.remarks, a.adjust_exps, b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b " | |
| 1545 | - + " on a.xl_bm = b.line" | |
| 1546 | - + " where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'" | |
| 1545 | + + " a.fgs_bm, a.cc_service, a.remarks, a.adjust_exps, (select start_opt from bsth_c_line_config where id = " | |
| 1546 | + + " (select max(id) from bsth_c_line_config where line = (select id from bsth_c_line where line_code = a.xl_bm))) start_opt" | |
| 1547 | + + " from bsth_c_s_sp_info_real a where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'" | |
| 1547 | 1548 | + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'"; |
| 1548 | 1549 | if(line.length() != 0) |
| 1549 | 1550 | sql += " and xl_bm = '"+line+"'"; |
| ... | ... | @@ -1575,8 +1576,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1575 | 1576 | schedule.setCcService(rs.getBoolean("cc_service")); |
| 1576 | 1577 | schedule.setRemarks(rs.getString("remarks")!=null?rs.getString("remarks"):""); |
| 1577 | 1578 | schedule.setAdjustExps(rs.getString("adjust_exps")!=null?rs.getString("adjust_exps"):""); |
| 1578 | - | |
| 1579 | - int startOpt = 0; | |
| 1579 | + | |
| 1580 | + int startOpt = 120; | |
| 1580 | 1581 | if(rs.getString("start_opt") != null && rs.getString("start_opt").trim().length() != 0){ |
| 1581 | 1582 | String[] split = rs.getString("start_opt").split(":"); |
| 1582 | 1583 | startOpt = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | ... | ... |
src/main/java/com/bsth/util/ReportUtils.java
| ... | ... | @@ -324,6 +324,7 @@ public class ReportUtils { |
| 324 | 324 | int listIndex = 0; |
| 325 | 325 | // 取得模板行 |
| 326 | 326 | HSSFRow orgRow = sheet.getRow(index); |
| 327 | + HSSFCellStyle style= wb.createCellStyle(); | |
| 327 | 328 | try { |
| 328 | 329 | while (iterator.hasNext()) { |
| 329 | 330 | // 取得iterator的对象 |
| ... | ... | @@ -340,7 +341,7 @@ public class ReportUtils { |
| 340 | 341 | // 创建新行 |
| 341 | 342 | newRow = sheet.createRow(index + k++); |
| 342 | 343 | // 把新行的内容换成和模板行一样 |
| 343 | - copyRow(wb, orgRow, newRow, true, wb.createCellStyle()); | |
| 344 | + copyRow(wb, orgRow, newRow, true,style); | |
| 344 | 345 | tmpCellNum = newRow.getLastCellNum(); |
| 345 | 346 | for (int l = 0; l < tmpCellNum; l++) { |
| 346 | 347 | cell = newRow.getCell(l); | ... | ... |
src/main/resources/static/pages/forms/mould/jd_daily.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/jd_daily.html
| ... | ... | @@ -14,6 +14,11 @@ |
| 14 | 14 | |
| 15 | 15 | .table > tbody + tbody { |
| 16 | 16 | border-top: 1px solid; } |
| 17 | + | |
| 18 | + | |
| 19 | + #forms > thead > tr> td >label{ | |
| 20 | + word-break: keep-all;white-space:nowrap; | |
| 21 | + } | |
| 17 | 22 | </style> |
| 18 | 23 | |
| 19 | 24 | <div class="page-head"> |
| ... | ... | @@ -55,31 +60,33 @@ |
| 55 | 60 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 56 | 61 | <thead> |
| 57 | 62 | <tr> |
| 58 | - <th colspan="16">调度班次日报</th> | |
| 63 | + <th colspan="18">调度班次日报</th> | |
| 59 | 64 | </tr> |
| 60 | 65 | <tr> |
| 61 | - <td>线路</td> | |
| 62 | - <td colspan="7"><span id="form_line"> </span></td> | |
| 63 | - <td>时间</td> | |
| 64 | - <td colspan="7"><span id="form_date"> </span></td> | |
| 66 | + <td><label>线路</label></td> | |
| 67 | + <td colspan="8"><span id="form_line"> </span></td> | |
| 68 | + <td><label >时间</label></td> | |
| 69 | + <td colspan="8"><span id="form_date"> </span></td> | |
| 65 | 70 | </tr> |
| 66 | 71 | <tr> |
| 67 | - <td>路牌</td> | |
| 68 | - <td>车辆</td> | |
| 69 | - <td>工号</td> | |
| 70 | - <td>姓名</td> | |
| 71 | - <td>计划班次</td> | |
| 72 | - <td>计划营运里程</td> | |
| 73 | - <td>实际班次</td> | |
| 74 | - <td>实际营运里程</td> | |
| 75 | - <td>空驶里程</td> | |
| 76 | - <td>总里程</td> | |
| 77 | - <td>出场存油</td> | |
| 78 | - <td>进场存油</td> | |
| 79 | - <td>加注量</td> | |
| 80 | - <td>油耗</td> | |
| 81 | - <td>加注类别</td> | |
| 82 | - <td>电耗</td> | |
| 72 | + <td><label >线路</label></td> | |
| 73 | + <td><label >路牌</label></td> | |
| 74 | + <td><label >车辆</label></td> | |
| 75 | + <td><label >工号</label></td> | |
| 76 | + <td><label >姓名</label></td> | |
| 77 | + <td><label >计划班次</label></td> | |
| 78 | + <td><label >计划营运里程</label></td> | |
| 79 | + <td><label >实际班次</label></td> | |
| 80 | + <td><label >实际营运里程</label></td> | |
| 81 | + <td><label >空驶里程</label></td> | |
| 82 | + <td><label >总里程</label></td> | |
| 83 | + <td><label >总里程(四舍五入)</label></td> | |
| 84 | + <td><label >出场存油</label></td> | |
| 85 | + <td><label >进场存油</label></td> | |
| 86 | + <td><label >加注量</label></td> | |
| 87 | + <td><label >油耗</label></td> | |
| 88 | + <td><label >加注类别</label></td> | |
| 89 | + <td><label >电耗</label></td> | |
| 83 | 90 | </tr> |
| 84 | 91 | </thead> |
| 85 | 92 | <tbody id="tbody"> |
| ... | ... | @@ -138,7 +145,7 @@ |
| 138 | 145 | $("#gsdmDaily").on("change",updateCompany); |
| 139 | 146 | function updateCompany(){ |
| 140 | 147 | var company = $('#gsdmDaily').val(); |
| 141 | - var options = ''; | |
| 148 | + var options = '<option value="">全部分公司</option>'; | |
| 142 | 149 | for(var i = 0; i < obj.length; i++){ |
| 143 | 150 | if(obj[i].companyCode == company){ |
| 144 | 151 | var children = obj[i].children; |
| ... | ... | @@ -153,7 +160,7 @@ |
| 153 | 160 | var tempData = {}; |
| 154 | 161 | $.get('/report/lineList',function(xlList){ |
| 155 | 162 | var data = []; |
| 156 | -// data.push({id: " ", text: "全部线路"}); | |
| 163 | + data.push({id: " ", text: "全部线路"}); | |
| 157 | 164 | $.get('/user/companyData', function(result){ |
| 158 | 165 | for(var i = 0; i < result.length; i++){ |
| 159 | 166 | var companyCode = result[i].companyCode; |
| ... | ... | @@ -204,7 +211,7 @@ |
| 204 | 211 | fgsdmDaily = $("#fgsdmDaily").val(); |
| 205 | 212 | lineName=$("#select2-line-container").html(); |
| 206 | 213 | var i = layer.load(2); |
| 207 | - $get('/jdtest/daily',{ line:line,date:date,type:'query'},function(result){ | |
| 214 | + $get('/jdtest/daily',{ gsbm:gsdmDaily,fgsbm:fgsdmDaily, line:line,date:date,type:'query'},function(result){ | |
| 208 | 215 | $("#form_line").text(lineName); |
| 209 | 216 | $("#form_date").text(date); |
| 210 | 217 | // 把数据填充到模版中 |
| ... | ... | @@ -222,9 +229,15 @@ |
| 222 | 229 | } |
| 223 | 230 | line = $("#line").val(); |
| 224 | 231 | date = $("#date").val(); |
| 225 | - lineName=$("#select2-line-container").html(); | |
| 232 | + | |
| 233 | + lineName = $("#select2-line-container").html(); | |
| 234 | + if(lineName == "全部线路") | |
| 235 | + lineName = $('#fgsdmDaily option:selected').text()+"全部线路"; | |
| 236 | + if(lineName == "全部分公司全部线路") | |
| 237 | + lineName = $('#gsdmDaily option:selected').text()+"全部线路"; | |
| 238 | + | |
| 226 | 239 | var i = layer.load(2); |
| 227 | - $get('/jdtest/daily',{line:line,date:date,type:'export',lineName:lineName},function(result){ | |
| 240 | + $get('/jdtest/daily',{gsbm:gsdmDaily,fgsbm:fgsdmDaily,line:line,date:date,type:'export',lineName:lineName},function(result){ | |
| 228 | 241 | window.open("/downloadFile/download?fileName=" |
| 229 | 242 | +date+"-"+lineName+"-班次日报表"); |
| 230 | 243 | layer.close(i); |
| ... | ... | @@ -235,6 +248,7 @@ |
| 235 | 248 | <script type="text/html" id="dailyJdtest"> |
| 236 | 249 | {{each list as obj i}} |
| 237 | 250 | <tr> |
| 251 | + <td>{{obj.xlName}}</td> | |
| 238 | 252 | <td>{{obj.lp}}</td> |
| 239 | 253 | <td>{{obj.clZbh}}</td> |
| 240 | 254 | <td>{{obj.jGh}}</td> |
| ... | ... | @@ -245,6 +259,7 @@ |
| 245 | 259 | <td>{{obj.sjzlc}}</td> |
| 246 | 260 | <td>{{obj.kszlc}}</td> |
| 247 | 261 | <td>{{obj.zlc}}</td> |
| 262 | + <td>{{obj.zlc2}}</td> | |
| 248 | 263 | <td>{{obj.czyl}}</td> |
| 249 | 264 | <td>{{obj.jzyl}}</td> |
| 250 | 265 | <td>{{obj.jzl}}</td> | ... | ... |
src/main/resources/static/pages/forms/statement/scheduleDaily.html
| ... | ... | @@ -467,7 +467,7 @@ |
| 467 | 467 | divFrom2 = window.document.getElementById('forms_1'); |
| 468 | 468 | divFrom2.style.width=divFrom1.offsetWidth+"px"; |
| 469 | 469 | }); |
| 470 | - $.get('/realSchedule/realScheduleList',{line:line,date:date,type:"query"},function(result){ | |
| 470 | + $.get('/realSchedule/realScheduleList_zrw',{line:line,date:date,type:"query"},function(result){ | |
| 471 | 471 | getTime(result); |
| 472 | 472 | var scheduleDaily_3 = template('scheduleDaily_3',{list:result}); |
| 473 | 473 | $('#forms_2 .scheduleDaily_3').html(scheduleDaily_3); |
| ... | ... | @@ -513,7 +513,7 @@ |
| 513 | 513 | params['xlName'] = xlName; |
| 514 | 514 | params['type'] = "export"; |
| 515 | 515 | params['state'] = '2'; |
| 516 | - params['genre'] = 'fqp'; | |
| 516 | + params['genre'] = 'zrw'; | |
| 517 | 517 | $get('/realSchedule/scheduleDailyExport', params, function(result){ |
| 518 | 518 | if(date.length == 10) |
| 519 | 519 | window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+lineName+"-调度日报"); | ... | ... |