Commit cb9a5767dc1e8703f236754ea9e20a8b6f5333cd

Authored by 娄高锋
1 parent 565ee8d1

配档驾驶员去重

src/main/java/com/bsth/server_rs/bigdata/BigscreenService.java
... ... @@ -656,9 +656,9 @@ public class BigscreenService {
656 656 attList.add(att);
657 657 }
658 658  
659   - String gpLineSql = "select p.company_code, count(1) jsy, sum(count) line"
660   - + " from (select e.jsy, e.xl, count(1) count from bsth_c_s_ecinfo e"
661   - + " where e.is_cancel = 0 group by e.jsy, e.xl ) a"
  659 + String gpLineSql = "select p.company_code, count(1) jsy"
  660 + + " from (select e.jsy from bsth_c_s_ecinfo e"
  661 + + " where e.is_cancel = 0 group by e.jsy) a"
662 662 + " left join bsth_c_personnel p on a.jsy = p.id"
663 663 + " group by p.company_code";
664 664 List<Map<String, Object>> ecList=jdbcTemplate.query(gpLineSql,
... ... @@ -668,7 +668,6 @@ public class BigscreenService {
668 668 Map<String, Object> m=new HashMap<String,Object>();
669 669 m.put("company", rs.getString("company_code"));
670 670 m.put("jsy", rs.getString("jsy"));
671   - m.put("line", rs.getString("line"));
672 671 return m;
673 672 }
674 673 });
... ... @@ -677,39 +676,31 @@ public class BigscreenService {
677 676 Map<String, Object> ygMap = new HashMap<String, Object>();
678 677 ygMap.put("company", "杨高");
679 678 ygMap.put("jsy", "0");
680   - ygMap.put("line", "0");
681 679 Map<String, Object> snMap = new HashMap<String, Object>();
682 680 snMap.put("company", "上南");
683 681 snMap.put("jsy", "0");
684   - snMap.put("line", "0");
685 682 Map<String, Object> jgMap = new HashMap<String, Object>();
686 683 jgMap.put("company", "金高");
687 684 jgMap.put("jsy", "0");
688   - jgMap.put("line", "0");
689 685 Map<String, Object> nhMap = new HashMap<String, Object>();
690 686 nhMap.put("company", "南汇");
691 687 nhMap.put("jsy", "0");
692   - nhMap.put("line", "0");
693 688 for(Map<String, Object> m : ecList){ //顺序:杨高,上南,金高,南汇
694 689 if("05".equals(m.get("company").toString())){
695 690 // m.put("company", "杨高");
696 691 ygMap.put("jsy", m.get("jsy").toString());
697   - ygMap.put("line", m.get("line").toString());
698 692 }
699 693 if("55".equals(m.get("company").toString())){
700 694 // m.put("company", "上南");
701 695 snMap.put("jsy", m.get("jsy").toString());
702   - snMap.put("line", m.get("line").toString());
703 696 }
704 697 if("22".equals(m.get("company").toString())){
705 698 // m.put("company", "金高");
706 699 jgMap.put("jsy", m.get("jsy").toString());
707   - jgMap.put("line", m.get("line").toString());
708 700 }
709 701 if("26".equals(m.get("company").toString())){
710 702 // m.put("company", "南汇");
711 703 nhMap.put("jsy", m.get("jsy").toString());
712   - nhMap.put("line", m.get("line").toString());
713 704 }
714 705 }
715 706 jsyList.add(ygMap);
... ...