Commit 2206d859e3e8b68501b8c78fbc80f66c53224720

Authored by mcy123
1 parent e446403e

mcy

src/main/java/com/bsth/controller/forms/ExportController.java
@@ -321,31 +321,34 @@ public class ExportController { @@ -321,31 +321,34 @@ public class ExportController {
321 List<Turnoutrate> turnoutrate = formsService.turnoutrate(map); 321 List<Turnoutrate> turnoutrate = formsService.turnoutrate(map);
322 Map<String, Object> map1 = new HashMap<String, Object>(); 322 Map<String, Object> map1 = new HashMap<String, Object>();
323 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 323 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
324 - /*Float xlts=0f;  
325 - Float jh=0f; 324 + String xlts="";
  325 + String zsgs="";
  326 + String jh="";
  327 + Float j=0f;
326 Float sj=0f; 328 Float sj=0f;
327 Float qz=0f; 329 Float qz=0f;
328 Float ccl=0f; 330 Float ccl=0f;
329 Float bcjh=0f; 331 Float bcjh=0f;
330 - Float bcsj=0f; 332 + String bcsj="";
331 Float bczxl=0f; 333 Float bczxl=0f;
332 - Float gs=0f;  
333 - Float zhgs=0f;*/ 334 + String gs="";
  335 + String zhgs="";
334 336
335 for (Turnoutrate l : turnoutrate) { 337 for (Turnoutrate l : turnoutrate) {
336 Map<String, Object> m = new HashMap<String, Object>(); 338 Map<String, Object> m = new HashMap<String, Object>();
337 339
338 - /* xlts +=l.getGs()==""?0f:Float.valueOf(l.getGs());  
339 - jh +=l.getZhgs()==""?0f:Float.valueOf(l.getZhgs());  
340 - sj +=l.getXl()==""?0f:Float.valueOf(l.getXl());  
341 - ccl +=l.getCchjh()==""?0f:Float.valueOf(l.getCchjh());  
342 - bcjh +=l.getCchsj()==""?0f:Float.valueOf(l.getCchsj());  
343 - bcsj +=l.getChl()==""?0f:Float.valueOf(l.getChl()); 340 + xlts +=l.getGsgs()==""?0:String.valueOf(l.getGsgs());
  341 + zsgs +=l.getFgsgs()==""?0:String.valueOf(l.getFgsgs());
  342 + jh +=l.getXl()==""?0:String.valueOf(l.getXl());
  343 + sj +=l.getCchjh()==""?0f:Float.valueOf(l.getCchjh());
  344 + ccl +=l.getCchsj()==""?0f:Float.valueOf(l.getCchsj());
  345 + bcjh +=l.getCchqz()==""?0f:Float.valueOf(l.getCchqz());
  346 + bcsj +=l.getChl()==""?0:String.valueOf(l.getChl());
344 bczxl +=l.getBcjh()==""?0f:Float.valueOf(l.getBcjh()); 347 bczxl +=l.getBcjh()==""?0f:Float.valueOf(l.getBcjh());
345 - gs +=l.getBbzxl()==""?0f:Float.valueOf(l.getBbzxl());  
346 - zhgs +=l.getBbzxl()==""?0f:Float.valueOf(l.getBbzxl()); 348 + gs +=l.getBcsj()==""?0:String.valueOf(l.getBcsj());
  349 + zhgs +=l.getBbzxl()==""?0:String.valueOf(l.getBbzxl());
  350 +
347 351
348 - */  
349 m.put("rq", l.getRq()); 352 m.put("rq", l.getRq());
350 m.put("gs", l.getGs()); 353 m.put("gs", l.getGs());
351 m.put("zhgs", l.getZhgs()); 354 m.put("zhgs", l.getZhgs());
@@ -355,23 +358,27 @@ public class ExportController { @@ -355,23 +358,27 @@ public class ExportController {
355 m.put("cchqz", l.getCchqz()); 358 m.put("cchqz", l.getCchqz());
356 m.put("chl", l.getChl()); 359 m.put("chl", l.getChl());
357 m.put("bcjh", l.getBcjh()); 360 m.put("bcjh", l.getBcjh());
358 - m.put("bcsj", l.getBbzxl()); 361 + m.put("bcsj", l.getBcsj());
359 m.put("bbzxl", l.getBbzxl()); 362 m.put("bbzxl", l.getBbzxl());
360 m.put("sm", l.getSm()); 363 m.put("sm", l.getSm());
361 resList.add(m); 364 resList.add(m);
362 365
363 - /*m=new HashMap<String,Object>();  
364 - m.put("total_xlts", jh); 366 +
  367 +
  368 + m=new HashMap<String,Object>();
  369 + m.put("total_xlts", xlts);
  370 + m.put("total_zhgs", zsgs);
365 m.put("total_jh", jh); 371 m.put("total_jh", jh);
366 m.put("total_sj", sj); 372 m.put("total_sj", sj);
367 - m.put("total_qz", qz);  
368 - m.put("total_ccl", ccl);  
369 - m.put("total_bcjh", bcjh);  
370 - m.put("total_bcsj", bcsj); 373 + m.put("total_qz", ccl);
  374 + m.put("total_ccl", bcjh);
  375 + m.put("total_bcjh",bcsj);
  376 + m.put("total_bcsj", bczxl);
371 m.put("total_bczxl", bczxl); 377 m.put("total_bczxl", bczxl);
372 - m.put("total_gs", gs);  
373 - m.put("total_zhgs", zhgs);  
374 - */ 378 + m.put("total_gs", zhgs);
  379 +
  380 +
  381 + map1 = m;
375 } 382 }
376 383
377 try { 384 try {
@@ -385,7 +392,7 @@ public class ExportController { @@ -385,7 +392,7 @@ public class ExportController {
385 return resList; 392 return resList;
386 } 393 }
387 394
388 - //营运线路出车率统计表 395 + //班次执行率统计表
389 @RequestMapping(value = "/executionrateExport", method = RequestMethod.POST) 396 @RequestMapping(value = "/executionrateExport", method = RequestMethod.POST)
390 public List<Map<String, Object>> executionrateExport(@RequestParam Map<String, Object> map) { 397 public List<Map<String, Object>> executionrateExport(@RequestParam Map<String, Object> map) {
391 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); 398 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
@@ -394,29 +401,33 @@ public class ExportController { @@ -394,29 +401,33 @@ public class ExportController {
394 List<Executionrate> executionrate = formsService.executionrate(map); 401 List<Executionrate> executionrate = formsService.executionrate(map);
395 Map<String, Object> map1 = new HashMap<String, Object>(); 402 Map<String, Object> map1 = new HashMap<String, Object>();
396 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 403 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
397 - /* Float xlts=0f;  
398 - Float jh=0f; 404 + String xlts="";
  405 + String zsgs="";
  406 + String jh="";
399 Float sj=0f; 407 Float sj=0f;
400 Float ccl=0f; 408 Float ccl=0f;
401 Float bcjh=0f; 409 Float bcjh=0f;
402 - Float bcsj=0f; 410 + String bcsj="";
403 Float bczxl=0f; 411 Float bczxl=0f;
404 - Float gs=0f;  
405 - Float zhgs=0f;*/ 412 + String gs="";
  413 + String zhgs="";
406 414
  415 + Map<String, Object> m = new HashMap<String, Object>();
  416 +
407 for (Executionrate l : executionrate) { 417 for (Executionrate l : executionrate) {
408 - Map<String, Object> m = new HashMap<String, Object>();  
409 - /* xlts +=l.getGs()==""?0f:Float.valueOf(l.getGs());  
410 - jh +=l.getZhgs()==""?0f:Float.valueOf(l.getZhgs());  
411 - sj +=l.getXl()==""?0f:Float.valueOf(l.getXl());  
412 - ccl +=l.getCchjh()==""?0f:Float.valueOf(l.getCchjh());  
413 - bcjh +=l.getCchsj()==""?0f:Float.valueOf(l.getCchsj());  
414 - bcsj +=l.getChl()==""?0f:Float.valueOf(l.getChl()); 418 +
  419 + xlts +=l.getGsgs()==""?0:String.valueOf(l.getGsgs());
  420 + zsgs +=l.getFgsgs()==""?0:String.valueOf(l.getFgsgs());
  421 + jh +=l.getXl()==""?0:String.valueOf(l.getXl());
  422 + sj +=l.getCchjh()==""?0f:Float.valueOf(l.getCchjh());
  423 + ccl +=l.getCchsj()==""?0f:Float.valueOf(l.getCchsj());
  424 + bcsj +=l.getChl()==""?0:String.valueOf(l.getChl());
415 bczxl +=l.getBcjh()==""?0f:Float.valueOf(l.getBcjh()); 425 bczxl +=l.getBcjh()==""?0f:Float.valueOf(l.getBcjh());
416 - gs +=l.getBbzxl()==""?0f:Float.valueOf(l.getBbzxl());  
417 - zhgs +=l.getBbzxl()==""?0f:Float.valueOf(l.getBbzxl()); 426 + gs +=l.getBcsj()==""?0:String.valueOf(l.getBcsj());
  427 + zhgs +=l.getBbzxl()==""?0:String.valueOf(l.getBbzxl());
  428 +
  429 +
418 430
419 - */  
420 m.put("rq", l.getRq()); 431 m.put("rq", l.getRq());
421 m.put("gs", l.getGs()); 432 m.put("gs", l.getGs());
422 m.put("zhgs", l.getZhgs()); 433 m.put("zhgs", l.getZhgs());
@@ -425,23 +436,24 @@ public class ExportController { @@ -425,23 +436,24 @@ public class ExportController {
425 m.put("cchsj", l.getCchsj()); 436 m.put("cchsj", l.getCchsj());
426 m.put("chl", l.getChl()); 437 m.put("chl", l.getChl());
427 m.put("bcjh", l.getBcjh()); 438 m.put("bcjh", l.getBcjh());
428 - m.put("bcsj", l.getBbzxl()); 439 + m.put("bcsj", l.getBcsj());
429 m.put("bbzxl", l.getBbzxl()); 440 m.put("bbzxl", l.getBbzxl());
430 m.put("sm", l.getSm()); 441 m.put("sm", l.getSm());
431 resList.add(m); 442 resList.add(m);
432 443
433 444
434 - /* m=new HashMap<String,Object>(); 445 + m=new HashMap<String,Object>();
  446 + m.put("total_gs", xlts);
  447 + m.put("total_zhgs", zsgs);
435 m.put("total_xlts", jh); 448 m.put("total_xlts", jh);
436 - m.put("total_jh", jh);  
437 - m.put("total_sj", sj);  
438 - m.put("total_ccl", ccl);  
439 - m.put("total_bcjh", bcjh);  
440 - m.put("total_bcsj", bcsj);  
441 - m.put("total_bczxl", bczxl);  
442 - m.put("total_gs", gs);  
443 - m.put("total_zhgs", zhgs);*/ 449 + m.put("total_jh", sj);
  450 + m.put("total_sj", ccl);
  451 + m.put("total_ccl",bcsj);
  452 + m.put("total_bcjh", bczxl);
  453 + m.put("total_bcsj", gs);
  454 + m.put("total_bczxl", zhgs);
444 455
  456 + map1 = m;
445 } 457 }
446 458
447 try { 459 try {
@@ -465,41 +477,42 @@ public class ExportController { @@ -465,41 +477,42 @@ public class ExportController {
465 List<Allline> allline = formsService.allline(map); 477 List<Allline> allline = formsService.allline(map);
466 Map<String, Object> map1 = new HashMap<String, Object>(); 478 Map<String, Object> map1 = new HashMap<String, Object>();
467 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 479 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
468 - /* Integer jh=0; 480 + Integer jh=0;
469 Integer sj=0; 481 Integer sj=0;
470 Integer ccl=0; 482 Integer ccl=0;
471 - Integer bcjh=0;  
472 - Float bcsj=0f; 483 + Double bcjh=0.0;
  484 + String bcsj="";
473 Integer bczxl=0; 485 Integer bczxl=0;
474 - Integer gs=0;  
475 - Float zhgs=0f;  
476 - */ 486 + String gs="";
  487 + String zhgs="";
  488 + Map<String, Object> m ;
477 for (Allline l : allline) { 489 for (Allline l : allline) {
478 - Map<String, Object> m = new HashMap<String, Object>(); 490 + m = new HashMap<String, Object>();
479 491
480 - /*jh +=l.getGsgs()=="" ? 0: Integer.valueOf(l.getGsgs()); 492 + jh +=l.getGsgs()=="" ? 0: Integer.valueOf(l.getGsgs());
481 sj +=l.getFgsgs()==""?0: Integer.valueOf(l.getFgsgs()); 493 sj +=l.getFgsgs()==""?0: Integer.valueOf(l.getFgsgs());
482 ccl +=l.getCchjh()==""?0: Integer.valueOf(l.getCchjh()); 494 ccl +=l.getCchjh()==""?0: Integer.valueOf(l.getCchjh());
483 - bcjh +=l.getCchsj()==""?0: Integer.valueOf(l.getCchsj());  
484 - bcsj +=l.getChl()==""?0f:Float.valueOf(l.getChl()); 495 + bcjh +=l.getCchsj()==""?0: Double.valueOf(l.getCchsj());
  496 +
  497 + bcsj +=l.getChl()==""? 0:String.valueOf(l.getChl());
485 bczxl +=l.getBcjh()==""?0: Integer.valueOf(l.getBcjh()); 498 bczxl +=l.getBcjh()==""?0: Integer.valueOf(l.getBcjh());
486 - gs +=l.getBbzxl()==""?0: Integer.valueOf(l.getBbzxl());  
487 - zhgs +=l.getBbzxl()==""?0f:Float.valueOf(l.getBbzxl());  
488 - */ 499 + gs +=l.getBcsj()==""?0: String.valueOf(l.getBcsj());
  500 + zhgs +=l.getBbzxl()==""?0:String.valueOf(l.getBbzxl());
  501 +
489 m.put("rq", l.getRq()); 502 m.put("rq", l.getRq());
490 - m.put("gs", l.getGsgs());  
491 - m.put("zhgs", l.getFgsgs());  
492 - //m.put("xl", l.getXl()); 503 + m.put("gs", l.getGs());
  504 + m.put("zhgs", l.getZhgs());
  505 + m.put("xl", l.getXl());
493 m.put("cchjh", l.getCchjh()); 506 m.put("cchjh", l.getCchjh());
494 m.put("cchsj", l.getCchsj()); 507 m.put("cchsj", l.getCchsj());
495 m.put("chl", l.getChl()); 508 m.put("chl", l.getChl());
496 m.put("bcjh", l.getBcjh()); 509 m.put("bcjh", l.getBcjh());
497 - m.put("bcsj", l.getBbzxl()); 510 + m.put("bcsj", l.getBcsj());
498 m.put("bbzxl", l.getBbzxl()); 511 m.put("bbzxl", l.getBbzxl());
499 m.put("sm", l.getSm()); 512 m.put("sm", l.getSm());
500 resList.add(m); 513 resList.add(m);
501 514
502 - /*m=new HashMap<String,Object>(); 515 + m=new HashMap<String,Object>();
503 m.put("total_jh", jh); 516 m.put("total_jh", jh);
504 m.put("total_sj", sj); 517 m.put("total_sj", sj);
505 m.put("total_ccl", ccl); 518 m.put("total_ccl", ccl);
@@ -508,7 +521,8 @@ public class ExportController { @@ -508,7 +521,8 @@ public class ExportController {
508 m.put("total_bczxl", bczxl); 521 m.put("total_bczxl", bczxl);
509 m.put("total_gs", gs); 522 m.put("total_gs", gs);
510 m.put("total_zhgs", zhgs); 523 m.put("total_zhgs", zhgs);
511 - */ 524 + map1 = m;
  525 +
512 } 526 }
513 527
514 try { 528 try {
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
@@ -616,8 +616,8 @@ public class FormsServiceImpl implements FormsService { @@ -616,8 +616,8 @@ public class FormsServiceImpl implements FormsService {
616 tu.setRq(rq); 616 tu.setRq(rq);
617 tu.setGs(arg0.getString("gs_name").toString()); 617 tu.setGs(arg0.getString("gs_name").toString());
618 tu.setZhgs(arg0.getString("fgs_name").toString()); 618 tu.setZhgs(arg0.getString("fgs_name").toString());
619 - //tu.setXl(arg0.getString("xlgs"));这个是根据公司判断线路有几条  
620 - tu.setXl(arg0.getString("sxl")); 619 + tu.setXl(arg0.getString("xlgs"));//这个是根据公司判断线路有几条
  620 + //tu.setXl(arg0.getString("sxl"));
621 tu.setXlmc(arg0.getString("sxl")); 621 tu.setXlmc(arg0.getString("sxl"));
622 tu.setCchjh(arg0.getString("jcl").toString()); 622 tu.setCchjh(arg0.getString("jcl").toString());
623 tu.setCchsj(arg0.getString("scl").toString()); 623 tu.setCchsj(arg0.getString("scl").toString());
src/main/resources/static/pages/forms/mould/allline.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/executionrate.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/turnoutrate.xls
No preview for this file type