Commit dc8782d20918d991f22a280b780923396f9160c1

Authored by 王通
2 parents 377da8d9 e47e6605

Merge branch 'pudong' into jiading

src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
@@ -89,12 +89,12 @@ public class FormsServiceImpl implements FormsService { @@ -89,12 +89,12 @@ public class FormsServiceImpl implements FormsService {
89 String date=map.get("date").toString(); 89 String date=map.get("date").toString();
90 90
91 String sql="select " 91 String sql="select "
92 - + " r.cl_zbh,r.j_gh,r.j_name" 92 + + " r.cl_zbh,r.j_gh"
93 + " from bsth_c_s_sp_info_real r where " 93 + " from bsth_c_s_sp_info_real r where "
94 + " r.schedule_date_str = '"+date+"'" 94 + " r.schedule_date_str = '"+date+"'"
95 + " and r.xl_bm = '"+line+"' " 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 List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() { 99 List<Waybillday> list = jdbcTemplate.query(sql, new RowMapper<Waybillday>() {
100 100
@@ -102,7 +102,7 @@ public class FormsServiceImpl implements FormsService { @@ -102,7 +102,7 @@ public class FormsServiceImpl implements FormsService {
102 public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException { 102 public Waybillday mapRow(ResultSet arg0, int arg1) throws SQLException {
103 Waybillday w=new Waybillday(); 103 Waybillday w=new Waybillday();
104 w.setJgh(arg0.getString("j_gh")); 104 w.setJgh(arg0.getString("j_gh"));
105 - w.setjName(arg0.getString("j_name")); 105 +// w.setjName(arg0.getString("j_name"));
106 w.setNbbm(arg0.getString("cl_zbh")); 106 w.setNbbm(arg0.getString("cl_zbh"));
107 return w; 107 return w;
108 108
@@ -118,14 +118,19 @@ public class FormsServiceImpl implements FormsService { @@ -118,14 +118,19 @@ public class FormsServiceImpl implements FormsService {
118 for (int j = 0; j < realList.size(); j++) { 118 for (int j = 0; j < realList.size(); j++) {
119 ScheduleRealInfo s=realList.get(j); 119 ScheduleRealInfo s=realList.get(j);
120 if(w.getNbbm().equals(s.getClZbh()) && w.getJgh().equals(s.getjGh())){ 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 listInfo.add(s); 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,11 +260,11 @@ public class FormsServiceImpl implements FormsService {
255 } 260 }
256 String sql ="select "; 261 String sql ="select ";
257 if(empnames.equals("驾驶员")){ 262 if(empnames.equals("驾驶员")){
258 - sql += " r.j_name,r.j_gh "; 263 + sql += " r.j_gh ";
259 }else if(empnames.equals("售票员")){ 264 }else if(empnames.equals("售票员")){
260 - sql += " r.s_gh,r.s_name"; 265 + sql += " r.s_gh ";
261 }else{ 266 }else{
262 - sql += " r.cl_zbh"; 267 + sql += " r.cl_zbh ";
263 } 268 }
264 sql += " from bsth_c_s_sp_info_real r where " 269 sql += " from bsth_c_s_sp_info_real r where "
265 + " r.schedule_date_str >= '" + map.get("startDate").toString() + "' " 270 + " r.schedule_date_str >= '" + map.get("startDate").toString() + "' "
@@ -271,9 +276,9 @@ public class FormsServiceImpl implements FormsService { @@ -271,9 +276,9 @@ public class FormsServiceImpl implements FormsService {
271 276
272 if(empnames.equals("驾驶员")){ 277 if(empnames.equals("驾驶员")){
273 sql += " GROUP BY " 278 sql += " GROUP BY "
274 - + "r.j_name,r.j_gh"; 279 + + " r.j_gh ";
275 }else if(empnames.equals("售票员")){ 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 }else{ 282 }else{
278 sql += " GROUP BY r.cl_zbh"; 283 sql += " GROUP BY r.cl_zbh";
279 } 284 }
@@ -284,17 +289,14 @@ public class FormsServiceImpl implements FormsService { @@ -284,17 +289,14 @@ public class FormsServiceImpl implements FormsService {
284 public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { 289 public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException {
285 Shiftuehiclemanth shif = new Shiftuehiclemanth(); 290 Shiftuehiclemanth shif = new Shiftuehiclemanth();
286 if(empnames.equals("驾驶员")){ 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 shif.setJgh(arg0.getString("j_gh")); 293 shif.setJgh(arg0.getString("j_gh"));
289 }else if(empnames.equals("售票员")){ 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 shif.setSgh(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh")); 296 shif.setSgh(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh"));
292 }else if(empnames.equals("车辆自编号")){ 297 }else if(empnames.equals("车辆自编号")){
293 shif.setjName(arg0.getString("cl_zbh")); 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 return shif; 300 return shif;
299 } 301 }
300 }); 302 });
@@ -322,7 +324,11 @@ public class FormsServiceImpl implements FormsService { @@ -322,7 +324,11 @@ public class FormsServiceImpl implements FormsService {
322 list_s.add(s); 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 }else if(empnames.equals("售票员")){ 333 }else if(empnames.equals("售票员")){
328 String sgh=s.getsGh()==null?"":s.getsGh(); 334 String sgh=s.getsGh()==null?"":s.getsGh();
@@ -336,6 +342,11 @@ public class FormsServiceImpl implements FormsService { @@ -336,6 +342,11 @@ public class FormsServiceImpl implements FormsService {
336 list_s.add(s); 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 }else if(empnames.equals("车辆自编号")){ 351 }else if(empnames.equals("车辆自编号")){
341 if(d.getjName().equals(s.getClZbh())){ 352 if(d.getjName().equals(s.getClZbh())){
@@ -413,19 +424,19 @@ public class FormsServiceImpl implements FormsService { @@ -413,19 +424,19 @@ public class FormsServiceImpl implements FormsService {
413 final String empnames=map.get("empnames").toString(); 424 final String empnames=map.get("empnames").toString();
414 String gsdmManth=""; 425 String gsdmManth="";
415 String fgsdmManth=""; 426 String fgsdmManth="";
416 - if(map.get("gsdmManth")!=null){ 427 + if(map.get("gsdmManth") != null){
417 gsdmManth=map.get("gsdmManth").toString(); 428 gsdmManth=map.get("gsdmManth").toString();
418 } 429 }
419 - if(map.get("fgsdmManth")!=null){ 430 + if(map.get("fgsdmManth") != null){
420 fgsdmManth=map.get("fgsdmManth").toString(); 431 fgsdmManth=map.get("fgsdmManth").toString();
421 } 432 }
422 String sql ="select "; 433 String sql ="select ";
423 if(empnames.equals("驾驶员")){ 434 if(empnames.equals("驾驶员")){
424 - sql += " r.j_name,r.j_gh "; 435 + sql += " r.j_gh ";
425 }else if(empnames.equals("售票员")){ 436 }else if(empnames.equals("售票员")){
426 - sql += " r.s_gh,r.s_name"; 437 + sql += " r.s_gh ";
427 }else{ 438 }else{
428 - sql += " r.cl_zbh"; 439 + sql += " r.cl_zbh ";
429 } 440 }
430 sql += " from bsth_c_s_sp_info_real r where " 441 sql += " from bsth_c_s_sp_info_real r where "
431 + " r.schedule_date_str >= '" + map.get("startDate").toString() + "' " 442 + " r.schedule_date_str >= '" + map.get("startDate").toString() + "' "
@@ -437,9 +448,9 @@ public class FormsServiceImpl implements FormsService { @@ -437,9 +448,9 @@ public class FormsServiceImpl implements FormsService {
437 448
438 if(empnames.equals("驾驶员")){ 449 if(empnames.equals("驾驶员")){
439 sql += " GROUP BY " 450 sql += " GROUP BY "
440 - + "r.j_name,r.j_gh"; 451 + + " r.j_gh ";
441 }else if(empnames.equals("售票员")){ 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 }else{ 454 }else{
444 sql += " GROUP BY r.cl_zbh"; 455 sql += " GROUP BY r.cl_zbh";
445 } 456 }
@@ -450,17 +461,14 @@ public class FormsServiceImpl implements FormsService { @@ -450,17 +461,14 @@ public class FormsServiceImpl implements FormsService {
450 public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { 461 public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException {
451 Shiftuehiclemanth shif = new Shiftuehiclemanth(); 462 Shiftuehiclemanth shif = new Shiftuehiclemanth();
452 if(empnames.equals("驾驶员")){ 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 shif.setJgh(arg0.getString("j_gh")); 465 shif.setJgh(arg0.getString("j_gh"));
455 }else if(empnames.equals("售票员")){ 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 shif.setSgh(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh")); 468 shif.setSgh(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh"));
458 }else if(empnames.equals("车辆自编号")){ 469 }else if(empnames.equals("车辆自编号")){
459 shif.setjName(arg0.getString("cl_zbh")); 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 return shif; 472 return shif;
465 } 473 }
466 }); 474 });
@@ -488,7 +496,11 @@ public class FormsServiceImpl implements FormsService { @@ -488,7 +496,11 @@ public class FormsServiceImpl implements FormsService {
488 list_s.add(s); 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 }else if(empnames.equals("售票员")){ 505 }else if(empnames.equals("售票员")){
494 String sgh=s.getsGh()==null?"":s.getsGh(); 506 String sgh=s.getsGh()==null?"":s.getsGh();
@@ -502,6 +514,11 @@ public class FormsServiceImpl implements FormsService { @@ -502,6 +514,11 @@ public class FormsServiceImpl implements FormsService {
502 list_s.add(s); 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 }else if(empnames.equals("车辆自编号")){ 523 }else if(empnames.equals("车辆自编号")){
507 if(d.getjName().equals(s.getClZbh())){ 524 if(d.getjName().equals(s.getClZbh())){
@@ -885,7 +902,7 @@ public class FormsServiceImpl implements FormsService { @@ -885,7 +902,7 @@ public class FormsServiceImpl implements FormsService {
885 List<Singledata> list_=new ArrayList<Singledata>(); 902 List<Singledata> list_=new ArrayList<Singledata>();
886 if(tjtype.equals("jsy")){ 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 + " from bsth_c_s_sp_info_real r where " 906 + " from bsth_c_s_sp_info_real r where "
890 + " r.schedule_date_str = '"+startDate+"'"; 907 + " r.schedule_date_str = '"+startDate+"'";
891 if(xlbm.length() != 0){ 908 if(xlbm.length() != 0){
@@ -897,7 +914,7 @@ public class FormsServiceImpl implements FormsService { @@ -897,7 +914,7 @@ public class FormsServiceImpl implements FormsService {
897 if(fgsdm.length() != 0){ 914 if(fgsdm.length() != 0){
898 sql += " and r.fgs_bm ='"+fgsdm+"'"; 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 "order by r.xl_bm,r.cl_zbh"; 918 "order by r.xl_bm,r.cl_zbh";
902 919
903 920
@@ -907,7 +924,7 @@ public class FormsServiceImpl implements FormsService { @@ -907,7 +924,7 @@ public class FormsServiceImpl implements FormsService {
907 Singledata sin = new Singledata(); 924 Singledata sin = new Singledata();
908 sin.setxL(arg0.getString("xl_bm")); 925 sin.setxL(arg0.getString("xl_bm"));
909 sin.setJsy(arg0.getString("j_gh")); 926 sin.setJsy(arg0.getString("j_gh"));
910 - sin.setjName(arg0.getString("j_name")); 927 +// sin.setjName(arg0.getString("j_name"));
911 sin.setClzbh(arg0.getString("cl_zbh")); 928 sin.setClzbh(arg0.getString("cl_zbh"));
912 sin.setgS(arg0.getString("fgs_bm")); 929 sin.setgS(arg0.getString("fgs_bm"));
913 return sin; 930 return sin;
@@ -968,7 +985,7 @@ public class FormsServiceImpl implements FormsService { @@ -968,7 +985,7 @@ public class FormsServiceImpl implements FormsService {
968 if(fages){ 985 if(fages){
969 Singledata s=new Singledata(); 986 Singledata s=new Singledata();
970 s.setJsy(jsy); 987 s.setJsy(jsy);
971 - s.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); 988 +// s.setjName(BasicData.allPerson.get(gsdm+"-"+jsy));
972 s.setClzbh(clzbh); 989 s.setClzbh(clzbh);
973 s.setSgh(""); 990 s.setSgh("");
974 s.setsName(""); 991 s.setsName("");
@@ -1023,6 +1040,11 @@ public class FormsServiceImpl implements FormsService { @@ -1023,6 +1040,11 @@ public class FormsServiceImpl implements FormsService {
1023 newList_.add(s); 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 double jhgl=culateMileageService.culateJhgl(newList); 1050 double jhgl=culateMileageService.culateJhgl(newList);
@@ -1034,12 +1056,15 @@ public class FormsServiceImpl implements FormsService { @@ -1034,12 +1056,15 @@ public class FormsServiceImpl implements FormsService {
1034 1056
1035 double zyygl=Arith.add(yygl, ljgl); 1057 double zyygl=Arith.add(yygl, ljgl);
1036 double zksgl=Arith.add(ksgl, jcgl); 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 sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl))); 1063 sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl)));
1038 sin.setEmptMileage(String.valueOf(zksgl)); 1064 sin.setEmptMileage(String.valueOf(zksgl));
1039 sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); 1065 sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc)));
1040 sin.setXlmc(BasicData.lineCode2NameMap.get(line)); 1066 sin.setXlmc(BasicData.lineCode2NameMap.get(line));
1041 sin.setrQ(startDate); 1067 sin.setrQ(startDate);
1042 -// sin.setjName(BasicData.allPerson.get(gsdm+"-"+jsy));  
1043 sin.setSgh(""); 1068 sin.setSgh("");
1044 sin.setsName(""); 1069 sin.setsName("");
1045 sin.setgS(BasicData.businessFgsCodeNameMap.get(sin.getgS()+"_"+gsdm)); 1070 sin.setgS(BasicData.businessFgsCodeNameMap.get(sin.getgS()+"_"+gsdm));
@@ -1180,7 +1205,7 @@ public class FormsServiceImpl implements FormsService { @@ -1180,7 +1205,7 @@ public class FormsServiceImpl implements FormsService {
1180 List<Singledata> list_=new ArrayList<Singledata>(); 1205 List<Singledata> list_=new ArrayList<Singledata>();
1181 if(tjtype.equals("jsy")){ 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 + " from bsth_c_s_sp_info_real r where " 1209 + " from bsth_c_s_sp_info_real r where "
1185 + " r.schedule_date_str = '"+startDate+"'"; 1210 + " r.schedule_date_str = '"+startDate+"'";
1186 if(!xlbm.equals("")){ 1211 if(!xlbm.equals("")){
@@ -1192,14 +1217,14 @@ public class FormsServiceImpl implements FormsService { @@ -1192,14 +1217,14 @@ public class FormsServiceImpl implements FormsService {
1192 if(!fgsdm.equals("")){ 1217 if(!fgsdm.equals("")){
1193 sql += " and r.fgs_bm='"+fgsdm+"'"; 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 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { 1221 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
1197 @Override 1222 @Override
1198 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { 1223 public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException {
1199 Singledata sin = new Singledata(); 1224 Singledata sin = new Singledata();
1200 sin.setxL(arg0.getString("xl_bm")); 1225 sin.setxL(arg0.getString("xl_bm"));
1201 sin.setJsy(arg0.getString("j_gh")); 1226 sin.setJsy(arg0.getString("j_gh"));
1202 - sin.setjName(arg0.getString("j_name")); 1227 +// sin.setjName(arg0.getString("j_name"));
1203 sin.setClzbh(arg0.getString("cl_zbh")); 1228 sin.setClzbh(arg0.getString("cl_zbh"));
1204 return sin; 1229 return sin;
1205 } 1230 }
@@ -1310,6 +1335,11 @@ public class FormsServiceImpl implements FormsService { @@ -1310,6 +1335,11 @@ public class FormsServiceImpl implements FormsService {
1310 newList_.add(s); 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 double jhgl=culateMileageService.culateJhgl(newList); 1345 double jhgl=culateMileageService.culateJhgl(newList);
@@ -1319,6 +1349,9 @@ public class FormsServiceImpl implements FormsService { @@ -1319,6 +1349,9 @@ public class FormsServiceImpl implements FormsService {
1319 double ksgl=culateMileageService.culateKsgl(newList_); 1349 double ksgl=culateMileageService.culateKsgl(newList_);
1320 double jcgl=culateMileageService.culateJccgl(newList_); 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 double zyygl=Arith.add(yygl, ljgl); 1355 double zyygl=Arith.add(yygl, ljgl);
1323 double zksgl=Arith.add(ksgl, jcgl); 1356 double zksgl=Arith.add(ksgl, jcgl);
1324 sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl))); 1357 sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl)));
@@ -1326,7 +1359,6 @@ public class FormsServiceImpl implements FormsService { @@ -1326,7 +1359,6 @@ public class FormsServiceImpl implements FormsService {
1326 sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); 1359 sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc)));
1327 sin.setXlmc(BasicData.lineCode2NameMap.get(line)); 1360 sin.setXlmc(BasicData.lineCode2NameMap.get(line));
1328 sin.setrQ(startDate); 1361 sin.setrQ(startDate);
1329 -// sin.setjName(BasicData.allPerson.get(gsdm+"-"+jsy));  
1330 sin.setSgh(""); 1362 sin.setSgh("");
1331 sin.setsName(""); 1363 sin.setsName("");
1332 sin.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); 1364 sin.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm));
@@ -1335,7 +1367,7 @@ public class FormsServiceImpl implements FormsService { @@ -1335,7 +1367,7 @@ public class FormsServiceImpl implements FormsService {
1335 } 1367 }
1336 Collections.sort(list_,new SingledataByXlbm()); 1368 Collections.sort(list_,new SingledataByXlbm());
1337 }else{ 1369 }else{
1338 - String sql="select r.s_gh,r.s_name, " 1370 + String sql="select r.s_gh, "
1339 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" 1371 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm"
1340 + " from bsth_c_s_sp_info_real r where " 1372 + " from bsth_c_s_sp_info_real r where "
1341 + " r.schedule_date_str = '"+startDate+"'" 1373 + " r.schedule_date_str = '"+startDate+"'"
@@ -1349,7 +1381,7 @@ public class FormsServiceImpl implements FormsService { @@ -1349,7 +1381,7 @@ public class FormsServiceImpl implements FormsService {
1349 if(!fgsdm.equals("")){ 1381 if(!fgsdm.equals("")){
1350 sql += " and r.fgs_bm='"+fgsdm+"'"; 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 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; 1385 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh";
1354 1386
1355 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { 1387 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
@@ -1361,7 +1393,7 @@ public class FormsServiceImpl implements FormsService { @@ -1361,7 +1393,7 @@ public class FormsServiceImpl implements FormsService {
1361 sin.setxL(arg0.getString("xl_bm")); 1393 sin.setxL(arg0.getString("xl_bm"));
1362 sin.setClzbh(arg0.getString("cl_zbh")); 1394 sin.setClzbh(arg0.getString("cl_zbh"));
1363 sin.setSgh(arg0.getString("s_gh")); 1395 sin.setSgh(arg0.getString("s_gh"));
1364 - sin.setsName(arg0.getString("s_name")); 1396 +// sin.setsName(arg0.getString("s_name"));
1365 return sin; 1397 return sin;
1366 } 1398 }
1367 }); 1399 });
@@ -1387,6 +1419,11 @@ public class FormsServiceImpl implements FormsService { @@ -1387,6 +1419,11 @@ public class FormsServiceImpl implements FormsService {
1387 newList_.add(s); 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 double jhgl=culateMileageService.culateJhgl(newList); 1429 double jhgl=culateMileageService.culateJhgl(newList);
@@ -1404,6 +1441,9 @@ public class FormsServiceImpl implements FormsService { @@ -1404,6 +1441,9 @@ public class FormsServiceImpl implements FormsService {
1404 double zksgl=culateMileageService.culateSjfyylc_spy(newList_); 1441 double zksgl=culateMileageService.culateSjfyylc_spy(newList_);
1405 sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl))); 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 sin.setEmptMileage(String.valueOf(zksgl)); 1447 sin.setEmptMileage(String.valueOf(zksgl));
1408 sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); 1448 sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc)));
1409 sin.setXlmc(BasicData.lineCode2NameMap.get(line)); 1449 sin.setXlmc(BasicData.lineCode2NameMap.get(line));
@@ -1730,7 +1770,7 @@ public class FormsServiceImpl implements FormsService { @@ -1730,7 +1770,7 @@ public class FormsServiceImpl implements FormsService {
1730 startDate = map.get("startDate").toString(); 1770 startDate = map.get("startDate").toString();
1731 1771
1732 String sql="select r.s_gh,r.s_name, " 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 + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+startDate+"'"; 1774 + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+startDate+"'";
1735 if(!xlbm.equals("")){ 1775 if(!xlbm.equals("")){
1736 sql += " and r.xl_bm = '"+xlbm+"'"; 1776 sql += " and r.xl_bm = '"+xlbm+"'";
@@ -1742,7 +1782,7 @@ public class FormsServiceImpl implements FormsService { @@ -1742,7 +1782,7 @@ public class FormsServiceImpl implements FormsService {
1742 sql += " and r.fgs_bm='"+fgsdm+"'"; 1782 sql += " and r.fgs_bm='"+fgsdm+"'";
1743 } 1783 }
1744 sql += " group by r.s_gh,r.s_name," 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 List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { 1787 List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
1748 //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); 1788 //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
@@ -1753,7 +1793,7 @@ public class FormsServiceImpl implements FormsService { @@ -1753,7 +1793,7 @@ public class FormsServiceImpl implements FormsService {
1753 sin.setxL(arg0.getString("xl_bm")); 1793 sin.setxL(arg0.getString("xl_bm"));
1754 sin.setClzbh(arg0.getString("cl_zbh")); 1794 sin.setClzbh(arg0.getString("cl_zbh"));
1755 sin.setJsy(arg0.getString("j_gh")); 1795 sin.setJsy(arg0.getString("j_gh"));
1756 - sin.setjName(arg0.getString("j_name")); 1796 +// sin.setjName(arg0.getString("j_name"));
1757 sin.setSgh(arg0.getString("s_gh")); 1797 sin.setSgh(arg0.getString("s_gh"));
1758 sin.setsName(arg0.getString("s_name")); 1798 sin.setsName(arg0.getString("s_name"));
1759 sin.setXlmc(arg0.getString("xl_name")); 1799 sin.setXlmc(arg0.getString("xl_name"));
@@ -1780,6 +1820,11 @@ public class FormsServiceImpl implements FormsService { @@ -1780,6 +1820,11 @@ public class FormsServiceImpl implements FormsService {
1780 if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh) 1820 if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh)
1781 &&s.getXlBm().equals(xl)&&s.getsGh().equals(spy)){ 1821 &&s.getXlBm().equals(xl)&&s.getsGh().equals(spy)){
1782 newList.add(s); 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,8 +2487,6 @@ public class FormsServiceImpl implements FormsService {
2442 sql += " group by r.gs_bm, r.fgs_bm, r.xl_bm " + 2487 sql += " group by r.gs_bm, r.fgs_bm, r.xl_bm " +
2443 "order by r.gs_bm, r.fgs_bm, r.xl_bm"; 2488 "order by r.gs_bm, r.fgs_bm, r.xl_bm";
2444 2489
2445 - System.out.println(sql);  
2446 -  
2447 List<Operationservice> query = jdbcTemplate.query(sql, new RowMapper<Operationservice>() { 2490 List<Operationservice> query = jdbcTemplate.query(sql, new RowMapper<Operationservice>() {
2448 @Override 2491 @Override
2449 public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { 2492 public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException {
@@ -2605,10 +2648,10 @@ public class FormsServiceImpl implements FormsService { @@ -2605,10 +2648,10 @@ public class FormsServiceImpl implements FormsService {
2605 public List<Vehicleloading> vehicleloading(String line, String date) { 2648 public List<Vehicleloading> vehicleloading(String line, String date) {
2606 2649
2607 String sql="select r.s_gh,r.s_name, " 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 + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+date+"' " 2652 + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+date+"' "
2610 + " and r.xl_bm = '"+line+"' group by r.s_gh,r.s_name," 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 List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() { 2656 List<Vehicleloading> list = jdbcTemplate.query(sql, new RowMapper<Vehicleloading>() {
2614 @Override 2657 @Override
@@ -3089,7 +3132,7 @@ public class FormsServiceImpl implements FormsService { @@ -3089,7 +3132,7 @@ public class FormsServiceImpl implements FormsService {
3089 + " on t.cl_zbh = x.nbbm and t.j_gh=x.jsy";*/ 3132 + " on t.cl_zbh = x.nbbm and t.j_gh=x.jsy";*/
3090 3133
3091 String sql="select r.schedule_date_str, " 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 + " from bsth_c_s_sp_info_real r where " 3136 + " from bsth_c_s_sp_info_real r where "
3094 + "r.schedule_date_str = '"+map.get("date").toString()+"'"; 3137 + "r.schedule_date_str = '"+map.get("date").toString()+"'";
3095 if(!xlbm.equals("")){ 3138 if(!xlbm.equals("")){
@@ -3101,8 +3144,8 @@ public class FormsServiceImpl implements FormsService { @@ -3101,8 +3144,8 @@ public class FormsServiceImpl implements FormsService {
3101 if(!fgsbm.equals("")){ 3144 if(!fgsbm.equals("")){
3102 sql += " and r.fgs_bm='"+fgsbm+"'"; 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 List<Daily> list = jdbcTemplate.query(sql, new RowMapper<Daily>() { 3150 List<Daily> list = jdbcTemplate.query(sql, new RowMapper<Daily>() {
3108 @Override 3151 @Override
@@ -3111,7 +3154,7 @@ public class FormsServiceImpl implements FormsService { @@ -3111,7 +3154,7 @@ public class FormsServiceImpl implements FormsService {
3111 daily.setRq(arg0.getString("schedule_date_str")); 3154 daily.setRq(arg0.getString("schedule_date_str"));
3112 daily.setZbh(arg0.getString("cl_zbh")); 3155 daily.setZbh(arg0.getString("cl_zbh"));
3113 daily.setJgh(arg0.getString("j_gh")); 3156 daily.setJgh(arg0.getString("j_gh"));
3114 - daily.setjName(arg0.getString("j_name")); 3157 +// daily.setjName(arg0.getString("j_name"));
3115 return daily; 3158 return daily;
3116 } 3159 }
3117 }); 3160 });
@@ -3140,15 +3183,19 @@ public class FormsServiceImpl implements FormsService { @@ -3140,15 +3183,19 @@ public class FormsServiceImpl implements FormsService {
3140 for (int j = 0; j < lists.size(); j++) { 3183 for (int j = 0; j < lists.size(); j++) {
3141 ScheduleRealInfo s=lists.get(j); 3184 ScheduleRealInfo s=lists.get(j);
3142 if(d.getJgh().equals(s.getjGh()) && d.getZbh().equals(s.getClZbh())){ 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 sList.add(s); 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,7 +47,6 @@ import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
47 import com.bsth.service.BusIntervalService; 47 import com.bsth.service.BusIntervalService;
48 import com.bsth.service.LineService; 48 import com.bsth.service.LineService;
49 import com.bsth.service.report.CulateMileageService; 49 import com.bsth.service.report.CulateMileageService;
50 -import com.bsth.service.schedule.PeopleCarPlanService;  
51 import com.bsth.service.sys.DictionaryService; 50 import com.bsth.service.sys.DictionaryService;
52 import com.bsth.service.sys.DutyEmployeeService; 51 import com.bsth.service.sys.DutyEmployeeService;
53 import com.bsth.util.Arith; 52 import com.bsth.util.Arith;
@@ -69,9 +68,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -69,9 +68,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
69 CulateMileageService culateService; 68 CulateMileageService culateService;
70 69
71 @Autowired 70 @Autowired
72 - private PeopleCarPlanService peopleCarPlanService;  
73 -  
74 - @Autowired  
75 private ScheduleRealInfoRepository scheduleRealInfoRepository; 71 private ScheduleRealInfoRepository scheduleRealInfoRepository;
76 72
77 @Autowired 73 @Autowired
@@ -103,33 +99,47 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -103,33 +99,47 @@ public class BusIntervalServiceImpl implements BusIntervalService {
103 99
104 try { 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 if(line.length() != 0){ 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 - } 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);
121 } 113 }
122 - if(company.length() != 0){  
123 - sql += " and gs_bm = '"+company+"'"; 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 if(normal){ 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 new RowMapper<ScheduleRealInfo>(){ 143 new RowMapper<ScheduleRealInfo>(){
134 @Override 144 @Override
135 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { 145 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -225,14 +235,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -225,14 +235,11 @@ public class BusIntervalServiceImpl implements BusIntervalService {
225 }); 235 });
226 236
227 if(model.length() != 0){ 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 new RowMapper<Long>(){ 243 new RowMapper<Long>(){
237 @Override 244 @Override
238 public Long mapRow(ResultSet rs, int rowNum) throws SQLException { 245 public Long mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -308,15 +315,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -308,15 +315,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
308 315
309 String sql = "select id,cc_id,mileage_type,destroy,destroy_reason," + 316 String sql = "select id,cc_id,mileage_type,destroy,destroy_reason," +
310 " mileage,type1,type2,schedule from bsth_c_s_child_task" + 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 new RowMapper<ChildTaskPlan>(){ 321 new RowMapper<ChildTaskPlan>(){
321 @Override 322 @Override
322 public ChildTaskPlan mapRow(ResultSet rs, int rowNum) throws SQLException { 323 public ChildTaskPlan mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -358,9 +359,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -358,9 +359,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
358 359
359 try { 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 new RowMapper<Map<String, Object>>(){ 365 new RowMapper<Map<String, Object>>(){
365 @Override 366 @Override
366 public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { 367 public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -393,19 +394,16 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -393,19 +394,16 @@ public class BusIntervalServiceImpl implements BusIntervalService {
393 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); 394 List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
394 395
395 String line = map.get("line").toString(); 396 String line = map.get("line").toString();
396 - String ttId = map.get("ttId").toString(); 397 +// String ttId = map.get("ttId").toString();
397 398
398 try { 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 new RowMapper<Map<String, Object>>(){ 407 new RowMapper<Map<String, Object>>(){
410 @Override 408 @Override
411 public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { 409 public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -804,31 +802,36 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -804,31 +802,36 @@ public class BusIntervalServiceImpl implements BusIntervalService {
804 802
805 try { 803 try {
806 804
807 - String where = ""; 805 + List<String> strList = new ArrayList<String>();
  806 + strList.add(startDate);
  807 + strList.add(endDate);
808 if(line.length() != 0 && statu.equals("1")){ 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 if(lp.length() != 0 && statu.equals("1")){ 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 if(sfqr == 1){ 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 String sql = "select id, schedule_date_str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type, xl_bm, fgs_bm," 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 + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id" 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 new RowMapper<ScheduleRealInfo>(){ 835 new RowMapper<ScheduleRealInfo>(){
833 @Override 836 @Override
834 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { 837 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -904,27 +907,39 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -904,27 +907,39 @@ public class BusIntervalServiceImpl implements BusIntervalService {
904 return schedule; 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 List<Map<String, String>> temp1 = new ArrayList<Map<String, String>>(); 926 List<Map<String, String>> temp1 = new ArrayList<Map<String, String>>();
910 List<Map<String, String>> temp2 = new ArrayList<Map<String, String>>(); 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 if(line.length() != 0 && statu.equals("1")){ 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+"'"; 932 + strList1.add("%" + line + "%");
  933 + } else {
  934 + strList1.add("%%");
926 } 935 }
927 - temp1 = jdbcTemplate.query(sql, 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 new RowMapper<Map<String, String>>(){ 943 new RowMapper<Map<String, String>>(){
929 @Override 944 @Override
930 public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException { 945 public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -937,13 +952,22 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -937,13 +952,22 @@ public class BusIntervalServiceImpl implements BusIntervalService {
937 return m; 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 new RowMapper<Map<String, String>>(){ 971 new RowMapper<Map<String, String>>(){
948 @Override 972 @Override
949 public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException { 973 public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -956,6 +980,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -956,6 +980,14 @@ public class BusIntervalServiceImpl implements BusIntervalService {
956 return m; 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 for(Map<String, String> m2 : temp2){ 992 for(Map<String, String> m2 : temp2){
961 for(Map<String, String> m1 : temp1){ 993 for(Map<String, String> m1 : temp1){
@@ -974,10 +1006,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -974,10 +1006,10 @@ public class BusIntervalServiceImpl implements BusIntervalService {
974 if(id1 == 0 || id1 > s.getId()) 1006 if(id1 == 0 || id1 > s.getId())
975 id1 = s.getId(); 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 new RowMapper<ChildTaskPlan>(){ 1013 new RowMapper<ChildTaskPlan>(){
982 @Override 1014 @Override
983 public ChildTaskPlan mapRow(ResultSet rs, int rowNum) throws SQLException { 1015 public ChildTaskPlan mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -994,21 +1026,20 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -994,21 +1026,20 @@ public class BusIntervalServiceImpl implements BusIntervalService {
994 1026
995 if(model.length() != 0){ 1027 if(model.length() != 0){
996 sql = "select sp.id from " 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 + " 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"; 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 new RowMapper<Map<String, Object>>(){ 1034 new RowMapper<Map<String, Object>>(){
1003 @Override 1035 @Override
1004 public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { 1036 public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
1005 Map<String, Object> m = new HashMap<String, Object>(); 1037 Map<String, Object> m = new HashMap<String, Object>();
1006 m.put("id", rs.getString("id")); 1038 m.put("id", rs.getString("id"));
1007 -// m.put("ists", rs.getString("ists")!=null?rs.getString("ists"):"0");  
1008 return m; 1039 return m;
1009 } 1040 }
1010 }); 1041 });
1011 - 1042 +
1012 for(Map<String, Object> m : ttList){ 1043 for(Map<String, Object> m : ttList){
1013 ttSet.add(Long.valueOf(m.get("id").toString())); 1044 ttSet.add(Long.valueOf(m.get("id").toString()));
1014 } 1045 }
@@ -1071,15 +1102,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1071,15 +1102,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1071 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 1102 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
1072 keyMap.get(key).add(schedule); 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 }else{ 1105 }else{
1084 if(!keyMap.containsKey(key)) 1106 if(!keyMap.containsKey(key))
1085 keyMap.put(key, new ArrayList<ScheduleRealInfo>()); 1107 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
@@ -1087,7 +1109,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1087,7 +1109,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1087 } 1109 }
1088 } 1110 }
1089 1111
1090 - String companyName = "", subCompanyName = "";  
1091 for(String key : keyMap.keySet()){ 1112 for(String key : keyMap.keySet()){
1092 Map<String, Object> tempMap = new HashMap<String, Object>(); 1113 Map<String, Object> tempMap = new HashMap<String, Object>();
1093 Map<Long, ScheduleRealInfo> sortMap = new HashMap<Long, ScheduleRealInfo>(); 1114 Map<Long, ScheduleRealInfo> sortMap = new HashMap<Long, ScheduleRealInfo>();
@@ -1102,12 +1123,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1102,12 +1123,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1102 long jhyssj1 = 0, sjyssj1 = 0; 1123 long jhyssj1 = 0, sjyssj1 = 0;
1103 double jhlc = 0, sjlc = 0; 1124 double jhlc = 0, sjlc = 0;
1104 for(ScheduleRealInfo schedule : list2){ 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 long fcsj = schedule.getFcsjT(); 1126 long fcsj = schedule.getFcsjT();
1112 if(sortMap.containsKey(fcsj)){ 1127 if(sortMap.containsKey(fcsj)){
1113 if(sortMap.get(fcsj).getFcsjActual() != null) 1128 if(sortMap.get(fcsj).getFcsjActual() != null)
@@ -1275,8 +1290,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1275,8 +1290,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1275 } 1290 }
1276 } 1291 }
1277 String[] split = key.split("/"); 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 tempMap.put("date", split[0]); 1295 tempMap.put("date", split[0]);
1281 tempMap.put("line", split[1]); 1296 tempMap.put("line", split[1]);
1282 tempMap.put("lp", split[2]); 1297 tempMap.put("lp", split[2]);
@@ -1442,7 +1457,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1442,7 +1457,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1442 String[] split = key.split("/"); 1457 String[] split = key.split("/");
1443 tempMap.put("line", split[0]); 1458 tempMap.put("line", split[0]);
1444 tempMap.put("lp", split[1]); 1459 tempMap.put("lp", split[1]);
1445 - tempMap.put("company", companyName); 1460 + tempMap.put("company", BasicData.businessCodeNameMap.get(company));
1446 tempMap.put("subCompany", split[2]); 1461 tempMap.put("subCompany", split[2]);
1447 tempMap.put("date", date); 1462 tempMap.put("date", date);
1448 list4.add(tempMap); 1463 list4.add(tempMap);
@@ -1489,7 +1504,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1489,7 +1504,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1489 String[] split = key.split("/"); 1504 String[] split = key.split("/");
1490 tempMap.put("line", split[0]); 1505 tempMap.put("line", split[0]);
1491 tempMap.put("lp", keyMap4.get(key).size()); 1506 tempMap.put("lp", keyMap4.get(key).size());
1492 - tempMap.put("company", companyName); 1507 + tempMap.put("company", BasicData.businessCodeNameMap.get(company));
1493 tempMap.put("subCompany", split[1]); 1508 tempMap.put("subCompany", split[1]);
1494 tempMap.put("date", date); 1509 tempMap.put("date", date);
1495 tempMap.put("work", keyMap4.get(key)); 1510 tempMap.put("work", keyMap4.get(key));
@@ -1526,8 +1541,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -1526,8 +1541,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1526 modelMap.put("sjyssj", sjyssj.equals(0)?0:sjyssj.divide(size, 2, RoundingMode.HALF_UP)); 1541 modelMap.put("sjyssj", sjyssj.equals(0)?0:sjyssj.divide(size, 2, RoundingMode.HALF_UP));
1527 modelMap.put("sjyycs", sjyycs.equals(0)?0:sjyycs.divide(size, 2, RoundingMode.HALF_UP)); 1542 modelMap.put("sjyycs", sjyycs.equals(0)?0:sjyycs.divide(size, 2, RoundingMode.HALF_UP));
1528 modelMap.put("sjyscs", sjyscs.equals(0)?0:sjyscs.divide(size, 2, RoundingMode.HALF_UP)); 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 modelMap.put("dataList", dataList); 1544 modelMap.put("dataList", dataList);
1532 } 1545 }
1533 1546
@@ -2225,9 +2238,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2225,9 +2238,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2225 String company = "", subCompany = ""; 2238 String company = "", subCompany = "";
2226 String sfyy = map.get("sfyy").toString(); 2239 String sfyy = map.get("sfyy").toString();
2227 String line = map.get("line").toString(); 2240 String line = map.get("line").toString();
2228 - if(map.get("company")!=null) 2241 + if(map.containsKey("company") && map.get("company")!=null)
2229 company = map.get("company").toString(); 2242 company = map.get("company").toString();
2230 - if(map.get("subCompany")!=null) 2243 + if(map.containsKey("subCompany") && map.get("subCompany")!=null)
2231 subCompany = map.get("subCompany").toString(); 2244 subCompany = map.get("subCompany").toString();
2232 String startDate = map.get("startDate").toString(); 2245 String startDate = map.get("startDate").toString();
2233 String endDate = map.get("endDate").toString(); 2246 String endDate = map.get("endDate").toString();
@@ -2243,32 +2256,26 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2243,32 +2256,26 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2243 } 2256 }
2244 try { 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 if(sfqr == 1 && times.length() != 0){ 2267 if(sfqr == 1 && times.length() != 0){
2252 String[] split = times.split("-"); 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 new RowMapper<ScheduleRealInfo>(){ 2279 new RowMapper<ScheduleRealInfo>(){
2273 @Override 2280 @Override
2274 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { 2281 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -2311,6 +2318,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2311,6 +2318,14 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2311 return schedule; 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 }catch (Exception e) { 2329 }catch (Exception e) {
2315 // TODO: handle exception 2330 // TODO: handle exception
2316 e.printStackTrace(); 2331 e.printStackTrace();
@@ -2408,71 +2423,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2408,71 +2423,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2408 resList.add(tempMap); 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 if(resList.size() != 0){ 2427 if(resList.size() != 0){
2478 Map<String, Object> tempMap = new HashMap<String, Object>(); 2428 Map<String, Object> tempMap = new HashMap<String, Object>();
@@ -2484,24 +2434,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2484,24 +2434,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2484 zddf += (int)m.get("zddf"); 2434 zddf += (int)m.get("zddf");
2485 // dxtz += (int)m.get("dxtz"); 2435 // dxtz += (int)m.get("dxtz");
2486 lbtz += (int)m.get("lbtz"); 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 Map<String, Object> temp = new HashMap<String, Object>(); 2437 Map<String, Object> temp = new HashMap<String, Object>();
2506 temp.put("date", "合计"); 2438 temp.put("date", "合计");
2507 temp.put("lines", m.get("lines")); 2439 temp.put("lines", m.get("lines"));
@@ -2515,8 +2447,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2515,8 +2447,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2515 temp.put("dfbl", m.get("dfbl")); 2447 temp.put("dfbl", m.get("dfbl"));
2516 temp.put("dxbl", m.get("dxbl")); 2448 temp.put("dxbl", m.get("dxbl"));
2517 temp.put("lbbl", m.get("lbbl")); 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 tempMap.put("date", "合计"); 2451 tempMap.put("date", "合计");
2522 tempMap.put("lines", lines); 2452 tempMap.put("lines", lines);
@@ -2534,13 +2464,17 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2534,13 +2464,17 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2534 resList.add(tempMap); 2464 resList.add(tempMap);
2535 } 2465 }
2536 2466
  2467 + String currDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date());
  2468 +
2537 //计算掉线调整 2469 //计算掉线调整
2538 String sqldot = "select * from " 2470 String sqldot = "select * from "
2539 + "logger_sch_modify where gsbm = ? and fgsbm like ? and rq BETWEEN ? and ? order by line_code,sch_id"; 2471 + "logger_sch_modify where gsbm = ? and fgsbm like ? and rq BETWEEN ? and ? order by line_code,sch_id";
2540 2472
2541 2473
2542 List<SchEditInfoDto> listDot = jdbcTemplate.query(sqldot, 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 int dxtzz=0; 2478 int dxtzz=0;
2545 Map<String, Object> mapSchId=new HashMap<String,Object>(); 2479 Map<String, Object> mapSchId=new HashMap<String,Object>();
2546 for (int i = 0; i < resList.size(); i++) { 2480 for (int i = 0; i < resList.size(); i++) {
@@ -2665,11 +2599,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2665,11 +2599,11 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2665 String minfcsj="02:00"; 2599 String minfcsj="02:00";
2666 List<Line> lineList=lineRepository.findLineByCode(line); 2600 List<Line> lineList=lineRepository.findLineByCode(line);
2667 if(lineList.size()>0){ 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 + " id = (" 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 for(Ylb ylb : queryYlbByRqXlbm){ 2609 for(Ylb ylb : queryYlbByRqXlbm){
@@ -2885,18 +2819,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -2885,18 +2819,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2885 Map.put("ljbc", culateService.culateLjbc(lists, "")); 2819 Map.put("ljbc", culateService.culateLjbc(lists, ""));
2886 int sjbc =culateService.culateLjbc(lists, "")+culateService.culateSjbc(lists, ""); 2820 int sjbc =culateService.culateLjbc(lists, "")+culateService.culateSjbc(lists, "");
2887 Map.put("sjbc", sjbc); 2821 Map.put("sjbc", sjbc);
2888 -// map=new HashMap<String,Object>();  
2889 2822
2890 SimpleDateFormat sdf2=new SimpleDateFormat("yyyy-MM-dd HH:mm"); 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 String[] minSjs = minfcsj.split(":"); 2824 String[] minSjs = minfcsj.split(":");
2901 Long minSj=Long.parseLong(minSjs[0])*60+Long.parseLong(minSjs[1]); 2825 Long minSj=Long.parseLong(minSjs[0])*60+Long.parseLong(minSjs[1]);
2902 2826
@@ -3927,17 +3851,17 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -3927,17 +3851,17 @@ public class BusIntervalServiceImpl implements BusIntervalService {
3927 String sql = "select id, cl_zbh, fcsj, fcsj_actual, j_gh, j_name, lp_name, qdz_name, " + 3851 String sql = "select id, cl_zbh, fcsj, fcsj_actual, j_gh, j_name, lp_name, qdz_name, " +
3928 "schedule_date_str, xl_name, zdsj, zdsj_actual, fgs_bm, fgs_name, gs_name, xl_dir, xl_bm " + 3852 "schedule_date_str, xl_name, zdsj, zdsj_actual, fgs_bm, fgs_name, gs_name, xl_dir, xl_bm " +
3929 "from bsth_c_s_sp_info_real " + 3853 "from bsth_c_s_sp_info_real " +
3930 - "where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"' " + 3854 + "where schedule_date_str >= ? and schedule_date_str <= ? " +
  3855 + "and gs_bm like ? and fgs_bm like ? and xl_bm like ? " +
3931 "and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and cc_service = 0"; 3856 "and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and cc_service = 0";
  3857 + List<String> strList = new ArrayList<String>();
  3858 + strList.add(startDate);
  3859 + strList.add(endDate);
  3860 + strList.add('%' + company + '%');
  3861 + strList.add('%' + subCompany + '%');
  3862 + strList.add('%' + line + '%');
3932 3863
3933 - if(company.length() != 0)  
3934 - sql += " and gs_bm = '"+company+"'";  
3935 - if(subCompany.length() != 0)  
3936 - sql += " and fgs_bm = '"+subCompany+"'";  
3937 - if(line.length() != 0)  
3938 - sql += " and xl_bm = '"+line+"'";  
3939 -  
3940 - List<ScheduleRealInfo> list = jdbcTemplate.query(sql, 3864 + List<ScheduleRealInfo> query = jdbcTemplate.query(sql, strList.toArray(),
3941 new RowMapper<ScheduleRealInfo>(){ 3865 new RowMapper<ScheduleRealInfo>(){
3942 @Override 3866 @Override
3943 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { 3867 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
@@ -3960,7 +3884,17 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -3960,7 +3884,17 @@ public class BusIntervalServiceImpl implements BusIntervalService {
3960 schedule.setjGh(rs.getString("j_gh")); 3884 schedule.setjGh(rs.getString("j_gh"));
3961 schedule.setjName(rs.getString("j_name")); 3885 schedule.setjName(rs.getString("j_name"));
3962 return schedule; 3886 return schedule;
3963 - }}); 3887 + }});
  3888 +
  3889 + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
  3890 + for(ScheduleRealInfo s : query){
  3891 + if(line.length() != 0){
  3892 + if(!(line.equals(s.getXlBm()))){
  3893 + continue;
  3894 + }
  3895 + }
  3896 + list.add(s);
  3897 + }
3964 3898
3965 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 3899 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
3966 Map<String, Map<String, List<ScheduleRealInfo>>> sches = new HashMap<String, Map<String, List<ScheduleRealInfo>>>(); 3900 Map<String, Map<String, List<ScheduleRealInfo>>> sches = new HashMap<String, Map<String, List<ScheduleRealInfo>>>();
@@ -3982,11 +3916,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -3982,11 +3916,11 @@ public class BusIntervalServiceImpl implements BusIntervalService {
3982 3916
3983 String xl = s.getXlName() + "/" + s.getFgsBm(); 3917 String xl = s.getXlName() + "/" + s.getFgsBm();
3984 String dateStr = s.getScheduleDateStr(); 3918 String dateStr = s.getScheduleDateStr();
3985 - if(!sches.containsKey(xl)){ 3919 + if(!(sches.containsKey(xl))){
3986 sches.put(xl, new HashMap<String, List<ScheduleRealInfo>>()); 3920 sches.put(xl, new HashMap<String, List<ScheduleRealInfo>>());
3987 keyMap.put(xl, new ArrayList<List<Map<String, Object>>>()); 3921 keyMap.put(xl, new ArrayList<List<Map<String, Object>>>());
3988 } 3922 }
3989 - if(!sches.get(xl).containsKey(dateStr)){ 3923 + if(!(sches.get(xl).containsKey(dateStr))){
3990 sches.get(xl).put(dateStr, new ArrayList<ScheduleRealInfo>()); 3924 sches.get(xl).put(dateStr, new ArrayList<ScheduleRealInfo>());
3991 } 3925 }
3992 sches.get(xl).get(dateStr).add(s); 3926 sches.get(xl).get(dateStr).add(s);
@@ -4088,7 +4022,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { @@ -4088,7 +4022,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
4088 keyMap.put(xl, lists); 4022 keyMap.put(xl, lists);
4089 } 4023 }
4090 4024
4091 - if(!map.containsKey("flag")){ 4025 + if(!(map.containsKey("flag"))){
4092 for(String xl : keyMap.keySet()){ 4026 for(String xl : keyMap.keySet()){
4093 List<List<Map<String, Object>>> list1 = keyMap.get(xl); 4027 List<List<Map<String, Object>>> list1 = keyMap.get(xl);
4094 if(list1.size() == 0 || list1.get(0).size() == 0) 4028 if(list1.size() == 0 || list1.get(0).size() == 0)
src/main/java/com/bsth/service/jdtest/impl/JdtestServiceImpl.java
@@ -105,20 +105,40 @@ public class JdtestServiceImpl implements JdtestService { @@ -105,20 +105,40 @@ public class JdtestServiceImpl implements JdtestService {
105 105
106 @Override 106 @Override
107 public List<Map<String, Object>> daily(Map<String, Object> map) { 107 public List<Map<String, Object>> daily(Map<String, Object> map) {
108 - String xlbm="";; 108 + String xlbm="";
109 if(map.get("line")!=null){ 109 if(map.get("line")!=null){
110 xlbm=map.get("line").toString().trim(); 110 xlbm=map.get("line").toString().trim();
111 } 111 }
  112 + String gsbm="";
  113 + if(map.get("gsbm")!=null){
  114 + gsbm=map.get("gsbm").toString().trim();
  115 + }
  116 +
  117 + String fgsbm="";
  118 + if(map.get("fgsbm")!=null){
  119 + fgsbm=map.get("fgsbm").toString().trim();
  120 + }
112 121
113 - String sql="select r.cl_zbh,r.j_gh,r.lp_name " 122 + String sql="select r.xl_bm, r.cl_zbh,r.j_gh,r.lp_name "
114 + " from bsth_c_s_sp_info_real r where " 123 + " 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"; 124 + + "r.schedule_date_str = '"+map.get("date").toString()+"'";
  125 + if(!gsbm.equals("")){
  126 + sql += "and r.gs_bm ='"+gsbm+"'";
  127 + }
  128 + if(!fgsbm.equals("")){
  129 + sql += "and r.fgs_bm='"+fgsbm+"'";
  130 + }
  131 + if(!xlbm.equals("")){
  132 + sql += " and r.xl_bm = '"+xlbm+"'";
  133 + }
  134 +
  135 + sql += " group by r.xl_bm, r.cl_zbh,r.j_gh,r.lp_name order by r.xl_bm,r.cl_zbh";
117 136
118 List<Map<String, Object>> list = jdbcTemplate.query(sql, new RowMapper<Map<String, Object>>() { 137 List<Map<String, Object>> list = jdbcTemplate.query(sql, new RowMapper<Map<String, Object>>() {
119 @Override 138 @Override
120 public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException { 139 public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException {
121 Map<String, Object> m=new HashMap<>(); 140 Map<String, Object> m=new HashMap<>();
  141 + m.put("xlBm", arg0.getString("xl_bm"));
122 m.put("lp", arg0.getString("lp_name")); 142 m.put("lp", arg0.getString("lp_name"));
123 m.put("jGh", arg0.getString("j_gh")); 143 m.put("jGh", arg0.getString("j_gh"));
124 m.put("clZbh", arg0.getString("cl_zbh")); 144 m.put("clZbh", arg0.getString("cl_zbh"));
@@ -132,19 +152,29 @@ public class JdtestServiceImpl implements JdtestService { @@ -132,19 +152,29 @@ public class JdtestServiceImpl implements JdtestService {
132 Dictionary d=it.next(); 152 Dictionary d=it.next();
133 dMap.put(d.getdCode(), d.getdName()); 153 dMap.put(d.getdCode(), d.getdName());
134 } 154 }
135 -  
136 - List<Ylb> listYlb= ylbRepository.obtainYlEq(map.get("date").toString(), "", "", xlbm, "", "xlbm"); 155 + List<Ylb> listYlb=new ArrayList<Ylb>();
  156 + if(xlbm.equals("")){
  157 + listYlb=ylbRepository.obtainYl(map.get("date").toString(), gsbm, fgsbm, xlbm, "", "xlbm");
  158 + }else{
  159 + listYlb=ylbRepository.obtainYlEq(map.get("date").toString(), "", "", xlbm, "", "xlbm");
  160 + }
137 Map<String, Ylb> mapYlb=new HashMap<>(); 161 Map<String, Ylb> mapYlb=new HashMap<>();
138 for (int j = 0; j < listYlb.size(); j++) { 162 for (int j = 0; j < listYlb.size(); j++) {
139 Ylb y=listYlb.get(j); 163 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); 164 + if(mapYlb.get(y.getXlbm()+y.getJsy()+y.getNbbm()+y.getLp())==null){
  165 + mapYlb.put(y.getXlbm()+y.getJsy()+y.getNbbm()+y.getLp(), y);
142 } 166 }
143 } 167 }
144 168
145 List<ScheduleRealInfo> sList; 169 List<ScheduleRealInfo> sList;
146 List<ScheduleRealInfo> jList; 170 List<ScheduleRealInfo> jList;
147 - List<ScheduleRealInfo> lists=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(map.get("line").toString(), map.get("date").toString()); 171 + List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();
  172 + if(xlbm.equals("")){
  173 + lists=scheduleRealInfoRepository.scheduleByDateAndLineByGs_(gsbm, fgsbm, map.get("date").toString());
  174 + }else{
  175 + lists=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(xlbm, map.get("date").toString());
  176 +
  177 + }
148 double jzyl_z=0.0; 178 double jzyl_z=0.0;
149 double czyl_z=0.0; 179 double czyl_z=0.0;
150 double jzl_z=0.0; 180 double jzl_z=0.0;
@@ -165,8 +195,8 @@ public class JdtestServiceImpl implements JdtestService { @@ -165,8 +195,8 @@ public class JdtestServiceImpl implements JdtestService {
165 double yh=0.0; 195 double yh=0.0;
166 String rylx=""; 196 String rylx="";
167 197
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()); 198 + if(mapYlb.get(m.get("xlBm").toString()+m.get("jGh").toString()+m.get("clZbh").toString()+m.get("lp").toString())!=null){
  199 + Ylb t=mapYlb.get(m.get("xlBm").toString()+m.get("jGh").toString()+m.get("clZbh").toString()+m.get("lp").toString());
170 jzyl=t.getJzyl(); 200 jzyl=t.getJzyl();
171 czyl=t.getCzyl(); 201 czyl=t.getCzyl();
172 jzl=t.getJzl(); 202 jzl=t.getJzl();
@@ -191,7 +221,8 @@ public class JdtestServiceImpl implements JdtestService { @@ -191,7 +221,8 @@ public class JdtestServiceImpl implements JdtestService {
191 m.put("dh", ""); 221 m.put("dh", "");
192 for (int j = 0; j < lists.size(); j++) { 222 for (int j = 0; j < lists.size(); j++) {
193 ScheduleRealInfo s=lists.get(j); 223 ScheduleRealInfo s=lists.get(j);
194 - if(m.get("clZbh").toString().equals(s.getClZbh()) && 224 + if(m.get("xlBm").toString().equals(s.getXlBm()) &&
  225 + m.get("clZbh").toString().equals(s.getClZbh()) &&
195 m.get("jGh").toString().equals(s.getjGh()) && 226 m.get("jGh").toString().equals(s.getjGh()) &&
196 m.get("lp").toString().equals(s.getLpName()) ){ 227 m.get("lp").toString().equals(s.getLpName()) ){
197 jList.add(s); 228 jList.add(s);
@@ -206,7 +237,7 @@ public class JdtestServiceImpl implements JdtestService { @@ -206,7 +237,7 @@ public class JdtestServiceImpl implements JdtestService {
206 237
207 } 238 }
208 } 239 }
209 - 240 + m.put("xlName", jList.get(0).getXlName());
210 m.put("jName", jList.get(0).getjName()); 241 m.put("jName", jList.get(0).getjName());
211 242
212 int jhbc=culateMileageService.culateJhbc(jList, ""); 243 int jhbc=culateMileageService.culateJhbc(jList, "");
@@ -233,7 +264,8 @@ public class JdtestServiceImpl implements JdtestService { @@ -233,7 +264,8 @@ public class JdtestServiceImpl implements JdtestService {
233 264
234 } 265 }
235 Map<String, Object> mmp=new HashMap<>(); 266 Map<String, Object> mmp=new HashMap<>();
236 - mmp.put("lp", "合计"); 267 + mmp.put("xlName", "合计");
  268 + mmp.put("lp", "");
237 mmp.put("jGh", ""); 269 mmp.put("jGh", "");
238 mmp.put("clZbh", ""); 270 mmp.put("clZbh", "");
239 mmp.put("jName", ""); 271 mmp.put("jName", "");
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
@@ -2818,7 +2818,7 @@ public class ReportServiceImpl implements ReportService{ @@ -2818,7 +2818,7 @@ public class ReportServiceImpl implements ReportService{
2818 } 2818 }
2819 }); 2819 });
2820 }else{ 2820 }else{
2821 - sql+="select r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh,r.j_name,r.s_name" 2821 + sql+="select r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh"
2822 + " from bsth_c_s_sp_info_real r where" 2822 + " from bsth_c_s_sp_info_real r where"
2823 + " r.schedule_date_str BETWEEN '"+date+"' and '"+date2+"'"; 2823 + " r.schedule_date_str BETWEEN '"+date+"' and '"+date2+"'";
2824 if(line.equals("")){ 2824 if(line.equals("")){
@@ -2827,7 +2827,7 @@ public class ReportServiceImpl implements ReportService{ @@ -2827,7 +2827,7 @@ public class ReportServiceImpl implements ReportService{
2827 }else{ 2827 }else{
2828 sql += " and r.xl_bm = '"+line+"'"; 2828 sql += " and r.xl_bm = '"+line+"'";
2829 } 2829 }
2830 - sql += " group by r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh,r.j_name,r.s_name"; 2830 + sql += " group by r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh";
2831 listGroupBy=jdbcTemplate.query(sql, new RowMapper<Map<String, Object>>() { 2831 listGroupBy=jdbcTemplate.query(sql, new RowMapper<Map<String, Object>>() {
2832 @Override 2832 @Override
2833 public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException { 2833 public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException {
@@ -2836,8 +2836,8 @@ public class ReportServiceImpl implements ReportService{ @@ -2836,8 +2836,8 @@ public class ReportServiceImpl implements ReportService{
2836 map.put("nbbm", arg0.getString("cl_zbh")); 2836 map.put("nbbm", arg0.getString("cl_zbh"));
2837 map.put("jGh", arg0.getString("j_gh")); 2837 map.put("jGh", arg0.getString("j_gh"));
2838 map.put("sGh", arg0.getString("s_gh")); 2838 map.put("sGh", arg0.getString("s_gh"));
2839 - map.put("jName", arg0.getString("j_name"));  
2840 - map.put("sName", arg0.getString("s_name")); 2839 +// map.put("jName", arg0.getString("j_name"));
  2840 +// map.put("sName", arg0.getString("s_name"));
2841 return map; 2841 return map;
2842 } 2842 }
2843 }); 2843 });
@@ -2864,6 +2864,15 @@ public class ReportServiceImpl implements ReportService{ @@ -2864,6 +2864,15 @@ public class ReportServiceImpl implements ReportService{
2864 if(xl_bm.equals(s.getXlBm()) && nbbm.equals(s.getClZbh()) 2864 if(xl_bm.equals(s.getXlBm()) && nbbm.equals(s.getClZbh())
2865 && jGh.equals(s.getjGh()) && sGh.equals(s.getsGh())){ 2865 && jGh.equals(s.getjGh()) && sGh.equals(s.getsGh())){
2866 lists.add(s); 2866 lists.add(s);
  2867 +
  2868 + if((m.get("jName") == null || m.get("jName").toString().length() == 0)
  2869 + && s.getjName() != null && s.getjName().length() > 0){
  2870 + m.put("jName", s.getjName());
  2871 + }
  2872 + if((m.get("sName") == null || m.get("sName").toString().length() == 0)
  2873 + && s.getsName() != null && s.getsName().length() > 0){
  2874 + m.put("sName", s.getsName());
  2875 + }
2867 } 2876 }
2868 } 2877 }
2869 } 2878 }
@@ -2946,32 +2955,7 @@ public class ReportServiceImpl implements ReportService{ @@ -2946,32 +2955,7 @@ public class ReportServiceImpl implements ReportService{
2946 2955
2947 } 2956 }
2948 if(!zt.equals("zbh")){ 2957 if(!zt.equals("zbh")){
2949 - String sqls="select r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh,r.s_name,r.j_name"  
2950 - + " from bsth_c_s_sp_info_real r where"  
2951 - + " r.schedule_date_str BETWEEN '"+date+"' and '"+date2+"'";  
2952 - if(line.equals("")){  
2953 - sqls +="and r.gs_bm='"+gsdm+"' "  
2954 - + " and r.fgs_bm='"+fgsdm+"'";  
2955 - }else{  
2956 - sqls += " and r.xl_bm = '"+line+"'";  
2957 - }  
2958 - sqls += " group by r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh,r.s_name,r.j_name";  
2959 -  
2960 - List<Map<String, Object>> listGroupBys=jdbcTemplate.query(sqls, new RowMapper<Map<String, Object>>() {  
2961 - @Override  
2962 - public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException {  
2963 - Map<String, Object> map=new HashMap<String,Object>();  
2964 - map.put("line",arg0.getString("xl_bm"));  
2965 - map.put("nbbm", arg0.getString("cl_zbh"));  
2966 - map.put("jGh", arg0.getString("j_gh"));  
2967 - map.put("sGh", arg0.getString("s_gh"));  
2968 - map.put("jName", arg0.getString("j_name"));  
2969 - map.put("sName", arg0.getString("s_name"));  
2970 - return map;  
2971 - }  
2972 - });  
2973 - lMap=lists(listGroupBys, lMaps, gsdm, fgsdm, date, date2);  
2974 - 2958 + lMap=lists(listGroupBy, lMaps, gsdm, fgsdm, date, date2);
2975 } 2959 }
2976 if(type.equals("export")){ 2960 if(type.equals("export")){
2977 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), 2961 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,8 +1270,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1270 1270
1271 try { 1271 try {
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," 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 + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'"; 1276 + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'";
1276 if(line.trim().length() != 0) 1277 if(line.trim().length() != 0)
1277 sql += " and xl_bm = '"+line+"'"; 1278 sql += " and xl_bm = '"+line+"'";
@@ -1302,7 +1303,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1302,7 +1303,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1302 schedule.setFgsBm(rs.getString("fgs_bm")); 1303 schedule.setFgsBm(rs.getString("fgs_bm"));
1303 schedule.setCcService(rs.getBoolean("cc_service")); 1304 schedule.setCcService(rs.getBoolean("cc_service"));
1304 1305
1305 - int startOpt = 0; 1306 + int startOpt = 120;
1306 if(rs.getString("start_opt") != null && rs.getString("start_opt").trim().length() != 0){ 1307 if(rs.getString("start_opt") != null && rs.getString("start_opt").trim().length() != 0){
1307 String[] split = rs.getString("start_opt").split(":"); 1308 String[] split = rs.getString("start_opt").split(":");
1308 startOpt = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); 1309 startOpt = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
@@ -1541,9 +1542,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1541,9 +1542,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1541 1542
1542 try { 1543 try {
1543 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 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 + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'"; 1548 + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'";
1548 if(line.length() != 0) 1549 if(line.length() != 0)
1549 sql += " and xl_bm = '"+line+"'"; 1550 sql += " and xl_bm = '"+line+"'";
@@ -1575,8 +1576,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1575,8 +1576,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1575 schedule.setCcService(rs.getBoolean("cc_service")); 1576 schedule.setCcService(rs.getBoolean("cc_service"));
1576 schedule.setRemarks(rs.getString("remarks")!=null?rs.getString("remarks"):""); 1577 schedule.setRemarks(rs.getString("remarks")!=null?rs.getString("remarks"):"");
1577 schedule.setAdjustExps(rs.getString("adjust_exps")!=null?rs.getString("adjust_exps"):""); 1578 schedule.setAdjustExps(rs.getString("adjust_exps")!=null?rs.getString("adjust_exps"):"");
1578 -  
1579 - int startOpt = 0; 1579 +
  1580 + int startOpt = 120;
1580 if(rs.getString("start_opt") != null && rs.getString("start_opt").trim().length() != 0){ 1581 if(rs.getString("start_opt") != null && rs.getString("start_opt").trim().length() != 0){
1581 String[] split = rs.getString("start_opt").split(":"); 1582 String[] split = rs.getString("start_opt").split(":");
1582 startOpt = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); 1583 startOpt = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
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
@@ -55,15 +55,16 @@ @@ -55,15 +55,16 @@
55 <table class="table table-bordered table-hover table-checkable" id="forms"> 55 <table class="table table-bordered table-hover table-checkable" id="forms">
56 <thead> 56 <thead>
57 <tr> 57 <tr>
58 - <th colspan="16">调度班次日报</th> 58 + <th colspan="17">调度班次日报</th>
59 </tr> 59 </tr>
60 <tr> 60 <tr>
61 <td>线路</td> 61 <td>线路</td>
62 - <td colspan="7"><span id="form_line">&nbsp;</span></td> 62 + <td colspan="8"><span id="form_line">&nbsp;</span></td>
63 <td>时间</td> 63 <td>时间</td>
64 <td colspan="7"><span id="form_date">&nbsp;</span></td> 64 <td colspan="7"><span id="form_date">&nbsp;</span></td>
65 </tr> 65 </tr>
66 <tr> 66 <tr>
  67 + <td>线路</td>
67 <td>路牌</td> 68 <td>路牌</td>
68 <td>车辆</td> 69 <td>车辆</td>
69 <td>工号</td> 70 <td>工号</td>
@@ -138,7 +139,7 @@ @@ -138,7 +139,7 @@
138 $("#gsdmDaily").on("change",updateCompany); 139 $("#gsdmDaily").on("change",updateCompany);
139 function updateCompany(){ 140 function updateCompany(){
140 var company = $('#gsdmDaily').val(); 141 var company = $('#gsdmDaily').val();
141 - var options = ''; 142 + var options = '<option value="">全部分公司</option>';
142 for(var i = 0; i < obj.length; i++){ 143 for(var i = 0; i < obj.length; i++){
143 if(obj[i].companyCode == company){ 144 if(obj[i].companyCode == company){
144 var children = obj[i].children; 145 var children = obj[i].children;
@@ -153,7 +154,7 @@ @@ -153,7 +154,7 @@
153 var tempData = {}; 154 var tempData = {};
154 $.get('/report/lineList',function(xlList){ 155 $.get('/report/lineList',function(xlList){
155 var data = []; 156 var data = [];
156 -// data.push({id: " ", text: "全部线路"}); 157 + data.push({id: " ", text: "全部线路"});
157 $.get('/user/companyData', function(result){ 158 $.get('/user/companyData', function(result){
158 for(var i = 0; i < result.length; i++){ 159 for(var i = 0; i < result.length; i++){
159 var companyCode = result[i].companyCode; 160 var companyCode = result[i].companyCode;
@@ -204,7 +205,7 @@ @@ -204,7 +205,7 @@
204 fgsdmDaily = $("#fgsdmDaily").val(); 205 fgsdmDaily = $("#fgsdmDaily").val();
205 lineName=$("#select2-line-container").html(); 206 lineName=$("#select2-line-container").html();
206 var i = layer.load(2); 207 var i = layer.load(2);
207 - $get('/jdtest/daily',{ line:line,date:date,type:'query'},function(result){ 208 + $get('/jdtest/daily',{ gsbm:gsdmDaily,fgsbm:fgsdmDaily, line:line,date:date,type:'query'},function(result){
208 $("#form_line").text(lineName); 209 $("#form_line").text(lineName);
209 $("#form_date").text(date); 210 $("#form_date").text(date);
210 // 把数据填充到模版中 211 // 把数据填充到模版中
@@ -222,9 +223,15 @@ @@ -222,9 +223,15 @@
222 } 223 }
223 line = $("#line").val(); 224 line = $("#line").val();
224 date = $("#date").val(); 225 date = $("#date").val();
225 - lineName=$("#select2-line-container").html(); 226 +
  227 + lineName = $("#select2-line-container").html();
  228 + if(lineName == "全部线路")
  229 + lineName = $('#fgsdmDaily option:selected').text()+"全部线路";
  230 + if(lineName == "全部分公司全部线路")
  231 + lineName = $('#gsdmDaily option:selected').text()+"全部线路";
  232 +
226 var i = layer.load(2); 233 var i = layer.load(2);
227 - $get('/jdtest/daily',{line:line,date:date,type:'export',lineName:lineName},function(result){ 234 + $get('/jdtest/daily',{gsbm:gsdmDaily,fgsbm:fgsdmDaily,line:line,date:date,type:'export',lineName:lineName},function(result){
228 window.open("/downloadFile/download?fileName=" 235 window.open("/downloadFile/download?fileName="
229 +date+"-"+lineName+"-班次日报表"); 236 +date+"-"+lineName+"-班次日报表");
230 layer.close(i); 237 layer.close(i);
@@ -235,6 +242,7 @@ @@ -235,6 +242,7 @@
235 <script type="text/html" id="dailyJdtest"> 242 <script type="text/html" id="dailyJdtest">
236 {{each list as obj i}} 243 {{each list as obj i}}
237 <tr> 244 <tr>
  245 + <td>{{obj.xlName}}</td>
238 <td>{{obj.lp}}</td> 246 <td>{{obj.lp}}</td>
239 <td>{{obj.clZbh}}</td> 247 <td>{{obj.clZbh}}</td>
240 <td>{{obj.jGh}}</td> 248 <td>{{obj.jGh}}</td>
src/main/resources/static/pages/forms/statement/scheduleDaily.html
@@ -467,7 +467,7 @@ @@ -467,7 +467,7 @@
467 divFrom2 = window.document.getElementById('forms_1'); 467 divFrom2 = window.document.getElementById('forms_1');
468 divFrom2.style.width=divFrom1.offsetWidth+"px"; 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 getTime(result); 471 getTime(result);
472 var scheduleDaily_3 = template('scheduleDaily_3',{list:result}); 472 var scheduleDaily_3 = template('scheduleDaily_3',{list:result});
473 $('#forms_2 .scheduleDaily_3').html(scheduleDaily_3); 473 $('#forms_2 .scheduleDaily_3').html(scheduleDaily_3);
@@ -513,7 +513,7 @@ @@ -513,7 +513,7 @@
513 params['xlName'] = xlName; 513 params['xlName'] = xlName;
514 params['type'] = "export"; 514 params['type'] = "export";
515 params['state'] = '2'; 515 params['state'] = '2';
516 - params['genre'] = 'fqp'; 516 + params['genre'] = 'zrw';
517 $get('/realSchedule/scheduleDailyExport', params, function(result){ 517 $get('/realSchedule/scheduleDailyExport', params, function(result){
518 if(date.length == 10) 518 if(date.length == 10)
519 window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+lineName+"-调度日报"); 519 window.open("/downloadFile/download?fileName="+moment(date).format("YYYYMMDD")+"-"+lineName+"-调度日报");