Commit 6a67fd6b1083eb8a00517209b0a2cae58988c1f4

Authored by 娄高锋
1 parent d9e9eda5

预算报表:添加同比去年差异;新增报表:线路时刻表分析明细;

src/main/java/com/bsth/controller/forms/BudgetController.java
@@ -188,4 +188,37 @@ public class BudgetController extends BaseController<Budget, Integer>{ @@ -188,4 +188,37 @@ public class BudgetController extends BaseController<Budget, Integer>{
188 } 188 }
189 return service.timeSum(date, date2, type, key); 189 return service.timeSum(date, date2, type, key);
190 } 190 }
  191 +
  192 + @RequestMapping(value = "/timeAnaly", method = RequestMethod.POST)
  193 + public Map<String, Object> timeAnaly(@RequestParam Map<String, Object> map) throws Exception{
  194 + String company = "";
  195 + if(map.get("company")!=null){
  196 + company=map.get("company").toString();
  197 + }
  198 + String subCompany = "";
  199 + if(map.get("subCompany")!=null){
  200 + subCompany=map.get("subCompany").toString();
  201 + }
  202 + String date = "";
  203 + if(map.get("date")!=null){
  204 + date=map.get("date").toString();
  205 + }
  206 + String line = "";
  207 + if(map.get("line")!=null){
  208 + line=map.get("line").toString();
  209 + }
  210 + String model = "";
  211 + if(map.get("model")!=null){
  212 + model=map.get("model").toString();
  213 + }
  214 + String type = "";
  215 + if(map.get("type")!=null){
  216 + type=map.get("type").toString();
  217 + }
  218 + String key = "";
  219 + if(map.get("key")!=null){
  220 + key=map.get("key").toString();
  221 + }
  222 + return service.timeAnaly(company, subCompany, date, line, model, type, key);
  223 + }
191 } 224 }
src/main/java/com/bsth/repository/schedule/SchedulePlanInfoRepository.java
@@ -160,4 +160,12 @@ public interface SchedulePlanInfoRepository extends BaseRepository&lt;SchedulePlanI @@ -160,4 +160,12 @@ public interface SchedulePlanInfoRepository extends BaseRepository&lt;SchedulePlanI
160 "where schedule_date >= ?1 and schedule_date <= ?2 " + 160 "where schedule_date >= ?1 and schedule_date <= ?2 " +
161 "group by schedule_date, xl_bm, j_gh, s_gh ", nativeQuery = true) 161 "group by schedule_date, xl_bm, j_gh, s_gh ", nativeQuery = true)
162 List<Object[]> findPersonnelSchedule(Date date1, Date date2); 162 List<Object[]> findPersonnelSchedule(Date date1, Date date2);
  163 +
  164 + @Query(value="select s from SchedulePlanInfo s where s.xlBm = ?1 and s.ttInfo = ?2 "
  165 + + "and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?3 order by s.lpName,bcs")
  166 + List<SchedulePlanInfo> findPlanByTTinfo(String xlBm, String ttInfo, String scheduleDate);
  167 +
  168 + @Query(value="select s from SchedulePlanInfo s where s.xlBm = ?1 "
  169 + + "and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by s.lpName,bcs")
  170 + List<SchedulePlanInfo> findPlanByXlAndDate(String xlBm, String scheduleDate);
163 } 171 }
src/main/java/com/bsth/repository/schedule/TTInfoBxDetailRepository.java
@@ -2,9 +2,15 @@ package com.bsth.repository.schedule; @@ -2,9 +2,15 @@ package com.bsth.repository.schedule;
2 2
3 import com.bsth.entity.schedule.TTInfoBxDetail; 3 import com.bsth.entity.schedule.TTInfoBxDetail;
4 import com.bsth.repository.BaseRepository; 4 import com.bsth.repository.BaseRepository;
  5 +
  6 +import java.util.List;
  7 +
  8 +import org.springframework.data.jpa.repository.Query;
5 import org.springframework.stereotype.Repository; 9 import org.springframework.stereotype.Repository;
6 10
7 @Repository 11 @Repository
8 public interface TTInfoBxDetailRepository extends BaseRepository<TTInfoBxDetail, Long> { 12 public interface TTInfoBxDetailRepository extends BaseRepository<TTInfoBxDetail, Long> {
9 13
  14 + @Query(value = "select tt from TTInfoBxDetail tt where tt.ttinfo.id = ?1 and tt.xl.id = ?2 and tt.lp.id = ?3")
  15 + List<TTInfoBxDetail> findBxDetail( Long ttinfoId, Integer xl, Long lpId);
10 } 16 }
src/main/java/com/bsth/service/forms/BudgetService.java
@@ -26,4 +26,7 @@ public interface BudgetService extends BaseService&lt;Budget, Integer&gt; { @@ -26,4 +26,7 @@ public interface BudgetService extends BaseService&lt;Budget, Integer&gt; {
26 public List<Map<String, Object>> budgetSum(String year, String nature, String type, String key); 26 public List<Map<String, Object>> budgetSum(String year, String nature, String type, String key);
27 27
28 public List<Map<String, Object>> timeSum(String date, String date2, String type, String key) throws Exception; 28 public List<Map<String, Object>> timeSum(String date, String date2, String type, String key) throws Exception;
  29 +
  30 + public Map<String, Object> timeAnaly(String company, String subCompany, String date,
  31 + String line, String model, String type, String key) throws Exception;
29 } 32 }
src/main/java/com/bsth/service/forms/impl/BudgetServiceImpl.java
@@ -38,6 +38,7 @@ import com.bsth.entity.calc.CalcStatistics; @@ -38,6 +38,7 @@ import com.bsth.entity.calc.CalcStatistics;
38 import com.bsth.entity.forms.Budget; 38 import com.bsth.entity.forms.Budget;
39 import com.bsth.entity.forms.Revenue; 39 import com.bsth.entity.forms.Revenue;
40 import com.bsth.entity.schedule.SchedulePlanInfo; 40 import com.bsth.entity.schedule.SchedulePlanInfo;
  41 +import com.bsth.entity.schedule.TTInfoBxDetail;
41 import com.bsth.repository.calc.CalcStatisticsRepository; 42 import com.bsth.repository.calc.CalcStatisticsRepository;
42 import com.bsth.repository.form.BudgetRepository; 43 import com.bsth.repository.form.BudgetRepository;
43 import com.bsth.repository.form.RevenueRepository; 44 import com.bsth.repository.form.RevenueRepository;
@@ -45,6 +46,7 @@ import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; @@ -45,6 +46,7 @@ import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
45 import com.bsth.repository.schedule.CarConfigInfoRepository; 46 import com.bsth.repository.schedule.CarConfigInfoRepository;
46 import com.bsth.repository.schedule.EmployeeConfigInfoRepository; 47 import com.bsth.repository.schedule.EmployeeConfigInfoRepository;
47 import com.bsth.repository.schedule.SchedulePlanInfoRepository; 48 import com.bsth.repository.schedule.SchedulePlanInfoRepository;
  49 +import com.bsth.repository.schedule.TTInfoBxDetailRepository;
48 import com.bsth.service.LineService; 50 import com.bsth.service.LineService;
49 import com.bsth.service.forms.BudgetService; 51 import com.bsth.service.forms.BudgetService;
50 import com.bsth.service.impl.BaseServiceImpl; 52 import com.bsth.service.impl.BaseServiceImpl;
@@ -78,6 +80,9 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -78,6 +80,9 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
78 private ScheduleRealInfoRepository scheduleRealRepository; 80 private ScheduleRealInfoRepository scheduleRealRepository;
79 81
80 @Autowired 82 @Autowired
  83 + private TTInfoBxDetailRepository ttInfoBxDetailRepository;
  84 +
  85 + @Autowired
81 JdbcTemplate jdbcTemplate; 86 JdbcTemplate jdbcTemplate;
82 87
83 Logger logger = LoggerFactory.getLogger(this.getClass()); 88 Logger logger = LoggerFactory.getLogger(this.getClass());
@@ -420,6 +425,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -420,6 +425,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
420 @Override 425 @Override
421 public List<Map<String, Object>> budgetMileage(String year, String tttt, String kkk) { 426 public List<Map<String, Object>> budgetMileage(String year, String tttt, String kkk) {
422 // TODO Auto-generated method stub 427 // TODO Auto-generated method stub
  428 + SimpleDateFormat sdfYY = new SimpleDateFormat("YYYY");
423 SimpleDateFormat sdfMM = new SimpleDateFormat("MM"); 429 SimpleDateFormat sdfMM = new SimpleDateFormat("MM");
424 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 430 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
425 Map<String, Map<String, Object>> keyMap = new HashMap<String, Map<String, Object>>(); 431 Map<String, Map<String, Object>> keyMap = new HashMap<String, Map<String, Object>>();
@@ -427,6 +433,15 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -427,6 +433,15 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
427 List<Budget> findByYear = repository.findByYear(year); 433 List<Budget> findByYear = repository.findByYear(year);
428 List<CalcStatistics> list = calcStatisticsRepository.selectByDateAndLineTj3(year+"-01-01", year+"-12-31"); 434 List<CalcStatistics> list = calcStatisticsRepository.selectByDateAndLineTj3(year+"-01-01", year+"-12-31");
429 435
  436 + String year_1 = "";
  437 + try {
  438 + year_1 = sdfYY.format(sdfYY.parse((Integer.valueOf(year)-1)+""));
  439 + } catch (ParseException e) {
  440 + // TODO Auto-generated catch block
  441 + e.printStackTrace();
  442 + }
  443 + List<CalcStatistics> scheduleList_1 = calcStatisticsRepository.selectByDateAndLineTj3(year_1+"-01-01", year_1+"-12-31");
  444 +
430 Map<String, Map<String, Object>> xlMap = new HashMap<String, Map<String, Object>>(); 445 Map<String, Map<String, Object>> xlMap = new HashMap<String, Map<String, Object>>();
431 List<Map<String, Object>> xlList = new ArrayList<Map<String, Object>>(); 446 List<Map<String, Object>> xlList = new ArrayList<Map<String, Object>>();
432 447
@@ -439,7 +454,6 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -439,7 +454,6 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
439 if(b.getFormalMileage()==null || b.getFormalMileage() < 0d){ 454 if(b.getFormalMileage()==null || b.getFormalMileage() < 0d){
440 continue; 455 continue;
441 } 456 }
442 - System.out.println(b.getId());  
443 String gsBm = b.getGsBm(); 457 String gsBm = b.getGsBm();
444 String xlBm = b.getXlBm(); 458 String xlBm = b.getXlBm();
445 String xlName = b.getXlName(); 459 String xlName = b.getXlName();
@@ -461,6 +475,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -461,6 +475,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
461 for(int i = 1; i <= 12; i++){ 475 for(int i = 1; i <= 12; i++){
462 m.put("mon"+i, ""); 476 m.put("mon"+i, "");
463 m.put("bud"+i, ""); 477 m.put("bud"+i, "");
  478 + m.put("pre"+i, "");
464 } 479 }
465 String bud = "bud" + Integer.valueOf(b.getYear().split("-")[1]); 480 String bud = "bud" + Integer.valueOf(b.getYear().split("-")[1]);
466 if(b.getFormalMileage()!=null){ 481 if(b.getFormalMileage()!=null){
@@ -497,10 +512,6 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -497,10 +512,6 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
497 } 512 }
498 m.put(bud, b.getFormalMileage()); 513 m.put(bud, b.getFormalMileage());
499 } 514 }
500 - System.out.println(m);  
501 - System.out.println(b.getBudgetMileage());  
502 - System.out.println(b.getChangeMileage());  
503 - System.out.println(b.getFormalMileage());  
504 } 515 }
505 } 516 }
506 517
@@ -526,6 +537,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -526,6 +537,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
526 for(int i = 1; i <= 12; i++){ 537 for(int i = 1; i <= 12; i++){
527 m.put("mon"+i, ""); 538 m.put("mon"+i, "");
528 m.put("bud"+i, ""); 539 m.put("bud"+i, "");
  540 + m.put("pre"+i, "");
529 } 541 }
530 m.put("monAll", "0"); 542 m.put("monAll", "0");
531 xlMap.put(key, m); 543 xlMap.put(key, m);
@@ -542,16 +554,46 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -542,16 +554,46 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
542 } 554 }
543 } 555 }
544 556
545 - for(Map<String, Object> m : xlList){  
546 - BigDecimal monAll = new BigDecimal("0");  
547 - for(int i = 1; i <= 12; i++){  
548 - if(m.get("mon"+i).toString().length() > 0){  
549 - BigDecimal val = new BigDecimal(m.get("mon"+i).toString());  
550 - monAll = monAll.add(val); 557 + for(CalcStatistics cs1 : scheduleList_1){ // 去年公里
  558 + String gsdm = cs1.getGsdm();
  559 + String xlBm = cs1.getXl();
  560 + String xlName = cs1.getXlName();
  561 + int sfyy = lineNature.containsKey(xlBm)&&lineNature.get(xlBm)?1:0;
  562 + int sfjc = xlName.contains("机场")?1:0;
  563 +
  564 + String key = gsdm + "_" + xlBm;
  565 + if(!(xlMap.containsKey(key))){
  566 + Map<String, Object> m = new HashMap<String, Object>();
  567 + m.put("gsBm", gsdm);
  568 + m.put("gsName", BasicData.businessCodeNameMap.get(gsdm));
  569 + m.put("xlBm", xlBm);
  570 + m.put("xlName", xlName);
  571 + m.put("sfyy", sfyy);
  572 + m.put("sfjc", sfjc);
  573 + m.put("budget", "");
  574 + m.put("change", "");
  575 + m.put("formal", "");
  576 + for(int i = 1; i <= 12; i++){
  577 + m.put("mon"+i, "");
  578 + m.put("bud"+i, "");
  579 + m.put("pre"+i, "");
551 } 580 }
  581 + m.put("monAll", "0");
  582 + xlMap.put(key, m);
  583 + xlList.add(m);
552 } 584 }
553 - m.put("monAll", monAll.doubleValue());  
554 - 585 + Map<String, Object> map = xlMap.get(key);
  586 + String pre = "pre" + Integer.valueOf(sdfMM.format(cs1.getDate()));
  587 + String val = map.get(pre).toString();
  588 + BigDecimal num = new BigDecimal(cs1.getSjzlc().toString());
  589 + if(val.length() == 0){
  590 + map.put(pre, num.doubleValue());
  591 + } else {
  592 + map.put(pre, new BigDecimal(val).add(num).doubleValue());
  593 + }
  594 + }
  595 +
  596 + for(Map<String, Object> m : xlList){
555 String gsBm = m.get("gsBm").toString(); 597 String gsBm = m.get("gsBm").toString();
556 int type = Integer.valueOf(m.get("sfyy").toString()); 598 int type = Integer.valueOf(m.get("sfyy").toString());
557 int item = Integer.valueOf(m.get("sfjc").toString()) == 1 ? 0 : 1; 599 int item = Integer.valueOf(m.get("sfjc").toString()) == 1 ? 0 : 1;
@@ -594,7 +636,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -594,7 +636,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
594 } 636 }
595 } 637 }
596 for(int i = 1; i <= 12; i++){ 638 for(int i = 1; i <= 12; i++){
597 - String mon = "mon"+i, bud = "bud"+i; 639 + String mon = "mon"+i, bud = "bud"+i, pre = "pre"+i;
598 if(m.get(mon).toString().length() > 0){ 640 if(m.get(mon).toString().length() > 0){
599 if(map.get(mon).toString().length() > 0){ 641 if(map.get(mon).toString().length() > 0){
600 map.put(mon, new BigDecimal(m.get(mon).toString()).add( 642 map.put(mon, new BigDecimal(m.get(mon).toString()).add(
@@ -611,20 +653,48 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -611,20 +653,48 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
611 map.put(bud, new BigDecimal(m.get(bud).toString()).doubleValue()); 653 map.put(bud, new BigDecimal(m.get(bud).toString()).doubleValue());
612 } 654 }
613 } 655 }
  656 + if(m.get(pre).toString().length() > 0){
  657 + if(map.get(pre).toString().length() > 0){
  658 + map.put(pre, new BigDecimal(m.get(pre).toString()).add(
  659 + new BigDecimal(map.get(pre).toString())).doubleValue());
  660 + } else {
  661 + map.put(pre, new BigDecimal(m.get(pre).toString()).doubleValue());
  662 + }
  663 + }
614 } 664 }
615 List<Map<String, Object>>dataList = (List<Map<String, Object>>)map.get("dataList"); 665 List<Map<String, Object>>dataList = (List<Map<String, Object>>)map.get("dataList");
616 dataList.add(m); 666 dataList.add(m);
617 } 667 }
618 668
  669 + BigDecimal monAll = new BigDecimal("0");
  670 + BigDecimal preAll = new BigDecimal("0");
619 for(int i = 1; i <= 12; i++){ 671 for(int i = 1; i <= 12; i++){
620 if(m.get("mon"+i).toString().length() > 0){ 672 if(m.get("mon"+i).toString().length() > 0){
621 BigDecimal val = new BigDecimal(m.get("mon"+i).toString()); 673 BigDecimal val = new BigDecimal(m.get("mon"+i).toString());
  674 + monAll = monAll.add(val);
622 val = val.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP); 675 val = val.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
623 m.put("mon"+i, val.doubleValue()); 676 m.put("mon"+i, val.doubleValue());
624 } 677 }
  678 + if(m.get("pre"+i).toString().length() > 0){
  679 + BigDecimal val = new BigDecimal(m.get("pre"+i).toString());
  680 + preAll = preAll.add(val);
  681 + val = val.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
  682 + m.put("pre"+i, val.doubleValue());
  683 + if(m.get("mon"+i).toString().length() > 0){
  684 + BigDecimal monVal = new BigDecimal(m.get("mon"+i).toString());
  685 + BigDecimal sub = monVal.subtract(val);
  686 + m.put("sub"+i, sub.doubleValue() > 0 ? "+" + sub.doubleValue() : sub.doubleValue());
  687 + } else {
  688 + m.put("sub"+i, "-" + val.doubleValue());
  689 + }
  690 + }
625 } 691 }
626 monAll = monAll.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP); 692 monAll = monAll.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
  693 + preAll = preAll.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
  694 + Double subAll = monAll.subtract(preAll).doubleValue();
627 m.put("monAll", monAll.doubleValue()); 695 m.put("monAll", monAll.doubleValue());
  696 + m.put("preAll", preAll.doubleValue());
  697 + m.put("subAll", subAll > 0 ? "+" + subAll : subAll);
628 698
629 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0 699 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0
630 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){ 700 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){
@@ -634,7 +704,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -634,7 +704,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
634 new BigDecimal(100)).divide( 704 new BigDecimal(100)).divide(
635 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%"); 705 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%");
636 BigDecimal diff = monAll.subtract(formal); 706 BigDecimal diff = monAll.subtract(formal);
637 - m.put("diff", diff.doubleValue() > 0 ? "+" + diff.toString() : diff.toString()); 707 + m.put("diff", diff.doubleValue() > 0 ? "+" + diff.doubleValue() : diff.doubleValue());
638 } else { 708 } else {
639 m.put("complete", ""); 709 m.put("complete", "");
640 m.put("diff", ""); 710 m.put("diff", "");
@@ -684,6 +754,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -684,6 +754,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
684 for(String key : strs){ 754 for(String key : strs){
685 Map<String, Object> m = keyMap.get(key); 755 Map<String, Object> m = keyMap.get(key);
686 BigDecimal monAll = new BigDecimal("0"); 756 BigDecimal monAll = new BigDecimal("0");
  757 + BigDecimal preAll = new BigDecimal("0");
687 for(int i = 1; i <= 12; i++){ 758 for(int i = 1; i <= 12; i++){
688 if(m.get("mon"+i).toString().length() > 0){ 759 if(m.get("mon"+i).toString().length() > 0){
689 BigDecimal val = new BigDecimal(m.get("mon"+i).toString()); 760 BigDecimal val = new BigDecimal(m.get("mon"+i).toString());
@@ -691,9 +762,26 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -691,9 +762,26 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
691 val = val.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP); 762 val = val.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
692 m.put("mon"+i, val.doubleValue()); 763 m.put("mon"+i, val.doubleValue());
693 } 764 }
  765 + if(m.get("pre"+i).toString().length() > 0){
  766 + BigDecimal val = new BigDecimal(m.get("pre"+i).toString());
  767 + preAll = preAll.add(val);
  768 + val = val.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
  769 + m.put("pre"+i, val.doubleValue());
  770 + if(m.get("mon"+i).toString().length() > 0){
  771 + BigDecimal monVal = new BigDecimal(m.get("mon"+i).toString());
  772 + BigDecimal sub = monVal.subtract(val);
  773 + m.put("sub"+i, sub.doubleValue() > 0 ? "+" + sub.doubleValue() : sub.doubleValue());
  774 + } else {
  775 + m.put("sub"+i, "-" + val.doubleValue());
  776 + }
  777 + }
694 } 778 }
695 monAll = monAll.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP); 779 monAll = monAll.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
  780 + preAll = preAll.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
  781 + Double subAll = monAll.subtract(preAll).doubleValue();
696 m.put("monAll", monAll.doubleValue()); 782 m.put("monAll", monAll.doubleValue());
  783 + m.put("preAll", preAll.doubleValue());
  784 + m.put("subAll", subAll > 0 ? "+" + subAll : subAll);
697 785
698 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0 786 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0
699 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){ 787 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){
@@ -703,7 +791,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -703,7 +791,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
703 new BigDecimal(100)).divide( 791 new BigDecimal(100)).divide(
704 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%"); 792 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%");
705 BigDecimal diff = monAll.subtract(formal); 793 BigDecimal diff = monAll.subtract(formal);
706 - m.put("diff", diff.doubleValue() > 0 ? "+" + diff.toString() : diff.toString()); 794 + m.put("diff", diff.doubleValue() > 0 ? "+" + diff.doubleValue() : diff.doubleValue());
707 } else { 795 } else {
708 m.put("complete", ""); 796 m.put("complete", "");
709 m.put("diff", ""); 797 m.put("diff", "");
@@ -774,6 +862,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -774,6 +862,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
774 @Override 862 @Override
775 public List<Map<String, Object>> budgetPerson(String year, String tttt, String kkk) { 863 public List<Map<String, Object>> budgetPerson(String year, String tttt, String kkk) {
776 // TODO Auto-generated method stub 864 // TODO Auto-generated method stub
  865 + SimpleDateFormat sdfYY = new SimpleDateFormat("YYYY");
777 SimpleDateFormat sdfMM = new SimpleDateFormat("MM"); 866 SimpleDateFormat sdfMM = new SimpleDateFormat("MM");
778 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 867 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
779 Map<String, Map<String, Object>> keyMap = new HashMap<String, Map<String, Object>>(); 868 Map<String, Map<String, Object>> keyMap = new HashMap<String, Map<String, Object>>();
@@ -781,6 +870,15 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -781,6 +870,15 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
781 List<Budget> findByYear = repository.findByYear(year); 870 List<Budget> findByYear = repository.findByYear(year);
782 List<Revenue> list = revenueRepository.findByDates(year+"-01-01", year+"-12-31"); 871 List<Revenue> list = revenueRepository.findByDates(year+"-01-01", year+"-12-31");
783 872
  873 + String year_1 = "";
  874 + try {
  875 + year_1 = sdfYY.format(sdfYY.parse((Integer.valueOf(year)-1)+""));
  876 + } catch (ParseException e) {
  877 + // TODO Auto-generated catch block
  878 + e.printStackTrace();
  879 + }
  880 + List<Revenue> revenueList_1 = revenueRepository.findByDates(year_1+"-01-01", year_1+"-12-31");
  881 +
784 Map<String, Map<String, Object>> xlMap = new HashMap<String, Map<String, Object>>(); 882 Map<String, Map<String, Object>> xlMap = new HashMap<String, Map<String, Object>>();
785 List<Map<String, Object>> xlList = new ArrayList<Map<String, Object>>(); 883 List<Map<String, Object>> xlList = new ArrayList<Map<String, Object>>();
786 884
@@ -814,6 +912,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -814,6 +912,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
814 for(int i = 1; i <= 12; i++){ 912 for(int i = 1; i <= 12; i++){
815 m.put("mon"+i, ""); 913 m.put("mon"+i, "");
816 m.put("bud"+i, ""); 914 m.put("bud"+i, "");
  915 + m.put("pre"+i, "");
817 } 916 }
818 String bud = "bud" + Integer.valueOf(b.getYear().split("-")[1]); 917 String bud = "bud" + Integer.valueOf(b.getYear().split("-")[1]);
819 if(b.getFormalPerson()!=null){ 918 if(b.getFormalPerson()!=null){
@@ -875,6 +974,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -875,6 +974,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
875 for(int i = 1; i <= 12; i++){ 974 for(int i = 1; i <= 12; i++){
876 m.put("mon"+i, ""); 975 m.put("mon"+i, "");
877 m.put("bud"+i, ""); 976 m.put("bud"+i, "");
  977 + m.put("pre"+i, "");
878 } 978 }
879 m.put("monAll", "0"); 979 m.put("monAll", "0");
880 xlMap.put(key, m); 980 xlMap.put(key, m);
@@ -891,16 +991,48 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -891,16 +991,48 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
891 } 991 }
892 } 992 }
893 993
894 - for(Map<String, Object> m : xlList){  
895 - BigDecimal monAll = new BigDecimal("0");  
896 - for(int i = 1; i <= 12; i++){  
897 - if(m.get("mon"+i).toString().length() > 0){  
898 - BigDecimal val = new BigDecimal(m.get("mon"+i).toString());  
899 - monAll = monAll.add(val); 994 + for(Revenue cs1 : revenueList_1){ // 去年人次与营收
  995 + String gsBm = cs1.getGsBm();
  996 + String xlBm = cs1.getXlBm();
  997 + String xlName = cs1.getXlName();
  998 + int sfyy = lineNature.containsKey(xlBm)&&lineNature.get(xlBm)?1:0;
  999 + int sfjc = xlName.contains("机场")?1:0;
  1000 +
  1001 + { // 去年人次
  1002 + String key = gsBm + "_" + xlBm;
  1003 + if(!(xlMap.containsKey(key))){
  1004 + Map<String, Object> m = new HashMap<String, Object>();
  1005 + m.put("gsBm", gsBm);
  1006 + m.put("gsName", BasicData.businessCodeNameMap.get(gsBm));
  1007 + m.put("xlBm", xlBm);
  1008 + m.put("xlName", xlName);
  1009 + m.put("sfyy", sfyy);
  1010 + m.put("sfjc", sfjc);
  1011 + m.put("budget", "");
  1012 + m.put("change", "");
  1013 + m.put("formal", "");
  1014 + for(int i = 1; i <= 12; i++){
  1015 + m.put("mon"+i, "");
  1016 + m.put("bud"+i, "");
  1017 + m.put("pre"+i, "");
  1018 + }
  1019 + m.put("monAll", "0");
  1020 + xlMap.put(key, m);
  1021 + xlList.add(m);
  1022 + }
  1023 + Map<String, Object> map = xlMap.get(key);
  1024 + String pre = "pre" + Integer.valueOf(sdfMM.format(cs1.getScheduleDate()));
  1025 + String val = map.get(pre).toString();
  1026 + BigDecimal num = new BigDecimal(cs1.getNum().toString());
  1027 + if(val.length() == 0){
  1028 + map.put(pre, num.doubleValue());
  1029 + } else {
  1030 + map.put(pre, new BigDecimal(val).add(num).doubleValue());
900 } 1031 }
901 } 1032 }
902 - m.put("monAll", monAll.doubleValue());  
903 - 1033 + }
  1034 +
  1035 + for(Map<String, Object> m : xlList){
904 String gsBm = m.get("gsBm").toString(); 1036 String gsBm = m.get("gsBm").toString();
905 int type = Integer.valueOf(m.get("sfyy").toString()); 1037 int type = Integer.valueOf(m.get("sfyy").toString());
906 int item = Integer.valueOf(m.get("sfjc").toString()) == 1 ? 0 : 1; 1038 int item = Integer.valueOf(m.get("sfjc").toString()) == 1 ? 0 : 1;
@@ -943,7 +1075,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -943,7 +1075,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
943 } 1075 }
944 } 1076 }
945 for(int i = 1; i <= 12; i++){ 1077 for(int i = 1; i <= 12; i++){
946 - String mon = "mon"+i, bud = "bud"+i; 1078 + String mon = "mon"+i, bud = "bud"+i, pre = "pre"+i;
947 if(m.get(mon).toString().length() > 0){ 1079 if(m.get(mon).toString().length() > 0){
948 if(map.get(mon).toString().length() > 0){ 1080 if(map.get(mon).toString().length() > 0){
949 map.put(mon, new BigDecimal(m.get(mon).toString()).add( 1081 map.put(mon, new BigDecimal(m.get(mon).toString()).add(
@@ -960,20 +1092,48 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -960,20 +1092,48 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
960 map.put(bud, new BigDecimal(m.get(bud).toString()).doubleValue()); 1092 map.put(bud, new BigDecimal(m.get(bud).toString()).doubleValue());
961 } 1093 }
962 } 1094 }
  1095 + if(m.get(pre).toString().length() > 0){
  1096 + if(map.get(pre).toString().length() > 0){
  1097 + map.put(pre, new BigDecimal(m.get(pre).toString()).add(
  1098 + new BigDecimal(map.get(pre).toString())).doubleValue());
  1099 + } else {
  1100 + map.put(pre, new BigDecimal(m.get(pre).toString()).doubleValue());
  1101 + }
  1102 + }
963 } 1103 }
964 List<Map<String, Object>>dataList = (List<Map<String, Object>>)map.get("dataList"); 1104 List<Map<String, Object>>dataList = (List<Map<String, Object>>)map.get("dataList");
965 dataList.add(m); 1105 dataList.add(m);
966 } 1106 }
967 1107
  1108 + BigDecimal monAll = new BigDecimal("0");
  1109 + BigDecimal preAll = new BigDecimal("0");
968 for(int i = 1; i <= 12; i++){ 1110 for(int i = 1; i <= 12; i++){
969 if(m.get("mon"+i).toString().length() > 0){ 1111 if(m.get("mon"+i).toString().length() > 0){
970 BigDecimal val = new BigDecimal(m.get("mon"+i).toString()); 1112 BigDecimal val = new BigDecimal(m.get("mon"+i).toString());
  1113 + monAll = monAll.add(val);
971 val = val.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP); 1114 val = val.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
972 m.put("mon"+i, val.doubleValue()); 1115 m.put("mon"+i, val.doubleValue());
973 } 1116 }
  1117 + if(m.get("pre"+i).toString().length() > 0){
  1118 + BigDecimal val = new BigDecimal(m.get("pre"+i).toString());
  1119 + preAll = preAll.add(val);
  1120 + val = val.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
  1121 + m.put("pre"+i, val.doubleValue());
  1122 + if(m.get("mon"+i).toString().length() > 0){
  1123 + BigDecimal monVal = new BigDecimal(m.get("mon"+i).toString());
  1124 + BigDecimal sub = monVal.subtract(val);
  1125 + m.put("sub"+i, sub.doubleValue() > 0 ? "+" + sub.doubleValue() : sub.doubleValue());
  1126 + } else {
  1127 + m.put("sub"+i, "-" + val.doubleValue());
  1128 + }
  1129 + }
974 } 1130 }
975 monAll = monAll.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP); 1131 monAll = monAll.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
  1132 + preAll = preAll.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
  1133 + Double subAll = monAll.subtract(preAll).doubleValue();
