Commit 1c7cc4f79f58ab56ddfddebd09055de0b9337660
1 parent
1ccd70db
添加 是否营运 和 全部分公司 的筛选条件
Showing
26 changed files
with
1228 additions
and
466 deletions
src/main/java/com/bsth/controller/forms/ExportController.java
| ... | ... | @@ -469,12 +469,13 @@ public class ExportController { |
| 469 | 469 | for (Operationservice l : operationservice) { |
| 470 | 470 | Map<String, Object> m = new HashMap<String, Object>(); |
| 471 | 471 | m.put("i", i); |
| 472 | - m.put("xlName", l.getXlName()); | |
| 473 | - m.put("jzl", l.getJzl()); | |
| 474 | - m.put("xhl", l.getXhl()); | |
| 475 | - m.put("xsgl", l.getXsgl()); | |
| 476 | - m.put("emptMileage", l.getEmptMileage()); | |
| 477 | - m.put("sjbc", l.getSjbc()); | |
| 472 | + m.put("fgs", l.getFgs()!=null?l.getFgs():""); | |
| 473 | + m.put("xlName", l.getXlName()!=null?l.getXlName():""); | |
| 474 | + m.put("jzl", l.getJzl()!=null?l.getJzl():""); | |
| 475 | + m.put("xhl", l.getXhl()!=null?l.getXhl():""); | |
| 476 | + m.put("xsgl", l.getXsgl()!=null?l.getXsgl():""); | |
| 477 | + m.put("emptMileage", l.getEmptMileage()!=null?l.getEmptMileage():""); | |
| 478 | + m.put("sjbc", l.getSjbc()!=null?l.getSjbc():""); | |
| 478 | 479 | resList.add(m); |
| 479 | 480 | i++; |
| 480 | 481 | } | ... | ... |
src/main/java/com/bsth/entity/calc/CalcStatistics.java
| ... | ... | @@ -67,6 +67,8 @@ public class CalcStatistics { |
| 67 | 67 | private Double qtlc; |
| 68 | 68 | /* 临加公里*/ |
| 69 | 69 | private Double ljlc; |
| 70 | + /* 临加空驶公里*/ | |
| 71 | + private Double ljkslc; | |
| 70 | 72 | /* 计划班次*/ |
| 71 | 73 | private int jhbcq; |
| 72 | 74 | /* 计划班次(早高峰)*/ |
| ... | ... | @@ -272,6 +274,12 @@ public class CalcStatistics { |
| 272 | 274 | public void setLjlc(Double ljlc) { |
| 273 | 275 | this.ljlc = ljlc; |
| 274 | 276 | } |
| 277 | + public Double getLjkslc() { | |
| 278 | + return ljkslc; | |
| 279 | + } | |
| 280 | + public void setLjkslc(Double ljkslc) { | |
| 281 | + this.ljkslc = ljkslc; | |
| 282 | + } | |
| 275 | 283 | public int getJhbcq() { |
| 276 | 284 | return jhbcq; |
| 277 | 285 | } | ... | ... |
src/main/java/com/bsth/entity/mcy_forms/Operationservice.java
| ... | ... | @@ -17,6 +17,10 @@ public class Operationservice { |
| 17 | 17 | private String jname; |
| 18 | 18 | |
| 19 | 19 | private String clzbh; |
| 20 | + | |
| 21 | + private String gs; | |
| 22 | + | |
| 23 | + private String fgs; | |
| 20 | 24 | |
| 21 | 25 | public String getJname() { |
| 22 | 26 | return jname; |
| ... | ... | @@ -89,6 +93,22 @@ public class Operationservice { |
| 89 | 93 | public void setXlBm(String xlBm) { |
| 90 | 94 | this.xlBm = xlBm; |
| 91 | 95 | } |
| 96 | + | |
| 97 | + public String getGs() { | |
| 98 | + return gs; | |
| 99 | + } | |
| 100 | + | |
| 101 | + public void setGs(String gs) { | |
| 102 | + this.gs = gs; | |
| 103 | + } | |
| 104 | + | |
| 105 | + public String getFgs() { | |
| 106 | + return fgs; | |
| 107 | + } | |
| 108 | + | |
| 109 | + public void setFgs(String fgs) { | |
| 110 | + this.fgs = fgs; | |
| 111 | + } | |
| 92 | 112 | |
| 93 | 113 | |
| 94 | 114 | } | ... | ... |
src/main/java/com/bsth/repository/calc/CalcStatisticsRepository.java
| ... | ... | @@ -6,8 +6,10 @@ import javax.transaction.Transactional; |
| 6 | 6 | |
| 7 | 7 | import com.bsth.entity.calc.CalcStatistics; |
| 8 | 8 | import com.bsth.entity.calc.CalcWaybill; |
| 9 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; | |
| 9 | 10 | import com.bsth.repository.BaseRepository; |
| 10 | 11 | |
| 12 | +import org.springframework.data.jpa.repository.EntityGraph; | |
| 11 | 13 | import org.springframework.data.jpa.repository.Modifying; |
| 12 | 14 | import org.springframework.data.jpa.repository.Query; |
| 13 | 15 | import org.springframework.stereotype.Repository; |
| ... | ... | @@ -38,4 +40,8 @@ public interface CalcStatisticsRepository extends BaseRepository<CalcStatistics, |
| 38 | 40 | @Query(value = "delete CalcStatistics c where c.dateStr=?1") |
| 39 | 41 | void deleteByDate(String date); |
| 40 | 42 | |
| 43 | + //按照时间段查询实际排班(分公司条件不可为空) | |
| 44 | + @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH) | |
| 45 | + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and s.scheduleDateStr between ?2 and ?3 and gsBm = ?4 and fgsBm = ?5 order by s.fgsBm, s.xlBm") | |
| 46 | + List<ScheduleRealInfo> scheduleByDateAndLine(String line,String date,String date2,String gsdm,String fgsdm); | |
| 41 | 47 | } | ... | ... |
src/main/java/com/bsth/service/calc/impl/CalcWaybillServiceImpl.java
| ... | ... | @@ -553,7 +553,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 553 | 553 | |
| 554 | 554 | //查询所有线路 |
| 555 | 555 | for(Map<String, String> m : gsList){ |
| 556 | - list.addAll(scheduleRealInfoRepository.scheduleByDateAndLineTj(line, rq, rq, m.get("gsdm"), m.get("fgsdm"))); | |
| 556 | + list.addAll(calcStatisticsRepository.scheduleByDateAndLine(line, rq, rq, m.get("gsdm"), m.get("fgsdm"))); | |
| 557 | 557 | } |
| 558 | 558 | |
| 559 | 559 | for (int i = 0; i < list.size(); i++) { |
| ... | ... | @@ -644,6 +644,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 644 | 644 | double sjyygl= culateService.culateSjgl(lists); |
| 645 | 645 | double zyygl= Arith.add(sjyygl,ljgl); |
| 646 | 646 | |
| 647 | + double ljksgl= culateService.culateLjksgl(lists); | |
| 647 | 648 | double sjjccgl=culateService.culateJccgl(lists); |
| 648 | 649 | double sjksgl=culateService.culateKsgl(lists); |
| 649 | 650 | double zksgl=Arith.add(sjjccgl, sjksgl); |
| ... | ... | @@ -651,6 +652,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 651 | 652 | s.setSjkslc(zksgl); |
| 652 | 653 | s.setSjzlc(Arith.add(zyygl, zksgl)); |
| 653 | 654 | |
| 655 | + s.setLjkslc(ljksgl); | |
| 656 | + | |
| 654 | 657 | s.setSslc(culateService.culateLbgl(list)); |
| 655 | 658 | s.setSsbc(culateService.culateLbbc(list)); |
| 656 | 659 | |
| ... | ... | @@ -841,6 +844,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 841 | 844 | m.put("ssgl_yw", c.getYwlc()); |
| 842 | 845 | m.put("ssgl_other", c.getQtlc()); |
| 843 | 846 | m.put("ljgl", c.getLjlc()); |
| 847 | + m.put("ljks", c.getLjkslc()); | |
| 844 | 848 | m.put("jhbc", c.getJhbcq()); |
| 845 | 849 | m.put("jhbc_m", c.getJhbcz()); |
| 846 | 850 | m.put("jhbc_a", c.getJhbcw()); |
| ... | ... | @@ -942,16 +946,17 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 942 | 946 | } |
| 943 | 947 | Map<String, Boolean> lineMap=lineService.lineNature(); |
| 944 | 948 | List<CalcStatistics> list=new ArrayList<CalcStatistics>(); |
| 949 | + | |
| 945 | 950 | for (int i = 0; i < listAll.size(); i++) { |
| 946 | 951 | CalcStatistics s=listAll.get(i); |
| 947 | 952 | if(nature.equals("0")){ |
| 948 | 953 | list.add(s); |
| 949 | 954 | }else if(nature.equals("1")){ |
| 950 | - if(lineMap.get(s.getXl())){ | |
| 955 | + if(lineMap.containsKey(s.getXl()) && lineMap.get(s.getXl())){ | |
| 951 | 956 | list.add(s); |
| 952 | 957 | } |
| 953 | 958 | }else{ |
| 954 | - if(!lineMap.get(s.getXl())){ | |
| 959 | + if(lineMap.containsKey(s.getXl()) && !lineMap.get(s.getXl())){ | |
| 955 | 960 | list.add(s); |
| 956 | 961 | } |
| 957 | 962 | } |
| ... | ... | @@ -1035,6 +1040,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 1035 | 1040 | m.put("ssgl_yw", c.getYwlc()); |
| 1036 | 1041 | m.put("ssgl_other", c.getQtlc()); |
| 1037 | 1042 | m.put("ljgl", c.getLjlc()); |
| 1043 | + m.put("ljks", c.getLjkslc()); | |
| 1038 | 1044 | m.put("jhbc", c.getJhbcq()); |
| 1039 | 1045 | m.put("jhbc_m", c.getJhbcz()); |
| 1040 | 1046 | m.put("jhbc_a", c.getJhbcw()); |
| ... | ... | @@ -1131,6 +1137,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 1131 | 1137 | hjMap.put("ssgl_yw", Arith.add(lsMap.get("ssgl_yw"), hjMap.get("ssgl_yw")==null?"0":hjMap.get("ssgl_yw"))); |
| 1132 | 1138 | hjMap.put("ssgl_other", Arith.add(lsMap.get("ssgl_other"), hjMap.get("ssgl_other")==null?"0":hjMap.get("ssgl_other"))); |
| 1133 | 1139 | hjMap.put("ljgl", Arith.add(lsMap.get("ljgl"), hjMap.get("ljgl")==null?"0":hjMap.get("ljgl"))); |
| 1140 | + hjMap.put("ljks", Arith.add(lsMap.get("ljks"), hjMap.get("ljks")==null?"0":hjMap.get("ljks"))); | |
| 1134 | 1141 | hjMap.put("jhbc", Integer.parseInt(lsMap.get("jhbc").toString())+ Integer.parseInt(hjMap.get("jhbc")==null?"0":hjMap.get("jhbc").toString())); |
| 1135 | 1142 | hjMap.put("jhbc_m", Integer.parseInt(lsMap.get("jhbc_m").toString())+Integer.parseInt(hjMap.get("jhbc_m")==null?"0":hjMap.get("jhbc_m").toString())); |
| 1136 | 1143 | hjMap.put("jhbc_a", Integer.parseInt(lsMap.get("jhbc_a").toString())+ Integer.parseInt(hjMap.get("jhbc_a")==null?"0":hjMap.get("jhbc_a").toString())); |
| ... | ... | @@ -1230,6 +1237,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl<CalcWaybill, Integer |
| 1230 | 1237 | s.setYwlc(Arith.add(s.getYwlc()!=null?s.getYwlc():0, s_.getYwlc())); |
| 1231 | 1238 | s.setQtlc(Arith.add(s.getQtlc()!=null?s.getQtlc():0, s_.getQtlc())); |
| 1232 | 1239 | s.setLjlc(Arith.add(s.getLjlc()!=null?s.getLjlc():0, s_.getLjlc())); |
| 1240 | + s.setLjkslc(Arith.add(s.getLjkslc()!=null?s.getLjkslc():0, s_.getLjkslc())); | |
| 1233 | 1241 | s.setJhbcq(s.getJhbcq() + s_.getJhbcq()); |
| 1234 | 1242 | s.setJhbcz(s.getJhbcz() + s_.getJhbcz()); |
| 1235 | 1243 | s.setJhbcw(s.getJhbcw() + s_.getJhbcw()); | ... | ... |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| ... | ... | @@ -28,7 +28,6 @@ import com.bsth.entity.mcy_forms.Operationservice; |
| 28 | 28 | import com.bsth.entity.mcy_forms.Shifday; |
| 29 | 29 | import com.bsth.entity.mcy_forms.Shiftuehiclemanth; |
| 30 | 30 | import com.bsth.entity.mcy_forms.Singledata; |
| 31 | -import com.bsth.entity.mcy_forms.Turnoutrate; | |
| 32 | 31 | import com.bsth.entity.mcy_forms.Vehicleloading; |
| 33 | 32 | import com.bsth.entity.mcy_forms.Waybillday; |
| 34 | 33 | import com.bsth.entity.oil.Dlb; |
| ... | ... | @@ -45,6 +44,7 @@ import com.bsth.entity.mcy_forms.Allline; |
| 45 | 44 | import com.bsth.entity.mcy_forms.Changetochange; |
| 46 | 45 | import com.bsth.entity.mcy_forms.Daily; |
| 47 | 46 | import com.bsth.entity.mcy_forms.Executionrate; |
| 47 | +import com.bsth.service.LineService; | |
| 48 | 48 | import com.bsth.service.forms.CommonService; |
| 49 | 49 | import com.bsth.service.forms.FormsService; |
| 50 | 50 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| ... | ... | @@ -61,6 +61,9 @@ public class FormsServiceImpl implements FormsService { |
| 61 | 61 | ScheduleRealInfoService scheduleRealInfoService; |
| 62 | 62 | |
| 63 | 63 | @Autowired |
| 64 | + LineService lineService; | |
| 65 | + | |
| 66 | + @Autowired | |
| 64 | 67 | CommonService commonService; |
| 65 | 68 | |
| 66 | 69 | @Autowired |
| ... | ... | @@ -214,11 +217,11 @@ public class FormsServiceImpl implements FormsService { |
| 214 | 217 | sql+=" and l.line_code=" + map.get("line").toString(); |
| 215 | 218 | } |
| 216 | 219 | sql+= " AND r.gs_bm is not null"; |
| 217 | - if(map.get("gsdmLine").toString()!=""){ | |
| 220 | + if(map.get("gsdmLine") != null && map.get("gsdmLine").toString()!=""){ | |
| 218 | 221 | sql+=" and r.gs_bm='"+map.get("gsdmLine").toString()+"' "; |
| 219 | 222 | } |
| 220 | - if(map.get("fgsdmLine").toString()!=""){ | |
| 221 | - sql+=" and r.fgs_bm='"+map.get("fgsdmLine").toString()+"'"; | |
| 223 | + if(map.get("fgsdmLine") != null && map.get("fgsdmLine").toString()!=""){ | |
| 224 | + sql+=" and r.fgs_bm='"+map.get("fgsdmLine").toString()+"' "; | |
| 222 | 225 | } |
| 223 | 226 | sql += " GROUP BY s.station_name,l.name,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "; |
| 224 | 227 | List<Linepasswengerflow> list = jdbcTemplate.query(sql, new RowMapper<Linepasswengerflow>() { |
| ... | ... | @@ -244,10 +247,10 @@ public class FormsServiceImpl implements FormsService { |
| 244 | 247 | final String empnames=map.get("empnames").toString(); |
| 245 | 248 | String gsdmManth=""; |
| 246 | 249 | String fgsdmManth=""; |
| 247 | - if(map.containsKey("gsdmManth")){ | |
| 250 | + if(map.get("gsdmManth") != null){ | |
| 248 | 251 | gsdmManth=map.get("gsdmManth").toString(); |
| 249 | 252 | } |
| 250 | - if(map.containsKey("fgsdmManth")){ | |
| 253 | + if(map.get("fgsdmManth") != null){ | |
| 251 | 254 | fgsdmManth=map.get("fgsdmManth").toString(); |
| 252 | 255 | } |
| 253 | 256 | String sql ="select "; |
| ... | ... | @@ -410,10 +413,10 @@ public class FormsServiceImpl implements FormsService { |
| 410 | 413 | final String empnames=map.get("empnames").toString(); |
| 411 | 414 | String gsdmManth=""; |
| 412 | 415 | String fgsdmManth=""; |
| 413 | - if(map.containsKey("gsdmManth")){ | |
| 416 | + if(map.get("gsdmManth")!=null){ | |
| 414 | 417 | gsdmManth=map.get("gsdmManth").toString(); |
| 415 | 418 | } |
| 416 | - if(map.containsKey("fgsdmManth")){ | |
| 419 | + if(map.get("fgsdmManth")!=null){ | |
| 417 | 420 | fgsdmManth=map.get("fgsdmManth").toString(); |
| 418 | 421 | } |
| 419 | 422 | String sql ="select "; |
| ... | ... | @@ -766,6 +769,10 @@ public class FormsServiceImpl implements FormsService { |
| 766 | 769 | |
| 767 | 770 | rq = rq2 + "-" + rq3; |
| 768 | 771 | |
| 772 | + String sfyy=""; | |
| 773 | + if(map.get("sfyy")!=null){ | |
| 774 | + sfyy=map.get("sfyy").toString(); | |
| 775 | + } | |
| 769 | 776 | String line=""; |
| 770 | 777 | if(map.get("line")!=null){ |
| 771 | 778 | line=map.get("line").toString().trim(); |
| ... | ... | @@ -784,21 +791,23 @@ public class FormsServiceImpl implements FormsService { |
| 784 | 791 | |
| 785 | 792 | if(!line.equals("")){ |
| 786 | 793 | sql +=" and xl= '"+line+"'"; |
| 787 | - }else{ | |
| 788 | - sql += " and gs= '"+gs+"' and fgs= '"+fgs+"'"; | |
| 794 | + } | |
| 795 | + if(!gs.equals("")){ | |
| 796 | + sql += " and gs= '"+gs+"'"; | |
| 797 | + } | |
| 798 | + if(!fgs.equals("")){ | |
| 799 | + sql += " and fgs= '"+fgs+"'"; | |
| 789 | 800 | } |
| 790 | 801 | |
| 791 | 802 | sql +=" order by rq"; |
| 792 | 803 | List<Changetochange> list = jdbcTemplate.query(sql, new RowMapper<Changetochange>() { |
| 793 | - | |
| 794 | - | |
| 795 | 804 | @Override |
| 796 | 805 | public Changetochange mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 797 | 806 | Changetochange chan = new Changetochange(); |
| 798 | 807 | chan.setRq(arg0.getString("rq")); |
| 799 | 808 | chan.setGs(BasicData.businessCodeNameMap.get(arg0.getString("gs"))); |
| 800 | 809 | chan.setFgs(BasicData.businessFgsCodeNameMap.get(arg0.getString("fgs")+"_"+arg0.getString("gs"))); |
| 801 | - chan.setXl(BasicData.lineCode2NameMap.get(arg0.getString("xl"))); | |
| 810 | + chan.setXl(arg0.getString("xl")); | |
| 802 | 811 | chan.setLp(arg0.getString("lp")); |
| 803 | 812 | chan.setFssj(arg0.getString("fssj")); |
| 804 | 813 | chan.setXgsj(arg0.getString("xgsj")); |
| ... | ... | @@ -813,13 +822,42 @@ public class FormsServiceImpl implements FormsService { |
| 813 | 822 | return chan; |
| 814 | 823 | } |
| 815 | 824 | }); |
| 816 | - return list; | |
| 825 | + | |
| 826 | + Map<String, Boolean> lineNature = lineService.lineNature(); | |
| 827 | + List<Changetochange> resList = new ArrayList<Changetochange>(); | |
| 828 | + | |
| 829 | + for(Changetochange c : list){ | |
| 830 | + String xl = c.getXl(); | |
| 831 | + if(sfyy.length() != 0){ | |
| 832 | + if(sfyy.equals("0")){ | |
| 833 | + resList.add(c); | |
| 834 | + } else if(sfyy.equals("1")){ | |
| 835 | + if(lineNature.containsKey(xl) && lineNature.get(xl)){ | |
| 836 | + resList.add(c); | |
| 837 | + } | |
| 838 | + } else { | |
| 839 | + if(lineNature.containsKey(xl) && !lineNature.get(xl)){ | |
| 840 | + resList.add(c); | |
| 841 | + } | |
| 842 | + } | |
| 843 | + } else { | |
| 844 | + resList.add(c); | |
| 845 | + } | |
| 846 | + | |
| 847 | + c.setXl(BasicData.lineCode2NameMap.get(xl)); | |
| 848 | + } | |
| 849 | + | |
| 850 | + return resList; | |
| 817 | 851 | } |
| 818 | 852 | |
| 819 | 853 | |
| 820 | 854 | // 路单数据 |
| 821 | 855 | @Override |
| 822 | 856 | public List<Singledata> singledatatj(Map<String, Object> map) { |
| 857 | + String sfyy=""; | |
| 858 | + if(map.get("sfyy")!=null){ | |
| 859 | + sfyy=map.get("sfyy").toString(); | |
| 860 | + } | |
| 823 | 861 | String gsdm=""; |
| 824 | 862 | if(map.get("gsdmSing")!=null){ |
| 825 | 863 | gsdm=map.get("gsdmSing").toString(); |
| ... | ... | @@ -843,16 +881,20 @@ public class FormsServiceImpl implements FormsService { |
| 843 | 881 | List<Singledata> list_=new ArrayList<Singledata>(); |
| 844 | 882 | if(tjtype.equals("jsy")){ |
| 845 | 883 | //油统计 |
| 846 | - String sql="select r.j_gh, r.xl_bm,r.cl_zbh,r.j_name" | |
| 884 | + String sql="select r.j_gh, r.xl_bm,r.cl_zbh,r.j_name,r.fgs_bm" | |
| 847 | 885 | + " from bsth_c_s_sp_info_real r where " |
| 848 | 886 | + " r.schedule_date_str = '"+startDate+"'"; |
| 849 | - if(xlbm.equals("")){ | |
| 850 | - sql +="and r.gs_bm='"+gsdm+"' " | |
| 851 | - + " and r.fgs_bm='"+fgsdm+"'"; | |
| 852 | - }else{ | |
| 887 | + if(xlbm.length() != 0){ | |
| 853 | 888 | sql += " and r.xl_bm = '"+xlbm+"'"; |
| 854 | 889 | } |
| 855 | - sql += " group by r.j_gh,r.xl_bm,r.cl_zbh,r.j_name order by r.xl_bm,r.cl_zbh"; | |
| 890 | + if(gsdm.length() != 0){ | |
| 891 | + sql += " and r.gs_bm ='"+gsdm+"'"; | |
| 892 | + } | |
| 893 | + if(fgsdm.length() != 0){ | |
| 894 | + sql += " and r.fgs_bm ='"+fgsdm+"'"; | |
| 895 | + } | |
| 896 | + sql += " group by r.j_gh,r.xl_bm,r.cl_zbh,r.j_name order by r.xl_bm,r.cl_zbh"; | |
| 897 | + | |
| 856 | 898 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 857 | 899 | @Override |
| 858 | 900 | public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { |
| ... | ... | @@ -861,20 +903,30 @@ public class FormsServiceImpl implements FormsService { |
| 861 | 903 | sin.setJsy(arg0.getString("j_gh")); |
| 862 | 904 | sin.setjName(arg0.getString("j_name")); |
| 863 | 905 | sin.setClzbh(arg0.getString("cl_zbh")); |
| 906 | + sin.setgS(arg0.getString("fgs_bm")); | |
| 864 | 907 | return sin; |
| 865 | 908 | } |
| 866 | 909 | }); |
| 910 | + | |
| 911 | + Collections.sort(list,new SingledataByXlbm()); | |
| 912 | + | |
| 867 | 913 | String linesql=""; |
| 868 | 914 | if(!xlbm.equals("")){ |
| 869 | 915 | linesql +=" and xlbm ='"+xlbm+"' "; |
| 870 | 916 | } |
| 871 | - String nysql="SELECT id,xlbm,nbbm, jsy,jzl as jzl,yh as yh,sh as sh FROM bsth_c_ylb " | |
| 917 | + if(!gsdm.equals("")){ | |
| 918 | + linesql +=" and ssgsdm ='"+gsdm+"' "; | |
| 919 | + } | |
| 920 | + if(!fgsdm.equals("")){ | |
| 921 | + linesql +=" and fgsdm ='"+fgsdm+"' "; | |
| 922 | + } | |
| 923 | + String nysql="SELECT id,xlbm,nbbm,jsy,jzl as jzl,yh as yh,sh as sh,fgsdm FROM bsth_c_ylb" | |
| 872 | 924 | + " WHERE rq = '"+startDate+"'" |
| 873 | - + " AND ssgsdm = '"+gsdm+"' AND fgsdm = '"+fgsdm+"'" +linesql | |
| 925 | + + linesql | |
| 874 | 926 | + " union" |
| 875 | - + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh FROM bsth_c_dlb" | |
| 927 | + + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh,fgsdm FROM bsth_c_dlb" | |
| 876 | 928 | + " WHERE rq = '"+startDate+"'" |
| 877 | - + " AND ssgsdm = '"+gsdm+"' AND fgsdm = '"+fgsdm+"'"+linesql; | |
| 929 | + + linesql; | |
| 878 | 930 | List<Singledata> listNy = jdbcTemplate.query(nysql, new RowMapper<Singledata>() { |
| 879 | 931 | @Override |
| 880 | 932 | public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { |
| ... | ... | @@ -885,6 +937,7 @@ public class FormsServiceImpl implements FormsService { |
| 885 | 937 | sin.setJzl(arg0.getString("jzl")); |
| 886 | 938 | sin.setHyl(arg0.getString("yh")); |
| 887 | 939 | sin.setUnyyyl(arg0.getString("sh")); |
| 940 | + sin.setgS(arg0.getString("fgsdm")); | |
| 888 | 941 | return sin; |
| 889 | 942 | } |
| 890 | 943 | }); |
| ... | ... | @@ -913,7 +966,7 @@ public class FormsServiceImpl implements FormsService { |
| 913 | 966 | s.setClzbh(clzbh); |
| 914 | 967 | s.setSgh(""); |
| 915 | 968 | s.setsName(""); |
| 916 | - s.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); | |
| 969 | + s.setgS(BasicData.businessFgsCodeNameMap.get(sin_.getgS()+"_"+gsdm)); | |
| 917 | 970 | s.setxL(line); |
| 918 | 971 | s.setXlmc(BasicData.lineCode2NameMap.get(line)); |
| 919 | 972 | s.setJzl(sin_.getJzl()); |
| ... | ... | @@ -983,27 +1036,29 @@ public class FormsServiceImpl implements FormsService { |
| 983 | 1036 | // sin.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); |
| 984 | 1037 | sin.setSgh(""); |
| 985 | 1038 | sin.setsName(""); |
| 986 | - sin.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); | |
| 1039 | + sin.setgS(BasicData.businessFgsCodeNameMap.get(sin.getgS()+"_"+gsdm)); | |
| 987 | 1040 | list_.add(sin); |
| 988 | 1041 | |
| 989 | 1042 | } |
| 990 | - Collections.sort(list_,new SingledataByXlbm()); | |
| 991 | 1043 | }else{ |
| 992 | 1044 | String sql="select r.s_gh,r.s_name, " |
| 993 | 1045 | + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" |
| 994 | 1046 | + " from bsth_c_s_sp_info_real r where " |
| 995 | 1047 | + " r.schedule_date_str = '"+startDate+"'" |
| 996 | 1048 | + " and r.s_gh !='' and r.s_gh is not null "; |
| 997 | - if(xlbm.equals("")){ | |
| 998 | - sql +="and r.gs_bm='"+gsdm+"' " | |
| 999 | - + " and r.fgs_bm='"+fgsdm+"'"; | |
| 1000 | - }else{ | |
| 1049 | + if(!xlbm.equals("")){ | |
| 1001 | 1050 | sql += " and r.xl_bm = '"+xlbm+"'"; |
| 1002 | 1051 | } |
| 1003 | - sql += " group by r.s_gh,r.s_name," | |
| 1052 | + if(!gsdm.equals("")){ | |
| 1053 | + sql += " and r.gs_bm = '"+gsdm+"'"; | |
| 1054 | + } | |
| 1055 | + if(!fgsdm.equals("")){ | |
| 1056 | + sql += " and r.fgs_bm = '"+fgsdm+"'"; | |
| 1057 | + } | |
| 1058 | + sql += " group by r.s_gh,r.s_name," | |
| 1004 | 1059 | + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; |
| 1005 | 1060 | |
| 1006 | - list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | |
| 1061 | + list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | |
| 1007 | 1062 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| 1008 | 1063 | @Override |
| 1009 | 1064 | public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { |
| ... | ... | @@ -1013,10 +1068,13 @@ public class FormsServiceImpl implements FormsService { |
| 1013 | 1068 | sin.setClzbh(arg0.getString("cl_zbh")); |
| 1014 | 1069 | sin.setSgh(arg0.getString("s_gh")); |
| 1015 | 1070 | sin.setsName(arg0.getString("s_name")); |
| 1071 | + sin.setgS(arg0.getString("fgs_bm")); | |
| 1016 | 1072 | return sin; |
| 1017 | 1073 | } |
| 1018 | 1074 | }); |
| 1019 | 1075 | |
| 1076 | + Collections.sort(list,new SingledataByXlbm()); | |
| 1077 | + | |
| 1020 | 1078 | for (int i = 0; i < list.size(); i++) { |
| 1021 | 1079 | Singledata sin=list.get(i); |
| 1022 | 1080 | String jsy=sin.getSgh(); |
| ... | ... | @@ -1058,15 +1116,36 @@ public class FormsServiceImpl implements FormsService { |
| 1058 | 1116 | sin.setClzbh(clzbh); |
| 1059 | 1117 | sin.setJsy(""); |
| 1060 | 1118 | sin.setjName(""); |
| 1061 | - sin.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); | |
| 1119 | + sin.setgS(BasicData.businessFgsCodeNameMap.get(sin.getgS()+"_"+gsdm)); | |
| 1062 | 1120 | sin.setHyl(""); |
| 1063 | 1121 | sin.setJzl(""); |
| 1064 | 1122 | sin.setUnyyyl(""); |
| 1065 | 1123 | list_.add(sin); |
| 1066 | 1124 | } |
| 1067 | - Collections.sort(list_,new SingledataByXlbm()); | |
| 1068 | 1125 | } |
| 1069 | - return list_; | |
| 1126 | + | |
| 1127 | + Map<String, Boolean> lineNature = lineService.lineNature(); | |
| 1128 | + List<Singledata> resList = new ArrayList<Singledata>(); | |
| 1129 | + for(Singledata s : list_){ | |
| 1130 | + String xlBm = s.getxL(); | |
| 1131 | + if(sfyy.length() != 0){ | |
| 1132 | + if(sfyy.equals("0")){ | |
| 1133 | + resList.add(s); | |
| 1134 | + } else if(sfyy.equals("1")){ | |
| 1135 | + if(lineNature.containsKey(xlBm) && lineNature.get(xlBm)){ | |
| 1136 | + resList.add(s); | |
| 1137 | + } | |
| 1138 | + } else { | |
| 1139 | + if(lineNature.containsKey(xlBm) && !lineNature.get(xlBm)){ | |
| 1140 | + resList.add(s); | |
| 1141 | + } | |
| 1142 | + } | |
| 1143 | + } else { | |
| 1144 | + resList.add(s); | |
| 1145 | + } | |
| 1146 | + } | |
| 1147 | + | |
| 1148 | + return resList; | |
| 1070 | 1149 | } |
| 1071 | 1150 | |
| 1072 | 1151 | |
| ... | ... | @@ -1098,12 +1177,15 @@ public class FormsServiceImpl implements FormsService { |
| 1098 | 1177 | String sql="select r.j_gh, r.xl_bm,r.cl_zbh,r.j_name" |
| 1099 | 1178 | + " from bsth_c_s_sp_info_real r where " |
| 1100 | 1179 | + " r.schedule_date_str = '"+startDate+"'"; |
| 1101 | - if(xlbm.equals("")){ | |
| 1102 | - sql +="and r.gs_bm='"+gsdm+"' " | |
| 1103 | - + " and r.fgs_bm='"+fgsdm+"'"; | |
| 1104 | - }else{ | |
| 1180 | + if(!xlbm.equals("")){ | |
| 1105 | 1181 | sql += " and r.xl_bm = '"+xlbm+"'"; |
| 1106 | 1182 | } |
| 1183 | + if(!gsdm.equals("")){ | |
| 1184 | + sql += " and r.gs_bm='"+gsdm+"'"; | |
| 1185 | + } | |
| 1186 | + if(!fgsdm.equals("")){ | |
| 1187 | + sql += " and r.fgs_bm='"+fgsdm+"'"; | |
| 1188 | + } | |
| 1107 | 1189 | sql += " group by r.j_gh,r.xl_bm,r.cl_zbh,r.j_name order by r.xl_bm,r.cl_zbh"; |
| 1108 | 1190 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 1109 | 1191 | @Override |
| ... | ... | @@ -1118,15 +1200,21 @@ public class FormsServiceImpl implements FormsService { |
| 1118 | 1200 | }); |
| 1119 | 1201 | String linesql=""; |
| 1120 | 1202 | if(!xlbm.equals("")){ |
| 1121 | - linesql +=" and xlbm ='"+xlbm+"' "; | |
| 1203 | + linesql += " and xlbm ='"+xlbm+"' "; | |
| 1122 | 1204 | } |
| 1205 | + if(!gsdm.equals("")){ | |
| 1206 | + linesql += " and ssgsdm ='"+gsdm+"'"; | |
| 1207 | + } | |
| 1208 | + if(!fgsdm.equals("")){ | |
| 1209 | + linesql += " and fgsdm ='"+fgsdm+"'"; | |
| 1210 | + } | |
| 1123 | 1211 | String nysql="SELECT id,xlbm,nbbm, jsy,jzl as jzl,yh as yh,sh as sh FROM bsth_c_ylb " |
| 1124 | 1212 | + " WHERE rq = '"+startDate+"'" |
| 1125 | - + " AND ssgsdm = '"+gsdm+"' AND fgsdm = '"+fgsdm+"'" +linesql | |
| 1213 | + + linesql | |
| 1126 | 1214 | + " union" |
| 1127 | 1215 | + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh FROM bsth_c_dlb" |
| 1128 | 1216 | + " WHERE rq = '"+startDate+"'" |
| 1129 | - + " AND ssgsdm = '"+gsdm+"' AND fgsdm = '"+fgsdm+"'"+linesql; | |
| 1217 | + + linesql; | |
| 1130 | 1218 | List<Singledata> listNy = jdbcTemplate.query(nysql, new RowMapper<Singledata>() { |
| 1131 | 1219 | @Override |
| 1132 | 1220 | public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { |
| ... | ... | @@ -1246,14 +1334,17 @@ public class FormsServiceImpl implements FormsService { |
| 1246 | 1334 | + " from bsth_c_s_sp_info_real r where " |
| 1247 | 1335 | + " r.schedule_date_str = '"+startDate+"'" |
| 1248 | 1336 | + " and r.s_gh !='' and r.s_gh is not null "; |
| 1249 | - if(xlbm.equals("")){ | |
| 1250 | - sql +="and r.gs_bm='"+gsdm+"' " | |
| 1251 | - + " and r.fgs_bm='"+fgsdm+"'"; | |
| 1252 | - }else{ | |
| 1337 | + if(!xlbm.equals("")){ | |
| 1253 | 1338 | sql += " and r.xl_bm = '"+xlbm+"'"; |
| 1254 | 1339 | } |
| 1255 | - sql += " group by r.s_gh,r.s_name," | |
| 1256 | - + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | |
| 1340 | + if(!gsdm.equals("")){ | |
| 1341 | + sql += " and r.gs_bm='"+gsdm+"'"; | |
| 1342 | + } | |
| 1343 | + if(!fgsdm.equals("")){ | |
| 1344 | + sql += " and r.fgs_bm='"+fgsdm+"'"; | |
| 1345 | + } | |
| 1346 | + sql += " group by r.s_gh,r.s_name," | |
| 1347 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | |
| 1257 | 1348 | |
| 1258 | 1349 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 1259 | 1350 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| ... | ... | @@ -1635,14 +1726,17 @@ public class FormsServiceImpl implements FormsService { |
| 1635 | 1726 | String sql="select r.s_gh,r.s_name, " |
| 1636 | 1727 | + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm" |
| 1637 | 1728 | + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+startDate+"'"; |
| 1638 | - if(xlbm.equals("")){ | |
| 1639 | - sql +="and r.gs_bm='"+gsdm+"' " | |
| 1640 | - + " and r.fgs_bm='"+fgsdm+"'"; | |
| 1641 | - }else{ | |
| 1729 | + if(!xlbm.equals("")){ | |
| 1642 | 1730 | sql += " and r.xl_bm = '"+xlbm+"'"; |
| 1643 | 1731 | } |
| 1644 | - sql += " group by r.s_gh,r.s_name," | |
| 1645 | - + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | |
| 1732 | + if(!gsdm.equals("")){ | |
| 1733 | + sql += " and r.gs_bm='"+gsdm+"'"; | |
| 1734 | + } | |
| 1735 | + if(!fgsdm.equals("")){ | |
| 1736 | + sql += " and r.fgs_bm='"+fgsdm+"'"; | |
| 1737 | + } | |
| 1738 | + sql += " group by r.s_gh,r.s_name," | |
| 1739 | + + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | |
| 1646 | 1740 | |
| 1647 | 1741 | List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 1648 | 1742 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| ... | ... | @@ -1929,14 +2023,17 @@ public class FormsServiceImpl implements FormsService { |
| 1929 | 2023 | + " from bsth_c_s_sp_info_real r where " |
| 1930 | 2024 | + " r.schedule_date_str = '"+startDate+"'" |
| 1931 | 2025 | + " and r.s_gh !='' and r.s_gh is not null "; |
| 1932 | - if(xlbm.equals("")){ | |
| 1933 | - sql +="and r.gs_bm='"+gsdm+"' " | |
| 1934 | - + " and r.fgs_bm='"+fgsdm+"'"; | |
| 1935 | - }else{ | |
| 2026 | + if(!xlbm.equals("")){ | |
| 1936 | 2027 | sql += " and r.xl_bm = '"+xlbm+"'"; |
| 1937 | 2028 | } |
| 1938 | - sql += " group by r.s_gh,r.s_name," | |
| 1939 | - + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | |
| 2029 | + if(!gsdm.equals("")){ | |
| 2030 | + sql += " and r.gs_bm='"+gsdm+"'"; | |
| 2031 | + } | |
| 2032 | + if(!fgsdm.equals("")){ | |
| 2033 | + sql += " and r.fgs_bm='"+fgsdm+"'"; | |
| 2034 | + } | |
| 2035 | + sql += " group by r.s_gh,r.s_name," | |
| 2036 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | |
| 1940 | 2037 | |
| 1941 | 2038 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 1942 | 2039 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| ... | ... | @@ -2205,13 +2302,16 @@ public class FormsServiceImpl implements FormsService { |
| 2205 | 2302 | + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" |
| 2206 | 2303 | + " from bsth_c_s_sp_info_real r where " |
| 2207 | 2304 | + " r.schedule_date_str = '"+startDate+"'" |
| 2208 | - + " and r.s_gh !='' and r.s_gh is not null "; | |
| 2209 | - if(xlbm.equals("")){ | |
| 2210 | - sql +="and r.gs_bm='"+gsdm+"' " | |
| 2211 | - + " and r.fgs_bm='"+fgsdm+"'"; | |
| 2212 | - }else{ | |
| 2305 | + + " and r.s_gh !='' and r.s_gh is not null "; | |
| 2306 | + if(!xlbm.equals("")){ | |
| 2213 | 2307 | sql += " and r.xl_bm = '"+xlbm+"'"; |
| 2214 | 2308 | } |
| 2309 | + if(!gsdm.equals("")){ | |
| 2310 | + sql += " and r.gs_bm='"+gsdm+"'"; | |
| 2311 | + } | |
| 2312 | + if(!fgsdm.equals("")){ | |
| 2313 | + sql += " and r.fgs_bm='"+fgsdm+"'"; | |
| 2314 | + } | |
| 2215 | 2315 | sql += " group by r.s_gh,r.s_name," |
| 2216 | 2316 | + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; |
| 2217 | 2317 | |
| ... | ... | @@ -2285,7 +2385,10 @@ public class FormsServiceImpl implements FormsService { |
| 2285 | 2385 | @Override |
| 2286 | 2386 | public List<Operationservice> operationservice(Map<String, Object> map) { |
| 2287 | 2387 | |
| 2288 | - String xlbm=map.get("line").toString().trim(); | |
| 2388 | + String sfyy=""; | |
| 2389 | + if(map.get("sfyy")!=null){ | |
| 2390 | + sfyy=map.get("sfyy").toString(); | |
| 2391 | + } | |
| 2289 | 2392 | String gsdm=""; |
| 2290 | 2393 | if(map.get("gsdmOperat")!=null){ |
| 2291 | 2394 | gsdm=map.get("gsdmOperat").toString(); |
| ... | ... | @@ -2294,37 +2397,72 @@ public class FormsServiceImpl implements FormsService { |
| 2294 | 2397 | if(map.get("fgsdmOperat")!=null){ |
| 2295 | 2398 | fgsdm=map.get("fgsdmOperat").toString(); |
| 2296 | 2399 | } |
| 2297 | - startDate=map.get("startDate").toString(); | |
| 2298 | - endDate =map.get("endDate").toString(); | |
| 2299 | - String sql="select r.xl_bm" | |
| 2400 | + String xlbm=map.get("line").toString().trim(); | |
| 2401 | + String startDate=map.get("startDate").toString(); | |
| 2402 | + String endDate =map.get("endDate").toString(); | |
| 2403 | + | |
| 2404 | + String sql="select r.xl_bm, r.gs_bm, r.fgs_bm" | |
| 2300 | 2405 | + " from bsth_c_s_sp_info_real r where" |
| 2301 | 2406 | + " r.schedule_date_str BETWEEN '"+startDate+"' and '"+endDate+"'"; |
| 2302 | - if(xlbm.equals("")){ | |
| 2303 | - sql +="and r.gs_bm='"+gsdm+"' " | |
| 2304 | - + " and r.fgs_bm='"+fgsdm+"'"; | |
| 2305 | - }else{ | |
| 2407 | + if(xlbm.length() != 0){ | |
| 2306 | 2408 | sql += " and r.xl_bm = '"+xlbm+"'"; |
| 2307 | 2409 | } |
| 2308 | - sql += " group by r.xl_bm"; | |
| 2309 | - | |
| 2410 | + if(gsdm.length() != 0){ | |
| 2411 | + sql += " and r.gs_bm='"+gsdm+"'"; | |
| 2412 | + } | |
| 2413 | + if(fgsdm.length() != 0){ | |
| 2414 | + sql += " and r.fgs_bm='"+fgsdm+"'"; | |
| 2415 | + } | |
| 2416 | + sql += " group by r.gs_bm, r.fgs_bm, r.xl_bm " + | |
| 2417 | + "order by r.gs_bm, r.fgs_bm, r.xl_bm"; | |
| 2418 | + | |
| 2419 | + System.out.println(sql); | |
| 2310 | 2420 | |
| 2311 | - List<Operationservice> list= jdbcTemplate.query(sql, new RowMapper<Operationservice>() { | |
| 2312 | - @Override | |
| 2313 | - public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { | |
| 2314 | - Operationservice ve = new Operationservice(); | |
| 2315 | - ve.setXlBm(arg0.getString("xl_bm")); | |
| 2316 | - return ve; | |
| 2421 | + List<Operationservice> query = jdbcTemplate.query(sql, new RowMapper<Operationservice>() { | |
| 2422 | + @Override | |
| 2423 | + public Operationservice mapRow(ResultSet arg0, int arg1) throws SQLException { | |
| 2424 | + Operationservice ve = new Operationservice(); | |
| 2425 | + ve.setXlBm(arg0.getString("xl_bm")); | |
| 2426 | + ve.setGs(arg0.getString("gs_bm")); | |
| 2427 | + ve.setFgs(arg0.getString("fgs_bm")); | |
| 2428 | + return ve; | |
| 2429 | + } | |
| 2430 | + }); | |
| 2431 | + | |
| 2432 | + List<Operationservice> list = new ArrayList<Operationservice>(); | |
| 2433 | + Map<String, Boolean> lineNature = lineService.lineNature(); | |
| 2434 | + for(Operationservice o : query){ | |
| 2435 | + o.setFgs(BasicData.businessFgsCodeNameMap.get(o.getFgs()+"_"+o.getGs())); | |
| 2436 | + | |
| 2437 | + String xl = o.getXlBm(); | |
| 2438 | + if(sfyy.length() != 0){ | |
| 2439 | + if(sfyy.equals("0")){ | |
| 2440 | + list.add(o); | |
| 2441 | + } else if(sfyy.equals("1")){ | |
| 2442 | + if(lineNature.containsKey(xl) && lineNature.get(xl)){ | |
| 2443 | + list.add(o); | |
| 2444 | + } | |
| 2445 | + } else { | |
| 2446 | + if(lineNature.containsKey(xl) && !lineNature.get(xl)){ | |
| 2447 | + list.add(o); | |
| 2448 | + } | |
| 2317 | 2449 | } |
| 2318 | - }); | |
| 2319 | - | |
| 2320 | - String ylbSql=" select * from bsth_c_ylb where rq BETWEEN '"+startDate+"' and '"+endDate+"'"; | |
| 2321 | - if(xlbm.equals("")){ | |
| 2322 | - ylbSql +="and ssgsdm='"+gsdm+"' " | |
| 2323 | - + " and fgsdm='"+fgsdm+"'"; | |
| 2324 | - }else{ | |
| 2450 | + } else { | |
| 2451 | + list.add(o); | |
| 2452 | + } | |
| 2453 | + } | |
| 2454 | + | |
| 2455 | + String ylbSql=" select * from bsth_c_ylb where rq BETWEEN '"+startDate+"' and '"+endDate+"'"; | |
| 2456 | + if(!xlbm.equals("")){ | |
| 2325 | 2457 | ylbSql += " and xlbm = '"+xlbm+"'"; |
| 2326 | 2458 | } |
| 2327 | - List<Ylb> ylbList= jdbcTemplate.query(ylbSql, new RowMapper<Ylb>() { | |
| 2459 | + if(!gsdm.equals("")){ | |
| 2460 | + ylbSql += " and ssgsdm='"+gsdm+"'"; | |
| 2461 | + } | |
| 2462 | + if(!fgsdm.equals("")){ | |
| 2463 | + ylbSql += " and fgsdm='"+fgsdm+"'"; | |
| 2464 | + } | |
| 2465 | + List<Ylb> ylbList= jdbcTemplate.query(ylbSql, new RowMapper<Ylb>() { | |
| 2328 | 2466 | @Override |
| 2329 | 2467 | public Ylb mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 2330 | 2468 | Ylb y = new Ylb(); |
| ... | ... | @@ -2333,16 +2471,19 @@ public class FormsServiceImpl implements FormsService { |
| 2333 | 2471 | y.setYh(arg0.getDouble("yh")); |
| 2334 | 2472 | return y; |
| 2335 | 2473 | } |
| 2336 | - }); | |
| 2474 | + }); | |
| 2337 | 2475 | |
| 2338 | - String dlbSql=" select * from bsth_c_dlb where rq BETWEEN '"+startDate+"' and '"+endDate+"'"; | |
| 2339 | - if(xlbm.equals("")){ | |
| 2340 | - ylbSql +="and ssgsdm='"+gsdm+"' " | |
| 2341 | - + " and fgsdm='"+fgsdm+"'"; | |
| 2342 | - }else{ | |
| 2476 | + String dlbSql=" select * from bsth_c_dlb where rq BETWEEN '"+startDate+"' and '"+endDate+"'"; | |
| 2477 | + if(!xlbm.equals("")){ | |
| 2343 | 2478 | ylbSql += " and xlbm = '"+xlbm+"'"; |
| 2344 | 2479 | } |
| 2345 | - List<Dlb> dlbList= jdbcTemplate.query(dlbSql, new RowMapper<Dlb>() { | |
| 2480 | + if(!gsdm.equals("")){ | |
| 2481 | + ylbSql += " and ssgsdm='"+gsdm+"'"; | |
| 2482 | + } | |
| 2483 | + if(!fgsdm.equals("")){ | |
| 2484 | + ylbSql += " and fgsdm='"+fgsdm+"'"; | |
| 2485 | + } | |
| 2486 | + List<Dlb> dlbList= jdbcTemplate.query(dlbSql, new RowMapper<Dlb>() { | |
| 2346 | 2487 | @Override |
| 2347 | 2488 | public Dlb mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 2348 | 2489 | Dlb d = new Dlb(); |
| ... | ... | @@ -2544,8 +2685,13 @@ public class FormsServiceImpl implements FormsService { |
| 2544 | 2685 | } |
| 2545 | 2686 | String rq2 = sdf1.format(d); |
| 2546 | 2687 | String rq3 = sdf1.format(d1); |
| 2547 | - String company = map.get("gsdmTurn").toString(); | |
| 2548 | - String subCompany = map.get("fgsdmTurn").toString(); | |
| 2688 | + String company = "", subCompany = ""; | |
| 2689 | + if(map.get("gsdmTurn") != null){ | |
| 2690 | + company = map.get("gsdmTurn").toString(); | |
| 2691 | + } | |
| 2692 | + if(map.get("fgsdmTurn") != null){ | |
| 2693 | + subCompany = map.get("fgsdmTurn").toString(); | |
| 2694 | + } | |
| 2549 | 2695 | String line = map.get("line").toString(); |
| 2550 | 2696 | String startDate = map.get("startDate").toString(); |
| 2551 | 2697 | String endDate = map.get("endDate").toString(); |
| ... | ... | @@ -2559,12 +2705,17 @@ public class FormsServiceImpl implements FormsService { |
| 2559 | 2705 | List<Line> lineList = lineRepository.findLineBygsBm(company, subCompany, line.length()==0?"%"+line+"%":line); |
| 2560 | 2706 | |
| 2561 | 2707 | String sql = "select gs_name, fgs_name, cl_zbh, fcsj, bc_type, xl_bm, xl_name, schedule_date" |
| 2562 | - + " from bsth_c_s_sp_info where gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"' " | |
| 2563 | - + "and schedule_date >= '"+startDate+"' " | |
| 2564 | - + "and schedule_date <= '"+endDate+"' "; | |
| 2708 | + + " from bsth_c_s_sp_info where " | |
| 2709 | + + "schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"' "; | |
| 2565 | 2710 | if(line.trim().length() != 0){ |
| 2566 | 2711 | sql += "and xl_bm = '"+line+"' "; |
| 2567 | 2712 | } |
| 2713 | + if(company.trim().length() != 0){ | |
| 2714 | + sql += "and gs_bm = '"+company+"' "; | |
| 2715 | + } | |
| 2716 | + if(subCompany.trim().length() != 0){ | |
| 2717 | + sql += "and fgs_bm = '"+subCompany+"' "; | |
| 2718 | + } | |
| 2568 | 2719 | List<SchedulePlanInfo> planList = jdbcTemplate.query(sql, new RowMapper<SchedulePlanInfo>() { |
| 2569 | 2720 | |
| 2570 | 2721 | @Override |
| ... | ... | @@ -2711,18 +2862,34 @@ public class FormsServiceImpl implements FormsService { |
| 2711 | 2862 | |
| 2712 | 2863 | e.printStackTrace(); |
| 2713 | 2864 | } |
| 2865 | + | |
| 2866 | + String gsbm = "", fgsbm = ""; | |
| 2867 | + if(map.get("gsdmEcecut")!=null){ | |
| 2868 | + gsbm = map.get("gsdmEcecut").toString(); | |
| 2869 | + } | |
| 2870 | + if(map.get("fgsdmEcecut")!=null){ | |
| 2871 | + fgsbm = map.get("fgsdmEcecut").toString(); | |
| 2872 | + } | |
| 2873 | + | |
| 2714 | 2874 | String rq2 = sdf1.format(d); |
| 2715 | 2875 | String rq3 = sdf1.format(d1); |
| 2716 | 2876 | |
| 2717 | 2877 | rq = rq2 + "-" + rq3; |
| 2718 | 2878 | |
| 2879 | + String where = ""; | |
| 2880 | + if(gsbm.trim().length() != 0){ | |
| 2881 | + where += " and gs_bm = '" + gsbm + "'"; | |
| 2882 | + } | |
| 2883 | + if(fgsbm.trim().length() != 0){ | |
| 2884 | + where += " and fgs_bm = '" + fgsbm + "'"; | |
| 2885 | + } | |
| 2886 | + | |
| 2719 | 2887 | String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,a.bc_type from " |
| 2720 | 2888 | + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type" |
| 2721 | 2889 | + " from bsth_c_s_sp_info" + " where schedule_date >= '" |
| 2722 | 2890 | + map.get("startDate").toString() + "' and schedule_date <= '" + map.get("endDate").toString() + "' and xl_bm='" |
| 2723 | 2891 | + map.get("line").toString() + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out')" |
| 2724 | - + " and gs_bm='"+ map.get("gsdmEcecut").toString() + "'" | |
| 2725 | - + " and fgs_bm='"+ map.get("fgsdmEcecut").toString() + "'" | |
| 2892 | + + where | |
| 2726 | 2893 | // + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type " |
| 2727 | 2894 | + " ) a left JOIN (" |
| 2728 | 2895 | + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl " |
| ... | ... | @@ -2899,14 +3066,17 @@ public class FormsServiceImpl implements FormsService { |
| 2899 | 3066 | + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm" |
| 2900 | 3067 | + " from bsth_c_s_sp_info_real r where " |
| 2901 | 3068 | + "r.schedule_date_str = '"+map.get("date").toString()+"'"; |
| 2902 | - if(xlbm.equals("")){ | |
| 2903 | - sql +="and r.gs_bm='"+gsbm+"' " | |
| 2904 | - + " and r.fgs_bm='"+fgsbm+"'"; | |
| 2905 | - }else{ | |
| 3069 | + if(!xlbm.equals("")){ | |
| 2906 | 3070 | sql += " and r.xl_bm = '"+xlbm+"'"; |
| 2907 | 3071 | } |
| 2908 | - sql += " group by r.schedule_date_str," | |
| 2909 | - + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | |
| 3072 | + if(!gsbm.equals("")){ | |
| 3073 | + sql += " and r.gs_bm='"+gsbm+"'"; | |
| 3074 | + } | |
| 3075 | + if(!fgsbm.equals("")){ | |
| 3076 | + sql += " and r.fgs_bm='"+fgsbm+"'"; | |
| 3077 | + } | |
| 3078 | + sql += " group by r.schedule_date_str," | |
| 3079 | + + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | |
| 2910 | 3080 | |
| 2911 | 3081 | List<Daily> list = jdbcTemplate.query(sql, new RowMapper<Daily>() { |
| 2912 | 3082 | @Override |
| ... | ... | @@ -2972,10 +3142,10 @@ public class FormsServiceImpl implements FormsService { |
| 2972 | 3142 | } |
| 2973 | 3143 | |
| 2974 | 3144 | class SingledataByXlbm implements Comparator<Singledata>{ |
| 2975 | - @Override | |
| 2976 | - public int compare(Singledata o1, Singledata o2) { | |
| 2977 | - // TODO Auto-generated method stub | |
| 2978 | - return (o2.getxL()+o2.getClzbh()).compareTo((o1.getxL()+o1.getClzbh())); | |
| 2979 | - } | |
| 3145 | + @Override | |
| 3146 | + public int compare(Singledata o1, Singledata o2) { | |
| 3147 | + // TODO Auto-generated method stub | |
| 3148 | + return (o1.getgS()+o1.getxL()+o1.getClzbh()).compareTo((o2.getgS()+o2.getxL()+o2.getClzbh())); | |
| 3149 | + } | |
| 2980 | 3150 | } |
| 2981 | 3151 | } | ... | ... |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| ... | ... | @@ -44,6 +44,7 @@ import com.bsth.repository.oil.DlbRepository; |
| 44 | 44 | import com.bsth.repository.oil.YlbRepository; |
| 45 | 45 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 46 | 46 | import com.bsth.service.BusIntervalService; |
| 47 | +import com.bsth.service.LineService; | |
| 47 | 48 | import com.bsth.service.report.CulateMileageService; |
| 48 | 49 | import com.bsth.service.schedule.PeopleCarPlanService; |
| 49 | 50 | import com.bsth.service.sys.DutyEmployeeService; |
| ... | ... | @@ -60,8 +61,11 @@ import com.google.gson.Gson; |
| 60 | 61 | public class BusIntervalServiceImpl implements BusIntervalService { |
| 61 | 62 | |
| 62 | 63 | @Autowired |
| 63 | - CulateMileageService culateService; | |
| 64 | + LineService lineService; | |
| 64 | 65 | |
| 66 | + @Autowired | |
| 67 | + CulateMileageService culateService; | |
| 68 | + | |
| 65 | 69 | @Autowired |
| 66 | 70 | private PeopleCarPlanService peopleCarPlanService; |
| 67 | 71 | |
| ... | ... | @@ -113,7 +117,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 113 | 117 | } |
| 114 | 118 | } |
| 115 | 119 | if(company.length() != 0){ |
| 116 | - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | |
| 120 | + sql += " and gs_bm = '"+company+"'"; | |
| 121 | + } | |
| 122 | + if(subCompany.length() != 0){ | |
| 123 | + sql += " and fgs_bm = '"+subCompany+"'"; | |
| 117 | 124 | } |
| 118 | 125 | if(normal){ |
| 119 | 126 | sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; |
| ... | ... | @@ -147,6 +154,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 147 | 154 | schedule.setAdjustExps(rs.getString("adjust_exps")); |
| 148 | 155 | schedule.setJhlcOrig(rs.getDouble("jhlc_orig")); |
| 149 | 156 | schedule.setRemarks(rs.getString("remarks")); |
| 157 | + schedule.setFgsBm(rs.getString("fgs_bm")); | |
| 150 | 158 | schedule.setGsName(rs.getString("gs_name")); |
| 151 | 159 | schedule.setFgsName(rs.getString("fgs_name")); |
| 152 | 160 | schedule.setDfAuto(rs.getBoolean("df_auto")); |
| ... | ... | @@ -419,8 +427,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 419 | 427 | List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); |
| 420 | 428 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 421 | 429 | |
| 422 | - String company = map.get("company").toString(); | |
| 423 | - String subCompany = map.get("subCompany").toString(); | |
| 430 | + String company = "", subCompany = ""; | |
| 431 | + if(map.get("company")!=null) | |
| 432 | + company = map.get("company").toString(); | |
| 433 | + if(map.get("subCompany")!=null) | |
| 434 | + subCompany = map.get("subCompany").toString(); | |
| 424 | 435 | String line = map.get("line").toString(); |
| 425 | 436 | String startDate = map.get("startDate").toString(); |
| 426 | 437 | String endDate = map.get("endDate").toString(); |
| ... | ... | @@ -429,6 +440,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 429 | 440 | String times1 = map.get("times1").toString(); |
| 430 | 441 | String times2 = map.get("times2").toString(); |
| 431 | 442 | String type = map.get("type").toString(); |
| 443 | + String sfyy = map.get("sfyy").toString(); | |
| 432 | 444 | int sfqr = Integer.valueOf(map.get("sfqr").toString()); |
| 433 | 445 | |
| 434 | 446 | if(startDate.length() == 0){ |
| ... | ... | @@ -467,6 +479,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 467 | 479 | // int startTime = Integer.valueOf(split[0].split(":")[0])*60 + Integer.valueOf(split[0].split(":")[1]); |
| 468 | 480 | // int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]); |
| 469 | 481 | |
| 482 | + Map<String, Boolean> lineNature = lineService.lineNature(); | |
| 483 | + | |
| 470 | 484 | for(ScheduleRealInfo schedule : list){ |
| 471 | 485 | if(schedule.isCcService()) |
| 472 | 486 | continue; |
| ... | ... | @@ -479,7 +493,19 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 479 | 493 | } |
| 480 | 494 | if(schedule.getXlName() == null || schedule.getXlName().trim().length() == 0) |
| 481 | 495 | continue; |
| 482 | - String key = schedule.getXlBm() + "/" + schedule.getXlName() + "/" + schedule.getQdzName(); | |
| 496 | + | |
| 497 | + if(lineNature.containsKey(schedule.getXlBm()) && lineNature.get(schedule.getXlBm()) != null){ | |
| 498 | + if(sfyy.equals("1") && !lineNature.get(schedule.getXlBm())){ | |
| 499 | + continue; | |
| 500 | + } else if(sfyy.equals("2") && lineNature.get(schedule.getXlBm())){ | |
| 501 | + continue; | |
| 502 | + } | |
| 503 | + } else if(sfyy.equals("2")){ | |
| 504 | + continue; | |
| 505 | + } | |
| 506 | + | |
| 507 | + String key = schedule.getXlBm() + "/" + schedule.getXlName() + "/" + schedule.getQdzName() | |
| 508 | + + "/" + schedule.getFgsName() + "/" + schedule.getFgsBm(); | |
| 483 | 509 | if(!keyMap.containsKey(key)) |
| 484 | 510 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); |
| 485 | 511 | keyMap.get(key).add(schedule); |
| ... | ... | @@ -592,7 +618,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 592 | 618 | tempMap.put("line", split[1]); |
| 593 | 619 | tempMap.put("qdz", split[2]); |
| 594 | 620 | tempMap.put("company", companyName); |
| 595 | - tempMap.put("subCompany", subCompanyName); | |
| 621 | + tempMap.put("subCompany", split[3]); | |
| 622 | + tempMap.put("fgsbm", split[4]); | |
| 596 | 623 | long jhInterval = 0l; |
| 597 | 624 | long sjInterval = 0l; |
| 598 | 625 | for(Long i : fcsjs) |
| ... | ... | @@ -622,7 +649,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 622 | 649 | Map<Long, List<Map<String, Object>>> sortMap = new HashMap<Long, List<Map<String, Object>>>(); |
| 623 | 650 | for(Map<String, Object> m : tempList){ |
| 624 | 651 | String times = m.get("times").toString(); |
| 625 | - Long sort = Long.valueOf(times.substring(0, 2)); | |
| 652 | + Long sort = Long.valueOf(times.substring(0, 2)) * 1000l | |
| 653 | + + Long.valueOf(m.get("fgsbm").toString()); | |
| 626 | 654 | if(!sortMap.containsKey(sort)){ |
| 627 | 655 | sortMap.put(sort, new ArrayList<Map<String, Object>>()); |
| 628 | 656 | sortList.add(sort); |
| ... | ... | @@ -649,7 +677,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 649 | 677 | }else if(statu.equals("0")){ |
| 650 | 678 | List<Long> longList = new ArrayList<Long>(); |
| 651 | 679 | for(String key : keyList){ |
| 652 | - long xlBm = Long.valueOf(key.split("/")[0]); | |
| 680 | + long xlBm = Long.valueOf(key.split("/")[4]) * 1000000l + Long.valueOf(key.split("/")[0]); | |
| 653 | 681 | if(!longList.contains(xlBm)) |
| 654 | 682 | longList.add(xlBm); |
| 655 | 683 | Collections.sort(longList); |
| ... | ... | @@ -657,7 +685,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 657 | 685 | for(long xlBm : longList){ |
| 658 | 686 | for(String key : keyList){ |
| 659 | 687 | String[] split = key.split("/"); |
| 660 | - if((long)Long.valueOf(split[0]) == xlBm){ | |
| 688 | + long kl = Long.valueOf(split[4]) * 1000000l + Long.valueOf(split[0]); | |
| 689 | + if(kl == xlBm){ | |
| 661 | 690 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 662 | 691 | List<Long> fcsjs = new ArrayList<Long>(); |
| 663 | 692 | List<Long> fcsjAs = new ArrayList<Long>(); |
| ... | ... | @@ -683,7 +712,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 683 | 712 | tempMap.put("line", split[1]); |
| 684 | 713 | tempMap.put("qdz", split[2]); |
| 685 | 714 | tempMap.put("company", companyName); |
| 686 | - tempMap.put("subCompany", subCompanyName); | |
| 715 | + tempMap.put("subCompany", split[3]); | |
| 716 | + tempMap.put("fgsbm", split[4]); | |
| 687 | 717 | tempMap.put("jhInterval", fcsjs.size()>0?df.format((double)fcsj/fcsjs.size()):"/"); |
| 688 | 718 | tempMap.put("sjInterval", fcsjAs.size()>0?df.format((double)fcsjA/fcsjAs.size()):"/"); |
| 689 | 719 | tempMap.put("MaxInterval", fcsjAs.size()>0?fcsjAs.get(fcsjAs.size() - 1):"/"); |
| ... | ... | @@ -745,9 +775,13 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 745 | 775 | Set<Long> tsSet = new HashSet<Long>(); |
| 746 | 776 | Set<Long> ttSet = new HashSet<Long>(); |
| 747 | 777 | |
| 748 | - String company = map.get("company").toString(); | |
| 749 | - String subCompany = map.get("subCompany").toString(); | |
| 778 | + String company = "", subCompany = ""; | |
| 779 | + if(map.get("company")!=null) | |
| 780 | + company = map.get("company").toString(); | |
| 781 | + if(map.get("subCompany")!=null) | |
| 782 | + subCompany = map.get("subCompany").toString(); | |
| 750 | 783 | String lp = map.get("lp").toString(); |
| 784 | + String sfyy = map.get("sfyy").toString(); | |
| 751 | 785 | String line = map.get("line").toString(); |
| 752 | 786 | String statu = map.get("statu").toString(); |
| 753 | 787 | String startDate = map.get("startDate").toString(); |
| ... | ... | @@ -775,7 +809,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 775 | 809 | where += " and lp_name = '"+lp+"'"; |
| 776 | 810 | } |
| 777 | 811 | if(company.length() != 0){ |
| 778 | - where += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | |
| 812 | + where += " and gs_bm = '"+company+"'"; | |
| 813 | + } | |
| 814 | + if(subCompany.length() != 0){ | |
| 815 | + where += " and fgs_bm = '"+subCompany+"'"; | |
| 779 | 816 | } |
| 780 | 817 | if(sfqr == 1){ |
| 781 | 818 | where += " and zdsj >= '"+times1+"' and fcsj <= '"+times2+"'"; |
| ... | ... | @@ -783,7 +820,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 783 | 820 | // where += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; |
| 784 | 821 | where += " and bc_type != 'ldks'"; |
| 785 | 822 | |
| 786 | - String sql = "select id, schedule_date_str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type," | |
| 823 | + String sql = "select id, schedule_date_str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type, xl_bm, fgs_bm," | |
| 787 | 824 | + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id" |
| 788 | 825 | + " ,cc_service from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate+"'" |
| 789 | 826 | + " and schedule_date_str <= '"+endDate+"'"+where+""; |
| ... | ... | @@ -796,6 +833,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 796 | 833 | schedule.setId(rs.getLong("id")); |
| 797 | 834 | schedule.setScheduleDateStr(rs.getString("schedule_date_str")); |
| 798 | 835 | schedule.setRealExecDate(rs.getString("real_exec_date")); |
| 836 | + schedule.setXlBm(rs.getString("xl_bm")); | |
| 799 | 837 | schedule.setXlName(rs.getString("xl_name")); |
| 800 | 838 | schedule.setLpName(rs.getString("lp_name")); |
| 801 | 839 | schedule.setBcs(rs.getInt("bcs")); |
| ... | ... | @@ -813,6 +851,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 813 | 851 | schedule.setRemarks(rs.getString("remarks")); |
| 814 | 852 | schedule.setGsName(rs.getString("gs_name")); |
| 815 | 853 | schedule.setFgsName(rs.getString("fgs_name")); |
| 854 | + schedule.setFgsBm(rs.getString("fgs_bm")); | |
| 816 | 855 | schedule.setSpId(rs.getLong("sp_id")); |
| 817 | 856 | schedule.setCcService(rs.getBoolean("cc_service")); |
| 818 | 857 | |
| ... | ... | @@ -877,7 +916,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 877 | 916 | sql += " and xl_bm = '"+line+"'"; |
| 878 | 917 | } |
| 879 | 918 | if(company.length() != 0){ |
| 880 | - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | |
| 919 | + sql += " and gs_bm = '"+company+"'"; | |
| 920 | + } | |
| 921 | + if(subCompany.length() != 0){ | |
| 922 | + sql += " and fgs_bm = '"+subCompany+"'"; | |
| 881 | 923 | } |
| 882 | 924 | temp1 = jdbcTemplate.query(sql, |
| 883 | 925 | new RowMapper<Map<String, String>>(){ |
| ... | ... | @@ -1002,13 +1044,26 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1002 | 1044 | cMap.get(key).add(cTask); |
| 1003 | 1045 | } |
| 1004 | 1046 | |
| 1047 | + Map<String, Boolean> lineNature = lineService.lineNature(); | |
| 1048 | + | |
| 1005 | 1049 | for(ScheduleRealInfo schedule : list){ |
| 1006 | 1050 | if(schedule.getXlName()==null || schedule.getXlName().trim().length()==0 |
| 1007 | 1051 | || schedule.isCcService()) |
| 1008 | 1052 | continue; |
| 1053 | + String xlBm = schedule.getXlBm(); | |
| 1054 | + if(lineNature.containsKey(xlBm) && lineNature.get(xlBm) != null){ | |
| 1055 | + if(sfyy.equals("1") && !lineNature.get(xlBm)){ | |
| 1056 | + continue; | |
| 1057 | + } else if(sfyy.equals("2") && lineNature.get(xlBm)){ | |
| 1058 | + continue; | |
| 1059 | + } | |
| 1060 | + } else if(sfyy.equals("2")){ | |
| 1061 | + continue; | |
| 1062 | + } | |
| 1063 | + String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" | |
| 1064 | + + schedule.getLpName() + "/" + schedule.getFgsName(); | |
| 1009 | 1065 | if(model.length() != 0){ |
| 1010 | 1066 | if(ttSet.contains(schedule.getSpId())){ |
| 1011 | - String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName(); | |
| 1012 | 1067 | if(!keyMap.containsKey(key)) |
| 1013 | 1068 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); |
| 1014 | 1069 | keyMap.get(key).add(schedule); |
| ... | ... | @@ -1023,7 +1078,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1023 | 1078 | // } |
| 1024 | 1079 | // } |
| 1025 | 1080 | }else{ |
| 1026 | - String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName(); | |
| 1027 | 1081 | if(!keyMap.containsKey(key)) |
| 1028 | 1082 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); |
| 1029 | 1083 | keyMap.get(key).add(schedule); |
| ... | ... | @@ -1081,9 +1135,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1081 | 1135 | }else{ |
| 1082 | 1136 | jhyysj += fcsj2 - fcsj1; |
| 1083 | 1137 | } |
| 1084 | - if(jhyysj < 0){ | |
| 1085 | - System.out.println(fcsj2 + " - " + fcsj1 + " = " + (fcsj2 - fcsj1)); | |
| 1086 | - } | |
| 1087 | 1138 | jhyysj1 += fcsj2 - fcsj1; |
| 1088 | 1139 | } |
| 1089 | 1140 | if(i == 1 && schedule1.getBcType().toString().equals("normal")){ |
| ... | ... | @@ -1220,9 +1271,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1220 | 1271 | sjlc += Double.valueOf(m.get("lc").toString()); |
| 1221 | 1272 | } |
| 1222 | 1273 | } |
| 1223 | - tempMap.put("company", companyName); | |
| 1224 | - tempMap.put("subCompany", subCompanyName); | |
| 1225 | 1274 | String[] split = key.split("/"); |
| 1275 | + tempMap.put("company", companyName); | |
| 1276 | + tempMap.put("subCompany", split[3]); | |
| 1226 | 1277 | tempMap.put("date", split[0]); |
| 1227 | 1278 | tempMap.put("line", split[1]); |
| 1228 | 1279 | tempMap.put("lp", split[2]); |
| ... | ... | @@ -1272,7 +1323,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1272 | 1323 | } |
| 1273 | 1324 | Map<String, List<Map<String, Object>>> keyMap2 = new HashMap<String, List<Map<String, Object>>>(); |
| 1274 | 1325 | for(Map<String, Object> m : resList){ |
| 1275 | - String key = m.get("line").toString() + "/" + m.get("lp").toString(); | |
| 1326 | + String key = m.get("line").toString() + "/" + m.get("lp").toString() | |
| 1327 | + + "/" + m.get("subCompany").toString(); | |
| 1276 | 1328 | if(!keyMap2.containsKey(key)) |
| 1277 | 1329 | keyMap2.put(key, new ArrayList<Map<String, Object>>()); |
| 1278 | 1330 | keyMap2.get(key).add(m); |
| ... | ... | @@ -1333,6 +1385,32 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1333 | 1385 | return a.compareTo(b); |
| 1334 | 1386 | } |
| 1335 | 1387 | }); |
| 1388 | + Collections.sort(list3, new Comparator<String>() { | |
| 1389 | + | |
| 1390 | + public int compare(String o1, String o2) { | |
| 1391 | + | |
| 1392 | + Long a = 0l; | |
| 1393 | + Long b = 0l; | |
| 1394 | + String[] split1 = o1.split("/"); | |
| 1395 | + String[] split2 = o2.split("/"); | |
| 1396 | + char[] charArray1 = split1[2].toCharArray(); | |
| 1397 | + char[] charArray2 = split2[2].toCharArray(); | |
| 1398 | + for(int i = 0; i < charArray1.length; i++){ | |
| 1399 | + long temp = 1l; | |
| 1400 | + for(int j = 0; j < i; j++) | |
| 1401 | + temp *= 10; | |
| 1402 | + a += (long)charArray1[charArray1.length - 1 - i] * temp; | |
| 1403 | + } | |
| 1404 | + for(int i = 0; i < charArray2.length; i++){ | |
| 1405 | + long temp = 1l; | |
| 1406 | + for(int j = 0; j < i; j++) | |
| 1407 | + temp *= 10; | |
| 1408 | + b += (long)charArray2[charArray2.length - 1 - i] * temp; | |
| 1409 | + } | |
| 1410 | + | |
| 1411 | + return a.compareTo(b); | |
| 1412 | + } | |
| 1413 | + }); | |
| 1336 | 1414 | for(String key : list3){ |
| 1337 | 1415 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 1338 | 1416 | BigDecimal jhyysj = new BigDecimal(0), jhyssj = new BigDecimal(0); |
| ... | ... | @@ -1362,7 +1440,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1362 | 1440 | tempMap.put("line", split[0]); |
| 1363 | 1441 | tempMap.put("lp", split[1]); |
| 1364 | 1442 | tempMap.put("company", companyName); |
| 1365 | - tempMap.put("subCompany", subCompanyName); | |
| 1443 | + tempMap.put("subCompany", split[2]); | |
| 1366 | 1444 | tempMap.put("date", date); |
| 1367 | 1445 | list4.add(tempMap); |
| 1368 | 1446 | } |
| ... | ... | @@ -1373,7 +1451,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1373 | 1451 | List<Map<String, Object>> list5 = new ArrayList<Map<String, Object>>(); |
| 1374 | 1452 | List<String> keyList = new ArrayList<String>(); |
| 1375 | 1453 | for(Map<String, Object> m : list4){ |
| 1376 | - String key = m.get("line").toString(); | |
| 1454 | + String key = m.get("line").toString() + "/" + m.get("subCompany").toString(); | |
| 1377 | 1455 | if(!keyMap4.containsKey(key)){ |
| 1378 | 1456 | keyList.add(key); |
| 1379 | 1457 | keyMap4.put(key, new ArrayList<Map<String, Object>>()); |
| ... | ... | @@ -1405,10 +1483,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1405 | 1483 | tempMap.put("sjyssj", sjyssj.equals(0)?0:sjyssj.divide(size, 2, RoundingMode.HALF_UP)); |
| 1406 | 1484 | tempMap.put("sjyycs", sjyycs.equals(0)?0:sjyycs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1407 | 1485 | tempMap.put("sjyscs", sjyscs.equals(0)?0:sjyscs.divide(size, 2, RoundingMode.HALF_UP)); |
| 1408 | - tempMap.put("line", key); | |
| 1486 | + String[] split = key.split("/"); | |
| 1487 | + tempMap.put("line", split[0]); | |
| 1409 | 1488 | tempMap.put("lp", keyMap4.get(key).size()); |
| 1410 | 1489 | tempMap.put("company", companyName); |
| 1411 | - tempMap.put("subCompany", subCompanyName); | |
| 1490 | + tempMap.put("subCompany", split[1]); | |
| 1412 | 1491 | tempMap.put("date", date); |
| 1413 | 1492 | tempMap.put("work", keyMap4.get(key)); |
| 1414 | 1493 | list5.add(tempMap); |
| ... | ... | @@ -1491,8 +1570,13 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1491 | 1570 | Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); |
| 1492 | 1571 | Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); |
| 1493 | 1572 | |
| 1494 | - String company = map.get("company").toString(); | |
| 1495 | - String subCompany = map.get("subCompany").toString(); | |
| 1573 | + String sfqr = "", company = "", subCompany = ""; | |
| 1574 | + if(map.get("sfqr")!=null) | |
| 1575 | + sfqr = map.get("sfqr").toString(); | |
| 1576 | + if(map.get("company")!=null) | |
| 1577 | + company = map.get("company").toString(); | |
| 1578 | + if(map.get("subCompany")!=null) | |
| 1579 | + subCompany = map.get("subCompany").toString(); | |
| 1496 | 1580 | String line = map.get("line").toString(); |
| 1497 | 1581 | String startDate = map.get("startDate").toString(); |
| 1498 | 1582 | String endDate = map.get("endDate").toString(); |
| ... | ... | @@ -1510,6 +1594,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1510 | 1594 | if(times.length() == 0){ |
| 1511 | 1595 | times = "05:00-23:00"; |
| 1512 | 1596 | } |
| 1597 | + if(sfqr.equals("0")){ | |
| 1598 | + times = ""; | |
| 1599 | + } | |
| 1513 | 1600 | |
| 1514 | 1601 | list = getSchedule(company, subCompany, line, startDate, endDate, model, times, false); |
| 1515 | 1602 | |
| ... | ... | @@ -1522,9 +1609,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1522 | 1609 | date = startDate; |
| 1523 | 1610 | } |
| 1524 | 1611 | |
| 1525 | - String[] split = times.split("-"); | |
| 1526 | - int startTime = Integer.valueOf(split[0].split(":")[0])*60 + Integer.valueOf(split[0].split(":")[1]); | |
| 1527 | - int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]); | |
| 1612 | +// String[] split = times.split("-"); | |
| 1613 | +// int startTime = Integer.valueOf(split[0].split(":")[0])*60 + Integer.valueOf(split[0].split(":")[1]); | |
| 1614 | +// int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]); | |
| 1528 | 1615 | |
| 1529 | 1616 | for(ScheduleRealInfo s : list){ |
| 1530 | 1617 | if(s.isCcService()){ |
| ... | ... | @@ -1708,7 +1795,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1708 | 1795 | |
| 1709 | 1796 | Map<String, Object> m = mapList.get(0); |
| 1710 | 1797 | tempMap.put("dates", date); |
| 1711 | - tempMap.put("times", times); | |
| 1798 | + tempMap.put("times", times.length()==0?"全日":times); | |
| 1712 | 1799 | tempMap.put("line", m.get("line")); |
| 1713 | 1800 | tempMap.put("lp", m.get("lp")); |
| 1714 | 1801 | tempMap.put("station", m.get("station")); |
| ... | ... | @@ -1730,10 +1817,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1730 | 1817 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 1731 | 1818 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 1732 | 1819 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 1733 | - | |
| 1734 | - String company = map.get("company").toString(); | |
| 1735 | - String subCompany = map.get("subCompany").toString(); | |
| 1820 | + | |
| 1821 | + String company = "", subCompany = ""; | |
| 1822 | + String sfyy = map.get("sfyy").toString(); | |
| 1736 | 1823 | String line = map.get("line").toString(); |
| 1824 | + if(map.get("company")!=null) | |
| 1825 | + company = map.get("company").toString(); | |
| 1826 | + if(map.get("subCompany")!=null) | |
| 1827 | + subCompany = map.get("subCompany").toString(); | |
| 1737 | 1828 | String startDate = map.get("startDate").toString(); |
| 1738 | 1829 | String endDate = map.get("endDate").toString(); |
| 1739 | 1830 | String model = map.get("model").toString(); |
| ... | ... | @@ -1777,17 +1868,86 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1777 | 1868 | int startTime = Integer.valueOf(split[0].split(":")[0])*60 + Integer.valueOf(split[0].split(":")[1]); |
| 1778 | 1869 | int endTime = Integer.valueOf(split[1].split(":")[0])*60 + Integer.valueOf(split[1].split(":")[1]); |
| 1779 | 1870 | |
| 1871 | + Map<String, Boolean> lineNature = lineService.lineNature(); | |
| 1872 | + | |
| 1780 | 1873 | for(ScheduleRealInfo schedule : list){ |
| 1781 | 1874 | Long fcsj = schedule.getFcsjT(); |
| 1782 | 1875 | if(sfqr == 1 && !(endTime!=0?fcsj>=startTime&&fcsj<endTime:fcsj>=startTime)){ |
| 1783 | 1876 | continue; |
| 1784 | 1877 | } |
| 1785 | - String key = schedule.getXlName(); | |
| 1878 | + | |
| 1879 | + String xlBm = schedule.getXlBm(); | |
| 1880 | + if(lineNature.containsKey(xlBm) && lineNature.get(xlBm) != null){ | |
| 1881 | + if(sfyy.equals("1") && !lineNature.get(xlBm)){ | |
| 1882 | + continue; | |
| 1883 | + } else if(sfyy.equals("2") && lineNature.get(xlBm)){ | |
| 1884 | + continue; | |
| 1885 | + } | |
| 1886 | + } else if(sfyy.equals("2")){ | |
| 1887 | + continue; | |
| 1888 | + } | |
| 1889 | + | |
| 1890 | + String key = schedule.getXlName() + "/" + schedule.getFgsName(); | |
| 1786 | 1891 | if(!keyMap.containsKey(key)) |
| 1787 | 1892 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); |
| 1788 | 1893 | keyMap.get(key).add(schedule); |
| 1789 | 1894 | } |
| 1790 | 1895 | |
| 1896 | + List<String> keyList = new ArrayList<String>(); | |
| 1897 | + keyList.addAll(keyMap.keySet()); | |
| 1898 | + Collections.sort(keyList, new Comparator<String>() { | |
| 1899 | + | |
| 1900 | + public int compare(String o1, String o2) { | |
| 1901 | + | |
| 1902 | + Long a = 0l; | |
| 1903 | + Long b = 0l; | |
| 1904 | + String[] split1 = o1.split("/"); | |
| 1905 | + String[] split2 = o2.split("/"); | |
| 1906 | + char[] charArray1 = split1[0].toCharArray(); | |
| 1907 | + char[] charArray2 = split2[0].toCharArray(); | |
| 1908 | + for(int i = 0; i < charArray1.length; i++){ | |
| 1909 | + long temp = 1l; | |
| 1910 | + for(int j = 0; j < i; j++) | |
| 1911 | + temp *= 10; | |
| 1912 | + a += (long)charArray1[charArray1.length - 1 - i] * temp; | |
| 1913 | + } | |
| 1914 | + for(int i = 0; i < charArray2.length; i++){ | |
| 1915 | + long temp = 1l; | |
| 1916 | + for(int j = 0; j < i; j++) | |
| 1917 | + temp *= 10; | |
| 1918 | + b += (long)charArray2[charArray2.length - 1 - i] * temp; | |
| 1919 | + } | |
| 1920 | + | |
| 1921 | + return a.compareTo(b); | |
| 1922 | + } | |
| 1923 | + }); | |
| 1924 | + Collections.sort(keyList, new Comparator<String>() { | |
| 1925 | + | |
| 1926 | + public int compare(String o1, String o2) { | |
| 1927 | + | |
| 1928 | + Long a = 0l; | |
| 1929 | + Long b = 0l; | |
| 1930 | + String[] split1 = o1.split("/"); | |
| 1931 | + String[] split2 = o2.split("/"); | |
| 1932 | + char[] charArray1 = split1[1].toCharArray(); | |
| 1933 | + char[] charArray2 = split2[1].toCharArray(); | |
| 1934 | + for(int i = 0; i < charArray1.length; i++){ | |
| 1935 | + long temp = 1l; | |
| 1936 | + for(int j = 0; j < i; j++) | |
| 1937 | + temp *= 10; | |
| 1938 | + a += (long)charArray1[charArray1.length - 1 - i] * temp; | |
| 1939 | + } | |
| 1940 | + for(int i = 0; i < charArray2.length; i++){ | |
| 1941 | + long temp = 1l; | |
| 1942 | + for(int j = 0; j < i; j++) | |
| 1943 | + temp *= 10; | |
| 1944 | + b += (long)charArray2[charArray2.length - 1 - i] * temp; | |
| 1945 | + } | |
| 1946 | + | |
| 1947 | + return a.compareTo(b); | |
| 1948 | + } | |
| 1949 | + }); | |
| 1950 | + | |
| 1791 | 1951 | Map<String, Object> temp = new HashMap<String, Object>(); |
| 1792 | 1952 | int jhbc_ = 0, sjbc_ = 0, |
| 1793 | 1953 | lzbc_ = 0, dmbc_ = 0, |
| ... | ... | @@ -1801,7 +1961,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1801 | 1961 | qclc_ = new BigDecimal("0"), kxlc_ = new BigDecimal("0"), |
| 1802 | 1962 | qhlc_ = new BigDecimal("0"), wylc_ = new BigDecimal("0"), |
| 1803 | 1963 | qtlc_ = new BigDecimal("0"); |
| 1804 | - for(String key : keyMap.keySet()){ | |
| 1964 | +// for(String key : keyMap.keySet()){ | |
| 1965 | + for(String key : keyList){ | |
| 1805 | 1966 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 1806 | 1967 | int jhbc = 0, sjbc = 0, |
| 1807 | 1968 | lzbc = 0, dmbc = 0, |
| ... | ... | @@ -1907,11 +2068,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 1907 | 2068 | if(jhlc.doubleValue() == 0d){ |
| 1908 | 2069 | flag = false; |
| 1909 | 2070 | } |
| 2071 | + String[] keys = key.split("/"); | |
| 1910 | 2072 | tempMap.put("date", Date); |
| 1911 | 2073 | tempMap.put("company", companyName); |
| 1912 | - tempMap.put("subCompany", subCompanyName); | |
| 2074 | + tempMap.put("subCompany", keys[1]); | |
| 1913 | 2075 | tempMap.put("times", sfqr == 1 ? times : "全日"); |
| 1914 | - tempMap.put("line", key); | |
| 2076 | + tempMap.put("line", keys[0]); | |
| 1915 | 2077 | tempMap.put("jhbc", jhbc); |
| 1916 | 2078 | tempMap.put("sjbc", sjbc); |
| 1917 | 2079 | tempMap.put("bcbfb", df.format(jhbc>0?(double)sjbc/jhbc*100:0)+"%"); |
| ... | ... | @@ -2055,10 +2217,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2055 | 2217 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 2056 | 2218 | Map<String, List<Map<String, Object>>> keyMap0 = new HashMap<String, List<Map<String, Object>>>(); |
| 2057 | 2219 | Map<String, List<Map<String, Object>>> keyMap1 = new HashMap<String, List<Map<String, Object>>>(); |
| 2058 | - | |
| 2059 | - String company = map.get("company").toString(); | |
| 2060 | - String subCompany = map.get("subCompany").toString(); | |
| 2220 | + | |
| 2221 | + String company = "", subCompany = ""; | |
| 2222 | + String sfyy = map.get("sfyy").toString(); | |
| 2061 | 2223 | String line = map.get("line").toString(); |
| 2224 | + if(map.get("company")!=null) | |
| 2225 | + company = map.get("company").toString(); | |
| 2226 | + if(map.get("subCompany")!=null) | |
| 2227 | + subCompany = map.get("subCompany").toString(); | |
| 2062 | 2228 | String startDate = map.get("startDate").toString(); |
| 2063 | 2229 | String endDate = map.get("endDate").toString(); |
| 2064 | 2230 | String times = map.get("times").toString(); |
| ... | ... | @@ -2091,7 +2257,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2091 | 2257 | } |
| 2092 | 2258 | } |
| 2093 | 2259 | if(company.length() != 0){ |
| 2094 | - sql += " and (gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"')"; | |
| 2260 | + sql += " and gs_bm = '"+company+"'"; | |
| 2261 | + } | |
| 2262 | + if(subCompany.length() != 0){ | |
| 2263 | + sql += " and fgs_bm = '"+subCompany+"'"; | |
| 2095 | 2264 | } |
| 2096 | 2265 | sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; |
| 2097 | 2266 | |
| ... | ... | @@ -2152,10 +2321,23 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2152 | 2321 | date = startDate; |
| 2153 | 2322 | else |
| 2154 | 2323 | date = startDate + "--" + endDate; |
| 2324 | + | |
| 2325 | + Map<String, Boolean> lineNature = lineService.lineNature(); | |
| 2155 | 2326 | |
| 2156 | 2327 | for(ScheduleRealInfo schedule : list){ |
| 2157 | 2328 | if(schedule.getXlName() == null || schedule.getXlName().trim().length() == 0) |
| 2158 | 2329 | continue; |
| 2330 | + String xlBm = schedule.getXlBm(); | |
| 2331 | + if(lineNature.containsKey(xlBm) && lineNature.get(xlBm) != null){ | |
| 2332 | + if(sfyy.equals("1") && !lineNature.get(xlBm)){ | |
| 2333 | + continue; | |
| 2334 | + } else if(sfyy.equals("2") && lineNature.get(xlBm)){ | |
| 2335 | + continue; | |
| 2336 | + } | |
| 2337 | + } else if(sfyy.equals("2")){ | |
| 2338 | + continue; | |
| 2339 | + } | |
| 2340 | + | |
| 2159 | 2341 | String key = schedule.getGsName() + "/" + schedule.getFgsName() + "/" + schedule.getXlBm(); |
| 2160 | 2342 | if(!keyMap.containsKey(key)) |
| 2161 | 2343 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); |
| ... | ... | @@ -2339,13 +2521,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2339 | 2521 | // tempMap.put("correctbl", df.format((double)(sddf + zddf + dxtz + lbtz)/sjbc*100) + "%"); |
| 2340 | 2522 | resList.add(tempMap); |
| 2341 | 2523 | } |
| 2524 | + | |
| 2342 | 2525 | //计算掉线调整 |
| 2343 | 2526 | String sqldot = "select * from " |
| 2344 | - + "logger_sch_modify where gsbm =? and fgsbm=? and rq BETWEEN ? and ? order by line_code,sch_id"; | |
| 2345 | - | |
| 2346 | - ; | |
| 2527 | + + "logger_sch_modify where gsbm = ? and fgsbm like ? and rq BETWEEN ? and ? order by line_code,sch_id"; | |
| 2528 | + | |
| 2529 | + | |
| 2347 | 2530 | List<SchEditInfoDto> listDot = jdbcTemplate.query(sqldot, |
| 2348 | - new BeanPropertyRowMapper(SchEditInfoDto.class),company,subCompany,map.get("startDate").toString(),map.get("endDate").toString()); | |
| 2531 | + new BeanPropertyRowMapper(SchEditInfoDto.class),company,"%"+subCompany+"%",map.get("startDate").toString(),map.get("endDate").toString()); | |
| 2349 | 2532 | int dxtzz=0; |
| 2350 | 2533 | Map<String, Object> mapSchId=new HashMap<String,Object>(); |
| 2351 | 2534 | for (int i = 0; i < resList.size(); i++) { |
| ... | ... | @@ -2860,21 +3043,28 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2860 | 3043 | String startDate = map.get("startDate").toString().trim(); |
| 2861 | 3044 | String endDate = map.get("endDate").toString().trim(); |
| 2862 | 3045 | String line = map.get("line").toString().trim(); |
| 2863 | - String company = map.get("gs").toString().trim(); | |
| 2864 | - String subCompany = map.get("fgs").toString().trim(); | |
| 3046 | + String company = "", subCompany = ""; | |
| 3047 | + if(map.get("gs")!=null) | |
| 3048 | + company = map.get("gs").toString().trim(); | |
| 3049 | + if(map.get("fgs")!=null) | |
| 3050 | + subCompany = map.get("fgs").toString().trim(); | |
| 3051 | + String sfyy = ""; | |
| 3052 | + if(map.get("sfyy")!=null) | |
| 3053 | + sfyy = map.get("sfyy").toString().trim(); | |
| 2865 | 3054 | |
| 2866 | 3055 | String sql = "select id, cl_zbh, fcsj, fcsj_actual, j_gh, j_name, lp_name, qdz_name, " + |
| 2867 | - "schedule_date_str, xl_name, zdsj, zdsj_actual, fgs_name, gs_name, xl_dir, xl_bm " + | |
| 3056 | + "schedule_date_str, xl_name, zdsj, zdsj_actual, fgs_bm, fgs_name, gs_name, xl_dir, xl_bm " + | |
| 2868 | 3057 | "from bsth_c_s_sp_info_real " + |
| 2869 | 3058 | "where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"' " + |
| 2870 | 3059 | "and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and cc_service = 0"; |
| 2871 | 3060 | |
| 2872 | 3061 | if(company.length() != 0) |
| 2873 | - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | |
| 3062 | + sql += " and gs_bm = '"+company+"'"; | |
| 3063 | + if(subCompany.length() != 0) | |
| 3064 | + sql += " and fgs_bm = '"+subCompany+"'"; | |
| 2874 | 3065 | if(line.length() != 0) |
| 2875 | 3066 | sql += " and xl_bm = '"+line+"'"; |
| 2876 | 3067 | |
| 2877 | - System.out.println(sql); | |
| 2878 | 3068 | List<ScheduleRealInfo> list = jdbcTemplate.query(sql, |
| 2879 | 3069 | new RowMapper<ScheduleRealInfo>(){ |
| 2880 | 3070 | @Override |
| ... | ... | @@ -2893,6 +3083,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2893 | 3083 | schedule.setQdzName(rs.getString("qdz_name")); |
| 2894 | 3084 | schedule.setGsName(rs.getString("gs_name")); |
| 2895 | 3085 | schedule.setFgsName(rs.getString("fgs_name")); |
| 3086 | + schedule.setFgsBm(rs.getString("fgs_bm")); | |
| 2896 | 3087 | schedule.setClZbh(rs.getString("cl_zbh")); |
| 2897 | 3088 | schedule.setjGh(rs.getString("j_gh")); |
| 2898 | 3089 | schedule.setjName(rs.getString("j_name")); |
| ... | ... | @@ -2903,8 +3094,21 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2903 | 3094 | Map<String, Map<String, List<ScheduleRealInfo>>> sches = new HashMap<String, Map<String, List<ScheduleRealInfo>>>(); |
| 2904 | 3095 | Map<String, List<List<Map<String, Object>>>> keyMap = new HashMap<String, List<List<Map<String, Object>>>>(); |
| 2905 | 3096 | |
| 3097 | + Map<String, Boolean> lineNature = lineService.lineNature(); | |
| 3098 | + | |
| 2906 | 3099 | for(ScheduleRealInfo s : list){ |
| 2907 | - String xl = s.getXlName(); | |
| 3100 | + String xlBm = s.getXlBm(); | |
| 3101 | + if(lineNature.containsKey(xlBm) && lineNature.get(xlBm) != null){ | |
| 3102 | + if(sfyy.equals("1") && !lineNature.get(xlBm)){ | |
| 3103 | + continue; | |
| 3104 | + } else if(sfyy.equals("2") && lineNature.get(xlBm)){ | |
| 3105 | + continue; | |
| 3106 | + } | |
| 3107 | + } else if(sfyy.equals("2")){ | |
| 3108 | + continue; | |
| 3109 | + } | |
| 3110 | + | |
| 3111 | + String xl = s.getXlName() + "/" + s.getFgsName(); | |
| 2908 | 3112 | String dateStr = s.getScheduleDateStr(); |
| 2909 | 3113 | if(!sches.containsKey(xl)){ |
| 2910 | 3114 | sches.put(xl, new HashMap<String, List<ScheduleRealInfo>>()); |
| ... | ... | @@ -2956,6 +3160,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 2956 | 3160 | Map<String, Object> temp = new HashMap<String, Object>(); |
| 2957 | 3161 | temp.put("gs", s.getGsName()); |
| 2958 | 3162 | temp.put("fgs", s.getFgsName()); |
| 3163 | + temp.put("fgsBm", s.getFgsBm()); | |
| 2959 | 3164 | temp.put("date", date); |
| 2960 | 3165 | temp.put("xlbm", s.getXlBm()); |
| 2961 | 3166 | temp.put("line", s.getXlName()); |
| ... | ... | @@ -3020,6 +3225,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 3020 | 3225 | } |
| 3021 | 3226 | tempMap.put("gs", list1.get(0).get(0).get("gs")); |
| 3022 | 3227 | tempMap.put("fgs", list1.get(0).get(0).get("fgs")); |
| 3228 | + tempMap.put("fgsBm", list1.get(0).get(0).get("fgsBm")); | |
| 3023 | 3229 | tempMap.put("line", list1.get(0).get(0).get("line")); |
| 3024 | 3230 | tempMap.put("date", list1.get(0).get(0).get("date")); |
| 3025 | 3231 | tempMap.put("xlbm", list1.get(0).get(0).get("xlbm")); |
| ... | ... | @@ -3077,6 +3283,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 3077 | 3283 | } |
| 3078 | 3284 | tempMap.put("gs", list2.get(0).get("gs")); |
| 3079 | 3285 | tempMap.put("fgs", list2.get(0).get("fgs")); |
| 3286 | + tempMap.put("fgsBm", list2.get(0).get("fgsBm")); | |
| 3080 | 3287 | tempMap.put("line", list2.get(0).get("line")); |
| 3081 | 3288 | tempMap.put("date", list2.get(0).get("date")); |
| 3082 | 3289 | tempMap.put("xl_date", list2.get(0).get("date") + "_" + list2.get(0).get("xlbm") + "_" + list2.get(0).get("line")); | ... | ... |
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
| ... | ... | @@ -26,6 +26,7 @@ import com.bsth.data.BasicData; |
| 26 | 26 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 27 | 27 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 28 | 28 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 29 | +import com.bsth.service.LineService; | |
| 29 | 30 | import com.bsth.service.schedule.PeopleCarPlanService; |
| 30 | 31 | import com.bsth.util.ReportUtils; |
| 31 | 32 | |
| ... | ... | @@ -36,6 +37,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 36 | 37 | private ScheduleRealInfoRepository scheduleRealInfoRepository; |
| 37 | 38 | |
| 38 | 39 | @Autowired |
| 40 | + private LineService lineService; | |
| 41 | + | |
| 42 | + @Autowired | |
| 39 | 43 | private JdbcTemplate jdbcTemplate; |
| 40 | 44 | |
| 41 | 45 | public List<ScheduleRealInfo> getSchedule(String company, String subCompany, String line, String date){ |
| ... | ... | @@ -47,7 +51,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 47 | 51 | if(line.length() != 0) |
| 48 | 52 | sql += " and xl_bm = '"+line+"'"; |
| 49 | 53 | if(company.length() != 0) |
| 50 | - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | |
| 54 | + sql += " and gs_bm = '"+company+"'"; | |
| 55 | + if(subCompany.length() != 0) | |
| 56 | + sql += " and fgs_bm = '"+subCompany+"'"; | |
| 51 | 57 | |
| 52 | 58 | list = jdbcTemplate.query(sql, |
| 53 | 59 | new RowMapper<ScheduleRealInfo>(){ |
| ... | ... | @@ -170,15 +176,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 170 | 176 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 171 | 177 | List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); |
| 172 | 178 | |
| 173 | - String company = ""; | |
| 174 | - String subCompany =""; | |
| 175 | - if(map.get("company")!=null){ | |
| 176 | - company = map.get("company").toString(); | |
| 177 | - } | |
| 178 | - | |
| 179 | - if(map.get("subCompany")!=null){ | |
| 179 | + String company = "", subCompany =""; | |
| 180 | + if(map.get("company")!=null) | |
| 181 | + company = map.get("company").toString(); | |
| 182 | + if(map.get("subCompany")!=null) | |
| 180 | 183 | subCompany = map.get("subCompany").toString(); |
| 181 | - } | |
| 182 | 184 | String line = map.get("line").toString(); |
| 183 | 185 | String date = map.get("date").toString(); |
| 184 | 186 | String type = map.get("type").toString(); |
| ... | ... | @@ -193,9 +195,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 193 | 195 | if(line.length() != 0){ |
| 194 | 196 | sql += " and xl_bm = '"+line+"'"; |
| 195 | 197 | } |
| 196 | - if(company.length() != 0){ | |
| 197 | - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | |
| 198 | - } | |
| 198 | + if(company.length() != 0) | |
| 199 | + sql += " and gs_bm = '"+company+"'"; | |
| 200 | + if(subCompany.length() != 0) | |
| 201 | + sql += " and fgs_bm = '"+subCompany+"'"; | |
| 199 | 202 | |
| 200 | 203 | list = jdbcTemplate.query(sql, |
| 201 | 204 | new RowMapper<SchedulePlanInfo>(){ |
| ... | ... | @@ -322,8 +325,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 322 | 325 | Set<String> lineSet = getNotOperation(); |
| 323 | 326 | DecimalFormat df = new DecimalFormat("###0.##"); |
| 324 | 327 | |
| 325 | - String company = map.get("company").toString(); | |
| 326 | - String subCompany = map.get("subCompany").toString(); | |
| 328 | + String company = "", subCompany = ""; | |
| 329 | + if(map.get("company")!=null) | |
| 330 | + company = map.get("company").toString(); | |
| 331 | + if(map.get("subCompany")!=null) | |
| 332 | + subCompany = map.get("subCompany").toString(); | |
| 327 | 333 | String line = map.get("line").toString(); |
| 328 | 334 | String date = map.get("date").toString(); |
| 329 | 335 | String type = map.get("type").toString(); |
| ... | ... | @@ -573,16 +579,19 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 573 | 579 | } |
| 574 | 580 | try { |
| 575 | 581 | |
| 576 | - String sql = "select schedule_date_str,xl_name,bc_type,gs_name,fgs_name,bcs,fcno," | |
| 577 | - +"fcsj,fcsj_actual,zdsj,zdsj_actual,bcsj,qdz_name,sp_id,cc_service" | |
| 582 | + String sql = "select schedule_date_str,xl_name,bc_type,gs_name,fgs_name,fgs_bm,bcs," | |
| 583 | + +"fcno,fcsj,fcsj_actual,zdsj,zdsj_actual,bcsj,qdz_name,sp_id,cc_service" | |
| 578 | 584 | +" from bsth_c_s_sp_info_real where schedule_date_str >= '"+startDate |
| 579 | 585 | +"' and schedule_date_str <= '"+endDate+"'"; |
| 580 | 586 | if(line.length() != 0){ |
| 581 | 587 | sql += " and xl_bm = '"+line+"'"; |
| 582 | 588 | } |
| 583 | -// if(company.length() != 0){ | |
| 584 | - sql += " and gs_bm like '%"+company+"%' and fgs_bm like '%"+subCompany+"%'"; | |
| 585 | -// } | |
| 589 | + if(company.length() != 0){ | |
| 590 | + sql += " and gs_bm = '"+company+"'"; | |
| 591 | + } | |
| 592 | + if(subCompany.length() != 0){ | |
| 593 | + sql += " and fgs_bm = '"+subCompany+"'"; | |
| 594 | + } | |
| 586 | 595 | sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; |
| 587 | 596 | if(Integer.valueOf(bcType) == 1){ |
| 588 | 597 | sql += " and bc_type != 'region'"; |
| ... | ... | @@ -599,6 +608,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 599 | 608 | schedule.setBcType(rs.getString("bc_type")); |
| 600 | 609 | schedule.setGsName(rs.getString("gs_name")); |
| 601 | 610 | schedule.setFgsName(rs.getString("fgs_name")); |
| 611 | + schedule.setFgsBm(rs.getString("fgs_bm")); | |
| 602 | 612 | schedule.setBcs(rs.getInt("bcs")); |
| 603 | 613 | schedule.setFcno(rs.getInt("fcno")); |
| 604 | 614 | schedule.setFcsj(rs.getString("fcsj")); |
| ... | ... | @@ -676,22 +686,23 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 676 | 686 | if(schedule.isCcService()){ |
| 677 | 687 | continue; |
| 678 | 688 | } |
| 689 | + | |
| 690 | + String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj()+"/"+schedule.getFgsBm(); | |
| 679 | 691 | if(model.length() != 0){ |
| 680 | 692 | if(ttSet.contains(schedule.getSpId())){ |
| 681 | - String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj(); | |
| 682 | 693 | if(!keyMap.containsKey(key)) |
| 683 | 694 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); |
| 684 | 695 | keyMap.get(key).add(schedule); |
| 685 | 696 | } |
| 686 | 697 | } else { |
| 687 | - String key = schedule.getXlName()+"/"+schedule.getQdzName()+"/"+schedule.getFcsj(); | |
| 688 | - if(!keyMap.containsKey(key)) | |
| 698 | + if(!keyMap.containsKey(key)){ | |
| 689 | 699 | keyMap.put(key, new ArrayList<ScheduleRealInfo>()); |
| 700 | + } | |
| 690 | 701 | keyMap.get(key).add(schedule); |
| 691 | 702 | } |
| 692 | 703 | } |
| 693 | - String companyName = "", subCompanyName = ""; | |
| 694 | 704 | for(String key : keyMap.keySet()){ |
| 705 | + String companyName = "", subCompanyName = ""; | |
| 695 | 706 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 696 | 707 | List<Integer> fcsj = new ArrayList<Integer>(); |
| 697 | 708 | List<Integer> yssj = new ArrayList<Integer>(); |
| ... | ... | @@ -777,7 +788,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 777 | 788 | Map<String, List<Map<String, Object>>> listMap = new HashMap<String, List<Map<String, Object>>>(); |
| 778 | 789 | Map<String, List<Map<String, Object>>> listMap2 = new HashMap<String, List<Map<String, Object>>>(); |
| 779 | 790 | for(Map<String, Object> m : tempList){ |
| 780 | - String key = m.get("line").toString() + m.get("qdz"); | |
| 791 | + String key = m.get("line").toString() + m.get("qdz") + m.get("subCompany"); | |
| 781 | 792 | if(!listMap.containsKey(key)) |
| 782 | 793 | listMap.put(key, new ArrayList<Map<String, Object>>()); |
| 783 | 794 | listMap.get(key).add(m); |
| ... | ... | @@ -889,9 +900,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 889 | 900 | if(nbbm.length() != 0){ |
| 890 | 901 | sql += " and cl_zbh like '%"+nbbm+"%'"; |
| 891 | 902 | } |
| 892 | -// if(company.length() != 0){ | |
| 893 | - sql += " and gs_bm like '%"+company+"%' and fgs_bm like '%"+subCompany+"%'"; | |
| 894 | -// } | |
| 903 | + if(company.length() != 0){ | |
| 904 | + sql += " and gs_bm like '"+company+"'"; | |
| 905 | + } | |
| 906 | + if(subCompany.length() != 0){ | |
| 907 | + sql += " and fgs_bm like '"+subCompany+"'"; | |
| 908 | + } | |
| 895 | 909 | sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; |
| 896 | 910 | if(bcType.trim().equals("1")){ |
| 897 | 911 | sql += " and bc_type != 'region'"; |
| ... | ... | @@ -1209,10 +1223,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1209 | 1223 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 1210 | 1224 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 1211 | 1225 | |
| 1212 | - Set<String> lineSet = getNotOperation(); | |
| 1213 | - | |
| 1214 | - String company = map.get("company").toString(); | |
| 1215 | - String subCompany = map.get("subCompany").toString(); | |
| 1226 | + String sfyy = "", company = "", subCompany = ""; | |
| 1227 | + if(map.get("sfyy")!=null) | |
| 1228 | + sfyy = map.get("sfyy").toString(); | |
| 1229 | + if(map.get("company")!=null) | |
| 1230 | + company = map.get("company").toString(); | |
| 1231 | + if(map.get("subCompany")!=null) | |
| 1232 | + subCompany = map.get("subCompany").toString(); | |
| 1216 | 1233 | String line = map.get("line").toString(); |
| 1217 | 1234 | String date = map.get("date").toString(); |
| 1218 | 1235 | String type = map.get("type").toString(); |
| ... | ... | @@ -1222,13 +1239,15 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1222 | 1239 | |
| 1223 | 1240 | try { |
| 1224 | 1241 | 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," |
| 1225 | - + " 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" | |
| 1242 | + + " a.xl_bm, a.fgs_bm, 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" | |
| 1226 | 1243 | + " where schedule_date_str = '"+date+"'" |
| 1227 | 1244 | + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'"; |
| 1228 | 1245 | if(line.trim().length() != 0) |
| 1229 | 1246 | sql += " and xl_bm = '"+line+"'"; |
| 1230 | - else if(company.length() != 0) | |
| 1231 | - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | |
| 1247 | + if(company.length() != 0) | |
| 1248 | + sql += " and gs_bm = '"+company+"'"; | |
| 1249 | + if(subCompany.length() != 0) | |
| 1250 | + sql += " and fgs_bm = '"+subCompany+"'"; | |
| 1232 | 1251 | |
| 1233 | 1252 | list = jdbcTemplate.query(sql, |
| 1234 | 1253 | new RowMapper<ScheduleRealInfo>(){ |
| ... | ... | @@ -1238,6 +1257,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1238 | 1257 | schedule.setScheduleDateStr(rs.getString("schedule_date_str")); |
| 1239 | 1258 | schedule.setRealExecDate(rs.getString("real_exec_date")); |
| 1240 | 1259 | schedule.setXlName(rs.getString("xl_name")); |
| 1260 | + schedule.setXlBm(rs.getString("xl_Bm")); | |
| 1241 | 1261 | schedule.setFcsj(rs.getString("fcsj")); |
| 1242 | 1262 | schedule.setFcsjActual(rs.getString("fcsj_actual")); |
| 1243 | 1263 | schedule.setZdsj(rs.getString("zdsj")); |
| ... | ... | @@ -1248,6 +1268,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1248 | 1268 | schedule.setStatus(rs.getInt("status")); |
| 1249 | 1269 | schedule.setGsName(rs.getString("gs_name")); |
| 1250 | 1270 | schedule.setFgsName(rs.getString("fgs_name")); |
| 1271 | + schedule.setFgsBm(rs.getString("fgs_bm")); | |
| 1251 | 1272 | schedule.setCcService(rs.getBoolean("cc_service")); |
| 1252 | 1273 | |
| 1253 | 1274 | int startOpt = 0; |
| ... | ... | @@ -1287,26 +1308,58 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1287 | 1308 | } |
| 1288 | 1309 | |
| 1289 | 1310 | Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); |
| 1290 | - String companyName = "", subCompanyName = ""; | |
| 1311 | + Map<String, Boolean> lineNature = lineService.lineNature(); | |
| 1291 | 1312 | |
| 1292 | 1313 | for(ScheduleRealInfo s : list){ |
| 1293 | - if(lineSet.contains(s.getXlName()) || s.isCcService()){ | |
| 1314 | + if(s.isCcService()){ | |
| 1294 | 1315 | continue; |
| 1295 | 1316 | } |
| 1296 | - String xlName = s.getXlName(); | |
| 1297 | - if(!keyMap.containsKey(xlName)) | |
| 1298 | - keyMap.put(xlName, new ArrayList<ScheduleRealInfo>()); | |
| 1299 | - keyMap.get(xlName).add(s); | |
| 1300 | - if(companyName.length()==0&&s.getGsName()!=null&&s.getGsName().trim().length()!=0) | |
| 1301 | - companyName = s.getGsName(); | |
| 1302 | - if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0) | |
| 1303 | - subCompanyName = s.getFgsName(); | |
| 1317 | + | |
| 1318 | + String xlbm = s.getXlBm(); | |
| 1319 | + boolean flag = false; | |
| 1320 | + if(sfyy.length() != 0){ | |
| 1321 | + if(sfyy.equals("0")){ | |
| 1322 | + flag = true; | |
| 1323 | + } else if(sfyy.equals("1")){ | |
| 1324 | + if(lineNature.containsKey(xlbm) && lineNature.get(xlbm)){ | |
| 1325 | + flag = true; | |
| 1326 | + } | |
| 1327 | + } else { | |
| 1328 | + if(lineNature.containsKey(xlbm) && !lineNature.get(xlbm)){ | |
| 1329 | + flag = true; | |
| 1330 | + } | |
| 1331 | + } | |
| 1332 | + } else { | |
| 1333 | + flag = true; | |
| 1334 | + } | |
| 1335 | + if(!flag){ | |
| 1336 | + continue; | |
| 1337 | + } | |
| 1338 | + | |
| 1339 | + String key = s.getXlName() + "/" + s.getXlBm() + "/" + s.getFgsBm(); | |
| 1340 | + if(!keyMap.containsKey(key)){ | |
| 1341 | + keyMap.put(key, new ArrayList<ScheduleRealInfo>()); | |
| 1342 | + } | |
| 1343 | + keyMap.get(key).add(s); | |
| 1344 | + } | |
| 1345 | + | |
| 1346 | + //给key排序 | |
| 1347 | + List<Long> longList = new ArrayList<Long>(); | |
| 1348 | + Map<Long, String> longMap = new HashMap<Long, String>(); | |
| 1349 | + for(String key : keyMap.keySet()){ | |
| 1350 | + String[] keys = key.split("/"); | |
| 1351 | + Long l = Long.valueOf(keys[2]) * 10000000000l + Long.valueOf(keys[1]); | |
| 1352 | + longMap.put(l, key); | |
| 1353 | + longList.add(l); | |
| 1304 | 1354 | } |
| 1355 | + Collections.sort(longList); | |
| 1305 | 1356 | |
| 1306 | - for(String xlName : keyMap.keySet()){ | |
| 1357 | + for(Long l : longList){ | |
| 1358 | + String key = longMap.get(l); | |
| 1307 | 1359 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 1360 | + String[] keys = key.split("/"); | |
| 1308 | 1361 | tempMap.put("date", date.substring(5)); |
| 1309 | - tempMap.put("line", xlName); | |
| 1362 | + tempMap.put("line", keys[0]); | |
| 1310 | 1363 | List<Long> up1 = new ArrayList<Long>(); |
| 1311 | 1364 | List<Long> up2 = new ArrayList<Long>(); |
| 1312 | 1365 | List<Long> dn1 = new ArrayList<Long>(); |
| ... | ... | @@ -1315,7 +1368,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1315 | 1368 | Map<Long, ScheduleRealInfo> up2Map = new HashMap<Long, ScheduleRealInfo>(); |
| 1316 | 1369 | Map<Long, ScheduleRealInfo> dn1Map = new HashMap<Long, ScheduleRealInfo>(); |
| 1317 | 1370 | Map<Long, ScheduleRealInfo> dn2Map = new HashMap<Long, ScheduleRealInfo>(); |
| 1318 | - for(ScheduleRealInfo s : keyMap.get(xlName)){ | |
| 1371 | + String companyName = "", subCompanyName = ""; | |
| 1372 | + for(ScheduleRealInfo s : keyMap.get(key)){ | |
| 1373 | + if(companyName.length()==0&&s.getGsName()!=null&&s.getGsName().trim().length()!=0) | |
| 1374 | + companyName = s.getGsName(); | |
| 1375 | + if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0) | |
| 1376 | + subCompanyName = s.getFgsName(); | |
| 1319 | 1377 | if(s.getXlDir().equals("0")){ |
| 1320 | 1378 | up1.add(s.getFcsjT()); |
| 1321 | 1379 | up1Map.put(s.getFcsjT(), s); |
| ... | ... | @@ -1389,7 +1447,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1389 | 1447 | tempMap.put("company", companyName); |
| 1390 | 1448 | tempMap.put("subCompany", subCompanyName); |
| 1391 | 1449 | tempMap.put("date", date); |
| 1392 | - tempMap.put("line", xlName); | |
| 1450 | + tempMap.put("line", keys[0]); | |
| 1393 | 1451 | resList.add(tempMap); |
| 1394 | 1452 | } |
| 1395 | 1453 | |
| ... | ... | @@ -1425,10 +1483,13 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1425 | 1483 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 1426 | 1484 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 1427 | 1485 | |
| 1428 | - Set<String> lineSet = getNotOperation(); | |
| 1429 | - | |
| 1430 | - String company = map.get("company").toString(); | |
| 1431 | - String subCompany = map.get("subCompany").toString(); | |
| 1486 | + String sfyy = "", company = "", subCompany = ""; | |
| 1487 | + if(map.get("sfyy")!=null) | |
| 1488 | + sfyy = map.get("sfyy").toString(); | |
| 1489 | + if(map.get("company")!=null) | |
| 1490 | + company = map.get("company").toString(); | |
| 1491 | + if(map.get("subCompany")!=null) | |
| 1492 | + subCompany = map.get("subCompany").toString(); | |
| 1432 | 1493 | String line = map.get("line").toString(); |
| 1433 | 1494 | // String date = map.get("date").toString(); |
| 1434 | 1495 | String startDate = map.get("startDate").toString(); |
| ... | ... | @@ -1453,13 +1514,16 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1453 | 1514 | |
| 1454 | 1515 | try { |
| 1455 | 1516 | String sql = "select a.schedule_date_str, a.real_exec_date, a.xl_bm, 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," |
| 1456 | - + " a.cc_service, a.remarks, a.adjust_exps, 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" | |
| 1517 | + + " a.fgs_bm, a.cc_service, a.remarks, a.adjust_exps, 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 " | |
| 1518 | + + " on a.xl_bm = b.line" | |
| 1457 | 1519 | + " where schedule_date_str >= '"+startDate+"' and schedule_date_str <= '"+endDate+"'" |
| 1458 | 1520 | + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' and bc_type != 'region'"; |
| 1459 | 1521 | if(line.length() != 0) |
| 1460 | 1522 | sql += " and xl_bm = '"+line+"'"; |
| 1461 | 1523 | if(company.length() != 0) |
| 1462 | - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | |
| 1524 | + sql += " and gs_bm = '"+company+"'"; | |
| 1525 | + if(subCompany.length() != 0) | |
| 1526 | + sql += " and fgs_bm = '"+subCompany+"'"; | |
| 1463 | 1527 | |
| 1464 | 1528 | list = jdbcTemplate.query(sql, |
| 1465 | 1529 | new RowMapper<ScheduleRealInfo>(){ |
| ... | ... | @@ -1480,6 +1544,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1480 | 1544 | schedule.setStatus(rs.getInt("status")); |
| 1481 | 1545 | schedule.setGsName(rs.getString("gs_name")); |
| 1482 | 1546 | schedule.setFgsName(rs.getString("fgs_name")); |
| 1547 | + schedule.setFgsBm(rs.getString("fgs_bm")); | |
| 1483 | 1548 | schedule.setCcService(rs.getBoolean("cc_service")); |
| 1484 | 1549 | schedule.setRemarks(rs.getString("remarks")!=null?rs.getString("remarks"):""); |
| 1485 | 1550 | schedule.setAdjustExps(rs.getString("adjust_exps")!=null?rs.getString("adjust_exps"):""); |
| ... | ... | @@ -1520,36 +1585,71 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1520 | 1585 | e.printStackTrace(); |
| 1521 | 1586 | } |
| 1522 | 1587 | |
| 1588 | + Map<String, Boolean> lineNature = lineService.lineNature(); | |
| 1523 | 1589 | Map<String, Map<String, List<ScheduleRealInfo>>> keyMap = new HashMap<String, Map<String,List<ScheduleRealInfo>>>(); |
| 1524 | 1590 | Map<String, String> xlMap = new HashMap<String, String>(); |
| 1525 | - String companyName = "", subCompanyName = ""; | |
| 1526 | 1591 | |
| 1527 | 1592 | for(ScheduleRealInfo s : list){ |
| 1528 | - if(lineSet.contains(s.getXlName()) || s.isCcService()){ | |
| 1593 | + if(s.isCcService()){ | |
| 1529 | 1594 | continue; |
| 1530 | 1595 | } |
| 1531 | - String xlName = s.getXlName(); | |
| 1596 | + | |
| 1597 | + boolean flag = false; | |
| 1598 | + String xlbm = s.getXlBm(); | |
| 1599 | + if(sfyy.length() != 0){ | |
| 1600 | + if(sfyy.equals("0")){ | |
| 1601 | + flag = true; | |
| 1602 | + } else if(sfyy.equals("1")){ | |
| 1603 | + if(lineNature.containsKey(xlbm) && lineNature.get(xlbm)){ | |
| 1604 | + flag = true; | |
| 1605 | + } | |
| 1606 | + } else { | |
| 1607 | + if(lineNature.containsKey(xlbm) && !lineNature.get(xlbm)){ | |
| 1608 | + flag = true; | |
| 1609 | + } | |
| 1610 | + } | |
| 1611 | + } else { | |
| 1612 | + flag = true; | |
| 1613 | + } | |
| 1614 | + if(!flag){ | |
| 1615 | + continue; | |
| 1616 | + } | |
| 1617 | + | |
| 1618 | + String key = s.getXlName() + "/" + s.getXlBm() + "/" + s.getFgsBm(); | |
| 1532 | 1619 | String date = s.getScheduleDateStr(); |
| 1533 | - if(!keyMap.containsKey(xlName)) | |
| 1534 | - keyMap.put(xlName, new HashMap<String, List<ScheduleRealInfo>>()); | |
| 1535 | - if(!keyMap.get(xlName).containsKey(date)) | |
| 1536 | - keyMap.get(xlName).put(date, new ArrayList<ScheduleRealInfo>()); | |
| 1537 | - keyMap.get(xlName).get(date).add(s); | |
| 1538 | - if(companyName.length()==0&&s.getGsName()!=null&&s.getGsName().trim().length()!=0) | |
| 1539 | - companyName = s.getGsName(); | |
| 1540 | - if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0) | |
| 1541 | - subCompanyName = s.getFgsName(); | |
| 1542 | - xlMap.put(xlName, s.getXlBm()); | |
| 1620 | + if(!keyMap.containsKey(key)){ | |
| 1621 | + keyMap.put(key, new HashMap<String, List<ScheduleRealInfo>>()); | |
| 1622 | + } | |
| 1623 | + if(!keyMap.get(key).containsKey(date)){ | |
| 1624 | + keyMap.get(key).put(date, new ArrayList<ScheduleRealInfo>()); | |
| 1625 | + } | |
| 1626 | + keyMap.get(key).get(date).add(s); | |
| 1627 | + | |
| 1628 | + xlMap.put(key, s.getXlBm()); | |
| 1543 | 1629 | } |
| 1544 | 1630 | |
| 1631 | + //给key排序 | |
| 1632 | + List<Long> longList = new ArrayList<Long>(); | |
| 1633 | + Map<Long, String> longMap = new HashMap<Long, String>(); | |
| 1634 | + for(String key : keyMap.keySet()){ | |
| 1635 | + String[] keys = key.split("/"); | |
| 1636 | + Long l = Long.valueOf(keys[2]) * 10000000000l + Long.valueOf(keys[1]); | |
| 1637 | + longMap.put(l, key); | |
| 1638 | + longList.add(l); | |
| 1639 | + } | |
| 1640 | + Collections.sort(longList); | |
| 1641 | + | |
| 1642 | + | |
| 1545 | 1643 | List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); |
| 1546 | - for(String xlName : keyMap.keySet()){ | |
| 1644 | + for(Long tempLong : longList){ | |
| 1645 | + String key = longMap.get(tempLong); | |
| 1646 | + String companyName = "", subCompanyName = ""; | |
| 1547 | 1647 | List<Map<String, Object>> tempList = new ArrayList<Map<String,Object>>(); |
| 1548 | 1648 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 1549 | 1649 | Map<Long, String> dateMap = new HashMap<Long, String>(); |
| 1550 | 1650 | List<Long> Longs = new ArrayList<Long>(); |
| 1551 | 1651 | int jhbc = 0, sjbc = 0; |
| 1552 | - for(String date : keyMap.get(xlName).keySet()){ | |
| 1652 | + for(String date : keyMap.get(key).keySet()){ | |
| 1553 | 1653 | String[] split = date.split("-"); |
| 1554 | 1654 | long l = Long.valueOf(split[0])*10000 + Long.valueOf(split[1])*100 + Long.valueOf(split[2]); |
| 1555 | 1655 | dateMap.put(l, date); |
| ... | ... | @@ -1559,10 +1659,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1559 | 1659 | for(long l : Longs){ |
| 1560 | 1660 | String date = dateMap.get(l); |
| 1561 | 1661 | Map<String, Object> temp = new HashMap<String, Object>(); |
| 1662 | + String[] keys = key.split("/"); | |
| 1562 | 1663 | temp.put("date", date.substring(5)); |
| 1563 | 1664 | temp.put("dates", date); |
| 1564 | - temp.put("line", xlName); | |
| 1565 | - temp.put("xlbm", xlMap.get(xlName)); | |
| 1665 | + temp.put("line", keys[0]); | |
| 1666 | + temp.put("xlbm", xlMap.get(key)); | |
| 1566 | 1667 | List<Long> up1 = new ArrayList<Long>(); |
| 1567 | 1668 | List<Long> up2 = new ArrayList<Long>(); |
| 1568 | 1669 | List<Long> dn1 = new ArrayList<Long>(); |
| ... | ... | @@ -1571,7 +1672,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1571 | 1672 | Map<Long, ScheduleRealInfo> up2Map = new HashMap<Long, ScheduleRealInfo>(); |
| 1572 | 1673 | Map<Long, ScheduleRealInfo> dn1Map = new HashMap<Long, ScheduleRealInfo>(); |
| 1573 | 1674 | Map<Long, ScheduleRealInfo> dn2Map = new HashMap<Long, ScheduleRealInfo>(); |
| 1574 | - for(ScheduleRealInfo s : keyMap.get(xlName).get(date)){ | |
| 1675 | + for(ScheduleRealInfo s : keyMap.get(key).get(date)){ | |
| 1676 | + if(companyName.length()==0&&s.getGsName()!=null&&s.getGsName().trim().length()!=0) | |
| 1677 | + companyName = s.getGsName(); | |
| 1678 | + if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0) | |
| 1679 | + subCompanyName = s.getFgsName(); | |
| 1680 | + | |
| 1575 | 1681 | if(s.getXlDir().equals("0")){ |
| 1576 | 1682 | up1.add(s.getFcsjT()); |
| 1577 | 1683 | up1Map.put(s.getFcsjT(), s); |
| ... | ... | @@ -1612,7 +1718,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1612 | 1718 | Map<String, Object> m = new HashMap<String, Object>(); |
| 1613 | 1719 | m.put("date", date.substring(5)); |
| 1614 | 1720 | m.put("dates", date); |
| 1615 | - m.put("line", xlName); | |
| 1721 | + m.put("line", keys[0]); | |
| 1722 | + m.put("company", companyName); | |
| 1723 | + m.put("subCompany", subCompanyName); | |
| 1616 | 1724 | m.put("firstOrLast", "上行首发"); |
| 1617 | 1725 | m.put("qdz", s1.getQdzName()); |
| 1618 | 1726 | m.put("jhfc", s1.getFcsj()); |
| ... | ... | @@ -1629,7 +1737,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1629 | 1737 | Map<String, Object> m = new HashMap<String, Object>(); |
| 1630 | 1738 | m.put("date", date.substring(5)); |
| 1631 | 1739 | m.put("dates", date); |
| 1632 | - m.put("line", xlName); | |
| 1740 | + m.put("line", keys[0]); | |
| 1741 | + m.put("company", companyName); | |
| 1742 | + m.put("subCompany", subCompanyName); | |
| 1633 | 1743 | m.put("firstOrLast", "上行末发"); |
| 1634 | 1744 | m.put("qdz", s3.getQdzName()); |
| 1635 | 1745 | m.put("jhfc", s3.getFcsj()); |
| ... | ... | @@ -1674,7 +1784,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1674 | 1784 | Map<String, Object> m = new HashMap<String, Object>(); |
| 1675 | 1785 | m.put("date", date.substring(5)); |
| 1676 | 1786 | m.put("dates", date); |
| 1677 | - m.put("line", xlName); | |
| 1787 | + m.put("line", keys[0]); | |
| 1788 | + m.put("company", companyName); | |
| 1789 | + m.put("subCompany", subCompanyName); | |
| 1678 | 1790 | m.put("firstOrLast", "下行首发"); |
| 1679 | 1791 | m.put("qdz", s1.getQdzName()); |
| 1680 | 1792 | m.put("jhfc", s1.getFcsj()); |
| ... | ... | @@ -1692,7 +1804,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1692 | 1804 | Map<String, Object> m = new HashMap<String, Object>(); |
| 1693 | 1805 | m.put("date", date.substring(5)); |
| 1694 | 1806 | m.put("dates", date); |
| 1695 | - m.put("line", xlName); | |
| 1807 | + m.put("line", keys[0]); | |
| 1808 | + m.put("company", companyName); | |
| 1809 | + m.put("subCompany", subCompanyName); | |
| 1696 | 1810 | m.put("firstOrLast", "下行末发"); |
| 1697 | 1811 | m.put("qdz", s3.getQdzName()); |
| 1698 | 1812 | m.put("jhfc", s3.getFcsj()); |
| ... | ... | @@ -1718,11 +1832,12 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1718 | 1832 | continue; |
| 1719 | 1833 | tempList.add(temp); |
| 1720 | 1834 | } |
| 1835 | + String[] keys = key.split("/"); | |
| 1721 | 1836 | tempMap.put("map", tempList); |
| 1722 | 1837 | tempMap.put("company", companyName); |
| 1723 | 1838 | tempMap.put("subCompany", subCompanyName); |
| 1724 | - tempMap.put("xlbm", xlMap.get(xlName)); | |
| 1725 | - tempMap.put("line", xlName); | |
| 1839 | + tempMap.put("xlbm", xlMap.get(key)); | |
| 1840 | + tempMap.put("line", keys[0]); | |
| 1726 | 1841 | tempMap.put("date", dates); |
| 1727 | 1842 | tempMap.put("jhbc", jhbc); |
| 1728 | 1843 | tempMap.put("sjbc", sjbc); |
| ... | ... | @@ -1744,8 +1859,8 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1744 | 1859 | tempMap.put("zdl", (jhbc<1?"0":nf.format((float) sjbc / jhbc * 100)) + "%"); |
| 1745 | 1860 | for(Map<String, Object> m : mapList){ |
| 1746 | 1861 | m.put("no", ++i); |
| 1747 | - m.put("company", companyName); | |
| 1748 | - m.put("subCompany", subCompanyName); | |
| 1862 | +// m.put("company", companyName); | |
| 1863 | +// m.put("subCompany", subCompanyName); | |
| 1749 | 1864 | } |
| 1750 | 1865 | tempMap.put("map", mapList); |
| 1751 | 1866 | if(!type.equals("export")) |
| ... | ... | @@ -1844,7 +1959,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1844 | 1959 | sql += " and cl_zbh = '"+code+"'"; |
| 1845 | 1960 | } |
| 1846 | 1961 | if(company.length() != 0){ |
| 1847 | - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | |
| 1962 | + sql += " and gs_bm = '"+company+"'"; | |
| 1963 | + } | |
| 1964 | + if(subCompany.length() != 0){ | |
| 1965 | + sql += " and fgs_bm = '"+subCompany+"'"; | |
| 1848 | 1966 | } |
| 1849 | 1967 | sql += " union " + |
| 1850 | 1968 | "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 " + |
| ... | ... | @@ -1856,7 +1974,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1856 | 1974 | sql += " and cl_zbh = '"+code+"'"; |
| 1857 | 1975 | } |
| 1858 | 1976 | if(company.length() != 0){ |
| 1859 | - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | |
| 1977 | + sql += " and gs_bm = '"+company+"'"; | |
| 1978 | + } | |
| 1979 | + if(subCompany.length() != 0){ | |
| 1980 | + sql += " and fgs_bm = '"+subCompany+"'"; | |
| 1860 | 1981 | } |
| 1861 | 1982 | sql += " order by xl_name, fcsj"; |
| 1862 | 1983 | |
| ... | ... | @@ -1998,11 +2119,17 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1998 | 2119 | return resList; |
| 1999 | 2120 | } |
| 2000 | 2121 | */ |
| 2122 | + | |
| 2001 | 2123 | @Override |
| 2002 | 2124 | public List<Map<String, Object>> commandState(Map<String, Object> map) { |
| 2003 | 2125 | // TODO Auto-generated method stub |
| 2004 | - String company = map.get("company").toString(); | |
| 2005 | - String subCompany = map.get("subCompany").toString(); | |
| 2126 | + String sfyy = "", company = "", subCompany = ""; | |
| 2127 | + if(map.get("sfyy")!=null) | |
| 2128 | + sfyy=map.get("sfyy").toString(); | |
| 2129 | + if(map.get("company")!=null) | |
| 2130 | + company=map.get("company").toString(); | |
| 2131 | + if(map.get("subCompany")!=null) | |
| 2132 | + subCompany=map.get("subCompany").toString(); | |
| 2006 | 2133 | String line = map.get("line").toString().trim(); |
| 2007 | 2134 | String date = map.get("date").toString(); |
| 2008 | 2135 | // String code = map.get("code").toString(); |
| ... | ... | @@ -2011,7 +2138,10 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 2011 | 2138 | String sql_="select * from bsth_c_s_sp_info_real " |
| 2012 | 2139 | + " WHERE schedule_date_str = '"+date+"' "; |
| 2013 | 2140 | if(line.equals("")){ |
| 2014 | - sql_ += "and gs_bm='"+company+"'and fgs_bm='"+subCompany+"'"; | |
| 2141 | + if(company.length() != 0) | |
| 2142 | + sql_ += " and gs_bm='"+company+"'"; | |
| 2143 | + if(subCompany.length() != 0) | |
| 2144 | + sql_ += " and fgs_bm='"+subCompany+"'"; | |
| 2015 | 2145 | }else{ |
| 2016 | 2146 | sql_ += " and xl_bm = '"+line+"'"; |
| 2017 | 2147 | } |
| ... | ... | @@ -2021,7 +2151,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 2021 | 2151 | + " r.gs_name,r.fgs_name,CONCAT(r.xl_bm,'_',r.id) as line_sch FROM ("+sql_+") AS r" |
| 2022 | 2152 | + " order by r.xl_name,r.id "; |
| 2023 | 2153 | |
| 2024 | - List<Map<String, Object>> list = jdbcTemplate.query(sql, | |
| 2154 | + List<Map<String, Object>> tempList = jdbcTemplate.query(sql, | |
| 2025 | 2155 | new RowMapper<Map<String, Object>>(){ |
| 2026 | 2156 | @Override |
| 2027 | 2157 | public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { |
| ... | ... | @@ -2050,6 +2180,27 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 2050 | 2180 | e.printStackTrace(); |
| 2051 | 2181 | } |
| 2052 | 2182 | |
| 2183 | + Map<String, Boolean> lineNature = lineService.lineNature(); | |
| 2184 | + List<Map<String, Object>> list = new ArrayList<Map<String, Object>>(); | |
| 2185 | + for(Map<String, Object> m : tempList){ | |
| 2186 | + String xlbm = m.get("xlbm").toString(); | |
| 2187 | + if(sfyy.length() != 0){ | |
| 2188 | + if(sfyy.equals("0")){ | |
| 2189 | + list.add(m); | |
| 2190 | + } else if(sfyy.equals("1")){ | |
| 2191 | + if(lineNature.containsKey(xlbm) && lineNature.get(xlbm)){ | |
| 2192 | + list.add(m); | |
| 2193 | + } | |
| 2194 | + } else { | |
| 2195 | + if(lineNature.containsKey(xlbm) && !lineNature.get(xlbm)){ | |
| 2196 | + list.add(m); | |
| 2197 | + } | |
| 2198 | + } | |
| 2199 | + } else { | |
| 2200 | + list.add(m); | |
| 2201 | + } | |
| 2202 | + } | |
| 2203 | + | |
| 2053 | 2204 | long min = 0, max = 0; |
| 2054 | 2205 | for(Map<String, Object> m : list){ |
| 2055 | 2206 | long l = Long.valueOf(m.get("id").toString()); |
| ... | ... | @@ -2411,7 +2562,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 2411 | 2562 | String jgh = map.get("jgh").toString(); |
| 2412 | 2563 | // String code = map.get("code").toString(); |
| 2413 | 2564 | String type = ""; |
| 2414 | - if(map.containsKey("type")) | |
| 2565 | + if(map.get("type")!=null) | |
| 2415 | 2566 | type = map.get("type").toString().trim(); |
| 2416 | 2567 | |
| 2417 | 2568 | String sql_="select * from bsth_c_s_sp_info_real " |
| ... | ... | @@ -2420,7 +2571,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 2420 | 2571 | if(!line.equals("")){ |
| 2421 | 2572 | sql_ +=" and xl_bm = '"+line+"'"; |
| 2422 | 2573 | } |
| 2423 | - | |
| 2574 | + | |
| 2424 | 2575 | |
| 2425 | 2576 | String sql="SELECT r.id,r.schedule_date_str,r.fcsj,r.xl_name,r.xl_bm,r.cl_zbh,r.j_gh,r.j_name," |
| 2426 | 2577 | + " r.fcsj,d. TIMESTAMP,d.reply46,d.reply47,d.reply46time,d.reply47time," | ... | ... |
src/main/resources/static/pages/forms/mould/operationservice.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/busInterval.html
| ... | ... | @@ -49,7 +49,15 @@ |
| 49 | 49 | </select> |
| 50 | 50 | </div> |
| 51 | 51 | <div style="margin-top: 10px"></div> |
| 52 | - <div style="display: inline-block;margin-left: 5px;"> | |
| 52 | + <div style="display: inline-block; margin-left: 5px"> | |
| 53 | + <span class="item-label" style="width: 80px;">是否营运: </span> | |
| 54 | + <select class="form-control" name="sfyy" id="sfyy" style="width: 140px;"> | |
| 55 | + <option value="0">全部线路</option> | |
| 56 | + <option value="1" selected="selected">营运线路</option> | |
| 57 | + <option value="2">非营运线路</option> | |
| 58 | + </select> | |
| 59 | + </div> | |
| 60 | + <div style="display: inline-block;margin-left: 10px;"> | |
| 53 | 61 | <span class="item-label" style="width: 80px;">开始时间: </span> |
| 54 | 62 | <input class="form-control" type="text" id="startDate" style="width: 140px;"/> |
| 55 | 63 | </div> |
| ... | ... | @@ -81,7 +89,7 @@ |
| 81 | 89 | <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px"> |
| 82 | 90 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 83 | 91 | <thead> |
| 84 | - | |
| 92 | + | |
| 85 | 93 | </thead> |
| 86 | 94 | <tbody> |
| 87 | 95 | |
| ... | ... | @@ -164,7 +172,7 @@ |
| 164 | 172 | $("#company").on("change",updateCompany); |
| 165 | 173 | function updateCompany(){ |
| 166 | 174 | var company = $('#company').val(); |
| 167 | - var options = ''; | |
| 175 | + var options = '<option value="">全部分公司</option>'; | |
| 168 | 176 | for(var i = 0; i < obj.length; i++){ |
| 169 | 177 | if(obj[i].companyCode == company){ |
| 170 | 178 | var children = obj[i].children; |
| ... | ... | @@ -214,14 +222,16 @@ |
| 214 | 222 | var temp = tempData[$("#line").val()].split(":"); |
| 215 | 223 | $("#company").val(temp[0]); |
| 216 | 224 | updateCompany(); |
| 217 | - $("#subCompany").val(temp[1]); | |
| 225 | +// $("#subCompany").val(temp[1]); | |
| 226 | + $("#subCompany").val(""); | |
| 218 | 227 | $("#company").attr("disabled", true); |
| 219 | - $("#subCompany").attr("disabled", true); | |
| 228 | +// $("#subCompany").attr("disabled", true); | |
| 220 | 229 | } |
| 221 | 230 | }); |
| 222 | 231 | |
| 223 | 232 | $("#query").on("click",jsDoQuery); |
| 224 | - | |
| 233 | + | |
| 234 | + var sfyy = 1; | |
| 225 | 235 | var sfqr = 0; |
| 226 | 236 | var statu = 0; |
| 227 | 237 | var line = $("#line").val(); |
| ... | ... | @@ -244,6 +254,7 @@ |
| 244 | 254 | return; |
| 245 | 255 | } |
| 246 | 256 | var params = {}; |
| 257 | + sfyy = $("#sfyy").val(); | |
| 247 | 258 | line = $("#line").val(); |
| 248 | 259 | startDate = $("#startDate").val(); |
| 249 | 260 | endDate = $("#endDate").val(); |
| ... | ... | @@ -255,6 +266,7 @@ |
| 255 | 266 | lineName = $('#line option:selected').text(); |
| 256 | 267 | if(lineName == "全部线路") |
| 257 | 268 | lineName = $('#subCompany option:selected').text(); |
| 269 | + params['sfyy'] = sfyy; | |
| 258 | 270 | params['line'] = line; |
| 259 | 271 | params['sfqr'] = sfqr; |
| 260 | 272 | params['statu'] = statu; |
| ... | ... | @@ -293,6 +305,7 @@ |
| 293 | 305 | return; |
| 294 | 306 | } |
| 295 | 307 | var params = {}; |
| 308 | + params['sfyy'] = sfyy; | |
| 296 | 309 | params['line'] = line; |
| 297 | 310 | params['sfqr'] = sfqr; |
| 298 | 311 | params['statu'] = statu; | ... | ... |
src/main/resources/static/pages/forms/statement/commandState.html
| ... | ... | @@ -27,29 +27,36 @@ |
| 27 | 27 | <div class="portlet light porttlet-fit bordered"> |
| 28 | 28 | <div class="portlet-title"> |
| 29 | 29 | <form id="history" class="form-inline" action=""> |
| 30 | - <div style="display: inline-block; margin-left: 15px;" id="company1"> | |
| 30 | + <div style="display: inline-block; margin-left: 33px;" id="company1"> | |
| 31 | 31 | <span class="item-label" style="width: 80px;">公司: </span> |
| 32 | - <select class="form-control" name="company" id="company" style="width: 180px;"></select> | |
| 32 | + <select class="form-control" name="company" id="company" style="width: 150px;"></select> | |
| 33 | 33 | </div> |
| 34 | - <div style="display: inline-block; margin-left: 22px;" id="subCompany1"> | |
| 34 | + <div style="display: inline-block; margin-left: 6px;" id="subCompany1"> | |
| 35 | 35 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 36 | - <select class="form-control" name="subCompany" id="subCompany" style="width: 180px;"></select> | |
| 36 | + <select class="form-control" name="subCompany" id="subCompany" style="width: 150px;"></select> | |
| 37 | 37 | </div> |
| 38 | - <div style="margin-top: 10px" ></div> | |
| 39 | 38 | <div style="display: inline-block; margin-left: 15px;"> |
| 40 | 39 | <span class="item-label" style="width: 80px;">线路: </span> |
| 41 | - <select class="form-control" name="line" id="line" style="width: 180px;"></select> | |
| 40 | + <select class="form-control" name="line" id="line" style="width: 160px;"></select> | |
| 41 | + </div> | |
| 42 | + <div style="margin-top: 10px" ></div> | |
| 43 | + <div style="display: inline-block; margin-left: 5px"> | |
| 44 | + <span class="item-label" style="width: 80px;">是否营运: </span> | |
| 45 | + <select class="form-control" name="sfyy" id="sfyy" style="width: 150px;"> | |
| 46 | + <option value="0">全部线路</option> | |
| 47 | + <option value="1" selected="selected">营运线路</option> | |
| 48 | + <option value="2">非营运线路</option> | |
| 49 | + </select> | |
| 42 | 50 | </div> |
| 43 | - | |
| 44 | - <div style="display: inline-block;margin-left: 36px;"> | |
| 51 | + <div style="display: inline-block;margin-left: 20px;"> | |
| 45 | 52 | <span class="item-label" style="width: 80px;">时间: </span> |
| 46 | - <input class="form-control" type="text" id="date" style="width: 180px;"/> | |
| 53 | + <input class="form-control" type="text" id="date" style="width: 150px;"/> | |
| 47 | 54 | </div> |
| 48 | 55 | <div style="display:none;margin-left: 8px"> |
| 49 | 56 | <span class="item-label" style="width: 140px;">内部编码: </span> |
| 50 | - <select class="form-control" name="code" id="code" style="width: 180px;"></select> | |
| 57 | + <select class="form-control" name="code" id="code" style="width: 150px;"></select> | |
| 51 | 58 | </div> |
| 52 | - <div class="form-group" style="margin-left: 9px"> | |
| 59 | + <div class="form-group" style="margin-left: 15px"> | |
| 53 | 60 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| 54 | 61 | <input class="btn btn-default" type="button" id="export" value="导出"/> |
| 55 | 62 | </div> |
| ... | ... | @@ -214,7 +221,7 @@ |
| 214 | 221 | updateCompany(); |
| 215 | 222 | $("#subCompany").val(temp[1]); |
| 216 | 223 | $("#company").attr("disabled", true); |
| 217 | - $("#subCompany").attr("disabled", true); | |
| 224 | +// $("#subCompany").attr("disabled", true); | |
| 218 | 225 | } |
| 219 | 226 | }); |
| 220 | 227 | |
| ... | ... | @@ -260,7 +267,8 @@ |
| 260 | 267 | |
| 261 | 268 | |
| 262 | 269 | $("#query").on("click",jsDoQuery); |
| 263 | - | |
| 270 | + | |
| 271 | + var sfyy = 1; | |
| 264 | 272 | var line = ""; |
| 265 | 273 | var date = $("#date").val(); |
| 266 | 274 | var code = $("#code").val(); |
| ... | ... | @@ -277,6 +285,7 @@ |
| 277 | 285 | line = $("#line").val(); |
| 278 | 286 | if(line == " ") |
| 279 | 287 | line = ""; |
| 288 | + sfyy = $("#sfyy").val(); | |
| 280 | 289 | date = $("#date").val(); |
| 281 | 290 | code = $("#code").val(); |
| 282 | 291 | company = $("#company").val(); |
| ... | ... | @@ -284,6 +293,7 @@ |
| 284 | 293 | lineName = $('#line option:selected').text(); |
| 285 | 294 | if(lineName == "全部线路") |
| 286 | 295 | lineName = $('#subCompany option:selected').text(); |
| 296 | + params['sfyy'] = sfyy; | |
| 287 | 297 | params['line'] = line; |
| 288 | 298 | params['date'] = date; |
| 289 | 299 | params['code'] = code; |
| ... | ... | @@ -318,7 +328,7 @@ |
| 318 | 328 | $("#works_hidden").removeClass("hidden"); |
| 319 | 329 | var i = layer.load(2); |
| 320 | 330 | $get('/pcpc/commandByLineList',params,function(result){ |
| 321 | - var commandByLine = template('list_workList',{list:result}); | |
| 331 | + var commandByLine = template('list_commandState_1',{list:result}); | |
| 322 | 332 | $('#works tbody').html(commandByLine); |
| 323 | 333 | layer.close(i); |
| 324 | 334 | |
| ... | ... | @@ -354,6 +364,7 @@ |
| 354 | 364 | |
| 355 | 365 | $("#export").on("click",function(){ |
| 356 | 366 | var params = {}; |
| 367 | + params['sfyy'] = sfyy; | |
| 357 | 368 | params['line'] = line; |
| 358 | 369 | params['date'] = date; |
| 359 | 370 | params['type'] = "export"; |
| ... | ... | @@ -410,7 +421,7 @@ |
| 410 | 421 | {{/if}} |
| 411 | 422 | </script> |
| 412 | 423 | |
| 413 | -<script type="text/html" id="list_workList"> | |
| 424 | +<script type="text/html" id="list_commandState_1"> | |
| 414 | 425 | {{each list as obj i}} |
| 415 | 426 | <tr> |
| 416 | 427 | <td>{{obj.company}}</td> | ... | ... |
src/main/resources/static/pages/forms/statement/correctStatis.html
| ... | ... | @@ -35,16 +35,24 @@ |
| 35 | 35 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 36 | 36 | <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> |
| 37 | 37 | </div> |
| 38 | - <div style="display: inline-block; margin-left: 25px;"> | |
| 38 | + <div style="display: inline-block; margin-left: 20px;"> | |
| 39 | 39 | <span class="item-label" style="width: 80px;">选择线路: </span> |
| 40 | 40 | <select class="form-control" name="line" id="line" style="width: 150px;"></select> |
| 41 | 41 | </div> |
| 42 | 42 | <div style="margin-top: 10px"></div> |
| 43 | - <div style="display: inline-block;margin-left: 5px;"> | |
| 43 | + <div style="display: inline-block; margin-left: 5px"> | |
| 44 | + <span class="item-label" style="width: 80px;">是否营运: </span> | |
| 45 | + <select class="form-control" name="sfyy" id="sfyy" style="width: 140px;"> | |
| 46 | + <option value="0">全部线路</option> | |
| 47 | + <option value="1" selected="selected">营运线路</option> | |
| 48 | + <option value="2">非营运线路</option> | |
| 49 | + </select> | |
| 50 | + </div> | |
| 51 | + <div style="display: inline-block;margin-left: 10px;"> | |
| 44 | 52 | <span class="item-label" style="width: 80px;">开始时间: </span> |
| 45 | 53 | <input class="form-control" type="text" id="startDate" style="width: 140px;"/> |
| 46 | 54 | </div> |
| 47 | - <div style="display: inline-block;margin-left: 10px;"> | |
| 55 | + <div style="display: inline-block;margin-left: 20px;"> | |
| 48 | 56 | <span class="item-label" style="width: 80px;">结束时间: </span> |
| 49 | 57 | <input class="form-control" type="text" id="endDate" style="width: 140px;"/> |
| 50 | 58 | </div> |
| ... | ... | @@ -62,7 +70,7 @@ |
| 62 | 70 | <span class="item-label" style="width: 80px;"> - </span> |
| 63 | 71 | <input class="form-control" type="text" id="times2" style="width: 60px;"/> |
| 64 | 72 | </div> |
| 65 | - <div class="form-group"> | |
| 73 | + <div class="form-group" style="margin-left: 5px;"> | |
| 66 | 74 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| 67 | 75 | <!-- <input class="btn btn-default" type="button" id="export" value="导出"/> --> |
| 68 | 76 | </div> |
| ... | ... | @@ -112,14 +120,6 @@ |
| 112 | 120 | if (!$('body').hasClass('page-sidebar-closed')) |
| 113 | 121 | $('.menu-toggler.sidebar-toggler').click(); |
| 114 | 122 | |
| 115 | - $("#startDate").datetimepicker({ | |
| 116 | - format : 'YYYY-MM-DD', | |
| 117 | - locale : 'zh-cn' | |
| 118 | - }); | |
| 119 | - $("#endDate").datetimepicker({ | |
| 120 | - format : 'YYYY-MM-DD', | |
| 121 | - locale : 'zh-cn' | |
| 122 | - }); | |
| 123 | 123 | $("#times1").datetimepicker({ |
| 124 | 124 | format : 'HH:mm', |
| 125 | 125 | locale : 'zh-cn' |
| ... | ... | @@ -130,6 +130,7 @@ |
| 130 | 130 | }); |
| 131 | 131 | |
| 132 | 132 | var d = new Date(); |
| 133 | +// d.setTime(d.getTime() - 1*1000*60*60*24); //当前日期减一天 | |
| 133 | 134 | var year = d.getFullYear(); |
| 134 | 135 | var month = d.getMonth() + 1; |
| 135 | 136 | var day = d.getDate(); |
| ... | ... | @@ -137,8 +138,19 @@ |
| 137 | 138 | month = "0" + month; |
| 138 | 139 | if(day < 10) |
| 139 | 140 | day = "0" + day; |
| 140 | - $("#startDate").val(year + "-" + month + "-" + day); | |
| 141 | - $("#endDate").val(year + "-" + month + "-" + day); | |
| 141 | + var dateTime = year + "-" + month + "-" + day; | |
| 142 | + $("#startDate").datetimepicker({ | |
| 143 | + format : 'YYYY-MM-DD', | |
| 144 | + locale : 'zh-cn', | |
| 145 | +// maxDate : dateTime //设置最大日期 | |
| 146 | + }); | |
| 147 | + $("#endDate").datetimepicker({ | |
| 148 | + format : 'YYYY-MM-DD', | |
| 149 | + locale : 'zh-cn', | |
| 150 | +// maxDate : dateTime //设置最大日期 | |
| 151 | + }); | |
| 152 | + $("#startDate").val(dateTime); | |
| 153 | + $("#endDate").val(dateTime); | |
| 142 | 154 | |
| 143 | 155 | $("#times1").val("05:00"); |
| 144 | 156 | $("#times2").val("23:00"); |
| ... | ... | @@ -174,7 +186,7 @@ |
| 174 | 186 | $("#company").on("change",updateCompany); |
| 175 | 187 | function updateCompany(){ |
| 176 | 188 | var company = $('#company').val(); |
| 177 | - var options = ''; | |
| 189 | + var options = '<option value="">全部分公司</option>'; | |
| 178 | 190 | for(var i = 0; i < obj.length; i++){ |
| 179 | 191 | if(obj[i].companyCode == company){ |
| 180 | 192 | var children = obj[i].children; |
| ... | ... | @@ -217,16 +229,18 @@ |
| 217 | 229 | var temp = tempData[$("#line").val()].split(":"); |
| 218 | 230 | $("#company").val(temp[0]); |
| 219 | 231 | updateCompany(); |
| 220 | - $("#subCompany").val(temp[1]); | |
| 232 | +// $("#subCompany").val(temp[1]); | |
| 233 | + $("#subCompany").val(""); | |
| 221 | 234 | $("#company").attr("disabled", true); |
| 222 | - $("#subCompany").attr("disabled", true); | |
| 235 | +// $("#subCompany").attr("disabled", true); | |
| 223 | 236 | } |
| 224 | 237 | }); |
| 225 | 238 | |
| 226 | 239 | |
| 227 | 240 | $("#query").on("click",jsDoQuery); |
| 228 | - | |
| 241 | + | |
| 229 | 242 | var sfqr = 0; |
| 243 | + var sfyy = 1; | |
| 230 | 244 | var company = $("#company").val(); |
| 231 | 245 | var subCompany = $("#subCompany").val(); |
| 232 | 246 | var lines; |
| ... | ... | @@ -245,6 +259,7 @@ |
| 245 | 259 | } |
| 246 | 260 | var params = {}; |
| 247 | 261 | // line = $("#line").val(); |
| 262 | + sfyy = $("#sfyy").val(); | |
| 248 | 263 | startDate = $("#startDate").val(); |
| 249 | 264 | endDate = $("#endDate").val(); |
| 250 | 265 | times = $("#times1").val() + "-" + $("#times2").val(); |
| ... | ... | @@ -252,6 +267,7 @@ |
| 252 | 267 | subCompany = $("#subCompany").val(); |
| 253 | 268 | params['sfqr'] = sfqr; |
| 254 | 269 | params['line'] = line; |
| 270 | + params['sfyy'] = sfyy; | |
| 255 | 271 | params['startDate'] = startDate; |
| 256 | 272 | params['endDate'] = endDate; |
| 257 | 273 | params['times'] = times; |
| ... | ... | @@ -259,9 +275,12 @@ |
| 259 | 275 | params['subCompany'] = subCompany; |
| 260 | 276 | params['type'] = "query"; |
| 261 | 277 | // $(".hidden").removeClass("hidden"); |
| 278 | + var i = layer.load(2); | |
| 262 | 279 | $get('/busInterval/correctStatis', params, function(result){ |
| 263 | 280 | // 把数据填充到模版中 |
| 264 | - var tbodyHtml = template('list_company',{list:result});; | |
| 281 | + var tbodyHtml = template('list_company',{list:result}); | |
| 282 | + layer.close(i); | |
| 283 | + | |
| 265 | 284 | /* if(result.length != 0){ |
| 266 | 285 | tbodyHtml = template('list_company',{list:result[0].workList[0].workList, type:3}); |
| 267 | 286 | }else{ |
| ... | ... | @@ -276,7 +295,7 @@ |
| 276 | 295 | $("#lines").html(""); |
| 277 | 296 | |
| 278 | 297 | // company = result; |
| 279 | - lines = result[0].workList[0].workList; | |
| 298 | +// lines = result[0].workList[0].workList; | |
| 280 | 299 | }); |
| 281 | 300 | } |
| 282 | 301 | |
| ... | ... | @@ -329,7 +348,7 @@ |
| 329 | 348 | }); |
| 330 | 349 | $.each(lines, function(i, g){ |
| 331 | 350 | if(g.company == params[1] && g.subCompany == params[2] && g.line == params[3]){ |
| 332 | - var tbodyHtml = template('list_workList',{list:g.workList}); | |
| 351 | + var tbodyHtml = template('list_company_1',{list:g.workList}); | |
| 333 | 352 | $("#lines").html(tbodyHtml); |
| 334 | 353 | } |
| 335 | 354 | }); |
| ... | ... | @@ -432,7 +451,7 @@ |
| 432 | 451 | {{/if}} |
| 433 | 452 | </tbody> |
| 434 | 453 | </script> |
| 435 | -<script type="text/html" id="list_workList"> | |
| 454 | +<script type="text/html" id="list_company_1"> | |
| 436 | 455 | <thead> |
| 437 | 456 | <tr> |
| 438 | 457 | <th colspan="9">修正报表</th> | ... | ... |
src/main/resources/static/pages/forms/statement/firstAndLastBus.html
| ... | ... | @@ -28,23 +28,32 @@ |
| 28 | 28 | <div class="portlet light porttlet-fit bordered"> |
| 29 | 29 | <div class="portlet-title"> |
| 30 | 30 | <form id="history" class="form-inline" action=""> |
| 31 | - <div style="display: inline-block;margin-left: 10px;" id="company1"> | |
| 31 | + <div style="display: inline-block;margin-left: 33px;" id="company1"> | |
| 32 | 32 | <span class="item-label" style="width: 80px;">公司: </span> |
| 33 | - <select class="form-control" name="company" id="company" style="width: 160px;"></select> | |
| 33 | + <select class="form-control" name="company" id="company" style="width: 150px;"></select> | |
| 34 | 34 | </div> |
| 35 | 35 | <div style="display: inline-block;margin-left: 10px;" id="subCompany1"> |
| 36 | 36 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 37 | - <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> | |
| 37 | + <select class="form-control" name="subCompany" id="subCompany" style="width: 150px;"></select> | |
| 38 | 38 | </div> |
| 39 | 39 | <div style="display: inline-block;margin-left: 10px;"> |
| 40 | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| 41 | 41 | <select class="form-control" name="line" id="line" style="width: 160px;"></select> |
| 42 | 42 | </div> |
| 43 | - <div style="display: inline-block;margin-left: 10px;"> | |
| 43 | + <div style="margin-top: 10px"></div> | |
| 44 | + <div style="display: inline-block; margin-left: 5px"> | |
| 45 | + <span class="item-label" style="width: 80px;">是否营运: </span> | |
| 46 | + <select class="form-control" name="sfyy" id="sfyy" style="width: 150px;"> | |
| 47 | + <option value="0">全部线路</option> | |
| 48 | + <option value="1" selected="selected">营运线路</option> | |
| 49 | + <option value="2">非营运线路</option> | |
| 50 | + </select> | |
| 51 | + </div> | |
| 52 | + <div style="display: inline-block;margin-left: 24px;"> | |
| 44 | 53 | <span class="item-label" style="width: 80px;">时间: </span> |
| 45 | - <input class="form-control" type="text" id="date" style="width: 160px;"/> | |
| 54 | + <input class="form-control" type="text" id="date" style="width: 150px;"/> | |
| 46 | 55 | </div> |
| 47 | - <div class="form-group"> | |
| 56 | + <div class="form-group" style="margin-left: 10px;"> | |
| 48 | 57 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| 49 | 58 | <input class="btn btn-default" type="button" id="export" value="导出"/> |
| 50 | 59 | </div> |
| ... | ... | @@ -147,7 +156,7 @@ |
| 147 | 156 | $("#company").on("change",updateCompany); |
| 148 | 157 | function updateCompany(){ |
| 149 | 158 | var company = $('#company').val(); |
| 150 | - var options = ''; | |
| 159 | + var options = '<option value="">全部分公司</option>'; | |
| 151 | 160 | for(var i = 0; i < obj.length; i++){ |
| 152 | 161 | if(obj[i].companyCode == company){ |
| 153 | 162 | var children = obj[i].children; |
| ... | ... | @@ -217,18 +226,20 @@ |
| 217 | 226 | var temp = tempData[$("#line").val()].split(":"); |
| 218 | 227 | $("#company").val(temp[0]); |
| 219 | 228 | updateCompany(); |
| 220 | - $("#subCompany").val(temp[1]); | |
| 229 | +// $("#subCompany").val(temp[1]); | |
| 230 | + $("#subCompany").val(""); | |
| 221 | 231 | $("#company").attr("disabled", true); |
| 222 | - $("#subCompany").attr("disabled", true); | |
| 232 | +// $("#subCompany").attr("disabled", true); | |
| 223 | 233 | } |
| 224 | 234 | }); |
| 225 | 235 | |
| 226 | 236 | $("#query").on("click",jsDoQuery); |
| 227 | 237 | |
| 228 | - var company = $("#company").val(); | |
| 229 | - var subCompany = $("#subCompany").val(); | |
| 238 | + var sfyy = $("#sfyy").val(); | |
| 230 | 239 | var line = $("#line").val(); |
| 231 | 240 | var date = $("#date").val(); |
| 241 | + var company = $("#company").val(); | |
| 242 | + var subCompany = $("#subCompany").val(); | |
| 232 | 243 | var lineName = $('#line option:selected').text(); |
| 233 | 244 | function jsDoQuery(pagination){ |
| 234 | 245 | if($("#date").val() == null || $("#date").val().trim().length == 0){ |
| ... | ... | @@ -236,20 +247,22 @@ |
| 236 | 247 | return; |
| 237 | 248 | } |
| 238 | 249 | var params = {}; |
| 239 | - company = $("#company").val(); | |
| 240 | - subCompany = $("#subCompany").val(); | |
| 250 | + sfyy = $("#sfyy").val(); | |
| 241 | 251 | line = $("#line").val(); |
| 242 | 252 | date = $("#date").val(); |
| 253 | + company = $("#company").val(); | |
| 254 | + subCompany = $("#subCompany").val(); | |
| 243 | 255 | lineName = $('#line option:selected').text(); |
| 244 | 256 | if(lineName == "全部线路") |
| 245 | 257 | lineName = $('#subCompany option:selected').text(); |
| 246 | 258 | if(line == " ") |
| 247 | 259 | line = ""; |
| 248 | - params['company'] = company; | |
| 249 | - params['subCompany'] = subCompany; | |
| 260 | + params['sfyy'] = sfyy; | |
| 250 | 261 | params['line'] = line; |
| 251 | 262 | params['date'] = date; |
| 252 | 263 | params['type'] = "query"; |
| 264 | + params['company'] = company; | |
| 265 | + params['subCompany'] = subCompany; | |
| 253 | 266 | $(".hidden").removeClass("hidden"); |
| 254 | 267 | var i = layer.load(2); |
| 255 | 268 | $get('/pcpc/firstAndLastBus', params, function(result){ |
| ... | ... | @@ -272,11 +285,12 @@ |
| 272 | 285 | return; |
| 273 | 286 | } |
| 274 | 287 | var params = {}; |
| 275 | - params['company'] = company; | |
| 276 | - params['subCompany'] = subCompany; | |
| 288 | + params['sfyy'] = sfyy; | |
| 277 | 289 | params['line'] = line; |
| 278 | 290 | params['date'] = date; |
| 279 | 291 | params['type'] = "export"; |
| 292 | + params['company'] = company; | |
| 293 | + params['subCompany'] = subCompany; | |
| 280 | 294 | params['lineName'] = lineName; |
| 281 | 295 | var i = layer.load(2); |
| 282 | 296 | $get('/pcpc/firstAndLastBus', params, function(result){ | ... | ... |
src/main/resources/static/pages/forms/statement/firstAndLastBus_delay.html
| ... | ... | @@ -32,24 +32,32 @@ |
| 32 | 32 | <span class="item-label" style="width: 80px;">公司: </span> |
| 33 | 33 | <select class="form-control" name="company" id="company" style="width: 160px;"></select> |
| 34 | 34 | </div> |
| 35 | - <div style="display: inline-block;margin-left: 24px;" id="subCompany1"> | |
| 35 | + <div style="display: inline-block;margin-left: 19px;" id="subCompany1"> | |
| 36 | 36 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 37 | 37 | <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> |
| 38 | 38 | </div> |
| 39 | - <div style="display: inline-block;margin-left: 10px;"> | |
| 39 | + <div style="display: inline-block;margin-left: 33px;"> | |
| 40 | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| 41 | 41 | <select class="form-control" name="line" id="line" style="width: 160px;"></select> |
| 42 | 42 | </div> |
| 43 | 43 | <div style="margin-top: 10px"></div> |
| 44 | - <div style="display: inline-block;margin-left: 0px;"> | |
| 44 | + <div style="display: inline-block; margin-left: 0px"> | |
| 45 | + <span class="item-label" style="width: 80px;">是否营运: </span> | |
| 46 | + <select class="form-control" name="sfyy" id="sfyy" style="width: 160px;"> | |
| 47 | + <option value="0">全部线路</option> | |
| 48 | + <option value="1" selected="selected">营运线路</option> | |
| 49 | + <option value="2">非营运线路</option> | |
| 50 | + </select> | |
| 51 | + </div> | |
| 52 | + <div style="display: inline-block;margin-left: 5px;"> | |
| 45 | 53 | <span class="item-label" style="width: 80px;">开始时间: </span> |
| 46 | 54 | <input class="form-control" type="text" id="startDate" style="width: 160px;"/> |
| 47 | 55 | </div> |
| 48 | - <div style="display: inline-block;margin-left: 10px;"> | |
| 56 | + <div style="display: inline-block;margin-left: 5px;"> | |
| 49 | 57 | <span class="item-label" style="width: 80px;">结束时间: </span> |
| 50 | 58 | <input class="form-control" type="text" id="endDate" style="width: 160px;"/> |
| 51 | 59 | </div> |
| 52 | - <div class="form-group" style="margin-left: 10px;"> | |
| 60 | + <div class="form-group" style="margin-left: 5px;"> | |
| 53 | 61 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| 54 | 62 | <input class="btn btn-default" type="button" id="export" value="导出"/> |
| 55 | 63 | </div> |
| ... | ... | @@ -135,7 +143,7 @@ |
| 135 | 143 | $("#company").on("change",updateCompany); |
| 136 | 144 | function updateCompany(){ |
| 137 | 145 | var company = $('#company').val(); |
| 138 | - var options = ''; | |
| 146 | + var options = '<option value="">全部分公司</option>'; | |
| 139 | 147 | for(var i = 0; i < obj.length; i++){ |
| 140 | 148 | if(obj[i].companyCode == company){ |
| 141 | 149 | var children = obj[i].children; |
| ... | ... | @@ -186,9 +194,10 @@ |
| 186 | 194 | |
| 187 | 195 | $("#query").on("click",jsDoQuery); |
| 188 | 196 | |
| 197 | + var sfyy = 1; | |
| 198 | + var line = $("#line").val(); | |
| 189 | 199 | var company = $("#company").val(); |
| 190 | 200 | var subCompany = $("#subCompany").val(); |
| 191 | - var line = $("#line").val(); | |
| 192 | 201 | var startDate = $("#startDate").val(); |
| 193 | 202 | var endDate = $("#endDate").val(); |
| 194 | 203 | var lineName = $('#line option:selected').text(); |
| ... | ... | @@ -203,9 +212,10 @@ |
| 203 | 212 | } |
| 204 | 213 | var i = layer.load(2); |
| 205 | 214 | var params = {}; |
| 215 | + sfyy = $("#sfyy").val(); | |
| 216 | + line = $("#line").val(); | |
| 206 | 217 | company = $("#company").val(); |
| 207 | 218 | subCompany = $("#subCompany").val(); |
| 208 | - line = $("#line").val(); | |
| 209 | 219 | startDate = $("#startDate").val(); |
| 210 | 220 | endDate = $("#endDate").val(); |
| 211 | 221 | lineName = $('#line option:selected').text(); |
| ... | ... | @@ -213,9 +223,10 @@ |
| 213 | 223 | lineName = $('#subCompany option:selected').text(); |
| 214 | 224 | if(line == " ") |
| 215 | 225 | line = ""; |
| 226 | + params['sfyy'] = sfyy; | |
| 227 | + params['line'] = line; | |
| 216 | 228 | params['company'] = company; |
| 217 | 229 | params['subCompany'] = subCompany; |
| 218 | - params['line'] = line; | |
| 219 | 230 | params['startDate'] = startDate; |
| 220 | 231 | params['endDate'] = endDate; |
| 221 | 232 | params['type'] = "query"; |
| ... | ... | @@ -253,9 +264,10 @@ |
| 253 | 264 | endDate = $("#endDate").val(); |
| 254 | 265 | if(line == " ") |
| 255 | 266 | line = ""; |
| 267 | + params['sfyy'] = sfyy; | |
| 268 | + params['line'] = line; | |
| 256 | 269 | params['company'] = company; |
| 257 | 270 | params['subCompany'] = subCompany; |
| 258 | - params['line'] = line; | |
| 259 | 271 | params['startDate'] = startDate; |
| 260 | 272 | params['endDate'] = endDate; |
| 261 | 273 | params['type'] = "delay_export"; | ... | ... |
src/main/resources/static/pages/forms/statement/firstAndLastBus_sum.html
| ... | ... | @@ -28,24 +28,32 @@ |
| 28 | 28 | <div class="portlet light porttlet-fit bordered"> |
| 29 | 29 | <div class="portlet-title"> |
| 30 | 30 | <form id="history" class="form-inline" action=""> |
| 31 | - <div style="display: inline-block;margin-left: 28px;" id="company1"> | |
| 31 | + <div style="display: inline-block;margin-left: 33px;" id="company1"> | |
| 32 | 32 | <span class="item-label" style="width: 80px;">公司: </span> |
| 33 | 33 | <select class="form-control" name="company" id="company" style="width: 160px;"></select> |
| 34 | 34 | </div> |
| 35 | - <div style="display: inline-block;margin-left: 24px;" id="subCompany1"> | |
| 35 | + <div style="display: inline-block;margin-left: 19px;" id="subCompany1"> | |
| 36 | 36 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 37 | 37 | <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> |
| 38 | 38 | </div> |
| 39 | - <div style="display: inline-block;margin-left: 10px;"> | |
| 39 | + <div style="display: inline-block;margin-left: 33px;"> | |
| 40 | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| 41 | 41 | <select class="form-control" name="line" id="line" style="width: 160px;"></select> |
| 42 | 42 | </div> |
| 43 | 43 | <div style="margin-top: 10px"></div> |
| 44 | - <div style="display: inline-block;margin-left: 0px;"> | |
| 44 | + <div style="display: inline-block; margin-left: 5px"> | |
| 45 | + <span class="item-label" style="width: 80px;">是否营运: </span> | |
| 46 | + <select class="form-control" name="sfyy" id="sfyy" style="width: 160px;"> | |
| 47 | + <option value="0">全部线路</option> | |
| 48 | + <option value="1" selected="selected">营运线路</option> | |
| 49 | + <option value="2">非营运线路</option> | |
| 50 | + </select> | |
| 51 | + </div> | |
| 52 | + <div style="display: inline-block;margin-left: 5px;"> | |
| 45 | 53 | <span class="item-label" style="width: 80px;">开始时间: </span> |
| 46 | 54 | <input class="form-control" type="text" id="startDate" style="width: 160px;"/> |
| 47 | 55 | </div> |
| 48 | - <div style="display: inline-block;margin-left: 10px;"> | |
| 56 | + <div style="display: inline-block;margin-left: 5px;"> | |
| 49 | 57 | <span class="item-label" style="width: 80px;">结束时间: </span> |
| 50 | 58 | <input class="form-control" type="text" id="endDate" style="width: 160px;"/> |
| 51 | 59 | </div> |
| ... | ... | @@ -189,7 +197,7 @@ |
| 189 | 197 | $("#company").on("change",updateCompany); |
| 190 | 198 | function updateCompany(){ |
| 191 | 199 | var company = $('#company').val(); |
| 192 | - var options = ''; | |
| 200 | + var options = '<option value="">全部分公司</option>'; | |
| 193 | 201 | for(var i = 0; i < obj.length; i++){ |
| 194 | 202 | if(obj[i].companyCode == company){ |
| 195 | 203 | var children = obj[i].children; |
| ... | ... | @@ -232,9 +240,10 @@ |
| 232 | 240 | var temp = tempData[$("#line").val()].split(":"); |
| 233 | 241 | $("#company").val(temp[0]); |
| 234 | 242 | updateCompany(); |
| 235 | - $("#subCompany").val(temp[1]); | |
| 243 | +// $("#subCompany").val(temp[1]); | |
| 244 | + $("#subCompany").val(""); | |
| 236 | 245 | $("#company").attr("disabled", true); |
| 237 | - $("#subCompany").attr("disabled", true); | |
| 246 | +// $("#subCompany").attr("disabled", true); | |
| 238 | 247 | } |
| 239 | 248 | }); |
| 240 | 249 | |
| ... | ... | @@ -276,9 +285,10 @@ |
| 276 | 285 | |
| 277 | 286 | $("#query").on("click",jsDoQuery); |
| 278 | 287 | |
| 288 | + var sfyy = 1; | |
| 289 | + var line = $("#line").val(); | |
| 279 | 290 | var company = $("#company").val(); |
| 280 | 291 | var subCompany = $("#subCompany").val(); |
| 281 | - var line = $("#line").val(); | |
| 282 | 292 | var startDate = $("#startDate").val(); |
| 283 | 293 | var endDate = $("#endDate").val(); |
| 284 | 294 | var lineName = $('#line option:selected').text(); |
| ... | ... | @@ -292,9 +302,10 @@ |
| 292 | 302 | return; |
| 293 | 303 | } |
| 294 | 304 | var params = {}; |
| 305 | + sfyy = $("#sfyy").val(); | |
| 306 | + line = $("#line").val(); | |
| 295 | 307 | company = $("#company").val(); |
| 296 | 308 | subCompany = $("#subCompany").val(); |
| 297 | - line = $("#line").val(); | |
| 298 | 309 | startDate = $("#startDate").val(); |
| 299 | 310 | endDate = $("#endDate").val(); |
| 300 | 311 | lineName = $('#line option:selected').text(); |
| ... | ... | @@ -302,9 +313,10 @@ |
| 302 | 313 | lineName = $('#subCompany option:selected').text(); |
| 303 | 314 | if(line == " ") |
| 304 | 315 | line = ""; |
| 316 | + params['sfyy'] = sfyy; | |
| 317 | + params['line'] = line; | |
| 305 | 318 | params['company'] = company; |
| 306 | 319 | params['subCompany'] = subCompany; |
| 307 | - params['line'] = line; | |
| 308 | 320 | params['startDate'] = startDate; |
| 309 | 321 | params['endDate'] = endDate; |
| 310 | 322 | params['type'] = "query"; |
| ... | ... | @@ -332,9 +344,10 @@ |
| 332 | 344 | |
| 333 | 345 | $("#export").on("click",function(){ |
| 334 | 346 | var params = {}; |
| 347 | + params['sfyy'] = sfyy; | |
| 348 | + params['line'] = line; | |
| 335 | 349 | params['company'] = company; |
| 336 | 350 | params['subCompany'] = subCompany; |
| 337 | - params['line'] = line; | |
| 338 | 351 | params['startDate'] = startDate; |
| 339 | 352 | params['endDate'] = endDate; |
| 340 | 353 | params['type'] = "export"; |
| ... | ... | @@ -357,9 +370,10 @@ |
| 357 | 370 | $("#exportMap").on("click",function(){ |
| 358 | 371 | var i = layer.load(2); |
| 359 | 372 | var params = {}; |
| 373 | + params['sfyy'] = sfyy; | |
| 374 | + params['line'] = tempLine; | |
| 360 | 375 | params['company'] = company; |
| 361 | 376 | params['subCompany'] = subCompany; |
| 362 | - params['line'] = tempLine; | |
| 363 | 377 | params['startDate'] = startDate; |
| 364 | 378 | params['endDate'] = endDate; |
| 365 | 379 | params['type'] = "exportMap"; |
| ... | ... | @@ -381,9 +395,10 @@ |
| 381 | 395 | $("#exportSumMap").on("click",function(){ |
| 382 | 396 | var i = layer.load(2); |
| 383 | 397 | var params = {}; |
| 398 | + params['sfyy'] = sfyy; | |
| 399 | + params['line'] = line; | |
| 384 | 400 | params['company'] = company; |
| 385 | 401 | params['subCompany'] = subCompany; |
| 386 | - params['line'] = line; | |
| 387 | 402 | params['startDate'] = startDate; |
| 388 | 403 | params['endDate'] = endDate; |
| 389 | 404 | params['type'] = "delay_export"; | ... | ... |
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
| ... | ... | @@ -53,7 +53,7 @@ |
| 53 | 53 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 54 | 54 | <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> |
| 55 | 55 | </div> |
| 56 | - <div style="display: inline-block; margin-left: 25px;"> | |
| 56 | + <div style="display: inline-block; margin-left: 10px;"> | |
| 57 | 57 | <span class="item-label" style="width: 80px;">选择线路: </span> |
| 58 | 58 | <select class="form-control" name="line" id="line" style="width: 150px;"></select> |
| 59 | 59 | </div> |
| ... | ... | @@ -64,7 +64,15 @@ |
| 64 | 64 | </select> |
| 65 | 65 | </div> |
| 66 | 66 | <div style="margin-top: 10px"></div> |
| 67 | - <div style="display: inline-block;margin-left: 5px;"> | |
| 67 | + <div style="display: inline-block; margin-left: 5px"> | |
| 68 | + <span class="item-label" style="width: 80px;">是否营运: </span> | |
| 69 | + <select class="form-control" name="sfyy" id="sfyy" style="width: 140px;"> | |
| 70 | + <option value="0">全部线路</option> | |
| 71 | + <option value="1" selected="selected">营运线路</option> | |
| 72 | + <option value="2">非营运线路</option> | |
| 73 | + </select> | |
| 74 | + </div> | |
| 75 | + <div style="display: inline-block;margin-left: 10px;"> | |
| 68 | 76 | <span class="item-label" style="width: 80px;">开始时间: </span> |
| 69 | 77 | <input class="form-control" type="text" id="startDate" style="width: 140px;"/> |
| 70 | 78 | </div> |
| ... | ... | @@ -227,7 +235,7 @@ |
| 227 | 235 | $("#company").on("change",updateCompany); |
| 228 | 236 | function updateCompany(){ |
| 229 | 237 | var company = $('#company').val(); |
| 230 | - var options = ''; | |
| 238 | + var options = '<option value="">全部分公司</option>'; | |
| 231 | 239 | for(var i = 0; i < obj.length; i++){ |
| 232 | 240 | if(obj[i].companyCode == company){ |
| 233 | 241 | var children = obj[i].children; |
| ... | ... | @@ -270,9 +278,10 @@ |
| 270 | 278 | var temp = tempData[$("#line").val()].split(":"); |
| 271 | 279 | $("#company").val(temp[0]); |
| 272 | 280 | updateCompany(); |
| 273 | - $("#subCompany").val(temp[1]); | |
| 281 | +// $("#subCompany").val(temp[1]); | |
| 282 | + $("#subCompany").val(""); | |
| 274 | 283 | $("#company").attr("disabled", true); |
| 275 | - $("#subCompany").attr("disabled", true); | |
| 284 | +// $("#subCompany").attr("disabled", true); | |
| 276 | 285 | } |
| 277 | 286 | }); |
| 278 | 287 | |
| ... | ... | @@ -305,6 +314,7 @@ |
| 305 | 314 | $("#query").on("click",jsDoQuery); |
| 306 | 315 | |
| 307 | 316 | var sfqr = 0; |
| 317 | + var sfyy = 1; | |
| 308 | 318 | var line = $("#line").val(); |
| 309 | 319 | var startDate = $("#startDate").val(); |
| 310 | 320 | var endDate = $("#endDate").val(); |
| ... | ... | @@ -327,6 +337,7 @@ |
| 327 | 337 | if(line == " ") |
| 328 | 338 | line = ""; |
| 329 | 339 | // line = $("#line").val(); |
| 340 | + sfyy = $("#sfyy").val(); | |
| 330 | 341 | startDate = $("#startDate").val(); |
| 331 | 342 | endDate = $("#endDate").val(); |
| 332 | 343 | model = $("#model").val(); |
| ... | ... | @@ -335,6 +346,7 @@ |
| 335 | 346 | subCompany = $("#subCompany").val(); |
| 336 | 347 | params['sfqr'] = sfqr; |
| 337 | 348 | params['line'] = line; |
| 349 | + params['sfyy'] = sfyy; | |
| 338 | 350 | params['startDate'] = startDate; |
| 339 | 351 | params['endDate'] = endDate; |
| 340 | 352 | params['model'] = model; |
| ... | ... | @@ -385,6 +397,7 @@ |
| 385 | 397 | var params = {}; |
| 386 | 398 | params['sfqr'] = sfqr; |
| 387 | 399 | params['line'] = line; |
| 400 | + params['sfyy'] = sfyy; | |
| 388 | 401 | params['startDate'] = startDate; |
| 389 | 402 | params['endDate'] = endDate; |
| 390 | 403 | params['model'] = model; | ... | ... |
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
| ... | ... | @@ -33,15 +33,15 @@ |
| 33 | 33 | <div class="portlet light porttlet-fit bordered"> |
| 34 | 34 | <div class="portlet-title"> |
| 35 | 35 | <form id="history" class="form-inline" action=""> |
| 36 | - <div style="display: inline-block; margin-left: 33px;" id="company1"> | |
| 36 | + <div style="display: inline-block; margin-left: 28px;" id="company1"> | |
| 37 | 37 | <span class="item-label" style="width: 80px;">公司: </span> |
| 38 | 38 | <select class="form-control" name="company" id="company" style="width: 140px;"></select> |
| 39 | 39 | </div> |
| 40 | - <div style="display: inline-block; margin-left: 24px;" id="subCompany1"> | |
| 40 | + <div style="display: inline-block; margin-left: 19px;" id="subCompany1"> | |
| 41 | 41 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 42 | 42 | <select class="form-control" name="subCompany" id="subCompany" style="width: 140px;"></select> |
| 43 | 43 | </div> |
| 44 | - <div style="display: inline-block; margin-left: 24px;"> | |
| 44 | + <div style="display: inline-block; margin-left: 15px;"> | |
| 45 | 45 | <span class="item-label" style="width: 80px;">线路: </span> |
| 46 | 46 | <select class="form-control" name="line" id="line" style="width: 140px;"></select> |
| 47 | 47 | </div> |
| ... | ... | @@ -58,16 +58,22 @@ |
| 58 | 58 | </select> |
| 59 | 59 | </div> |
| 60 | 60 | <div style="margin-top: 10px"></div> |
| 61 | - <div style="display: inline-block;margin-left: 5px;"> | |
| 61 | + <div style="display: inline-block;margin-left: 0px;"> | |
| 62 | 62 | <span class="item-label" style="width: 80px;">开始时间: </span> |
| 63 | 63 | <input class="form-control" type="text" id="startDate" style="width: 140px;"/> |
| 64 | 64 | </div> |
| 65 | - <div style="display: inline-block;margin-left: 10px;"> | |
| 65 | + <div style="display: inline-block;margin-left: 5px;"> | |
| 66 | 66 | <span class="item-label" style="width: 80px;">结束时间: </span> |
| 67 | 67 | <input class="form-control" type="text" id="endDate" style="width: 140px;"/> |
| 68 | 68 | </div> |
| 69 | + <div style="display: inline-block; margin-left: 10px;"> | |
| 70 | + <select class="form-control" name="sfqr" id="sfqr" style="width: 75px;"> | |
| 71 | + <option value="0">全日</option> | |
| 72 | + <option value="1">时段</option> | |
| 73 | + </select> | |
| 74 | + </div> | |
| 69 | 75 | <div style="display: inline-block;margin-left: 10px;"> |
| 70 | - <span class="item-label" style="width: 80px;">时间段: </span> | |
| 76 | +<!-- <span class="item-label" style="width: 80px;">时间段: </span> --> | |
| 71 | 77 | <input class="form-control" type="text" id="times1" style="width: 60px;"/> |
| 72 | 78 | </div> |
| 73 | 79 | <div style="display: inline-block;"> |
| ... | ... | @@ -164,7 +170,7 @@ |
| 164 | 170 | |
| 165 | 171 | <script> |
| 166 | 172 | $(function(){ |
| 167 | - var list; | |
| 173 | + var workLists; | |
| 168 | 174 | |
| 169 | 175 | // 关闭左侧栏 |
| 170 | 176 | if (!$('body').hasClass('page-sidebar-closed')) |
| ... | ... | @@ -205,6 +211,8 @@ |
| 205 | 211 | |
| 206 | 212 | $("#times1").val("05:00"); |
| 207 | 213 | $("#times2").val("23:00"); |
| 214 | + $("#times1").attr("disabled", true); | |
| 215 | + $("#times2").attr("disabled", true); | |
| 208 | 216 | |
| 209 | 217 | var fage=false; |
| 210 | 218 | var xlList; |
| ... | ... | @@ -291,14 +299,27 @@ |
| 291 | 299 | updateCompany(); |
| 292 | 300 | $("#subCompany").val(temp[1]); |
| 293 | 301 | $("#company").attr("disabled", true); |
| 294 | - $("#subCompany").attr("disabled", true); | |
| 302 | +// $("#subCompany").attr("disabled", true); | |
| 303 | + } | |
| 304 | + }); | |
| 305 | + | |
| 306 | + $("#sfqr").on("change", function(){ | |
| 307 | + if($("#sfqr").val() == 0){ | |
| 308 | + $("#times1").attr("disabled", true); | |
| 309 | + $("#times2").attr("disabled", true); | |
| 310 | + sfqr = 0; | |
| 311 | + }else{ | |
| 312 | + $("#times1").attr("disabled", false); | |
| 313 | + $("#times2").attr("disabled", false); | |
| 314 | + sfqr = 1; | |
| 295 | 315 | } |
| 296 | 316 | }); |
| 297 | 317 | |
| 298 | 318 | $("#query").on("click", function (){ |
| 299 | 319 | jsDoQuery(); |
| 300 | 320 | }); |
| 301 | - | |
| 321 | + | |
| 322 | + var sfqr = 0; | |
| 302 | 323 | var line = $("#line").val(); |
| 303 | 324 | var startDate = $("#startDate").val(); |
| 304 | 325 | var endDate = $("#endDate").val(); |
| ... | ... | @@ -312,7 +333,7 @@ |
| 312 | 333 | layer.msg("请选择日期"); |
| 313 | 334 | return; |
| 314 | 335 | } |
| 315 | - if($("#times1").val().trim().length == 0 || $("#times2").val().trim().length == 0){ | |
| 336 | + if(sfqr == 1 && $("#times1").val().trim().length == 0 || $("#times2").val().trim().length == 0){ | |
| 316 | 337 | layer.msg("请选择时间"); |
| 317 | 338 | return; |
| 318 | 339 | } |
| ... | ... | @@ -326,6 +347,7 @@ |
| 326 | 347 | company = $("#company").val(); |
| 327 | 348 | subCompany = $("#subCompany").val(); |
| 328 | 349 | params['line'] = line; |
| 350 | + params['sfqr'] = sfqr; | |
| 329 | 351 | params['startDate'] = startDate; |
| 330 | 352 | params['endDate'] = endDate; |
| 331 | 353 | params['model'] = model; |
| ... | ... | @@ -337,7 +359,6 @@ |
| 337 | 359 | var i = layer.load(2); |
| 338 | 360 | $("#forms .hidden").removeClass("hidden"); |
| 339 | 361 | $get('/busInterval/lineTimeAnaliy', params, function(result){ |
| 340 | - console.log(result); | |
| 341 | 362 | // 把数据填充到模版中 |
| 342 | 363 | var tbodyHtml = template('list_lineTimeAnaly',{list:result}); |
| 343 | 364 | layer.close(i); |
| ... | ... | @@ -346,13 +367,13 @@ |
| 346 | 367 | $('#forms tbody').html(tbodyHtml); |
| 347 | 368 | $("#works_hidden").addClass("hidden"); |
| 348 | 369 | $("#printArea").addClass("hidden"); |
| 349 | - list = result; | |
| 370 | + workLists = result; | |
| 350 | 371 | }); |
| 351 | 372 | |
| 352 | 373 | } |
| 353 | 374 | |
| 354 | 375 | $("#forms tbody").on("click","tr",function(){ |
| 355 | - if($(this).children().size() < 2){ | |
| 376 | + if(!$(this).children() || $(this).children().size() < 2){ | |
| 356 | 377 | return; |
| 357 | 378 | } |
| 358 | 379 | var params = {}; |
| ... | ... | @@ -361,9 +382,9 @@ |
| 361 | 382 | params[index] = $(this).text(); |
| 362 | 383 | } |
| 363 | 384 | }); |
| 364 | - $.each(list, function(i, g){ | |
| 385 | + $.each(workLists, function(i, g){ | |
| 365 | 386 | if(g.line == params[2] && g.lp == params[3] &&g.station == params[4]){ |
| 366 | - var tbodyHtml = template('list_workList',{list:g}); | |
| 387 | + var tbodyHtml = template('list_lineTimeAnaly_1',{list:g}); | |
| 367 | 388 | $('#works tbody').html(tbodyHtml); |
| 368 | 389 | $("#works_hidden").removeClass("hidden"); |
| 369 | 390 | $("#works .hidden").removeClass("hidden"); |
| ... | ... | @@ -491,7 +512,7 @@ |
| 491 | 512 | </tr> |
| 492 | 513 | {{/if}} |
| 493 | 514 | </script> |
| 494 | -<script type="text/html" id="list_workList"> | |
| 515 | +<script type="text/html" id="list_lineTimeAnaly_1"> | |
| 495 | 516 | {{each list.workList as obj i}} |
| 496 | 517 | <tr> |
| 497 | 518 | <td>{{obj.date}}</td> | ... | ... |
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
| ... | ... | @@ -28,38 +28,38 @@ |
| 28 | 28 | <div class="portlet light porttlet-fit bordered"> |
| 29 | 29 | <div class="portlet-title"> |
| 30 | 30 | <form id="history" class="form-inline" action=""> |
| 31 | - <div style="display: inline-block;margin-left: 38px;" id="company1"> | |
| 31 | + <div style="display: inline-block;margin-left: 33px;" id="company1"> | |
| 32 | 32 | <span class="item-label" style="width: 80px;">公司: </span> |
| 33 | - <select class="form-control" name="company" id="company" style="width: 160px;"></select> | |
| 33 | + <select class="form-control" name="company" id="company" style="width: 150px;"></select> | |
| 34 | 34 | </div> |
| 35 | 35 | <div style="display: inline-block;margin-left: 24px;" id="subCompany1"> |
| 36 | 36 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 37 | - <select class="form-control" name="subCompany" id="subCompany" style="width: 160px;"></select> | |
| 37 | + <select class="form-control" name="subCompany" id="subCompany" style="width: 150px;"></select> | |
| 38 | 38 | </div> |
| 39 | 39 | <div style="display: inline-block;margin-left: 38px;"> |
| 40 | 40 | <span class="item-label" style="width: 80px;">线路: </span> |
| 41 | - <select class="form-control" name="line" id="line" style="width: 160px;"></select> | |
| 41 | + <select class="form-control" name="line" id="line" style="width: 150px;"></select> | |
| 42 | 42 | </div> |
| 43 | 43 | <div style="display: inline-block;margin-left: 10px;"> |
| 44 | 44 | <span class="item-label" style="width: 80px;">班次类型: </span> |
| 45 | - <select class="form-control" name="line" id="bcType" style="width: 160px;"> | |
| 45 | + <select class="form-control" name="line" id="bcType" style="width: 150px;"> | |
| 46 | 46 | <option value="0">全部班次</option> |
| 47 | 47 | <option value="1">全程</option> |
| 48 | 48 | <option value="2">区间</option> |
| 49 | 49 | </select> |
| 50 | 50 | </div> |
| 51 | 51 | <div style="margin-top: 10px"></div> |
| 52 | - <div style="display: inline-block;margin-left: 10px;"> | |
| 52 | + <div style="display: inline-block;margin-left: 5px;"> | |
| 53 | 53 | <span class="item-label" style="width: 80px;">开始时间: </span> |
| 54 | - <input class="form-control" type="text" id="startDate" style="width: 160px;"/> | |
| 54 | + <input class="form-control" type="text" id="startDate" style="width: 150px;"/> | |
| 55 | 55 | </div> |
| 56 | 56 | <div style="display: inline-block;margin-left: 10px;"> |
| 57 | 57 | <span class="item-label" style="width: 80px;">结束时间: </span> |
| 58 | - <input class="form-control" type="text" id="endDate" style="width: 160px;"/> | |
| 58 | + <input class="form-control" type="text" id="endDate" style="width: 150px;"/> | |
| 59 | 59 | </div> |
| 60 | 60 | <div style="display: inline-block;margin-left: 10px;"> |
| 61 | 61 | <span class="item-label" style="width: 80px;">模板类型: </span> |
| 62 | - <select class="form-control" name="model" id="model" style="width: 160px;"> | |
| 62 | + <select class="form-control" name="model" id="model" style="width: 150px;"> | |
| 63 | 63 | <option value="">请选择...</option> |
| 64 | 64 | </select> |
| 65 | 65 | </div> |
| ... | ... | @@ -162,6 +162,7 @@ |
| 162 | 162 | function updateCompany(){ |
| 163 | 163 | var company = $('#company').val(); |
| 164 | 164 | var options = ''; |
| 165 | +// var options = '<option value="">全部分公司</option>'; | |
| 165 | 166 | for(var i = 0; i < obj.length; i++){ |
| 166 | 167 | if(obj[i].companyCode == company){ |
| 167 | 168 | var children = obj[i].children; |
| ... | ... | @@ -208,11 +209,11 @@ |
| 208 | 209 | updateCompany(); |
| 209 | 210 | $("#subCompany").val(temp[1]); |
| 210 | 211 | $("#company").attr("disabled", true); |
| 211 | - $("#subCompany").attr("disabled", true); | |
| 212 | +// $("#subCompany").attr("disabled", true); | |
| 212 | 213 | } |
| 213 | 214 | }); |
| 214 | 215 | |
| 215 | - | |
| 216 | + | |
| 216 | 217 | $("#query").on("click", function(){ |
| 217 | 218 | page = 0; |
| 218 | 219 | jsDoQuery(true); | ... | ... |
src/main/resources/static/pages/forms/statement/statisticsDailyCalc2.html
| ... | ... | @@ -85,7 +85,7 @@ |
| 85 | 85 | <tr> |
| 86 | 86 | <td rowspan="3"><span >分公司</span></td> |
| 87 | 87 | <td rowspan="3"><span >路线名</span></td> |
| 88 | - <td colspan="20">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td> | |
| 88 | + <td colspan="21">全日营运里程(公里)(注:实际营运里程、实际空驶里程、实际总里程均已包含临加里程)</td> | |
| 89 | 89 | <td colspan="15">全日营运班次</td> |
| 90 | 90 | <td colspan="9">大间隔情况</td> |
| 91 | 91 | </tr> |
| ... | ... | @@ -100,7 +100,7 @@ |
| 100 | 100 | <td rowspan="2"><span>少驶公里</span></td> |
| 101 | 101 | <td rowspan="2"><span>少驶班次</span></td> |
| 102 | 102 | <td colspan="11">少驶原因(公里)</td> |
| 103 | - <td rowspan="2"><span >临加公里</span></td> | |
| 103 | + <td colspan="2">临加公里</td> | |
| 104 | 104 | <td colspan="3">计划班次</td> |
| 105 | 105 | <td colspan="3">实际班次</td> |
| 106 | 106 | <td colspan="3">临加班次</td> |
| ... | ... | @@ -122,6 +122,8 @@ |
| 122 | 122 | <td><span>气候</span></td> |
| 123 | 123 | <td><span>援外</span></td> |
| 124 | 124 | <td><span>其他</span></td> |
| 125 | + <td><span>营运</span></td> | |
| 126 | + <td><span>空驶</span></td> | |
| 125 | 127 | <td><span>全日</span></td> |
| 126 | 128 | <td><span>早高峰</span></td> |
| 127 | 129 | <td><span>晚高峰</span></td> |
| ... | ... | @@ -379,6 +381,7 @@ |
| 379 | 381 | <td>{{obj.ssgl_yw}}</td> |
| 380 | 382 | <td>{{obj.ssgl_other}}</td> |
| 381 | 383 | <td>{{obj.ljgl}}</td> |
| 384 | + <td>{{obj.ljks}}</td> | |
| 382 | 385 | <td>{{obj.jhbc}}</td> |
| 383 | 386 | <td>{{obj.jhbc_m}}</td> |
| 384 | 387 | <td>{{obj.jhbc_a}}</td> | ... | ... |
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
| ... | ... | @@ -55,8 +55,20 @@ |
| 55 | 55 | <option value="">请选择...</option> |
| 56 | 56 | </select> |
| 57 | 57 | </div> |
| 58 | + <div style="display: inline-block; margin-left: 10px" id="lp1"> | |
| 59 | + <span class="item-label" style="width: 80px;">路牌: </span> | |
| 60 | + <select class="form-control" name="lp" id="lp" style="width: 140px;"></select> | |
| 61 | + </div> | |
| 58 | 62 | <div style="margin-top: 10px"></div> |
| 59 | - <div style="display: inline-block; margin-left: 5px;"> | |
| 63 | + <div style="display: inline-block; margin-left: 5px"> | |
| 64 | + <span class="item-label" style="width: 80px;">是否营运: </span> | |
| 65 | + <select class="form-control" name="sfyy" id="sfyy" style="width: 140px;"> | |
| 66 | + <option value="0">全部线路</option> | |
| 67 | + <option value="1" selected="selected">营运线路</option> | |
| 68 | + <option value="2">非营运线路</option> | |
| 69 | + </select> | |
| 70 | + </div> | |
| 71 | + <div style="display: inline-block; margin-left: 10px;"> | |
| 60 | 72 | <span class="item-label" style="width: 80px;">开始时间: </span> |
| 61 | 73 | <input class="form-control" type="text" id="startDate" style="width: 140px;"/> |
| 62 | 74 | </div> |
| ... | ... | @@ -78,10 +90,6 @@ |
| 78 | 90 | <span class="item-label" style="width: 80px;"> - </span> |
| 79 | 91 | <input class="form-control" type="text" id="times2" style="width: 60px;"/> |
| 80 | 92 | </div> |
| 81 | - <div style="display: inline-block; margin-left: 10px" id="lp1"> | |
| 82 | - <span class="item-label" style="width: 80px;">路牌: </span> | |
| 83 | - <select class="form-control" name="lp" id="lp" style="width: 140px;"></select> | |
| 84 | - </div> | |
| 85 | 93 | <div class="form-group" style="margin-left: 14px"> |
| 86 | 94 | <input class="btn btn-default" type="button" id="query" value="筛选"/> |
| 87 | 95 | <input class="btn btn-default" type="button" id="export" value="导出"/> |
| ... | ... | @@ -186,7 +194,7 @@ |
| 186 | 194 | $("#company").on("change",updateCompany); |
| 187 | 195 | function updateCompany(){ |
| 188 | 196 | var company = $('#company').val(); |
| 189 | - var options = ''; | |
| 197 | + var options = '<option value="">全部分公司</option>'; | |
| 190 | 198 | for(var i = 0; i < obj.length; i++){ |
| 191 | 199 | if(obj[i].companyCode == company){ |
| 192 | 200 | var children = obj[i].children; |
| ... | ... | @@ -196,7 +204,7 @@ |
| 196 | 204 | } |
| 197 | 205 | } |
| 198 | 206 | $('#subCompany').html(options); |
| 199 | - } | |
| 207 | + } | |
| 200 | 208 | |
| 201 | 209 | var tempData = {}; |
| 202 | 210 | $.get('/report/lineList',function(xlList){ |
| ... | ... | @@ -235,9 +243,10 @@ |
| 235 | 243 | var temp = tempData[$("#line").val()].split(":"); |
| 236 | 244 | $("#company").val(temp[0]); |
| 237 | 245 | updateCompany(); |
| 238 | - $("#subCompany").val(temp[1]); | |
| 246 | +// $("#subCompany").val(temp[1]); | |
| 247 | + $("#subCompany").val(""); | |
| 239 | 248 | $("#company").attr("disabled", true); |
| 240 | - $("#subCompany").attr("disabled", true); | |
| 249 | +// $("#subCompany").attr("disabled", true); | |
| 241 | 250 | } |
| 242 | 251 | }); |
| 243 | 252 | |
| ... | ... | @@ -246,6 +255,7 @@ |
| 246 | 255 | }); |
| 247 | 256 | |
| 248 | 257 | var list = []; |
| 258 | + var sfyy = 1; | |
| 249 | 259 | var sfqr = 0; |
| 250 | 260 | var statu = 0; |
| 251 | 261 | var line = $("#line").val(); |
| ... | ... | @@ -269,6 +279,7 @@ |
| 269 | 279 | return; |
| 270 | 280 | } |
| 271 | 281 | var params = {}; |
| 282 | + sfyy = $("#sfyy").val(); | |
| 272 | 283 | line = $("#line").val(); |
| 273 | 284 | startDate = $("#startDate").val(); |
| 274 | 285 | endDate = $("#endDate").val(); |
| ... | ... | @@ -282,6 +293,7 @@ |
| 282 | 293 | if(lineName == "全部线路") |
| 283 | 294 | lineName = $('#subCompany option:selected').text(); |
| 284 | 295 | params['lp'] = lp; |
| 296 | + params['sfyy'] = sfyy; | |
| 285 | 297 | params['line'] = line; |
| 286 | 298 | params['sfqr'] = sfqr; |
| 287 | 299 | params['statu'] = statu; |
| ... | ... | @@ -314,7 +326,7 @@ |
| 314 | 326 | var key = $(this).parent().prev().html(); |
| 315 | 327 | $.each(list.dataList, function(i, g){ |
| 316 | 328 | if(g.line == key){ |
| 317 | - var tbodyHtml = template('list_workList',{list:g}); | |
| 329 | + var tbodyHtml = template('list_timeAndSpeed_1',{list:g}); | |
| 318 | 330 | $("#works_hidden").removeClass("hidden"); |
| 319 | 331 | $("#date0").html(g.date); |
| 320 | 332 | $("#line0").html(g.line); |
| ... | ... | @@ -344,6 +356,7 @@ |
| 344 | 356 | } |
| 345 | 357 | var params = {}; |
| 346 | 358 | params['lp'] = lp; |
| 359 | + params['sfyy'] = sfyy; | |
| 347 | 360 | params['line'] = line; |
| 348 | 361 | params['sfqr'] = sfqr; |
| 349 | 362 | params['statu'] = statu; |
| ... | ... | @@ -585,7 +598,7 @@ |
| 585 | 598 | {{/if}} |
| 586 | 599 | </tbody> |
| 587 | 600 | </script> |
| 588 | -<script type="text/html" id="list_workList"> | |
| 601 | +<script type="text/html" id="list_timeAndSpeed_1"> | |
| 589 | 602 | <thead> |
| 590 | 603 | <tr> |
| 591 | 604 | <th width='80px'>日期</th> | ... | ... |
src/main/resources/static/pages/mforms/changetochanges/changetochange.html
| ... | ... | @@ -49,23 +49,31 @@ |
| 49 | 49 | class="form-control" name="company" id="gsdmChange" |
| 50 | 50 | style="width: 140px;"></select> |
| 51 | 51 | </div> |
| 52 | - <div style="display: inline-block; margin-left: 24px;" | |
| 52 | + <div style="display: inline-block; margin-left: 19px;" | |
| 53 | 53 | id="fgsdmDiv_change"> |
| 54 | 54 | <span class="item-label" style="width: 80px;">分公司: </span> <select |
| 55 | 55 | class="form-control" name="subCompany" id="fgsdmChange" |
| 56 | 56 | style="width: 140px;"></select> |
| 57 | 57 | </div> |
| 58 | - <div style="display: inline-block; margin-left: 10px;"> | |
| 58 | + <div style="display: inline-block; margin-left: 33px;"> | |
| 59 | 59 | <span class="item-label" style="width: 80px;">线路: </span> <select |
| 60 | 60 | class="form-control" name="line" id="line" style="width: 180px;"></select> |
| 61 | 61 | </div> |
| 62 | 62 | <div style="margin-top: 10px"></div> |
| 63 | + <div style="display: inline-block; margin-left: 5px"> | |
| 64 | + <span class="item-label" style="width: 80px;">是否营运: </span> | |
| 65 | + <select class="form-control" name="sfyy" id="sfyy" style="width: 140px;"> | |
| 66 | + <option value="0">全部线路</option> | |
| 67 | + <option value="1" selected="selected">营运线路</option> | |
| 68 | + <option value="2">非营运线路</option> | |
| 69 | + </select> | |
| 70 | + </div> | |
| 63 | 71 | <div style="display: inline-block; margin-left: 5px;"> |
| 64 | 72 | <span class="item-label" style="width: 80px;">开始时间: </span> <input |
| 65 | 73 | class="form-control" type="text" id="startDate" |
| 66 | 74 | style="width: 140px;" /> |
| 67 | 75 | </div> |
| 68 | - <div style="display: inline-block; margin-left: 10px;"> | |
| 76 | + <div style="display: inline-block; margin-left: 5px;"> | |
| 69 | 77 | <span class="item-label" style="width: 80px;">结束时间: </span> <input |
| 70 | 78 | class="form-control" type="text" id="endDate" |
| 71 | 79 | style="width: 140px;" /> |
| ... | ... | @@ -182,7 +190,7 @@ |
| 182 | 190 | $("#gsdmChange").on("change",updateCompany); |
| 183 | 191 | function updateCompany(){ |
| 184 | 192 | var company = $('#gsdmChange').val(); |
| 185 | - var options = ''; | |
| 193 | + var options = '<option value="">全部分公司</option>'; | |
| 186 | 194 | for(var i = 0; i < obj.length; i++){ |
| 187 | 195 | if(obj[i].companyCode == company){ |
| 188 | 196 | var children = obj[i].children; |
| ... | ... | @@ -194,7 +202,7 @@ |
| 194 | 202 | $('#fgsdmChange').html(options); |
| 195 | 203 | } |
| 196 | 204 | |
| 197 | - | |
| 205 | + | |
| 198 | 206 | var tempData = {}; |
| 199 | 207 | $.get('/report/lineList',function(xlList){ |
| 200 | 208 | var data = []; |
| ... | ... | @@ -226,18 +234,21 @@ |
| 226 | 234 | var temp = tempData[$("#line").val()].split(":"); |
| 227 | 235 | $("#gsdmChange").val(temp[0]); |
| 228 | 236 | updateCompany(); |
| 229 | - $("#fgsdmChange").val(temp[1]); | |
| 237 | +// $("#fgsdmChange").val(temp[1]); | |
| 238 | + $("#fgsdmChange").val(""); | |
| 230 | 239 | $("#gsdmChange").attr("disabled", true); |
| 231 | - $("#fgsdmChange").attr("disabled", true); | |
| 240 | +// $("#fgsdmChange").attr("disabled", true); | |
| 232 | 241 | } |
| 233 | 242 | }); |
| 234 | 243 | |
| 235 | 244 | var line; |
| 236 | 245 | var startDate; |
| 237 | 246 | var endDate; |
| 247 | + var sfyy = 0; | |
| 238 | 248 | $("#query").on( |
| 239 | 249 | "click", |
| 240 | 250 | function() { |
| 251 | + sfyy = $("#sfyy").val(); | |
| 241 | 252 | line = $("#line").val(); |
| 242 | 253 | sel = $("#sel").val(); |
| 243 | 254 | var startDate1 = $("#startDate").val(); |
| ... | ... | @@ -249,6 +260,7 @@ |
| 249 | 260 | $get('/mcy_forms/changetochange', { |
| 250 | 261 | sel : sel, |
| 251 | 262 | line : line, |
| 263 | + sfyy : sfyy, | |
| 252 | 264 | startDate : $("#startDate").val(), |
| 253 | 265 | endDate : $("#endDate").val(), |
| 254 | 266 | gsdm:gsdmChange, |
| ... | ... | @@ -272,13 +284,14 @@ |
| 272 | 284 | $("#export").on( |
| 273 | 285 | "click", |
| 274 | 286 | function() { |
| 287 | + sfyy = $("#sfyy").val(); | |
| 275 | 288 | line = $("#line").val(); |
| 276 | 289 | var sel = $("#sel").val(); |
| 277 | - var startDate = $("#startDate").val(); | |
| 278 | - var endDate = $("#endDate").val(); | |
| 279 | - var lpName = $("#lpName").val(); | |
| 280 | - var gsdmChange= $("#gsdmChange").val(); | |
| 281 | - var fgsdmChange= $("#fgsdmChange").val(); | |
| 290 | + var startDate = $("#startDate").val(); | |
| 291 | + var endDate = $("#endDate").val(); | |
| 292 | + var lpName = $("#lpName").val(); | |
| 293 | + var gsdmChange= $("#gsdmChange").val(); | |
| 294 | + var fgsdmChange= $("#fgsdmChange").val(); | |
| 282 | 295 | var lineName = $('#line option:selected').text(); |
| 283 | 296 | if(lineName == "全部线路") |
| 284 | 297 | lineName = $('#fgsdmChange option:selected').text(); |
| ... | ... | @@ -286,6 +299,7 @@ |
| 286 | 299 | $post('/mcy_export/changetochangeExport', { |
| 287 | 300 | sel:sel, |
| 288 | 301 | line:line, |
| 302 | + sfyy:sfyy, | |
| 289 | 303 | gsdm:gsdmChange, |
| 290 | 304 | fgsdm:fgsdmChange, |
| 291 | 305 | startDate : startDate, | ... | ... |
src/main/resources/static/pages/mforms/operationservices/operationservice.html
| ... | ... | @@ -34,31 +34,39 @@ |
| 34 | 34 | id="gsdmDiv_operat"> |
| 35 | 35 | <span class="item-label" style="width: 80px;">公司: </span> <select |
| 36 | 36 | class="form-control" name="company" id="gsdmOperat" |
| 37 | - style="width: 140px;"></select> | |
| 37 | + style="width: 150px;"></select> | |
| 38 | 38 | </div> |
| 39 | - <div style="display: inline-block; margin-left: 25px;" | |
| 39 | + <div style="display: inline-block; margin-left: 19px;" | |
| 40 | 40 | id="fgsdmDiv_operat"> |
| 41 | 41 | <span class="item-label" style="width: 80px;">分公司: </span> <select |
| 42 | 42 | class="form-control" name="subCompany" id="fgsdmOperat" |
| 43 | - style="width: 140px;"></select> | |
| 43 | + style="width: 150px;"></select> | |
| 44 | 44 | </div> |
| 45 | - <div style="margin-top: 2px"></div> | |
| 46 | 45 | <div style="display: inline-block;margin-left: 33px;"> |
| 47 | 46 | <span class="item-label" style="width: 80px;">线路: </span> <select |
| 48 | - class="form-control" name="line" id="line" style="width: 140px;"></select> | |
| 47 | + class="form-control" name="line" id="line" style="width: 150px;"></select> | |
| 49 | 48 | </div> |
| 50 | - <div style="display: inline-block; margin-left: 11px;"> | |
| 49 | + <div style="margin-top: 10px"></div> | |
| 50 | + <div style="display: inline-block; margin-left: 5px"> | |
| 51 | + <span class="item-label" style="width: 80px;">是否营运: </span> | |
| 52 | + <select class="form-control" name="sfyy" id="sfyy" style="width: 150px;"> | |
| 53 | + <option value="0">全部线路</option> | |
| 54 | + <option value="1" selected="selected">营运线路</option> | |
| 55 | + <option value="2">非营运线路</option> | |
| 56 | + </select> | |
| 57 | + </div> | |
| 58 | + <div style="display: inline-block; margin-left: 5px;"> | |
| 51 | 59 | <span class="item-label" style="width: 80px;">开始时间: </span> <input |
| 52 | 60 | class="form-control" type="text" id="startDate" |
| 53 | - style="width: 140px;" /> | |
| 61 | + style="width: 150px;" /> | |
| 54 | 62 | </div> |
| 55 | - <div style="display: inline-block; margin-left: 15px;"> | |
| 63 | + <div style="display: inline-block; margin-left: 5px;"> | |
| 56 | 64 | <span class="item-label" style="width: 80px;">结束时间: </span> <input |
| 57 | 65 | class="form-control" type="text" id="endDate" |
| 58 | - style="width: 140px;" /> | |
| 66 | + style="width: 150px;" /> | |
| 59 | 67 | </div> |
| 60 | - <div style="display: inline-block; margin-left: 15px"> | |
| 61 | - <span class="item-label" style="width: 150px;">统计: </span> | |
| 68 | + <div style="display: inline-block; margin-left: 10px"> | |
| 69 | + <span class="item-label" style="width: 150px;">统计: </span> | |
| 62 | 70 | </div> |
| 63 | 71 | <div class="form-group"> |
| 64 | 72 | <input class="btn btn-default" type="button" id="query" value="筛选" /> |
| ... | ... | @@ -75,6 +83,7 @@ |
| 75 | 83 | <thead> |
| 76 | 84 | <tr> |
| 77 | 85 | <th>序号</th> |
| 86 | + <th>公司</th> | |
| 78 | 87 | <th>线路名称</th> |
| 79 | 88 | <th>加注量</th> |
| 80 | 89 | <th>消耗量</th> |
| ... | ... | @@ -143,7 +152,7 @@ |
| 143 | 152 | $("#gsdmOperat").on("change",updateCompany); |
| 144 | 153 | function updateCompany(){ |
| 145 | 154 | var company = $('#gsdmOperat').val(); |
| 146 | - var options = ''; | |
| 155 | + var options = '<option value="">全部分公司</option>'; | |
| 147 | 156 | for(var i = 0; i < obj.length; i++){ |
| 148 | 157 | if(obj[i].companyCode == company){ |
| 149 | 158 | var children = obj[i].children; |
| ... | ... | @@ -186,9 +195,10 @@ |
| 186 | 195 | var temp = tempData[$("#line").val()].split(":"); |
| 187 | 196 | $("#gsdmOperat").val(temp[0]); |
| 188 | 197 | updateCompany(); |
| 189 | - $("#fgsdmOperat").val(temp[1]); | |
| 198 | +// $("#fgsdmOperat").val(temp[1]); | |
| 199 | + $("#fgsdmOperat").val(""); | |
| 190 | 200 | $("#gsdmOperat").attr("disabled", true); |
| 191 | - $("#fgsdmOperat").attr("disabled", true); | |
| 201 | +// $("#fgsdmOperat").attr("disabled", true); | |
| 192 | 202 | } |
| 193 | 203 | }); |
| 194 | 204 | |
| ... | ... | @@ -196,6 +206,7 @@ |
| 196 | 206 | $("#query").on( |
| 197 | 207 | "click", |
| 198 | 208 | function() { |
| 209 | + var sfyy = $("#sfyy").val(); | |
| 199 | 210 | var line = $("#line").val(); |
| 200 | 211 | var startDate = $("#startDate").val(); |
| 201 | 212 | var endDate = $("#endDate").val(); |
| ... | ... | @@ -204,9 +215,10 @@ |
| 204 | 215 | var fgsdmOperat = $("#fgsdmOperat").val(); |
| 205 | 216 | var i = layer.load(2); |
| 206 | 217 | $get("/mcy_forms/operationservice", { |
| 218 | + sfyy : sfyy, | |
| 219 | + line : line, | |
| 207 | 220 | gsdmOperat : gsdmOperat, |
| 208 | 221 | fgsdmOperat : fgsdmOperat, |
| 209 | - line : line, | |
| 210 | 222 | startDate : startDate, |
| 211 | 223 | endDate : endDate, |
| 212 | 224 | lpName : lpName, |
| ... | ... | @@ -236,6 +248,7 @@ |
| 236 | 248 | }); |
| 237 | 249 | }); |
| 238 | 250 | $("#export").on("click",function(){ |
| 251 | + sfyy = $("#sfyy").val(); | |
| 239 | 252 | line = $("#line").val(); |
| 240 | 253 | startDate=$("#startDate").val(); |
| 241 | 254 | endDate=$("#endDate").val(); |
| ... | ... | @@ -245,7 +258,7 @@ |
| 245 | 258 | if(lineName == "全部线路") |
| 246 | 259 | lineName = $('#fgsdmOperat option:selected').text(); |
| 247 | 260 | var i = layer.load(2); |
| 248 | - $get('/mcy_export/operationserviceExport',{gsdmOperat:gsdmOperat,fgsdmOperat:fgsdmOperat,line:line,startDate:startDate,endDate:endDate,type:'export',lineName:lineName},function(result){ | |
| 261 | + $get('/mcy_export/operationserviceExport',{sfyy:sfyy,line:line,gsdmOperat:gsdmOperat,fgsdmOperat:fgsdmOperat,startDate:startDate,endDate:endDate,type:'export',lineName:lineName},function(result){ | |
| 249 | 262 | var dateTime = ""; |
| 250 | 263 | if(startDate == endDate){ |
| 251 | 264 | dateTime = moment(startDate).format("YYYYMMDD"); |
| ... | ... | @@ -266,6 +279,7 @@ |
| 266 | 279 | {{each list as obj i}} |
| 267 | 280 | <tr> |
| 268 | 281 | <td>{{i+1}}</td> |
| 282 | + <td>{{obj.fgs}}</td> | |
| 269 | 283 | <td>{{obj.xlName}}</td> |
| 270 | 284 | <td>{{obj.jzl}}</td> |
| 271 | 285 | <td>{{obj.xhl}}</td> |
| ... | ... | @@ -276,7 +290,7 @@ |
| 276 | 290 | {{/each}} |
| 277 | 291 | {{if list.length == 0}} |
| 278 | 292 | <tr> |
| 279 | - <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td> | |
| 293 | + <td colspan="8"><h6 class="muted">没有找到相关数据</h6></td> | |
| 280 | 294 | </tr> |
| 281 | 295 | {{/if}} |
| 282 | 296 | </script> | ... | ... |
src/main/resources/static/pages/mforms/shiftuehiclemanths/shiftuehiclemanth.html
src/main/resources/static/pages/mforms/singledatas/singledata.html
| ... | ... | @@ -32,21 +32,30 @@ |
| 32 | 32 | <span class="item-label" style="width: 80px;">公司: </span> |
| 33 | 33 | <select class="form-control" name="company" id="gsdmSing" style="width: 140px;"></select> |
| 34 | 34 | </div> |
| 35 | - <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv_sing"> | |
| 35 | + <div style="display: inline-block; margin-left: 10px;" id="fgsdmDiv_sing"> | |
| 36 | 36 | <span class="item-label" style="width: 80px;">分公司: </span> |
| 37 | 37 | <select class="form-control" name="subCompany" id="fgsdmSing" style="width: 140px;"></select> |
| 38 | 38 | </div> |
| 39 | - <div style="display: inline-block;"> | |
| 40 | - <span class="item-label" style="width: 80px;"> 线路: </span> | |
| 39 | + <div style="display: inline-block; margin-left: 15px;"> | |
| 40 | + <span class="item-label" style="width: 80px;">线路: </span> | |
| 41 | 41 | <select class="form-control" name="line" id="line" style="width: 140px;"></select> |
| 42 | 42 | </div> |
| 43 | - <div style="display: inline-block;margin-left: 15px;"> | |
| 43 | + <div style="margin-top: 10px"></div> | |
| 44 | + <div style="display: inline-block; margin-left: 5px"> | |
| 45 | + <span class="item-label" style="width: 80px;">是否营运: </span> | |
| 46 | + <select class="form-control" name="sfyy" id="sfyy" style="width: 140px;"> | |
| 47 | + <option value="0">全部线路</option> | |
| 48 | + <option value="1" selected="selected">营运线路</option> | |
| 49 | + <option value="2">非营运线路</option> | |
| 50 | + </select> | |
| 51 | + </div> | |
| 52 | + <div style="display: inline-block;margin-left: 24px;"> | |
| 44 | 53 | <span class="item-label" style="width: 140px;">时间: </span> |
| 45 | 54 | <input class="form-control" type="text" id="startDate" style="width: 140px;"/> |
| 46 | 55 | </div> |
| 47 | 56 | |
| 48 | 57 | <div style="display: inline-block;margin-left: 15px"> |
| 49 | - <span class="item-label" style="width: 150px;">统计: </span> | |
| 58 | + <span class="item-label" style="width: 150px;">统计: </span> | |
| 50 | 59 | <select class="form-control" name="tjtype" id="tjtype" style="width: 140px;"> |
| 51 | 60 | <option value="jsy">驾驶员</option> |
| 52 | 61 | <option value="spy">售票员</option> |
| ... | ... | @@ -129,7 +138,7 @@ |
| 129 | 138 | $("#gsdmSing").on("change",updateCompany); |
| 130 | 139 | function updateCompany(){ |
| 131 | 140 | var company = $('#gsdmSing').val(); |
| 132 | - var options = ''; | |
| 141 | + var options = '<option value="">全部分公司</option>'; | |
| 133 | 142 | for(var i = 0; i < obj.length; i++){ |
| 134 | 143 | if(obj[i].companyCode == company){ |
| 135 | 144 | var children = obj[i].children; |
| ... | ... | @@ -172,9 +181,10 @@ |
| 172 | 181 | var temp = tempData[$("#line").val()].split(":"); |
| 173 | 182 | $("#gsdmSing").val(temp[0]); |
| 174 | 183 | updateCompany(); |
| 175 | - $("#fgsdmSing").val(temp[1]); | |
| 184 | +// $("#fgsdmSing").val(temp[1]); | |
| 185 | + $("#fgsdmSing").val(""); | |
| 176 | 186 | $("#gsdmSing").attr("disabled", true); |
| 177 | - $("#fgsdmSing").attr("disabled", true); | |
| 187 | +// $("#fgsdmSing").attr("disabled", true); | |
| 178 | 188 | } |
| 179 | 189 | }); |
| 180 | 190 | |
| ... | ... | @@ -184,6 +194,7 @@ |
| 184 | 194 | layer.msg("请选择时间!"); |
| 185 | 195 | return; |
| 186 | 196 | } |
| 197 | + var sfyy = $("#sfyy").val(); | |
| 187 | 198 | var line = $("#line").val(); |
| 188 | 199 | var startDate = $("#startDate").val(); |
| 189 | 200 | var lpName = $("#lpName").val(); |
| ... | ... | @@ -193,7 +204,7 @@ |
| 193 | 204 | var params = {}; |
| 194 | 205 | var i = layer.load(2); |
| 195 | 206 | // if(tjtype=='jsy'){ |
| 196 | - $get("/mcy_forms/singledatatj",{ gsdmSing:gsdmSing,fgsdmSing:fgsdmSing, line:line,startDate:startDate,lpName:lpName,tjtype:tjtype},function(result){ | |
| 207 | + $get("/mcy_forms/singledatatj",{sfyy:sfyy,gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,lpName:lpName,tjtype:tjtype},function(result){ | |
| 197 | 208 | layer.close(i); |
| 198 | 209 | var singledata = template('singledata',{list:result}); |
| 199 | 210 | // 把渲染好的模版html文本追加到表格中 |
| ... | ... | @@ -219,6 +230,7 @@ |
| 219 | 230 | }); |
| 220 | 231 | |
| 221 | 232 | $("#export").on("click",function(){ |
| 233 | + var sfyy = $("#sfyy").val(); | |
| 222 | 234 | var line = $("#line").val(); |
| 223 | 235 | var startDate = $("#startDate").val(); |
| 224 | 236 | var endDate = $("#endDate").val(); |
| ... | ... | @@ -231,7 +243,7 @@ |
| 231 | 243 | lineName = $('#fgsdmSing option:selected').text(); |
| 232 | 244 | var i = layer.load(2); |
| 233 | 245 | // if(tjtype=='jsy'){ |
| 234 | - $get('/mcy_export/singledataExportTj',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export',lineName:lineName},function(result){ | |
| 246 | + $get('/mcy_export/singledataExportTj',{sfyy:sfyy,gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,type:'export',lineName:lineName},function(result){ | |
| 235 | 247 | window.open("/downloadFile/download?fileName=" |
| 236 | 248 | +moment(startDate).format("YYYYMMDD") |
| 237 | 249 | +"-"+lineName+"-路单数据"); | ... | ... |
src/main/resources/static/pages/punctual/list.html
| ... | ... | @@ -67,7 +67,8 @@ |
| 67 | 67 | var date = id.split("_")[0]; |
| 68 | 68 | var endDate = date; |
| 69 | 69 | var line = id.split("_")[1]; |
| 70 | - var fgs=$('#fgsdm').val(); | |
| 70 | + var fgs = id.split("_")[3]; | |
| 71 | +// var fgs=$('#fgsdm').val(); | |
| 71 | 72 | var gs=$('#gsdm').val(); |
| 72 | 73 | $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:2},function(result){ |
| 73 | 74 | var onTime_2 = template('onTime_2',{list:result}); |
| ... | ... | @@ -78,7 +79,8 @@ |
| 78 | 79 | var date = no.split("_")[0]; |
| 79 | 80 | var endDate = date; |
| 80 | 81 | var line = no.split("_")[1]; |
| 81 | - var fgs=$('#fgsdm').val(); | |
| 82 | + var fgs = no.split("_")[3]; | |
| 83 | +// var fgs=$('#fgsdm').val(); | |
| 82 | 84 | var gs=$('#gsdm').val(); |
| 83 | 85 | $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:2,type:"export",lineName:no.split("_")[2]},function(result){ |
| 84 | 86 | window.open("/downloadFile/download?fileName=" | ... | ... |
src/main/resources/static/pages/punctual/onTime.html
| ... | ... | @@ -27,27 +27,34 @@ |
| 27 | 27 | <div class="portlet light porttlet-fit bordered"> |
| 28 | 28 | <div class="portlet-title"> |
| 29 | 29 | <form class="form-inline" action=""> |
| 30 | - <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv"> | |
| 31 | - <span class="item-label" style="width: 80px;">公司: </span> | |
| 32 | - <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select> | |
| 33 | - </div> | |
| 34 | - <div style="display: inline-block; margin-left: 38px;" id="fgsdmDiv"> | |
| 35 | - <span class="item-label" style="width: 80px;">分公司: </span> | |
| 36 | - <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select> | |
| 37 | - </div> | |
| 38 | - <div style="margin-top: 10px"> | |
| 39 | - </div> | |
| 40 | - <div style="display: inline-block;margin-left: 33px;"> | |
| 30 | + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv"> | |
| 31 | + <span class="item-label" style="width: 80px;">公司: </span> | |
| 32 | + <select class="form-control" name="company" id="gsdm" style="width: 150px;"></select> | |
| 33 | + </div> | |
| 34 | + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv"> | |
| 35 | + <span class="item-label" style="width: 80px;">分公司: </span> | |
| 36 | + <select class="form-control" name="subCompany" id="fgsdm" style="width: 150px;"></select> | |
| 37 | + </div> | |
| 38 | + <div style="display: inline-block;margin-left: 38px;"> | |
| 41 | 39 | <span class="item-label" style="width: 80px;">线路: </span> |
| 42 | - <select class="form-control" name="line" id="line" style="width: 180px;"></select> | |
| 40 | + <select class="form-control" name="line" id="line" style="width: 150px;"></select> | |
| 43 | 41 | </div> |
| 42 | + <div style="margin-top: 10px"/> | |
| 43 | + <div style="display: inline-block; margin-left: 5px"> | |
| 44 | + <span class="item-label" style="width: 80px;">是否营运: </span> | |
| 45 | + <select class="form-control" name="sfyy" id="sfyy" style="width: 150px;"> | |
| 46 | + <option value="0">全部线路</option> | |
| 47 | + <option value="1" selected="selected">营运线路</option> | |
| 48 | + <option value="2">非营运线路</option> | |
| 49 | + </select> | |
| 50 | + </div> | |
| 44 | 51 | <div style="display: inline-block;"> |
| 45 | - <span class="item-label" style="width: 80px;margin-left: 24px;">开始时间: </span> | |
| 46 | - <input class="form-control" type="text" id="date" style="width: 180px;"/> | |
| 52 | + <span class="item-label" style="width: 80px;margin-left: 10px;">开始时间: </span> | |
| 53 | + <input class="form-control" type="text" id="date" style="width: 150px;"/> | |
| 47 | 54 | </div> |
| 48 | 55 | <div style="display: inline-block;"> |
| 49 | - <span class="item-label" style="width: 80px;margin-left: 24px;">结束时间: </span> | |
| 50 | - <input class="form-control" type="text" id="endDate" style="width: 180px;"/> | |
| 56 | + <span class="item-label" style="width: 80px;margin-left: 10px;">结束时间: </span> | |
| 57 | + <input class="form-control" type="text" id="endDate" style="width: 150px;"/> | |
| 51 | 58 | </div> |
| 52 | 59 | |
| 53 | 60 | <div class="form-group"> |
| ... | ... | @@ -204,7 +211,7 @@ |
| 204 | 211 | $("#gsdm").on("change",updateCompany); |
| 205 | 212 | function updateCompany(){ |
| 206 | 213 | var company = $('#gsdm').val(); |
| 207 | - var options = ''; | |
| 214 | + var options = '<option value="">全部分公司</option>'; | |
| 208 | 215 | for(var i = 0; i < obj.length; i++){ |
| 209 | 216 | if(obj[i].companyCode == company){ |
| 210 | 217 | var children = obj[i].children; |
| ... | ... | @@ -248,15 +255,17 @@ |
| 248 | 255 | var temp = tempData[$("#line").val()].split(":"); |
| 249 | 256 | $("#gsdm").val(temp[0]); |
| 250 | 257 | updateCompany(); |
| 251 | - $("#fgsdm").val(temp[1]); | |
| 258 | +// $("#fgsdm").val(temp[1]); | |
| 259 | + $("#fgsdm").val(""); | |
| 252 | 260 | $("#gsdm").attr("disabled", true); |
| 253 | - $("#fgsdm").attr("disabled", true); | |
| 261 | +// $("#fgsdm").attr("disabled", true); | |
| 254 | 262 | } |
| 255 | 263 | }); |
| 256 | 264 | |
| 257 | - | |
| 265 | + | |
| 258 | 266 | //查询 |
| 259 | 267 | $("#query").on('click',function(){ |
| 268 | + var sfyy = $("#sfyy").val(); | |
| 260 | 269 | var line = $("#line").val(); |
| 261 | 270 | var date = $("#date").val(); |
| 262 | 271 | var endDate = $("#endDate").val(); |
| ... | ... | @@ -266,7 +275,7 @@ |
| 266 | 275 | if(lineName == "全部线路") |
| 267 | 276 | lineName = $('#subCompany option:selected').text(); |
| 268 | 277 | var i = layer.load(2); |
| 269 | - $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs},function(result){ | |
| 278 | + $get('/busInterval/onTime',{sfyy:sfyy,line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs},function(result){ | |
| 270 | 279 | var onTime = template('onTime',{list:result}); |
| 271 | 280 | $('#forms tbody').html(onTime); |
| 272 | 281 | $('#forms_h tbody').html(template('onTime_h',{list:result})); |
| ... | ... | @@ -281,6 +290,7 @@ |
| 281 | 290 | }); |
| 282 | 291 | }); |
| 283 | 292 | |
| 293 | + var fgs1; | |
| 284 | 294 | var line1; |
| 285 | 295 | var lineName1; |
| 286 | 296 | function showSheetList(){ |
| ... | ... | @@ -288,7 +298,9 @@ |
| 288 | 298 | lineName1 = $(this).parent().parent().children()[2].innerHTML; |
| 289 | 299 | var date = $("#date").val(); |
| 290 | 300 | var endDate = $("#endDate").val(); |
| 291 | - var fgs=$('#fgsdm').val(); | |
| 301 | +// var fgs=$('#fgsdm').val(); | |
| 302 | + var fgs=$(this).data('fgs'); | |
| 303 | + fgs1 = fgs; | |
| 292 | 304 | var gs=$('#gsdm').val(); |
| 293 | 305 | var i = layer.load(2); |
| 294 | 306 | $get('/busInterval/onTime',{line:line1,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:1},function(result){ |
| ... | ... | @@ -304,12 +316,12 @@ |
| 304 | 316 | }); |
| 305 | 317 | } |
| 306 | 318 | function openSheetList(){ |
| 307 | - var id = $(this).data('id'); | |
| 319 | + var id = $(this).data('id') + "_" + $(this).data('fgs'); | |
| 308 | 320 | var date = id.split("_")[0]; |
| 309 | 321 | var endDate = date; |
| 310 | 322 | var line = id.split("_")[1]; |
| 311 | - var fgs=$('#fgsdm').val(); | |
| 312 | - var gs=$('#gsdm').val(); | |
| 323 | +// var fgs=$('#fgsdm').val(); | |
| 324 | +// var gs=$('#gsdm').val(); | |
| 313 | 325 | $.get('/pages/punctual/list.html', function (content) { |
| 314 | 326 | layer.open({ |
| 315 | 327 | type: 1, |
| ... | ... | @@ -326,6 +338,7 @@ |
| 326 | 338 | }); |
| 327 | 339 | } |
| 328 | 340 | $("#export").on("click",function(){ |
| 341 | + var sfyy = $("#sfyy").val(); | |
| 329 | 342 | var line = $("#line").val(); |
| 330 | 343 | var date = $("#date").val(); |
| 331 | 344 | var endDate = $("#endDate").val(); |
| ... | ... | @@ -335,7 +348,7 @@ |
| 335 | 348 | if(lineName == "全部线路") |
| 336 | 349 | lineName = $('#fgsdm option:selected').text(); |
| 337 | 350 | var i = layer.load(2); |
| 338 | - $get('/busInterval/onTime',{line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,type:"export",lineName:lineName},function(result){ | |
| 351 | + $get('/busInterval/onTime',{sfyy:sfyy,line:line,startDate:date,endDate:endDate,gs:gs,fgs:fgs,type:"export",lineName:lineName},function(result){ | |
| 339 | 352 | var dateTime = ""; |
| 340 | 353 | if(date == endDate){ |
| 341 | 354 | dateTime = moment(date).format("YYYYMMDD"); |
| ... | ... | @@ -352,7 +365,8 @@ |
| 352 | 365 | $("#export_1").on("click",function(){ |
| 353 | 366 | var date = $("#date").val(); |
| 354 | 367 | var endDate = $("#endDate").val(); |
| 355 | - var fgs=$('#fgsdm').val(); | |
| 368 | +// var fgs=$('#fgsdm').val(); | |
| 369 | + var fgs = fgs1; | |
| 356 | 370 | var gs=$('#gsdm').val(); |
| 357 | 371 | var i = layer.load(2); |
| 358 | 372 | $get('/busInterval/onTime',{line:line1,startDate:date,endDate:endDate,gs:gs,fgs:fgs,flag:1,type:"export",lineName:lineName1},function(result){ |
| ... | ... | @@ -384,7 +398,7 @@ |
| 384 | 398 | <td>{{obj.zdzdl}}</td> |
| 385 | 399 | <td> |
| 386 | 400 | <button type="button" class="btn btn-sm blue btn-onTime" |
| 387 | - data-id="{{obj.xlbm}}">查看</button> | |
| 401 | + data-id="{{obj.xlbm}}" data-fgs="{{obj.fgsBm}}">查看</button> | |
| 388 | 402 | </td> |
| 389 | 403 | </tr> |
| 390 | 404 | {{/each}} |
| ... | ... | @@ -429,7 +443,7 @@ |
| 429 | 443 | <td>{{obj.zdzdl}}</td> |
| 430 | 444 | <td> |
| 431 | 445 | <button type="button" class="btn btn-sm blue btn-onTime_1" |
| 432 | - data-id="{{obj.xl_date}}">详细</button> | |
| 446 | + data-id="{{obj.xl_date}}" data-fgs="{{obj.fgsBm}}">详细</button> | |
| 433 | 447 | </td> |
| 434 | 448 | </tr> |
| 435 | 449 | {{/each}} | ... | ... |