Commit 2206d859e3e8b68501b8c78fbc80f66c53224720
1 parent
e446403e
mcy
Showing
5 changed files
with
85 additions
and
71 deletions
src/main/java/com/bsth/controller/forms/ExportController.java
| ... | ... | @@ -321,31 +321,34 @@ public class ExportController { |
| 321 | 321 | List<Turnoutrate> turnoutrate = formsService.turnoutrate(map); |
| 322 | 322 | Map<String, Object> map1 = new HashMap<String, Object>(); |
| 323 | 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 | 328 | Float sj=0f; |
| 327 | 329 | Float qz=0f; |
| 328 | 330 | Float ccl=0f; |
| 329 | 331 | Float bcjh=0f; |
| 330 | - Float bcsj=0f; | |
| 332 | + String bcsj=""; | |
| 331 | 333 | Float bczxl=0f; |
| 332 | - Float gs=0f; | |
| 333 | - Float zhgs=0f;*/ | |
| 334 | + String gs=""; | |
| 335 | + String zhgs=""; | |
| 334 | 336 | |
| 335 | 337 | for (Turnoutrate l : turnoutrate) { |
| 336 | 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 | 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 | 352 | m.put("rq", l.getRq()); |
| 350 | 353 | m.put("gs", l.getGs()); |
| 351 | 354 | m.put("zhgs", l.getZhgs()); |
| ... | ... | @@ -355,23 +358,27 @@ public class ExportController { |
| 355 | 358 | m.put("cchqz", l.getCchqz()); |
| 356 | 359 | m.put("chl", l.getChl()); |
| 357 | 360 | m.put("bcjh", l.getBcjh()); |
| 358 | - m.put("bcsj", l.getBbzxl()); | |
| 361 | + m.put("bcsj", l.getBcsj()); | |
| 359 | 362 | m.put("bbzxl", l.getBbzxl()); |
| 360 | 363 | m.put("sm", l.getSm()); |
| 361 | 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 | 371 | m.put("total_jh", jh); |
| 366 | 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 | 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 | 384 | try { |
| ... | ... | @@ -385,7 +392,7 @@ public class ExportController { |
| 385 | 392 | return resList; |
| 386 | 393 | } |
| 387 | 394 | |
| 388 | - //营运线路出车率统计表 | |
| 395 | + //班次执行率统计表 | |
| 389 | 396 | @RequestMapping(value = "/executionrateExport", method = RequestMethod.POST) |
| 390 | 397 | public List<Map<String, Object>> executionrateExport(@RequestParam Map<String, Object> map) { |
| 391 | 398 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| ... | ... | @@ -394,29 +401,33 @@ public class ExportController { |
| 394 | 401 | List<Executionrate> executionrate = formsService.executionrate(map); |
| 395 | 402 | Map<String, Object> map1 = new HashMap<String, Object>(); |
| 396 | 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 | 407 | Float sj=0f; |
| 400 | 408 | Float ccl=0f; |
| 401 | 409 | Float bcjh=0f; |
| 402 | - Float bcsj=0f; | |
| 410 | + String bcsj=""; | |
| 403 | 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 | 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 | 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 | 431 | m.put("rq", l.getRq()); |
| 421 | 432 | m.put("gs", l.getGs()); |
| 422 | 433 | m.put("zhgs", l.getZhgs()); |
| ... | ... | @@ -425,23 +436,24 @@ public class ExportController { |
| 425 | 436 | m.put("cchsj", l.getCchsj()); |
| 426 | 437 | m.put("chl", l.getChl()); |
| 427 | 438 | m.put("bcjh", l.getBcjh()); |
| 428 | - m.put("bcsj", l.getBbzxl()); | |
| 439 | + m.put("bcsj", l.getBcsj()); | |
| 429 | 440 | m.put("bbzxl", l.getBbzxl()); |
| 430 | 441 | m.put("sm", l.getSm()); |
| 431 | 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 | 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 | 459 | try { |
| ... | ... | @@ -465,41 +477,42 @@ public class ExportController { |
| 465 | 477 | List<Allline> allline = formsService.allline(map); |
| 466 | 478 | Map<String, Object> map1 = new HashMap<String, Object>(); |
| 467 | 479 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 468 | - /* Integer jh=0; | |
| 480 | + Integer jh=0; | |
| 469 | 481 | Integer sj=0; |
| 470 | 482 | Integer ccl=0; |
| 471 | - Integer bcjh=0; | |
| 472 | - Float bcsj=0f; | |
| 483 | + Double bcjh=0.0; | |
| 484 | + String bcsj=""; | |
| 473 | 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 | 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 | 493 | sj +=l.getFgsgs()==""?0: Integer.valueOf(l.getFgsgs()); |
| 482 | 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 | 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 | 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 | 506 | m.put("cchjh", l.getCchjh()); |
| 494 | 507 | m.put("cchsj", l.getCchsj()); |
| 495 | 508 | m.put("chl", l.getChl()); |
| 496 | 509 | m.put("bcjh", l.getBcjh()); |
| 497 | - m.put("bcsj", l.getBbzxl()); | |
| 510 | + m.put("bcsj", l.getBcsj()); | |
| 498 | 511 | m.put("bbzxl", l.getBbzxl()); |
| 499 | 512 | m.put("sm", l.getSm()); |
| 500 | 513 | resList.add(m); |
| 501 | 514 | |
| 502 | - /*m=new HashMap<String,Object>(); | |
| 515 | + m=new HashMap<String,Object>(); | |
| 503 | 516 | m.put("total_jh", jh); |
| 504 | 517 | m.put("total_sj", sj); |
| 505 | 518 | m.put("total_ccl", ccl); |
| ... | ... | @@ -508,7 +521,8 @@ public class ExportController { |
| 508 | 521 | m.put("total_bczxl", bczxl); |
| 509 | 522 | m.put("total_gs", gs); |
| 510 | 523 | m.put("total_zhgs", zhgs); |
| 511 | - */ | |
| 524 | + map1 = m; | |
| 525 | + | |
| 512 | 526 | } |
| 513 | 527 | |
| 514 | 528 | try { | ... | ... |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| ... | ... | @@ -616,8 +616,8 @@ public class FormsServiceImpl implements FormsService { |
| 616 | 616 | tu.setRq(rq); |
| 617 | 617 | tu.setGs(arg0.getString("gs_name").toString()); |
| 618 | 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 | 621 | tu.setXlmc(arg0.getString("sxl")); |
| 622 | 622 | tu.setCchjh(arg0.getString("jcl").toString()); |
| 623 | 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