Commit 8f8d69cecbc527744860fb4c3a121ee3f1afb956
1 parent
f3740620
接口公司名改成都的。
Showing
1 changed file
with
77 additions
and
158 deletions
src/main/java/com/bsth/server_rs/bigdata/BigscreenService.java
| @@ -94,16 +94,12 @@ public class BigscreenService { | @@ -94,16 +94,12 @@ public class BigscreenService { | ||
| 94 | 94 | ||
| 95 | private static String getGs(String gs){ | 95 | private static String getGs(String gs){ |
| 96 | String name=""; | 96 | String name=""; |
| 97 | - if("05".equals(gs)){ | ||
| 98 | - name="杨高公司"; | ||
| 99 | - }else if("22".equals(gs)){ | ||
| 100 | - name="金高公司"; | ||
| 101 | - }else if("26".equals(gs)){ | ||
| 102 | - name="南汇公司"; | ||
| 103 | - }else if("55".equals(gs)){ | ||
| 104 | - name="上南公司"; | ||
| 105 | - }else if("77".equals(gs)){ | ||
| 106 | - name="临港公交"; | 97 | + if("100".equals(gs)){ |
| 98 | + name="大邑公交"; | ||
| 99 | + }else if("200".equals(gs)){ | ||
| 100 | + name="蒲江公交"; | ||
| 101 | + }else if("300".equals(gs)){ | ||
| 102 | + name="拓华测试"; | ||
| 107 | }else{ | 103 | }else{ |
| 108 | name=""; | 104 | name=""; |
| 109 | } | 105 | } |
| @@ -599,7 +595,7 @@ public class BigscreenService { | @@ -599,7 +595,7 @@ public class BigscreenService { | ||
| 599 | } | 595 | } |
| 600 | 596 | ||
| 601 | /**给大屏的线路数、班次、里程汇总接口 | 597 | /**给大屏的线路数、班次、里程汇总接口 |
| 602 | - * 按车队查询 | 598 | + * 按公司查询 |
| 603 | */ | 599 | */ |
| 604 | @GET | 600 | @GET |
| 605 | @Path("/selectData/getBigScreen/{gsdm}") | 601 | @Path("/selectData/getBigScreen/{gsdm}") |
| @@ -670,8 +666,8 @@ public class BigscreenService { | @@ -670,8 +666,8 @@ public class BigscreenService { | ||
| 670 | 666 | ||
| 671 | int level1 = 0, level2 = 0, lineCount = 0; | 667 | int level1 = 0, level2 = 0, lineCount = 0; |
| 672 | for(Map<String, Object> t : lineList){ | 668 | for(Map<String, Object> t : lineList){ |
| 673 | - if(t.containsKey("company") && t.get("company").toString().trim().equals("77") && | ||
| 674 | - t.containsKey("brancheCompany") && t.get("brancheCompany").toString().trim().equals(gsdm)){ | 669 | + if(t.containsKey("company") &&t.get("company").toString().trim().equals(gsdm) |
| 670 | + && t.containsKey("brancheCompany")){ | ||
| 675 | ++lineCount; | 671 | ++lineCount; |
| 676 | if(t.get("level") != null){ | 672 | if(t.get("level") != null){ |
| 677 | if("1".equals(t.get("level").toString())){ | 673 | if("1".equals(t.get("level").toString())){ |
| @@ -709,7 +705,7 @@ public class BigscreenService { | @@ -709,7 +705,7 @@ public class BigscreenService { | ||
| 709 | + " jhsmbcs,sjsmbczds,smbczdl,jhsmbcsz,sjsmbczdsz,smbczdlz," | 705 | + " jhsmbcs,sjsmbczds,smbczdl,jhsmbcsz,sjsmbczdsz,smbczdlz," |
| 710 | + " jhszfcs,sjszfczds,szfczdl,create_date" | 706 | + " jhszfcs,sjszfczds,szfczdl,create_date" |
| 711 | + " from bsth_c_calc_count " | 707 | + " from bsth_c_calc_count " |
| 712 | - + " where date >= ? and date <= ? and gsdm = '77' and fgsdm = ?"; | 708 | + + " where date >= ? and date <= ? and gsdm = ?"; |
| 713 | 709 | ||
| 714 | List<Map<String, Object>> list=jdbcTemplate.query(sql, new Object[]{date2, date, gsdm}, | 710 | List<Map<String, Object>> list=jdbcTemplate.query(sql, new Object[]{date2, date, gsdm}, |
| 715 | new RowMapper<Map<String, Object>>(){ | 711 | new RowMapper<Map<String, Object>>(){ |
| @@ -867,8 +863,7 @@ public class BigscreenService { | @@ -867,8 +863,7 @@ public class BigscreenService { | ||
| 867 | Map<String, Object> qkMap = qkList.get(datesMap.get(d)); | 863 | Map<String, Object> qkMap = qkList.get(datesMap.get(d)); |
| 868 | long jh = 0, sj = 0; | 864 | long jh = 0, sj = 0; |
| 869 | for(ScheduleRealInfo s : findAll){ | 865 | for(ScheduleRealInfo s : findAll){ |
| 870 | - if(s.getGsBm() != null && s.getGsBm().trim().equals("77") && | ||
| 871 | - s.getFgsBm() != null && s.getFgsBm().trim().equals(gsdm)){ | 866 | + if(s.getGsBm() != null && s.getGsBm().trim().equals(gsdm) && s.getFgsBm() != null){ |
| 872 | if(s.getXlBm() != null && yyLine.contains(s.getXlBm())){//营运线路 | 867 | if(s.getXlBm() != null && yyLine.contains(s.getXlBm())){//营运线路 |
| 873 | if(!isInOut(s) && !s.isCcService() && s.getStatus() != -1 && s.getStatus() != 0){ | 868 | if(!isInOut(s) && !s.isCcService() && s.getStatus() != -1 && s.getStatus() != 0){ |
| 874 | ++jh; | 869 | ++jh; |
| @@ -925,8 +920,7 @@ public class BigscreenService { | @@ -925,8 +920,7 @@ public class BigscreenService { | ||
| 925 | List<ScheduleRealInfo> listSche = new ArrayList<ScheduleRealInfo>(); | 920 | List<ScheduleRealInfo> listSche = new ArrayList<ScheduleRealInfo>(); |
| 926 | List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>(); | 921 | List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>(); |
| 927 | for(ScheduleRealInfo s : findAll){ | 922 | for(ScheduleRealInfo s : findAll){ |
| 928 | - if(s.getGsBm() != null && s.getGsBm().trim().equals("77") && | ||
| 929 | - s.getFgsBm() != null && s.getFgsBm().trim().equals(gsdm)){ | 923 | + if(s.getGsBm() != null && s.getGsBm().trim().equals(gsdm) && s.getFgsBm() != null){ |
| 930 | if(s.getXlBm() != null && yyLine.contains(s.getXlBm())){//营运线路 | 924 | if(s.getXlBm() != null && yyLine.contains(s.getXlBm())){//营运线路 |
| 931 | listSche.add(s); | 925 | listSche.add(s); |
| 932 | Set<ChildTaskPlan> cts = s.getcTasks(); | 926 | Set<ChildTaskPlan> cts = s.getcTasks(); |
| @@ -1650,42 +1644,24 @@ public class BigscreenService { | @@ -1650,42 +1644,24 @@ public class BigscreenService { | ||
| 1650 | 1644 | ||
| 1651 | List<Map<String, Object>> jsyList = new ArrayList<Map<String, Object>>(); | 1645 | List<Map<String, Object>> jsyList = new ArrayList<Map<String, Object>>(); |
| 1652 | Map<String, Object> Map1 = new HashMap<String, Object>(); | 1646 | Map<String, Object> Map1 = new HashMap<String, Object>(); |
| 1653 | - Map1.put("company", "一车队"); | 1647 | + Map1.put("company", "大邑公交"); |
| 1654 | Map1.put("jsy", "0"); | 1648 | Map1.put("jsy", "0"); |
| 1655 | Map<String, Object> Map2 = new HashMap<String, Object>(); | 1649 | Map<String, Object> Map2 = new HashMap<String, Object>(); |
| 1656 | - Map2.put("company", "二车队"); | 1650 | + Map2.put("company", "蒲江公交"); |
| 1657 | Map2.put("jsy", "0"); | 1651 | Map2.put("jsy", "0"); |
| 1658 | - Map<String, Object> Map3 = new HashMap<String, Object>(); | ||
| 1659 | - Map3.put("company", "三车队"); | ||
| 1660 | - Map3.put("jsy", "0"); | ||
| 1661 | - Map<String, Object> Map5 = new HashMap<String, Object>(); | ||
| 1662 | - Map5.put("company", "五车队"); | ||
| 1663 | - Map5.put("jsy", "0"); | ||
| 1664 | - Map<String, Object> Map6 = new HashMap<String, Object>(); | ||
| 1665 | - Map6.put("company", "六车队"); | ||
| 1666 | - Map6.put("jsy", "0"); | ||
| 1667 | - for(Map<String, Object> m : ecList){ //顺序:一车队-->六车队 | ||
| 1668 | - if("77".equals(m.get("company").toString()) && "1".equals(m.get("brancheCompany").toString())){ | ||
| 1669 | - Map1.put("jsy", m.get("jsy").toString()); | ||
| 1670 | - } | ||
| 1671 | - if("77".equals(m.get("company").toString()) && "2".equals(m.get("brancheCompany").toString())){ | ||
| 1672 | - Map2.put("jsy", m.get("jsy").toString()); | ||
| 1673 | - } | ||
| 1674 | - if("77".equals(m.get("company").toString()) && "3".equals(m.get("brancheCompany").toString())){ | ||
| 1675 | - Map3.put("jsy", m.get("jsy").toString()); | ||
| 1676 | - } | ||
| 1677 | - if("77".equals(m.get("company").toString()) && "5".equals(m.get("brancheCompany").toString())){ | ||
| 1678 | - Map5.put("jsy", m.get("jsy").toString()); | ||
| 1679 | - } | ||
| 1680 | - if("77".equals(m.get("company").toString()) && "6".equals(m.get("brancheCompany").toString())){ | ||
| 1681 | - Map6.put("jsy", m.get("jsy").toString()); | 1652 | + for(Map<String, Object> m : ecList){ //顺序:大邑公交、蒲江公交 |
| 1653 | + if(m.containsKey("company") && m.get("company") != null | ||
| 1654 | + && m.get("company").toString().trim().length() > 0){ | ||
| 1655 | + if("100".equals(m.get("company").toString())){ | ||
| 1656 | + Map1.put("jsy", m.get("jsy").toString()); | ||
| 1657 | + } | ||
| 1658 | + if("200".equals(m.get("company").toString())){ | ||
| 1659 | + Map2.put("jsy", m.get("jsy").toString()); | ||
| 1660 | + } | ||
| 1682 | } | 1661 | } |
| 1683 | } | 1662 | } |
| 1684 | jsyList.add(Map1); | 1663 | jsyList.add(Map1); |
| 1685 | jsyList.add(Map2); | 1664 | jsyList.add(Map2); |
| 1686 | - jsyList.add(Map3); | ||
| 1687 | - jsyList.add(Map5); | ||
| 1688 | - jsyList.add(Map6); | ||
| 1689 | 1665 | ||
| 1690 | String xlSql = "select a.jsy, b.spy, c.cl from" | 1666 | String xlSql = "select a.jsy, b.spy, c.cl from" |
| 1691 | + " (select count(1) jsy from (select a.jsy from bsth_c_s_ecinfo a where a.is_cancel = 0 and a.spy is not null and a.jsy is not null group by jsy) a) a" | 1667 | + " (select count(1) jsy from (select a.jsy from bsth_c_s_ecinfo a where a.is_cancel = 0 and a.spy is not null and a.jsy is not null group by jsy) a) a" |
| @@ -1784,8 +1760,7 @@ public class BigscreenService { | @@ -1784,8 +1760,7 @@ public class BigscreenService { | ||
| 1784 | List<ScheduleRealInfo> findAll = scheduleRealInfoRepository.findAll(dates[i]); | 1760 | List<ScheduleRealInfo> findAll = scheduleRealInfoRepository.findAll(dates[i]); |
| 1785 | List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>(); | 1761 | List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>(); |
| 1786 | for(ScheduleRealInfo s : findAll){ | 1762 | for(ScheduleRealInfo s : findAll){ |
| 1787 | - if(s.getGsBm() != null && s.getGsBm().equals("77") && | ||
| 1788 | - s.getFgsBm() != null && s.getFgsBm().equals(gsdm)){//车队 | 1763 | + if(s.getGsBm() != null && s.getFgsBm() != null && s.getGsBm().equals(gsdm)){//公司 |
| 1789 | if(s.getXlBm() != null && yyLine.contains(s.getXlBm())){//营运线路 | 1764 | if(s.getXlBm() != null && yyLine.contains(s.getXlBm())){//营运线路 |
| 1790 | if(!isInOut(s)){ | 1765 | if(!isInOut(s)){ |
| 1791 | Set<ChildTaskPlan> cts = s.getcTasks(); | 1766 | Set<ChildTaskPlan> cts = s.getcTasks(); |
| @@ -1813,8 +1788,7 @@ public class BigscreenService { | @@ -1813,8 +1788,7 @@ public class BigscreenService { | ||
| 1813 | 1788 | ||
| 1814 | for(ScheduleRealInfo s : findAll){ | 1789 | for(ScheduleRealInfo s : findAll){ |
| 1815 | try { | 1790 | try { |
| 1816 | - if(s.getGsBm() != null && s.getGsBm().equals("77") && | ||
| 1817 | - s.getFgsBm() != null && s.getFgsBm().equals(gsdm)){//车队 | 1791 | + if(s.getGsBm() != null && s.getFgsBm() != null && s.getGsBm().equals(gsdm)){//公司 |
| 1818 | if(s.getXlBm() != null && yyLine.contains(s.getXlBm())){//营运线路 | 1792 | if(s.getXlBm() != null && yyLine.contains(s.getXlBm())){//营运线路 |
| 1819 | if (s.isSflj() || isInOut(s)){ | 1793 | if (s.isSflj() || isInOut(s)){ |
| 1820 | continue; | 1794 | continue; |
| @@ -1889,8 +1863,7 @@ public class BigscreenService { | @@ -1889,8 +1863,7 @@ public class BigscreenService { | ||
| 1889 | + " left join bsth_c_personnel p on a.jsy = p.id" | 1863 | + " left join bsth_c_personnel p on a.jsy = p.id" |
| 1890 | + " left join bsth_c_business b on p.company_code = b.up_code" | 1864 | + " left join bsth_c_business b on p.company_code = b.up_code" |
| 1891 | + " and p.branche_company_code = b.business_code" | 1865 | + " and p.branche_company_code = b.business_code" |
| 1892 | - + " where p.company_code = '77'" | ||
| 1893 | - + " and p.branche_company_code = ?" | 1866 | + + " where p.company_code = ?" |
| 1894 | + " group by p.branche_company_code, b.business_name" | 1867 | + " group by p.branche_company_code, b.business_name" |
| 1895 | + " order by p.branche_company_code"; | 1868 | + " order by p.branche_company_code"; |
| 1896 | List<Map<String, Object>> ecList=jdbcTemplate.query(gpLineSql, new Object[]{gsdm}, | 1869 | List<Map<String, Object>> ecList=jdbcTemplate.query(gpLineSql, new Object[]{gsdm}, |
| @@ -1926,20 +1899,20 @@ public class BigscreenService { | @@ -1926,20 +1899,20 @@ public class BigscreenService { | ||
| 1926 | + " (select count(1) jsy from (select a.jsy from bsth_c_s_ecinfo a" | 1899 | + " (select count(1) jsy from (select a.jsy from bsth_c_s_ecinfo a" |
| 1927 | + " left join bsth_c_personnel p on a.jsy=p.id where a.is_cancel = 0" | 1900 | + " left join bsth_c_personnel p on a.jsy=p.id where a.is_cancel = 0" |
| 1928 | + " and a.spy is not null and a.jsy is not null" | 1901 | + " and a.spy is not null and a.jsy is not null" |
| 1929 | - + " and p.company_code = '77' and p.branche_company_code = ?" | 1902 | + + " and p.company_code = ?" |
| 1930 | + " group by jsy) a) a" | 1903 | + " group by jsy) a) a" |
| 1931 | + " LEFT JOIN" | 1904 | + " LEFT JOIN" |
| 1932 | + " (select count(1) spy from (select b.spy from bsth_c_s_ecinfo b" | 1905 | + " (select count(1) spy from (select b.spy from bsth_c_s_ecinfo b" |
| 1933 | + " left join bsth_c_personnel p on b.spy=p.id where b.is_cancel = 0" | 1906 | + " left join bsth_c_personnel p on b.spy=p.id where b.is_cancel = 0" |
| 1934 | + " and b.spy is not null" | 1907 | + " and b.spy is not null" |
| 1935 | - + " and p.company_code = '77' and p.branche_company_code = ?" | 1908 | + + " and p.company_code = ?" |
| 1936 | + " group by spy) b) b" | 1909 | + " group by spy) b) b" |
| 1937 | + " on 1=1" | 1910 | + " on 1=1" |
| 1938 | + " LEFT JOIN" | 1911 | + " LEFT JOIN" |
| 1939 | + " (select count(1) cl from (select c.cl from bsth_c_s_ccinfo c" | 1912 | + " (select count(1) cl from (select c.cl from bsth_c_s_ccinfo c" |
| 1940 | + " left join bsth_c_cars car on c.cl=car.id where c.is_cancel = 0" | 1913 | + " left join bsth_c_cars car on c.cl=car.id where c.is_cancel = 0" |
| 1941 | + " and c.cl is not null" | 1914 | + " and c.cl is not null" |
| 1942 | - + " and car.business_code = '77' and car.branche_company_code = ?" | 1915 | + + " and car.business_code = ?" |
| 1943 | + " and c.xl in(select e.xl from bsth_c_s_ecinfo e" | 1916 | + " and c.xl in(select e.xl from bsth_c_s_ecinfo e" |
| 1944 | + " where e.is_cancel = 0 and e.spy is not null) group by c.cl) c) c" | 1917 | + " where e.is_cancel = 0 and e.spy is not null) group by c.cl) c) c" |
| 1945 | + " on 1=1"; | 1918 | + " on 1=1"; |
| @@ -2141,7 +2114,7 @@ public class BigscreenService { | @@ -2141,7 +2114,7 @@ public class BigscreenService { | ||
| 2141 | return JSON.parseObject(JSON.toJSONString(resMap)); | 2114 | return JSON.parseObject(JSON.toJSONString(resMap)); |
| 2142 | } | 2115 | } |
| 2143 | 2116 | ||
| 2144 | - /** 按月份查询车队统计指标 */ | 2117 | + /** 按月份查询公司统计指标 */ |
| 2145 | @GET | 2118 | @GET |
| 2146 | @Path("/selectData/getMonthly/{gsdm}/{month}") | 2119 | @Path("/selectData/getMonthly/{gsdm}/{month}") |
| 2147 | public JSONObject getMonthly(@PathParam("gsdm") String gsdm, @PathParam("month") String month){ | 2120 | public JSONObject getMonthly(@PathParam("gsdm") String gsdm, @PathParam("month") String month){ |
| @@ -2192,7 +2165,7 @@ public class BigscreenService { | @@ -2192,7 +2165,7 @@ public class BigscreenService { | ||
| 2192 | + " jhsmbcs,sjsmbczds,smbczdl,jhsmbcsz,sjsmbczdsz,smbczdlz," | 2165 | + " jhsmbcs,sjsmbczds,smbczdl,jhsmbcsz,sjsmbczdsz,smbczdlz," |
| 2193 | + " jhszfcs,sjszfczds,szfczdl,jhzgl,sjzgl,create_date" | 2166 | + " jhszfcs,sjszfczds,szfczdl,jhzgl,sjzgl,create_date" |
| 2194 | + " from bsth_c_calc_count " | 2167 | + " from bsth_c_calc_count " |
| 2195 | - + " where gsdm = '77' and fgsdm = ?" | 2168 | + + " where gsdm = ?" |
| 2196 | + " and date like ?"; | 2169 | + " and date like ?"; |
| 2197 | 2170 | ||
| 2198 | List<Map<String, Object>> list=jdbcTemplate.query(sql, new Object[]{gsdm, "%" + month + "%"}, | 2171 | List<Map<String, Object>> list=jdbcTemplate.query(sql, new Object[]{gsdm, "%" + month + "%"}, |
| @@ -2306,7 +2279,7 @@ public class BigscreenService { | @@ -2306,7 +2279,7 @@ public class BigscreenService { | ||
| 2306 | return JSON.parseObject(JSON.toJSONString(resMap)); | 2279 | return JSON.parseObject(JSON.toJSONString(resMap)); |
| 2307 | } | 2280 | } |
| 2308 | 2281 | ||
| 2309 | - /** 按日期查询所有车队统计指标 */ | 2282 | + /** 按日期查询所有公司统计指标 */ |
| 2310 | @GET | 2283 | @GET |
| 2311 | @Path("/selectData/getCompanyData/{date}") | 2284 | @Path("/selectData/getCompanyData/{date}") |
| 2312 | public List<Map<String, Object>> getCompanyData(@PathParam("date") String date){ | 2285 | public List<Map<String, Object>> getCompanyData(@PathParam("date") String date){ |
| @@ -2438,29 +2411,17 @@ public class BigscreenService { | @@ -2438,29 +2411,17 @@ public class BigscreenService { | ||
| 2438 | 2411 | ||
| 2439 | 2412 | ||
| 2440 | Map<String, Integer> sortMap = new HashMap<String, Integer>(); | 2413 | Map<String, Integer> sortMap = new HashMap<String, Integer>(); |
| 2441 | - sortMap.put("一车队", 0); | ||
| 2442 | - sortMap.put("二车队", 1); | ||
| 2443 | - sortMap.put("三车队", 2); | ||
| 2444 | - sortMap.put("五车队", 3); | ||
| 2445 | - sortMap.put("六车队", 4); | ||
| 2446 | - sortMap.put("临港公交", 5); | 2414 | + sortMap.put("大邑公交", 0); |
| 2415 | + sortMap.put("浦江公交", 1); | ||
| 2416 | + sortMap.put("合计", 2); | ||
| 2447 | Map<String, Object> Map1 = new HashMap<String, Object>(); | 2417 | Map<String, Object> Map1 = new HashMap<String, Object>(); |
| 2448 | - Map1.put("gs", "一车队"); | 2418 | + Map1.put("gs", "大邑公交"); |
| 2449 | resList.add(Map1); | 2419 | resList.add(Map1); |
| 2450 | Map<String, Object> Map2 = new HashMap<String, Object>(); | 2420 | Map<String, Object> Map2 = new HashMap<String, Object>(); |
| 2451 | - Map2.put("gs", "二车队"); | 2421 | + Map2.put("gs", "浦江公交"); |
| 2452 | resList.add(Map2); | 2422 | resList.add(Map2); |
| 2453 | - Map<String, Object> Map3 = new HashMap<String, Object>(); | ||
| 2454 | - Map3.put("gs", "三车队"); | ||
| 2455 | - resList.add(Map3); | ||
| 2456 | - Map<String, Object> Map5 = new HashMap<String, Object>(); | ||
| 2457 | - Map5.put("gs", "五车队"); | ||
| 2458 | - resList.add(Map5); | ||
| 2459 | - Map<String, Object> Map6 = new HashMap<String, Object>(); | ||
| 2460 | - Map6.put("gs", "六车队"); | ||
| 2461 | - resList.add(Map6); | ||
| 2462 | Map<String, Object> lgMap = new HashMap<String, Object>(); | 2423 | Map<String, Object> lgMap = new HashMap<String, Object>(); |
| 2463 | - lgMap.put("gs", "临港公交"); | 2424 | + lgMap.put("gs", "合计"); |
| 2464 | resList.add(lgMap); | 2425 | resList.add(lgMap); |
| 2465 | 2426 | ||
| 2466 | for(Map<String, Object> m : resList){ | 2427 | for(Map<String, Object> m : resList){ |
| @@ -2482,10 +2443,9 @@ public class BigscreenService { | @@ -2482,10 +2443,9 @@ public class BigscreenService { | ||
| 2482 | 2443 | ||
| 2483 | 2444 | ||
| 2484 | for(Map<String, Object> t : list){ | 2445 | for(Map<String, Object> t : list){ |
| 2485 | - if(yyLine.contains(t.get("lineCode").toString()) | ||
| 2486 | - && "77".equals(t.get("gsdm").toString())){ | ||
| 2487 | - if(sortMap.get(t.get("fgs")) != null){ | ||
| 2488 | - Map<String, Object> m = resList.get(sortMap.get(t.get("fgs"))); | 2446 | + if(yyLine.contains(t.get("lineCode").toString())){ |
| 2447 | + if(sortMap.get(t.get("gs")) != null){ | ||
| 2448 | + Map<String, Object> m = resList.get(sortMap.get(t.get("gs"))); | ||
| 2489 | mapPut(m, "jhcc", t.get("jhcc").toString()); | 2449 | mapPut(m, "jhcc", t.get("jhcc").toString()); |
| 2490 | mapPut(m, "sjcc", t.get("sjcc").toString()); | 2450 | mapPut(m, "sjcc", t.get("sjcc").toString()); |
| 2491 | mapPut(m, "jhbc", t.get("jhbc").toString()); | 2451 | mapPut(m, "jhbc", t.get("jhbc").toString()); |
| @@ -2524,8 +2484,7 @@ public class BigscreenService { | @@ -2524,8 +2484,7 @@ public class BigscreenService { | ||
| 2524 | List<ScheduleRealInfo> findAll = scheduleRealInfoRepository.findAll(date); | 2484 | List<ScheduleRealInfo> findAll = scheduleRealInfoRepository.findAll(date); |
| 2525 | long jh = 0, sj = 0; | 2485 | long jh = 0, sj = 0; |
| 2526 | for(ScheduleRealInfo s : findAll){ | 2486 | for(ScheduleRealInfo s : findAll){ |
| 2527 | - if(s.getXlBm() != null && yyLine.contains(s.getXlBm())//营运线路 | ||
| 2528 | - && "77".equals(s.getGsBm())){ | 2487 | + if(s.getXlBm() != null && yyLine.contains(s.getXlBm())){//营运线路 |
| 2529 | if(!isInOut(s) && !s.isCcService() && s.getStatus() != -1 && s.getStatus() != 0){ | 2488 | if(!isInOut(s) && !s.isCcService() && s.getStatus() != -1 && s.getStatus() != 0){ |
| 2530 | if(s.getFgsBm()!=null && sortMap.get(gsMap.get(s.getFgsBm()!=null?s.getFgsBm():"")) != null){ | 2489 | if(s.getFgsBm()!=null && sortMap.get(gsMap.get(s.getFgsBm()!=null?s.getFgsBm():"")) != null){ |
| 2531 | Map<String, Object> m = resList.get(sortMap.get(gsMap.get(s.getFgsBm()))); | 2490 | Map<String, Object> m = resList.get(sortMap.get(gsMap.get(s.getFgsBm()))); |
| @@ -2780,13 +2739,13 @@ public class BigscreenService { | @@ -2780,13 +2739,13 @@ public class BigscreenService { | ||
| 2780 | for(Map<String, Object> m : gsList){ | 2739 | for(Map<String, Object> m : gsList){ |
| 2781 | if(m.get("upCode") != null && m.get("upCode").toString().trim().length() > 0 | 2740 | if(m.get("upCode") != null && m.get("upCode").toString().trim().length() > 0 |
| 2782 | && !("0".equals(m.get("upCode").toString().trim()))){ | 2741 | && !("0".equals(m.get("upCode").toString().trim()))){ |
| 2783 | - if("77".equals(m.get("upCode").toString().trim())){ | 2742 | + if("88".equals(m.get("upCode").toString().trim()) && !"拓华".equals(m.get("name").toString())){ |
| 2784 | gsMap.put(m.get("code").toString(), m.get("name").toString()); | 2743 | gsMap.put(m.get("code").toString(), m.get("name").toString()); |
| 2785 | } | 2744 | } |
| 2786 | } | 2745 | } |
| 2787 | } | 2746 | } |
| 2788 | 2747 | ||
| 2789 | - String[] gsS = {gsMap.get("1").toString(), gsMap.get("2").toString(), gsMap.get("3").toString(), gsMap.get("5").toString(), gsMap.get("6").toString()}; | 2748 | + String[] gsS = {gsMap.get("100").toString(), gsMap.get("200").toString()}; |
| 2790 | String[] levelS = {"A1", "A2", "A3", "B1", "B2", "B3", "C1", "C2", "D", "E"}; | 2749 | String[] levelS = {"A1", "A2", "A3", "B1", "B2", "B3", "C1", "C2", "D", "E"}; |
| 2791 | List<String> keyList = new ArrayList<String>(); | 2750 | List<String> keyList = new ArrayList<String>(); |
| 2792 | for(String gs : gsS){ | 2751 | for(String gs : gsS){ |
| @@ -2821,10 +2780,10 @@ public class BigscreenService { | @@ -2821,10 +2780,10 @@ public class BigscreenService { | ||
| 2821 | 2780 | ||
| 2822 | Map<String, Map<String, Object>> keyMap = new HashMap<String, Map<String, Object>>(); | 2781 | Map<String, Map<String, Object>> keyMap = new HashMap<String, Map<String, Object>>(); |
| 2823 | for(Map<String, Object> m : calcIntervalList){ | 2782 | for(Map<String, Object> m : calcIntervalList){ |
| 2824 | - String gsName = "临港公交"; | ||
| 2825 | - String fgsName = gsMap.get(m.get("fgsbm").toString()).toString(); | 2783 | + String gsName = gsMap.get(m.get("gsbm").toString()).toString(); |
| 2784 | + String fgsName = gsName; | ||
| 2826 | String level = m.get("level").toString(); | 2785 | String level = m.get("level").toString(); |
| 2827 | - String key = fgsName + "_" + level; | 2786 | + String key = gsName + "_" + level; |
| 2828 | if(!(keyMap.containsKey(key))){ | 2787 | if(!(keyMap.containsKey(key))){ |
| 2829 | Map<String, Object> map = new HashMap<String, Object>(); | 2788 | Map<String, Object> map = new HashMap<String, Object>(); |
| 2830 | map.put("date", date1); | 2789 | map.put("date", date1); |
| @@ -3285,46 +3244,32 @@ public class BigscreenService { | @@ -3285,46 +3244,32 @@ public class BigscreenService { | ||
| 3285 | 3244 | ||
| 3286 | long sum = scheduleMap.keySet().size(), zwd = 0;//早未到数 | 3245 | long sum = scheduleMap.keySet().size(), zwd = 0;//早未到数 |
| 3287 | // long yg_z = 0, sn_z = 0, jg_z = 0, nh_z = 0; | 3246 | // long yg_z = 0, sn_z = 0, jg_z = 0, nh_z = 0; |
| 3288 | - long cd_1 = 0, cd_2 = 0, cd_3 = 0, cd_5 = 0, cd_6 = 0; | 3247 | + long cd_1 = 0, cd_2 = 0; |
| 3289 | // long yg_zwd = 0, sn_zwd = 0, jg_zwd = 0, nh_zwd = 0; | 3248 | // long yg_zwd = 0, sn_zwd = 0, jg_zwd = 0, nh_zwd = 0; |
| 3290 | - long cd_1_zwd = 0, cd_2_zwd = 0, cd_3_zwd = 0, cd_5_zwd = 0, cd_6_zwd = 0; | 3249 | + long cd_1_zwd = 0, cd_2_zwd = 0; |
| 3291 | for(String key : scheduleMap.keySet()){ | 3250 | for(String key : scheduleMap.keySet()){ |
| 3292 | ScheduleRealInfo s = scheduleMap.get(key); | 3251 | ScheduleRealInfo s = scheduleMap.get(key); |
| 3293 | - if("77".equals(s.getGsBm())){ | ||
| 3294 | - if("1".equals(s.getFgsBm())){ | ||
| 3295 | - cd_1 += 1; | ||
| 3296 | - } else if("2".equals(s.getFgsBm())){ | ||
| 3297 | - cd_2 += 1; | ||
| 3298 | - } else if("3".equals(s.getFgsBm())){ | ||
| 3299 | - cd_3 += 1; | ||
| 3300 | - } else if("5".equals(s.getFgsBm())){ | ||
| 3301 | - cd_5 += 1; | ||
| 3302 | - } else if("6".equals(s.getFgsBm())){ | ||
| 3303 | - cd_6 += 1; | ||
| 3304 | - } | ||
| 3305 | - if("缺人".equals(s.getAdjustExps()) || "缺车".equals(s.getAdjustExps())){ | ||
| 3306 | - List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | ||
| 3307 | - list.add(s); | ||
| 3308 | - BigDecimal sjgl = new BigDecimal(culateSjgl(list)); | ||
| 3309 | - BigDecimal ljgl = new BigDecimal(culateLjgl(list)); | ||
| 3310 | - BigDecimal zero = new BigDecimal(0.0); | ||
| 3311 | - if(sjgl.compareTo(zero) == 0 && ljgl.compareTo(zero) == 0){ | ||
| 3312 | - zwd += 1; | ||
| 3313 | - if("1".equals(s.getFgsBm())){ | ||
| 3314 | - cd_1_zwd += 1; | ||
| 3315 | - } else if("2".equals(s.getFgsBm())){ | ||
| 3316 | - cd_2_zwd += 1; | ||
| 3317 | - } else if("3".equals(s.getFgsBm())){ | ||
| 3318 | - cd_3_zwd += 1; | ||
| 3319 | - } else if("5".equals(s.getFgsBm())){ | ||
| 3320 | - cd_5_zwd += 1; | ||
| 3321 | - } else if("6".equals(s.getFgsBm())){ | ||
| 3322 | - cd_6_zwd += 1; | ||
| 3323 | - } | ||
| 3324 | - notYetList.add(s); | ||
| 3325 | - } | ||
| 3326 | - } | 3252 | + if("100".equals(s.getGsBm())){ |
| 3253 | + cd_1 += 1; | ||
| 3254 | + } else if("200".equals(s.getGsBm())){ | ||
| 3255 | + cd_2 += 1; | ||
| 3327 | } | 3256 | } |
| 3257 | + if("缺人".equals(s.getAdjustExps()) || "缺车".equals(s.getAdjustExps())){ | ||
| 3258 | + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | ||
| 3259 | + list.add(s); | ||
| 3260 | + BigDecimal sjgl = new BigDecimal(culateSjgl(list)); | ||
| 3261 | + BigDecimal ljgl = new BigDecimal(culateLjgl(list)); | ||
| 3262 | + BigDecimal zero = new BigDecimal(0.0); | ||
| 3263 | + if(sjgl.compareTo(zero) == 0 && ljgl.compareTo(zero) == 0){ | ||
| 3264 | + zwd += 1; | ||
| 3265 | + if("100".equals(s.getGsBm())){ | ||
| 3266 | + cd_1_zwd += 1; | ||
| 3267 | + } else if("200".equals(s.getGsBm())){ | ||
| 3268 | + cd_2_zwd += 1; | ||
| 3269 | + } | ||
| 3270 | + notYetList.add(s); | ||
| 3271 | + } | ||
| 3272 | + } | ||
| 3328 | } | 3273 | } |
| 3329 | 3274 | ||
| 3330 | resMap.put("sum", sum); | 3275 | resMap.put("sum", sum); |
| @@ -3333,12 +3278,6 @@ public class BigscreenService { | @@ -3333,12 +3278,6 @@ public class BigscreenService { | ||
| 3333 | resMap.put("notYet_1", cd_1_zwd); | 3278 | resMap.put("notYet_1", cd_1_zwd); |
| 3334 | resMap.put("sum_2", cd_2); | 3279 | resMap.put("sum_2", cd_2); |
| 3335 | resMap.put("notYet_2", cd_2_zwd); | 3280 | resMap.put("notYet_2", cd_2_zwd); |
| 3336 | - resMap.put("sum_3", cd_3); | ||
| 3337 | - resMap.put("notYet_3", cd_3_zwd); | ||
| 3338 | - resMap.put("sum_5", cd_5); | ||
| 3339 | - resMap.put("notYet_5", cd_5_zwd); | ||
| 3340 | - resMap.put("sum_6", cd_6); | ||
| 3341 | - resMap.put("notYet_6", cd_6_zwd); | ||
| 3342 | resMap.put("notYetList", notYetList); | 3281 | resMap.put("notYetList", notYetList); |
| 3343 | return resMap; | 3282 | return resMap; |
| 3344 | } | 3283 | } |
| @@ -3427,22 +3366,14 @@ public class BigscreenService { | @@ -3427,22 +3366,14 @@ public class BigscreenService { | ||
| 3427 | List<ScheduleRealInfo> notYetList = new ArrayList<ScheduleRealInfo>(); | 3366 | List<ScheduleRealInfo> notYetList = new ArrayList<ScheduleRealInfo>(); |
| 3428 | 3367 | ||
| 3429 | long sum = scheduleMap.keySet().size(), zwd = 0;//早未到数 | 3368 | long sum = scheduleMap.keySet().size(), zwd = 0;//早未到数 |
| 3430 | - long cd_1 = 0, cd_2 = 0, cd_3 = 0, cd_5 = 0, cd_6 = 0; | ||
| 3431 | - long cd_1_zwd = 0, cd_2_zwd = 0, cd_3_zwd = 0, cd_5_zwd = 0, cd_6_zwd = 0; | 3369 | + long cd_1 = 0, cd_2 = 0; |
| 3370 | + long cd_1_zwd = 0, cd_2_zwd = 0; | ||
| 3432 | for(String key : scheduleMap.keySet()){ | 3371 | for(String key : scheduleMap.keySet()){ |
| 3433 | ScheduleRealInfo s = scheduleMap.get(key); | 3372 | ScheduleRealInfo s = scheduleMap.get(key); |
| 3434 | - if("77".equals(s.getGsBm())){ | ||
| 3435 | - if("1".equals(s.getFgsBm())){ | ||
| 3436 | - cd_1 += 1; | ||
| 3437 | - } else if("2".equals(s.getFgsBm())){ | ||
| 3438 | - cd_2 += 1; | ||
| 3439 | - } else if("3".equals(s.getFgsBm())){ | ||
| 3440 | - cd_3 += 1; | ||
| 3441 | - } else if("5".equals(s.getFgsBm())){ | ||
| 3442 | - cd_5 += 1; | ||
| 3443 | - } else if("6".equals(s.getFgsBm())){ | ||
| 3444 | - cd_6 += 1; | ||
| 3445 | - } | 3373 | + if("100".equals(s.getGsBm())){ |
| 3374 | + cd_1 += 1; | ||
| 3375 | + } else if("200".equals(s.getGsBm())){ | ||
| 3376 | + cd_2 += 1; | ||
| 3446 | } | 3377 | } |
| 3447 | } | 3378 | } |
| 3448 | 3379 | ||
| @@ -3460,16 +3391,10 @@ public class BigscreenService { | @@ -3460,16 +3391,10 @@ public class BigscreenService { | ||
| 3460 | BigDecimal zero = new BigDecimal(0.0); | 3391 | BigDecimal zero = new BigDecimal(0.0); |
| 3461 | if(sjgl.compareTo(zero) == 0 && ljgl.compareTo(zero) == 0){ | 3392 | if(sjgl.compareTo(zero) == 0 && ljgl.compareTo(zero) == 0){ |
| 3462 | zwd += 1; | 3393 | zwd += 1; |
| 3463 | - if("1".equals(s.getFgsBm())){ | 3394 | + if("100".equals(s.getGsBm())){ |
| 3464 | cd_1_zwd += 1; | 3395 | cd_1_zwd += 1; |
| 3465 | - } else if("2".equals(s.getFgsBm())){ | 3396 | + } else if("200".equals(s.getGsBm())){ |
| 3466 | cd_2_zwd += 1; | 3397 | cd_2_zwd += 1; |
| 3467 | - } else if("3".equals(s.getFgsBm())){ | ||
| 3468 | - cd_3_zwd += 1; | ||
| 3469 | - } else if("5".equals(s.getFgsBm())){ | ||
| 3470 | - cd_5_zwd += 1; | ||
| 3471 | - } else if("6".equals(s.getFgsBm())){ | ||
| 3472 | - cd_6_zwd += 1; | ||
| 3473 | } | 3398 | } |
| 3474 | notYetList.add(s); | 3399 | notYetList.add(s); |
| 3475 | } | 3400 | } |
| @@ -3484,12 +3409,6 @@ public class BigscreenService { | @@ -3484,12 +3409,6 @@ public class BigscreenService { | ||
| 3484 | resMap.put("notYet_1", cd_1_zwd); | 3409 | resMap.put("notYet_1", cd_1_zwd); |
| 3485 | resMap.put("sum_2", cd_2); | 3410 | resMap.put("sum_2", cd_2); |
| 3486 | resMap.put("notYet_2", cd_2_zwd); | 3411 | resMap.put("notYet_2", cd_2_zwd); |
| 3487 | - resMap.put("sum_3", cd_3); | ||
| 3488 | - resMap.put("notYet_3", cd_3_zwd); | ||
| 3489 | - resMap.put("sum_5", cd_5); | ||
| 3490 | - resMap.put("notYet_5", cd_5_zwd); | ||
| 3491 | - resMap.put("sum_6", cd_6); | ||
| 3492 | - resMap.put("notYet_6", cd_6_zwd); | ||
| 3493 | resMap.put("notYetList", notYetList); | 3412 | resMap.put("notYetList", notYetList); |
| 3494 | return resMap; | 3413 | return resMap; |
| 3495 | } | 3414 | } |