Commit cb9a5767dc1e8703f236754ea9e20a8b6f5333cd
1 parent
565ee8d1
配档驾驶员去重
Showing
1 changed file
with
3 additions
and
12 deletions
src/main/java/com/bsth/server_rs/bigdata/BigscreenService.java
| @@ -656,9 +656,9 @@ public class BigscreenService { | @@ -656,9 +656,9 @@ public class BigscreenService { | ||
| 656 | attList.add(att); | 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 | + " left join bsth_c_personnel p on a.jsy = p.id" | 662 | + " left join bsth_c_personnel p on a.jsy = p.id" |
| 663 | + " group by p.company_code"; | 663 | + " group by p.company_code"; |
| 664 | List<Map<String, Object>> ecList=jdbcTemplate.query(gpLineSql, | 664 | List<Map<String, Object>> ecList=jdbcTemplate.query(gpLineSql, |
| @@ -668,7 +668,6 @@ public class BigscreenService { | @@ -668,7 +668,6 @@ public class BigscreenService { | ||
| 668 | Map<String, Object> m=new HashMap<String,Object>(); | 668 | Map<String, Object> m=new HashMap<String,Object>(); |
| 669 | m.put("company", rs.getString("company_code")); | 669 | m.put("company", rs.getString("company_code")); |
| 670 | m.put("jsy", rs.getString("jsy")); | 670 | m.put("jsy", rs.getString("jsy")); |
| 671 | - m.put("line", rs.getString("line")); | ||
| 672 | return m; | 671 | return m; |
| 673 | } | 672 | } |
| 674 | }); | 673 | }); |
| @@ -677,39 +676,31 @@ public class BigscreenService { | @@ -677,39 +676,31 @@ public class BigscreenService { | ||
| 677 | Map<String, Object> ygMap = new HashMap<String, Object>(); | 676 | Map<String, Object> ygMap = new HashMap<String, Object>(); |
| 678 | ygMap.put("company", "杨高"); | 677 | ygMap.put("company", "杨高"); |
| 679 | ygMap.put("jsy", "0"); | 678 | ygMap.put("jsy", "0"); |
| 680 | - ygMap.put("line", "0"); | ||
| 681 | Map<String, Object> snMap = new HashMap<String, Object>(); | 679 | Map<String, Object> snMap = new HashMap<String, Object>(); |
| 682 | snMap.put("company", "上南"); | 680 | snMap.put("company", "上南"); |
| 683 | snMap.put("jsy", "0"); | 681 | snMap.put("jsy", "0"); |
| 684 | - snMap.put("line", "0"); | ||
| 685 | Map<String, Object> jgMap = new HashMap<String, Object>(); | 682 | Map<String, Object> jgMap = new HashMap<String, Object>(); |
| 686 | jgMap.put("company", "金高"); | 683 | jgMap.put("company", "金高"); |
| 687 | jgMap.put("jsy", "0"); | 684 | jgMap.put("jsy", "0"); |
| 688 | - jgMap.put("line", "0"); | ||
| 689 | Map<String, Object> nhMap = new HashMap<String, Object>(); | 685 | Map<String, Object> nhMap = new HashMap<String, Object>(); |
| 690 | nhMap.put("company", "南汇"); | 686 | nhMap.put("company", "南汇"); |
| 691 | nhMap.put("jsy", "0"); | 687 | nhMap.put("jsy", "0"); |
| 692 | - nhMap.put("line", "0"); | ||
| 693 | for(Map<String, Object> m : ecList){ //顺序:杨高,上南,金高,南汇 | 688 | for(Map<String, Object> m : ecList){ //顺序:杨高,上南,金高,南汇 |
| 694 | if("05".equals(m.get("company").toString())){ | 689 | if("05".equals(m.get("company").toString())){ |
| 695 | // m.put("company", "杨高"); | 690 | // m.put("company", "杨高"); |
| 696 | ygMap.put("jsy", m.get("jsy").toString()); | 691 | ygMap.put("jsy", m.get("jsy").toString()); |
| 697 | - ygMap.put("line", m.get("line").toString()); | ||
| 698 | } | 692 | } |
| 699 | if("55".equals(m.get("company").toString())){ | 693 | if("55".equals(m.get("company").toString())){ |
| 700 | // m.put("company", "上南"); | 694 | // m.put("company", "上南"); |
| 701 | snMap.put("jsy", m.get("jsy").toString()); | 695 | snMap.put("jsy", m.get("jsy").toString()); |
| 702 | - snMap.put("line", m.get("line").toString()); | ||
| 703 | } | 696 | } |
| 704 | if("22".equals(m.get("company").toString())){ | 697 | if("22".equals(m.get("company").toString())){ |
| 705 | // m.put("company", "金高"); | 698 | // m.put("company", "金高"); |
| 706 | jgMap.put("jsy", m.get("jsy").toString()); | 699 | jgMap.put("jsy", m.get("jsy").toString()); |
| 707 | - jgMap.put("line", m.get("line").toString()); | ||
| 708 | } | 700 | } |
| 709 | if("26".equals(m.get("company").toString())){ | 701 | if("26".equals(m.get("company").toString())){ |
| 710 | // m.put("company", "南汇"); | 702 | // m.put("company", "南汇"); |
| 711 | nhMap.put("jsy", m.get("jsy").toString()); | 703 | nhMap.put("jsy", m.get("jsy").toString()); |
| 712 | - nhMap.put("line", m.get("line").toString()); | ||
| 713 | } | 704 | } |
| 714 | } | 705 | } |
| 715 | jsyList.add(ygMap); | 706 | jsyList.add(ygMap); |