Commit 9cf65a9c2dab1d906b5b44714204610623dbc8cb

Authored by 娄高锋
1 parent a257c2cb

update

src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
... ... @@ -57,7 +57,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
57 57  
58 58 try {
59 59  
60   - String sql = "select * from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"' and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'";
  60 + String sql = "select * from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'";
61 61 if(line.length() != 0){
62 62 sql += " and xl_bm = '"+line+"'";
63 63 }
... ... @@ -86,7 +86,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
86 86 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
87 87 ScheduleRealInfo schedule = new ScheduleRealInfo();
88 88 schedule.setId(rs.getLong("id"));
89   - schedule.setScheduleDateStr(rs.getString("schedule_date_Str"));
  89 + schedule.setScheduleDateStr(rs.getString("schedule_date_str"));
90 90 schedule.setRealExecDate(rs.getString("real_exec_date"));
91 91 schedule.setXlBm(rs.getString("xl_bm"));
92 92 schedule.setXlName(rs.getString("xl_name"));
... ... @@ -117,6 +117,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
117 117 schedule.setjName(rs.getString("j_name"));
118 118 schedule.setSpId(rs.getLong("sp_id"));
119 119 schedule.setSflj(rs.getBoolean("sflj"));
  120 + schedule.setCcService(rs.getBoolean("cc_service"));
120 121  
121 122 if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){
122 123 schedule.setFcsjActual(null);
... ... @@ -371,6 +372,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
371 372 // int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]);
372 373  
373 374 for(ScheduleRealInfo schedule : list){
  375 + if(schedule.isCcService())
  376 + continue;
374 377 String[] split1 = schedule.getFcsj().split(":");
375 378 String[] split2 = schedule.getZdsj().split(":");
376 379 long fcsj = Long.valueOf(split1[0])*60 + Long.valueOf(split1[1]);
... ... @@ -674,10 +677,10 @@ public class BusIntervalServiceImpl implements BusIntervalService {
674 677 // where += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
675 678 where += " and bc_type != 'ldks'";
676 679  
677   - String sql = "select id, schedule_date_Str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type,"
  680 + String sql = "select id, schedule_date_str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type,"
678 681 + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id"
679   - + " from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"'"
680   - + " and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'"+where+"";
  682 + + " ,cc_service from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate+"'"
  683 + + " and schedule_date_str <= '"+endDate+"'"+where+"";
681 684  
682 685 list = jdbcTemplate.query(sql,
683 686 new RowMapper<ScheduleRealInfo>(){
... ... @@ -685,7 +688,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
685 688 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
686 689 ScheduleRealInfo schedule = new ScheduleRealInfo();
687 690 schedule.setId(rs.getLong("id"));
688   - schedule.setScheduleDateStr(rs.getString("schedule_date_Str"));
  691 + schedule.setScheduleDateStr(rs.getString("schedule_date_str"));
689 692 schedule.setRealExecDate(rs.getString("real_exec_date"));
690 693 schedule.setXlName(rs.getString("xl_name"));
691 694 schedule.setLpName(rs.getString("lp_name"));
... ... @@ -705,6 +708,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
705 708 schedule.setGsName(rs.getString("gs_name"));
706 709 schedule.setFgsName(rs.getString("fgs_name"));
707 710 schedule.setSpId(rs.getLong("sp_id"));
  711 + schedule.setCcService(rs.getBoolean("cc_service"));
708 712  
709 713 if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){
710 714 schedule.setFcsjActual(null);
... ... @@ -885,7 +889,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
885 889 }
886 890  
887 891 for(ScheduleRealInfo schedule : list){
888   - if(schedule.getXlName()==null || schedule.getXlName().trim().length()==0)
  892 + if(schedule.getXlName()==null || schedule.getXlName().trim().length()==0
  893 + || schedule.isCcService())
889 894 continue;
890 895 if(model.length() != 0){
891 896 if(ttSet.contains(schedule.getSpId())){
... ... @@ -1393,6 +1398,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1393 1398 int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]);
1394 1399  
1395 1400 for(ScheduleRealInfo s : list){
  1401 + if(s.isCcService()){
  1402 + continue;
  1403 + }
1396 1404 String key = s.getScheduleDateStr() + "/" + s.getLpName();
1397 1405 if(!keyMap.containsKey(key))
1398 1406 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
... ... @@ -1668,14 +1676,14 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1668 1676 lc = new BigDecimal("0"+schedule.getJhlc());
1669 1677 }
1670 1678  
1671   - if(!schedule.isSflj()){
  1679 + if(!schedule.isSflj() && !schedule.isCcService()){
1672 1680 jhbc++;
1673 1681 jhlc = jhlc.add(lc);
1674 1682 }
1675   - if(schedule.getStatus() != -1){
  1683 + if(schedule.getStatus() != -1 && !schedule.isCcService()){
1676 1684 sjbc++;
1677 1685 sjlc = sjlc.add(lc);
1678   - } else if(schedule.getStatus() == -1){
  1686 + } else if(schedule.getStatus() == -1 && !schedule.isCcService()){
1679 1687 if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("路阻") != -1){
1680 1688 lzbc++;
1681 1689 lzlc = lzlc.add(lc);
... ... @@ -1811,8 +1819,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1811 1819 }
1812 1820 try {
1813 1821  
1814   - String sql = "select * from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d')"
1815   - + " >= '"+startDate+"' and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'";
  1822 + String sql = "select * from bsth_c_s_sp_info_real where schedule_date_str"
  1823 + + " >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'";
1816 1824 if(line.length() != 0){
1817 1825 sql += " and xl_bm = '"+line+"'";
1818 1826 }
... ... @@ -1829,7 +1837,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1829 1837 }
1830 1838 }
1831 1839 if(company.length() != 0){
1832   - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  1840 + sql += " and (gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"')";
1833 1841 }
1834 1842 sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
1835 1843  
... ... @@ -1838,7 +1846,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1838 1846 @Override
1839 1847 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
1840 1848 ScheduleRealInfo schedule = new ScheduleRealInfo();
1841   - schedule.setScheduleDateStr(rs.getString("schedule_date_Str"));
  1849 + schedule.setScheduleDateStr(rs.getString("schedule_date_str"));
1842 1850 schedule.setXlBm(rs.getString("xl_bm"));
1843 1851 schedule.setXlName(rs.getString("xl_name"));
1844 1852 schedule.setLpName(rs.getString("lp_name"));
... ... @@ -1864,6 +1872,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1864 1872 schedule.setjGh(rs.getString("j_gh"));
1865 1873 schedule.setjName(rs.getString("j_name"));
1866 1874 schedule.setUpdateDate(rs.getDate("update_date"));
  1875 + schedule.setCcService(rs.getBoolean("cc_service"));
1867 1876  
1868 1877 if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){
1869 1878 schedule.setFcsjActual(null);
... ... @@ -1905,7 +1914,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1905 1914 dxtz = 0, lbtz = 0;
1906 1915 for(ScheduleRealInfo schedule : keyMap.get(key)){
1907 1916 boolean flag = false;
1908   - if(schedule.getFcsjActual() != null && schedule.getStatus() != -1){
  1917 + if(schedule.getFcsjActual() != null && schedule.getStatus() != -1
  1918 + && !schedule.isCcService()){
1909 1919 sjbc++;
1910 1920 if(schedule.getDfsj() != null && !schedule.getDfsj().equals(schedule.getFcsj())){
1911 1921 flag = true;
... ... @@ -1937,9 +1947,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1937 1947 // tempMap.put("dxtz", dxtz);
1938 1948 tempMap.put("lbtz", lbtz);
1939 1949 tempMap.put("correct", sddf + zddf + lbtz);
1940   - tempMap.put("dfbl", df.format((double)(sddf + zddf)/sjbc*100) + "%");
  1950 + tempMap.put("dfbl", sjbc>0?df.format((double)(sddf + zddf)/sjbc*100):0 + "%");
1941 1951 // tempMap.put("dxbl", df.format((double)(dxtz)/sjbc*100) + "%");
1942   - tempMap.put("lbbl", df.format((double)(lbtz)/sjbc*100) + "%");
  1952 + tempMap.put("lbbl", sjbc>0?df.format((double)(lbtz)/sjbc*100):0 + "%");
1943 1953 // tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%");
1944 1954 // tempMap.put("workList", tempList);
1945 1955  
... ... @@ -2069,9 +2079,9 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2069 2079 // tempMap.put("dxtz", dxtz);
2070 2080 tempMap.put("lbtz", lbtz);
2071 2081 tempMap.put("correct", sddf + zddf + lbtz);
2072   - tempMap.put("dfbl", df.format((double)(sddf + zddf)/sjbc*100) + "%");
  2082 + tempMap.put("dfbl", sjbc>0?df.format((double)(sddf + zddf)/sjbc*100):0 + "%");
2073 2083  
2074   - tempMap.put("lbbl", df.format((double)(lbtz)/sjbc*100) + "%");
  2084 + tempMap.put("lbbl", sjbc>0?df.format((double)(lbtz)/sjbc*100):0 + "%");
2075 2085 // tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%");
2076 2086 resList.add(tempMap);
2077 2087 }
... ... @@ -2097,8 +2107,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2097 2107 resMap.put("dxbl", "0");
2098 2108 resMap.put("correctbl", "0");
2099 2109 }else{
2100   - resMap.put("dxbl", df.format((double)(dxtzz)/sjbc*100) + "%");
2101   - resMap.put("correctbl", df.format((double)(correct+dxtzz)/sjbc*100) + "%");
  2110 + resMap.put("dxbl", sjbc>0?df.format((double)(dxtzz)/sjbc*100):0 + "%");
  2111 + resMap.put("correctbl", sjbc>0?df.format((double)(correct+dxtzz)/sjbc*100):0 + "%");
2102 2112 }
2103 2113  
2104 2114  
... ... @@ -2152,8 +2162,8 @@ public class BusIntervalServiceImpl implements BusIntervalService {
2152 2162 resMap.put("dxbl", "0");
2153 2163 resMap.put("correctbl", "0");
2154 2164 }else{
2155   - resMap.put("dxbl", df.format((double)(dxtzf)/sjbc*100) + "%");
2156   - resMap.put("correctbl", df.format((double)(correct+dxtzf)/sjbc*100) + "%");
  2165 + resMap.put("dxbl", sjbc>0?df.format((double)(dxtzf)/sjbc*100):0 + "%");
  2166 + resMap.put("correctbl", sjbc>0?df.format((double)(correct+dxtzf)/sjbc*100):0 + "%");
2157 2167 }
2158 2168 resMap.put("xlname",BasicData.lineCode2NameMap.get(xlbm));
2159 2169 }
... ...
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
... ... @@ -42,7 +42,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
42 42 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
43 43  
44 44 try {
45   - String sql = "select * from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'";
  45 + String sql = "select * from bsth_c_s_sp_info_real where schedule_date_str = '"+date+"'";
46 46  
47 47 if(line.length() != 0)
48 48 sql += " and xl_bm = '"+line+"'";
... ... @@ -54,7 +54,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
54 54 @Override
55 55 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
56 56 ScheduleRealInfo schedule = new ScheduleRealInfo();
57   - schedule.setScheduleDateStr(rs.getString("schedule_date_Str"));
  57 + schedule.setScheduleDateStr(rs.getString("schedule_date_str"));
58 58 schedule.setRealExecDate(rs.getString("real_exec_date"));
59 59 schedule.setXlName(rs.getString("xl_name"));
60 60 schedule.setLpName(rs.getString("lp_name"));
... ... @@ -80,6 +80,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
80 80 schedule.setsGh(rs.getString("s_gh"));
81 81 schedule.setsName(rs.getString("s_name"));
82 82 schedule.setSpId(rs.getLong("sp_id"));
  83 + schedule.setCcService(rs.getBoolean("cc_service"));
83 84  
84 85 if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){
85 86 schedule.setFcsjActual(null);
... ... @@ -175,7 +176,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
175 176 }
176 177  
177 178 if(map.get("subCompany")!=null){
178   - subCompany=map.get("subCompany").toString();
  179 + subCompany = map.get("subCompany").toString();
179 180 }
180 181 String line = map.get("line").toString();
181 182 String date = map.get("date").toString();
... ... @@ -187,7 +188,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
187 188  
188 189 try {
189 190  
190   - String sql = "select * from bsth_c_s_sp_info where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'";
  191 + String sql = "select * from bsth_c_s_sp_info where schedule_date = '"+date+"'";
191 192 if(line.length() != 0){
192 193 sql += " and xl_bm = '"+line+"'";
193 194 }
... ... @@ -364,7 +365,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
364 365 int jhsb = 0, sjsb = 0, jhmb = 0, sjmb = 0;
365 366 int jhzgf = 0, sjzgf = 0, jhwgf = 0, sjwgf = 0;
366 367 for(ScheduleRealInfo schedule : keyMap.get(key)){
367   -// schedule.setFcsjAll(schedule.getFcsj());
  368 + if(schedule.isCcService()){
  369 + continue;
  370 + }
  371 +
368 372 if(companyName.length() == 0 && schedule.getGsName() != null)
369 373 companyName = schedule.getGsName();
370 374 if(subCompanyName.length() == 0 && schedule.getFgsName() != null)
... ... @@ -547,7 +551,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
547 551 }
548 552 try {
549 553  
550   - String sql = "select * from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"' and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'";
  554 + String sql = "select * from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'";
551 555 if(line.length() != 0){
552 556 sql += " and xl_bm = '"+line+"'";
553 557 }
... ... @@ -565,7 +569,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
565 569 @Override
566 570 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
567 571 ScheduleRealInfo schedule = new ScheduleRealInfo();
568   - schedule.setScheduleDateStr(rs.getString("schedule_date_Str"));
  572 + schedule.setScheduleDateStr(rs.getString("schedule_date_str"));
569 573 schedule.setXlName(rs.getString("xl_name"));
570 574 schedule.setBcType(rs.getString("bc_type"));
571 575 schedule.setGsName(rs.getString("gs_name"));
... ... @@ -579,6 +583,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
579 583 schedule.setBcsj(rs.getInt("bcsj"));
580 584 schedule.setQdzName(rs.getString("qdz_name"));
581 585 schedule.setSpId(rs.getLong("sp_id"));
  586 + schedule.setCcService(rs.getBoolean("cc_service"));
582 587  
583 588 if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){
584 589 schedule.setFcsjActual(null);
... ... @@ -636,6 +641,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
636 641  
637 642 //分组计算 同时判断是否所选时刻信息
638 643 for(ScheduleRealInfo schedule : list){
  644 + if(schedule.isCcService()){
  645 + continue;
  646 + }
639 647 DO:{
640 648 if(model.length() != 0){
641 649 for(Long tt : ttList){
... ... @@ -840,7 +848,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
840 848 }
841 849 try {
842 850  
843   - String sql = "select * from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"' and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'";
  851 + String sql = "select * from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'";
844 852 if(line.length() != 0){
845 853 sql += " and xl_bm = '"+line+"'";
846 854 }
... ... @@ -862,7 +870,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
862 870 @Override
863 871 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
864 872 ScheduleRealInfo schedule = new ScheduleRealInfo();
865   - schedule.setScheduleDateStr(rs.getString("schedule_date_Str"));
  873 + schedule.setScheduleDateStr(rs.getString("schedule_date_str"));
866 874 schedule.setRealExecDate(rs.getString("real_exec_date"));
867 875 schedule.setXlName(rs.getString("xl_name"));
868 876 schedule.setBcType(rs.getString("bc_type"));
... ... @@ -878,6 +886,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
878 886 schedule.setBcsj(rs.getInt("bcsj"));
879 887 schedule.setQdzName(rs.getString("qdz_name"));
880 888 schedule.setSpId(rs.getLong("sp_id"));
  889 + schedule.setCcService(rs.getBoolean("cc_service"));
881 890  
882 891 if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){
883 892 schedule.setFcsjActual(null);
... ... @@ -973,6 +982,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
973 982  
974 983 //按时间段分组
975 984 for(ScheduleRealInfo schedule : list){
  985 + if(schedule.isCcService()){
  986 + continue;
  987 + }
  988 +
976 989 if(companyName.length()==0&&schedule.getGsName()!=null
977 990 &&schedule.getGsName().trim().length()!=0){
978 991 companyName = schedule.getGsName();
... ... @@ -1230,9 +1243,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1230 1243 date = sdf.format(new Date());
1231 1244  
1232 1245 try {
1233   - String sql = "select a.schedule_date_Str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name,"
1234   - + " b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line"
1235   - + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'"
  1246 + String sql = "select a.schedule_date_str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name,"
  1247 + + " a.cc_service, b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line"
  1248 + + " where schedule_date_str = '"+date+"'"
1236 1249 + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'";
1237 1250 if(line.trim().length() != 0)
1238 1251 sql += " and xl_bm = '"+line+"'";
... ... @@ -1244,7 +1257,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1244 1257 @Override
1245 1258 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
1246 1259 ScheduleRealInfo schedule = new ScheduleRealInfo();
1247   - schedule.setScheduleDateStr(rs.getString("schedule_date_Str"));
  1260 + schedule.setScheduleDateStr(rs.getString("schedule_date_str"));
1248 1261 schedule.setRealExecDate(rs.getString("real_exec_date"));
1249 1262 schedule.setXlName(rs.getString("xl_name"));
1250 1263 schedule.setFcsj(rs.getString("fcsj"));
... ... @@ -1257,6 +1270,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1257 1270 schedule.setStatus(rs.getInt("status"));
1258 1271 schedule.setGsName(rs.getString("gs_name"));
1259 1272 schedule.setFgsName(rs.getString("fgs_name"));
  1273 + schedule.setCcService(rs.getBoolean("cc_service"));
1260 1274  
1261 1275 int startOpt = 0;
1262 1276 if(rs.getString("start_opt") != null && rs.getString("start_opt").trim().length() != 0){
... ... @@ -1298,7 +1312,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1298 1312 String companyName = "", subCompanyName = "";
1299 1313  
1300 1314 for(ScheduleRealInfo s : list){
1301   - if(lineSet.contains(s.getXlName())){
  1315 + if(lineSet.contains(s.getXlName()) || s.isCcService()){
1302 1316 continue;
1303 1317 }
1304 1318 String xlName = s.getXlName();
... ... @@ -1456,9 +1470,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1456 1470 }
1457 1471  
1458 1472 try {
1459   - String sql = "select a.schedule_date_Str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name,"
1460   - + " b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line"
1461   - + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"' and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'"
  1473 + String sql = "select a.schedule_date_str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name,"
  1474 + + " a.cc_service, b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line"
  1475 + + " where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'"
1462 1476 + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'";
1463 1477 if(line.length() != 0)
1464 1478 sql += " and xl_bm = '"+line+"'";
... ... @@ -1470,7 +1484,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1470 1484 @Override
1471 1485 public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
1472 1486 ScheduleRealInfo schedule = new ScheduleRealInfo();
1473   - schedule.setScheduleDateStr(rs.getString("schedule_date_Str"));
  1487 + schedule.setScheduleDateStr(rs.getString("schedule_date_str"));
1474 1488 schedule.setRealExecDate(rs.getString("real_exec_date"));
1475 1489 schedule.setXlName(rs.getString("xl_name"));
1476 1490 schedule.setFcsj(rs.getString("fcsj"));
... ... @@ -1483,6 +1497,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1483 1497 schedule.setStatus(rs.getInt("status"));
1484 1498 schedule.setGsName(rs.getString("gs_name"));
1485 1499 schedule.setFgsName(rs.getString("fgs_name"));
  1500 + schedule.setCcService(rs.getBoolean("cc_service"));
1486 1501  
1487 1502 int startOpt = 0;
1488 1503 if(rs.getString("start_opt") != null && rs.getString("start_opt").trim().length() != 0){
... ... @@ -1524,7 +1539,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1524 1539 String companyName = "", subCompanyName = "";
1525 1540  
1526 1541 for(ScheduleRealInfo s : list){
1527   - if(lineSet.contains(s.getXlName())){
  1542 + if(lineSet.contains(s.getXlName()) || s.isCcService()){
1528 1543 continue;
1529 1544 }
1530 1545 String xlName = s.getXlName();
... ... @@ -1716,7 +1731,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1716 1731  
1717 1732 String sql =
1718 1733 "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time, r.gs_name, r.fgs_name " +
1719   - "FROM bsth_c_s_sp_info_real as r left join bsth_v_directive_60 as d on r.id = d.sch and d.is_dispatch = 1 where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'";
  1734 + "FROM bsth_c_s_sp_info_real as r left join bsth_v_directive_60 as d on r.id = d.sch and d.is_dispatch = 1 where schedule_date_str = '"+date+"'";
1720 1735 if(line.length() != 0){
1721 1736 sql += " and xl_bm = '"+line+"'";
1722 1737 }
... ... @@ -1728,7 +1743,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService {
1728 1743 }
1729 1744 sql += " union " +
1730 1745 "select r.id, r.schedule_date_str, r.xl_name, r.cl_zbh, r.j_gh, r.j_name, r.fcsj, d.timestamp, d.reply46, d.reply47, d.reply46time, d.reply47time, r.gs_name, r.fgs_name " +
1731   - "FROM bsth_c_s_sp_info_real as r right join bsth_v_directive_60 as d on r.id = d.sch where d.is_dispatch = 1 and DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'";
  1746 + "FROM bsth_c_s_sp_info_real as r right join bsth_v_directive_60 as d on r.id = d.sch where d.is_dispatch = 1 and schedule_date_str = '"+date+"'";
1732 1747 if(line.length() != 0){
1733 1748 sql += " and xl_bm = '"+line+"'";
1734 1749 }
... ...