976 m.put("monAll", monAll.doubleValue()); 1134 m.put("monAll", monAll.doubleValue());
  1135 + m.put("preAll", preAll.doubleValue());
  1136 + m.put("subAll", subAll > 0 ? "+" + subAll : subAll);
977 1137
978 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0 1138 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0
979 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){ 1139 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){
@@ -983,7 +1143,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -983,7 +1143,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
983 new BigDecimal(100)).divide( 1143 new BigDecimal(100)).divide(
984 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%"); 1144 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%");
985 BigDecimal diff = monAll.subtract(formal); 1145 BigDecimal diff = monAll.subtract(formal);
986 - m.put("diff", diff.doubleValue() > 0 ? "+" + diff.toString() : diff.toString()); 1146 + m.put("diff", diff.doubleValue() > 0 ? "+" + diff.doubleValue() : diff.doubleValue());
987 } else { 1147 } else {
988 m.put("complete", ""); 1148 m.put("complete", "");
989 m.put("diff", ""); 1149 m.put("diff", "");
@@ -1033,6 +1193,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1033,6 +1193,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1033 for(String key : strs){ 1193 for(String key : strs){
1034 Map<String, Object> m = keyMap.get(key); 1194 Map<String, Object> m = keyMap.get(key);
1035 BigDecimal monAll = new BigDecimal("0"); 1195 BigDecimal monAll = new BigDecimal("0");
  1196 + BigDecimal preAll = new BigDecimal("0");
1036 for(int i = 1; i <= 12; i++){ 1197 for(int i = 1; i <= 12; i++){
1037 if(m.get("mon"+i).toString().length() > 0){ 1198 if(m.get("mon"+i).toString().length() > 0){
1038 BigDecimal val = new BigDecimal(m.get("mon"+i).toString()); 1199 BigDecimal val = new BigDecimal(m.get("mon"+i).toString());
@@ -1040,9 +1201,26 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1040,9 +1201,26 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1040 val = val.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP); 1201 val = val.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
1041 m.put("mon"+i, val.doubleValue()); 1202 m.put("mon"+i, val.doubleValue());
1042 } 1203 }
  1204 + if(m.get("pre"+i).toString().length() > 0){
  1205 + BigDecimal val = new BigDecimal(m.get("pre"+i).toString());
  1206 + preAll = preAll.add(val);
  1207 + val = val.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
  1208 + m.put("pre"+i, val.doubleValue());
  1209 + if(m.get("mon"+i).toString().length() > 0){
  1210 + BigDecimal monVal = new BigDecimal(m.get("mon"+i).toString());
  1211 + BigDecimal sub = monVal.subtract(val);
  1212 + m.put("sub"+i, sub.doubleValue() > 0 ? "+" + sub.doubleValue() : sub.doubleValue());
  1213 + } else {
  1214 + m.put("sub"+i, "-" + val.doubleValue());
  1215 + }
  1216 + }
1043 } 1217 }
1044 monAll = monAll.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP); 1218 monAll = monAll.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
  1219 + preAll = preAll.divide(new BigDecimal("10000"), 3, BigDecimal.ROUND_HALF_UP);
  1220 + Double subAll = monAll.subtract(preAll).doubleValue();
1045 m.put("monAll", monAll.doubleValue()); 1221 m.put("monAll", monAll.doubleValue());
  1222 + m.put("preAll", preAll.doubleValue());
  1223 + m.put("subAll", subAll > 0 ? "+" + subAll : subAll);
1046 1224
1047 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0 1225 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0
1048 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){ 1226 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){
@@ -1052,7 +1230,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1052,7 +1230,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1052 new BigDecimal(100)).divide( 1230 new BigDecimal(100)).divide(
1053 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%"); 1231 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%");
1054 BigDecimal diff = monAll.subtract(formal); 1232 BigDecimal diff = monAll.subtract(formal);
1055 - m.put("diff", diff.doubleValue() > 0 ? "+" + diff.toString() : diff.toString()); 1233 + m.put("diff", diff.doubleValue() > 0 ? "+" + diff.doubleValue() : diff.doubleValue());
1056 } else { 1234 } else {
1057 m.put("complete", ""); 1235 m.put("complete", "");
1058 m.put("diff", ""); 1236 m.put("diff", "");
@@ -1123,6 +1301,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1123,6 +1301,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1123 @Override 1301 @Override
1124 public List<Map<String, Object>> budgetAmounts(String year, String tttt, String kkk) { 1302 public List<Map<String, Object>> budgetAmounts(String year, String tttt, String kkk) {
1125 // TODO Auto-generated method stub 1303 // TODO Auto-generated method stub
  1304 + SimpleDateFormat sdfYY = new SimpleDateFormat("YYYY");
1126 SimpleDateFormat sdfMM = new SimpleDateFormat("MM"); 1305 SimpleDateFormat sdfMM = new SimpleDateFormat("MM");
1127 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 1306 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
1128 Map<String, Map<String, Object>> keyMap = new HashMap<String, Map<String, Object>>(); 1307 Map<String, Map<String, Object>> keyMap = new HashMap<String, Map<String, Object>>();
@@ -1130,6 +1309,16 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1130,6 +1309,16 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1130 List<Budget> findByYear = repository.findByYear(year); 1309 List<Budget> findByYear = repository.findByYear(year);
1131 List<Revenue> list = revenueRepository.findByDates(year+"-01-01", year+"-12-31"); 1310 List<Revenue> list = revenueRepository.findByDates(year+"-01-01", year+"-12-31");
1132 1311
  1312 + String year_1 = "";
  1313 + try {
  1314 + year_1 = sdfYY.format(sdfYY.parse((Integer.valueOf(year)-1)+""));
  1315 + } catch (ParseException e) {
  1316 + // TODO Auto-generated catch block
  1317 + e.printStackTrace();
  1318 + }
  1319 + List<CalcStatistics> scheduleList_1 = calcStatisticsRepository.selectByDateAndLineTj3(year_1+"-01-01", year_1+"-12-31");
  1320 + List<Revenue> revenueList_1 = revenueRepository.findByDates(year_1+"-01-01", year_1+"-12-31");
  1321 +
1133 Map<String, Map<String, Object>> xlMap = new HashMap<String, Map<String, Object>>(); 1322 Map<String, Map<String, Object>> xlMap = new HashMap<String, Map<String, Object>>();
1134 List<Map<String, Object>> xlList = new ArrayList<Map<String, Object>>(); 1323 List<Map<String, Object>> xlList = new ArrayList<Map<String, Object>>();
1135 1324
@@ -1163,6 +1352,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1163,6 +1352,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1163 for(int i = 1; i <= 12; i++){ 1352 for(int i = 1; i <= 12; i++){
1164 m.put("mon"+i, ""); 1353 m.put("mon"+i, "");
1165 m.put("bud"+i, ""); 1354 m.put("bud"+i, "");
  1355 + m.put("pre"+i, "");
1166 } 1356 }
1167 String bud = "bud" + Integer.valueOf(b.getYear().split("-")[1]); 1357 String bud = "bud" + Integer.valueOf(b.getYear().split("-")[1]);
1168 if(b.getFormalAmounts()!=null){ 1358 if(b.getFormalAmounts()!=null){
@@ -1225,6 +1415,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1225,6 +1415,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1225 for(int i = 1; i <= 12; i++){ 1415 for(int i = 1; i <= 12; i++){
1226 m.put("mon"+i, ""); 1416 m.put("mon"+i, "");
1227 m.put("bud"+i, ""); 1417 m.put("bud"+i, "");
  1418 + m.put("pre"+i, "");
1228 } 1419 }
1229 m.put("monAll", "0"); 1420 m.put("monAll", "0");
1230 m.put("num", "0"); 1421 m.put("num", "0");
@@ -1249,16 +1440,48 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1249,16 +1440,48 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1249 } 1440 }
1250 } 1441 }
1251 1442
1252 - for(Map<String, Object> m : xlList){  
1253 - BigDecimal monAll = new BigDecimal("0");  
1254 - for(int i = 1; i <= 12; i++){  
1255 - if(m.get("mon"+i).toString().length() > 0){  
1256 - BigDecimal val = new BigDecimal(m.get("mon"+i).toString());  
1257 - monAll = monAll.add(val); 1443 + for(Revenue cs1 : revenueList_1){ // 去年人次与营收
  1444 + String gsBm = cs1.getGsBm();
  1445 + String xlBm = cs1.getXlBm();
  1446 + String xlName = cs1.getXlName();
  1447 + int sfyy = lineNature.containsKey(xlBm)&&lineNature.get(xlBm)?1:0;
  1448 + int sfjc = xlName.contains("机场")?1:0;
  1449 +
  1450 + { // 去年营收
  1451 + String key = gsBm + "_" + xlBm;
  1452 + if(!(xlMap.containsKey(key))){
  1453 + Map<String, Object> m = new HashMap<String, Object>();
  1454 + m.put("gsBm", gsBm);
  1455 + m.put("gsName", BasicData.businessCodeNameMap.get(gsBm));
  1456 + m.put("xlBm", xlBm);
  1457 + m.put("xlName", xlName);
  1458 + m.put("sfyy", sfyy);
  1459 + m.put("sfjc", sfjc);
  1460 + m.put("budget", "");
  1461 + m.put("change", "");
  1462 + m.put("formal", "");
  1463 + for(int i = 1; i <= 12; i++){
  1464 + m.put("mon"+i, "");
  1465 + m.put("bud"+i, "");
  1466 + m.put("pre"+i, "");
  1467 + }
  1468 + m.put("monAll", "0");
  1469 + xlMap.put(key, m);
  1470 + xlList.add(m);
  1471 + }
  1472 + Map<String, Object> map = xlMap.get(key);
  1473 + String pre = "pre" + Integer.valueOf(sdfMM.format(cs1.getScheduleDate()));
  1474 + String val = map.get(pre).toString();
  1475 + BigDecimal num = new BigDecimal(cs1.getAmount().toString());
  1476 + if(val.length() == 0){
  1477 + map.put(pre, num.doubleValue());
  1478 + } else {
  1479 + map.put(pre, new BigDecimal(val).add(num).doubleValue());
1258 } 1480 }
1259 } 1481 }
1260 - m.put("monAll", monAll.doubleValue());  
1261 - 1482 + }
  1483 +
  1484 + for(Map<String, Object> m : xlList){
1262 String gsBm = m.get("gsBm").toString(); 1485 String gsBm = m.get("gsBm").toString();
1263 int type = Integer.valueOf(m.get("sfyy").toString()); 1486 int type = Integer.valueOf(m.get("sfyy").toString());
1264 int item = Integer.valueOf(m.get("sfjc").toString()) == 1 ? 0 : 1; 1487 int item = Integer.valueOf(m.get("sfjc").toString()) == 1 ? 0 : 1;
@@ -1330,6 +1553,36 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1330,6 +1553,36 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1330 List<Map<String, Object>>dataList = (List<Map<String, Object>>)map.get("dataList"); 1553 List<Map<String, Object>>dataList = (List<Map<String, Object>>)map.get("dataList");
1331 dataList.add(m); 1554 dataList.add(m);
1332 } 1555 }
  1556 +
  1557 + BigDecimal monAll = new BigDecimal("0");
  1558 + BigDecimal preAll = new BigDecimal("0");
  1559 + for(int i = 1; i <= 12; i++){
  1560 + if(m.get("mon"+i).toString().length() > 0){
  1561 + BigDecimal val = new BigDecimal(m.get("mon"+i).toString());
  1562 + monAll = monAll.add(val);
  1563 + val = val.divide(new BigDecimal("1000000"), 3, BigDecimal.ROUND_HALF_UP);
  1564 + m.put("mon"+i, val.doubleValue());
  1565 + }
  1566 + if(m.get("pre"+i).toString().length() > 0){
  1567 + BigDecimal val = new BigDecimal(m.get("pre"+i).toString());
  1568 + preAll = preAll.add(val);
  1569 + val = val.divide(new BigDecimal("1000000"), 3, BigDecimal.ROUND_HALF_UP);
  1570 + m.put("pre"+i, val.doubleValue());
  1571 + if(m.get("mon"+i).toString().length() > 0){
  1572 + BigDecimal monVal = new BigDecimal(m.get("mon"+i).toString());
  1573 + BigDecimal sub = monVal.subtract(val);
  1574 + m.put("sub"+i, sub.doubleValue() > 0 ? "+" + sub.doubleValue() : sub.doubleValue());
  1575 + } else {
  1576 + m.put("sub"+i, "-" + val.doubleValue());
  1577 + }
  1578 + }
  1579 + }
  1580 + BigDecimal monAll_ = monAll.divide(new BigDecimal("1000000"), 3, BigDecimal.ROUND_HALF_UP);
  1581 + preAll = preAll.divide(new BigDecimal("1000000"), 3, BigDecimal.ROUND_HALF_UP);
  1582 + Double subAll = monAll_.subtract(preAll).doubleValue();
  1583 + m.put("monAll", monAll_.doubleValue());
  1584 + m.put("preAll", preAll.doubleValue());
  1585 + m.put("subAll", subAll > 0 ? "+" + subAll : subAll);
1333 1586
1334 if(m.containsKey("num") && m.get("num").toString().length() > 0 1587 if(m.containsKey("num") && m.get("num").toString().length() > 0
1335 && Double.valueOf(m.get("num").toString()) > 0){ 1588 && Double.valueOf(m.get("num").toString()) > 0){
@@ -1340,16 +1593,6 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1340,16 +1593,6 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1340 m.put("average", ""); 1593 m.put("average", "");
1341 } 1594 }
1342 1595
1343 - for(int i = 1; i <= 12; i++){  
1344 - if(m.get("mon"+i).toString().length() > 0){  
1345 - BigDecimal val = new BigDecimal(m.get("mon"+i).toString());  
1346 - val = val.divide(new BigDecimal("1000000"), 3, BigDecimal.ROUND_HALF_UP);  
1347 - m.put("mon"+i, val.doubleValue());  
1348 - }  
1349 - }  
1350 - monAll = monAll.divide(new BigDecimal("1000000"), 3, BigDecimal.ROUND_HALF_UP);  
1351 - m.put("monAll", monAll.doubleValue());  
1352 -  
1353 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0 1596 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0
1354 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){ 1597 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){
1355 BigDecimal formal = new BigDecimal(m.get("formal").toString()); 1598 BigDecimal formal = new BigDecimal(m.get("formal").toString());
@@ -1358,7 +1601,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1358,7 +1601,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1358 new BigDecimal(100)).divide( 1601 new BigDecimal(100)).divide(
1359 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%"); 1602 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%");
1360 BigDecimal diff = monAll.subtract(formal); 1603 BigDecimal diff = monAll.subtract(formal);
1361 - m.put("diff", diff.doubleValue() > 0 ? "+" + diff.toString() : diff.toString()); 1604 + m.put("diff", diff.doubleValue() > 0 ? "+" + diff.doubleValue() : diff.doubleValue());
1362 } else { 1605 } else {
1363 m.put("complete", ""); 1606 m.put("complete", "");
1364 m.put("diff", ""); 1607 m.put("diff", "");
@@ -1417,6 +1660,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1417,6 +1660,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1417 Map<String, Object> m = keyMap.get(key); 1660 Map<String, Object> m = keyMap.get(key);
1418 1661
1419 BigDecimal monAll = new BigDecimal("0"); 1662 BigDecimal monAll = new BigDecimal("0");
  1663 + BigDecimal preAll = new BigDecimal("0");
1420 for(int i = 1; i <= 12; i++){ 1664 for(int i = 1; i <= 12; i++){
1421 if(m.get("mon"+i).toString().length() > 0){ 1665 if(m.get("mon"+i).toString().length() > 0){
1422 BigDecimal val = new BigDecimal(m.get("mon"+i).toString()); 1666 BigDecimal val = new BigDecimal(m.get("mon"+i).toString());
@@ -1424,7 +1668,26 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1424,7 +1668,26 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1424 val = val.divide(new BigDecimal("1000000"), 3, BigDecimal.ROUND_HALF_UP); 1668 val = val.divide(new BigDecimal("1000000"), 3, BigDecimal.ROUND_HALF_UP);
1425 m.put("mon"+i, val.doubleValue()); 1669 m.put("mon"+i, val.doubleValue());
1426 } 1670 }
  1671 + if(m.get("pre"+i).toString().length() > 0){
  1672 + BigDecimal val = new BigDecimal(m.get("pre"+i).toString());
  1673 + preAll = preAll.add(val);
  1674 + val = val.divide(new BigDecimal("1000000"), 3, BigDecimal.ROUND_HALF_UP);
  1675 + m.put("pre"+i, val.doubleValue());
  1676 + if(m.get("mon"+i).toString().length() > 0){
  1677 + BigDecimal monVal = new BigDecimal(m.get("mon"+i).toString());
  1678 + BigDecimal sub = monVal.subtract(val);
  1679 + m.put("sub"+i, sub.doubleValue() > 0 ? "+" + sub.doubleValue() : sub.doubleValue());
  1680 + } else {
  1681 + m.put("sub"+i, "-" + val.doubleValue());
  1682 + }
  1683 + }
1427 } 1684 }
  1685 + BigDecimal monAll_ = monAll.divide(new BigDecimal("1000000"), 3, BigDecimal.ROUND_HALF_UP);
  1686 + preAll = preAll.divide(new BigDecimal("1000000"), 3, BigDecimal.ROUND_HALF_UP);
  1687 + Double subAll = monAll_.subtract(preAll).doubleValue();
  1688 + m.put("monAll", monAll_.doubleValue());
  1689 + m.put("preAll", preAll.doubleValue());
  1690 + m.put("subAll", subAll > 0 ? "+" + subAll : subAll);
1428 1691
1429 if(m.containsKey("num") && m.get("num").toString().length() > 0 1692 if(m.containsKey("num") && m.get("num").toString().length() > 0
1430 && Double.valueOf(m.get("num").toString()) > 0){ 1693 && Double.valueOf(m.get("num").toString()) > 0){
@@ -1435,9 +1698,6 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1435,9 +1698,6 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1435 m.put("average", ""); 1698 m.put("average", "");
1436 } 1699 }
1437 1700
1438 - monAll = monAll.divide(new BigDecimal("1000000"), 3, BigDecimal.ROUND_HALF_UP);  
1439 - m.put("monAll", monAll.doubleValue());  
1440 -  
1441 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0 1701 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0
1442 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){ 1702 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){
1443 BigDecimal formal = new BigDecimal(m.get("formal").toString()); 1703 BigDecimal formal = new BigDecimal(m.get("formal").toString());
@@ -1446,7 +1706,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1446,7 +1706,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1446 new BigDecimal(100)).divide( 1706 new BigDecimal(100)).divide(
1447 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%"); 1707 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%");
1448 BigDecimal diff = monAll.subtract(formal); 1708 BigDecimal diff = monAll.subtract(formal);
1449 - m.put("diff", diff.doubleValue() > 0 ? "+" + diff.toString() : diff.toString()); 1709 + m.put("diff", diff.doubleValue() > 0 ? "+" + diff.doubleValue() : diff.doubleValue());
1450 } else { 1710 } else {
1451 m.put("complete", ""); 1711 m.put("complete", "");
1452 m.put("diff", ""); 1712 m.put("diff", "");
@@ -1517,6 +1777,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1517,6 +1777,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1517 @Override 1777 @Override
1518 public List<Map<String, Object>> budgetSum(String year, String nature, String tttt, String kkk) { 1778 public List<Map<String, Object>> budgetSum(String year, String nature, String tttt, String kkk) {
1519 // TODO Auto-generated method stub 1779 // TODO Auto-generated method stub
  1780 + SimpleDateFormat sdfYY = new SimpleDateFormat("YYYY");
1520 SimpleDateFormat sdfMM = new SimpleDateFormat("MM"); 1781 SimpleDateFormat sdfMM = new SimpleDateFormat("MM");
1521 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); 1782 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
1522 Map<String, Map<String, Object>> keyMap = new HashMap<String, Map<String, Object>>(); 1783 Map<String, Map<String, Object>> keyMap = new HashMap<String, Map<String, Object>>();
@@ -1525,6 +1786,16 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1525,6 +1786,16 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1525 List<Revenue> revenueList = revenueRepository.findByDates(year+"-01-01", year+"-12-31"); 1786 List<Revenue> revenueList = revenueRepository.findByDates(year+"-01-01", year+"-12-31");
1526 Map<String, Boolean> lineNature = lineService.lineNature(); 1787 Map<String, Boolean> lineNature = lineService.lineNature();
1527 1788
  1789 + String year_1 = "";
  1790 + try {
  1791 + year_1 = sdfYY.format(sdfYY.parse((Integer.valueOf(year)-1)+""));
  1792 + } catch (ParseException e) {
  1793 + // TODO Auto-generated catch block
  1794 + e.printStackTrace();
  1795 + }
  1796 + List<CalcStatistics> scheduleList_1 = calcStatisticsRepository.selectByDateAndLineTj3(year_1+"-01-01", year_1+"-12-31");
  1797 + List<Revenue> revenueList_1 = revenueRepository.findByDates(year_1+"-01-01", year_1+"-12-31");
  1798 +
1528 Map<String, Map<String, Object>> xlMap = new HashMap<String, Map<String, Object>>(); 1799 Map<String, Map<String, Object>> xlMap = new HashMap<String, Map<String, Object>>();
1529 List<Map<String, Object>> xlList = new ArrayList<Map<String, Object>>(); 1800 List<Map<String, Object>> xlList = new ArrayList<Map<String, Object>>();
1530 1801
@@ -1564,6 +1835,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1564,6 +1835,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1564 for(int i = 1; i <= 12; i++){ 1835 for(int i = 1; i <= 12; i++){
1565 m.put("mon"+i, ""); 1836 m.put("mon"+i, "");
1566 m.put("bud"+i, ""); 1837 m.put("bud"+i, "");
  1838 + m.put("pre"+i, "");
1567 } 1839 }
1568 String bud = "bud" + Integer.valueOf(b.getYear().split("-")[1]); 1840 String bud = "bud" + Integer.valueOf(b.getYear().split("-")[1]);
1569 if(b.getFormalMileage()!=null){ 1841 if(b.getFormalMileage()!=null){
@@ -1617,6 +1889,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1617,6 +1889,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1617 for(int i = 1; i <= 12; i++){ 1889 for(int i = 1; i <= 12; i++){
1618 m.put("mon"+i, ""); 1890 m.put("mon"+i, "");
1619 m.put("bud"+i, ""); 1891 m.put("bud"+i, "");
  1892 + m.put("pre"+i, "");
1620 } 1893 }
1621 String bud = "bud" + Integer.valueOf(b.getYear().split("-")[1]); 1894 String bud = "bud" + Integer.valueOf(b.getYear().split("-")[1]);
1622 if(b.getFormalPerson()!=null){ 1895 if(b.getFormalPerson()!=null){
@@ -1670,6 +1943,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1670,6 +1943,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1670 for(int i = 1; i <= 12; i++){ 1943 for(int i = 1; i <= 12; i++){
1671 m.put("mon"+i, ""); 1944 m.put("mon"+i, "");
1672 m.put("bud"+i, ""); 1945 m.put("bud"+i, "");
  1946 + m.put("pre"+i, "");
1673 } 1947 }
1674 String bud = "bud" + Integer.valueOf(b.getYear().split("-")[1]); 1948 String bud = "bud" + Integer.valueOf(b.getYear().split("-")[1]);
1675 if(b.getFormalAmounts()!=null){ 1949 if(b.getFormalAmounts()!=null){
@@ -1740,6 +2014,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1740,6 +2014,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1740 for(int i = 1; i <= 12; i++){ 2014 for(int i = 1; i <= 12; i++){
1741 m.put("mon"+i, ""); 2015 m.put("mon"+i, "");
1742 m.put("bud"+i, ""); 2016 m.put("bud"+i, "");
  2017 + m.put("pre"+i, "");
1743 } 2018 }
1744 m.put("monAll", "0"); 2019 m.put("monAll", "0");
1745 xlMap.put(key, m); 2020 xlMap.put(key, m);
@@ -1756,7 +2031,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1756,7 +2031,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1756 } 2031 }
1757 } 2032 }
1758 2033
1759 - for(Revenue cs : revenueList){ 2034 + for(Revenue cs : revenueList){ // 人次与营收
1760 Boolean flag = true; 2035 Boolean flag = true;
1761 if("0".equals(nature)){ 2036 if("0".equals(nature)){
1762 flag = false; 2037 flag = false;
@@ -1787,6 +2062,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1787,6 +2062,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1787 for(int i = 1; i <= 12; i++){ 2062 for(int i = 1; i <= 12; i++){
1788 m.put("mon"+i, ""); 2063 m.put("mon"+i, "");
1789 m.put("bud"+i, ""); 2064 m.put("bud"+i, "");
  2065 + m.put("pre"+i, "");
1790 } 2066 }
1791 m.put("monAll", "0"); 2067 m.put("monAll", "0");
1792 xlMap.put(key2, m); 2068 xlMap.put(key2, m);
@@ -1817,6 +2093,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1817,6 +2093,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1817 for(int i = 1; i <= 12; i++){ 2093 for(int i = 1; i <= 12; i++){
1818 m.put("mon"+i, ""); 2094 m.put("mon"+i, "");
1819 m.put("bud"+i, ""); 2095 m.put("bud"+i, "");
  2096 + m.put("pre"+i, "");
1820 } 2097 }
1821 m.put("monAll", "0"); 2098 m.put("monAll", "0");
1822 xlMap.put(key3, m); 2099 xlMap.put(key3, m);
@@ -1834,15 +2111,134 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1834,15 +2111,134 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1834 } 2111 }
1835 } 2112 }
1836 2113
1837 - for(Map<String, Object> m : xlList){  
1838 - BigDecimal monAll = new BigDecimal("0");  
1839 - for(int i = 1; i <= 12; i++){  
1840 - if(m.get("mon"+i).toString().length() > 0){  
1841 - BigDecimal val = new BigDecimal(m.get("mon"+i).toString());  
1842 - monAll = monAll.add(val); 2114 + for(CalcStatistics cs1 : scheduleList_1){ // 去年公里
  2115 + Boolean flag = true;
  2116 + if("0".equals(nature)){
  2117 + flag = false;
  2118 + } else if("1".equals(nature) && lineNature.containsKey(cs1.getXl()) && lineNature.get(cs1.getXl())){
  2119 + flag = false;
  2120 + } else if("2".equals(nature) && !(lineNature.containsKey(cs1.getXl()) && lineNature.get(cs1.getXl()))){
  2121 + flag = false;
  2122 + }
  2123 + if(flag){
  2124 + continue;
  2125 + }
  2126 + String gsdm = cs1.getGsdm();
  2127 + String xlBm = cs1.getXl();
  2128 + String xlName = cs1.getXlName();
  2129 + String key = gsdm + "_" + xlBm;
  2130 + String key1 = key + "_1";
  2131 + if(!(xlMap.containsKey(key1))){
  2132 + Map<String, Object> m = new HashMap<String, Object>();
  2133 + m.put("gsBm", gsdm);
  2134 + m.put("gsName", BasicData.businessCodeNameMap.get(gsdm));
  2135 + m.put("xlBm", xlBm);
  2136 + m.put("xlName", xlName);
  2137 + m.put("type", "公里");
  2138 + m.put("budget", "");
  2139 + m.put("change", "");
  2140 + m.put("formal", "");
  2141 + for(int i = 1; i <= 12; i++){
  2142 + m.put("mon"+i, "");
  2143 + m.put("bud"+i, "");
  2144 + m.put("pre"+i, "");
1843 } 2145 }
  2146 + m.put("monAll", "0");
  2147 + xlMap.put(key1, m);
  2148 + xlList.add(m);
1844 } 2149 }
1845 - m.put("monAll", monAll.doubleValue()); 2150 + Map<String, Object> map = xlMap.get(key1);
  2151 + String pre = "pre" + Integer.valueOf(sdfMM.format(cs1.getDate()));
  2152 + String val = map.get(pre).toString();
  2153 + BigDecimal num = new BigDecimal(cs1.getSjzlc().toString());
  2154 + if(val.length() == 0){
  2155 + map.put(pre, num.doubleValue());
  2156 + } else {
  2157 + map.put(pre, new BigDecimal(val).add(num).doubleValue());
  2158 + }
  2159 + }
  2160 +
  2161 + for(Revenue cs1 : revenueList_1){ // 去年人次与营收
  2162 + Boolean flag = true;
  2163 + if("0".equals(nature)){
  2164 + flag = false;
  2165 + } else if("1".equals(nature) && cs1.getSfyy()){
  2166 + flag = false;
  2167 + } else if("2".equals(nature) && !(cs1.getSfyy())){
  2168 + flag = false;
  2169 + }
  2170 + if(flag){
  2171 + continue;
  2172 + }
  2173 + String gsBm = cs1.getGsBm();
  2174 + String xlBm = cs1.getXlBm();
  2175 + String xlName = cs1.getXlName();
  2176 +
  2177 + { // 去年人次
  2178 + String key2 = gsBm + "_" + xlBm + "_2";
  2179 + if(!(xlMap.containsKey(key2))){
  2180 + Map<String, Object> m = new HashMap<String, Object>();
  2181 + m.put("gsBm", gsBm);
  2182 + m.put("gsName", BasicData.businessCodeNameMap.get(gsBm));
  2183 + m.put("xlBm", xlBm);
  2184 + m.put("xlName", xlName);
  2185 + m.put("type", "人次");
  2186 + m.put("budget", "");
  2187 + m.put("change", "");
  2188 + m.put("formal", "");
  2189 + for(int i = 1; i <= 12; i++){
  2190 + m.put("mon"+i, "");
  2191 + m.put("bud"+i, "");
  2192 + m.put("pre"+i, "");
  2193 + }
  2194 + m.put("monAll", "0");
  2195 + xlMap.put(key2, m);
  2196 + xlList.add(m);
  2197 + }
  2198 + Map<String, Object> map = xlMap.get(key2);
  2199 + String pre = "pre" + Integer.valueOf(sdfMM.format(cs1.getScheduleDate()));
  2200 + String val = map.get(pre).toString();
  2201 + BigDecimal num = new BigDecimal(cs1.getNum().toString());
  2202 + if(val.length() == 0){
  2203 + map.put(pre, num.doubleValue());
  2204 + } else {
  2205 + map.put(pre, new BigDecimal(val).add(num).doubleValue());
  2206 + }
  2207 + }
  2208 + { // 去年营收
  2209 + String key3 = gsBm + "_" + xlBm + "_3";
  2210 + if(!(xlMap.containsKey(key3))){
  2211 + Map<String, Object> m = new HashMap<String, Object>();
  2212 + m.put("gsBm", gsBm);
  2213 + m.put("gsName", BasicData.businessCodeNameMap.get(gsBm));
  2214 + m.put("xlBm", xlBm);
  2215 + m.put("xlName", xlName);
  2216 + m.put("type", "营收");
  2217 + m.put("budget", "");
  2218 + m.put("change", "");
  2219 + m.put("formal", "");
  2220 + for(int i = 1; i <= 12; i++){
  2221 + m.put("mon"+i, "");
  2222 + m.put("bud"+i, "");
  2223 + m.put("pre"+i, "");
  2224 + }
  2225 + m.put("monAll", "0");
  2226 + xlMap.put(key3, m);
  2227 + xlList.add(m);
  2228 + }
  2229 + Map<String, Object> map = xlMap.get(key3);
  2230 + String pre = "pre" + Integer.valueOf(sdfMM.format(cs1.getScheduleDate()));
  2231 + String val = map.get(pre).toString();
  2232 + BigDecimal num = new BigDecimal(cs1.getAmount().toString());
  2233 + if(val.length() == 0){
  2234 + map.put(pre, num.doubleValue());
  2235 + } else {
  2236 + map.put(pre, new BigDecimal(val).add(num).doubleValue());
  2237 + }
  2238 + }
  2239 + }
  2240 +
  2241 + for(Map<String, Object> m : xlList){
1846 2242
1847 String gsBm = m.get("gsBm").toString(); 2243 String gsBm = m.get("gsBm").toString();
1848 String type = m.get("type").toString(); 2244 String type = m.get("type").toString();
@@ -1886,7 +2282,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1886,7 +2282,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1886 } 2282 }
1887 } 2283 }
1888 for(int i = 1; i <= 12; i++){ 2284 for(int i = 1; i <= 12; i++){
1889 - String mon = "mon"+i, bud = "bud"+i; 2285 + String mon = "mon"+i, bud = "bud"+i, pre = "pre"+i;
1890 if(m.get(mon).toString().length() > 0){ 2286 if(m.get(mon).toString().length() > 0){
1891 if(map.get(mon).toString().length() > 0){ 2287 if(map.get(mon).toString().length() > 0){
1892 map.put(mon, new BigDecimal(m.get(mon).toString()).add( 2288 map.put(mon, new BigDecimal(m.get(mon).toString()).add(
@@ -1903,6 +2299,14 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1903,6 +2299,14 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1903 map.put(bud, new BigDecimal(m.get(bud).toString()).doubleValue()); 2299 map.put(bud, new BigDecimal(m.get(bud).toString()).doubleValue());
1904 } 2300 }
1905 } 2301 }
  2302 + if(m.get(pre).toString().length() > 0){
  2303 + if(map.get(pre).toString().length() > 0){
  2304 + map.put(pre, new BigDecimal(m.get(pre).toString()).add(
  2305 + new BigDecimal(map.get(pre).toString())).doubleValue());
  2306 + } else {
  2307 + map.put(pre, new BigDecimal(m.get(pre).toString()).doubleValue());
  2308 + }
  2309 + }
1906 } 2310 }
1907 List<Map<String, Object>>dataList = (List<Map<String, Object>>)map.get("dataList"); 2311 List<Map<String, Object>>dataList = (List<Map<String, Object>>)map.get("dataList");
1908 dataList.add(m); 2312 dataList.add(m);
@@ -1912,15 +2316,35 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1912,15 +2316,35 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1912 if("营收".equals(m.get("type").toString())){ 2316 if("营收".equals(m.get("type").toString())){
1913 digit = "1000000"; 2317 digit = "1000000";
1914 } 2318 }
  2319 + BigDecimal monAll = new BigDecimal("0");
  2320 + BigDecimal preAll = new BigDecimal("0");
1915 for(int i = 1; i <= 12; i++){ 2321 for(int i = 1; i <= 12; i++){
1916 if(m.get("mon"+i).toString().length() > 0){ 2322 if(m.get("mon"+i).toString().length() > 0){
1917 BigDecimal val = new BigDecimal(m.get("mon"+i).toString()); 2323 BigDecimal val = new BigDecimal(m.get("mon"+i).toString());
  2324 + monAll = monAll.add(val);
1918 val = val.divide(new BigDecimal(digit), 3, BigDecimal.ROUND_HALF_UP); 2325 val = val.divide(new BigDecimal(digit), 3, BigDecimal.ROUND_HALF_UP);
1919 m.put("mon"+i, val.doubleValue()); 2326 m.put("mon"+i, val.doubleValue());
1920 } 2327 }
  2328 + if(m.get("pre"+i).toString().length() > 0){
  2329 + BigDecimal val = new BigDecimal(m.get("pre"+i).toString());
  2330 + preAll = preAll.add(val);
  2331 + val = val.divide(new BigDecimal(digit), 3, BigDecimal.ROUND_HALF_UP);
  2332 + m.put("pre"+i, val.doubleValue());
  2333 + if(m.get("mon"+i).toString().length() > 0){
  2334 + BigDecimal monVal = new BigDecimal(m.get("mon"+i).toString());
  2335 + BigDecimal sub = monVal.subtract(val);
  2336 + m.put("sub"+i, sub.doubleValue() > 0 ? "+" + sub.doubleValue() : sub.doubleValue());
  2337 + } else {
  2338 + m.put("sub"+i, "-" + val.doubleValue());
  2339 + }
  2340 + }
1921 } 2341 }
1922 monAll = monAll.divide(new BigDecimal(digit), 3, BigDecimal.ROUND_HALF_UP); 2342 monAll = monAll.divide(new BigDecimal(digit), 3, BigDecimal.ROUND_HALF_UP);
  2343 + preAll = preAll.divide(new BigDecimal(digit), 3, BigDecimal.ROUND_HALF_UP);
  2344 + Double subAll = monAll.subtract(preAll).doubleValue();
1923 m.put("monAll", monAll.doubleValue()); 2345 m.put("monAll", monAll.doubleValue());
  2346 + m.put("preAll", preAll.doubleValue());
  2347 + m.put("subAll", subAll > 0 ? "+" + subAll : subAll);
1924 2348
1925 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0 2349 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0
1926 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){ 2350 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){
@@ -1930,7 +2354,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1930,7 +2354,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1930 new BigDecimal(100)).divide( 2354 new BigDecimal(100)).divide(
1931 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%"); 2355 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%");
1932 BigDecimal diff = monAll.subtract(formal); 2356 BigDecimal diff = monAll.subtract(formal);
1933 - m.put("diff", diff.doubleValue() > 0 ? "+" + diff.toString() : diff.toString()); 2357 + m.put("diff", diff.doubleValue() > 0 ? "+" + diff.doubleValue() : diff.doubleValue());
1934 } else { 2358 } else {
1935 m.put("complete", ""); 2359 m.put("complete", "");
1936 m.put("diff", ""); 2360 m.put("diff", "");
@@ -1980,6 +2404,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1980,6 +2404,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1980 for(String key : strs){ 2404 for(String key : strs){
1981 Map<String, Object> m = keyMap.get(key); 2405 Map<String, Object> m = keyMap.get(key);
1982 BigDecimal monAll = new BigDecimal("0"); 2406 BigDecimal monAll = new BigDecimal("0");
  2407 + BigDecimal preAll = new BigDecimal("0");
1983 String digit = "10000"; 2408 String digit = "10000";
1984 if("营收".equals(m.get("type").toString())){ 2409 if("营收".equals(m.get("type").toString())){
1985 digit = "1000000"; 2410 digit = "1000000";
@@ -1991,9 +2416,26 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -1991,9 +2416,26 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
1991 val = val.divide(new BigDecimal(digit), 3, BigDecimal.ROUND_HALF_UP); 2416 val = val.divide(new BigDecimal(digit), 3, BigDecimal.ROUND_HALF_UP);
1992 m.put("mon"+i, val.doubleValue()); 2417 m.put("mon"+i, val.doubleValue());
1993 } 2418 }
  2419 + if(m.get("pre"+i).toString().length() > 0){
  2420 + BigDecimal val = new BigDecimal(m.get("pre"+i).toString());
  2421 + preAll = preAll.add(val);
  2422 + val = val.divide(new BigDecimal(digit), 3, BigDecimal.ROUND_HALF_UP);
  2423 + m.put("pre"+i, val.doubleValue());
  2424 + if(m.get("mon"+i).toString().length() > 0){
  2425 + BigDecimal monVal = new BigDecimal(m.get("mon"+i).toString());
  2426 + BigDecimal sub = monVal.subtract(val);
  2427 + m.put("sub"+i, sub.doubleValue() > 0 ? "+" + sub.doubleValue() : sub.doubleValue());
  2428 + } else {
  2429 + m.put("sub"+i, "-" + val.doubleValue());
  2430 + }
  2431 + }
1994 } 2432 }
1995 monAll = monAll.divide(new BigDecimal(digit), 3, BigDecimal.ROUND_HALF_UP); 2433 monAll = monAll.divide(new BigDecimal(digit), 3, BigDecimal.ROUND_HALF_UP);
  2434 + preAll = preAll.divide(new BigDecimal(digit), 3, BigDecimal.ROUND_HALF_UP);
  2435 + Double subAll = monAll.subtract(preAll).doubleValue();
1996 m.put("monAll", monAll.doubleValue()); 2436 m.put("monAll", monAll.doubleValue());
  2437 + m.put("preAll", preAll.doubleValue());
  2438 + m.put("subAll", subAll > 0 ? "+" + subAll : subAll);
1997 2439
1998 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0 2440 if(m.get("formal").toString().length() > 0 && m.get("monAll").toString().length() > 0
1999 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){ 2441 && new BigDecimal(m.get("formal").toString()).doubleValue() > 0d){
@@ -2003,7 +2445,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -2003,7 +2445,7 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
2003 new BigDecimal(100)).divide( 2445 new BigDecimal(100)).divide(
2004 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%"); 2446 new BigDecimal(1), 2, BigDecimal.ROUND_HALF_UP)+ "%");
2005 BigDecimal diff = monAll.subtract(formal); 2447 BigDecimal diff = monAll.subtract(formal);
2006 - m.put("diff", diff.doubleValue() > 0 ? "+" + diff.toString() : diff.toString()); 2448 + m.put("diff", diff.doubleValue() > 0 ? "+" + diff.doubleValue() : diff.doubleValue());
2007 } else { 2449 } else {
2008 m.put("complete", ""); 2450 m.put("complete", "");
2009 m.put("diff", ""); 2451 m.put("diff", "");
@@ -2434,6 +2876,271 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -2434,6 +2876,271 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
2434 2876
2435 return resList; 2877 return resList;
2436 } 2878 }
  2879 +
  2880 + @Override
  2881 + public Map<String, Object> timeAnaly(String company, String subCompany, String date,
  2882 + String line, String model, String tttt, String kkkk) throws Exception {
  2883 + // TODO Auto-generated method stub
  2884 +
  2885 + int
  2886 + zgf1 = 6 * 60 + 31,
  2887 + zgf2 = 8 * 60 + 30,
  2888 + wgf1 = 16 * 60 + 1,
  2889 + wgf2 = 18 * 60,
  2890 + xxsj = 90;
  2891 +
  2892 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  2893 + Map<String, Object> resMap = new HashMap<String, Object>();
  2894 + Map<String, Map<String, Object>> keyMap = new HashMap<String, Map<String, Object>>();
  2895 + Map<String, List<SchedulePlanInfo>> keyList = new HashMap<String, List<SchedulePlanInfo>>();
  2896 + List<SchedulePlanInfo> planList = new ArrayList<SchedulePlanInfo>();
  2897 + List<Map<String, Object>> list = new ArrayList<Map<String, Object>>();
  2898 +
  2899 + if(model.trim().length() > 0){
  2900 + planList = schedulePlanRepository.findPlanByTTinfo(line, date, model);
  2901 + } else {
  2902 + planList = schedulePlanRepository.findPlanByXlAndDate(line, date);
  2903 + }
  2904 +
  2905 + for(SchedulePlanInfo plan : planList){
  2906 + String gsBm = plan.getGsBm();
  2907 + String fgsBm = plan.getFgsBm();
  2908 + String xl = plan.getXl().toString();
  2909 + String lp = plan.getLp().toString();
  2910 + String ttInfo = plan.getTtInfo().toString();
  2911 + String key = gsBm + "/" + fgsBm + "/" + xl + "/" + lp + "/" + ttInfo;
  2912 + if(!keyMap.containsKey(key)){
  2913 + Map<String, Object> m = new HashMap<String, Object>();
  2914 + m.put("gsBm", gsBm);
  2915 + m.put("fgsBm", fgsBm);
  2916 + m.put("gsName", BasicData.businessCodeNameMap.get(gsBm));
  2917 + m.put("fgsName", BasicData.businessFgsCodeNameMap.get(fgsBm + "_" + gsBm));
  2918 + m.put("xl", xl);
  2919 + m.put("xlName", plan.getXlName());
  2920 + m.put("lp", lp);
  2921 + m.put("lpName", plan.getLpName());
  2922 + m.put("outStation", "");
  2923 + m.put("qdzName0", "");
  2924 + m.put("zdzName0", "");
  2925 + m.put("qdzName1", "");
  2926 + m.put("zdzName1", "");
  2927 + m.put("inStation", "");
  2928 + keyMap.put(key, m);
  2929 + keyList.put(key, new ArrayList<SchedulePlanInfo>());
  2930 + list.add(m);
  2931 + }
  2932 + keyList.get(key).add(plan);
  2933 + }
  2934 +
  2935 + Set<String> ecSet = new HashSet<String>(); // 人事配档数
  2936 + Set<String> carSet = new HashSet<String>(); // 配车数
  2937 + for(String key : keyList.keySet()){
  2938 + String[] keys = key.split("/");
  2939 + Long ttInfo = Long.valueOf(keys[4]);
  2940 + int xl = Integer.valueOf(keys[2]);
  2941 + Long lp = Long.valueOf(keys[3]);
  2942 + Map<String, Object> m = keyMap.get(key);
  2943 + int p_fcsj = 0, p_dzsj = 0;
  2944 + int yssj_bc = 0, yssj_all = 0, yssj_z = 0, yssj_w = 0, yssj_d = 0;
  2945 + int tzsj_bc = 0, tzsj_all = 0, tzsj_z = 0, tzsj_w = 0, tzsj_d = 0;
  2946 + int ksbc = 0, yybc = 0, zgs = 15; // 总工时:加上报到例保时间15分钟、复驶路牌10分钟
  2947 + BigDecimal kslc = new BigDecimal(0), yylc = new BigDecimal(0);
  2948 + for(SchedulePlanInfo plan : keyList.get(key)){
  2949 + String[] split = plan.getFcsj().split(":");
  2950 + int fcsj = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
  2951 + int bcsj = plan.getBcsj();
  2952 + if(fcsj < p_fcsj){
  2953 + fcsj += 24*60;
  2954 + }
  2955 + int dzsj = fcsj + bcsj;
  2956 +
  2957 + String jGh = plan.getjGh() != null ? plan.getjGh().trim() : "";
  2958 + String sGh = plan.getsGh() != null ? plan.getsGh().trim() : "";
  2959 + String zbh = plan.getClZbh() != null ? plan.getClZbh().trim() : "";
  2960 + ecSet.add(jGh + "/" + sGh);
  2961 + carSet.add(zbh);
  2962 +
  2963 + if(m.get("outStation").toString().length() == 0 && "out".equals(plan.getBcType())){
  2964 + m.put("outStation", plan.getQdzName()!=null?plan.getQdzName():"");
  2965 + }
  2966 + if(m.get("qdzName0").toString().length() == 0 && "0".equals(plan.getXlDir())
  2967 + && "normal".equals(plan.getBcType())){
  2968 + m.put("qdzName0", plan.getQdzName()!=null?plan.getQdzName():"");
  2969 + m.put("zdzName0", plan.getZdzName()!=null?plan.getZdzName():"");
  2970 + }
  2971 + if(m.get("qdzName1").toString().length() == 0 && "1".equals(plan.getXlDir())
  2972 + && "normal".equals(plan.getBcType())){
  2973 + m.put("qdzName1", plan.getQdzName()!=null?plan.getQdzName():"");
  2974 + m.put("zdzName1", plan.getZdzName()!=null?plan.getZdzName():"");
  2975 + }
  2976 + if(m.get("inStation").toString().length() == 0 && "in".equals(plan.getBcType())){
  2977 + m.put("inStation", plan.getZdzName()!=null?plan.getZdzName():"");
  2978 + }
  2979 +
  2980 + if(p_dzsj > 0 && fcsj - p_dzsj < xxsj){
  2981 + zgs += dzsj - p_dzsj;
  2982 + } else {
  2983 + zgs += bcsj;
  2984 + }
  2985 +
  2986 + if("in/out/ldks".contains(plan.getBcType())){
  2987 + ksbc += 1;
  2988 + kslc = kslc.add(BigDecimal.valueOf(plan.getJhlc()));
  2989 + } else {
  2990 + yybc += 1;
  2991 + yylc = yylc.add(BigDecimal.valueOf(plan.getJhlc()));
  2992 + }
  2993 +
  2994 + if(!("in/out/ldks".contains(plan.getBcType()))){
  2995 + yssj_bc += 1;
  2996 + yssj_all += bcsj;
  2997 + if(fcsj <= zgf2 && dzsj >= zgf1){
  2998 + int a = fcsj >= zgf1 ? fcsj : zgf1;
  2999 + int b = dzsj >= zgf2 ? zgf2 : dzsj;
  3000 + yssj_z += b - a;
  3001 + }
  3002 + if(fcsj <= wgf2 && dzsj >= wgf1){
  3003 + int a = fcsj >= wgf1 ? fcsj : wgf1;
  3004 + int b = dzsj >= wgf2 ? wgf2 : dzsj;
  3005 + yssj_w += b - a;
  3006 + }
  3007 + yssj_d += bcsj; // 低谷运送时间,下面减去高峰时段的时间就是低谷时间
  3008 + if(fcsj >= zgf1 && fcsj <= zgf2){
  3009 + if(dzsj < zgf2){
  3010 + yssj_d -= dzsj - fcsj;
  3011 + } else {
  3012 + yssj_d -= zgf2 - fcsj;
  3013 + }
  3014 + } else if(dzsj >= zgf1 && dzsj <= zgf2){
  3015 + yssj_d -= dzsj - zgf1;
  3016 + } else if(fcsj < zgf1 && dzsj > zgf2){
  3017 + yssj_d -= zgf2 - zgf1;
  3018 + }
  3019 + if(fcsj >= wgf1 && fcsj <= wgf2){
  3020 + if(dzsj < wgf2){
  3021 + yssj_d -= dzsj - fcsj;
  3022 + } else {
  3023 + yssj_d -= wgf2 - fcsj;
  3024 + }
  3025 + } else if(dzsj >= wgf1 && dzsj <= wgf2){
  3026 + yssj_d -= dzsj - wgf1;
  3027 + } else if(fcsj < wgf1 && dzsj > wgf2){
  3028 + yssj_d -= wgf2 - wgf1;
  3029 + }
  3030 + }
  3031 +
  3032 + if(!("in/out".contains(plan.getBcType()))){
  3033 + int tzsj = fcsj - p_dzsj; // 停站时间,1、前个计划运送后到这个计划发车前;2、超过2小时或者下个班次为进出场时为空。
  3034 + if(tzsj < 0){
  3035 + tzsj = 0;
  3036 + }
  3037 + if(tzsj < xxsj){
  3038 + tzsj_bc += 1;
  3039 + tzsj_all += tzsj;
  3040 + }
  3041 + if(tzsj > 0 && tzsj < xxsj){
  3042 + if(p_dzsj <= zgf2 && fcsj >= zgf1){
  3043 + int a = p_dzsj >= zgf1 ? p_dzsj : zgf1;
  3044 + int b = fcsj >= zgf2 ? zgf2 : fcsj;
  3045 + tzsj_z += b - a;
  3046 + }
  3047 + if(p_dzsj <= wgf2 && fcsj >= wgf1){
  3048 + int a = p_dzsj >= wgf1 ? p_dzsj : wgf1;
  3049 + int b = fcsj >= wgf2 ? wgf2 : fcsj;
  3050 + tzsj_w += b - a;
  3051 + }
  3052 + tzsj_d += tzsj; // 低谷停站时间,下面减去高峰时段的时间就是低谷时间
  3053 + if(p_dzsj >= zgf1 && p_dzsj <= zgf2){
  3054 + if(fcsj < zgf2){
  3055 + tzsj_d -= fcsj - p_dzsj;
  3056 + } else {
  3057 + tzsj_d -= zgf2 - p_dzsj;
  3058 + }
  3059 + } else if(fcsj >= zgf1 && fcsj <= zgf2){
  3060 + tzsj_d -= fcsj - zgf1;
  3061 + } else if(p_dzsj < zgf1 && fcsj > zgf2){
  3062 + tzsj_d -= zgf2 - zgf1;
  3063 + }
  3064 + if(p_dzsj >= wgf1 && p_dzsj <= wgf2){
  3065 + if(fcsj < wgf2){
  3066 + tzsj_d -= fcsj - p_dzsj;
  3067 + } else {
  3068 + tzsj_d -= wgf2 - p_dzsj;
  3069 + }
  3070 + } else if(fcsj >= wgf1 && fcsj <= wgf2){
  3071 + tzsj_d -= fcsj - wgf1;
  3072 + } else if(p_dzsj < wgf1 && fcsj > wgf2){
  3073 + tzsj_d -= wgf2 - wgf1;
  3074 + }
  3075 + }
  3076 + }
  3077 +
  3078 + p_fcsj = fcsj;
  3079 + p_dzsj = dzsj;
  3080 + }
  3081 +
  3082 + m.put("yssj_z", yssj_z);
  3083 + m.put("yssj_w", yssj_w);
  3084 + m.put("yssj_d", yssj_d);
  3085 + m.put("yssj_average", yssj_bc > 0 ? new BigDecimal(yssj_all).divide(
  3086 + new BigDecimal(yssj_bc), 2, BigDecimal.ROUND_HALF_UP) : "");
  3087 + m.put("tzsj_z", tzsj_z);
  3088 + m.put("tzsj_w", tzsj_w);
  3089 + m.put("tzsj_d", tzsj_d);
  3090 + m.put("tzsj_average", tzsj_bc > 0 ? new BigDecimal(tzsj_all).divide(
  3091 + new BigDecimal(tzsj_bc), 2, BigDecimal.ROUND_HALF_UP) : "");
  3092 + m.put("ksbc", ksbc);
  3093 + m.put("kslc", kslc);
  3094 + m.put("ks", ksbc + "/" + kslc);
  3095 + m.put("yybc", yybc);
  3096 + m.put("yylc", yylc);
  3097 + m.put("yy", yybc + "/" + yylc);
  3098 + m.put("yygs", yssj_all/60 + "." + yssj_all%60);
  3099 + m.put("zgs", zgs/60 + "." + zgs%60);
  3100 +
  3101 + String bx = "";
  3102 + List<TTInfoBxDetail> findBxDetail = ttInfoBxDetailRepository.findBxDetail(ttInfo, xl, lp);
  3103 + if(findBxDetail.size() > 0){
  3104 + for(TTInfoBxDetail b : findBxDetail){
  3105 + if(b.getBxType1() != null && b.getBxType1().getDicDesc() != null){
  3106 + bx += bx.length() > 0 ? "/" + b.getBxType1().getDicDesc() : b.getBxType1().getDicDesc();
  3107 + }
  3108 + if(b.getBxType2() != null && b.getBxType2().getDicDesc() != null){
  3109 + bx += bx.length() > 0 ? "/" + b.getBxType2().getDicDesc() : b.getBxType2().getDicDesc();
  3110 + }
  3111 + }
  3112 + }
  3113 + m.put("bx", bx);
  3114 + }
  3115 +
  3116 + resMap.put("ecNum", ecSet.size());
  3117 + resMap.put("carNum", carSet.size());
  3118 + resMap.put("dataList", list);
  3119 +
  3120 + if(tttt.equals("export")){
  3121 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  3122 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  3123 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  3124 + Map<String, Object> m = new HashMap<String, Object>();
  3125 + m.put("date", date);
  3126 + m.put("ecNum", ecSet.size());
  3127 + m.put("carNum", carSet.size());
  3128 + m.put("lineName", BasicData.lineCodeAllNameMap.get(line));
  3129 + ReportUtils ee = new ReportUtils();
  3130 + try {
  3131 + listI.add(list.iterator());
  3132 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  3133 + ee.excelReplace(listI, new Object[]{m}, path + "mould/timeAnaly.xls",
  3134 + path + "export/" + date + "-" + BasicData.lineCodeAllNameMap.get(line) + "-线路时刻表分析明细.xls");
  3135 + } catch (Exception e) {
  3136 + // TODO: handle exception
  3137 + e.printStackTrace();
  3138 + logger.info("", e);
  3139 + }
  3140 + }
  3141 +
  3142 + return resMap;
  3143 + }
2437 3144
2438 public String[] createBudgetMap(List<Map<String, Object>> list, Map<String, Map<String, Object>> keyMap){ 3145 public String[] createBudgetMap(List<Map<String, Object>> list, Map<String, Map<String, Object>> keyMap){
2439 3146
@@ -2479,8 +3186,11 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -2479,8 +3186,11 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
2479 for(int i = 1; i <= 12; i++){ 3186 for(int i = 1; i <= 12; i++){
2480 m1.put("mon"+i, num); 3187 m1.put("mon"+i, num);
2481 m1.put("bud"+i, num); 3188 m1.put("bud"+i, num);
  3189 + m1.put("pre"+i, num);
  3190 + m1.put("sub"+i, "");
2482 } 3191 }
2483 m1.put("monAll", "0"); 3192 m1.put("monAll", "0");
  3193 + m1.put("subAll", "0");
2484 m1.put("key", s); 3194 m1.put("key", s);
2485 m1.put("dataList", new ArrayList<Map<String, Object>>()); 3195 m1.put("dataList", new ArrayList<Map<String, Object>>());
2486 list.add(m1); 3196 list.add(m1);
@@ -2524,8 +3234,11 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen @@ -2524,8 +3234,11 @@ public class BudgetServiceImpl extends BaseServiceImpl&lt;Budget, Integer&gt; implemen
2524 for(int i = 1; i <= 12; i++){ 3234 for(int i = 1; i <= 12; i++){
2525 m1.put("mon"+i, num); 3235 m1.put("mon"+i, num);
2526 m1.put("bud"+i, num); 3236 m1.put("bud"+i, num);
  3237 + m1.put("pre"+i, num);
  3238 + m1.put("sub"+i, "");
2527 } 3239 }
2528 m1.put("monAll", "0"); 3240 m1.put("monAll", "0");
  3241 + m1.put("subAll", "0");
2529 m1.put("key", s); 3242 m1.put("key", s);
2530 m1.put("dataList", new ArrayList<Map<String, Object>>()); 3243 m1.put("dataList", new ArrayList<Map<String, Object>>());
2531 list.add(m1); 3244 list.add(m1);
@@ -2564,11 +3277,8 @@ public String[] createBudgetMap_sum2(List&lt;Map&lt;String, Object&gt;&gt; list, Map&lt;String, @@ -2564,11 +3277,8 @@ public String[] createBudgetMap_sum2(List&lt;Map&lt;String, Object&gt;&gt; list, Map&lt;String,
2564 } else if("0".equals(sp[1])){ 3277 } else if("0".equals(sp[1])){
2565 type = "小计"; 3278 type = "小计";
2566 } 3279 }
2567 - m1.put("gsName", gs);m1.put("type", type);  
2568 - for(int i = 1; i <= 12; i++){  
2569 - m1.put("mon"+i, num);  
2570 - m1.put("bud"+i, num);  
2571 - } 3280 + m1.put("gsName", gs);
  3281 + m1.put("type", type);
2572 m1.put("key", s); 3282 m1.put("key", s);
2573 m1.put("dataList", new ArrayList<Map<String, Object>>()); 3283 m1.put("dataList", new ArrayList<Map<String, Object>>());
2574 list.add(m1); 3284 list.add(m1);
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
@@ -1221,20 +1221,27 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { @@ -1221,20 +1221,27 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1221 isCancel = map.get("isCancel").toString().trim(); 1221 isCancel = map.get("isCancel").toString().trim();
1222 } 1222 }
1223 try { 1223 try {
  1224 + ArrayList<String> objList = new ArrayList<String>();
1224 String sql = "select tt.id, tt.name from bsth_c_s_ttinfo tt left join" + 1225 String sql = "select tt.id, tt.name from bsth_c_s_ttinfo tt left join" +
1225 " (select tt_info from bsth_c_s_sp_info where 1=1"; 1226 " (select tt_info from bsth_c_s_sp_info where 1=1";
1226 - if(startDate.trim().length() > 0)  
1227 - sql += " and schedule_date >= '"+startDate+"'";  
1228 - if(endDate.trim().length() > 0)  
1229 - sql += " and schedule_date <= '"+endDate+"'"; 1227 + if(startDate.trim().length() > 0){
  1228 + sql += " and schedule_date >= ?";
  1229 + objList.add(startDate);
  1230 + }
  1231 + if(endDate.trim().length() > 0){
  1232 + sql += " and schedule_date <= ?";
  1233 + objList.add(endDate);
  1234 + }
1230 if(line.trim().length() != 0){ 1235 if(line.trim().length() != 0){
1231 - sql += " and xl_bm = '"+line+"'"; 1236 + sql += " and xl_bm = ?";
  1237 + objList.add(line);
1232 } else { 1238 } else {
1233 return resList; 1239 return resList;
1234 } 1240 }
1235 sql += " ) sp on sp.tt_info = tt.id where sp.tt_info is not null group by tt.id, tt.name"; 1241 sql += " ) sp on sp.tt_info = tt.id where sp.tt_info is not null group by tt.id, tt.name";
1236 1242
1237 resList = jdbcTemplate.query(sql, 1243 resList = jdbcTemplate.query(sql,
  1244 + objList.toArray(),
1238 new RowMapper<Map<String, Object>>(){ 1245 new RowMapper<Map<String, Object>>(){
1239 @Override 1246 @Override
1240 public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { 1247 public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
src/main/resources/static/pages/forms/budget/budgetAmounts.html
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 <table class="table table-bordered table-hover table-checkable" id="forms"> 53 <table class="table table-bordered table-hover table-checkable" id="forms">
54 <thead style="text-align: center;"> 54 <thead style="text-align: center;">
55 <tr> 55 <tr>
56 - <th colspan="55"><label id="datetodate"></label> 预算营收明细表</th> 56 + <th colspan="59"><label id="datetodate"></label> 预算营收明细表</th>
57 </tr> 57 </tr>
58 <tr> 58 <tr>
59 <td style="min-width: 73px" rowspan="2">公司</td> 59 <td style="min-width: 73px" rowspan="2">公司</td>
@@ -62,60 +62,73 @@ @@ -62,60 +62,73 @@
62 <td style="min-width: 90px" rowspan="2">预算</td> 62 <td style="min-width: 90px" rowspan="2">预算</td>
63 <td style="min-width: 90px" rowspan="2">预算调整</td> 63 <td style="min-width: 90px" rowspan="2">预算调整</td>
64 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td> 64 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td>
65 - <td style="min-width: 90px" colspan="3">1月</td>  
66 - <td style="min-width: 90px" colspan="3">2月</td>  
67 - <td style="min-width: 90px" colspan="3">3月</td>  
68 - <td style="min-width: 90px" colspan="3">4月</td>  
69 - <td style="min-width: 90px" colspan="3">5月</td>  
70 - <td style="min-width: 90px" colspan="3">6月</td>  
71 - <td style="min-width: 90px" colspan="3">7月</td>  
72 - <td style="min-width: 90px" colspan="3">8月</td>  
73 - <td style="min-width: 90px" colspan="3">9月</td>  
74 - <td style="min-width: 90px" colspan="3">10月</td>  
75 - <td style="min-width: 90px" colspan="3">11月</td>  
76 - <td style="min-width: 90px" colspan="3">12月</td> 65 + <td style="min-width: 90px" colspan="4">1月</td>
  66 + <td style="min-width: 90px" colspan="4">2月</td>
  67 + <td style="min-width: 90px" colspan="4">3月</td>
  68 + <td style="min-width: 90px" colspan="4">4月</td>
  69 + <td style="min-width: 90px" colspan="4">5月</td>
  70 + <td style="min-width: 90px" colspan="4">6月</td>
  71 + <td style="min-width: 90px" colspan="4">7月</td>
  72 + <td style="min-width: 90px" colspan="4">8月</td>
  73 + <td style="min-width: 90px" colspan="4">9月</td>
  74 + <td style="min-width: 90px" colspan="4">10月</td>
  75 + <td style="min-width: 90px" colspan="4">11月</td>
  76 + <td style="min-width: 90px" colspan="4">12月</td>
77 <td style="min-width: 90px" rowspan="2">合计</td> 77 <td style="min-width: 90px" rowspan="2">合计</td>
78 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td> 78 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td>
79 <td style="min-width: 90px" rowspan="2">预算差异</td> 79 <td style="min-width: 90px" rowspan="2">预算差异</td>
80 <td style="min-width: 80px" rowspan="2">平均票价</br>(元)</td> 80 <td style="min-width: 80px" rowspan="2">平均票价</br>(元)</td>
  81 + <td style="min-width: 90px" rowspan="2">相比去年差异</td>
81 </tr> 82 </tr>
82 <tr> 83 <tr>
83 <td style="min-width: 80px">实际</td> 84 <td style="min-width: 80px">实际</td>
84 <td style="min-width: 80px">预算</td> 85 <td style="min-width: 80px">预算</td>
85 <td style="min-width: 80px">完成率</td> 86 <td style="min-width: 80px">完成率</td>
  87 + <td style="min-width: 80px">相比去年差异</td>
86 <td style="min-width: 80px">实际</td> 88 <td style="min-width: 80px">实际</td>
87 <td style="min-width: 80px">预算</td> 89 <td style="min-width: 80px">预算</td>
88 <td style="min-width: 80px">完成率</td> 90 <td style="min-width: 80px">完成率</td>
  91 + <td style="min-width: 80px">相比去年差异</td>
89 <td style="min-width: 80px">实际</td> 92 <td style="min-width: 80px">实际</td>
90 <td style="min-width: 80px">预算</td> 93 <td style="min-width: 80px">预算</td>
91 <td style="min-width: 80px">完成率</td> 94 <td style="min-width: 80px">完成率</td>
  95 + <td style="min-width: 80px">相比去年差异</td>
92 <td style="min-width: 80px">实际</td> 96 <td style="min-width: 80px">实际</td>
93 <td style="min-width: 80px">预算</td> 97 <td style="min-width: 80px">预算</td>
94 <td style="min-width: 80px">完成率</td> 98 <td style="min-width: 80px">完成率</td>
  99 + <td style="min-width: 80px">相比去年差异</td>
95 <td style="min-width: 80px">实际</td> 100 <td style="min-width: 80px">实际</td>
96 <td style="min-width: 80px">预算</td> 101 <td style="min-width: 80px">预算</td>
97 <td style="min-width: 80px">完成率</td> 102 <td style="min-width: 80px">完成率</td>
  103 + <td style="min-width: 80px">相比去年差异</td>
98 <td style="min-width: 80px">实际</td> 104 <td style="min-width: 80px">实际</td>
99 <td style="min-width: 80px">预算</td> 105 <td style="min-width: 80px">预算</td>
100 <td style="min-width: 80px">完成率</td> 106 <td style="min-width: 80px">完成率</td>
  107 + <td style="min-width: 80px">相比去年差异</td>
101 <td style="min-width: 80px">实际</td> 108 <td style="min-width: 80px">实际</td>
102 <td style="min-width: 80px">预算</td> 109 <td style="min-width: 80px">预算</td>
103 <td style="min-width: 80px">完成率</td> 110 <td style="min-width: 80px">完成率</td>
  111 + <td style="min-width: 80px">相比去年差异</td>
104 <td style="min-width: 80px">实际</td> 112 <td style="min-width: 80px">实际</td>
105 <td style="min-width: 80px">预算</td> 113 <td style="min-width: 80px">预算</td>
106 <td style="min-width: 80px">完成率</td> 114 <td style="min-width: 80px">完成率</td>
  115 + <td style="min-width: 80px">相比去年差异</td>
107 <td style="min-width: 80px">实际</td> 116 <td style="min-width: 80px">实际</td>
108 <td style="min-width: 80px">预算</td> 117 <td style="min-width: 80px">预算</td>
109 <td style="min-width: 80px">完成率</td> 118 <td style="min-width: 80px">完成率</td>
  119 + <td style="min-width: 80px">相比去年差异</td>
110 <td style="min-width: 80px">实际</td> 120 <td style="min-width: 80px">实际</td>
111 <td style="min-width: 80px">预算</td> 121 <td style="min-width: 80px">预算</td>
112 <td style="min-width: 80px">完成率</td> 122 <td style="min-width: 80px">完成率</td>
  123 + <td style="min-width: 80px">相比去年差异</td>
113 <td style="min-width: 80px">实际</td> 124 <td style="min-width: 80px">实际</td>
114 <td style="min-width: 80px">预算</td> 125 <td style="min-width: 80px">预算</td>
115 <td style="min-width: 80px">完成率</td> 126 <td style="min-width: 80px">完成率</td>
  127 + <td style="min-width: 80px">相比去年差异</td>
116 <td style="min-width: 80px">实际</td> 128 <td style="min-width: 80px">实际</td>
117 <td style="min-width: 80px">预算</td> 129 <td style="min-width: 80px">预算</td>
118 <td style="min-width: 80px">完成率</td> 130 <td style="min-width: 80px">完成率</td>
  131 + <td style="min-width: 80px">相比去年差异</td>
119 </tr> 132 </tr>
120 </thead> 133 </thead>
121 <tbody class="budget_amounts"> 134 <tbody class="budget_amounts">
@@ -145,60 +158,73 @@ @@ -145,60 +158,73 @@
145 <td style="min-width: 90px" rowspan="2">预算</td> 158 <td style="min-width: 90px" rowspan="2">预算</td>
146 <td style="min-width: 90px" rowspan="2">预算调整</td> 159 <td style="min-width: 90px" rowspan="2">预算调整</td>
147 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td> 160 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td>
148 - <td style="min-width: 90px" colspan="3">1月</td>  
149 - <td style="min-width: 90px" colspan="3">2月</td>  
150 - <td style="min-width: 90px" colspan="3">3月</td>  
151 - <td style="min-width: 90px" colspan="3">4月</td>  
152 - <td style="min-width: 90px" colspan="3">5月</td>  
153 - <td style="min-width: 90px" colspan="3">6月</td>  
154 - <td style="min-width: 90px" colspan="3">7月</td>  
155 - <td style="min-width: 90px" colspan="3">8月</td>  
156 - <td style="min-width: 90px" colspan="3">9月</td>  
157 - <td style="min-width: 90px" colspan="3">10月</td>  
158 - <td style="min-width: 90px" colspan="3">11月</td>  
159 - <td style="min-width: 90px" colspan="3">12月</td> 161 + <td style="min-width: 90px" colspan="4">1月</td>
  162 + <td style="min-width: 90px" colspan="4">2月</td>
  163 + <td style="min-width: 90px" colspan="4">3月</td>
  164 + <td style="min-width: 90px" colspan="4">4月</td>
  165 + <td style="min-width: 90px" colspan="4">5月</td>
  166 + <td style="min-width: 90px" colspan="4">6月</td>
  167 + <td style="min-width: 90px" colspan="4">7月</td>
  168 + <td style="min-width: 90px" colspan="4">8月</td>
  169 + <td style="min-width: 90px" colspan="4">9月</td>
  170 + <td style="min-width: 90px" colspan="4">10月</td>
  171 + <td style="min-width: 90px" colspan="4">11月</td>
  172 + <td style="min-width: 90px" colspan="4">12月</td>
160 <td style="min-width: 90px" rowspan="2">合计</td> 173 <td style="min-width: 90px" rowspan="2">合计</td>
161 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td> 174 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td>
162 <td style="min-width: 90px" rowspan="2">预算差异</td> 175 <td style="min-width: 90px" rowspan="2">预算差异</td>
163 <td style="min-width: 80px" rowspan="2">平均票价</br>(元)</td> 176 <td style="min-width: 80px" rowspan="2">平均票价</br>(元)</td>
  177 + <td style="min-width: 90px" rowspan="2">相比去年差异</td>
164 </tr> 178 </tr>
165 <tr> 179 <tr>
166 <td style="min-width: 80px">实际</td> 180 <td style="min-width: 80px">实际</td>
167 <td style="min-width: 80px">预算</td> 181 <td style="min-width: 80px">预算</td>
168 <td style="min-width: 80px">完成率</td> 182 <td style="min-width: 80px">完成率</td>
  183 + <td style="min-width: 80px">相比去年差异</td>
169 <td style="min-width: 80px">实际</td> 184 <td style="min-width: 80px">实际</td>
170 <td style="min-width: 80px">预算</td> 185 <td style="min-width: 80px">预算</td>
171 <td style="min-width: 80px">完成率</td> 186 <td style="min-width: 80px">完成率</td>
  187 + <td style="min-width: 80px">相比去年差异</td>
172 <td style="min-width: 80px">实际</td> 188 <td style="min-width: 80px">实际</td>
173 <td style="min-width: 80px">预算</td> 189 <td style="min-width: 80px">预算</td>
174 <td style="min-width: 80px">完成率</td> 190 <td style="min-width: 80px">完成率</td>
  191 + <td style="min-width: 80px">相比去年差异</td>
175 <td style="min-width: 80px">实际</td> 192 <td style="min-width: 80px">实际</td>
176 <td style="min-width: 80px">预算</td> 193 <td style="min-width: 80px">预算</td>
177 <td style="min-width: 80px">完成率</td> 194 <td style="min-width: 80px">完成率</td>
  195 + <td style="min-width: 80px">相比去年差异</td>
178 <td style="min-width: 80px">实际</td> 196 <td style="min-width: 80px">实际</td>
179 <td style="min-width: 80px">预算</td> 197 <td style="min-width: 80px">预算</td>
180 <td style="min-width: 80px">完成率</td> 198 <td style="min-width: 80px">完成率</td>
  199 + <td style="min-width: 80px">相比去年差异</td>
181 <td style="min-width: 80px">实际</td> 200 <td style="min-width: 80px">实际</td>
182 <td style="min-width: 80px">预算</td> 201 <td style="min-width: 80px">预算</td>
183 <td style="min-width: 80px">完成率</td> 202 <td style="min-width: 80px">完成率</td>
  203 + <td style="min-width: 80px">相比去年差异</td>
184 <td style="min-width: 80px">实际</td> 204 <td style="min-width: 80px">实际</td>
185 <td style="min-width: 80px">预算</td> 205 <td style="min-width: 80px">预算</td>
186 <td style="min-width: 80px">完成率</td> 206 <td style="min-width: 80px">完成率</td>
  207 + <td style="min-width: 80px">相比去年差异</td>
187 <td style="min-width: 80px">实际</td> 208 <td style="min-width: 80px">实际</td>
188 <td style="min-width: 80px">预算</td> 209 <td style="min-width: 80px">预算</td>
189 <td style="min-width: 80px">完成率</td> 210 <td style="min-width: 80px">完成率</td>
  211 + <td style="min-width: 80px">相比去年差异</td>
190 <td style="min-width: 80px">实际</td> 212 <td style="min-width: 80px">实际</td>
191 <td style="min-width: 80px">预算</td> 213 <td style="min-width: 80px">预算</td>
192 <td style="min-width: 80px">完成率</td> 214 <td style="min-width: 80px">完成率</td>
  215 + <td style="min-width: 80px">相比去年差异</td>
193 <td style="min-width: 80px">实际</td> 216 <td style="min-width: 80px">实际</td>
194 <td style="min-width: 80px">预算</td> 217 <td style="min-width: 80px">预算</td>
195 <td style="min-width: 80px">完成率</td> 218 <td style="min-width: 80px">完成率</td>
  219 + <td style="min-width: 80px">相比去年差异</td>
196 <td style="min-width: 80px">实际</td> 220 <td style="min-width: 80px">实际</td>
197 <td style="min-width: 80px">预算</td> 221 <td style="min-width: 80px">预算</td>
198 <td style="min-width: 80px">完成率</td> 222 <td style="min-width: 80px">完成率</td>
  223 + <td style="min-width: 80px">相比去年差异</td>
199 <td style="min-width: 80px">实际</td> 224 <td style="min-width: 80px">实际</td>
200 <td style="min-width: 80px">预算</td> 225 <td style="min-width: 80px">预算</td>
201 <td style="min-width: 80px">完成率</td> 226 <td style="min-width: 80px">完成率</td>
  227 + <td style="min-width: 80px">相比去年差异</td>
202 </tr> 228 </tr>
203 </thead> 229 </thead>
204 <tbody class="budget_amounts_dataList" id="datas"> 230 <tbody class="budget_amounts_dataList" id="datas">
@@ -208,7 +234,6 @@ @@ -208,7 +234,6 @@
208 </div> 234 </div>
209 </div> 235 </div>
210 </div> 236 </div>
211 -</div>  
212 237
213 <script> 238 <script>
214 $(function(){ 239 $(function(){
@@ -337,48 +362,61 @@ @@ -337,48 +362,61 @@
337 <td>{{obj.mon1}}</td> 362 <td>{{obj.mon1}}</td>
338 <td>{{obj.bud1}}</td> 363 <td>{{obj.bud1}}</td>
339 <td>{{obj.com1}}</td> 364 <td>{{obj.com1}}</td>
  365 + <td>{{obj.sub1}}</td>
340 <td>{{obj.mon2}}</td> 366 <td>{{obj.mon2}}</td>
341 <td>{{obj.bud2}}</td> 367 <td>{{obj.bud2}}</td>
342 <td>{{obj.com2}}</td> 368 <td>{{obj.com2}}</td>
  369 + <td>{{obj.sub2}}</td>
343 <td>{{obj.mon3}}</td> 370 <td>{{obj.mon3}}</td>
344 <td>{{obj.bud3}}</td> 371 <td>{{obj.bud3}}</td>
345 <td>{{obj.com3}}</td> 372 <td>{{obj.com3}}</td>
  373 + <td>{{obj.sub3}}</td>
346 <td>{{obj.mon4}}</td> 374 <td>{{obj.mon4}}</td>
347 <td>{{obj.bud4}}</td> 375 <td>{{obj.bud4}}</td>
348 <td>{{obj.com4}}</td> 376 <td>{{obj.com4}}</td>
  377 + <td>{{obj.sub4}}</td>
349 <td>{{obj.mon5}}</td> 378 <td>{{obj.mon5}}</td>
350 <td>{{obj.bud5}}</td> 379 <td>{{obj.bud5}}</td>
351 <td>{{obj.com5}}</td> 380 <td>{{obj.com5}}</td>
  381 + <td>{{obj.sub5}}</td>
352 <td>{{obj.mon6}}</td> 382 <td>{{obj.mon6}}</td>
353 <td>{{obj.bud6}}</td> 383 <td>{{obj.bud6}}</td>
354 <td>{{obj.com6}}</td> 384 <td>{{obj.com6}}</td>
  385 + <td>{{obj.sub6}}</td>
355 <td>{{obj.mon7}}</td> 386 <td>{{obj.mon7}}</td>
356 <td>{{obj.bud7}}</td> 387 <td>{{obj.bud7}}</td>
357 <td>{{obj.com7}}</td> 388 <td>{{obj.com7}}</td>
  389 + <td>{{obj.sub7}}</td>
358 <td>{{obj.mon8}}</td> 390 <td>{{obj.mon8}}</td>
359 <td>{{obj.bud8}}</td> 391 <td>{{obj.bud8}}</td>
360 <td>{{obj.com8}}</td> 392 <td>{{obj.com8}}</td>
  393 + <td>{{obj.sub8}}</td>
361 <td>{{obj.mon9}}</td> 394 <td>{{obj.mon9}}</td>
362 <td>{{obj.bud9}}</td> 395 <td>{{obj.bud9}}</td>
363 <td>{{obj.com9}}</td> 396 <td>{{obj.com9}}</td>
  397 + <td>{{obj.sub9}}</td>
364 <td>{{obj.mon10}}</td> 398 <td>{{obj.mon10}}</td>
365 <td>{{obj.bud10}}</td> 399 <td>{{obj.bud10}}</td>
366 <td>{{obj.com10}}</td> 400 <td>{{obj.com10}}</td>
  401 + <td>{{obj.sub10}}</td>
367 <td>{{obj.mon11}}</td> 402 <td>{{obj.mon11}}</td>
368 <td>{{obj.bud11}}</td> 403 <td>{{obj.bud11}}</td>
369 <td>{{obj.com11}}</td> 404 <td>{{obj.com11}}</td>
  405 + <td>{{obj.sub11}}</td>
370 <td>{{obj.mon12}}</td> 406 <td>{{obj.mon12}}</td>
371 <td>{{obj.bud12}}</td> 407 <td>{{obj.bud12}}</td>
372 <td>{{obj.com12}}</td> 408 <td>{{obj.com12}}</td>
  409 + <td>{{obj.sub12}}</td>
373 <td>{{obj.monAll}}</td> 410 <td>{{obj.monAll}}</td>
374 <td>{{obj.complete}}</td> 411 <td>{{obj.complete}}</td>
375 <td>{{obj.diff}}</td> 412 <td>{{obj.diff}}</td>
376 <td>{{obj.average}}</td> 413 <td>{{obj.average}}</td>
  414 + <td>{{obj.subAll}}</td>
377 </tr> 415 </tr>
378 {{/each}} 416 {{/each}}
379 {{if list.length == 0}} 417 {{if list.length == 0}}
380 <tr> 418 <tr>
381 - <td colspan="55"><h6 class="muted">没有找到相关数据</h6></td> 419 + <td colspan="59"><h6 class="muted">没有找到相关数据</h6></td>
382 </tr> 420 </tr>
383 {{/if}} 421 {{/if}}
384 </script> 422 </script>
@@ -393,48 +431,61 @@ @@ -393,48 +431,61 @@
393 <td>{{obj.mon1}}</td> 431 <td>{{obj.mon1}}</td>
394 <td>{{obj.bud1}}</td> 432 <td>{{obj.bud1}}</td>
395 <td>{{obj.com1}}</td> 433 <td>{{obj.com1}}</td>
  434 + <td>{{obj.sub1}}</td>
396 <td>{{obj.mon2}}</td> 435 <td>{{obj.mon2}}</td>
397 <td>{{obj.bud2}}</td> 436 <td>{{obj.bud2}}</td>
398 <td>{{obj.com2}}</td> 437 <td>{{obj.com2}}</td>
  438 + <td>{{obj.sub2}}</td>
399 <td>{{obj.mon3}}</td> 439 <td>{{obj.mon3}}</td>
400 <td>{{obj.bud3}}</td> 440 <td>{{obj.bud3}}</td>
401 <td>{{obj.com3}}</td> 441 <td>{{obj.com3}}</td>
  442 + <td>{{obj.sub3}}</td>
402 <td>{{obj.mon4}}</td> 443 <td>{{obj.mon4}}</td>
403 <td>{{obj.bud4}}</td> 444 <td>{{obj.bud4}}</td>
404 <td>{{obj.com4}}</td> 445 <td>{{obj.com4}}</td>
  446 + <td>{{obj.sub4}}</td>
405 <td>{{obj.mon5}}</td> 447 <td>{{obj.mon5}}</td>
406 <td>{{obj.bud5}}</td> 448 <td>{{obj.bud5}}</td>
407 <td>{{obj.com5}}</td> 449 <td>{{obj.com5}}</td>
  450 + <td>{{obj.sub5}}</td>
408 <td>{{obj.mon6}}</td> 451 <td>{{obj.mon6}}</td>
409 <td>{{obj.bud6}}</td> 452 <td>{{obj.bud6}}</td>
410 <td>{{obj.com6}}</td> 453 <td>{{obj.com6}}</td>
  454 + <td>{{obj.sub6}}</td>
411 <td>{{obj.mon7}}</td> 455 <td>{{obj.mon7}}</td>
412 <td>{{obj.bud7}}</td> 456 <td>{{obj.bud7}}</td>
413 <td>{{obj.com7}}</td> 457 <td>{{obj.com7}}</td>
  458 + <td>{{obj.sub7}}</td>
414 <td>{{obj.mon8}}</td> 459 <td>{{obj.mon8}}</td>
415 <td>{{obj.bud8}}</td> 460 <td>{{obj.bud8}}</td>
416 <td>{{obj.com8}}</td> 461 <td>{{obj.com8}}</td>
  462 + <td>{{obj.sub8}}</td>
417 <td>{{obj.mon9}}</td> 463 <td>{{obj.mon9}}</td>
418 <td>{{obj.bud9}}</td> 464 <td>{{obj.bud9}}</td>
419 <td>{{obj.com9}}</td> 465 <td>{{obj.com9}}</td>
  466 + <td>{{obj.sub9}}</td>
420 <td>{{obj.mon10}}</td> 467 <td>{{obj.mon10}}</td>
421 <td>{{obj.bud10}}</td> 468 <td>{{obj.bud10}}</td>
422 <td>{{obj.com10}}</td> 469 <td>{{obj.com10}}</td>
  470 + <td>{{obj.sub10}}</td>
423 <td>{{obj.mon11}}</td> 471 <td>{{obj.mon11}}</td>
424 <td>{{obj.bud11}}</td> 472 <td>{{obj.bud11}}</td>
425 <td>{{obj.com11}}</td> 473 <td>{{obj.com11}}</td>
  474 + <td>{{obj.sub11}}</td>
426 <td>{{obj.mon12}}</td> 475 <td>{{obj.mon12}}</td>
427 <td>{{obj.bud12}}</td> 476 <td>{{obj.bud12}}</td>
428 <td>{{obj.com12}}</td> 477 <td>{{obj.com12}}</td>
  478 + <td>{{obj.sub12}}</td>
429 <td>{{obj.monAll}}</td> 479 <td>{{obj.monAll}}</td>
430 <td>{{obj.complete}}</td> 480 <td>{{obj.complete}}</td>
431 <td>{{obj.diff}}</td> 481 <td>{{obj.diff}}</td>
432 <td>{{obj.average}}</td> 482 <td>{{obj.average}}</td>
  483 + <td>{{obj.subAll}}</td>
433 </tr> 484 </tr>
434 {{/each}} 485 {{/each}}
435 {{if list.length == 0}} 486 {{if list.length == 0}}
436 <tr> 487 <tr>
437 - <td colspan="55"><h6 class="muted">没有找到相关数据</h6></td> 488 + <td colspan="59"><h6 class="muted">没有找到相关数据</h6></td>
438 </tr> 489 </tr>
439 {{/if}} 490 {{/if}}
440 </script> 491 </script>
441 \ No newline at end of file 492 \ No newline at end of file
src/main/resources/static/pages/forms/budget/budgetMileage.html
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 <table class="table table-bordered table-hover table-checkable" id="forms"> 53 <table class="table table-bordered table-hover table-checkable" id="forms">
54 <thead style="text-align: center;"> 54 <thead style="text-align: center;">
55 <tr> 55 <tr>
56 - <th colspan="54"><label id="datetodate"></label> 预算公里明细表</th> 56 + <th colspan="58"><label id="datetodate"></label> 预算公里明细表</th>
57 </tr> 57 </tr>
58 <tr> 58 <tr>
59 <td style="min-width: 73px" rowspan="2">公司</td> 59 <td style="min-width: 73px" rowspan="2">公司</td>
@@ -62,59 +62,72 @@ @@ -62,59 +62,72 @@
62 <td style="min-width: 90px" rowspan="2">预算</td> 62 <td style="min-width: 90px" rowspan="2">预算</td>
63 <td style="min-width: 90px" rowspan="2">预算调整</td> 63 <td style="min-width: 90px" rowspan="2">预算调整</td>
64 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td> 64 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td>
65 - <td style="min-width: 90px" colspan="3">1月</td>  
66 - <td style="min-width: 90px" colspan="3">2月</td>  
67 - <td style="min-width: 90px" colspan="3">3月</td>  
68 - <td style="min-width: 90px" colspan="3">4月</td>  
69 - <td style="min-width: 90px" colspan="3">5月</td>  
70 - <td style="min-width: 90px" colspan="3">6月</td>  
71 - <td style="min-width: 90px" colspan="3">7月</td>  
72 - <td style="min-width: 90px" colspan="3">8月</td>  
73 - <td style="min-width: 90px" colspan="3">9月</td>  
74 - <td style="min-width: 90px" colspan="3">10月</td>  
75 - <td style="min-width: 90px" colspan="3">11月</td>  
76 - <td style="min-width: 90px" colspan="3">12月</td> 65 + <td style="min-width: 90px" colspan="4">1月</td>
  66 + <td style="min-width: 90px" colspan="4">2月</td>
  67 + <td style="min-width: 90px" colspan="4">3月</td>
  68 + <td style="min-width: 90px" colspan="4">4月</td>
  69 + <td style="min-width: 90px" colspan="4">5月</td>
  70 + <td style="min-width: 90px" colspan="4">6月</td>
  71 + <td style="min-width: 90px" colspan="4">7月</td>
  72 + <td style="min-width: 90px" colspan="4">8月</td>
  73 + <td style="min-width: 90px" colspan="4">9月</td>
  74 + <td style="min-width: 90px" colspan="4">10月</td>
  75 + <td style="min-width: 90px" colspan="4">11月</td>
  76 + <td style="min-width: 90px" colspan="4">12月</td>
77 <td style="min-width: 90px" rowspan="2">合计</td> 77 <td style="min-width: 90px" rowspan="2">合计</td>
78 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td> 78 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td>
79 <td style="min-width: 90px" rowspan="2">预算差异</td> 79 <td style="min-width: 90px" rowspan="2">预算差异</td>
  80 + <td style="min-width: 90px" rowspan="2">相比去年差异</td>
80 </tr> 81 </tr>
81 <tr> 82 <tr>
82 <td style="min-width: 80px">实际</td> 83 <td style="min-width: 80px">实际</td>
83 <td style="min-width: 80px">预算</td> 84 <td style="min-width: 80px">预算</td>
84 <td style="min-width: 80px">完成率</td> 85 <td style="min-width: 80px">完成率</td>
  86 + <td style="min-width: 80px">相比去年差异</td>
85 <td style="min-width: 80px">实际</td> 87 <td style="min-width: 80px">实际</td>
86 <td style="min-width: 80px">预算</td> 88 <td style="min-width: 80px">预算</td>
87 <td style="min-width: 80px">完成率</td> 89 <td style="min-width: 80px">完成率</td>
  90 + <td style="min-width: 80px">相比去年差异</td>
88 <td style="min-width: 80px">实际</td> 91 <td style="min-width: 80px">实际</td>
89 <td style="min-width: 80px">预算</td> 92 <td style="min-width: 80px">预算</td>
90 <td style="min-width: 80px">完成率</td> 93 <td style="min-width: 80px">完成率</td>
  94 + <td style="min-width: 80px">相比去年差异</td>
91 <td style="min-width: 80px">实际</td> 95 <td style="min-width: 80px">实际</td>
92 <td style="min-width: 80px">预算</td> 96 <td style="min-width: 80px">预算</td>
93 <td style="min-width: 80px">完成率</td> 97 <td style="min-width: 80px">完成率</td>
  98 + <td style="min-width: 80px">相比去年差异</td>
94 <td style="min-width: 80px">实际</td> 99 <td style="min-width: 80px">实际</td>
95 <td style="min-width: 80px">预算</td> 100 <td style="min-width: 80px">预算</td>
96 <td style="min-width: 80px">完成率</td> 101 <td style="min-width: 80px">完成率</td>
  102 + <td style="min-width: 80px">相比去年差异</td>
97 <td style="min-width: 80px">实际</td> 103 <td style="min-width: 80px">实际</td>
98 <td style="min-width: 80px">预算</td> 104 <td style="min-width: 80px">预算</td>
99 <td style="min-width: 80px">完成率</td> 105 <td style="min-width: 80px">完成率</td>
  106 + <td style="min-width: 80px">相比去年差异</td>
100 <td style="min-width: 80px">实际</td> 107 <td style="min-width: 80px">实际</td>
101 <td style="min-width: 80px">预算</td> 108 <td style="min-width: 80px">预算</td>
102 <td style="min-width: 80px">完成率</td> 109 <td style="min-width: 80px">完成率</td>
  110 + <td style="min-width: 80px">相比去年差异</td>
103 <td style="min-width: 80px">实际</td> 111 <td style="min-width: 80px">实际</td>
104 <td style="min-width: 80px">预算</td> 112 <td style="min-width: 80px">预算</td>
105 <td style="min-width: 80px">完成率</td> 113 <td style="min-width: 80px">完成率</td>
  114 + <td style="min-width: 80px">相比去年差异</td>
106 <td style="min-width: 80px">实际</td> 115 <td style="min-width: 80px">实际</td>
107 <td style="min-width: 80px">预算</td> 116 <td style="min-width: 80px">预算</td>
108 <td style="min-width: 80px">完成率</td> 117 <td style="min-width: 80px">完成率</td>
  118 + <td style="min-width: 80px">相比去年差异</td>
109 <td style="min-width: 80px">实际</td> 119 <td style="min-width: 80px">实际</td>
110 <td style="min-width: 80px">预算</td> 120 <td style="min-width: 80px">预算</td>
111 <td style="min-width: 80px">完成率</td> 121 <td style="min-width: 80px">完成率</td>
  122 + <td style="min-width: 80px">相比去年差异</td>
112 <td style="min-width: 80px">实际</td> 123 <td style="min-width: 80px">实际</td>
113 <td style="min-width: 80px">预算</td> 124 <td style="min-width: 80px">预算</td>
114 <td style="min-width: 80px">完成率</td> 125 <td style="min-width: 80px">完成率</td>
  126 + <td style="min-width: 80px">相比去年差异</td>
115 <td style="min-width: 80px">实际</td> 127 <td style="min-width: 80px">实际</td>
116 <td style="min-width: 80px">预算</td> 128 <td style="min-width: 80px">预算</td>
117 <td style="min-width: 80px">完成率</td> 129 <td style="min-width: 80px">完成率</td>
  130 + <td style="min-width: 80px">相比去年差异</td>
118 </tr> 131 </tr>
119 </thead> 132 </thead>
120 <tbody class="budget_mileage"> 133 <tbody class="budget_mileage">
@@ -144,59 +157,72 @@ @@ -144,59 +157,72 @@
144 <td style="min-width: 90px" rowspan="2">预算</td> 157 <td style="min-width: 90px" rowspan="2">预算</td>
145 <td style="min-width: 90px" rowspan="2">预算调整</td> 158 <td style="min-width: 90px" rowspan="2">预算调整</td>
146 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td> 159 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td>
147 - <td style="min-width: 90px" colspan="3">1月</td>  
148 - <td style="min-width: 90px" colspan="3">2月</td>  
149 - <td style="min-width: 90px" colspan="3">3月</td>  
150 - <td style="min-width: 90px" colspan="3">4月</td>  
151 - <td style="min-width: 90px" colspan="3">5月</td>  
152 - <td style="min-width: 90px" colspan="3">6月</td>  
153 - <td style="min-width: 90px" colspan="3">7月</td>  
154 - <td style="min-width: 90px" colspan="3">8月</td>  
155 - <td style="min-width: 90px" colspan="3">9月</td>  
156 - <td style="min-width: 90px" colspan="3">10月</td>  
157 - <td style="min-width: 90px" colspan="3">11月</td>  
158 - <td style="min-width: 90px" colspan="3">12月</td> 160 + <td style="min-width: 90px" colspan="4">1月</td>
  161 + <td style="min-width: 90px" colspan="4">2月</td>
  162 + <td style="min-width: 90px" colspan="4">3月</td>
  163 + <td style="min-width: 90px" colspan="4">4月</td>
  164 + <td style="min-width: 90px" colspan="4">5月</td>
  165 + <td style="min-width: 90px" colspan="4">6月</td>
  166 + <td style="min-width: 90px" colspan="4">7月</td>
  167 + <td style="min-width: 90px" colspan="4">8月</td>
  168 + <td style="min-width: 90px" colspan="4">9月</td>
  169 + <td style="min-width: 90px" colspan="4">10月</td>
  170 + <td style="min-width: 90px" colspan="4">11月</td>
  171 + <td style="min-width: 90px" colspan="4">12月</td>
159 <td style="min-width: 90px" rowspan="2">合计</td> 172 <td style="min-width: 90px" rowspan="2">合计</td>
160 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td> 173 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td>
161 <td style="min-width: 90px" rowspan="2">预算差异</td> 174 <td style="min-width: 90px" rowspan="2">预算差异</td>
  175 + <td style="min-width: 90px" rowspan="2">相比去年差异</td>
162 </tr> 176 </tr>
163 <tr> 177 <tr>
164 <td style="min-width: 80px">实际</td> 178 <td style="min-width: 80px">实际</td>
165 <td style="min-width: 80px">预算</td> 179 <td style="min-width: 80px">预算</td>
166 <td style="min-width: 80px">完成率</td> 180 <td style="min-width: 80px">完成率</td>
  181 + <td style="min-width: 80px">相比去年差异</td>
167 <td style="min-width: 80px">实际</td> 182 <td style="min-width: 80px">实际</td>
168 <td style="min-width: 80px">预算</td> 183 <td style="min-width: 80px">预算</td>
169 <td style="min-width: 80px">完成率</td> 184 <td style="min-width: 80px">完成率</td>
  185 + <td style="min-width: 80px">相比去年差异</td>
170 <td style="min-width: 80px">实际</td> 186 <td style="min-width: 80px">实际</td>
171 <td style="min-width: 80px">预算</td> 187 <td style="min-width: 80px">预算</td>
172 <td style="min-width: 80px">完成率</td> 188 <td style="min-width: 80px">完成率</td>
  189 + <td style="min-width: 80px">相比去年差异</td>
173 <td style="min-width: 80px">实际</td> 190 <td style="min-width: 80px">实际</td>
174 <td style="min-width: 80px">预算</td> 191 <td style="min-width: 80px">预算</td>
175 <td style="min-width: 80px">完成率</td> 192 <td style="min-width: 80px">完成率</td>
  193 + <td style="min-width: 80px">相比去年差异</td>
176 <td style="min-width: 80px">实际</td> 194 <td style="min-width: 80px">实际</td>
177 <td style="min-width: 80px">预算</td> 195 <td style="min-width: 80px">预算</td>
178 <td style="min-width: 80px">完成率</td> 196 <td style="min-width: 80px">完成率</td>
  197 + <td style="min-width: 80px">相比去年差异</td>
179 <td style="min-width: 80px">实际</td> 198 <td style="min-width: 80px">实际</td>
180 <td style="min-width: 80px">预算</td> 199 <td style="min-width: 80px">预算</td>
181 <td style="min-width: 80px">完成率</td> 200 <td style="min-width: 80px">完成率</td>
  201 + <td style="min-width: 80px">相比去年差异</td>
182 <td style="min-width: 80px">实际</td> 202 <td style="min-width: 80px">实际</td>
183 <td style="min-width: 80px">预算</td> 203 <td style="min-width: 80px">预算</td>
184 <td style="min-width: 80px">完成率</td> 204 <td style="min-width: 80px">完成率</td>
  205 + <td style="min-width: 80px">相比去年差异</td>
185 <td style="min-width: 80px">实际</td> 206 <td style="min-width: 80px">实际</td>
186 <td style="min-width: 80px">预算</td> 207 <td style="min-width: 80px">预算</td>
187 <td style="min-width: 80px">完成率</td> 208 <td style="min-width: 80px">完成率</td>
  209 + <td style="min-width: 80px">相比去年差异</td>
188 <td style="min-width: 80px">实际</td> 210 <td style="min-width: 80px">实际</td>
189 <td style="min-width: 80px">预算</td> 211 <td style="min-width: 80px">预算</td>
190 <td style="min-width: 80px">完成率</td> 212 <td style="min-width: 80px">完成率</td>
  213 + <td style="min-width: 80px">相比去年差异</td>
191 <td style="min-width: 80px">实际</td> 214 <td style="min-width: 80px">实际</td>
192 <td style="min-width: 80px">预算</td> 215 <td style="min-width: 80px">预算</td>
193 <td style="min-width: 80px">完成率</td> 216 <td style="min-width: 80px">完成率</td>
  217 + <td style="min-width: 80px">相比去年差异</td>
194 <td style="min-width: 80px">实际</td> 218 <td style="min-width: 80px">实际</td>
195 <td style="min-width: 80px">预算</td> 219 <td style="min-width: 80px">预算</td>
196 <td style="min-width: 80px">完成率</td> 220 <td style="min-width: 80px">完成率</td>
  221 + <td style="min-width: 80px">相比去年差异</td>
197 <td style="min-width: 80px">实际</td> 222 <td style="min-width: 80px">实际</td>
198 <td style="min-width: 80px">预算</td> 223 <td style="min-width: 80px">预算</td>
199 <td style="min-width: 80px">完成率</td> 224 <td style="min-width: 80px">完成率</td>
  225 + <td style="min-width: 80px">相比去年差异</td>
200 </tr> 226 </tr>
201 </thead> 227 </thead>
202 <tbody class="budget_mileage_dataList" id="datas"> 228 <tbody class="budget_mileage_dataList" id="datas">
@@ -206,7 +232,6 @@ @@ -206,7 +232,6 @@
206 </div> 232 </div>
207 </div> 233 </div>
208 </div> 234 </div>
209 -</div>  
210 235
211 <script> 236 <script>
212 $(function(){ 237 $(function(){
@@ -335,47 +360,60 @@ @@ -335,47 +360,60 @@
335 <td>{{obj.mon1}}</td> 360 <td>{{obj.mon1}}</td>
336 <td>{{obj.bud1}}</td> 361 <td>{{obj.bud1}}</td>
337 <td>{{obj.com1}}</td> 362 <td>{{obj.com1}}</td>
  363 + <td>{{obj.sub1}}</td>
338 <td>{{obj.mon2}}</td> 364 <td>{{obj.mon2}}</td>
339 <td>{{obj.bud2}}</td> 365 <td>{{obj.bud2}}</td>
340 <td>{{obj.com2}}</td> 366 <td>{{obj.com2}}</td>
  367 + <td>{{obj.sub2}}</td>
341 <td>{{obj.mon3}}</td> 368 <td>{{obj.mon3}}</td>
342 <td>{{obj.bud3}}</td> 369 <td>{{obj.bud3}}</td>
343 <td>{{obj.com3}}</td> 370 <td>{{obj.com3}}</td>
  371 + <td>{{obj.sub3}}</td>
344 <td>{{obj.mon4}}</td> 372 <td>{{obj.mon4}}</td>
345 <td>{{obj.bud4}}</td> 373 <td>{{obj.bud4}}</td>
346 <td>{{obj.com4}}</td> 374 <td>{{obj.com4}}</td>
  375 + <td>{{obj.sub4}}</td>
347 <td>{{obj.mon5}}</td> 376 <td>{{obj.mon5}}</td>
348 <td>{{obj.bud5}}</td> 377 <td>{{obj.bud5}}</td>
349 <td>{{obj.com5}}</td> 378 <td>{{obj.com5}}</td>
  379 + <td>{{obj.sub5}}</td>
350 <td>{{obj.mon6}}</td> 380 <td>{{obj.mon6}}</td>
351 <td>{{obj.bud6}}</td> 381 <td>{{obj.bud6}}</td>
352 <td>{{obj.com6}}</td> 382 <td>{{obj.com6}}</td>
  383 + <td>{{obj.sub6}}</td>
353 <td>{{obj.mon7}}</td> 384 <td>{{obj.mon7}}</td>
354 <td>{{obj.bud7}}</td> 385 <td>{{obj.bud7}}</td>
355 <td>{{obj.com7}}</td> 386 <td>{{obj.com7}}</td>
  387 + <td>{{obj.sub7}}</td>
356 <td>{{obj.mon8}}</td> 388 <td>{{obj.mon8}}</td>
357 <td>{{obj.bud8}}</td> 389 <td>{{obj.bud8}}</td>
358 <td>{{obj.com8}}</td> 390 <td>{{obj.com8}}</td>
  391 + <td>{{obj.sub8}}</td>
359 <td>{{obj.mon9}}</td> 392 <td>{{obj.mon9}}</td>
360 <td>{{obj.bud9}}</td> 393 <td>{{obj.bud9}}</td>
361 <td>{{obj.com9}}</td> 394 <td>{{obj.com9}}</td>
  395 + <td>{{obj.sub9}}</td>
362 <td>{{obj.mon10}}</td> 396 <td>{{obj.mon10}}</td>
363 <td>{{obj.bud10}}</td> 397 <td>{{obj.bud10}}</td>
364 <td>{{obj.com10}}</td> 398 <td>{{obj.com10}}</td>
  399 + <td>{{obj.sub10}}</td>
365 <td>{{obj.mon11}}</td> 400 <td>{{obj.mon11}}</td>
366 <td>{{obj.bud11}}</td> 401 <td>{{obj.bud11}}</td>
367 <td>{{obj.com11}}</td> 402 <td>{{obj.com11}}</td>
  403 + <td>{{obj.sub11}}</td>
368 <td>{{obj.mon12}}</td> 404 <td>{{obj.mon12}}</td>
369 <td>{{obj.bud12}}</td> 405 <td>{{obj.bud12}}</td>
370 <td>{{obj.com12}}</td> 406 <td>{{obj.com12}}</td>
  407 + <td>{{obj.sub12}}</td>
371 <td>{{obj.monAll}}</td> 408 <td>{{obj.monAll}}</td>
372 <td>{{obj.complete}}</td> 409 <td>{{obj.complete}}</td>
373 <td>{{obj.diff}}</td> 410 <td>{{obj.diff}}</td>
  411 + <td>{{obj.subAll}}</td>
374 </tr> 412 </tr>
375 {{/each}} 413 {{/each}}
376 {{if list.length == 0}} 414 {{if list.length == 0}}
377 <tr> 415 <tr>
378 - <td colspan="54"><h6 class="muted">没有找到相关数据</h6></td> 416 + <td colspan="58"><h6 class="muted">没有找到相关数据</h6></td>
379 </tr> 417 </tr>
380 {{/if}} 418 {{/if}}
381 </script> 419 </script>
@@ -390,47 +428,60 @@ @@ -390,47 +428,60 @@
390 <td>{{obj.mon1}}</td> 428 <td>{{obj.mon1}}</td>
391 <td>{{obj.bud1}}</td> 429 <td>{{obj.bud1}}</td>
392 <td>{{obj.com1}}</td> 430 <td>{{obj.com1}}</td>
  431 + <td>{{obj.sub1}}</td>
393 <td>{{obj.mon2}}</td> 432 <td>{{obj.mon2}}</td>
394 <td>{{obj.bud2}}</td> 433 <td>{{obj.bud2}}</td>
395 <td>{{obj.com2}}</td> 434 <td>{{obj.com2}}</td>
  435 + <td>{{obj.sub2}}</td>
396 <td>{{obj.mon3}}</td> 436 <td>{{obj.mon3}}</td>
397 <td>{{obj.bud3}}</td> 437 <td>{{obj.bud3}}</td>
398 <td>{{obj.com3}}</td> 438 <td>{{obj.com3}}</td>
  439 + <td>{{obj.sub3}}</td>
399 <td>{{obj.mon4}}</td> 440 <td>{{obj.mon4}}</td>
400 <td>{{obj.bud4}}</td> 441 <td>{{obj.bud4}}</td>
401 <td>{{obj.com4}}</td> 442 <td>{{obj.com4}}</td>
  443 + <td>{{obj.sub4}}</td>
402 <td>{{obj.mon5}}</td> 444 <td>{{obj.mon5}}</td>
403 <td>{{obj.bud5}}</td> 445 <td>{{obj.bud5}}</td>
404 <td>{{obj.com5}}</td> 446 <td>{{obj.com5}}</td>
  447 + <td>{{obj.sub5}}</td>
405 <td>{{obj.mon6}}</td> 448 <td>{{obj.mon6}}</td>
406 <td>{{obj.bud6}}</td> 449 <td>{{obj.bud6}}</td>
407 <td>{{obj.com6}}</td> 450 <td>{{obj.com6}}</td>
  451 + <td>{{obj.sub6}}</td>
408 <td>{{obj.mon7}}</td> 452 <td>{{obj.mon7}}</td>
409 <td>{{obj.bud7}}</td> 453 <td>{{obj.bud7}}</td>
410 <td>{{obj.com7}}</td> 454 <td>{{obj.com7}}</td>
  455 + <td>{{obj.sub7}}</td>
411 <td>{{obj.mon8}}</td> 456 <td>{{obj.mon8}}</td>
412 <td>{{obj.bud8}}</td> 457 <td>{{obj.bud8}}</td>
413 <td>{{obj.com8}}</td> 458 <td>{{obj.com8}}</td>
  459 + <td>{{obj.sub8}}</td>
414 <td>{{obj.mon9}}</td> 460 <td>{{obj.mon9}}</td>
415 <td>{{obj.bud9}}</td> 461 <td>{{obj.bud9}}</td>
416 <td>{{obj.com9}}</td> 462 <td>{{obj.com9}}</td>
  463 + <td>{{obj.sub9}}</td>
417 <td>{{obj.mon10}}</td> 464 <td>{{obj.mon10}}</td>
418 <td>{{obj.bud10}}</td> 465 <td>{{obj.bud10}}</td>
419 <td>{{obj.com10}}</td> 466 <td>{{obj.com10}}</td>
  467 + <td>{{obj.sub10}}</td>
420 <td>{{obj.mon11}}</td> 468 <td>{{obj.mon11}}</td>
421 <td>{{obj.bud11}}</td> 469 <td>{{obj.bud11}}</td>
422 <td>{{obj.com11}}</td> 470 <td>{{obj.com11}}</td>
  471 + <td>{{obj.sub11}}</td>
423 <td>{{obj.mon12}}</td> 472 <td>{{obj.mon12}}</td>
424 <td>{{obj.bud12}}</td> 473 <td>{{obj.bud12}}</td>
425 <td>{{obj.com12}}</td> 474 <td>{{obj.com12}}</td>
  475 + <td>{{obj.sub12}}</td>
426 <td>{{obj.monAll}}</td> 476 <td>{{obj.monAll}}</td>
427 <td>{{obj.complete}}</td> 477 <td>{{obj.complete}}</td>
428 <td>{{obj.diff}}</td> 478 <td>{{obj.diff}}</td>
  479 + <td>{{obj.subAll}}</td>
429 </tr> 480 </tr>
430 {{/each}} 481 {{/each}}
431 {{if list.length == 0}} 482 {{if list.length == 0}}
432 <tr> 483 <tr>
433 - <td colspan="54"><h6 class="muted">没有找到相关数据</h6></td> 484 + <td colspan="58"><h6 class="muted">没有找到相关数据</h6></td>
434 </tr> 485 </tr>
435 {{/if}} 486 {{/if}}
436 </script> 487 </script>
437 \ No newline at end of file 488 \ No newline at end of file
src/main/resources/static/pages/forms/budget/budgetPerson.html
@@ -53,7 +53,7 @@ @@ -53,7 +53,7 @@
53 <table class="table table-bordered table-hover table-checkable" id="forms"> 53 <table class="table table-bordered table-hover table-checkable" id="forms">
54 <thead style="text-align: center;"> 54 <thead style="text-align: center;">
55 <tr> 55 <tr>
56 - <th colspan="54"><label id="datetodate"></label> 预算人次明细表</th> 56 + <th colspan="58"><label id="datetodate"></label> 预算人次明细表</th>
57 </tr> 57 </tr>
58 <tr> 58 <tr>
59 <td style="min-width: 73px" rowspan="2">公司</td> 59 <td style="min-width: 73px" rowspan="2">公司</td>
@@ -62,59 +62,72 @@ @@ -62,59 +62,72 @@
62 <td style="min-width: 90px" rowspan="2">预算</td> 62 <td style="min-width: 90px" rowspan="2">预算</td>
63 <td style="min-width: 90px" rowspan="2">预算调整</td> 63 <td style="min-width: 90px" rowspan="2">预算调整</td>
64 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td> 64 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td>
65 - <td style="min-width: 90px" colspan="3">1月</td>  
66 - <td style="min-width: 90px" colspan="3">2月</td>  
67 - <td style="min-width: 90px" colspan="3">3月</td>  
68 - <td style="min-width: 90px" colspan="3">4月</td>  
69 - <td style="min-width: 90px" colspan="3">5月</td>  
70 - <td style="min-width: 90px" colspan="3">6月</td>  
71 - <td style="min-width: 90px" colspan="3">7月</td>  
72 - <td style="min-width: 90px" colspan="3">8月</td>  
73 - <td style="min-width: 90px" colspan="3">9月</td>  
74 - <td style="min-width: 90px" colspan="3">10月</td>  
75 - <td style="min-width: 90px" colspan="3">11月</td>  
76 - <td style="min-width: 90px" colspan="3">12月</td> 65 + <td style="min-width: 90px" colspan="4">1月</td>
  66 + <td style="min-width: 90px" colspan="4">2月</td>
  67 + <td style="min-width: 90px" colspan="4">3月</td>
  68 + <td style="min-width: 90px" colspan="4">4月</td>
  69 + <td style="min-width: 90px" colspan="4">5月</td>
  70 + <td style="min-width: 90px" colspan="4">6月</td>
  71 + <td style="min-width: 90px" colspan="4">7月</td>
  72 + <td style="min-width: 90px" colspan="4">8月</td>
  73 + <td style="min-width: 90px" colspan="4">9月</td>
  74 + <td style="min-width: 90px" colspan="4">10月</td>
  75 + <td style="min-width: 90px" colspan="4">11月</td>
  76 + <td style="min-width: 90px" colspan="4">12月</td>
77 <td style="min-width: 90px" rowspan="2">合计</td> 77 <td style="min-width: 90px" rowspan="2">合计</td>
78 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td> 78 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td>
79 <td style="min-width: 90px" rowspan="2">预算差异</td> 79 <td style="min-width: 90px" rowspan="2">预算差异</td>
  80 + <td style="min-width: 90px" rowspan="2">相比去年差异</td>
80 </tr> 81 </tr>
81 <tr> 82 <tr>
82 <td style="min-width: 80px">实际</td> 83 <td style="min-width: 80px">实际</td>
83 <td style="min-width: 80px">预算</td> 84 <td style="min-width: 80px">预算</td>
84 <td style="min-width: 80px">完成率</td> 85 <td style="min-width: 80px">完成率</td>
  86 + <td style="min-width: 80px">相比去年差异</td>
85 <td style="min-width: 80px">实际</td> 87 <td style="min-width: 80px">实际</td>
86 <td style="min-width: 80px">预算</td> 88 <td style="min-width: 80px">预算</td>
87 <td style="min-width: 80px">完成率</td> 89 <td style="min-width: 80px">完成率</td>
  90 + <td style="min-width: 80px">相比去年差异</td>
88 <td style="min-width: 80px">实际</td> 91 <td style="min-width: 80px">实际</td>
89 <td style="min-width: 80px">预算</td> 92 <td style="min-width: 80px">预算</td>
90 <td style="min-width: 80px">完成率</td> 93 <td style="min-width: 80px">完成率</td>
  94 + <td style="min-width: 80px">相比去年差异</td>
91 <td style="min-width: 80px">实际</td> 95 <td style="min-width: 80px">实际</td>
92 <td style="min-width: 80px">预算</td> 96 <td style="min-width: 80px">预算</td>
93 <td style="min-width: 80px">完成率</td> 97 <td style="min-width: 80px">完成率</td>
  98 + <td style="min-width: 80px">相比去年差异</td>
94 <td style="min-width: 80px">实际</td> 99 <td style="min-width: 80px">实际</td>
95 <td style="min-width: 80px">预算</td> 100 <td style="min-width: 80px">预算</td>
96 <td style="min-width: 80px">完成率</td> 101 <td style="min-width: 80px">完成率</td>
  102 + <td style="min-width: 80px">相比去年差异</td>
97 <td style="min-width: 80px">实际</td> 103 <td style="min-width: 80px">实际</td>
98 <td style="min-width: 80px">预算</td> 104 <td style="min-width: 80px">预算</td>
99 <td style="min-width: 80px">完成率</td> 105 <td style="min-width: 80px">完成率</td>
  106 + <td style="min-width: 80px">相比去年差异</td>
100 <td style="min-width: 80px">实际</td> 107 <td style="min-width: 80px">实际</td>
101 <td style="min-width: 80px">预算</td> 108 <td style="min-width: 80px">预算</td>
102 <td style="min-width: 80px">完成率</td> 109 <td style="min-width: 80px">完成率</td>
  110 + <td style="min-width: 80px">相比去年差异</td>
103 <td style="min-width: 80px">实际</td> 111 <td style="min-width: 80px">实际</td>
104 <td style="min-width: 80px">预算</td> 112 <td style="min-width: 80px">预算</td>
105 <td style="min-width: 80px">完成率</td> 113 <td style="min-width: 80px">完成率</td>
  114 + <td style="min-width: 80px">相比去年差异</td>
106 <td style="min-width: 80px">实际</td> 115 <td style="min-width: 80px">实际</td>
107 <td style="min-width: 80px">预算</td> 116 <td style="min-width: 80px">预算</td>
108 <td style="min-width: 80px">完成率</td> 117 <td style="min-width: 80px">完成率</td>
  118 + <td style="min-width: 80px">相比去年差异</td>
109 <td style="min-width: 80px">实际</td> 119 <td style="min-width: 80px">实际</td>
110 <td style="min-width: 80px">预算</td> 120 <td style="min-width: 80px">预算</td>
111 <td style="min-width: 80px">完成率</td> 121 <td style="min-width: 80px">完成率</td>
  122 + <td style="min-width: 80px">相比去年差异</td>
112 <td style="min-width: 80px">实际</td> 123 <td style="min-width: 80px">实际</td>
113 <td style="min-width: 80px">预算</td> 124 <td style="min-width: 80px">预算</td>
114 <td style="min-width: 80px">完成率</td> 125 <td style="min-width: 80px">完成率</td>
  126 + <td style="min-width: 80px">相比去年差异</td>
115 <td style="min-width: 80px">实际</td> 127 <td style="min-width: 80px">实际</td>
116 <td style="min-width: 80px">预算</td> 128 <td style="min-width: 80px">预算</td>
117 <td style="min-width: 80px">完成率</td> 129 <td style="min-width: 80px">完成率</td>
  130 + <td style="min-width: 80px">相比去年差异</td>
118 </tr> 131 </tr>
119 </thead> 132 </thead>
120 <tbody class="budget_person"> 133 <tbody class="budget_person">
@@ -144,59 +157,72 @@ @@ -144,59 +157,72 @@
144 <td style="min-width: 90px" rowspan="2">预算</td> 157 <td style="min-width: 90px" rowspan="2">预算</td>
145 <td style="min-width: 90px" rowspan="2">预算调整</td> 158 <td style="min-width: 90px" rowspan="2">预算调整</td>
146 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td> 159 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td>
147 - <td style="min-width: 90px" colspan="3">1月</td>  
148 - <td style="min-width: 90px" colspan="3">2月</td>  
149 - <td style="min-width: 90px" colspan="3">3月</td>  
150 - <td style="min-width: 90px" colspan="3">4月</td>  
151 - <td style="min-width: 90px" colspan="3">5月</td>  
152 - <td style="min-width: 90px" colspan="3">6月</td>  
153 - <td style="min-width: 90px" colspan="3">7月</td>  
154 - <td style="min-width: 90px" colspan="3">8月</td>  
155 - <td style="min-width: 90px" colspan="3">9月</td>  
156 - <td style="min-width: 90px" colspan="3">10月</td>  
157 - <td style="min-width: 90px" colspan="3">11月</td>  
158 - <td style="min-width: 90px" colspan="3">12月</td> 160 + <td style="min-width: 90px" colspan="4">1月</td>
  161 + <td style="min-width: 90px" colspan="4">2月</td>
  162 + <td style="min-width: 90px" colspan="4">3月</td>
  163 + <td style="min-width: 90px" colspan="4">4月</td>
  164 + <td style="min-width: 90px" colspan="4">5月</td>
  165 + <td style="min-width: 90px" colspan="4">6月</td>
  166 + <td style="min-width: 90px" colspan="4">7月</td>
  167 + <td style="min-width: 90px" colspan="4">8月</td>
  168 + <td style="min-width: 90px" colspan="4">9月</td>
  169 + <td style="min-width: 90px" colspan="4">10月</td>
  170 + <td style="min-width: 90px" colspan="4">11月</td>
  171 + <td style="min-width: 90px" colspan="4">12月</td>
159 <td style="min-width: 90px" rowspan="2">合计</td> 172 <td style="min-width: 90px" rowspan="2">合计</td>
160 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td> 173 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td>
161 <td style="min-width: 90px" rowspan="2">预算差异</td> 174 <td style="min-width: 90px" rowspan="2">预算差异</td>
  175 + <td style="min-width: 90px" rowspan="2">相比去年差异</td>
162 </tr> 176 </tr>
163 <tr> 177 <tr>
164 <td style="min-width: 80px">实际</td> 178 <td style="min-width: 80px">实际</td>
165 <td style="min-width: 80px">预算</td> 179 <td style="min-width: 80px">预算</td>
166 <td style="min-width: 80px">完成率</td> 180 <td style="min-width: 80px">完成率</td>
  181 + <td style="min-width: 80px">相比去年差异</td>
167 <td style="min-width: 80px">实际</td> 182 <td style="min-width: 80px">实际</td>
168 <td style="min-width: 80px">预算</td> 183 <td style="min-width: 80px">预算</td>
169 <td style="min-width: 80px">完成率</td> 184 <td style="min-width: 80px">完成率</td>
  185 + <td style="min-width: 80px">相比去年差异</td>
170 <td style="min-width: 80px">实际</td> 186 <td style="min-width: 80px">实际</td>
171 <td style="min-width: 80px">预算</td> 187 <td style="min-width: 80px">预算</td>
172 <td style="min-width: 80px">完成率</td> 188 <td style="min-width: 80px">完成率</td>
  189 + <td style="min-width: 80px">相比去年差异</td>
173 <td style="min-width: 80px">实际</td> 190 <td style="min-width: 80px">实际</td>
174 <td style="min-width: 80px">预算</td> 191 <td style="min-width: 80px">预算</td>
175 <td style="min-width: 80px">完成率</td> 192 <td style="min-width: 80px">完成率</td>
  193 + <td style="min-width: 80px">相比去年差异</td>
176 <td style="min-width: 80px">实际</td> 194 <td style="min-width: 80px">实际</td>
177 <td style="min-width: 80px">预算</td> 195 <td style="min-width: 80px">预算</td>
178 <td style="min-width: 80px">完成率</td> 196 <td style="min-width: 80px">完成率</td>
  197 + <td style="min-width: 80px">相比去年差异</td>
179 <td style="min-width: 80px">实际</td> 198 <td style="min-width: 80px">实际</td>
180 <td style="min-width: 80px">预算</td> 199 <td style="min-width: 80px">预算</td>
181 <td style="min-width: 80px">完成率</td> 200 <td style="min-width: 80px">完成率</td>
  201 + <td style="min-width: 80px">相比去年差异</td>
182 <td style="min-width: 80px">实际</td> 202 <td style="min-width: 80px">实际</td>
183 <td style="min-width: 80px">预算</td> 203 <td style="min-width: 80px">预算</td>
184 <td style="min-width: 80px">完成率</td> 204 <td style="min-width: 80px">完成率</td>
  205 + <td style="min-width: 80px">相比去年差异</td>
185 <td style="min-width: 80px">实际</td> 206 <td style="min-width: 80px">实际</td>
186 <td style="min-width: 80px">预算</td> 207 <td style="min-width: 80px">预算</td>
187 <td style="min-width: 80px">完成率</td> 208 <td style="min-width: 80px">完成率</td>
  209 + <td style="min-width: 80px">相比去年差异</td>
188 <td style="min-width: 80px">实际</td> 210 <td style="min-width: 80px">实际</td>
189 <td style="min-width: 80px">预算</td> 211 <td style="min-width: 80px">预算</td>
190 <td style="min-width: 80px">完成率</td> 212 <td style="min-width: 80px">完成率</td>
  213 + <td style="min-width: 80px">相比去年差异</td>
191 <td style="min-width: 80px">实际</td> 214 <td style="min-width: 80px">实际</td>
192 <td style="min-width: 80px">预算</td> 215 <td style="min-width: 80px">预算</td>
193 <td style="min-width: 80px">完成率</td> 216 <td style="min-width: 80px">完成率</td>
  217 + <td style="min-width: 80px">相比去年差异</td>
194 <td style="min-width: 80px">实际</td> 218 <td style="min-width: 80px">实际</td>
195 <td style="min-width: 80px">预算</td> 219 <td style="min-width: 80px">预算</td>
196 <td style="min-width: 80px">完成率</td> 220 <td style="min-width: 80px">完成率</td>
  221 + <td style="min-width: 80px">相比去年差异</td>
197 <td style="min-width: 80px">实际</td> 222 <td style="min-width: 80px">实际</td>
198 <td style="min-width: 80px">预算</td> 223 <td style="min-width: 80px">预算</td>
199 <td style="min-width: 80px">完成率</td> 224 <td style="min-width: 80px">完成率</td>
  225 + <td style="min-width: 80px">相比去年差异</td>
200 </tr> 226 </tr>
201 </thead> 227 </thead>
202 <tbody class="budget_person_dataList" id="datas"> 228 <tbody class="budget_person_dataList" id="datas">
@@ -206,7 +232,6 @@ @@ -206,7 +232,6 @@
206 </div> 232 </div>
207 </div> 233 </div>
208 </div> 234 </div>
209 -</div>  
210 235
211 <script> 236 <script>
212 $(function(){ 237 $(function(){
@@ -335,47 +360,60 @@ @@ -335,47 +360,60 @@
335 <td>{{obj.mon1}}</td> 360 <td>{{obj.mon1}}</td>
336 <td>{{obj.bud1}}</td> 361 <td>{{obj.bud1}}</td>
337 <td>{{obj.com1}}</td> 362 <td>{{obj.com1}}</td>
  363 + <td>{{obj.sub1}}</td>
338 <td>{{obj.mon2}}</td> 364 <td>{{obj.mon2}}</td>
339 <td>{{obj.bud2}}</td> 365 <td>{{obj.bud2}}</td>
340 <td>{{obj.com2}}</td> 366 <td>{{obj.com2}}</td>
  367 + <td>{{obj.sub2}}</td>
341 <td>{{obj.mon3}}</td> 368 <td>{{obj.mon3}}</td>
342 <td>{{obj.bud3}}</td> 369 <td>{{obj.bud3}}</td>
343 <td>{{obj.com3}}</td> 370 <td>{{obj.com3}}</td>
  371 + <td>{{obj.sub3}}</td>
344 <td>{{obj.mon4}}</td> 372 <td>{{obj.mon4}}</td>
345 <td>{{obj.bud4}}</td> 373 <td>{{obj.bud4}}</td>
346 <td>{{obj.com4}}</td> 374 <td>{{obj.com4}}</td>
  375 + <td>{{obj.sub4}}</td>
347 <td>{{obj.mon5}}</td> 376 <td>{{obj.mon5}}</td>
348 <td>{{obj.bud5}}</td> 377 <td>{{obj.bud5}}</td>
349 <td>{{obj.com5}}</td> 378 <td>{{obj.com5}}</td>
  379 + <td>{{obj.sub5}}</td>
350 <td>{{obj.mon6}}</td> 380 <td>{{obj.mon6}}</td>
351 <td>{{obj.bud6}}</td> 381 <td>{{obj.bud6}}</td>
352 <td>{{obj.com6}}</td> 382 <td>{{obj.com6}}</td>
  383 + <td>{{obj.sub6}}</td>
353 <td>{{obj.mon7}}</td> 384 <td>{{obj.mon7}}</td>
354 <td>{{obj.bud7}}</td> 385 <td>{{obj.bud7}}</td>
355 <td>{{obj.com7}}</td> 386 <td>{{obj.com7}}</td>
  387 + <td>{{obj.sub7}}</td>
356 <td>{{obj.mon8}}</td> 388 <td>{{obj.mon8}}</td>
357 <td>{{obj.bud8}}</td> 389 <td>{{obj.bud8}}</td>
358 <td>{{obj.com8}}</td> 390 <td>{{obj.com8}}</td>
  391 + <td>{{obj.sub8}}</td>
359 <td>{{obj.mon9}}</td> 392 <td>{{obj.mon9}}</td>
360 <td>{{obj.bud9}}</td> 393 <td>{{obj.bud9}}</td>
361 <td>{{obj.com9}}</td> 394 <td>{{obj.com9}}</td>
  395 + <td>{{obj.sub9}}</td>
362 <td>{{obj.mon10}}</td> 396 <td>{{obj.mon10}}</td>
363 <td>{{obj.bud10}}</td> 397 <td>{{obj.bud10}}</td>
364 <td>{{obj.com10}}</td> 398 <td>{{obj.com10}}</td>
  399 + <td>{{obj.sub10}}</td>
365 <td>{{obj.mon11}}</td> 400 <td>{{obj.mon11}}</td>
366 <td>{{obj.bud11}}</td> 401 <td>{{obj.bud11}}</td>
367 <td>{{obj.com11}}</td> 402 <td>{{obj.com11}}</td>
  403 + <td>{{obj.sub11}}</td>
368 <td>{{obj.mon12}}</td> 404 <td>{{obj.mon12}}</td>
369 <td>{{obj.bud12}}</td> 405 <td>{{obj.bud12}}</td>
370 <td>{{obj.com12}}</td> 406 <td>{{obj.com12}}</td>
  407 + <td>{{obj.sub12}}</td>
371 <td>{{obj.monAll}}</td> 408 <td>{{obj.monAll}}</td>
372 <td>{{obj.complete}}</td> 409 <td>{{obj.complete}}</td>
373 <td>{{obj.diff}}</td> 410 <td>{{obj.diff}}</td>
  411 + <td>{{obj.subAll}}</td>
374 </tr> 412 </tr>
375 {{/each}} 413 {{/each}}
376 {{if list.length == 0}} 414 {{if list.length == 0}}
377 <tr> 415 <tr>
378 - <td colspan="54"><h6 class="muted">没有找到相关数据</h6></td> 416 + <td colspan="58"><h6 class="muted">没有找到相关数据</h6></td>
379 </tr> 417 </tr>
380 {{/if}} 418 {{/if}}
381 </script> 419 </script>
@@ -390,47 +428,60 @@ @@ -390,47 +428,60 @@
390 <td>{{obj.mon1}}</td> 428 <td>{{obj.mon1}}</td>
391 <td>{{obj.bud1}}</td> 429 <td>{{obj.bud1}}</td>
392 <td>{{obj.com1}}</td> 430 <td>{{obj.com1}}</td>
  431 + <td>{{obj.sub1}}</td>
393 <td>{{obj.mon2}}</td> 432 <td>{{obj.mon2}}</td>
394 <td>{{obj.bud2}}</td> 433 <td>{{obj.bud2}}</td>
395 <td>{{obj.com2}}</td> 434 <td>{{obj.com2}}</td>
  435 + <td>{{obj.sub2}}</td>
396 <td>{{obj.mon3}}</td> 436 <td>{{obj.mon3}}</td>
397 <td>{{obj.bud3}}</td> 437 <td>{{obj.bud3}}</td>
398 <td>{{obj.com3}}</td> 438 <td>{{obj.com3}}</td>
  439 + <td>{{obj.sub3}}</td>
399 <td>{{obj.mon4}}</td> 440 <td>{{obj.mon4}}</td>
400 <td>{{obj.bud4}}</td> 441 <td>{{obj.bud4}}</td>
401 <td>{{obj.com4}}</td> 442 <td>{{obj.com4}}</td>
  443 + <td>{{obj.sub4}}</td>
402 <td>{{obj.mon5}}</td> 444 <td>{{obj.mon5}}</td>
403 <td>{{obj.bud5}}</td> 445 <td>{{obj.bud5}}</td>
404 <td>{{obj.com5}}</td> 446 <td>{{obj.com5}}</td>
  447 + <td>{{obj.sub5}}</td>
405 <td>{{obj.mon6}}</td> 448 <td>{{obj.mon6}}</td>
406 <td>{{obj.bud6}}</td> 449 <td>{{obj.bud6}}</td>
407 <td>{{obj.com6}}</td> 450 <td>{{obj.com6}}</td>
  451 + <td>{{obj.sub6}}</td>
408 <td>{{obj.mon7}}</td> 452 <td>{{obj.mon7}}</td>
409 <td>{{obj.bud7}}</td> 453 <td>{{obj.bud7}}</td>
410 <td>{{obj.com7}}</td> 454 <td>{{obj.com7}}</td>
  455 + <td>{{obj.sub7}}</td>
411 <td>{{obj.mon8}}</td> 456 <td>{{obj.mon8}}</td>
412 <td>{{obj.bud8}}</td> 457 <td>{{obj.bud8}}</td>
413 <td>{{obj.com8}}</td> 458 <td>{{obj.com8}}</td>
  459 + <td>{{obj.sub8}}</td>
414 <td>{{obj.mon9}}</td> 460 <td>{{obj.mon9}}</td>
415 <td>{{obj.bud9}}</td> 461 <td>{{obj.bud9}}</td>
416 <td>{{obj.com9}}</td> 462 <td>{{obj.com9}}</td>
  463 + <td>{{obj.sub9}}</td>
417 <td>{{obj.mon10}}</td> 464 <td>{{obj.mon10}}</td>
418 <td>{{obj.bud10}}</td> 465 <td>{{obj.bud10}}</td>
419 <td>{{obj.com10}}</td> 466 <td>{{obj.com10}}</td>
  467 + <td>{{obj.sub10}}</td>
420 <td>{{obj.mon11}}</td> 468 <td>{{obj.mon11}}</td>
421 <td>{{obj.bud11}}</td> 469 <td>{{obj.bud11}}</td>
422 <td>{{obj.com11}}</td> 470 <td>{{obj.com11}}</td>
  471 + <td>{{obj.sub11}}</td>
423 <td>{{obj.mon12}}</td> 472 <td>{{obj.mon12}}</td>
424 <td>{{obj.bud12}}</td> 473 <td>{{obj.bud12}}</td>
425 <td>{{obj.com12}}</td> 474 <td>{{obj.com12}}</td>
  475 + <td>{{obj.sub12}}</td>
426 <td>{{obj.monAll}}</td> 476 <td>{{obj.monAll}}</td>
427 <td>{{obj.complete}}</td> 477 <td>{{obj.complete}}</td>
428 <td>{{obj.diff}}</td> 478 <td>{{obj.diff}}</td>
  479 + <td>{{obj.subAll}}</td>
429 </tr> 480 </tr>
430 {{/each}} 481 {{/each}}
431 {{if list.length == 0}} 482 {{if list.length == 0}}
432 <tr> 483 <tr>
433 - <td colspan="54"><h6 class="muted">没有找到相关数据</h6></td> 484 + <td colspan="58"><h6 class="muted">没有找到相关数据</h6></td>
434 </tr> 485 </tr>
435 {{/if}} 486 {{/if}}
436 </script> 487 </script>
437 \ No newline at end of file 488 \ No newline at end of file
src/main/resources/static/pages/forms/budget/budgetSum.html
@@ -63,7 +63,7 @@ @@ -63,7 +63,7 @@
63 <table class="table table-bordered table-hover table-checkable" id="forms"> 63 <table class="table table-bordered table-hover table-checkable" id="forms">
64 <thead style="text-align: center;"> 64 <thead style="text-align: center;">
65 <tr> 65 <tr>
66 - <th colspan="54"><label id="datetodate"></label> 预算汇总表</th> 66 + <th colspan="57"><label id="datetodate"></label> 预算汇总表</th>
67 </tr> 67 </tr>
68 <tr> 68 <tr>
69 <td style="min-width: 73px" rowspan="2">公司</td> 69 <td style="min-width: 73px" rowspan="2">公司</td>
@@ -71,59 +71,72 @@ @@ -71,59 +71,72 @@
71 <td style="min-width: 90px" rowspan="2">预算</td> 71 <td style="min-width: 90px" rowspan="2">预算</td>
72 <td style="min-width: 90px" rowspan="2">预算调整</td> 72 <td style="min-width: 90px" rowspan="2">预算调整</td>
73 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td> 73 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td>
74 - <td style="min-width: 90px" colspan="3">1月</td>  
75 - <td style="min-width: 90px" colspan="3">2月</td>  
76 - <td style="min-width: 90px" colspan="3">3月</td>  
77 - <td style="min-width: 90px" colspan="3">4月</td>  
78 - <td style="min-width: 90px" colspan="3">5月</td>  
79 - <td style="min-width: 90px" colspan="3">6月</td>  
80 - <td style="min-width: 90px" colspan="3">7月</td>  
81 - <td style="min-width: 90px" colspan="3">8月</td>  
82 - <td style="min-width: 90px" colspan="3">9月</td>  
83 - <td style="min-width: 90px" colspan="3">10月</td>  
84 - <td style="min-width: 90px" colspan="3">11月</td>  
85 - <td style="min-width: 90px" colspan="3">12月</td> 74 + <td style="min-width: 90px" colspan="4">1月</td>
  75 + <td style="min-width: 90px" colspan="4">2月</td>
  76 + <td style="min-width: 90px" colspan="4">3月</td>
  77 + <td style="min-width: 90px" colspan="4">4月</td>
  78 + <td style="min-width: 90px" colspan="4">5月</td>
  79 + <td style="min-width: 90px" colspan="4">6月</td>
  80 + <td style="min-width: 90px" colspan="4">7月</td>
  81 + <td style="min-width: 90px" colspan="4">8月</td>
  82 + <td style="min-width: 90px" colspan="4">9月</td>
  83 + <td style="min-width: 90px" colspan="4">10月</td>
  84 + <td style="min-width: 90px" colspan="4">11月</td>
  85 + <td style="min-width: 90px" colspan="4">12月</td>
86 <td style="min-width: 90px" rowspan="2">合计</td> 86 <td style="min-width: 90px" rowspan="2">合计</td>
87 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td> 87 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td>
88 <td style="min-width: 90px" rowspan="2">预算差异</td> 88 <td style="min-width: 90px" rowspan="2">预算差异</td>
  89 + <td style="min-width: 90px" rowspan="2">相比去年差异</td>
89 </tr> 90 </tr>
90 <tr> 91 <tr>
91 <td style="min-width: 80px">实际</td> 92 <td style="min-width: 80px">实际</td>
92 <td style="min-width: 80px">预算</td> 93 <td style="min-width: 80px">预算</td>
93 <td style="min-width: 80px">完成率</td> 94 <td style="min-width: 80px">完成率</td>
  95 + <td style="min-width: 80px">相比去年差异</td>
94 <td style="min-width: 80px">实际</td> 96 <td style="min-width: 80px">实际</td>
95 <td style="min-width: 80px">预算</td> 97 <td style="min-width: 80px">预算</td>
96 <td style="min-width: 80px">完成率</td> 98 <td style="min-width: 80px">完成率</td>
  99 + <td style="min-width: 80px">相比去年差异</td>
97 <td style="min-width: 80px">实际</td> 100 <td style="min-width: 80px">实际</td>
98 <td style="min-width: 80px">预算</td> 101 <td style="min-width: 80px">预算</td>
99 <td style="min-width: 80px">完成率</td> 102 <td style="min-width: 80px">完成率</td>
  103 + <td style="min-width: 80px">相比去年差异</td>
100 <td style="min-width: 80px">实际</td> 104 <td style="min-width: 80px">实际</td>
101 <td style="min-width: 80px">预算</td> 105 <td style="min-width: 80px">预算</td>
102 <td style="min-width: 80px">完成率</td> 106 <td style="min-width: 80px">完成率</td>
  107 + <td style="min-width: 80px">相比去年差异</td>
103 <td style="min-width: 80px">实际</td> 108 <td style="min-width: 80px">实际</td>
104 <td style="min-width: 80px">预算</td> 109 <td style="min-width: 80px">预算</td>
105 <td style="min-width: 80px">完成率</td> 110 <td style="min-width: 80px">完成率</td>
  111 + <td style="min-width: 80px">相比去年差异</td>
106 <td style="min-width: 80px">实际</td> 112 <td style="min-width: 80px">实际</td>
107 <td style="min-width: 80px">预算</td> 113 <td style="min-width: 80px">预算</td>
108 <td style="min-width: 80px">完成率</td> 114 <td style="min-width: 80px">完成率</td>
  115 + <td style="min-width: 80px">相比去年差异</td>
109 <td style="min-width: 80px">实际</td> 116 <td style="min-width: 80px">实际</td>
110 <td style="min-width: 80px">预算</td> 117 <td style="min-width: 80px">预算</td>
111 <td style="min-width: 80px">完成率</td> 118 <td style="min-width: 80px">完成率</td>
  119 + <td style="min-width: 80px">相比去年差异</td>
112 <td style="min-width: 80px">实际</td> 120 <td style="min-width: 80px">实际</td>
113 <td style="min-width: 80px">预算</td> 121 <td style="min-width: 80px">预算</td>
114 <td style="min-width: 80px">完成率</td> 122 <td style="min-width: 80px">完成率</td>
  123 + <td style="min-width: 80px">相比去年差异</td>
115 <td style="min-width: 80px">实际</td> 124 <td style="min-width: 80px">实际</td>
116 <td style="min-width: 80px">预算</td> 125 <td style="min-width: 80px">预算</td>
117 <td style="min-width: 80px">完成率</td> 126 <td style="min-width: 80px">完成率</td>
  127 + <td style="min-width: 80px">相比去年差异</td>
118 <td style="min-width: 80px">实际</td> 128 <td style="min-width: 80px">实际</td>
119 <td style="min-width: 80px">预算</td> 129 <td style="min-width: 80px">预算</td>
120 <td style="min-width: 80px">完成率</td> 130 <td style="min-width: 80px">完成率</td>
  131 + <td style="min-width: 80px">相比去年差异</td>
121 <td style="min-width: 80px">实际</td> 132 <td style="min-width: 80px">实际</td>
122 <td style="min-width: 80px">预算</td> 133 <td style="min-width: 80px">预算</td>
123 <td style="min-width: 80px">完成率</td> 134 <td style="min-width: 80px">完成率</td>
  135 + <td style="min-width: 80px">相比去年差异</td>
124 <td style="min-width: 80px">实际</td> 136 <td style="min-width: 80px">实际</td>
125 <td style="min-width: 80px">预算</td> 137 <td style="min-width: 80px">预算</td>
126 <td style="min-width: 80px">完成率</td> 138 <td style="min-width: 80px">完成率</td>
  139 + <td style="min-width: 80px">相比去年差异</td>
127 </tr> 140 </tr>
128 </thead> 141 </thead>
129 <tbody class="budget_sum"> 142 <tbody class="budget_sum">
@@ -152,59 +165,72 @@ @@ -152,59 +165,72 @@
152 <td style="min-width: 90px" rowspan="2">预算</td> 165 <td style="min-width: 90px" rowspan="2">预算</td>
153 <td style="min-width: 90px" rowspan="2">预算调整</td> 166 <td style="min-width: 90px" rowspan="2">预算调整</td>
154 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td> 167 <td style="min-width: 90px" rowspan="2">预算</br>正式稿</td>
155 - <td style="min-width: 90px" colspan="3">1月</td>  
156 - <td style="min-width: 90px" colspan="3">2月</td>  
157 - <td style="min-width: 90px" colspan="3">3月</td>  
158 - <td style="min-width: 90px" colspan="3">4月</td>  
159 - <td style="min-width: 90px" colspan="3">5月</td>  
160 - <td style="min-width: 90px" colspan="3">6月</td>  
161 - <td style="min-width: 90px" colspan="3">7月</td>  
162 - <td style="min-width: 90px" colspan="3">8月</td>  
163 - <td style="min-width: 90px" colspan="3">9月</td>  
164 - <td style="min-width: 90px" colspan="3">10月</td>  
165 - <td style="min-width: 90px" colspan="3">11月</td>  
166 - <td style="min-width: 90px" colspan="3">12月</td> 168 + <td style="min-width: 90px" colspan="4">1月</td>
  169 + <td style="min-width: 90px" colspan="4">2月</td>
  170 + <td style="min-width: 90px" colspan="4">3月</td>
  171 + <td style="min-width: 90px" colspan="4">4月</td>
  172 + <td style="min-width: 90px" colspan="4">5月</td>
  173 + <td style="min-width: 90px" colspan="4">6月</td>
  174 + <td style="min-width: 90px" colspan="4">7月</td>
  175 + <td style="min-width: 90px" colspan="4">8月</td>
  176 + <td style="min-width: 90px" colspan="4">9月</td>
  177 + <td style="min-width: 90px" colspan="4">10月</td>
  178 + <td style="min-width: 90px" colspan="4">11月</td>
  179 + <td style="min-width: 90px" colspan="4">12月</td>
167 <td style="min-width: 90px" rowspan="2">合计</td> 180 <td style="min-width: 90px" rowspan="2">合计</td>
168 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td> 181 <td style="min-width: 90px" rowspan="2">预算</br>完成率</td>
169 <td style="min-width: 90px" rowspan="2">预算差异</td> 182 <td style="min-width: 90px" rowspan="2">预算差异</td>
  183 + <td style="min-width: 90px" rowspan="2">相比去年差异</td>
170 </tr> 184 </tr>
171 <tr> 185 <tr>
172 <td style="min-width: 80px">实际</td> 186 <td style="min-width: 80px">实际</td>
173 <td style="min-width: 80px">预算</td> 187 <td style="min-width: 80px">预算</td>
174 <td style="min-width: 80px">完成率</td> 188 <td style="min-width: 80px">完成率</td>
  189 + <td style="min-width: 80px">相比去年差异</td>
175 <td style="min-width: 80px">实际</td> 190 <td style="min-width: 80px">实际</td>
176 <td style="min-width: 80px">预算</td> 191 <td style="min-width: 80px">预算</td>
177 <td style="min-width: 80px">完成率</td> 192 <td style="min-width: 80px">完成率</td>
  193 + <td style="min-width: 80px">相比去年差异</td>
178 <td style="min-width: 80px">实际</td> 194 <td style="min-width: 80px">实际</td>
179 <td style="min-width: 80px">预算</td> 195 <td style="min-width: 80px">预算</td>
180 <td style="min-width: 80px">完成率</td> 196 <td style="min-width: 80px">完成率</td>
  197 + <td style="min-width: 80px">相比去年差异</td>
181 <td style="min-width: 80px">实际</td> 198 <td style="min-width: 80px">实际</td>
182 <td style="min-width: 80px">预算</td> 199 <td style="min-width: 80px">预算</td>
183 <td style="min-width: 80px">完成率</td> 200 <td style="min-width: 80px">完成率</td>
  201 + <td style="min-width: 80px">相比去年差异</td>
184 <td style="min-width: 80px">实际</td> 202 <td style="min-width: 80px">实际</td>
185 <td style="min-width: 80px">预算</td> 203 <td style="min-width: 80px">预算</td>
186 <td style="min-width: 80px">完成率</td> 204 <td style="min-width: 80px">完成率</td>
  205 + <td style="min-width: 80px">相比去年差异</td>
187 <td style="min-width: 80px">实际</td> 206 <td style="min-width: 80px">实际</td>
188 <td style="min-width: 80px">预算</td> 207 <td style="min-width: 80px">预算</td>
189 <td style="min-width: 80px">完成率</td> 208 <td style="min-width: 80px">完成率</td>
  209 + <td style="min-width: 80px">相比去年差异</td>
190 <td style="min-width: 80px">实际</td> 210 <td style="min-width: 80px">实际</td>
191 <td style="min-width: 80px">预算</td> 211 <td style="min-width: 80px">预算</td>
192 <td style="min-width: 80px">完成率</td> 212 <td style="min-width: 80px">完成率</td>
  213 + <td style="min-width: 80px">相比去年差异</td>
193 <td style="min-width: 80px">实际</td> 214 <td style="min-width: 80px">实际</td>
194 <td style="min-width: 80px">预算</td> 215 <td style="min-width: 80px">预算</td>
195 <td style="min-width: 80px">完成率</td> 216 <td style="min-width: 80px">完成率</td>
  217 + <td style="min-width: 80px">相比去年差异</td>
196 <td style="min-width: 80px">实际</td> 218 <td style="min-width: 80px">实际</td>
197 <td style="min-width: 80px">预算</td> 219 <td style="min-width: 80px">预算</td>
198 <td style="min-width: 80px">完成率</td> 220 <td style="min-width: 80px">完成率</td>
  221 + <td style="min-width: 80px">相比去年差异</td>
199 <td style="min-width: 80px">实际</td> 222 <td style="min-width: 80px">实际</td>
200 <td style="min-width: 80px">预算</td> 223 <td style="min-width: 80px">预算</td>
201 <td style="min-width: 80px">完成率</td> 224 <td style="min-width: 80px">完成率</td>
  225 + <td style="min-width: 80px">相比去年差异</td>
202 <td style="min-width: 80px">实际</td> 226 <td style="min-width: 80px">实际</td>
203 <td style="min-width: 80px">预算</td> 227 <td style="min-width: 80px">预算</td>
204 <td style="min-width: 80px">完成率</td> 228 <td style="min-width: 80px">完成率</td>
  229 + <td style="min-width: 80px">相比去年差异</td>
205 <td style="min-width: 80px">实际</td> 230 <td style="min-width: 80px">实际</td>
206 <td style="min-width: 80px">预算</td> 231 <td style="min-width: 80px">预算</td>
207 <td style="min-width: 80px">完成率</td> 232 <td style="min-width: 80px">完成率</td>
  233 + <td style="min-width: 80px">相比去年差异</td>
208 </tr> 234 </tr>
209 </thead> 235 </thead>
210 <tbody class="budget_sum_dataList" id="datas"> 236 <tbody class="budget_sum_dataList" id="datas">
@@ -339,47 +365,60 @@ @@ -339,47 +365,60 @@
339 <td>{{obj.mon1}}</td> 365 <td>{{obj.mon1}}</td>
340 <td>{{obj.bud1}}</td> 366 <td>{{obj.bud1}}</td>
341 <td>{{obj.com1}}</td> 367 <td>{{obj.com1}}</td>
  368 + <td>{{obj.sub1}}</td>
342 <td>{{obj.mon2}}</td> 369 <td>{{obj.mon2}}</td>
343 <td>{{obj.bud2}}</td> 370 <td>{{obj.bud2}}</td>
344 <td>{{obj.com2}}</td> 371 <td>{{obj.com2}}</td>
  372 + <td>{{obj.sub2}}</td>
345 <td>{{obj.mon3}}</td> 373 <td>{{obj.mon3}}</td>
346 <td>{{obj.bud3}}</td> 374 <td>{{obj.bud3}}</td>
347 <td>{{obj.com3}}</td> 375 <td>{{obj.com3}}</td>
  376 + <td>{{obj.sub3}}</td>
348 <td>{{obj.mon4}}</td> 377 <td>{{obj.mon4}}</td>
349 <td>{{obj.bud4}}</td> 378 <td>{{obj.bud4}}</td>
350 <td>{{obj.com4}}</td> 379 <td>{{obj.com4}}</td>
  380 + <td>{{obj.sub4}}</td>
351 <td>{{obj.mon5}}</td> 381 <td>{{obj.mon5}}</td>
352 <td>{{obj.bud5}}</td> 382 <td>{{obj.bud5}}</td>
353 <td>{{obj.com5}}</td> 383 <td>{{obj.com5}}</td>
  384 + <td>{{obj.sub5}}</td>
354 <td>{{obj.mon6}}</td> 385 <td>{{obj.mon6}}</td>
355 <td>{{obj.bud6}}</td> 386 <td>{{obj.bud6}}</td>
356 <td>{{obj.com6}}</td> 387 <td>{{obj.com6}}</td>
  388 + <td>{{obj.sub6}}</td>
357 <td>{{obj.mon7}}</td> 389 <td>{{obj.mon7}}</td>
358 <td>{{obj.bud7}}</td> 390 <td>{{obj.bud7}}</td>
359 <td>{{obj.com7}}</td> 391 <td>{{obj.com7}}</td>
  392 + <td>{{obj.sub7}}</td>
360 <td>{{obj.mon8}}</td> 393 <td>{{obj.mon8}}</td>
361 <td>{{obj.bud8}}</td> 394 <td>{{obj.bud8}}</td>
362 <td>{{obj.com8}}</td> 395 <td>{{obj.com8}}</td>
  396 + <td>{{obj.sub8}}</td>
363 <td>{{obj.mon9}}</td> 397 <td>{{obj.mon9}}</td>
364 <td>{{obj.bud9}}</td> 398 <td>{{obj.bud9}}</td>
365 <td>{{obj.com9}}</td> 399 <td>{{obj.com9}}</td>
  400 + <td>{{obj.sub9}}</td>
366 <td>{{obj.mon10}}</td> 401 <td>{{obj.mon10}}</td>
367 <td>{{obj.bud10}}</td> 402 <td>{{obj.bud10}}</td>
368 <td>{{obj.com10}}</td> 403 <td>{{obj.com10}}</td>
  404 + <td>{{obj.sub10}}</td>
369 <td>{{obj.mon11}}</td> 405 <td>{{obj.mon11}}</td>
370 <td>{{obj.bud11}}</td> 406 <td>{{obj.bud11}}</td>
371 <td>{{obj.com11}}</td> 407 <td>{{obj.com11}}</td>
  408 + <td>{{obj.sub11}}</td>
372 <td>{{obj.mon12}}</td> 409 <td>{{obj.mon12}}</td>
373 <td>{{obj.bud12}}</td> 410 <td>{{obj.bud12}}</td>
374 <td>{{obj.com12}}</td> 411 <td>{{obj.com12}}</td>
  412 + <td>{{obj.sub12}}</td>
375 <td>{{obj.monAll}}</td> 413 <td>{{obj.monAll}}</td>
376 <td>{{obj.complete}}</td> 414 <td>{{obj.complete}}</td>
377 <td>{{obj.diff}}</td> 415 <td>{{obj.diff}}</td>
  416 + <td>{{obj.subAll}}</td>
378 </tr> 417 </tr>
379 {{/each}} 418 {{/each}}
380 {{if list.length == 0}} 419 {{if list.length == 0}}
381 <tr> 420 <tr>
382 - <td colspan="54"><h6 class="muted">没有找到相关数据</h6></td> 421 + <td colspan="57"><h6 class="muted">没有找到相关数据</h6></td>
383 </tr> 422 </tr>
384 {{/if}} 423 {{/if}}
385 </script> 424 </script>
@@ -395,47 +434,60 @@ @@ -395,47 +434,60 @@
395 <td>{{obj.mon1}}</td> 434 <td>{{obj.mon1}}</td>
396 <td>{{obj.bud1}}</td> 435 <td>{{obj.bud1}}</td>
397 <td>{{obj.com1}}</td> 436 <td>{{obj.com1}}</td>
  437 + <td>{{obj.sub1}}</td>
398 <td>{{obj.mon2}}</td> 438 <td>{{obj.mon2}}</td>
399 <td>{{obj.bud2}}</td> 439 <td>{{obj.bud2}}</td>
400 <td>{{obj.com2}}</td> 440 <td>{{obj.com2}}</td>
  441 + <td>{{obj.sub2}}</td>
401 <td>{{obj.mon3}}</td> 442 <td>{{obj.mon3}}</td>
402 <td>{{obj.bud3}}</td> 443 <td>{{obj.bud3}}</td>
403 <td>{{obj.com3}}</td> 444 <td>{{obj.com3}}</td>
  445 + <td>{{obj.sub3}}</td>
404 <td>{{obj.mon4}}</td> 446 <td>{{obj.mon4}}</td>
405 <td>{{obj.bud4}}</td> 447 <td>{{obj.bud4}}</td>
406 <td>{{obj.com4}}</td> 448 <td>{{obj.com4}}</td>
  449 + <td>{{obj.sub4}}</td>
407 <td>{{obj.mon5}}</td> 450 <td>{{obj.mon5}}</td>
408 <td>{{obj.bud5}}</td> 451 <td>{{obj.bud5}}</td>
409 <td>{{obj.com5}}</td> 452 <td>{{obj.com5}}</td>
  453 + <td>{{obj.sub5}}</td>
410 <td>{{obj.mon6}}</td> 454 <td>{{obj.mon6}}</td>
411 <td>{{obj.bud6}}</td> 455 <td>{{obj.bud6}}</td>
412 <td>{{obj.com6}}</td> 456 <td>{{obj.com6}}</td>
  457 + <td>{{obj.sub6}}</td>
413 <td>{{obj.mon7}}</td> 458 <td>{{obj.mon7}}</td>
414 <td>{{obj.bud7}}</td> 459 <td>{{obj.bud7}}</td>
415 <td>{{obj.com7}}</td> 460 <td>{{obj.com7}}</td>
  461 + <td>{{obj.sub7}}</td>
416 <td>{{obj.mon8}}</td> 462 <td>{{obj.mon8}}</td>
417 <td>{{obj.bud8}}</td> 463 <td>{{obj.bud8}}</td>
418 <td>{{obj.com8}}</td> 464 <td>{{obj.com8}}</td>
  465 + <td>{{obj.sub8}}</td>
419 <td>{{obj.mon9}}</td> 466 <td>{{obj.mon9}}</td>
420 <td>{{obj.bud9}}</td> 467 <td>{{obj.bud9}}</td>
421 <td>{{obj.com9}}</td> 468 <td>{{obj.com9}}</td>
  469 + <td>{{obj.sub9}}</td>
422 <td>{{obj.mon10}}</td> 470 <td>{{obj.mon10}}</td>
423 <td>{{obj.bud10}}</td> 471 <td>{{obj.bud10}}</td>
424 <td>{{obj.com10}}</td> 472 <td>{{obj.com10}}</td>
  473 + <td>{{obj.sub10}}</td>
425 <td>{{obj.mon11}}</td> 474 <td>{{obj.mon11}}</td>
426 <td>{{obj.bud11}}</td> 475 <td>{{obj.bud11}}</td>
427 <td>{{obj.com11}}</td> 476 <td>{{obj.com11}}</td>
  477 + <td>{{obj.sub11}}</td>
428 <td>{{obj.mon12}}</td> 478 <td>{{obj.mon12}}</td>
429 <td>{{obj.bud12}}</td> 479 <td>{{obj.bud12}}</td>
430 <td>{{obj.com12}}</td> 480 <td>{{obj.com12}}</td>
  481 + <td>{{obj.sub12}}</td>
431 <td>{{obj.monAll}}</td> 482 <td>{{obj.monAll}}</td>
432 <td>{{obj.complete}}</td> 483 <td>{{obj.complete}}</td>
433 <td>{{obj.diff}}</td> 484 <td>{{obj.diff}}</td>
  485 + <td>{{obj.subAll}}</td>
434 </tr> 486 </tr>
435 {{/each}} 487 {{/each}}
436 {{if list.length == 0}} 488 {{if list.length == 0}}
437 <tr> 489 <tr>
438 - <td colspan="54"><h6 class="muted">没有找到相关数据</h6></td> 490 + <td colspan="57"><h6 class="muted">没有找到相关数据</h6></td>
439 </tr> 491 </tr>
440 {{/if}} 492 {{/if}}
441 </script> 493 </script>
442 \ No newline at end of file 494 \ No newline at end of file
src/main/resources/static/pages/forms/budget/timeAnaly.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 + .table > tbody + tbody {
  15 + border-top: 1px solid; }
  16 + .merge{
  17 + text-align:center;
  18 + vertical-align:middle;
  19 + }
  20 + #forms > thead > tr > th{
  21 + min-width: 80px;
  22 + }
  23 + #works > tbody > tr{
  24 + background-color: #FFFFFF;
  25 + }
  26 +</style>
  27 +
  28 +<div class="page-head">
  29 + <div class="page-title">
  30 + <h1>线路时刻表分析明细</h1>
  31 + </div>
  32 +</div>
  33 +
  34 +<div class="row">
  35 + <div class="col-md-12">
  36 + <div class="portlet light porttlet-fit bordered">
  37 + <div class="portlet-title">
  38 + <form id="history" class="form-inline" action="">
  39 + <div style="display: inline-block; margin-left: 28px;" id="company1">
  40 + <span class="item-label" style="width: 80px;">公司: </span>
  41 + <select class="form-control" name="company" id="company" style="width: 165px;"></select>
  42 + </div>
  43 + <div style="display: inline-block; margin-left: 21px;" id="subCompany1">
  44 + <span class="item-label" style="width: 80px;">分公司: </span>
  45 + <select class="form-control" name="subCompany" id="subCompany" style="width: 165px;"></select>
  46 + </div>
  47 + <div style="display: inline-block;margin-left: 28px;">
  48 + <span class="item-label" style="width: 80px;">日期: </span>
  49 + <input class="form-control" type="text" id="date" style="width: 165px;"/>
  50 + </div>
  51 + <div style="margin-top: 10px"></div>
  52 + <div style="display: inline-block; margin-left: 28px;">
  53 + <span class="item-label" style="width: 80px;">线路: </span>
  54 + <select class="form-control" name="line" id="line" style="width: 165px;"></select>
  55 + </div>
  56 + <div style="display: inline-block; margin-left: 7px">
  57 + <span class="item-label" style="width: 80px;">时刻类型: </span>
  58 + <select class="form-control" name="model" id="model" style="width: 165px;">
  59 + <option value="">请选择...</option>
  60 + </select>
  61 + </div>
  62 + <div class="form-group" style="margin-left: 17px">
  63 + <input class="btn btn-default" type="button" id="query" value="筛选"/>
  64 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  65 + </div>
  66 + </form>
  67 + </div>
  68 + <div class="portlet-body">
  69 + <label>单位:分钟</label>
  70 + <div class="row">
  71 + <div class="table-container" id="countLine" style="margin-top: 10px;overflow:auto;min-width: 906px">
  72 + <table class="table table-bordered table-hover table-checkable" id="forms">
  73 + <thead>
  74 + <tr class="hidden">
  75 + <th colspan="23"><label id="xlName"></label>线路时刻表分析明细</th>
  76 + </tr>
  77 + <tr class="hidden">
  78 + <th>公司</th>
  79 + <th>分公司</th>
  80 + <th>线路</th>
  81 + <th>班型</th>
  82 + <th>路牌</th>
  83 + <th>出场</th>
  84 + <th>上行起始站</th>
  85 + <th>上行终点站</th>
  86 + <th>下行起点站</th>
  87 + <th>下行终点站</th>
  88 + <th>进场</th>
  89 + <th>早高峰运送时间<br/>(6:31-8:30)</th>
  90 + <th>晚高峰运送时间<br/>(16:01-18:00)</th>
  91 + <th>低谷运送时间</th>
  92 + <th>平均运送时间</th>
  93 + <th>早高峰停站时间<br/>(6:31-8:30)</th>
  94 + <th>晚高峰停站时间<br/>(16:01-18:00)</th>
  95 + <th>低谷停站时间</th>
  96 + <th>平均停站时间</th>
  97 + <th>空驶班次/空驶里程</th>
  98 + <th>运营班次/运营里程</th>
  99 + <th>营运工时<br/>(小时.分钟)</th>
  100 + <th>总工时<br/>(小时.分钟)</th>
  101 + </tr>
  102 + </thead>
  103 + <tbody>
  104 +
  105 + </tbody>
  106 + </table>
  107 + </div>
  108 + <div style="text-align: right;">
  109 + <ul id="pagination" class="pagination"></ul>
  110 + </div>
  111 + </div>
  112 + </div>
  113 + </div>
  114 + </div>
  115 +</div>
  116 +
  117 +<script>
  118 + $(function(){
  119 +
  120 + // 关闭左侧栏
  121 + if (!$('body').hasClass('page-sidebar-closed'))
  122 + $('.menu-toggler.sidebar-toggler').click();
  123 +
  124 + $("#countLine").height($(window).height()-280);
  125 +
  126 + var d = new Date();
  127 + var year = d.getFullYear();
  128 + var month = d.getMonth() + 1;
  129 + var day = d.getDate();
  130 + if(month < 10)
  131 + month = "0" + month;
  132 + if(day < 10)
  133 + day = "0" + day;
  134 + var dateTime = year + "-" + month + "-" + day;
  135 + $("#date").datetimepicker({
  136 + format : 'YYYY-MM-DD',
  137 + locale : 'zh-cn',
  138 + maxDate : dateTime
  139 + });
  140 + $("#date").val(dateTime);
  141 +
  142 + var fage=false;
  143 + var xlList;
  144 + var obj = [];
  145 +
  146 + $.get('/report/lineList',function(result){
  147 + xlList=result;
  148 + $.get('/user/companyData', function(result){
  149 + obj = result;
  150 + var options = '';
  151 + for(var i = 0; i < obj.length; i++){
  152 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  153 + }
  154 +
  155 + if(obj.length ==0){
  156 + $("#company1").css('display','none');
  157 + }else if(obj.length ==1){
  158 + $("#company1").css('display','none');
  159 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  160 + $('#subCompany1').css('display','none');
  161 + }
  162 + $('#company').html(options);
  163 + updateCompany();
  164 + });
  165 + })
  166 + $("#company").on("change",updateCompany);
  167 + function updateCompany(){
  168 + var company = $('#company').val();
  169 + var options = '';
  170 + for(var i = 0; i < obj.length; i++){
  171 + if(obj[i].companyCode == company){
  172 + var children = obj[i].children;
  173 + for(var j = 0; j < children.length; j++){
  174 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  175 + }
  176 + }
  177 + }
  178 + $('#subCompany').html(options);
  179 + }
  180 +
  181 +
  182 +
  183 + var tempData = {};
  184 + $.get('/report/lineList',function(xlList){
  185 + var data = [];
  186 + $.get('/user/companyData', function(result){
  187 + for(var i = 0; i < result.length; i++){
  188 + var companyCode = result[i].companyCode;
  189 + var children = result[i].children;
  190 + for(var j = 0; j < children.length; j++){
  191 + var code = children[j].code;
  192 + for(var k=0;k < xlList.length;k++ ){
  193 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  194 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  195 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  196 + }
  197 + }
  198 + }
  199 + }
  200 + initPinYinSelect2('#line',data,'');
  201 + line = data[0].id;
  202 + updateModel();
  203 + });
  204 + });
  205 +
  206 + $("#line").on("change", function(){
  207 + if($("#line").val() == " "){
  208 + $("#company").attr("disabled", false);
  209 + $("#subCompany").attr("disabled", false);
  210 + } else {
  211 + var temp = tempData[$("#line").val()].split(":");
  212 + $("#company").val(temp[0]);
  213 + updateCompany();
  214 + $("#subCompany").val(temp[1]);
  215 + $("#company").attr("disabled", true);
  216 +// $("#subCompany").attr("disabled", true);
  217 + }
  218 + });
  219 +
  220 + $("#query").on("click", function (){
  221 + jsDoQuery();
  222 + });
  223 +
  224 + var line = $("#line").val();
  225 + var date = $("#date").val();
  226 + var model = $("#model").val();
  227 + var company = $("#company").val();
  228 + var subCompany = $("#subCompany").val();
  229 + function jsDoQuery(pagination){
  230 + $("#countLine").height($(window).height()-280);
  231 + if($("#date").val().trim().length == 0){
  232 + layer.msg("请选择日期");
  233 + return;
  234 + }
  235 + var params = {};
  236 + line = $("#line").val();
  237 + date = $("#date").val();
  238 + model = $("#model").val();
  239 + company = $("#company").val();
  240 + subCompany = $("#subCompany").val();
  241 + var lineName = $('#line option:selected').text();
  242 + params['line'] = line;
  243 + params['date'] = date;
  244 + params['model'] = model;
  245 + params['company'] = company;
  246 + params['subCompany'] = subCompany;
  247 + params['type'] = "query";
  248 + var i = layer.load(2);
  249 + $("#forms .hidden").removeClass("hidden");
  250 + $post('/budget/timeAnaly', params, function(result){
  251 + // 把数据填充到模版中
  252 + var tbodyHtml = template('time_analy',{data:result});
  253 + layer.close(i);
  254 +
  255 + // 把渲染好的模版html文本追加到表格中
  256 + $('#forms tbody').html(tbodyHtml);
  257 +
  258 + $("#xlName").html(lineName + "&nbsp;-&nbsp;");
  259 + });
  260 +
  261 + }
  262 +
  263 +
  264 + $("#export").on("click",function(){
  265 + if($("#date").val().trim().length == 0){
  266 + layer.msg("请选择日期");
  267 + return;
  268 + }
  269 + var params = {};
  270 + line = $("#line").val();
  271 + date = $("#date").val();
  272 + model = $("#model").val();
  273 + company = $("#company").val();
  274 + subCompany = $("#subCompany").val();
  275 + var lineName = $('#line option:selected').text();
  276 + params['line'] = line;
  277 + params['date'] = date;
  278 + params['model'] = model;
  279 + params['company'] = company;
  280 + params['subCompany'] = subCompany;
  281 + params['type'] = "export";
  282 + var i = layer.load(2);
  283 + $post('/budget/timeAnaly', params, function(result){
  284 + window.open("/downloadFile/download?fileName="
  285 + +date+"-"+lineName+"-线路时刻表分析明细");
  286 + layer.close(i);
  287 + });
  288 + });
  289 +
  290 + $("#line").on("change", function(){
  291 + line = $("#line").val();
  292 + if(line == " ")
  293 + line = "";
  294 + updateModel();
  295 + });
  296 +
  297 + $('#date').on("blur", function(){
  298 + date = $("#date").val();
  299 + updateModel();
  300 + });
  301 +
  302 + var flag = 0;
  303 + function updateModel(){
  304 + if(flag == 1)
  305 + return;
  306 + flag = 1;
  307 + var treeData = [];
  308 + var params = {};
  309 + params['line'] = line;
  310 + params['startDate'] = date;
  311 + params['endDate'] = date;
  312 + $get('/pcpc/getModel', params, function(result){
  313 + treeData = createTreeData(result);
  314 + var options = '<option value="">请选择...</option>';
  315 + $.each(treeData, function(i, g){
  316 + options += '<option value="'+g.id+'">'+g.name+'</option>';
  317 + });
  318 + $('#model').html(options)/* .select2() */;
  319 + flag = 0;
  320 + });
  321 + }
  322 +
  323 + /**
  324 + * 将模块List 转换为树结构
  325 + * @param arr
  326 + * @returns {Array}
  327 + */
  328 + function createTreeData(arr){
  329 + var treeData = [];
  330 + var len = arr.length;
  331 + for(var i = 0; i < len; i ++){
  332 + var pId = arr[i].pId;
  333 + arr[i].text = arr[i].name;
  334 + if(!pId){
  335 + treeData.push(arr[i]);
  336 + }
  337 +
  338 + for(var j = 0; j < len; j ++){
  339 + if(pId == arr[j].id){
  340 + if(!arr[j].children)
  341 + arr[j].children = [];
  342 + arr[j].children.push(arr[i]);
  343 + break;
  344 + }
  345 + }
  346 + }
  347 + return treeData;
  348 + }
  349 +
  350 + });
  351 +
  352 +</script>
  353 +<script type="text/html" id="time_analy">
  354 + {{each data.dataList as obj i}}
  355 + <tr>
  356 + <td>{{obj.gsName}}</td>
  357 + <td>{{obj.fgsName}}</td>
  358 + <td>{{obj.xlName}}</td>
  359 + <td>{{obj.bx}}</td>
  360 + <td>{{obj.lpName}}</td>
  361 + <td>{{obj.outStation}}</td>
  362 + <td>{{obj.qdzName0}}</td>
  363 + <td>{{obj.zdzName0}}</td>
  364 + <td>{{obj.qdzName1}}</td>
  365 + <td>{{obj.zdzName1}}</td>
  366 + <td>{{obj.inStation}}</td>
  367 + <td>{{obj.yssj_z}}</td>
  368 + <td>{{obj.yssj_w}}</td>
  369 + <td>{{obj.yssj_d}}</td>
  370 + <td>{{obj.yssj_average}}</td>
  371 + <td>{{obj.tzsj_z}}</td>
  372 + <td>{{obj.tzsj_w}}</td>
  373 + <td>{{obj.tzsj_d}}</td>
  374 + <td>{{obj.tzsj_average}}</td>
  375 + <td>{{obj.ksbc}}/{{obj.kslc}}</td>
  376 + <td>{{obj.yybc}}/{{obj.yylc}}</td>
  377 + <td>{{obj.yygs}}</td>
  378 + <td>{{obj.zgs}}</td>
  379 + </tr>
  380 + {{/each}}
  381 + <tr><td colspan="2">合计配档数</td><td colspan="21">{{data.ecNum}}</td></tr>
  382 + <tr><td colspan="2">合计配车数</td><td colspan="21">{{data.carNum}}</td></tr>
  383 + {{if data.dataList.length == 0}}
  384 + <tr>
  385 + <td colspan="23"><h6 class="muted">没有找到相关数据</h6></td>
  386 + </tr>
  387 + {{/if}}
  388 +</script>
src/main/resources/static/pages/forms/mould/budgetAmounts.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/budgetAmounts_data.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/budgetMileage.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/budgetMileage_data.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/budgetPerson.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/budgetPerson_data.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/budgetSum.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/budgetSum_data.xls
No preview for this file type
src/main/resources/static/pages/forms/mould/timeAnaly.xls 0 → 100644
No preview for this file type