Commit 1cd54869f92730d3db21f5ec62dfd0dd84da414c

Authored by 潘钊
2 parents 8f5f2fe0 4c1f742a

Merge branch 'minhang' into pudong

Showing 73 changed files with 2309 additions and 1232 deletions

Too many changes to show.

To preserve performance only 73 of 76 files are displayed.

src/main/java/com/bsth/controller/realcontrol/BasicDataController.java
... ... @@ -4,7 +4,9 @@ import com.alibaba.fastjson.JSON;
4 4 import com.alibaba.fastjson.serializer.PropertyFilter;
5 5 import com.bsth.common.ResponseCode;
6 6 import com.bsth.data.BasicData;
  7 +import com.bsth.data.Station2ParkBuffer;
7 8 import com.bsth.entity.Line;
  9 +import com.bsth.entity.realcontrol.StationToPark;
8 10 import com.google.common.base.Splitter;
9 11 import com.google.common.collect.ArrayListMultimap;
10 12 import com.google.common.collect.BiMap;
... ... @@ -29,6 +31,9 @@ public class BasicDataController {
29 31 BasicData basicData;
30 32  
31 33 Logger logger = LoggerFactory.getLogger(this.getClass());
  34 +
  35 + @Autowired
  36 + Station2ParkBuffer station2ParkBuffer;
32 37  
33 38 @RequestMapping("/cars")
34 39 public Iterable<String> findAllNbbm(Map<String, Object> map){
... ... @@ -180,4 +185,25 @@ public class BasicDataController {
180 185  
181 186 return rs;
182 187 }
  188 +
  189 + /**
  190 + * 获取站点和停车场对照表
  191 + * @param idx
  192 + * @return
  193 + */
  194 + @RequestMapping("/station2ParkData")
  195 + public Map<String, Collection<StationToPark>> findStation2ParkData(@RequestParam String idx){
  196 + List<String> lines = Splitter.on(",").splitToList(idx);
  197 + ArrayListMultimap<String, StationToPark> rs = ArrayListMultimap.create();
  198 +
  199 + for(String lineCode : lines){
  200 + rs.putAll(lineCode, Station2ParkBuffer.get(lineCode));
  201 + }
  202 + return rs.asMap();
  203 + }
  204 +
  205 + @RequestMapping(value = "/deleteStation2Park", method = RequestMethod.POST)
  206 + public Map<String, Object> deleteStation2Park(@RequestParam String lineCode,@RequestParam Integer id){
  207 + return station2ParkBuffer.delete(lineCode, id);
  208 + }
183 209 }
... ...
src/main/java/com/bsth/controller/schedule/TrafficManageController.java
... ... @@ -8,8 +8,6 @@ import org.springframework.web.bind.annotation.RequestMethod;
8 8 import org.springframework.web.bind.annotation.RequestParam;
9 9 import org.springframework.web.bind.annotation.RestController;
10 10  
11   -import java.util.Map;
12   -
13 11 /**
14 12 *
15 13 * @author BSTH
... ... @@ -24,9 +22,9 @@ public class TrafficManageController {
24 22  
25 23  
26 24 @RequestMapping(value = "/setXL", method = RequestMethod.GET)
27   - public String setXL(@RequestParam Map<String, Object> param) throws Exception {
  25 + public String setXL(@RequestParam("ids") String ids) throws Exception {
28 26 try {
29   - return trManageService.setXL(param);
  27 + return trManageService.setXL(ids);
30 28 } catch (Exception exp) {
31 29 throw new Exception(exp.getCause());
32 30 }
... ...
src/main/java/com/bsth/data/BasicData.java
... ... @@ -134,6 +134,9 @@ public class BasicData implements CommandLineRunner {
134 134 @Autowired
135 135 GeoCacheData geoCacheData;
136 136  
  137 + @Autowired
  138 + Station2ParkBuffer station2ParkBuffer;
  139 +
137 140  
138 141 @Override
139 142 public void run() {
... ... @@ -160,6 +163,7 @@ public class BasicData implements CommandLineRunner {
160 163 loadBusinessInfo();
161 164  
162 165 geoCacheData.loadData();
  166 + station2ParkBuffer.saveAll();
163 167 logger.info("加载基础数据成功!,");
164 168 } catch (Exception e) {
165 169 logger.error("加载基础数据时出现异常,", e);
... ...
src/main/java/com/bsth/data/Station2ParkBuffer.java 0 → 100644
  1 +package com.bsth.data;
  2 +
  3 +import com.bsth.common.ResponseCode;
  4 +import com.bsth.entity.realcontrol.ChildTaskPlan;
  5 +import com.bsth.entity.realcontrol.StationToPark;
  6 +import com.bsth.repository.realcontrol.StationToParkRepository;
  7 +import com.bsth.util.Arith;
  8 +import com.google.common.collect.ArrayListMultimap;
  9 +import org.joda.time.format.DateTimeFormat;
  10 +import org.joda.time.format.DateTimeFormatter;
  11 +import org.slf4j.Logger;
  12 +import org.slf4j.LoggerFactory;
  13 +import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.boot.CommandLineRunner;
  15 +import org.springframework.stereotype.Component;
  16 +
  17 +import java.util.*;
  18 +
  19 +/**
  20 + * 站到场 历时、公里 数据缓存
  21 + * Created by panzhao on 2017/7/10.
  22 + */
  23 +@Component
  24 +public class Station2ParkBuffer implements CommandLineRunner {
  25 +
  26 + @Autowired
  27 + StationToParkRepository stationToParkRepository;
  28 +
  29 + private static ArrayListMultimap listMultimap;
  30 +
  31 + private static Set<StationToPark> pstBuff;
  32 +
  33 + static Logger log = LoggerFactory.getLogger(Station2ParkBuffer.class);
  34 +
  35 + @Override
  36 + public void run(String... strings) throws Exception {
  37 + listMultimap = ArrayListMultimap.create();
  38 + pstBuff = new HashSet<>();
  39 + Iterator<StationToPark> iterator = stationToParkRepository.findAll().iterator();
  40 + StationToPark stp;
  41 + while (iterator.hasNext()) {
  42 + stp = iterator.next();
  43 + listMultimap.put(stp.getLineCode(), stp);
  44 + }
  45 + }
  46 +
  47 + public static List<StationToPark> get(String lineCode) {
  48 + return listMultimap.get(lineCode);
  49 + }
  50 +
  51 + public static StationToPark get(String lineCode, String sName, String eName) {
  52 + List<StationToPark> list = get(lineCode);
  53 + StationToPark stp = null;
  54 + for (StationToPark s : list) {
  55 + if (s.getStationName().equals(sName) && s.getParkName().equals(eName)) {
  56 + stp = s;
  57 + break;
  58 + }
  59 + }
  60 + return stp;
  61 + }
  62 +
  63 + private static DateTimeFormatter fmtHHmm = DateTimeFormat.forPattern("HH:mm");
  64 +
  65 + public static void put(ChildTaskPlan ctask) {
  66 + try{
  67 + String type2 = ctask.getType2();
  68 + String lineCode = ctask.getSchedule().getXlBm(), sName, eName;
  69 +
  70 + if (type2.equals("2")) {
  71 + sName = ctask.getStartStationName();
  72 + eName = ctask.getEndStationName();
  73 + } else if (type2.equals("3")) {
  74 + eName = ctask.getStartStationName();
  75 + sName = ctask.getEndStationName();
  76 + } else
  77 + return;
  78 +
  79 + Float time = calcMinute(ctask);
  80 + Float mileage = ctask.getMileage();
  81 +
  82 + StationToPark stp = get(lineCode, sName, eName);
  83 + if (stp == null) {
  84 + stp = new StationToPark();
  85 + stp.setLineCode(lineCode);
  86 + stp.setStationName(sName);
  87 + stp.setParkName(eName);
  88 + listMultimap.put(lineCode, stp);
  89 + }
  90 +
  91 + if (type2.equals("2")) {
  92 + stp.setTime1(time);
  93 + stp.setMileage1(mileage);
  94 + } else {
  95 + stp.setTime2(time);
  96 + stp.setMileage2(mileage);
  97 + }
  98 +
  99 + pstBuff.add(stp);
  100 + }catch (Exception e){
  101 + log.error("", e);
  102 + }
  103 + }
  104 +
  105 + public static Float calcMinute(ChildTaskPlan ctask) {
  106 + long t = 0;
  107 +
  108 + try {
  109 + long st = fmtHHmm.parseMillis(ctask.getStartDate());
  110 + long et = fmtHHmm.parseMillis(ctask.getEndDate());
  111 +
  112 + t = et - st;
  113 + } catch (Exception e) {
  114 + e.printStackTrace();
  115 + }
  116 + return Float.parseFloat(String.valueOf(Arith.div(Arith.div(t, 1000), 60)));
  117 + }
  118 +
  119 + public void saveAll(){
  120 + if(pstBuff.size()==0)
  121 + return;
  122 + Set<StationToPark> pstBuffCopy = pstBuff;
  123 + pstBuff = new HashSet<>();
  124 + //持久化到数据库
  125 + stationToParkRepository.save(pstBuffCopy);
  126 + }
  127 +
  128 + public Map<String, Object> delete(String lineCode, Integer id) {
  129 + Map<String, Object> rs = new HashMap<>();
  130 + try {
  131 + List<StationToPark> list = listMultimap.get(lineCode);
  132 +
  133 + StationToPark stp = null;
  134 + for(StationToPark temp : list){
  135 + if(temp.getId().equals(id)){
  136 + stp=temp;
  137 + break;
  138 + }
  139 + }
  140 +
  141 + if(stp != null){
  142 + listMultimap.remove(lineCode, stp);
  143 + stationToParkRepository.delete(id);
  144 + rs.put("status", ResponseCode.SUCCESS);
  145 + }
  146 + else{
  147 + rs.put("status", ResponseCode.SUCCESS);
  148 + rs.put("msg", "操作失败,可能数据已经被删除!");
  149 + }
  150 +
  151 + }catch (Exception e){
  152 + rs.put("status", ResponseCode.ERROR);
  153 + rs.put("msg", e.getMessage());
  154 + log.error("", e);
  155 + }
  156 + return rs;
  157 + }
  158 +}
... ...
src/main/java/com/bsth/data/gpsdata/recovery/GpsDataRecovery.java
... ... @@ -84,7 +84,7 @@ public class GpsDataRecovery implements ApplicationContextAware {
84 84 Calendar calendar = Calendar.getInstance();
85 85 int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR);
86 86  
87   - String sql = "select DEVICE_ID,LAT,LON,TS,SPEED_GPS,LINE_ID,SERVICE_STATE from bsth_c_gps_info where days_year=173";// + dayOfYear;
  87 + String sql = "select DEVICE_ID,LAT,LON,TS,SPEED_GPS,LINE_ID,SERVICE_STATE from bsth_c_gps_info where days_year=" + dayOfYear;
88 88 JdbcTemplate jdbcTemplate = new JdbcTemplate(DBUtils_MS.getDataSource());
89 89  
90 90 List<GpsEntity> list =
... ...
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
... ... @@ -944,6 +944,8 @@ public class DayOfSchedule {
944 944 ScheduleRealInfo sch = schAttrCalculator.calcCurrentExecSch(list);
945 945 carExecutePlanMap.put(nbbm, sch);
946 946  
  947 + if(sch==null)
  948 + return;
947 949 try {
948 950 GpsEntity gps = gpsRealData.get(BasicData.deviceId2NbbmMap.inverse().get(nbbm));
949 951 if(gps != null && gps.isOnline()){
... ...
src/main/java/com/bsth/data/schedule/edit_logs/ScheduleModifyLogger.java
... ... @@ -231,4 +231,20 @@ public class ScheduleModifyLogger {
231 231 public static void put(SchEditInfo sei) {
232 232 list.add(sei);
233 233 }
  234 +
  235 + public static void afterEdit(ScheduleRealInfo sch, String remarks, JSONArray jsonArray) {
  236 + try {
  237 + if (jsonArray == null || jsonArray.size() == 0)
  238 + return;
  239 +
  240 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  241 + sei.setRemarks(remarks);
  242 + sei.setJsonArray(jsonArray.toJSONString());
  243 + sei.setType(EditType.LSBCTZ);
  244 +
  245 + put(sei);
  246 + } catch (Exception e) {
  247 + log.error("", e);
  248 + }
  249 + }
234 250 }
... ...
src/main/java/com/bsth/data/schedule/edit_logs/entity/EditType.java
... ... @@ -5,5 +5,5 @@ package com.bsth.data.schedule.edit_logs.entity;
5 5 */
6 6 public enum EditType {
7 7  
8   - DFTZ,SFTZ,FCXXWT,TZRC,LPDD,ZRW,JHLB,CXLB, CXSF, CXZX
  8 + DFTZ,SFTZ,FCXXWT,TZRC,LPDD,ZRW,JHLB,CXLB, CXSF, LSBCTZ, CXZX
9 9 }
10 10 \ No newline at end of file
... ...
src/main/java/com/bsth/data/schedule/edit_logs/loggers/AfterwardsLogger.java 0 → 100644
  1 +package com.bsth.data.schedule.edit_logs.loggers;
  2 +
  3 +import com.alibaba.fastjson.JSONArray;
  4 +import com.alibaba.fastjson.JSONObject;
  5 +import com.bsth.data.schedule.edit_logs.ScheduleModifyLogger;
  6 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  7 +import org.slf4j.Logger;
  8 +import org.slf4j.LoggerFactory;
  9 +
  10 +/**
  11 + * 事后历史班次编辑
  12 + * Created by panzhao on 2017/5/19.
  13 + */
  14 +public class AfterwardsLogger {
  15 +
  16 + static Logger log = LoggerFactory.getLogger(AfterwardsLogger.class);
  17 +
  18 + private JSONArray jsonArray = new JSONArray();
  19 + private String remarks;
  20 + private ScheduleRealInfo sch;
  21 +
  22 + public void log(String title, Object old, Object now){
  23 + try {
  24 +
  25 + JSONObject jsonObject = new JSONObject();
  26 + jsonObject.put("title", title);
  27 + jsonObject.put("old", old);
  28 + jsonObject.put("now", now);
  29 +
  30 + jsonArray.add(jsonObject);
  31 + }catch (Exception e){
  32 + log.error("", e);
  33 + }
  34 + }
  35 +
  36 + public void log(String text){
  37 + try {
  38 + JSONObject jsonObject = new JSONObject();
  39 + jsonObject.put("title", text);
  40 +
  41 + jsonArray.add(jsonObject);
  42 + }catch (Exception e){
  43 + log.error("", e);
  44 + }
  45 + }
  46 +
  47 + public static AfterwardsLogger start(ScheduleRealInfo sch, String remarks){
  48 + AfterwardsLogger fLog = new AfterwardsLogger();
  49 + fLog.setSch(sch);
  50 + fLog.setRemarks(remarks);
  51 + return fLog;
  52 + }
  53 +
  54 + public void end(){
  55 + ScheduleModifyLogger.afterEdit(sch, this.remarks, jsonArray);
  56 + }
  57 +
  58 + public String getRemarks() {
  59 + return remarks;
  60 + }
  61 +
  62 + public void setRemarks(String remarks) {
  63 + this.remarks = remarks;
  64 + }
  65 +
  66 + public ScheduleRealInfo getSch() {
  67 + return sch;
  68 + }
  69 +
  70 + public void setSch(ScheduleRealInfo sch) {
  71 + this.sch = sch;
  72 + }
  73 +}
... ...
src/main/java/com/bsth/data/schedule/edit_logs/service/SchEditInfoServiceImpl.java
... ... @@ -41,7 +41,7 @@ public class SchEditInfoServiceImpl extends BaseServiceImpl&lt;SchEditInfo, Long&gt; i
41 41 for(String k : ks){
42 42 v =map.get(k);
43 43 if(StringUtils.isNotEmpty(v))
44   - cont += " and t2." + BatchSaveUtils.propertyToField(k) + "='" + v + "'";
  44 + cont += " and " + BatchSaveUtils.propertyToField(k) + "='" + v + "'";
45 45 }
46 46 String sql = "select t1.*, t2.fcsj,t2.lp_name,t2.cl_zbh,t2.j_gh,t2.j_name,t2.xl_dir,t2.real_exec_date from (select * from logger_sch_modify where rq=? and line_code=? ) t1 INNER JOIN bsth_c_s_sp_info_real t2 on t1.sch_id=t2.id where 1=1 " + cont;
47 47  
... ...
src/main/java/com/bsth/data/utils/CustomStringUtils.java 0 → 100644
  1 +package com.bsth.data.utils;
  2 +
  3 +import org.apache.commons.lang3.StringUtils;
  4 +
  5 +/**
  6 + * Created by panzhao on 2017/7/10.
  7 + */
  8 +public class CustomStringUtils {
  9 +
  10 + public static boolean equals(String s1, String s2){
  11 + if(s1 == null){
  12 + if(StringUtils.isNotEmpty(s2))
  13 + return false;
  14 + else
  15 + return true;
  16 + }
  17 + return s1.equals(s2);
  18 + }
  19 +}
... ...
src/main/java/com/bsth/entity/realcontrol/ChildTaskPlan.java
... ... @@ -84,7 +84,7 @@ public class ChildTaskPlan {
84 84 private boolean destroy;
85 85  
86 86 /**
87   - * 烂班原因
  87 + * 烂班原因 -烂班时,该字段仍有值并 =reason
88 88 */
89 89 private String destroyReason;
90 90  
... ...
src/main/java/com/bsth/entity/realcontrol/StationToPark.java 0 → 100644
  1 +package com.bsth.entity.realcontrol;
  2 +
  3 +import javax.persistence.Entity;
  4 +import javax.persistence.GeneratedValue;
  5 +import javax.persistence.Id;
  6 +import javax.persistence.Table;
  7 +
  8 +/**
  9 + * 站 到 场
  10 + * Created by panzhao on 2017/7/10.
  11 + */
  12 +@Entity
  13 +@Table(name = "bsth_c_station_to_park")
  14 +public class StationToPark {
  15 +
  16 + @Id
  17 + @GeneratedValue
  18 + private Integer id;
  19 +
  20 + /** 线路编码 */
  21 + private String lineCode;
  22 +
  23 + /** 站点名称 */
  24 + private String stationName;
  25 +
  26 + /** 停车场编码 */
  27 + private String parkName;
  28 +
  29 + /** 站到场时间(分钟) */
  30 + private Float time1;
  31 +
  32 + /** 站到场公里 */
  33 + private Float mileage1;
  34 +
  35 + /** 场到站时间(分钟) */
  36 + private Float time2;
  37 +
  38 + /** 场到站公里 */
  39 + private Float mileage2;
  40 +
  41 + /** 排序字段 */
  42 + private int orderNo;
  43 +
  44 + public String getLineCode() {
  45 + return lineCode;
  46 + }
  47 +
  48 + public void setLineCode(String lineCode) {
  49 + this.lineCode = lineCode;
  50 + }
  51 +
  52 + public String getStationName() {
  53 + return stationName;
  54 + }
  55 +
  56 + public void setStationName(String stationName) {
  57 + this.stationName = stationName;
  58 + }
  59 +
  60 +
  61 + public Float getTime1() {
  62 + return time1;
  63 + }
  64 +
  65 + public void setTime1(Float time1) {
  66 + this.time1 = time1;
  67 + }
  68 +
  69 + public Float getMileage1() {
  70 + return mileage1;
  71 + }
  72 +
  73 + public void setMileage1(Float mileage1) {
  74 + this.mileage1 = mileage1;
  75 + }
  76 +
  77 + public Float getTime2() {
  78 + return time2;
  79 + }
  80 +
  81 + public void setTime2(Float time2) {
  82 + this.time2 = time2;
  83 + }
  84 +
  85 + public Float getMileage2() {
  86 + return mileage2;
  87 + }
  88 +
  89 + public void setMileage2(Float mileage2) {
  90 + this.mileage2 = mileage2;
  91 + }
  92 +
  93 + public Integer getId() {
  94 + return id;
  95 + }
  96 +
  97 + public void setId(Integer id) {
  98 + this.id = id;
  99 + }
  100 +
  101 + public int getOrderNo() {
  102 + return orderNo;
  103 + }
  104 +
  105 + public void setOrderNo(int orderNo) {
  106 + this.orderNo = orderNo;
  107 + }
  108 +
  109 + public String getParkName() {
  110 + return parkName;
  111 + }
  112 +
  113 + public void setParkName(String parkName) {
  114 + this.parkName = parkName;
  115 + }
  116 +
  117 + @Override
  118 + public int hashCode() {
  119 + return ("stp_" + this.toString()).hashCode();
  120 + }
  121 +
  122 + @Override
  123 + public boolean equals(Object obj) {
  124 + return this.toString().equals(((StationToPark)obj).toString());
  125 + }
  126 +
  127 + @Override
  128 + public String toString() {
  129 + return this.lineCode + "_" + this.getStationName() + "_" + this.getParkName();
  130 + }
  131 +}
... ...
src/main/java/com/bsth/repository/LineRepository.java
... ... @@ -39,6 +39,6 @@ public interface LineRepository extends BaseRepository&lt;Line, Integer&gt; {
39 39  
40 40 public Line findByLineCode(String string);
41 41  
42   - @Query(value = " SELECT l FROM Line l where l.company like ?1 and l.brancheCompany like ?2 and l.lineCode like ?3")
  42 + @Query(value = " SELECT l FROM Line l where l.company like %?1% and l.brancheCompany like %?2% and l.lineCode like ?3")
43 43 public List<Line> findLineBygsBm(String gsBm, String fgsBm, String line);
44 44 }
... ...
src/main/java/com/bsth/repository/StationRouteRepository.java
... ... @@ -266,7 +266,6 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
266 266 "StationRoute s " +
267 267 "WHERE " +
268 268 "s.destroy = 0 " +
269   - "and s.lineCode in(select lineCode from Line where inUse = 1) " +
270 269 "ORDER BY " +
271 270 "lineCode,directions,stationRouteCode")
272 271 List<Map<String, String>> findAllLineWithYgc();
... ...
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
... ... @@ -81,7 +81,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
81 81 @Query(value="select count(jName) from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 and sflj != 0")
82 82 int findLjbc(String jName,String clZbh,String lpName);
83 83  
84   - @Query(value="SELECT c.company,r.request_code,FROM_UNIXTIME(r.timestamp/1000,'%Y-%m-%d %T'),c.inside_code FROM bsth_v_report_80 r LEFT JOIN bsth_c_cars c ON c.equipment_code = r.device_id where FROM_UNIXTIME(r.timestamp/1000,'%Y-%m-%d') = ?2 and r.line_id = ?1 and c.inside_code like %?3%",nativeQuery=true)
  84 + @Query(value="SELECT request_code,FROM_UNIXTIME(TIMESTAMP / 1000,'%Y-%m-%d %T') as TIMESTAMP ,device_id FROM bsth_v_report_80 WHERE FROM_UNIXTIME( TIMESTAMP / 1000,'%Y-%m-%d') = ?2 AND line_id = ?1 and device_id like %?3%",nativeQuery=true)
85 85 List<Object[]> account(String line,String date,String code);
86 86  
87 87 @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDate >= str_to_date(?2,'%Y-%m-%d') "
... ...
src/main/java/com/bsth/repository/realcontrol/StationToParkRepository.java 0 → 100644
  1 +package com.bsth.repository.realcontrol;
  2 +
  3 +import com.bsth.entity.realcontrol.StationToPark;
  4 +import com.bsth.repository.BaseRepository;
  5 +import org.springframework.stereotype.Repository;
  6 +
  7 +/**
  8 + * Created by panzhao on 2017/7/10.
  9 + */
  10 +@Repository
  11 +public interface StationToParkRepository extends BaseRepository<StationToPark, Integer>{
  12 +}
... ...
src/main/java/com/bsth/service/TrafficManageService.java
... ... @@ -24,7 +24,7 @@ public interface TrafficManageService {
24 24 *
25 25 * @return 调用接口返回信息
26 26 */
27   - String setXL(Map<String, Object> param);
  27 + String setXL(String ids);
28 28  
29 29 /**
30 30 * 上传车辆信息
... ...
src/main/java/com/bsth/service/gps/GpsServiceImpl.java
... ... @@ -479,7 +479,7 @@ public class GpsServiceImpl implements GpsService {
479 479 });
480 480 Map<String, Object> fs = list.get(0);
481 481 //替换设备号和时间
482   - int diff = (int) (sch.getDfsjT() - Long.parseLong(fs.get("ts").toString()) - 1000 * 70);
  482 + long diff = ((sch.getDfsjT() - Long.parseLong(fs.get("ts").toString())) - 1000 * 70);
483 483  
484 484 String deviceId = BasicData.deviceId2NbbmMap.inverse().get(sch.getClZbh());
485 485 for (Map<String, Object> map : list) {
... ...
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
... ... @@ -666,9 +666,10 @@ public class BusIntervalServiceImpl implements BusIntervalService {
666 666 if(sfqr == 1){
667 667 where += " and zdsj >= '"+times1+"' and fcsj <= '"+times2+"'";
668 668 }
669   - where += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
  669 +// where += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
  670 + where += " and bc_type != 'ldks'";
670 671  
671   - String sql = "select id, schedule_date_Str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc,"
  672 + String sql = "select id, schedule_date_Str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc, bc_type,"
672 673 + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id"
673 674 + " from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"'"
674 675 + " and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'"+where+"";
... ... @@ -692,6 +693,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
692 693 schedule.setZdsjActual(rs.getString("zdsj_actual"));
693 694 schedule.setQdzName(rs.getString("qdz_name"));
694 695 schedule.setZdzName(rs.getString("zdz_name"));
  696 + schedule.setBcType(rs.getString("bc_type"));
695 697 schedule.setXlDir(rs.getString("xl_dir"));
696 698 schedule.setStatus(rs.getInt("status"));
697 699 schedule.setRemarks(rs.getString("remarks"));
... ... @@ -825,7 +827,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
825 827 if(model.length() != 0){
826 828 sql = "select sp.id from "
827 829 + "(select id, tt_info, xl_bm, lp, fcsj from bsth_c_s_sp_info where schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'"
828   - + " and tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks') sp"
  830 + + " and tt_info = '" + model + "' and bc_type != 'ldks') sp"
829 831 + " left join bsth_c_s_ttinfo_detail tt on sp.tt_info = tt.ttinfo and sp.xl_bm = tt.xl and sp.lp = tt.lp and sp.fcsj = tt.fcsj";
830 832  
831 833 ttList = jdbcTemplate.query(sql,
... ... @@ -908,6 +910,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
908 910 for(String key : keyMap.keySet()){
909 911 Map<String, Object> tempMap = new HashMap<String, Object>();
910 912 Map<Long, ScheduleRealInfo> sortMap = new HashMap<Long, ScheduleRealInfo>();
  913 + Map<Long, Map<String, Object>> sortMap1 = new HashMap<Long, Map<String, Object>>();
911 914 List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>();
912 915 List<Long> keyList = new ArrayList<Long>();
913 916 List<Long> keyList2 = new ArrayList<Long>();
... ... @@ -939,30 +942,25 @@ public class BusIntervalServiceImpl implements BusIntervalService {
939 942 for(int i = 1; i < keyList.size(); i++){
940 943 ScheduleRealInfo schedule1 = sortMap.get(keyList.get(i - 1));
941 944 ScheduleRealInfo schedule2 = sortMap.get(keyList.get(i));
942   - if(!tsSet.contains(schedule1.getId())){
943   - if(sfqr == 1 && time1 > schedule1.getFcsjT()){
944   - jhyysj += schedule2.getFcsjT() - time1;
945   - }else if(sfqr == 1 && time2 < schedule2.getFcsjT()){
946   - jhyysj += time2 - schedule1.getFcsjT();
  945 + if(!tsSet.contains(schedule1.getId()) && !schedule1.getBcType().toString().equals("in") && !schedule1.getBcType().toString().equals("out")){
  946 + long fcsj1 = schedule1.getFcsjT();
  947 + long fcsj2 = schedule2.getFcsjT();
  948 + if(tsSet.contains(schedule2.getId()) || schedule2.getBcType().toString().equals("in") || schedule2.getBcType().toString().equals("out")){
  949 + fcsj2 = schedule1.getZdsjT();
  950 + }
  951 + if(sfqr == 1 && time1 > fcsj1){
  952 + jhyysj += fcsj2 - time1;
  953 + }else if(sfqr == 1 && time2 < fcsj2){
  954 + jhyysj += time2 - fcsj1;
947 955 }else{
948   - jhyysj += schedule2.getFcsjT() - schedule1.getFcsjT();
  956 + jhyysj += fcsj2 - fcsj1;
949 957 }
950   - jhyysj1 += schedule2.getFcsjT() - schedule1.getFcsjT();
951   - }
952   - long zdsj2 = schedule2.getZdsjT();
953   - long fcsj2 = schedule2.getFcsjT();
954   - if(fcsj2 > zdsj2)
955   - zdsj2 += 1440l;
956   - if(sfqr == 1 && time1 > fcsj2){
957   - jhyssj += zdsj2 - time1;
958   - }else if(sfqr == 1 && time2 < zdsj2){
959   - jhyssj += time2 - fcsj2;
960   - }else{
961   - jhyssj += zdsj2 - fcsj2;
  958 + if(jhyysj < 0){
  959 + System.out.println(fcsj2 + " - " + fcsj1);
  960 + }
  961 + jhyysj1 += fcsj2 - fcsj1;
962 962 }
963   - jhyssj1 += zdsj2 - fcsj2;
964   - jhlc += schedule2.getJhlc()==null?0:schedule2.getJhlc();
965   - if(i == 1){
  963 + if(i == 1 && schedule1.getBcType().toString().equals("normal")){
966 964 long zdsj1 = schedule1.getZdsjT();
967 965 long fcsj1 = schedule1.getFcsjT();
968 966 if(fcsj1 > zdsj1)
... ... @@ -977,12 +975,27 @@ public class BusIntervalServiceImpl implements BusIntervalService {
977 975 jhyssj1 += zdsj1 - fcsj1;
978 976 jhlc += schedule1.getJhlc()==null?0:schedule1.getJhlc();
979 977 }
  978 + if(schedule2.getBcType().toString().equals("normal")){
  979 + long zdsj2 = schedule2.getZdsjT();
  980 + long fcsj2 = schedule2.getFcsjT();
  981 + if(fcsj2 > zdsj2)
  982 + zdsj2 += 1440l;
  983 + if(sfqr == 1 && time1 > fcsj2){
  984 + jhyssj += zdsj2 - time1;
  985 + }else if(sfqr == 1 && time2 < zdsj2){
  986 + jhyssj += time2 - fcsj2;
  987 + }else{
  988 + jhyssj += zdsj2 - fcsj2;
  989 + }
  990 + jhyssj1 += zdsj2 - fcsj2;
  991 + jhlc += schedule2.getJhlc()==null?0:schedule2.getJhlc();
  992 + }
980 993 }
981 994  
982 995 for(int i = 0; i < keyList.size(); i++){
983 996 Map<String, Object> m = new HashMap<String, Object>();
984 997 ScheduleRealInfo schedule = sortMap.get(keyList.get(i));
985   -
  998 +
986 999 if(cMap.containsKey(schedule.getId())){
987 1000 List<ChildTaskPlan> cTasks = cMap.get(schedule.getId());
988 1001 for(ChildTaskPlan childTaskPlan : cTasks){
... ... @@ -1005,6 +1018,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1005 1018 temp.put("fcsj", null);
1006 1019 }
1007 1020 }
  1021 + temp.put("bcType", schedule.getBcType());
1008 1022 mapList.add(temp);
1009 1023 }
1010 1024 }else{
... ... @@ -1022,6 +1036,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1022 1036 m.put("zdsj", null);
1023 1037 m.put("fcsj", null);
1024 1038 }
  1039 + m.put("bcType", schedule.getBcType());
1025 1040 mapList.add(m);
1026 1041 }
1027 1042 }
... ... @@ -1029,6 +1044,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1029 1044 for(Map<String, Object> m : mapList){
1030 1045 if(m.get("fcsj") != null && m.get("fcsj").toString().trim().length()!=0){
1031 1046 keyList2.add(Long.valueOf(m.get("fcsj").toString()));
  1047 + sortMap1.put(Long.valueOf(m.get("fcsj").toString()), m);
1032 1048 }
1033 1049 }
1034 1050 Collections.sort(keyList2);
... ... @@ -1036,36 +1052,31 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1036 1052 for(int i = 1; i < keyList2.size(); i++){
1037 1053 long fcsj1 = keyList2.get(i - 1);
1038 1054 long fcsj2 = keyList2.get(i);
1039   - if(fcsj2 - fcsj1 < 90){
1040   - if(sfqr == 1 && time1 > fcsj1){
1041   - sjyysj += fcsj2 - time1;
1042   - }else if(sfqr == 1 && time2 < fcsj2){
1043   - sjyysj += time2 - fcsj1;
1044   - }else{
1045   - sjyysj += fcsj2 - fcsj1;
1046   - }
1047   - sjyysj1 += fcsj2 - fcsj1;
  1055 + Map<String, Object> m1 = sortMap1.get(fcsj1);
  1056 + Map<String, Object> m2 = sortMap1.get(fcsj2);
  1057 + if(m1.get("bcType").toString().equals("in") || m1.get("bcType").toString().equals("out"))
  1058 + continue;
  1059 + if(m2.get("bcType").toString().equals("in") || m2.get("bcType").toString().equals("out")){
  1060 + fcsj2 = Long.valueOf(m1.get("zdsj").toString());
  1061 + } else if(i == keyList.size() - 1){
  1062 + fcsj2 = Long.valueOf(m2.get("zdsj").toString());
  1063 + }
  1064 + if(sfqr == 1 && time1 > fcsj1){
  1065 + sjyysj += fcsj2 - time1;
  1066 + }else if(sfqr == 1 && time2 < fcsj2){
  1067 + sjyysj += time2 - fcsj1;
  1068 + }else{
  1069 + sjyysj += fcsj2 - fcsj1;
1048 1070 }
  1071 + sjyysj1 += fcsj2 - fcsj1;
1049 1072 }
1050 1073  
1051   - for(int i = 1; i < mapList.size(); i++){
1052   - Map<String, Object> m1 = mapList.get(i - 1);
1053   - Map<String, Object> m2 = mapList.get(i);
1054   -// if(m1.get("fcsj") != null && m2.get("fcsj") != null){
1055   -// long fcsj2 = Long.valueOf(m2.get("fcsj").toString());
1056   -// long fcsj1 = Long.valueOf(m1.get("fcsj").toString());
1057   -// if(sfqr == 1 && time1 > fcsj1){
1058   -// sjyysj += fcsj2 - time1;
1059   -// }else if(sfqr == 1 && time2 < fcsj2){
1060   -// sjyysj += time2 - fcsj1;
1061   -// }else{
1062   -// sjyysj += fcsj2 - fcsj1;
1063   -// }
1064   -// sjyysj1 += fcsj2 - fcsj1;
1065   -// }
1066   - if(m2.get("fcsj") != null && m2.get("zdsj") != null){
1067   - long zdsj = Long.valueOf(m2.get("zdsj").toString());
1068   - long fcsj = Long.valueOf(m2.get("fcsj").toString());
  1074 + for(int i = 0; i < mapList.size(); i++){
  1075 + Map<String, Object> m = mapList.get(i);
  1076 + if(m.get("fcsj") != null && m.get("zdsj") != null &&
  1077 + !m.get("bcType").toString().equals("in") && !m.get("bcType").toString().equals("out")){
  1078 + long zdsj = Long.valueOf(m.get("zdsj").toString());
  1079 + long fcsj = Long.valueOf(m.get("fcsj").toString());
1069 1080 if(fcsj > zdsj)
1070 1081 zdsj += 1440l;
1071 1082 if(sfqr == 1 && time1 > fcsj){
... ... @@ -1076,22 +1087,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1076 1087 sjyssj += zdsj - fcsj;
1077 1088 }
1078 1089 sjyssj1 += zdsj - fcsj;
1079   - sjlc += Double.valueOf(m2.get("lc").toString());
1080   - }
1081   - if(i == 1 && m1.get("fcsj") != null && m1.get("zdsj") != null){
1082   - long zdsj = Long.valueOf(m1.get("zdsj").toString());
1083   - long fcsj = Long.valueOf(m1.get("fcsj").toString());
1084   - if(fcsj > zdsj)
1085   - zdsj += 1440l;
1086   - if(sfqr == 1 && time1 > fcsj){
1087   - sjyssj += zdsj - time1;
1088   - }else if(sfqr == 1 && time2 < zdsj){
1089   - sjyssj += time2 - fcsj;
1090   - }else{
1091   - sjyssj += zdsj - fcsj;
1092   - }
1093   - sjyssj1 += zdsj - fcsj;
1094   - sjlc += Double.valueOf(m1.get("lc").toString());
  1090 + sjlc += Double.valueOf(m.get("lc").toString());
1095 1091 }
1096 1092 }
1097 1093 tempMap.put("company", companyName);
... ...
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
... ... @@ -16,6 +16,7 @@ import com.bsth.repository.schedule.*;
16 16 import com.bsth.repository.traffic.SKBUploadLoggerRepository;
17 17 import com.bsth.security.util.SecurityUtils;
18 18 import com.bsth.service.TrafficManageService;
  19 +import com.bsth.service.traffic.YgcBasicDataService;
19 20 import com.bsth.util.TimeUtils;
20 21 import com.bsth.util.db.DBUtils_MS;
21 22 import com.bsth.webService.trafficManage.geotool.services.InternalPortType;
... ... @@ -99,7 +100,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{
99 100  
100 101 // 线路站点repository
101 102 @Autowired
102   - private StationRepository stationRepository;
  103 + private YgcBasicDataService ygcBasicDataService;
103 104  
104 105  
105 106 // 运管处接口
... ... @@ -122,11 +123,6 @@ public class TrafficManageServiceImpl implements TrafficManageService{
122 123 DecimalFormat format = new DecimalFormat("0.00");
123 124  
124 125 // 用户名
125   - private final String userNameXl = "pudong";
126   - // 密码
127   - private final String passwordXl = "pudong123";
128   -
129   - // 用户名
130 126 private final String userNameOther = "user";
131 127 // 密码
132 128 private final String passwordOther = "user";
... ... @@ -134,34 +130,25 @@ public class TrafficManageServiceImpl implements TrafficManageService{
134 130 * 上传线路信息
135 131 */
136 132 @Override
137   - public String setXL(Map<String, Object> param) {
  133 + public String setXL(String ids) {
138 134 String result = "failure";
139 135 StringBuffer sBuffer = new StringBuffer();
  136 + String[] idArray = ids.split(",");
140 137 try {
141   - Map<String,Object> map = new HashMap<String,Object>();
142   - map.put("lineCode_eq", param.get("xl.lineCode_like")+"");
143   - Iterator<Line> lineIterator;
144   - Line line = null;
145   - if(param.get("xl.lineCode_like").equals("")){
146   - lineIterator = lineRepository.findAll().iterator();
147   - }else {
  138 + for (String id : idArray) {
  139 + Map<String,Object> map = new HashMap<>();
  140 + map.put("lineCode_eq", id);
  141 + Line line ;
148 142 line = lineRepository.findOne(new CustomerSpecs<Line>(map));
149   - }
150   - List<StationRoute> upStationsList = null;// 上行站点路由集
151   - List<StationRoute> downStationsList = null;// 下行站点路由集
152   - List<LineInformation> lineInformationsList = null;
153   - LineInformation lineInformation = null;
154   - sBuffer.append("<Data>");
155   - sBuffer.append("<RequestOrg>上海巴士拓华科技发展有限公司</RequestOrg>");
156   - sBuffer.append("<DataList>");
157   -// while(lineIterator.hasNext()){
158   -// line = lineIterator.next();
159   -// if(BasicData.lineId2ShangHaiCodeMap.get(line.getId()) == null
160   -// || line.getInUse() == 0){
161   -// continue;
162   -// }
163   - if(BasicData.lineId2ShangHaiCodeMap.get(line.getId()) == null
164   - || line.getInUse() == 0){
  143 + if(line == null){
  144 + continue;
  145 + }
  146 + List<StationRoute> upStationsList ;// 上行站点路由集
  147 + List<StationRoute> downStationsList = null;// 下行站点路由集
  148 + sBuffer.append("<Data>");
  149 + sBuffer.append("<RequestOrg>上海巴士拓华科技发展有限公司</RequestOrg>");
  150 + sBuffer.append("<DataList>");
  151 + if(BasicData.lineId2ShangHaiCodeMap.get(line.getId()) == null){
165 152 return result;
166 153 }
167 154 sBuffer.append("<LINE_ID>").append(line.getId()).append("</LINE_ID>");
... ... @@ -190,32 +177,24 @@ public class TrafficManageServiceImpl implements TrafficManageService{
190 177 packagStationPointXml(downStationsList, sBuffer, startId);
191 178 }
192 179 sBuffer.append("</LinePointList>");
193   -// }
194   - sBuffer.append("</DataList>");
195   - sBuffer.append("</Data>");
196   - System.out.println(sBuffer.toString());
197   - if(sBuffer.indexOf("<XL>") != -1){
198   - portType = new Internal().getInternalHttpSoap11Endpoint();
199   - String portResult = portType.setXL(userNameXl, passwordXl, sBuffer.toString());
200   - String portArray[] = portResult.split("\n");
201   - if(portArray.length >= 4){
202   - // 返回数据的编码
203   - String returnCode = portArray[1].substring(portArray[1].indexOf(">")+1,portArray[1].indexOf("</"));
204   - // 返回的信息
205   - String returnDescription = portArray[2].substring(portArray[2].indexOf(">")+1,portArray[2].indexOf("</"));
206   - if(returnCode.equals("1")){
207   - result = "success";
208   - }else{
209   - result = returnDescription;
210   - }
  180 + sBuffer.append("</DataList>");
  181 + sBuffer.append("</Data>");
  182 + // 调用上传方法
  183 + result = ygcBasicDataService.invokeMethod("UpdateBusLineStation",sBuffer.toString());
  184 + String str = "ReturnCode";
  185 + // 解析返回值
  186 + result = result.substring(result.indexOf(str)+str.length()+1,result.lastIndexOf(str)-2);
  187 + if(result.equals("1")){
  188 + result = "success";
  189 + }else{
  190 + result = "failure";
211 191 }
  192 + logger.info("setXL:"+sBuffer.toString());
  193 + logger.info("setXL:"+result);
212 194 }
213 195 } catch (Exception e) {
214 196 logger.error("setXL:",e);
215 197 e.printStackTrace();
216   - }finally{
217   - logger.info("setXL:"+sBuffer.toString());
218   - logger.info("setXL:"+result);
219 198 }
220 199 return result;
221 200 }
... ...
src/main/java/com/bsth/service/realcontrol/impl/ChildTaskPlanServiceImpl.java
... ... @@ -2,6 +2,7 @@ package com.bsth.service.realcontrol.impl;
2 2  
3 3 import com.bsth.common.ResponseCode;
4 4 import com.bsth.data.BasicData;
  5 +import com.bsth.data.Station2ParkBuffer;
5 6 import com.bsth.data.schedule.DayOfSchedule;
6 7 import com.bsth.entity.realcontrol.ChildTaskPlan;
7 8 import com.bsth.entity.realcontrol.ScheduleRealInfo;
... ... @@ -67,6 +68,9 @@ public class ChildTaskPlanServiceImpl extends BaseServiceImpl&lt;ChildTaskPlan, Lon
67 68 dayOfSchedule.save(sch);
68 69 //直接持久化
69 70 //scheduleRealInfoRepository.save(sch);
  71 + //站到场对照
  72 + t.setSchedule(sch);
  73 + Station2ParkBuffer.put(t);
70 74  
71 75 rs.put("status", ResponseCode.SUCCESS);
72 76 rs.put("t", sch);
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -15,9 +15,11 @@ import com.bsth.data.schedule.SchAttrCalculator;
15 15 import com.bsth.data.schedule.ScheduleComparator;
16 16 import com.bsth.data.schedule.edit_logs.FormLogger;
17 17 import com.bsth.data.schedule.edit_logs.ScheduleModifyLogger;
  18 +import com.bsth.data.schedule.edit_logs.loggers.AfterwardsLogger;
18 19 import com.bsth.data.schedule.edit_logs.loggers.FcxxwtLogger;
19 20 import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto;
20 21 import com.bsth.data.schedule.late_adjust.LateAdjustHandle;
  22 +import com.bsth.data.utils.CustomStringUtils;
21 23 import com.bsth.entity.Cars;
22 24 import com.bsth.entity.Line;
23 25 import com.bsth.entity.Personnel;
... ... @@ -1687,45 +1689,66 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1687 1689 public List<Map<String, Object>> accountPx(String line, String date,
1688 1690 String code, String xlName, String px) {
1689 1691 // List<Object[]> lsitObj = scheduleRealInfoRepository.accountPx(line, date, code,px);
  1692 + if(!code.trim().equals("")){
  1693 + code=BasicData.deviceId2NbbmMap.inverse().get(code);
  1694 + }
  1695 + String fgs="";
  1696 + List<Line> lineList= lineRepository.findLineBygsBm("", "", line);
  1697 + if(lineList.size()>0){
  1698 + Line l=lineList.get(0);
  1699 + fgs=BasicData.businessFgsCodeNameMap.get(l.getBrancheCompany()+"_"+l.getCompany());
  1700 + }
1690 1701 List<Map<String, Object>> listMap = new ArrayList<Map<String, Object>>();
1691   - String sql= "SELECT c.company,r.request_code,FROM_UNIXTIME(r.timestamp/1000,'%Y-%m-%d %T') as date,"
1692   - + "c.inside_code FROM bsth_v_report_80 r LEFT JOIN bsth_c_cars c "
1693   - + "ON c.equipment_code = r.device_id where "
1694   - + "FROM_UNIXTIME(r.timestamp/1000,'%Y-%m-%d') = '"+date +"'"
1695   - + "and r.line_id = "+line+" and c.inside_code like '%"+code+"%'"
1696   - + " order by c.inside_code "+px;
  1702 + String sql= "SELECT request_code,FROM_UNIXTIME(TIMESTAMP / 1000,'%Y-%m-%d %T') as TIMESTAMP ,"
  1703 + + " device_id FROM bsth_v_report_80 WHERE "
  1704 + + " FROM_UNIXTIME( TIMESTAMP / 1000,'%Y-%m-%d') = '"+date+"' AND"
  1705 + + " line_id = '"+line+"' and device_id like '%"+code+"%'";
1697 1706 Map<String, Object> map;
1698 1707 List<Object[]> lsitObj = jdbcTemplate.query(sql,
1699 1708 new RowMapper<Object[]>() {
1700 1709 @Override
1701 1710 public Object[] mapRow(ResultSet rs, int rowNum) throws SQLException {
1702   - Object[] t = new Object[4];
1703   - t[0]=rs.getString("company");
1704   - t[1]=rs.getString("request_code");
1705   - t[2]=rs.getString("date");
1706   - t[3]=rs.getString("inside_code");
  1711 + Object[] t = new Object[3];
  1712 + t[0]=rs.getString("request_code");
  1713 + t[1]=rs.getString("TIMESTAMP");
  1714 + t[2]=rs.getString("device_id");
1707 1715 return t;
1708 1716 }
1709 1717 });
1710 1718 int i = 1;
1711 1719 for (Object[] obj : lsitObj) {
1712 1720 if (obj != null) {
1713   - map = new HashMap<String, Object>();
1714   - map.put("num", i++);
1715   - map.put("xlName", xlName);
1716   - map.put("clZbh", obj[3]);
1717   - map.put("company", obj[0]);
1718   - map.put("requestType", "0x" + Integer.toHexString(Integer.parseInt(obj[1] + "")).toUpperCase());
1719   - map.put("requestTime", obj[2]);
1720   - listMap.add(map);
  1721 + map = new HashMap<String, Object>();
  1722 + map.put("num", i++);
  1723 + map.put("xlName", xlName);
  1724 + map.put("clZbh", BasicData.deviceId2NbbmMap.get(obj[2]));
  1725 + map.put("company",fgs);
  1726 + map.put("requestType", "0x" + Integer.toHexString(Integer.parseInt(obj[0] + "")).toUpperCase());
  1727 + map.put("requestTime", obj[1]);
  1728 + listMap.add(map);
1721 1729 }
1722 1730 }
1723   -
  1731 + if(listMap.size()>1){
  1732 + if(px.equals("asc")){
  1733 + Collections.sort(listMap,new AccountMap());
  1734 + }else{
  1735 + Collections.sort(listMap,new AccountMap2());
  1736 + }
  1737 + }
1724 1738 return listMap;
1725 1739 }
1726 1740 @Override
1727 1741 public List<Map<String, Object>> account(String line, String date,
1728 1742 String code, String xlName, String type) {
  1743 + if(!code.trim().equals("")){
  1744 + code=BasicData.deviceId2NbbmMap.inverse().get(code);
  1745 + }
  1746 + String fgs="";
  1747 + List<Line> lineList= lineRepository.findLineBygsBm("", "", line);
  1748 + if(lineList.size()>0){
  1749 + Line l=lineList.get(0);
  1750 + fgs=BasicData.businessFgsCodeNameMap.get(l.getBrancheCompany()+"_"+l.getCompany());
  1751 + }
1729 1752 List<Object[]> lsitObj = scheduleRealInfoRepository.account(line, date, code);
1730 1753 List<Map<String, Object>> listMap = new ArrayList<Map<String, Object>>();
1731 1754 Map<String, Object> map;
... ... @@ -1735,10 +1758,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1735 1758 map = new HashMap<String, Object>();
1736 1759 map.put("num", i++);
1737 1760 map.put("xlName", xlName);
1738   - map.put("clZbh", obj[3]);
1739   - map.put("company", obj[0]);
1740   - map.put("requestType", "0x" + Integer.toHexString(Integer.parseInt(obj[1] + "")).toUpperCase());
1741   - map.put("requestTime", obj[2]);
  1761 + map.put("clZbh", BasicData.deviceId2NbbmMap.get(obj[2]));
  1762 + map.put("company",fgs);
  1763 + map.put("requestType", "0x" + Integer.toHexString(Integer.parseInt(obj[0] + "")).toUpperCase());
  1764 + map.put("requestTime", obj[1]);
1742 1765 listMap.add(map);
1743 1766 }
1744 1767 }
... ... @@ -3040,14 +3063,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3040 3063 rs.put("status", ResponseCode.ERROR);
3041 3064  
3042 3065 ScheduleRealInfo oldSch = super.findById(sch.getId());
  3066 + //事后日志记录
  3067 + AfterwardsLogger aflog = AfterwardsLogger.start(oldSch, "事后调整");
3043 3068  
3044 3069 //换车
3045 3070 if (StringUtils.isNotEmpty(sch.getClZbh()) && !oldSch.getClZbh().equals(sch.getClZbh())) {
3046 3071 if (!carExist(oldSch.getGsBm(),sch.getClZbh())) {
3047 3072 rs.put("msg", "车辆 " + sch.getClZbh() + " 不存在!");
3048 3073 return rs;
3049   - } else
  3074 + } else{
  3075 + aflog.log("换车", oldSch.getClZbh(), sch.getClZbh());
3050 3076 oldSch.setClZbh(sch.getClZbh());
  3077 + }
3051 3078 }
3052 3079  
3053 3080 //换驾驶员
... ... @@ -3057,6 +3084,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3057 3084 rs.put("msg", oldSch.getXlName() + "所属的公司编码下找不到工号为【" + sch.getjGh() + "】的驾驶员");
3058 3085 return rs;
3059 3086 }
  3087 + aflog.log("换驾驶员", oldSch.getjGh()+"/"+ oldSch.getjName(), sch.getjGh()+"/"+ sch.getjName());
3060 3088 persoChange(oldSch, sch.getjGh());
3061 3089 }
3062 3090  
... ... @@ -3067,6 +3095,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3067 3095 rs.put("msg", sch.getXlName() + "所属的公司编码下找不到工号为【" + sch.getsGh() + "】的售票员");
3068 3096 return rs;
3069 3097 }
  3098 + aflog.log("换售票员", oldSch.getsGh()+"/"+ oldSch.getsName(), sch.getsGh()+"/"+ sch.getsName());
3070 3099 persoChangeSPY(oldSch, sch.getsGh());
3071 3100 }
3072 3101  
... ... @@ -3075,12 +3104,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3075 3104 boolean dest2 = sch.getStatus() == -1;
3076 3105 if (!dest1 && dest2) {
3077 3106 oldSch.destroy();
  3107 + aflog.log("烂班");
3078 3108 }
3079 3109 else if(dest1 && !dest2){
3080 3110 //撤销烂班
3081 3111 oldSch.setJhlc(oldSch.getJhlcOrig());
3082 3112 oldSch.setStatus(0);
3083 3113 oldSch.calcStatus();
  3114 + aflog.log("撤销烂班");
3084 3115 }
3085 3116  
3086 3117  
... ... @@ -3089,6 +3120,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3089 3120 */
3090 3121 if (!oldSch.getJhlc().equals(sch.getJhlc())) {
3091 3122 double jhlcNum = sch.getJhlc();
  3123 + aflog.log("修改班次里程", oldSch.getJhlc(), jhlcNum);
3092 3124 //烂班
3093 3125 if(jhlcNum == 0 && oldSch.getJhlcOrig() != 0)
3094 3126 oldSch.destroy();
... ... @@ -3101,15 +3133,30 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3101 3133 }
3102 3134  
3103 3135 //待发时间
3104   - oldSch.setDfsj(sch.getDfsj());
  3136 + if(!CustomStringUtils.equals(oldSch.getDfsj(), sch.getDfsj())){
  3137 + aflog.log("修改待发时间", oldSch.getDfsj(), sch.getDfsj());
  3138 + oldSch.setDfsj(sch.getDfsj());
  3139 + }
3105 3140 //实发时间
3106   - oldSch.setFcsjActual(sch.getFcsjActual());
  3141 + if(!CustomStringUtils.equals(oldSch.getFcsjActual(), sch.getFcsjActual())){
  3142 + aflog.log("修改实发时间", oldSch.getFcsjActual(), sch.getFcsjActual());
  3143 + oldSch.setFcsjActual(sch.getFcsjActual());
  3144 + }
3107 3145 //实际终点
3108   - oldSch.setZdsjActual(sch.getZdsjActual());
  3146 + if(!CustomStringUtils.equals(oldSch.getZdsjActual(), sch.getZdsjActual())){
  3147 + aflog.log("修改实达时间", oldSch.getZdsjActual(), sch.getZdsjActual());
  3148 + oldSch.setZdsjActual(sch.getZdsjActual());
  3149 + }
  3150 +
3109 3151 //备注
3110   - oldSch.setRemarks(sch.getRemarks());
  3152 + if(!CustomStringUtils.equals(oldSch.getRemarks(), sch.getRemarks())){
  3153 + aflog.log("修改备注", oldSch.getRemarks(), sch.getRemarks());
  3154 + oldSch.setRemarks(sch.getRemarks());
  3155 + }
3111 3156  
3112 3157 scheduleRealInfoRepository.save(oldSch);
  3158 +
  3159 + aflog.end();
3113 3160 rs.put("status", ResponseCode.SUCCESS);
3114 3161 return rs;
3115 3162 }
... ... @@ -4199,4 +4246,20 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4199 4246 }
4200 4247 return rs;
4201 4248 }
4202   -}
4203 4249 \ No newline at end of file
  4250 +}
  4251 +
  4252 +class AccountMap implements Comparator<Map<String, Object>>{
  4253 + @Override
  4254 + public int compare(Map<String, Object> o1, Map<String, Object> o2) {
  4255 + // TODO Auto-generated method stub
  4256 + return o1.get("clZbh").toString().compareTo(o2.get("clZbh").toString());
  4257 + }
  4258 +}
  4259 +
  4260 +class AccountMap2 implements Comparator<Map<String, Object>>{
  4261 + @Override
  4262 + public int compare(Map<String, Object> o1, Map<String, Object> o2) {
  4263 + // TODO Auto-generated method stub
  4264 + return o2.get("clZbh").toString().compareTo(o1.get("clZbh").toString());
  4265 + }
  4266 +}
... ...
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
... ... @@ -866,7 +866,9 @@ public class CulateMileageServiceImpl implements CulateMileageService{
866 866 ChildTaskPlan childTaskPlan = it.next();
867 867 if(childTaskPlan.getType2().equals("2")||childTaskPlan.getType2().equals("3")){
868 868 if (childTaskPlan.isDestroy()) {
869   - zrwjcclc=Arith.add(zrwjcclc,childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage());
  869 + if(childTaskPlan.getReason().equals(item)){
  870 + zrwjcclc=Arith.add(zrwjcclc,childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage());
  871 + }
870 872 }
871 873 }
872 874 }
... ...
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -570,15 +570,15 @@ public class ReportServiceImpl implements ReportService{
570 570 String minfcsj=jdbcTemplate.queryForObject(sqlMinYysj, String.class);
571 571  
572 572 //查询全程
573   - String sqlqc="select t.*,x.station_name as qdz_name from ( "
574   - + " (SELECT bc_type, fcsj,qdz,2 as xh,xl_dir FROM bsth_c_s_ttinfo_detail "
  573 + String sqlqc="select t.* from ( "
  574 + + " (SELECT bc_type, fcsj,qdz,2 as xh,xl_dir,qdz_name FROM bsth_c_s_ttinfo_detail "
575 575 + " where ttinfo ='"+ttinfo+"' and (bc_type='normal' || bc_type='region') "
576 576 + " and fcsj <='"+minfcsj+"') "
577 577 + " union "
578   - + " (SELECT bc_type, fcsj,qdz,1 as xh,xl_dir FROM bsth_c_s_ttinfo_detail "
  578 + + " (SELECT bc_type, fcsj,qdz,1 as xh,xl_dir,qdz_name FROM bsth_c_s_ttinfo_detail "
579 579 + " where ttinfo ='"+ttinfo+"' and (bc_type='normal' || bc_type='region') "
580 580 + " and fcsj > '"+minfcsj+"') "
581   - + "order by xl_dir,xh,fcsj ) t left join bsth_c_station x on t.qdz=x.id";
  581 + + "order by xl_dir,xh,fcsj ) t ";
582 582 List<Map<String, String>> qclist= jdbcTemplate.query(sqlqc,
583 583 new RowMapper<Map<String, String>>(){
584 584 @Override
... ... @@ -619,12 +619,12 @@ public class ReportServiceImpl implements ReportService{
619 619 sxbc++;
620 620 upfcsj.add(m.get("fcsj"));
621 621 if(sxqdz.length() == 0 && m.containsKey("qdz_name"))
622   - sxqdz = m.get("qdz_name");
  622 + sxqdz = m.get("qdz_name")==null?"":m.get("qdz_name").toString();
623 623 } else {
624 624 xxbc++;
625 625 downfcsj.add(m.get("fcsj"));
626 626 if(xxqdz.length() == 0 && m.containsKey("qdz_name"))
627   - xxqdz = m.get("qdz_name");
  627 + xxqdz = m.get("qdz_name")==null?"":m.get("qdz_name").toString();
628 628 }
629 629 }
630 630 if(upfcsj.size() != 0)
... ... @@ -1591,15 +1591,16 @@ public class ReportServiceImpl implements ReportService{
1591 1591 map.put("ssgl_other", culateService.culateSsMileXx(list, "其他"));
1592 1592  
1593 1593  
1594   - double zrwjcclc=culateService.culateZrwJccLc(list, "");
1595   -
  1594 + double zrwjcclc=culateService.culateZrwJccLc(list, "故障");
  1595 + double zrwjcclc1=culateService.culateZrwJccLc(list, "肇事");
  1596 + double zrwjcclc2=culateService.culateZrwJccLc(list, "纠纷");
1596 1597 map.put("zrwjcclc", zrwjcclc);
1597   - map.put("zrwjcclc1", 0);
1598   - map.put("zrwjcclc2", 0);
1599   -
  1598 + map.put("zrwjcclc1", zrwjcclc1);
  1599 + map.put("zrwjcclc2", zrwjcclc2);
  1600 + double zrwjcc=Arith.add(Arith.add(zrwjcclc, zrwjcclc1), zrwjcclc2);
1600 1601 double kfks=culateService.culateKfksLc(lists);
1601 1602 map.put("kfks", kfks);
1602   - double zlc=Arith.add(Arith.add(Arith.add(zrwjcclc, ljlc),
  1603 + double zlc=Arith.add(Arith.add(Arith.add(zrwjcc, ljlc),
1603 1604 Arith.add(zjcclc, zyylc)),kfks);
1604 1605  
1605 1606  
... ...
src/main/java/com/bsth/service/traffic/YgcBasicDataService.java
... ... @@ -9,5 +9,13 @@ public interface YgcBasicDataService {
9 9 * 更新运管处基础数据
10 10 */
11 11 void updateYgcBasicData();
  12 +
  13 + /**
  14 + * 调用方法
  15 + * @param methodName 方法名
  16 + * @param param 参数
  17 + * @return
  18 + */
  19 + String invokeMethod(String methodName,String param);
12 20 }
13 21  
... ...
src/main/java/com/bsth/service/traffic/impl/YgcBasicDataServiceImpl.java
... ... @@ -7,6 +7,7 @@ import org.apache.axiom.om.*;
7 7 import org.apache.axis2.addressing.EndpointReference;
8 8 import org.apache.axis2.client.Options;
9 9 import org.apache.axis2.client.ServiceClient;
  10 +import org.apache.axis2.rpc.client.RPCServiceClient;
10 11 import org.apache.commons.codec.digest.DigestUtils;
11 12 import org.slf4j.Logger;
12 13 import org.slf4j.LoggerFactory;
... ... @@ -18,6 +19,7 @@ import org.w3c.dom.Document;
18 19 import org.w3c.dom.NodeList;
19 20  
20 21 import javax.activation.DataHandler;
  22 +import javax.xml.namespace.QName;
21 23 import javax.xml.parsers.DocumentBuilder;
22 24 import javax.xml.parsers.DocumentBuilderFactory;
23 25 import java.io.*;
... ... @@ -42,14 +44,17 @@ public class YgcBasicDataServiceImpl implements YgcBasicDataService{
42 44 JdbcTemplate jdbcTemplate;
43 45  
44 46 private static String IP = "218.242.195.76:9091";
45   - private static String targetEndpoint = "http://" + IP +"/ygc.TransManager.Basicdown?wsdl";
  47 + private static String downTargetEndpoint = "http://" + IP +"/ygc.TransManager.Basicdown?wsdl";
  48 + private static String upTargetEndpoint = "http://" + IP +"/ygc.TransManager.BasicUpload?wsdl";
46 49 private static String namespace = "http://service.shygc.com";
47 50 private static String userName = "admin";
48 51 private static String passWord = "000000";
49   - private static EndpointReference targetEPR;
  52 + private static EndpointReference downTargetEPR;
  53 + private static EndpointReference upTargetEPR;
50 54 {
51 55 try {
52   - targetEPR = new EndpointReference(targetEndpoint);
  56 + downTargetEPR = new EndpointReference(downTargetEndpoint);
  57 + upTargetEPR = new EndpointReference(upTargetEndpoint);
53 58 } catch (Exception e) {
54 59 e.printStackTrace();
55 60 }
... ... @@ -102,7 +107,7 @@ public class YgcBasicDataServiceImpl implements YgcBasicDataService{
102 107 ServiceClient sender = new ServiceClient();
103 108 Options options = sender.getOptions();
104 109 options.setProperty("SO_TIMEOUT", Integer.valueOf(1800000));
105   - options.setTo(targetEPR);
  110 + options.setTo(downTargetEPR);
106 111 sender.setOptions(options);
107 112 System.out.println("The data in method download: " + data);
108 113 data.build();
... ... @@ -280,4 +285,37 @@ public class YgcBasicDataServiceImpl implements YgcBasicDataService{
280 285 flag = true;
281 286 return flag;
282 287 }
  288 +
  289 + /**
  290 + * 调用方法
  291 + * @param methodName 方法名
  292 + * @param param 参数
  293 + * @return
  294 + */
  295 + public String invokeMethod(String methodName,String param){
  296 + String result = null;
  297 + try {
  298 + // 获得客户端
  299 + RPCServiceClient serviceClient = new RPCServiceClient();
  300 + // 可以在该对象中设置服务端的验证信息
  301 + Options options = serviceClient.getOptions();
  302 + options.setTo(upTargetEPR);
  303 + // 在创建QName对象时,QName类的构造方法的第一个参数表示WSDL文件的命名空间名,也就是<wsdl:definitions>元素的targetNamespace属性值
  304 + QName opAddEntry = new QName(namespace,methodName);
  305 + // 参数,如果有多个,继续往后面增加即可,不用指定参数的名称
  306 + Object[] opAddEntryArgs = new Object[] {param };
  307 + // 返回参数类型,这个和axis1有点区别
  308 + // invokeBlocking方法有三个参数,其中第一个参数的类型是QName对象,表示要调用的方法名;
  309 + // 第二个参数表示要调用的WebService方法的参数值,参数类型为Object[];
  310 + // 第三个参数表示WebService方法的返回值类型的Class对象,参数类型为Class[]。
  311 + // 当方法没有参数时,invokeBlocking方法的第二个参数值不能是null,而要使用new Object[]{}
  312 + // 如果被调用的WebService方法没有返回值,应使用RPCServiceClient类的invokeRobust方法,
  313 + // 该方法只有两个参数,它们的含义与invokeBlocking方法的前两个参数的含义相同
  314 + Class[] classes = new Class[] { String.class };
  315 + result = serviceClient.invokeBlocking(opAddEntry,opAddEntryArgs, classes)[0].toString();
  316 + }catch (Exception e){
  317 + e.printStackTrace();
  318 + }
  319 + return result;
  320 + }
283 321 }
... ...
src/main/resources/static/pages/base/timesmodel/js/base-fun.js
... ... @@ -849,7 +849,7 @@ var BaseFun = function() {
849 849 }
850 850 lpbcArray.sort(function(a,b){return a.fcint - b.fcint});
851 851 baseF.isHaveBc(baseF.getDateTime('10:15') , baseF.getDateTime('12:15'),lpbcArray,cfddDm ,dataMap , cara[c] ,map, markArray, 0);
852   - //baseF.isHaveBc(baseF.getDateTime('18:00') , baseF.getDateTime('19:00'),lpbcArray,cfddDm ,dataMap , cara[c] ,map, markArray, 1);
  852 + baseF.isHaveBc(baseF.getDateTime('18:00') , baseF.getDateTime('19:00'),lpbcArray,cfddDm ,dataMap , cara[c] ,map, markArray, 1);
853 853 }
854 854 },
855 855  
... ...
src/main/resources/static/pages/forms/statement/account.html
... ... @@ -86,7 +86,7 @@
86 86 locale : 'zh-cn'
87 87 });
88 88  
89   - $.get('/basic/lineCode2Name',function(result){
  89 + /* $.get('/basic/lineCode2Name',function(result){
90 90 var data=[];
91 91  
92 92 for(var code in result){
... ... @@ -94,7 +94,29 @@
94 94 }
95 95 initPinYinSelect2('#line',data,'');
96 96  
97   - })
  97 + }) */
  98 +
  99 + $.get('/report/lineList',function(xlList){
  100 + var data = [];
  101 +// data.push({id: " ", text: "全部线路"});
  102 + $.get('/user/companyData', function(result){
  103 + for(var i = 0; i < result.length; i++){
  104 + var companyCode = result[i].companyCode;
  105 + var children = result[i].children;
  106 + for(var j = 0; j < children.length; j++){
  107 + var code = children[j].code;
  108 + for(var k=0;k < xlList.length;k++ ){
  109 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  110 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  111 +// tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  112 + }
  113 + }
  114 + }
  115 + }
  116 + initPinYinSelect2('#line',data,'');
  117 +
  118 + });
  119 + });
98 120 //重置
99 121 $('#czcl').on('click', function () {
100 122 $('#code').val('').change();
... ...
src/main/resources/static/pages/forms/statement/busInterval.html
... ... @@ -217,42 +217,51 @@
217 217 }
218 218 }
219 219 $('#subCompany').html(options);
220   - initXl();
221 220 }
222 221  
223   - $("#subCompany").on("change",initXl);
224   - function initXl(){
225   - var data=[];
226   - data.push({id:" ", text:"全部线路"});
227   - if(fage){
228   - $("#line").select2("destroy").html('');
229   - }
230   - var fgs=$('#subCompany').val();
231   - var gs=$('#company').val();
232   - for(var i=0;i<xlList.length;i++){
233   - if(gs!=""){
234   - if(fgs!=""){
235   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
236   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
237   - }
238   - }else{
239   - if(xlList[i]["gsbm"]==gs){
240   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  222 +
  223 + var tempData = {};
  224 + $.get('/report/lineList',function(xlList){
  225 + var data = [];
  226 + data.push({id: " ", text: "全部线路"});
  227 + $.get('/user/companyData', function(result){
  228 + for(var i = 0; i < result.length; i++){
  229 + var companyCode = result[i].companyCode;
  230 + var children = result[i].children;
  231 + for(var j = 0; j < children.length; j++){
  232 + var code = children[j].code;
  233 + for(var k=0;k < xlList.length;k++ ){
  234 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  235 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  236 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  237 + }
241 238 }
242 239 }
243 240 }
244   - }
245   - initPinYinSelect2('#line',data,'');
246   - fage=true;
247   -
248   - $("#endDate").attr("disabled", true);
249   - $("#endDate").val($("#startDate").val());
250   - line = data[0].id;
251   - statu = 0;
252   -
253   - updateModel();
254   - }
  241 + initPinYinSelect2('#line',data,'');
  242 + $("#endDate").attr("disabled", true);
  243 + $("#endDate").val($("#startDate").val());
  244 + line = data[0].id;
  245 + statu = 0;
  246 +
  247 + updateModel();
  248 +
  249 + });
  250 + });
255 251  
  252 + $("#line").on("change", function(){
  253 + if($("#line").val() == " "){
  254 + $("#company").attr("disabled", false);
  255 + $("#subCompany").attr("disabled", false);
  256 + } else {
  257 + var temp = tempData[$("#line").val()].split(":");
  258 + $("#company").val(temp[0]);
  259 + updateCompany();
  260 + $("#subCompany").val(temp[1]);
  261 + $("#company").attr("disabled", true);
  262 + $("#subCompany").attr("disabled", true);
  263 + }
  264 + });
256 265  
257 266 $("#query").on("click",jsDoQuery);
258 267  
... ...
src/main/resources/static/pages/forms/statement/commandState.html
... ... @@ -178,33 +178,44 @@
178 178 }
179 179 }
180 180 $('#subCompany').html(options);
181   - initXl();
182 181 }
183 182  
184   - $("#subCompany").on("change",initXl);
185   - function initXl(){
186   - var data=[];
187   - if(fage){
188   - $("#line").select2("destroy").html('');
189   - }
190   - var fgs=$('#subCompany').val();
191   - var gs=$('#company').val();
192   - for(var i=0;i<xlList.length;i++){
193   - if(gs!=""){
194   - if(fgs!=""){
195   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
196   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
197   - }
198   - }else{
199   - if(xlList[i]["gsbm"]==gs){
200   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  183 + var tempData = {};
  184 + $.get('/report/lineList',function(xlList){
  185 + var data = [];
  186 + $.get('/user/companyData', function(result){
  187 + for(var i = 0; i < result.length; i++){
  188 + var companyCode = result[i].companyCode;
  189 + var children = result[i].children;
  190 + for(var j = 0; j < children.length; j++){
  191 + var code = children[j].code;
  192 + for(var k=0;k < xlList.length;k++ ){
  193 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  194 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  195 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  196 + }
201 197 }
202 198 }
203 199 }
  200 + initPinYinSelect2('#line',data,'');
  201 +
  202 + });
  203 + });
  204 +
  205 + $("#line").on("change", function(){
  206 + if($("#line").val() == " "){
  207 + $("#company").attr("disabled", false);
  208 + $("#subCompany").attr("disabled", false);
  209 + } else {
  210 + var temp = tempData[$("#line").val()].split(":");
  211 + $("#company").val(temp[0]);
  212 + updateCompany();
  213 + $("#subCompany").val(temp[1]);
  214 + $("#company").attr("disabled", true);
  215 + $("#subCompany").attr("disabled", true);
204 216 }
205   - initPinYinSelect2('#line',data,'');
206   - fage=true;
207   - }
  217 + });
  218 +
208 219  
209 220 $('#code').select2({
210 221 ajax: {
... ...
src/main/resources/static/pages/forms/statement/correctForm.html
... ... @@ -112,16 +112,29 @@
112 112 $("#date").val(year + "-" + month + "-" + day);
113 113 $("#endDate").val(year + "-" + month + "-" + day);
114 114  
115   - $.get('/basic/lineCode2Name',function(result){
116   - var data=[];
117   -
118   - for(var code in result){
119   - data.push({id: code, text: result[code]});
120   - }
121   - initPinYinSelect2('#line',data,'');
122   -
123   - })
124   - $('#czcl').on('click', function () {
  115 + $.get('/report/lineList',function(xlList){
  116 + var data = [];
  117 +// data.push({id: " ", text: "全部线路"});
  118 + $.get('/user/companyData', function(result){
  119 + for(var i = 0; i < result.length; i++){
  120 + var companyCode = result[i].companyCode;
  121 + var children = result[i].children;
  122 + for(var j = 0; j < children.length; j++){
  123 + var code = children[j].code;
  124 + for(var k=0;k < xlList.length;k++ ){
  125 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  126 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  127 +// tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  128 + }
  129 + }
  130 + }
  131 + }
  132 + initPinYinSelect2('#line',data,'');
  133 +
  134 + });
  135 + });
  136 +
  137 + $('#czcl').on('click', function () {
125 138 $('#code').val('').change();
126 139 });
127 140  
... ... @@ -203,7 +216,7 @@
203 216 });
204 217  
205 218 var line = $("#line").val();
206   - var date = $("#date").val();endDate
  219 + var date = $("#date").val();
207 220 var lpName = $("#lpName").val();
208 221 var endDate = $("#endDate").val();
209 222 var code = $("#code").val();
... ...
src/main/resources/static/pages/forms/statement/correctStatis.html
... ... @@ -145,49 +145,8 @@
145 145 $("#times1").attr("disabled", true);
146 146 $("#times2").attr("disabled", true);
147 147  
148   -// $.get('/basic/lineCode2Name', function(result){
149   -// var data=[];
150   -
151   -// data.push({id: " ", text: "全部线路"});
152   -// for(var code in result){
153   -// data.push({id: code, text: result[code]});
154   -// }
155   -// console.log(data);
156   -// initPinYinSelect2('#line',data,'');
157 148  
158   -// line = "";
159   -// // updateModel();
160   -// });
161   -
162   -// var obj = [];
163   -// $.get('/user/companyData', function(result){
164   -// obj = result;
165   -// var options = '';
166   -// for(var i = 0; i < obj.length; i++){
167   -// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
168   -// }
169   -// if(obj.length == 1){
170   -// $('#company1').hide();
171   -// if(obj[0].children.length == 1)
172   -// $('#subCompany1').hide();
173   -// }
174   -// $('#company').html(options);
175   -// updateCompany();
176   -// });
177   -// $("#company").on("change",updateCompany);
178   -// function updateCompany(){
179   -// var company = $('#company').val();
180   -// var options = '';
181   -// for(var i = 0; i < obj.length; i++){
182   -// if(obj[i].companyCode == company){
183   -// var children = obj[i].children;
184   -// for(var j = 0; j < children.length; j++){
185   -// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
186   -// }
187   -// }
188   -// }
189   -// $('#subCompany').html(options);
190   -// }
  149 +
191 150 var fage=false;
192 151 var xlList;
193 152 var obj = [];
... ... @@ -225,36 +184,44 @@
225 184 }
226 185 }
227 186 $('#subCompany').html(options);
228   - initXl();
229 187 }
230 188  
231   - $("#subCompany").on("change",initXl);
232   - function initXl(){
233   - var data=[];
234   - data.push({id:" ", text:"全部线路"});
235   - if(fage){
236   - $("#line").select2("destroy").html('');
237   - }
238   - var fgs=$('#subCompany').val();
239   - var gs=$('#company').val();
240   - for(var i=0;i<xlList.length;i++){
241   - if(gs!=""){
242   - if(fgs!=""){
243   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
244   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
245   - }
246   - }else{
247   - if(xlList[i]["gsbm"]==gs){
248   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  189 + var tempData = {};
  190 + $.get('/report/lineList',function(xlList){
  191 + var data = [];
  192 + data.push({id: " ", text: "全部线路"});
  193 + $.get('/user/companyData', function(result){
  194 + for(var i = 0; i < result.length; i++){
  195 + var companyCode = result[i].companyCode;
  196 + var children = result[i].children;
  197 + for(var j = 0; j < children.length; j++){
  198 + var code = children[j].code;
  199 + for(var k=0;k < xlList.length;k++ ){
  200 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  201 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  202 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  203 + }
249 204 }
250 205 }
251 206 }
  207 + initPinYinSelect2('#line',data,'');
  208 +
  209 + });
  210 + });
  211 +
  212 + $("#line").on("change", function(){
  213 + if($("#line").val() == " "){
  214 + $("#company").attr("disabled", false);
  215 + $("#subCompany").attr("disabled", false);
  216 + } else {
  217 + var temp = tempData[$("#line").val()].split(":");
  218 + $("#company").val(temp[0]);
  219 + updateCompany();
  220 + $("#subCompany").val(temp[1]);
  221 + $("#company").attr("disabled", true);
  222 + $("#subCompany").attr("disabled", true);
252 223 }
253   - initPinYinSelect2('#line',data,'');
254   - fage=true;
255   -
256   - line = "";
257   - }
  224 + });
258 225  
259 226  
260 227 $("#query").on("click",jsDoQuery);
... ...
src/main/resources/static/pages/forms/statement/daily.html
... ... @@ -139,7 +139,7 @@
139 139 }
140 140 }
141 141 $('#fgsdmDaily').html(options);
142   - initXl();
  142 +// initXl();
143 143 }
144 144  
145 145 /* $.get('/basic/lineCode2Name',function(result){
... ... @@ -152,7 +152,7 @@
152 152  
153 153 }) */
154 154  
155   - $("#fgsdmDaily").on("change",initXl);
  155 + /* $("#fgsdmDaily").on("change",initXl);
156 156 function initXl(){
157 157 var data=[];
158 158 if(fage){
... ... @@ -175,7 +175,44 @@
175 175 }
176 176 initPinYinSelect2('#line',data,'');
177 177 fage=true;
178   - }
  178 + } */
  179 + var tempData = {};
  180 + $.get('/report/lineList',function(xlList){
  181 + var data = [];
  182 +// data.push({id: " ", text: "全部线路"});
  183 + $.get('/user/companyData', function(result){
  184 + for(var i = 0; i < result.length; i++){
  185 + var companyCode = result[i].companyCode;
  186 + var children = result[i].children;
  187 + for(var j = 0; j < children.length; j++){
  188 + var code = children[j].code;
  189 + for(var k=0;k < xlList.length;k++ ){
  190 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  191 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  192 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  193 + }
  194 + }
  195 + }
  196 + }
  197 + initPinYinSelect2('#line',data,'');
  198 +
  199 + });
  200 + });
  201 +
  202 + $("#line").on("change", function(){
  203 + if($("#line").val() == " "){
  204 + $("#gsdmDaily").attr("disabled", false);
  205 + $("#fgsdmDaily").attr("disabled", false);
  206 + } else {
  207 + var temp = tempData[$("#line").val()].split(":");
  208 + $("#gsdmDaily").val(temp[0]);
  209 + updateCompany();
  210 + $("#fgsdmDaily").val(temp[1]);
  211 + $("#gsdmDaily").attr("disabled", true);
  212 + $("#fgsdmDaily").attr("disabled", true);
  213 + }
  214 + });
  215 +
179 216  
180 217 var line;
181 218 var date;
... ...
src/main/resources/static/pages/forms/statement/firstAndLastBus_sum.html
... ... @@ -176,34 +176,44 @@
176 176 }
177 177 }
178 178 $('#subCompany').html(options);
179   - initXl();
180 179 }
181   -
182   - $("#subCompany").on("change",initXl);
183   - function initXl(){
184   - var data=[];
185   - if(fage){
186   - $("#line").select2("destroy").html('');
187   - }
188   - var fgs=$('#subCompany').val();
189   - var gs=$('#company').val();
  180 +
  181 + var tempData = {};
  182 + $.get('/report/lineList',function(xlList){
  183 + var data = [];
190 184 data.push({id: " ", text: "全部线路"});
191   - for(var i=0;i<xlList.length;i++){
192   - if(gs!=""){
193   - if(fgs!=""){
194   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
195   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
196   - }
197   - }else{
198   - if(xlList[i]["gsbm"]==gs){
199   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  185 + $.get('/user/companyData', function(result){
  186 + for(var i = 0; i < result.length; i++){
  187 + var companyCode = result[i].companyCode;
  188 + var children = result[i].children;
  189 + for(var j = 0; j < children.length; j++){
  190 + var code = children[j].code;
  191 + for(var k=0;k < xlList.length;k++ ){
  192 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  193 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  194 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  195 + }
200 196 }
201 197 }
202 198 }
  199 + initPinYinSelect2('#line',data,'');
  200 +
  201 + });
  202 + });
  203 +
  204 + $("#line").on("change", function(){
  205 + if($("#line").val() == " "){
  206 + $("#company").attr("disabled", false);
  207 + $("#subCompany").attr("disabled", false);
  208 + } else {
  209 + var temp = tempData[$("#line").val()].split(":");
  210 + $("#company").val(temp[0]);
  211 + updateCompany();
  212 + $("#subCompany").val(temp[1]);
  213 + $("#company").attr("disabled", true);
  214 + $("#subCompany").attr("disabled", true);
203 215 }
204   - initPinYinSelect2('#line',data,'');
205   - fage=true;
206   - }
  216 + });
207 217  
208 218 var list;
209 219 $("#forms tbody").on("click","a",function(){
... ...
src/main/resources/static/pages/forms/statement/historyMessage.html
... ... @@ -81,16 +81,29 @@
81 81 locale : 'zh-cn'
82 82 });
83 83  
84   - $.get('/basic/lineCode2Name',function(result){
85   - var data=[];
86   -
87   - for(var code in result){
88   - data.push({id: code, text: result[code]});
89   - }
90   - console.log(data);
91   - initPinYinSelect2('#line',data,'');
92   -
93   - })
  84 + $.get('/report/lineList',function(xlList){
  85 + var data = [];
  86 +// data.push({id: " ", text: "全部线路"});
  87 + $.get('/user/companyData', function(result){
  88 + for(var i = 0; i < result.length; i++){
  89 + var companyCode = result[i].companyCode;
  90 + var children = result[i].children;
  91 + for(var j = 0; j < children.length; j++){
  92 + var code = children[j].code;
  93 + for(var k=0;k < xlList.length;k++ ){
  94 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  95 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  96 +// tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  97 + }
  98 + }
  99 + }
  100 + }
  101 + initPinYinSelect2('#line',data,'');
  102 +
  103 + });
  104 + });
  105 +
  106 +
94 107 $('#code').select2({
95 108 ajax: {
96 109 url: '/realSchedule/sreachVehic',
... ...
src/main/resources/static/pages/forms/statement/jobSummary.html
... ... @@ -240,43 +240,46 @@
240 240 }
241 241 }
242 242 $('#fgsdmJob').html(options);
243   - initXl();
  243 +// initXl();
244 244 }
245 245  
246   - $("#fgsdmJob").on("change",initXl);
247   - function initXl(){
248   - var data=[];
249   - if(fage){
250   - $("#line").select2("destroy").html('');
251   - }
252   - var fgs=$('#fgsdmJob').val();
253   - var gs=$('#gsdmJob').val();
254   - for(var i=0;i<xlList.length;i++){
255   - if(gs!=""){
256   - if(fgs!=""){
257   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
258   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
259   - }
260   - }else{
261   - if(xlList[i]["gsbm"]==gs){
262   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  246 + var tempData = {};
  247 + $.get('/report/lineList',function(xlList){
  248 + var data = [];
  249 +// data.push({id: " ", text: "全部线路"});
  250 + $.get('/user/companyData', function(result){
  251 + for(var i = 0; i < result.length; i++){
  252 + var companyCode = result[i].companyCode;
  253 + var children = result[i].children;
  254 + for(var j = 0; j < children.length; j++){
  255 + var code = children[j].code;
  256 + for(var k=0;k < xlList.length;k++ ){
  257 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  258 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  259 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  260 + }
263 261 }
264 262 }
265 263 }
266   - }
267   - initPinYinSelect2('#line',data,'');
268   - fage=true;
269   - }
  264 + initPinYinSelect2('#line',data,'');
  265 +
  266 + });
  267 + });
270 268  
271   - /* $.get('/basic/lineCode2Name',function(result){
272   - var data=[];
273   -
274   - for(var code in result){
275   - data.push({id: code, text: result[code]});
  269 + $("#line").on("change", function(){
  270 + if($("#line").val() == " "){
  271 + $("#gsdmJob").attr("disabled", false);
  272 + $("#fgsdmJob").attr("disabled", false);
  273 + } else {
  274 + var temp = tempData[$("#line").val()].split(":");
  275 + $("#gsdmJob").val(temp[0]);
  276 + updateCompany();
  277 + $("#fgsdmJob").val(temp[1]);
  278 + $("#gsdmJob").attr("disabled", true);
  279 + $("#fgsdmJob").attr("disabled", true);
276 280 }
277   - initPinYinSelect2('#line',data,'');
278   -
279   - }) */
  281 + });
  282 +
280 283  
281 284 jQuery.fn.rowspan = function(colIdx) { //封装的一个JQuery小插件
282 285 return this.each(function(){
... ...
src/main/resources/static/pages/forms/statement/lbStatuAnaly.html
... ... @@ -233,36 +233,44 @@
233 233 }
234 234 }
235 235 $('#subCompany').html(options);
236   - initXl();
237 236 }
238 237  
239   - $("#subCompany").on("change",initXl);
240   - function initXl(){
241   - var data=[];
242   - data.push({id:" ", text:"全部线路"});
243   - if(fage){
244   - $("#line").select2("destroy").html('');
245   - }
246   - var fgs=$('#subCompany').val();
247   - var gs=$('#company').val();
248   - for(var i=0;i<xlList.length;i++){
249   - if(gs!=""){
250   - if(fgs!=""){
251   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
252   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
253   - }
254   - }else{
255   - if(xlList[i]["gsbm"]==gs){
256   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  238 + var tempData = {};
  239 + $.get('/report/lineList',function(xlList){
  240 + var data = [];
  241 + data.push({id: " ", text: "全部线路"});
  242 + $.get('/user/companyData', function(result){
  243 + for(var i = 0; i < result.length; i++){
  244 + var companyCode = result[i].companyCode;
  245 + var children = result[i].children;
  246 + for(var j = 0; j < children.length; j++){
  247 + var code = children[j].code;
  248 + for(var k=0;k < xlList.length;k++ ){
  249 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  250 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  251 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  252 + }
257 253 }
258 254 }
259 255 }
  256 + initPinYinSelect2('#line',data,'');
  257 +
  258 + });
  259 + });
  260 +
  261 + $("#line").on("change", function(){
  262 + if($("#line").val() == " "){
  263 + $("#company").attr("disabled", false);
  264 + $("#subCompany").attr("disabled", false);
  265 + } else {
  266 + var temp = tempData[$("#line").val()].split(":");
  267 + $("#company").val(temp[0]);
  268 + updateCompany();
  269 + $("#subCompany").val(temp[1]);
  270 + $("#company").attr("disabled", true);
  271 + $("#subCompany").attr("disabled", true);
260 272 }
261   - initPinYinSelect2('#line',data,'');
262   - line = data[0].id;
263   - updateModel();
264   - fage=true;
265   - }
  273 + });
266 274  
267 275 var lb = 0; //标志是否有选择至少一个烂班类型
268 276 $("#totalLb").on("change", function(){
... ...
src/main/resources/static/pages/forms/statement/lineTimeAnaly.html
... ... @@ -291,48 +291,57 @@
291 291 }
292 292 }
293 293 $('#subCompany').html(options);
294   - initXl();
295 294 }
296 295  
297   - $("#subCompany").on("change",initXl);
298   - function initXl(){
299   - var data=[];
300   - if(fage){
301   - $("#line").select2("destroy").html('');
302   - }
303   - var fgs=$('#subCompany').val();
304   - var gs=$('#company').val();
305   - for(var i=0;i<xlList.length;i++){
306   - if(gs!=""){
307   - if(fgs!=""){
308   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
309   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
310   - }
311   - }else{
312   - if(xlList[i]["gsbm"]==gs){
313   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  296 +
  297 +
  298 + var tempData = {};
  299 + $.get('/report/lineList',function(xlList){
  300 + var data = [];
  301 + $.get('/user/companyData', function(result){
  302 + for(var i = 0; i < result.length; i++){
  303 + var companyCode = result[i].companyCode;
  304 + var children = result[i].children;
  305 + for(var j = 0; j < children.length; j++){
  306 + var code = children[j].code;
  307 + for(var k=0;k < xlList.length;k++ ){
  308 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  309 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  310 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  311 + }
314 312 }
315 313 }
316 314 }
317   - }
318   - initPinYinSelect2('#line',data,'');
319   - fage=true;
320   -
321   - line = data[0].id;
322   - updateModel();
323   -
324   - var params = {};
325   - params['line'] = line;
326   - $get('/busInterval/getDir', params, function(result){
327   - dirData = createTreeData(result);
328   - var options = '<option value="">全部方向</option>';
329   - $.each(dirData, function(i, g){
330   - options += '<option value="'+g.name+'">'+g.name+'</option>';
  315 + initPinYinSelect2('#line',data,'');
  316 + line = data[0].id;
  317 + updateModel();
  318 +
  319 + var params = {};
  320 + params['line'] = line;
  321 + $get('/busInterval/getDir', params, function(result){
  322 + dirData = createTreeData(result);
  323 + var options = '<option value="">全部方向</option>';
  324 + $.each(dirData, function(i, g){
  325 + options += '<option value="'+g.name+'">'+g.name+'</option>';
  326 + });
  327 + $('#upDown').html(options);
331 328 });
332   - $('#upDown').html(options);
333 329 });
334   - }
335   -
  330 + });
  331 +
  332 + $("#line").on("change", function(){
  333 + if($("#line").val() == " "){
  334 + $("#company").attr("disabled", false);
  335 + $("#subCompany").attr("disabled", false);
  336 + } else {
  337 + var temp = tempData[$("#line").val()].split(":");
  338 + $("#company").val(temp[0]);
  339 + updateCompany();
  340 + $("#subCompany").val(temp[1]);
  341 + $("#company").attr("disabled", true);
  342 + $("#subCompany").attr("disabled", true);
  343 + }
  344 + });
336 345  
337 346 $("#query").on("click", function (){
338 347 jsDoQuery();
... ...
src/main/resources/static/pages/forms/statement/peopleCarPlan.html
... ... @@ -138,33 +138,43 @@
138 138 }
139 139 }
140 140 $('#subCompany').html(options);
141   - initXl();
142 141 }
143   -
144   - $("#subCompany").on("change",initXl);
145   - function initXl(){
146   - var data=[];
147   - if(fage){
148   - $("#line").select2("destroy").html('');
149   - }
150   - var fgs=$('#subCompany').val();
151   - var gs=$('#company').val();
152   - for(var i=0;i<xlList.length;i++){
153   - if(gs!=""){
154   - if(fgs!=""){
155   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
156   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
157   - }
158   - }else{
159   - if(xlList[i]["gsbm"]==gs){
160   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  142 + var tempData = {};
  143 + $.get('/report/lineList',function(xlList){
  144 + var data = [];
  145 + $.get('/user/companyData', function(result){
  146 + for(var i = 0; i < result.length; i++){
  147 + var companyCode = result[i].companyCode;
  148 + var children = result[i].children;
  149 + for(var j = 0; j < children.length; j++){
  150 + var code = children[j].code;
  151 + for(var k=0;k < xlList.length;k++ ){
  152 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  153 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  154 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  155 + }
161 156 }
162 157 }
163 158 }
  159 + initPinYinSelect2('#line',data,'');
  160 +
  161 + });
  162 + });
  163 +
  164 + $("#line").on("change", function(){
  165 + if($("#line").val() == " "){
  166 + $("#company").attr("disabled", false);
  167 + $("#subCompany").attr("disabled", false);
  168 + } else {
  169 + var temp = tempData[$("#line").val()].split(":");
  170 + $("#company").val(temp[0]);
  171 + updateCompany();
  172 + $("#subCompany").val(temp[1]);
  173 + $("#company").attr("disabled", true);
  174 + $("#subCompany").attr("disabled", true);
164 175 }
165   - initPinYinSelect2('#line',data,'');
166   - fage=true;
167   - }
  176 + });
  177 +
168 178  
169 179  
170 180 $("#query").on("click",jsDoQuery);
... ...
src/main/resources/static/pages/forms/statement/scheduleAnaly.html
... ... @@ -171,35 +171,46 @@
171 171 }
172 172 }
173 173 $('#subCompany').html(options);
174   - initXl();
175 174 }
176 175  
177   - $("#subCompany").on("change",initXl);
178   - function initXl(){
179   - var data=[];
180   - if(fage){
181   - $("#line").select2("destroy").html('');
182   - }
183   - var fgs=$('#subCompany').val();
184   - var gs=$('#company').val();
185   - for(var i=0;i<xlList.length;i++){
186   - if(gs!=""){
187   - if(fgs!=""){
188   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
189   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
190   - }
191   - }else{
192   - if(xlList[i]["gsbm"]==gs){
193   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  176 +
  177 + var tempData = {};
  178 + $.get('/report/lineList',function(xlList){
  179 + var data = [];
  180 + $.get('/user/companyData', function(result){
  181 + for(var i = 0; i < result.length; i++){
  182 + var companyCode = result[i].companyCode;
  183 + var children = result[i].children;
  184 + for(var j = 0; j < children.length; j++){
  185 + var code = children[j].code;
  186 + for(var k=0;k < xlList.length;k++ ){
  187 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  188 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  189 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  190 + }
194 191 }
195 192 }
196 193 }
  194 + initPinYinSelect2('#line',data,'');
  195 + line = data[0].id;
  196 + updateModel();
  197 +
  198 + });
  199 + });
  200 +
  201 + $("#line").on("change", function(){
  202 + if($("#line").val() == " "){
  203 + $("#company").attr("disabled", false);
  204 + $("#subCompany").attr("disabled", false);
  205 + } else {
  206 + var temp = tempData[$("#line").val()].split(":");
  207 + $("#company").val(temp[0]);
  208 + updateCompany();
  209 + $("#subCompany").val(temp[1]);
  210 + $("#company").attr("disabled", true);
  211 + $("#subCompany").attr("disabled", true);
197 212 }
198   - initPinYinSelect2('#line',data,'');
199   - line = data[0].id;
200   - updateModel();
201   - fage=true;
202   - }
  213 + });
203 214  
204 215  
205 216 $("#query").on("click", function(){
... ...
src/main/resources/static/pages/forms/statement/scheduleAnaly_sum.html
... ... @@ -171,38 +171,45 @@
171 171 }
172 172 }
173 173 $('#subCompany').html(options);
174   - initXl();
175 174 }
176   -
177   - $("#subCompany").on("change",initXl);
178   - function initXl(){
179   - var data=[];
180   - if(fage){
181   - $("#line").select2("destroy").html('');
182   - }
183   - var fgs=$('#subCompany').val();
184   - var gs=$('#company').val();
185   - for(var i=0;i<xlList.length;i++){
186   - if(gs!=""){
187   - if(fgs!=""){
188   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
189   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
190   - }
191   - }else{
192   - if(xlList[i]["gsbm"]==gs){
193   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  175 +
  176 + var tempData = {};
  177 + $.get('/report/lineList',function(xlList){
  178 + var data = [];
  179 + $.get('/user/companyData', function(result){
  180 + for(var i = 0; i < result.length; i++){
  181 + var companyCode = result[i].companyCode;
  182 + var children = result[i].children;
  183 + for(var j = 0; j < children.length; j++){
  184 + var code = children[j].code;
  185 + for(var k=0;k < xlList.length;k++ ){
  186 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  187 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  188 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  189 + }
194 190 }
195 191 }
196 192 }
197   - }
198   - initPinYinSelect2('#line',data,'');
199   - line = data[0].id;
200   - updateModel();
201   - initCl();
202   -
203   - fage=true;
204   - }
  193 + initPinYinSelect2('#line',data,'');
  194 + line = data[0].id;
  195 + updateModel();
  196 + initCl();
  197 + });
  198 + });
205 199  
  200 + $("#line").on("change", function(){
  201 + if($("#line").val() == " "){
  202 + $("#company").attr("disabled", false);
  203 + $("#subCompany").attr("disabled", false);
  204 + } else {
  205 + var temp = tempData[$("#line").val()].split(":");
  206 + $("#company").val(temp[0]);
  207 + updateCompany();
  208 + $("#subCompany").val(temp[1]);
  209 + $("#company").attr("disabled", true);
  210 + $("#subCompany").attr("disabled", true);
  211 + }
  212 + });
206 213  
207 214 $("#query").on("click", function(){
208 215 page = 0;
... ...
src/main/resources/static/pages/forms/statement/scheduleDaily.html
... ... @@ -340,32 +340,46 @@ word-wrap: break-word;
340 340 }
341 341 }
342 342 $('#fgsdmDdrb').html(options);
343   - initXl();
344 343 }
345   - $("#fgsdmDdrb").on("change",initXl);
346   - function initXl(){
347   - var data=[];
348   - if(fage){
349   - $("#line").select2("destroy").html('');
350   - }
351   - var fgs=$('#fgsdmDdrb').val();
352   - var gs=$('#gsdmDdrb').val();
353   - for(var i=0;i<xlList.length;i++){
354   - if(gs!=""){
355   - if(fgs!=""){
356   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
357   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
358   - }
359   - }else{
360   - if(xlList[i]["gsbm"]==gs){
361   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  344 +
  345 +
  346 + var tempData = {};
  347 + $.get('/report/lineList',function(xlList){
  348 + var data = [];
  349 + $.get('/user/companyData', function(result){
  350 + for(var i = 0; i < result.length; i++){
  351 + var companyCode = result[i].companyCode;
  352 + var children = result[i].children;
  353 + for(var j = 0; j < children.length; j++){
  354 + var code = children[j].code;
  355 + for(var k=0;k < xlList.length;k++ ){
  356 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  357 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  358 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  359 + }
362 360 }
363 361 }
364 362 }
  363 + initPinYinSelect2('#line',data,'');
  364 +
  365 + });
  366 + });
  367 +
  368 + $("#line").on("change", function(){
  369 + if($("#line").val() == " "){
  370 + $("#gsdmDdrb").attr("disabled", false);
  371 + $("#fgsdmDdrb").attr("disabled", false);
  372 + } else {
  373 + var temp = tempData[$("#line").val()].split(":");
  374 + $("#gsdmDdrb").val(temp[0]);
  375 + updateCompany();
  376 + $("#fgsdmDdrb").val(temp[1]);
  377 + $("#gsdmDdrb").attr("disabled", true);
  378 + $("#fgsdmDdrb").attr("disabled", true);
365 379 }
366   - initPinYinSelect2('#line',data,'');
367   - fage=true;
368   - }
  380 + });
  381 +
  382 +
369 383 $('#export').attr('disabled', "true");
370 384  
371 385 var line = $("#line").val();
... ...
src/main/resources/static/pages/forms/statement/statisticsDaily.html
... ... @@ -206,33 +206,47 @@
206 206 }
207 207 }
208 208 $('#fgsdm').html(options);
209   - initXl();
  209 +// initXl();
210 210 }
211   - $("#fgsdm").on("change",initXl);
212   - function initXl(){
213   - var data=[];
  211 +
  212 + var tempData = {};
  213 + $.get('/report/lineList',function(xlList){
  214 + var data = [];
214 215 data.push({id: " ", text: "全部线路"});
215   - if(fage){
216   - $("#line").select2("destroy").html('');
217   - }
218   - var fgs=$('#fgsdm').val();
219   - var gs=$('#gsdm').val();
220   - for(var i=0;i<xlList.length;i++){
221   - if(gs!=""){
222   - if(fgs!=""){
223   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
224   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
225   - }
226   - }else{
227   - if(xlList[i]["gsbm"]==gs){
228   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  216 + $.get('/user/companyData', function(result){
  217 + for(var i = 0; i < result.length; i++){
  218 + var companyCode = result[i].companyCode;
  219 + var children = result[i].children;
  220 + for(var j = 0; j < children.length; j++){
  221 + var code = children[j].code;
  222 + for(var k=0;k < xlList.length;k++ ){
  223 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  224 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  225 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  226 + }
229 227 }
230 228 }
231 229 }
  230 + initPinYinSelect2('#line',data,'');
  231 +
  232 + });
  233 + });
  234 +
  235 + $("#line").on("change", function(){
  236 + if($("#line").val() == " "){
  237 + $("#gsdm").attr("disabled", false);
  238 + $("#fgsdm").attr("disabled", false);
  239 + } else {
  240 + var temp = tempData[$("#line").val()].split(":");
  241 + $("#gsdm").val(temp[0]);
  242 + updateCompany();
  243 + $("#fgsdm").val(temp[1]);
  244 + $("#gsdm").attr("disabled", true);
  245 + $("#fgsdm").attr("disabled", true);
232 246 }
233   - initPinYinSelect2('#line',data,'');
234   - fage=true;
235   - }
  247 + });
  248 +
  249 +
236 250 var line ="";
237 251 var xlName ="";
238 252 var date = "";
... ...
src/main/resources/static/pages/forms/statement/timeAndSpeed.html
... ... @@ -235,43 +235,50 @@
235 235 }
236 236 }
237 237 $('#subCompany').html(options);
238   - initXl();
239   - }
  238 + }
240 239  
241   - $("#subCompany").on("change",initXl);
242   - function initXl(){
243   - var data=[];
244   - data.push({id:" ", text:"全部线路"});
245   - if(fage){
246   - $("#line").select2("destroy").html('');
247   - }
248   - var fgs=$('#subCompany').val();
249   - var gs=$('#company').val();
250   - for(var i=0;i<xlList.length;i++){
251   - if(gs!=""){
252   - if(fgs!=""){
253   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
254   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
255   - }
256   - }else{
257   - if(xlList[i]["gsbm"]==gs){
258   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  240 + var tempData = {};
  241 + $.get('/report/lineList',function(xlList){
  242 + var data = [];
  243 + data.push({id: " ", text: "全部线路"});
  244 + $.get('/user/companyData', function(result){
  245 + for(var i = 0; i < result.length; i++){
  246 + var companyCode = result[i].companyCode;
  247 + var children = result[i].children;
  248 + for(var j = 0; j < children.length; j++){
  249 + var code = children[j].code;
  250 + for(var k=0;k < xlList.length;k++ ){
  251 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  252 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  253 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  254 + }
259 255 }
260 256 }
261 257 }
262   - }
263   - initPinYinSelect2('#line',data,'');
264   - fage=true;
265   -
266   - $("#endDate").attr("disabled", true);
267   - $("#endDate").val($("#startDate").val());
268   - line = data[0].id;
269   - statu = 0;
270   -
271   - updateModel();
272   - updateLp("");
273   - }
  258 + initPinYinSelect2('#line',data,'');
  259 + $("#endDate").attr("disabled", true);
  260 + $("#endDate").val($("#startDate").val());
  261 + line = data[0].id;
  262 + statu = 0;
  263 +
  264 + updateModel();
  265 + updateLp("");
  266 + });
  267 + });
274 268  
  269 + $("#line").on("change", function(){
  270 + if($("#line").val() == " "){
  271 + $("#company").attr("disabled", false);
  272 + $("#subCompany").attr("disabled", false);
  273 + } else {
  274 + var temp = tempData[$("#line").val()].split(":");
  275 + $("#company").val(temp[0]);
  276 + updateCompany();
  277 + $("#subCompany").val(temp[1]);
  278 + $("#company").attr("disabled", true);
  279 + $("#subCompany").attr("disabled", true);
  280 + }
  281 + });
275 282  
276 283 $("#query").on("click", function (){
277 284 jsDoQuery();
... ...
src/main/resources/static/pages/forms/statement/waybill.html
... ... @@ -158,14 +158,14 @@
158 158 }
159 159 }
160 160 $('#fgsdmXcld').html(options);
161   - initXl();
  161 +// initXl();
162 162 }
163 163  
164 164  
165 165  
166 166  
167   - $("#fgsdmXcld").on("change",initXl);
168   - function initXl(){
  167 +// $("#fgsdmXcld").on("change",initXl);
  168 + /* function initXl(){
169 169 var data=[];
170 170 if(fage){
171 171 $("#line").select2("destroy").html('');
... ... @@ -187,7 +187,44 @@
187 187 }
188 188 initPinYinSelect2('#line',data,'');
189 189 fage=true;
190   - }
  190 + } */
  191 +
  192 + var tempData = {};
  193 + $.get('/report/lineList',function(xlList){
  194 + var data = [];
  195 +// data.push({id: " ", text: "全部线路"});
  196 + $.get('/user/companyData', function(result){
  197 + for(var i = 0; i < result.length; i++){
  198 + var companyCode = result[i].companyCode;
  199 + var children = result[i].children;
  200 + for(var j = 0; j < children.length; j++){
  201 + var code = children[j].code;
  202 + for(var k=0;k < xlList.length;k++ ){
  203 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  204 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  205 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  206 + }
  207 + }
  208 + }
  209 + }
  210 + initPinYinSelect2('#line',data,'');
  211 +
  212 + });
  213 + });
  214 +
  215 + $("#line").on("change", function(){
  216 + if($("#line").val() == " "){
  217 + $("#gsdmXcld").attr("disabled", false);
  218 + $("#fgsdmXcld").attr("disabled", false);
  219 + } else {
  220 + var temp = tempData[$("#line").val()].split(":");
  221 + $("#gsdmXcld").val(temp[0]);
  222 + updateCompany();
  223 + $("#fgsdmXcld").val(temp[1]);
  224 + $("#gsdmXcld").attr("disabled", true);
  225 + $("#fgsdmXcld").attr("disabled", true);
  226 + }
  227 + });
191 228 var date = '';
192 229 var line = '';
193 230 $("#query").on("click",function(){
... ...
src/main/resources/static/pages/forms/statement/workDaily.html
... ... @@ -112,44 +112,6 @@
112 112 day = "0" + day;
113 113 $("#date").val(year + "-" + month + "-" + day);
114 114  
115   -// $.get('/basic/lineCode2Name',function(result){
116   -// var data=[];
117   -
118   -// data.push({id: " ", text: "全部线路"});
119   -// for(var code in result){
120   -// data.push({id: code, text: result[code]});
121   -// }
122   -// initPinYinSelect2('#line',data,'');
123   -// })
124   -// var obj = [];
125   -// $.get('/user/companyData', function(result){
126   -// obj = result;
127   -// var options = '';
128   -// for(var i = 0; i < obj.length; i++){
129   -// options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
130   -// }
131   -// if(obj.length == 1){
132   -// $('#company1').hide();
133   -// if(obj[0].children.length == 1)
134   -// $('#subCompany1').hide();
135   -// }
136   -// $('#company').html(options);
137   -// updateCompany();
138   -// });
139   -// $("#company").on("change",updateCompany);
140   -// function updateCompany(){
141   -// var company = $('#company').val();
142   -// var options = '';
143   -// for(var i = 0; i < obj.length; i++){
144   -// if(obj[i].companyCode == company){
145   -// var children = obj[i].children;
146   -// for(var j = 0; j < children.length; j++){
147   -// options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
148   -// }
149   -// }
150   -// }
151   -// $('#subCompany').html(options);
152   -// }
153 115 var fage=false;
154 116 var xlList;
155 117 var obj = [];
... ... @@ -188,34 +150,45 @@
188 150 }
189 151 }
190 152 $('#subCompany').html(options);
191   - initXl();
192 153 }
193 154  
194   - $("#subCompany").on("change",initXl);
195   - function initXl(){
196   - var data=[];
197   - if(fage){
198   - $("#line").select2("destroy").html('');
199   - }
200   - var fgs=$('#subCompany').val();
201   - var gs=$('#company').val();
  155 + var tempData = {};
  156 + $.get('/report/lineList',function(xlList){
  157 + var data = [];
202 158 data.push({id: " ", text: "全部线路"});
203   - for(var i=0;i<xlList.length;i++){
204   - if(gs!=""){
205   - if(fgs!=""){
206   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
207   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
208   - }
209   - }else{
210   - if(xlList[i]["gsbm"]==gs){
211   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  159 + $.get('/user/companyData', function(result){
  160 + for(var i = 0; i < result.length; i++){
  161 + var companyCode = result[i].companyCode;
  162 + var children = result[i].children;
  163 + for(var j = 0; j < children.length; j++){
  164 + var code = children[j].code;
  165 + for(var k=0;k < xlList.length;k++ ){
  166 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  167 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  168 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  169 + }
212 170 }
213 171 }
214 172 }
  173 + initPinYinSelect2('#line',data,'');
  174 +
  175 + });
  176 + });
  177 +
  178 + $("#line").on("change", function(){
  179 + if($("#line").val() == " "){
  180 + $("#company").attr("disabled", false);
  181 + $("#subCompany").attr("disabled", false);
  182 + } else {
  183 + var temp = tempData[$("#line").val()].split(":");
  184 + $("#company").val(temp[0]);
  185 + updateCompany();
  186 + $("#subCompany").val(temp[1]);
  187 + $("#company").attr("disabled", true);
  188 + $("#subCompany").attr("disabled", true);
215 189 }
216   - initPinYinSelect2('#line',data,'');
217   - fage=true;
218   - }
  190 + });
  191 +
219 192  
220 193  
221 194  
... ...
src/main/resources/static/pages/mforms/changetochanges/changetochange.html
... ... @@ -180,35 +180,46 @@
180 180 }
181 181 }
182 182 $('#fgsdmChange').html(options);
183   - initXl();
184 183 }
185 184  
186   - $("#fgsdmChange").on("change",initXl);
187   - function initXl(){
188   - var data=[];
189   - data.push({id: " ", text: "请选择"});
190   - if(fage){
191   - $("#line").select2("destroy").html('');
192   - }
193   - var fgs=$('#fgsdmChange').val();
194   - var gs=$('#gsdmChange').val();
195   - for(var i=0;i<xlList.length;i++){
196   - if(gs!=""){
197   - if(fgs!=""){
198   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
199   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
200   - }
201   - }else{
202   - if(xlList[i]["gsbm"]==gs){
203   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  185 +
  186 + var tempData = {};
  187 + $.get('/report/lineList',function(xlList){
  188 + var data = [];
  189 + data.push({id: " ", text: "全部线路"});
  190 + $.get('/user/companyData', function(result){
  191 + for(var i = 0; i < result.length; i++){
  192 + var companyCode = result[i].companyCode;
  193 + var children = result[i].children;
  194 + for(var j = 0; j < children.length; j++){
  195 + var code = children[j].code;
  196 + for(var k=0;k < xlList.length;k++ ){
  197 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  198 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  199 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  200 + }
204 201 }
205 202 }
206 203 }
  204 + initPinYinSelect2('#line',data,'');
  205 +
  206 + });
  207 + });
  208 +
  209 + $("#line").on("change", function(){
  210 + if($("#line").val() == " "){
  211 + $("#gsdmChange").attr("disabled", false);
  212 + $("#fgsdmChange").attr("disabled", false);
  213 + } else {
  214 + var temp = tempData[$("#line").val()].split(":");
  215 + $("#gsdmChange").val(temp[0]);
  216 + updateCompany();
  217 + $("#fgsdmChange").val(temp[1]);
  218 + $("#gsdmChange").attr("disabled", true);
  219 + $("#fgsdmChange").attr("disabled", true);
207 220 }
208   - initPinYinSelect2('#line',data,'');
209   - fage=true;
210   - }
211   -
  221 + });
  222 +
212 223 var line;
213 224 var startDate;
214 225 var endDate;
... ...
src/main/resources/static/pages/mforms/operationservices/operationservice.html
... ... @@ -153,45 +153,45 @@
153 153 }
154 154 }
155 155 $('#fgsdmOperat').html(options);
156   - initXl();
157 156 }
158 157  
159   - /* $.get('/basic/lineCode2Name',function(result){
160   - var data=[];
161   -
162   - for(var code in result){
163   - data.push({id: code, text: result[code]});
164   - }
165   - initPinYinSelect2('#line',data,'');
166   -
167   - }) */
168   -
169   - $("#fgsdmOperat").on("change",initXl);
170   - function initXl(){
171   - var data=[];
  158 + var tempData = {};
  159 + $.get('/report/lineList',function(xlList){
  160 + var data = [];
172 161 data.push({id: " ", text: "全部线路"});
173   - if(fage){
174   - $("#line").select2("destroy").html('');
175   - }
176   - var fgs=$('#fgsdmOperat').val();
177   - var gs=$('#gsdmOperat').val();
178   - for(var i=0;i<xlList.length;i++){
179   - if(gs!=""){
180   - if(fgs!=""){
181   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
182   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
183   - }
184   - }else{
185   - if(xlList[i]["gsbm"]==gs){
186   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  162 + $.get('/user/companyData', function(result){
  163 + for(var i = 0; i < result.length; i++){
  164 + var companyCode = result[i].companyCode;
  165 + var children = result[i].children;
  166 + for(var j = 0; j < children.length; j++){
  167 + var code = children[j].code;
  168 + for(var k=0;k < xlList.length;k++ ){
  169 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  170 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  171 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  172 + }
187 173 }
188 174 }
189 175 }
190   - }
191   - initPinYinSelect2('#line',data,'');
192   - fage=true;
193   - }
  176 + initPinYinSelect2('#line',data,'');
  177 +
  178 + });
  179 + });
194 180  
  181 + $("#line").on("change", function(){
  182 + if($("#line").val() == " "){
  183 + $("#gsdmOperat").attr("disabled", false);
  184 + $("#fgsdmOperat").attr("disabled", false);
  185 + } else {
  186 + var temp = tempData[$("#line").val()].split(":");
  187 + $("#gsdmOperat").val(temp[0]);
  188 + updateCompany();
  189 + $("#fgsdmOperat").val(temp[1]);
  190 + $("#gsdmOperat").attr("disabled", true);
  191 + $("#fgsdmOperat").attr("disabled", true);
  192 + }
  193 + });
  194 +
195 195  
196 196 $("#query").on(
197 197 "click",
... ...
src/main/resources/static/pages/mforms/shifdays/shifday.html
... ... @@ -152,7 +152,6 @@ $(function(){
152 152 }
153 153 }
154 154 $('#fgsdmShif').html(options);
155   - initXl();
156 155 }
157 156  
158 157  
... ... @@ -166,30 +165,43 @@ $(function(){
166 165  
167 166 // })
168 167  
169   - $("#fgsdmShif").on("change",initXl);
170   - function initXl(){
171   - var data=[];
172   - if(fage){
173   - $("#line").select2("destroy").html('');
174   - }
175   - var fgs=$('#fgsdmShif').val();
176   - var gs=$('#gsdmShif').val();
177   - for(var i=0;i<xlList.length;i++){
178   - if(gs!=""){
179   - if(fgs!=""){
180   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
181   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
182   - }
183   - }else{
184   - if(xlList[i]["gsbm"]==gs){
185   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  168 + var tempData = {};
  169 + $.get('/report/lineList',function(xlList){
  170 + var data = [];
  171 +// data.push({id: " ", text: "全部线路"});
  172 + $.get('/user/companyData', function(result){
  173 + for(var i = 0; i < result.length; i++){
  174 + var companyCode = result[i].companyCode;
  175 + var children = result[i].children;
  176 + for(var j = 0; j < children.length; j++){
  177 + var code = children[j].code;
  178 + for(var k=0;k < xlList.length;k++ ){
  179 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  180 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  181 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  182 + }
  183 + }
186 184 }
187 185 }
  186 + initPinYinSelect2('#line',data,'');
  187 +
  188 + });
  189 + });
  190 +
  191 + $("#line").on("change", function(){
  192 + if($("#line").val() == " "){
  193 + $("#gsdmShif").attr("disabled", false);
  194 + $("#fgsdmShif").attr("disabled", false);
  195 + } else {
  196 + var temp = tempData[$("#line").val()].split(":");
  197 + $("#gsdmShif").val(temp[0]);
  198 + updateCompany();
  199 + $("#fgsdmShif").val(temp[1]);
  200 + $("#gsdmShif").attr("disabled", true);
  201 + $("#fgsdmShif").attr("disabled", true);
188 202 }
189   - }
190   - initPinYinSelect2('#line',data,'');
191   - fage=true;
192   - }
  203 + });
  204 +
193 205  
194 206  
195 207 $("#query").on("click",function(){
... ...
src/main/resources/static/pages/mforms/shiftuehiclemanths/shiftuehiclemanth.html
... ... @@ -150,32 +150,45 @@
150 150 }
151 151 }
152 152 $('#fgsdmManth').html(options);
153   - initXl();
154 153 }
155   - $("#fgsdmManth").on("change",initXl);
156   - function initXl(){
157   - var data=[];
158   - if(fage){
159   - $("#line").select2("destroy").html('');
160   - }
161   - var fgs=$('#fgsdmManth').val();
162   - var gs=$('#gsdmManth').val();
163   - for(var i=0;i<xlList.length;i++){
164   - if(gs!=""){
165   - if(fgs!=""){
166   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
167   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
168   - }
169   - }else{
170   - if(xlList[i]["gsbm"]==gs){
171   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  154 +
  155 +
  156 + var tempData = {};
  157 + $.get('/report/lineList',function(xlList){
  158 + var data = [];
  159 + $.get('/user/companyData', function(result){
  160 + for(var i = 0; i < result.length; i++){
  161 + var companyCode = result[i].companyCode;
  162 + var children = result[i].children;
  163 + for(var j = 0; j < children.length; j++){
  164 + var code = children[j].code;
  165 + for(var k=0;k < xlList.length;k++ ){
  166 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  167 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  168 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  169 + }
172 170 }
173 171 }
174 172 }
  173 + initPinYinSelect2('#line',data,'');
  174 +
  175 + });
  176 + });
  177 +
  178 + $("#line").on("change", function(){
  179 + if($("#line").val() == " "){
  180 + $("#gsdmManth").attr("disabled", false);
  181 + $("#fgsdmManth").attr("disabled", false);
  182 + } else {
  183 + var temp = tempData[$("#line").val()].split(":");
  184 + $("#gsdmManth").val(temp[0]);
  185 + updateCompany();
  186 + $("#fgsdmManth").val(temp[1]);
  187 + $("#gsdmManth").attr("disabled", true);
  188 + $("#fgsdmManth").attr("disabled", true);
175 189 }
176   - initPinYinSelect2('#line',data,'');
177   - fage=true;
178   - }
  190 + });
  191 +
179 192 $("#query").on("click",function(){
180 193 if($("#startDate").val() == null || $("#startDate").val().trim().length == 0){
181 194 layer.msg("请选择时间范围!");
... ...
src/main/resources/static/pages/mforms/singledatas/singledata.html
... ... @@ -134,34 +134,44 @@
134 134 }
135 135 }
136 136 $('#fgsdmSing').html(options);
137   - initXl();
138 137 }
139 138  
140   - $("#fgsdmSing").on("change",initXl);
141   - function initXl(){
142   - var data=[];
143   - data.push({id: " ", text: "请选择"});
144   - if(fage){
145   - $("#line").select2("destroy").html('');
146   - }
147   - var fgs=$('#fgsdmSing').val();
148   - var gs=$('#gsdmSing').val();
149   - for(var i=0;i<xlList.length;i++){
150   - if(gs!=""){
151   - if(fgs!=""){
152   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
153   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
154   - }
155   - }else{
156   - if(xlList[i]["gsbm"]==gs){
157   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  139 + var tempData = {};
  140 + $.get('/report/lineList',function(xlList){
  141 + var data = [];
  142 + data.push({id: " ", text: "全部线路"});
  143 + $.get('/user/companyData', function(result){
  144 + for(var i = 0; i < result.length; i++){
  145 + var companyCode = result[i].companyCode;
  146 + var children = result[i].children;
  147 + for(var j = 0; j < children.length; j++){
  148 + var code = children[j].code;
  149 + for(var k=0;k < xlList.length;k++ ){
  150 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  151 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  152 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  153 + }
158 154 }
159 155 }
160 156 }
  157 + initPinYinSelect2('#line',data,'');
  158 +
  159 + });
  160 + });
  161 +
  162 + $("#line").on("change", function(){
  163 + if($("#line").val() == " "){
  164 + $("#gsdmSing").attr("disabled", false);
  165 + $("#fgsdmSing").attr("disabled", false);
  166 + } else {
  167 + var temp = tempData[$("#line").val()].split(":");
  168 + $("#gsdmSing").val(temp[0]);
  169 + updateCompany();
  170 + $("#fgsdmSing").val(temp[1]);
  171 + $("#gsdmSing").attr("disabled", true);
  172 + $("#fgsdmSing").attr("disabled", true);
161 173 }
162   - initPinYinSelect2('#line',data,'');
163   - fage=true;
164   - }
  174 + });
165 175  
166 176  
167 177 $("#query").on("click",function(){
... ...
src/main/resources/static/pages/mforms/turnoutrates/turnoutrate.html
... ... @@ -172,34 +172,44 @@
172 172 }
173 173 }
174 174 $('#fgsdmTurn').html(options);
175   - initXl();
176 175 }
177   -
178   - $("#fgsdmTurn").on("change",initXl);
179   - function initXl(){
180   - var data=[];
181   - data.push({id:" ", text:"全部线路"});
182   - if(fage){
183   - $("#line").select2("destroy").html('');
184   - }
185   - var fgs=$('#fgsdmTurn').val();
186   - var gs=$('#gsdmTurn').val();
187   - for(var i=0;i<xlList.length;i++){
188   - if(gs!=""){
189   - if(fgs!=""){
190   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
191   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
192   - }
193   - }else{
194   - if(xlList[i]["gsbm"]==gs){
195   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  176 +
  177 + var tempData = {};
  178 + $.get('/report/lineList',function(xlList){
  179 + var data = [];
  180 + data.push({id: " ", text: "全部线路"});
  181 + $.get('/user/companyData', function(result){
  182 + for(var i = 0; i < result.length; i++){
  183 + var companyCode = result[i].companyCode;
  184 + var children = result[i].children;
  185 + for(var j = 0; j < children.length; j++){
  186 + var code = children[j].code;
  187 + for(var k=0;k < xlList.length;k++ ){
  188 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  189 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  190 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  191 + }
196 192 }
197 193 }
198 194 }
  195 + initPinYinSelect2('#line',data,'');
  196 +
  197 + });
  198 + });
  199 +
  200 + $("#line").on("change", function(){
  201 + if($("#line").val() == " "){
  202 + $("#gsdmTurn").attr("disabled", false);
  203 + $("#fgsdmTurn").attr("disabled", false);
  204 + } else {
  205 + var temp = tempData[$("#line").val()].split(":");
  206 + $("#gsdmTurn").val(temp[0]);
  207 + updateCompany();
  208 + $("#fgsdmTurn").val(temp[1]);
  209 + $("#gsdmTurn").attr("disabled", true);
  210 + $("#fgsdmTurn").attr("disabled", true);
199 211 }
200   - initPinYinSelect2('#line',data,'');
201   - fage=true;
202   - }
  212 + });
203 213  
204 214 var line;
205 215 var startDate;
... ...
src/main/resources/static/pages/mforms/vehicleloadings/vehicleloading.html
... ... @@ -127,33 +127,43 @@
127 127 }
128 128 }
129 129 $('#fgsdmVehic').html(options);
130   - initXl();
131 130 }
132 131  
133   - $("#fgsdmVehic").on("change",initXl);
134   - function initXl(){
135   - var data=[];
136   - if(fage){
137   - $("#line").select2("destroy").html('');
138   - }
139   - var fgs=$('#fgsdmVehic').val();
140   - var gs=$('#gsdmVehic').val();
141   - for(var i=0;i<xlList.length;i++){
142   - if(gs!=""){
143   - if(fgs!=""){
144   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
145   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
146   - }
147   - }else{
148   - if(xlList[i]["gsbm"]==gs){
149   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  132 + var tempData = {};
  133 + $.get('/report/lineList',function(xlList){
  134 + var data = [];
  135 + $.get('/user/companyData', function(result){
  136 + for(var i = 0; i < result.length; i++){
  137 + var companyCode = result[i].companyCode;
  138 + var children = result[i].children;
  139 + for(var j = 0; j < children.length; j++){
  140 + var code = children[j].code;
  141 + for(var k=0;k < xlList.length;k++ ){
  142 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  143 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  144 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  145 + }
150 146 }
151 147 }
152 148 }
  149 + initPinYinSelect2('#line',data,'');
  150 +
  151 + });
  152 + });
  153 +
  154 + $("#line").on("change", function(){
  155 + if($("#line").val() == " "){
  156 + $("#gsdmVehic").attr("disabled", false);
  157 + $("#fgsdmVehic").attr("disabled", false);
  158 + } else {
  159 + var temp = tempData[$("#line").val()].split(":");
  160 + $("#gsdmVehic").val(temp[0]);
  161 + updateCompany();
  162 + $("#fgsdmVehic").val(temp[1]);
  163 + $("#gsdmVehic").attr("disabled", true);
  164 + $("#fgsdmVehic").attr("disabled", true);
153 165 }
154   - initPinYinSelect2('#line',data,'');
155   - fage=true;
156   - }
  166 + });
157 167  
158 168 var line ;
159 169 var date ;
... ...
src/main/resources/static/pages/mforms/waybilldays/waybillday.html
... ... @@ -131,32 +131,46 @@
131 131 }
132 132 }
133 133 $('#fgsdmWaybillday').html(options);
134   - initXl();
  134 +// initXl();
135 135 }
136   - $("#fgsdmWaybillday").on("change",initXl);
137   - function initXl(){
138   - var data=[];
139   - if(fage){
140   - $("#line").select2("destroy").html('');
141   - }
142   - var fgs=$('#fgsdmWaybillday').val();
143   - var gs=$('#gsdmWaybillday').val();
144   - for(var i=0;i<xlList.length;i++){
145   - if(gs!=""){
146   - if(fgs!=""){
147   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
148   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
149   - }
150   - }else{
151   - if(xlList[i]["gsbm"]==gs){
152   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  136 +
  137 + var tempData = {};
  138 + $.get('/report/lineList',function(xlList){
  139 + var data = [];
  140 +// data.push({id: " ", text: "全部线路"});
  141 + $.get('/user/companyData', function(result){
  142 + for(var i = 0; i < result.length; i++){
  143 + var companyCode = result[i].companyCode;
  144 + var children = result[i].children;
  145 + for(var j = 0; j < children.length; j++){
  146 + var code = children[j].code;
  147 + for(var k=0;k < xlList.length;k++ ){
  148 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  149 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  150 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  151 + }
153 152 }
154 153 }
155 154 }
  155 + initPinYinSelect2('#line',data,'');
  156 +
  157 + });
  158 + });
  159 +
  160 + $("#line").on("change", function(){
  161 + if($("#line").val() == " "){
  162 + $("#gsdmWaybillday").attr("disabled", false);
  163 + $("#fgsdmWaybillday").attr("disabled", false);
  164 + } else {
  165 + var temp = tempData[$("#line").val()].split(":");
  166 + $("#gsdmWaybillday").val(temp[0]);
  167 + updateCompany();
  168 + $("#fgsdmWaybillday").val(temp[1]);
  169 + $("#gsdmWaybillday").attr("disabled", true);
  170 + $("#fgsdmWaybillday").attr("disabled", true);
156 171 }
157   - initPinYinSelect2('#line',data,'');
158   - fage=true;
159   - }
  172 + });
  173 +
160 174 var line;
161 175 var date;
162 176 var gsdmWaybillday;
... ...
src/main/resources/static/pages/report/countMileage/countBus/countBusMileage.html
... ... @@ -149,33 +149,46 @@
149 149 }
150 150 }
151 151 $('#fgsdm').html(options);
152   - initXl();
153 152 }
154   - $("#fgsdm").on("change",initXl);
155   - function initXl(){
156   - var data=[];
  153 +
  154 +
  155 + var tempData = {};
  156 + $.get('/report/lineList',function(xlList){
  157 + var data = [];
157 158 data.push({id: " ", text: "全部线路"});
158   - if(fage){
159   - $("#line").select2("destroy").html('');
160   - }
161   - var fgs=$('#fgsdm').val();
162   - var gs=$('#gsdm').val();
163   - for(var i=0;i<xlList.length;i++){
164   - if(gs!=""){
165   - if(fgs!=""){
166   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
167   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
168   - }
169   - }else{
170   - if(xlList[i]["gsbm"]==gs){
171   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  159 + $.get('/user/companyData', function(result){
  160 + for(var i = 0; i < result.length; i++){
  161 + var companyCode = result[i].companyCode;
  162 + var children = result[i].children;
  163 + for(var j = 0; j < children.length; j++){
  164 + var code = children[j].code;
  165 + for(var k=0;k < xlList.length;k++ ){
  166 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  167 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  168 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  169 + }
172 170 }
173 171 }
174 172 }
  173 + initPinYinSelect2('#line',data,'');
  174 +
  175 + });
  176 + });
  177 +
  178 + $("#line").on("change", function(){
  179 + if($("#line").val() == " "){
  180 + $("#gsdm").attr("disabled", false);
  181 + $("#fgsdm").attr("disabled", false);
  182 + } else {
  183 + var temp = tempData[$("#line").val()].split(":");
  184 + $("#gsdm").val(temp[0]);
  185 + updateCompany();
  186 + $("#fgsdm").val(temp[1]);
  187 + $("#gsdm").attr("disabled", true);
  188 + $("#fgsdm").attr("disabled", true);
175 189 }
176   - initPinYinSelect2('#line',data,'');
177   - fage=true;
178   - }
  190 + });
  191 +
179 192 var line ="";
180 193 var xlName ="";
181 194 var date = "";
... ... @@ -307,8 +320,8 @@
307 320 <td>{{obj.jhwjcclc}}</td>
308 321 <td>{{obj.kfks}}</td>
309 322 <td>{{obj.zrwjcclc}}</td>
310   - <td>0</td>
311   - <td>0</td>
  323 + <td>{{obj.zrwjcclc1}}</td>
  324 + <td>{{obj.zrwjcclc2}}</td>
312 325 <td>{{obj.ljyy}}</td>
313 326 <td>{{obj.ljjcc}}</td>
314 327 <td>{{obj.yhl}}</td>
... ...
src/main/resources/static/pages/report/countMileage/countLine/countLineMileage.html
... ... @@ -184,33 +184,46 @@
184 184 }
185 185 }
186 186 $('#fgsdm').html(options);
187   - initXl();
188 187 }
189   - $("#fgsdm").on("change",initXl);
190   - function initXl(){
191   - var data=[];
  188 +
  189 +
  190 + var tempData = {};
  191 + $.get('/report/lineList',function(xlList){
  192 + var data = [];
192 193 data.push({id: " ", text: "全部线路"});
193   - if(fage){
194   - $("#line").select2("destroy").html('');
195   - }
196   - var fgs=$('#fgsdm').val();
197   - var gs=$('#gsdm').val();
198   - for(var i=0;i<xlList.length;i++){
199   - if(gs!=""){
200   - if(fgs!=""){
201   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
202   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
203   - }
204   - }else{
205   - if(xlList[i]["gsbm"]==gs){
206   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  194 + $.get('/user/companyData', function(result){
  195 + for(var i = 0; i < result.length; i++){
  196 + var companyCode = result[i].companyCode;
  197 + var children = result[i].children;
  198 + for(var j = 0; j < children.length; j++){
  199 + var code = children[j].code;
  200 + for(var k=0;k < xlList.length;k++ ){
  201 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  202 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  203 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  204 + }
207 205 }
208 206 }
209 207 }
  208 + initPinYinSelect2('#line',data,'');
  209 +
  210 + });
  211 + });
  212 +
  213 + $("#line").on("change", function(){
  214 + if($("#line").val() == " "){
  215 + $("#gsdm").attr("disabled", false);
  216 + $("#fgsdm").attr("disabled", false);
  217 + } else {
  218 + var temp = tempData[$("#line").val()].split(":");
  219 + $("#gsdm").val(temp[0]);
  220 + updateCompany();
  221 + $("#fgsdm").val(temp[1]);
  222 + $("#gsdm").attr("disabled", true);
  223 + $("#fgsdm").attr("disabled", true);
210 224 }
211   - initPinYinSelect2('#line',data,'');
212   - fage=true;
213   - }
  225 + });
  226 +
214 227 var line ="";
215 228 var xlName ="";
216 229 var date = "";
... ... @@ -293,8 +306,8 @@
293 306 <td>{{obj.jhnjcclc}}</td>
294 307 <td>{{obj.jhwjcclc}}</td>
295 308 <td>{{obj.zrwjcclc}}</td>
296   - <td>0</td>
297   - <td>0</td>
  309 + <td>{{obj.zrwjcclc1}}</td>
  310 + <td>{{obj.zrwjcclc2}}</td>
298 311 <td>{{obj.lbss}}</td>
299 312 <td>{{obj.ssgl_lz}}</td>
300 313 <td>{{obj.ssgl_dm}}</td>
... ...
src/main/resources/static/pages/report/inoutstation.html
... ... @@ -238,37 +238,47 @@
238 238 }
239 239 }
240 240 $('#fgsdm').html(options);
241   - initXl();
242 241 initCl();
243 242 }
244 243  
245 244  
246 245  
247 246  
248   - $("#fgsdm").on("change",initXl);
249   - function initXl(){
250   - var data=[];
251   - if(fage){
252   - $("#line").select2("destroy").html('');
253   - }
254   - var fgs=$('#fgsdm').val();
255   - var gs=$('#gsdm').val();
256   - for(var i=0;i<xlList.length;i++){
257   - if(gs!=""){
258   - if(fgs!=""){
259   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
260   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
261   - }
262   - }else{
263   - if(xlList[i]["gsbm"]==gs){
264   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  247 + var tempData = {};
  248 + $.get('/report/lineList',function(xlList){
  249 + var data = [];
  250 + $.get('/user/companyData', function(result){
  251 + for(var i = 0; i < result.length; i++){
  252 + var companyCode = result[i].companyCode;
  253 + var children = result[i].children;
  254 + for(var j = 0; j < children.length; j++){
  255 + var code = children[j].code;
  256 + for(var k=0;k < xlList.length;k++ ){
  257 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  258 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  259 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  260 + }
265 261 }
266 262 }
267 263 }
  264 + initPinYinSelect2('#line',data,'');
  265 +
  266 + });
  267 + });
  268 +
  269 + $("#line").on("change", function(){
  270 + if($("#line").val() == " "){
  271 + $("#gsdm").attr("disabled", false);
  272 + $("#fgsdm").attr("disabled", false);
  273 + } else {
  274 + var temp = tempData[$("#line").val()].split(":");
  275 + $("#gsdm").val(temp[0]);
  276 + updateCompany();
  277 + $("#fgsdm").val(temp[1]);
  278 + $("#gsdm").attr("disabled", true);
  279 + $("#fgsdm").attr("disabled", true);
268 280 }
269   - initPinYinSelect2('#line',data,'');
270   - fage=true;
271   - }
  281 + });
272 282  
273 283  
274 284 $("#query").on("click",function(){
... ...
src/main/resources/static/pages/report/message/message.html
... ... @@ -120,16 +120,25 @@
120 120 day = "0" + day;
121 121 $("#date").val(year + "-" + month + "-" + day);
122 122  
123   - $.get('/basic/lineCode2Name',function(result){
124   - var data=[];
125   -
126   - for(var code in result){
127   - data.push({id: code, text: result[code]});
128   - }
129   - console.log(data);
130   - initPinYinSelect2('#line',data,'');
131   -
132   - })
  123 + $.get('/report/lineList',function(xlList){
  124 + var data = [];
  125 + $.get('/user/companyData', function(result){
  126 + for(var i = 0; i < result.length; i++){
  127 + var companyCode = result[i].companyCode;
  128 + var children = result[i].children;
  129 + for(var j = 0; j < children.length; j++){
  130 + var code = children[j].code;
  131 + for(var k=0;k < xlList.length;k++ ){
  132 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  133 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  134 + }
  135 + }
  136 + }
  137 + }
  138 + initPinYinSelect2('#line',data,'');
  139 +
  140 + });
  141 + });
133 142 $('#code').select2({
134 143 ajax: {
135 144 url: '/realSchedule/sreachVehic',
... ...
src/main/resources/static/pages/report/oil/oilListMonth.html
... ... @@ -105,16 +105,28 @@
105 105 $("#date").val(year + "-0" + month + "-" + day);
106 106 }
107 107  
108   - $.get('/basic/lineCode2Name',function(result){
109   - var data=[];
110   -
111   - for(var code in result){
112   - data.push({id: code, text: result[code]});
113   - }
114   - console.log(data);
115   - initPinYinSelect2('#line',data,'');
116   -
117   - })
  108 + var tempData = {};
  109 + $.get('/report/lineList',function(xlList){
  110 + var data = [];
  111 + $.get('/user/companyData', function(result){
  112 + for(var i = 0; i < result.length; i++){
  113 + var companyCode = result[i].companyCode;
  114 + var children = result[i].children;
  115 + for(var j = 0; j < children.length; j++){
  116 + var code = children[j].code;
  117 + for(var k=0;k < xlList.length;k++ ){
  118 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  119 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  120 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  121 + }
  122 + }
  123 + }
  124 + }
  125 + initPinYinSelect2('#line',data,'');
  126 +
  127 + });
  128 + });
  129 +
118 130  
119 131 //查询
120 132 $("#query").on('click',function(){
... ...
src/main/resources/static/pages/report/sheet/sheetList.html
... ... @@ -170,37 +170,47 @@
170 170 }
171 171 }
172 172 $('#fgsdm').html(options);
173   - initXl();
174   - }
175   -
176   -
177   -
178   -
179   - $("#fgsdm").on("change",initXl);
180   - function initXl(){
181   - var data=[];
182   - if(fage){
183   - $("#line").select2("destroy").html('');
184   - }
185   - data.push({id: " ", text: "请选择"});
186   - var fgs=$('#fgsdm').val();
187   - var gs=$('#gsdm').val();
188   - for(var i=0;i<xlList.length;i++){
189   - if(gs!=""){
190   - if(fgs!=""){
191   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
192   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
193   - }
194   - }else{
195   - if(xlList[i]["gsbm"]==gs){
196   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  173 +
  174 + var tempData = {};
  175 + $.get('/report/lineList',function(xlList){
  176 + var data = [];
  177 + data.push({id: " ", text: "全部线路"});
  178 + $.get('/user/companyData', function(result){
  179 + for(var i = 0; i < result.length; i++){
  180 + var companyCode = result[i].companyCode;
  181 + var children = result[i].children;
  182 + for(var j = 0; j < children.length; j++){
  183 + var code = children[j].code;
  184 + for(var k=0;k < xlList.length;k++ ){
  185 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  186 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  187 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  188 + }
  189 + }
197 190 }
198 191 }
  192 + initPinYinSelect2('#line',data,'');
  193 +
  194 + });
  195 + });
  196 +
  197 + $("#line").on("change", function(){
  198 + if($("#line").val() == " "){
  199 + $("#gsdm").attr("disabled", false);
  200 + $("#fgsdm").attr("disabled", false);
  201 + } else {
  202 + var temp = tempData[$("#line").val()].split(":");
  203 + $("#gsdm").val(temp[0]);
  204 + updateCompany();
  205 + $("#fgsdm").val(temp[1]);
  206 + $("#gsdm").attr("disabled", true);
  207 + $("#fgsdm").attr("disabled", true);
199 208 }
200   - }
201   - initPinYinSelect2('#line',data,'');
202   - fage=true;
  209 + });
203 210 }
  211 +
  212 +
  213 +
204 214 //查询
205 215 $("#query").on('click',function(){
206 216 var line = $("#line").val();
... ...
src/main/resources/static/pages/report/timetable/timetable.html
... ... @@ -237,36 +237,46 @@
237 237 }
238 238 }
239 239 $('#fgsdmTime').html(options);
240   - initXl();
241 240 }
242 241  
243   - $("#fgsdmTime").on("change",initXl);
244   - function initXl(){
245   - var data=[];
246   - if(fage){
247   - $("#line").select2("destroy").html('');
248   - }
249   - var fgs=$('#fgsdmTime').val();
250   - var gs=$('#gsdmTime').val();
251   - for(var i=0;i<xlList.length;i++){
252   - if(gs!=""){
253   - if(fgs!=""){
254   - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
255   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
256   - }
257   - }else{
258   - if(xlList[i]["gsbm"]==gs){
259   - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  242 +
  243 +
  244 + var tempData = {};
  245 + $.get('/report/lineList',function(xlList){
  246 + var data = [];
  247 + $.get('/user/companyData', function(result){
  248 + for(var i = 0; i < result.length; i++){
  249 + var companyCode = result[i].companyCode;
  250 + var children = result[i].children;
  251 + for(var j = 0; j < children.length; j++){
  252 + var code = children[j].code;
  253 + for(var k=0;k < xlList.length;k++ ){
  254 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  255 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  256 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  257 + }
260 258 }
261 259 }
262 260 }
  261 + initPinYinSelect2('#line',data,'');
  262 + line = data[0].id;
  263 + updateTtinfo();
  264 + });
  265 + });
  266 +
  267 + $("#line").on("change", function(){
  268 + if($("#line").val() == " "){
  269 + $("#gsdmTime").attr("disabled", false);
  270 + $("#fgsdmTime").attr("disabled", false);
  271 + } else {
  272 + var temp = tempData[$("#line").val()].split(":");
  273 + $("#gsdmTime").val(temp[0]);
  274 + updateCompany();
  275 + $("#fgsdmTime").val(temp[1]);
  276 + $("#gsdmTime").attr("disabled", true);
  277 + $("#fgsdmTime").attr("disabled", true);
263 278 }
264   - initPinYinSelect2('#line',data,'');
265   - fage=true;
266   -
267   - line = data[0].id;
268   - updateTtinfo();
269   - }
  279 + });
270 280  
271 281  
272 282 var flag = 0;
... ...
src/main/resources/static/pages/trafficManage/js/lineStationUpload.js
... ... @@ -13,124 +13,46 @@
13 13 */
14 14  
15 15 (function(){
16   - /**
17   - * 取得编码-公司map
18   - * gsmap["5"] = 南汇公司
19   - * gsmap["5_3"] = 芦潮港分公司
20   - */
21   - function getBusMap(){
22   - // 取得公司信息,替换公司编码
23   - var gsmap = {};
24   - $get('/business/all', null, function(array){
25   - $.each(array, function(i, gs){
26   - var k = gs.upCode + '_' + gs.businessCode;
27   - if(gs.upCode === '88'){
28   - k = gs.businessCode;
29   - }
30   - gsmap[k] = gs.businessName;
31   - });
32   - });
33   - return gsmap;
34   - }
35   - // 填充公司下拉框选择值
36   - $get('/business/all', {upCode_eq: '88'}, function(array){
37   -
38   - // 公司下拉options属性值
39   - var options = '<option value="">请选择...</option>';
40   -
41   - // 遍历array
42   - $.each(array, function(i,d){
43   -
44   - options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>';
45   -
46   - });
47   -
48   - // 填充公司下拉框options,并添加公司下拉框值改变事件setbrancheCompanySelectOptions
49   - $('#companySelect').html(options).on('change', setbrancheCompanySelectOptions);
50   -
51   - });
52   -
53   - // 填充分公司下拉框选择值
54   - function setbrancheCompanySelectOptions(){
55   -
56   - // 获取公司下拉框选择值
57   - var businessCode = $('#companySelect').val();
58   -
59   - // 分公司下拉框options属性值
60   - var options = '<option value="">请选择...</option>';
61   -
62   - // 如果公司选择为空则分公司为空 ; 否则查询出所属公司下的分公司名称和相应分公司代码
63   - if(businessCode == null || businessCode ==''){
64   -
65   - // 填充分公司下拉框options
66   - $('#brancheCompanySelect').html(options);
67   -
68   - } else {
69   -
70   - // 查询出所属公司下的分公司名称和相应分公司代码
71   - $get('/business/all', {upCode_eq: businessCode}, function(array){
72   -
73   - // 遍历array
74   - $.each(array, function(i,d){
75   -
76   - options += '<option value="'+d.businessCode+'">'+d.businessName+'</option>';
77   -
78   - // 填充分公司下拉框options
79   - $('#brancheCompanySelect').html(options);
80   -
81   - });
82   - });
83   -
84   - // 填充公司下拉框options,并添加公司下拉框值改变事件setbrancheCompanySelectOptions
85   - $('#brancheCompanySelect').html(options).on('change', setLineAutocompleteOptions);
86   - }
87   - }
88   -
89   - function setLineAutocompleteOptions(){
90   - // 搜索参数集合
91   - var params = {};
92   - // 搜索字段名称
93   - var name;
94   - var items = $("ul.breadcrumb select");
95   - // 遍历items集合
96   - for(var j = 0, item; item = items[j++];){
97   - // 获取字段名称
98   - name = $(item).attr('name');
99   - if(name){
100   - // 赋取相对应的值
101   - params[name] = $(item).val();
102   - }
103   - }
104   - var lines = new Array();
105   - var gsmap = getBusMap();
106   - // 取得所有线路
107   - $get('/line/all', params, function(allLine) {
108   - // 遍历数组
109   - $.each(allLine, function(i, e) {
110   - var companyCode = e.company;
111   - e.company = gsmap[e.company];
112   - e.brancheCompany = gsmap[companyCode+"_"+e.brancheCompany];
113   - var line = '{"hex":"'+e.company+'","label":"'+e.name+'"}';
114   - var obj = jQuery.parseJSON(line);
115   - lines[i]= obj;
116   - });
117   -
118   -
119   - });
120   - // 给输入框绑定autocomplete事件
121   - $("input[name='name_eq']").autocompleter({
122   - highlightMatches: true,
123   - source: lines,
124   - template: '{{ label }} <span>({{ hex }})</span>',
125   - hint: true,
126   - empty: false,
127   - limit: 5,
128   - });
129   - }
130   -
131   -
132   - // 设置autocompleter的宽度和输入框一样
133   - $(".autocompleter").css("width",$("input[name='name_eq']").css("width"))
  16 +
  17 + $('#line').select2({
  18 + ajax: {
  19 + url: '/realSchedule/findLine',
  20 + type: 'post',
  21 + dataType: 'json',
  22 + delay: 150,
  23 + data: function(params){
  24 + return{line: params.term};
  25 + },
  26 + processResults: function (data) {
  27 + return {
  28 + results: data
  29 + };
  30 + },
  31 + cache: true
  32 + },
  33 + templateResult: function(repo){
  34 + if (repo.loading) return repo.text;
  35 + var h = '<span>'+repo.text+'</span>';
  36 + return h;
  37 + },
  38 + escapeMarkup: function (markup) { return markup; },
  39 + minimumInputLength: 1,
  40 + templateSelection: function(repo){
  41 + return repo.text;
  42 + },
  43 + language: {
  44 + noResults: function(){
  45 + return '<span style="color:red;font-size: 12px;">没有搜索到线路!</span>';
  46 + },
  47 + inputTooShort : function(e) {
  48 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入线路搜索线路</span>';
  49 + },
  50 + searching : function() {
  51 + return '<span style="color:gray;font-size: 12px;"> 正在搜索线路...</span>';
  52 + }
  53 + }
  54 + });
  55 +
134 56 // 绑定查询事件
135 57 $("#search").click(searchM);
136 58 // 绑定上传事件
... ... @@ -149,7 +71,7 @@
149 71 $("#right_div table tbody").empty();
150 72 var params = {};
151 73 // 取得输入框的值
152   - var inputs = $("ul.breadcrumb input");
  74 + var inputs = $(".param input,select");
153 75 // 遍历数组
154 76 $.each(inputs, function(i, element) {
155 77 params[$(element).attr("name")] = $(element).val();
... ... @@ -168,17 +90,36 @@
168 90  
169 91 // 上传方法
170 92 function uploadM() {
171   - var params = {};
172   - // 取得输入框的值
173   - var trs = $("#right_div tbody tr");
174   - if (trs.length == 0) {
175   - alert("请选择模板");
176   - return;
177   - }
178   - // 遍历数组
179   - $.each(trs, function(i, element) {
180   - alert($(".ttInfoId", element).html());
181   - });
  93 + // 取得输入框的值
  94 + var trs = $("#right_div tbody tr input");
  95 + if (trs.length == 0) {
  96 + alert("请选择线路");
  97 + return;
  98 + }else if(trs.length > 1){
  99 + alert("一次只能上传一条线路");
  100 + return;
  101 + }
  102 + var ids ="0,";
  103 + // 遍历数组
  104 + $.each(trs, function(i, element) {
  105 + ids +=$(element).val()+",";
  106 + });
  107 + var params = {"ids":ids};
  108 + $.ajax({
  109 + type: 'get',url: '/trmg/setXL',
  110 + data: params ,dataType:'text',
  111 + success:function(data) {
  112 + if(data == 'success'){
  113 + alert("上传成功");
  114 + }else{
  115 + alert("上传失败");
  116 + }
  117 +
  118 + }, error : function() {
  119 + alert("操作失败");
  120 + }
  121 +
  122 + });
182 123 }
183 124  
184 125 // 表格行的单击事件
... ...
src/main/resources/static/pages/trafficManage/js/timeTempletUpload.js
... ... @@ -183,29 +183,6 @@
183 183 }
184 184  
185 185 // 绑定查询事件
186   - $("#setXL").click(setXLF);
187   -
188   - function setXLF() {
189   - var params = {};
190   - // 取得输入框的值
191   - var inputs = $(".param input,select");debugger;
192   - // 遍历数组
193   - $.each(inputs, function(i, element) {
194   - params[$(element).attr("name")] = $(element).val();
195   - });
196   - $.ajax({
197   - type: 'get',url: '/trmg/setXL',
198   - data: params ,dataType:'text',
199   - success:function(data) {
200   - alert(data);
201   - }, error : function() {
202   - alert("操作失败");
203   - }
204   -
205   - });
206   - }
207   -
208   - // 绑定查询事件
209 186 $("#setCL").click(setCLF);
210 187 var params = {};
211 188 function setCLF() {
... ...
src/main/resources/static/pages/trafficManage/lineStationUpload.html
1 1 <link href="css/trafficManage.css" rel="stylesheet" type="text/css" />
2   -<link href="css/autocompleter.css" rel="stylesheet" type="text/css" />
3 2 <ul class="page-breadcrumb breadcrumb">
4 3 <li><a href="/pages/home.html" data-pjax>首页</a> <i class="fa fa-circle"></i></li>
5 4 <li><span class="active">运维管理</span> <i class="fa fa-circle"></i></li>
... ... @@ -7,17 +6,16 @@
7 6 </ul>
8 7 <div class="tab_line">
9 8 <div class="col-md-12">
10   - <ul class="breadcrumb">
11   - <li>公司:</li>
12   - <li><select name="company_eq" class="form-control" id="companySelect"></select></li>
13   - <li>分公司:</li>
14   - <li><select name="brancheCompany_eq" class="form-control" id="brancheCompanySelect"></select></li>
15   - <li>线路名称:</li>
16   - <li><input type="text" class="form-control form-filter input-sm"
17   - name="name_eq" placeholder="请输入线路名称" maxlength="40" /></li>
18   - <li><a class="btn btn-circle blue" id="search">查询</a></li>
19   - <li><a class="btn btn-circle red" id="upload">上传</a></li>
20   - </ul>
  9 + <form class="form-inline" action="">
  10 + <div style="display: inline-block;" class="param">
  11 + <span class="item-label" style="width: 80px;">线路名称: </span>
  12 + <select class="form-control" name="lineCode_like" id="line" style="width: 180px;"></select>
  13 + </div>
  14 + <div class="form-group" style="display: inline-block;margin-left: 15px;">
  15 + <input class="btn btn-default" type="button" id="search" value="查询"/>
  16 + <input class="btn btn-default" type="button" id="upload" value="上传"/>
  17 + </div>
  18 + </form>
21 19 </div>
22 20 <!-- Begin: left-div -->
23 21 <div class="col-md-5 panel-wrap" style="height: 60%;">
... ... @@ -63,6 +61,7 @@
63 61 </td>
64 62 <td>
65 63 {{obj.lineCode}}
  64 + <input type="hidden" value="{{obj.lineCode}}"/>
66 65 </td>
67 66 <td class="ttInfoId">
68 67 {{obj.name}}
... ...
src/main/resources/static/real_control_v2/css/main.css
... ... @@ -1341,25 +1341,6 @@ ul.left_tabs_lg li{
1341 1341 margin-bottom: 0;
1342 1342 }
1343 1343  
1344   -.sub_task_form_v2.repeat_main:before{
1345   - content: '复';
1346   - position: absolute;
1347   - top: -10px;
1348   - font-size: 12px;
1349   - color: #2196F3;
1350   - background: #ffffff;
1351   - padding: 0 3px;
1352   - font-weight: 600;
1353   -}
1354   -
1355   -.sub_task_form_v2.repeat_main.destroy_form:before{
1356   - color: #F44336;
1357   -}
1358   -
1359   -.sub_task_form_v2.repeat_main{
1360   - background: #f4faff;
1361   -}
1362   -
1363 1344 .sub_task_form_v2.destroy_form{
1364 1345 background-color: #fff5f4 !important;
1365 1346 }
... ... @@ -1434,4 +1415,161 @@ ul.left_tabs_lg li{
1434 1415 font-size: 16px;
1435 1416 color: #a44a4a;
1436 1417 font-family: 微软雅黑;
  1418 +}
  1419 +
  1420 +#schedule-lp_change-modal .ct_table dl{
  1421 + height: 35px;
  1422 +}
  1423 +
  1424 +#schedule-lp_change-modal .ct_table dl dd, #schedule-lp_change-modal .ct_table dl dt{
  1425 + line-height: 35px;
  1426 +}
  1427 +
  1428 +/*
  1429 +.sub_task_form_v2.repeat_main:before{
  1430 + content: '复';
  1431 + position: absolute;
  1432 + top: -10px;
  1433 + font-size: 12px;
  1434 + color: #2196F3;
  1435 + background: #ffffff;
  1436 + padding: 0 3px;
  1437 + font-weight: 600;
  1438 +}*/
  1439 +
  1440 +.sub_task_form_v2:before{
  1441 + position: absolute;
  1442 + top: -7px;
  1443 + font-size: 12px;
  1444 + padding: 0 3px;
  1445 + font-weight: 600;
  1446 + line-height: 14px;
  1447 +}
  1448 +
  1449 +.sub_task_form_v2.destroy_form:before{
  1450 + content: '烂班' !important;
  1451 + color: #f14235 !important;
  1452 + background: #ffffff !important;
  1453 +}
  1454 +
  1455 +.sub_task_form_v2.service_form:before{
  1456 + content: '营运';
  1457 + color: #2196F3;
  1458 + background: #ffffff;
  1459 +}
  1460 +
  1461 +.sub_task_form_v2.empty_form:before{
  1462 + content: '空驶';
  1463 + color: #928f92;
  1464 + background: #ffffff;
  1465 +}
  1466 +
  1467 +.sub_task_form_v2.service_form{
  1468 + background: #f4faff;
  1469 +}
  1470 +
  1471 +/*.sub_task_form_v2.repeat_main.destroy_form:before{
  1472 + color: #F44336;
  1473 +}
  1474 +
  1475 +.sub_task_form_v2.repeat_main{
  1476 + background: #f4faff;
  1477 +}*/
  1478 +.footer_tools{
  1479 + position: absolute;
  1480 + left: 235px;
  1481 + bottom: 19px;
  1482 +}
  1483 +
  1484 +.footer_mileage_count{
  1485 + border: 1px solid #f2f2f2;
  1486 + padding: 5px;
  1487 + box-shadow: 0px 2px 5px 0 rgba(0, 0, 0, 0.2), 0px 2px 7px 0 rgba(0, 0, 0, 0.19);
  1488 + display: inline-block;
  1489 +}
  1490 +
  1491 +.footer_mileage_count>span{
  1492 + padding: 2px 5px;
  1493 +}
  1494 +
  1495 +.footer_mileage_count>span.service_sum{
  1496 + color: #2196F3;
  1497 +}
  1498 +
  1499 +.footer_mileage_count>span.empty_sum{
  1500 + color: #636363;
  1501 +}
  1502 +
  1503 +.footer_mileage_count>span.destroy_sum{
  1504 + color: #f5574b;
  1505 +}
  1506 +
  1507 +.station_to_park_link{
  1508 + display: inline-block;
  1509 + margin-left: 15px;
  1510 + vertical-align: bottom;
  1511 + font-size: 12px;
  1512 +}
  1513 +
  1514 +.station_to_park_link>a{
  1515 + color: #607D8B;
  1516 +}
  1517 +
  1518 +#station_to_park-modal.ct-form-modal form input[type=text],
  1519 +#station_to_park-modal.ct-form-modal form select{
  1520 + width: auto;
  1521 +}
  1522 +
  1523 +.s_2_park_form_wrap{
  1524 + background: #fafafa;
  1525 + border: 1px solid #e5e5e5;
  1526 + padding: 7px 16px;
  1527 + margin: 15px 0;
  1528 + position: relative;
  1529 +}
  1530 +
  1531 +.s_2_park_form_wrap .ct_close{
  1532 + position: absolute;
  1533 + top: -12px;
  1534 + padding: 0 4px;
  1535 + right: -8px;
  1536 + color: #939393;
  1537 + border: 1px solid #f7dfdf;
  1538 + border-radius: 25px;
  1539 + cursor: pointer;
  1540 +}
  1541 +
  1542 +.s_2_park_form_wrap .ct_close:hover{
  1543 + background: #e5e5e5;
  1544 + color: #fd6e6e;
  1545 +}
  1546 +
  1547 +.s_2_park_form_wrap label{
  1548 + color: #666;
  1549 + font-size: 13px;
  1550 +}
  1551 +
  1552 +#station_to_park-modal.ct-form-modal form input[readonly]{
  1553 + background: #fafafa;
  1554 +}
  1555 +
  1556 +.s_2_park_form_wrap .bottom_label{
  1557 + margin-top: 25px;
  1558 + display: block;
  1559 +}
  1560 +
  1561 +.s_2_park_form_wrap .bottom_label_2{
  1562 + margin-top: 4px;
  1563 + display: block;
  1564 +}
  1565 +
  1566 +.ct_describe{
  1567 + font-size: 12px;
  1568 + color: #909090;
  1569 + font-family: FontAwesome;
  1570 +}
  1571 +
  1572 +.ct_describe:before{
  1573 + content: "\f059";
  1574 + margin-right: 3px;
1437 1575 }
1438 1576 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/css/north.css
... ... @@ -481,4 +481,13 @@
481 481 .ct-badge.ct-badge-TZRC:hover{
482 482 background: #97a50f;
483 483 color: #fff;
  484 +}
  485 +
  486 +.ct-badge.ct-badge-LSBCTZ {
  487 + color: red;
  488 +}
  489 +
  490 +.ct-badge.ct-badge-LSBCTZ:hover{
  491 + background: red;
  492 + color: #fff;
484 493 }
485 494 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lp_change.html
1   -<div class="uk-modal ct_move_modal" id="schedule-lp_change-modal">
  1 +<div class="uk-modal" id="schedule-lp_change-modal">
2 2 <div class="uk-modal-dialog" style="width: 1240px;">
3 3 <a href="" class="uk-modal-close uk-close"></a>
4 4 <div class="uk-modal-header">
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_custom.html
... ... @@ -88,6 +88,7 @@
88 88 gb_schedule_table.updateSchedule(rst);
89 89 UIkit.modal('#add-sub-task-main-modal').hide();
90 90 $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: sch});
  91 + gb_data_basic.reload_stat_park_data();
91 92 return;
92 93 }
93 94 var data = dataArray[i];
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_in_out.html
... ... @@ -40,10 +40,20 @@
40 40 repeat_In(inf);
41 41 //出场子任务
42 42 repeat_Out(outf);
  43 +
  44 + //进场终点改变事件
  45 + $f('endStation', inf).on('change', function () {
  46 + $f('startStation',outf).val($(this).val()).trigger('change');
  47 + });
  48 +
43 49 }, 500);
44 50  
45   - //营运终点和进场起点改变事件
  51 + //营运终点改变事件
46 52 $f('endStation', sf).on('change', changeServiceEnd);
  53 + //进场公里改变
  54 + $f('mileage',inf).on('input', function () {
  55 + $f('mileage',outf).val($(this).val());
  56 + });
47 57 //$f('startStation', inf).on('change', changeServiceEnd);
48 58 });
49 59  
... ... @@ -88,7 +98,7 @@
88 98 f.addClass('destroy_form');
89 99 }
90 100 else if (sch.status == 2) {
91   - $f('destroy', f).parents('label').hide();
  101 + $f('destroy', f).parents('label').remove();
92 102 $f('endDate', f).val(sch.zdsjActual);
93 103 $('input,select', f).attr('disabled', 'disabled');
94 104 }
... ... @@ -137,11 +147,14 @@
137 147 }
138 148 if(eCode==sch.qdzCode || eCode==sch.zdzCode){
139 149 $f('startStation',inf).val(eCode).trigger('change');
  150 + $f('type2',outf).trigger('change');
140 151 return;
141 152 }
142 153  
143 154 //进场起点
144   - $f('startStation',inf).val(eCode);
  155 + $f('startStation',inf).val(eCode);//.trigger('change');
  156 + //终点trigger change 出发重计算
  157 + $f('endStation',inf).trigger('change');
145 158  
146 159 //中途进场
147 160 showHalfPanel(eCode);
... ... @@ -212,7 +225,7 @@
212 225 var htmlStr = template('st-v2-domains-changecar-form-temp', {inOutExps: gb_common.inOutExps});
213 226 $('.domains', half_form).html(htmlStr);
214 227 $('.domains', outf).html(htmlStr);
215   - half_form.css('z-index', 99).trigger('add_reason_field');
  228 + half_form.css('z-index', 99).formValidation('addField', 'reason').formValidation('addField', 'nbbm');
216 229 outf.trigger('add_reason_field');
217 230  
218 231 //车辆 autocomplete
... ... @@ -221,13 +234,15 @@
221 234  
222 235 //同步车辆编码
223 236 $f('nbbm', half_form).on('input change', function () {
224   - $f('nbbm', outf).val($(this).val());
  237 + $f('nbbm', outf).val($(this).val());
225 238 });
226 239  
227 240 half_form.removeClass('destroy_form');
228 241  
229 242 //出场终点
230 243 $f('endStation',outf).val($f('endStation',sf).val());
  244 + //出发合计公里重新计算
  245 + $f('mileage', half_form).trigger('input');
231 246 }
232 247  
233 248 function disabledChangeCar() {
... ... @@ -261,6 +276,7 @@
261 276 gb_schedule_table.updateSchedule(rst);
262 277 UIkit.modal('#add-sub-task-main-modal').hide();
263 278 $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: sch});
  279 + gb_data_basic.reload_stat_park_data();
264 280 return;
265 281 }
266 282 var data = dataArray[i];
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_range_turn.html
... ... @@ -127,6 +127,14 @@
127 127 */
128 128 function changeTurnStation() {
129 129 f1.nextAll('.sub_task_form_v2').remove();
  130 + //掉头站点编码
  131 + var eCode = $('#turnStationSelect', topf).val();
  132 + if(!eCode){
  133 + //$('.footer_mileage_count', '#add-sub-task-main-modal').trigger('refresh');
  134 + $f('endStation', f1).val(sch.zdzCode).trigger('change');
  135 + $('#emptyTurnCbox input')[0].checked=false;
  136 + return;
  137 + }
130 138  
131 139 //烂班1
132 140 df1 = destroyForm(disabled_form(addTaskForm()));
... ... @@ -135,8 +143,7 @@
135 143 //营运2
136 144 f2 = disabled_form(addTaskForm());
137 145 $('.domains', f2).empty();
138   - //掉头站点编码
139   - var eCode = $('#turnStationSelect', topf).val();
  146 +
140 147  
141 148 //营运1终点
142 149 $f('endStation', f1).val(eCode).trigger('change');
... ... @@ -155,7 +162,7 @@
155 162 $('[sch_id_inp]', f2).val(nextSch.id);
156 163  
157 164 //set css
158   - setCss();
  165 + //setCss();
159 166 //reason
160 167 changeTurnReason();
161 168 }
... ... @@ -180,17 +187,17 @@
180 187 return f;
181 188 }
182 189  
183   - function setCss() {
184   - $('.sub_task_form_v2', wrap).each(function () {
185   - if($(this).hasClass('destroy_form'))
186   - return true;
  190 + /*function setCss() {
  191 + $('.sub_task_form_v2', wrap).each(function () {
  192 + if($(this).hasClass('destroy_form'))
  193 + return true;
187 194  
188   - if($f('mileageType', this).val()=='service')
189   - $(this).addClass('service_st_form');
190   - else
191   - $(this).removeClass('service_st_form');
192   - });
193   - }
  195 + if($f('mileageType', this).val()=='service')
  196 + $(this).addClass('service_st_form');
  197 + else
  198 + $(this).removeClass('service_st_form');
  199 + });
  200 + }*/
194 201  
195 202 /**
196 203 * 空驶调头
... ... @@ -209,12 +216,14 @@
209 216 $f('startDate', df2).val(nextSch.dfsj);
210 217 $f('endDate', df2).val(nextSch.zdsj);
211 218 //营运2 变空驶
212   - f2.removeClass('service_st_form');
213   - $f('mileageType',f2).val('empty');
  219 + //f2.removeClass('service_st_form');
  220 + $f('mileageType',f2).val('empty').trigger('change');
214 221 }
215 222 else{
216 223 changeTurnStation();
217 224 }
  225 +
  226 + //$f('mileage', df2).trigger('input');
218 227 }
219 228  
220 229 //提交
... ... @@ -245,6 +254,7 @@
245 254 //gb_schedule_table.addRemarks([sch, nextSch], gb_common.trim(remarks, 'g'));
246 255 UIkit.modal('#add-sub-task-main-modal').hide();
247 256 $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: sch});
  257 + gb_data_basic.reload_stat_park_data();
248 258 return;
249 259 }
250 260 var data = dataArray[i];
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/main.html
... ... @@ -20,6 +20,20 @@
20 20 </ul>
21 21 </div>
22 22 </div>
  23 +
  24 + <div class="footer_tools">
  25 + <!-- 底部公里统计栏 -->
  26 + <div class="footer_mileage_count">
  27 + 合计&nbsp;&nbsp;
  28 + <span class="service_sum"></span>
  29 + <span class="destroy_sum"></span>
  30 + <span class="empty_sum"></span>
  31 + </div>
  32 + <!-- 站到场 链接 -->
  33 + <div class="station_to_park_link">
  34 + <a>站 <i class="uk-icon-exchange"></i> 场</a>
  35 + </div>
  36 + </div>
23 37 </div>
24 38  
25 39 <script id="sub-task-v2-form-temp" type="text/html">
... ... @@ -108,7 +122,7 @@
108 122 <label class="uk-form-label">车辆编码</label>
109 123 <div class="uk-form-controls">
110 124 <div class="uk-autocomplete autocomplete-cars">
111   - <input type="text" name="nbbm" placeholder="车辆自编号">
  125 + <input type="text" name="nbbm" placeholder="车辆自编号" required>
112 126 </div>
113 127 </div>
114 128 </div>
... ... @@ -189,12 +203,15 @@
189 203 var modal = '#add-sub-task-main-modal', sch,
190 204 stationRoutes,
191 205 parks,
192   - information;
  206 + information,
  207 + st_park_data;
193 208  
194 209 $(modal).on('init', function (e, data) {
195 210 e.stopPropagation();
196 211 sch = data.sch;
197 212  
  213 + //站到场数据
  214 + st_park_data = gb_data_basic.get_stat_park_data()[sch.xlBm];
198 215 //站点路由
199 216 stationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(sch.xlBm).sort(function (a, b) {
200 217 return a.stationRouteCode - b.stationRouteCode;
... ... @@ -230,15 +247,50 @@
230 247 $(modal).on('change', 'input[name=destroy]', destroyClick);
231 248 //起终点站切换事件
232 249 $(modal).on('change', 'select[name=startStation],select[name=endStation]', reCalcInputs_station);
233   - //开始时间和公里数改变
234   - $(modal).on('input', 'input[name=startDate], input[name=mileage]', reCalcEndTime);
  250 + //开始时间改变
  251 + $(modal).on('input', 'input[name=startDate]', reCalcEndTime);
  252 + //公里数改变
  253 + $(modal).on('input', 'input[name=mileage]', reCalcMileageCount);
235 254 //终点时间改变
236 255 $(modal).on('input', 'input[name=endDate]', reCalcNext_s_time);
237 256 //进出场原因切换
238 257 $(modal).on('change', 'select[name=reason]', reSynchroReason);
  258 + //里程类型改变
  259 + $(modal).on('change', 'select[name=mileageType]', changeMileageType);
239 260 //关闭
240 261 $(modal).on('click', '.task_form_close_icon', closeTaskForm);
241 262  
  263 + //公里合计footer
  264 + var re_count;
  265 + $('.footer_mileage_count', modal).on('refresh', function () {
  266 + if(re_count)
  267 + return;
  268 + re_count = true;
  269 + var that=this;
  270 + setTimeout(function () {
  271 + var fs = $('#tempScheduleContent li.uk-active form.sub_task_form_v2', modal);
  272 + var s=0,e=0,d=0,mileage;
  273 + $.each(fs, function () {
  274 + mileage = parseFloat($f('mileage',this).val());
  275 + if($(this).hasClass('destroy_form'))
  276 + d = gb_common.accAdd(d, mileage);
  277 + else if($(this).hasClass('service_form'))
  278 + s = gb_common.accAdd(s, mileage);
  279 + else if($(this).hasClass('empty_form'))
  280 + e = gb_common.accAdd(e, mileage);
  281 + });
  282 +
  283 + $('span',that).hide();
  284 + if(s>0)
  285 + $('span.service_sum',that).html('营运: ' + s).show();
  286 + if(e>0)
  287 + $('span.empty_sum',that).html('空驶: ' + e).show();
  288 + if(d>0)
  289 + $('span.destroy_sum',that).html('烂班: ' + d).show();
  290 + re_count=false;
  291 + }, 200);
  292 + });
  293 +
242 294 /**
243 295 * 根据班次类型切换起终点下拉框
244 296 */
... ... @@ -261,28 +313,28 @@
261 313 switch ($(this).val()) {
262 314 case '3'://出场
263 315 qdz.html(park_opts).val(information.carPark);
264   - zdz.html(opts);
265   - mType.val('empty').attr('disabled', 'disabled');
  316 + zdz.html(opts).trigger('change');
  317 + mType.val('empty').attr('disabled', 'disabled').trigger('change');
266 318 domainsTemp = 'st-v2-domains-inout-form-temp';
267   - //如果上一个form是进场
268   - try {
269   - var prev_f = f.prev('.sub_task_form_v2');
270   - if ($f('type2', prev_f).val() == 2)
271   - zdz.val($f('startStation', prev_f).val());
272   - } catch (e) {
273   - console.log(e);
274   - }
  319 + /*//如果上一个form是进场
  320 + try {
  321 + var prev_f = f.prev('.sub_task_form_v2');
  322 + if ($f('type2', prev_f).val() == 2)
  323 + zdz.val($f('startStation', prev_f).val());
  324 + } catch (e) {
  325 + console.log(e);
  326 + }*/
275 327 break;
276 328 case '2'://进场
277 329 qdz.html(opts)
278   - zdz.html(park_opts).val(information.carPark);
279   - mType.val('empty').attr('disabled', 'disabled');
  330 + zdz.html(park_opts).val(information.carPark).trigger('change');
  331 + mType.val('empty').attr('disabled', 'disabled').trigger('change');
280 332 domainsTemp = 'st-v2-domains-inout-form-temp';
281 333 break;
282 334 default:
283 335 qdz.html(opts);
284   - zdz.html(opts).val(lastCode);
285   - mType.val('service').removeAttr('disabled');
  336 + zdz.html(opts).val(lastCode).trigger('change');
  337 + mType.val('service').removeAttr('disabled').trigger('change');
286 338 domainsTemp = 'st-v2-domains-service-form-temp';
287 339 }
288 340  
... ... @@ -319,27 +371,37 @@
319 371 upDown = sch.xlDir
320 372 }
321 373  
322   - switch (upDown + '_' + type2) {
323   - case '0_3'://上行出场
324   - mileage = information.upOutMileage;
325   - time = information.upOutTimer;
326   - break;
327   - case '1_3'://下行出场
328   - mileage = information.downOutMileage;
329   - time = information.downOutTimer;
330   - break;
331   - case '0_2'://上行进场
332   - mileage = information.upInMileage;
333   - time = information.upInTimer;
334   - break;
335   - case '1_2'://下行进场
336   - mileage = information.downInMileage;
337   - time = information.downInTimer;
338   - break;
339   - default:
340   - //线路上站点间
341   - mileage = calcMileageByRoutes(stationRoutes[upDown], qdzCode, zdzCode);
342   - time = gb_common.mul(gb_common.accDiv(sch.bcsj, sch.jhlcOrig), mileage);
  374 + //从站到场里获取数据
  375 + var stp = search_st_park(f);
  376 + if(stp){
  377 + mileage=type2==2?stp['mileage1']:stp['mileage2'];
  378 + time=type2==2?stp['time1']:stp['time2'];
  379 + }
  380 + else{
  381 + if(upDown==-1)
  382 + return;
  383 + switch (upDown + '_' + type2) {
  384 + case '0_3'://上行出场
  385 + mileage = information.upOutMileage;
  386 + time = information.upOutTimer;
  387 + break;
  388 + case '1_3'://下行出场
  389 + mileage = information.downOutMileage;
  390 + time = information.downOutTimer;
  391 + break;
  392 + case '0_2'://上行进场
  393 + mileage = information.upInMileage;
  394 + time = information.upInTimer;
  395 + break;
  396 + case '1_2'://下行进场
  397 + mileage = information.downInMileage;
  398 + time = information.downInTimer;
  399 + break;
  400 + default:
  401 + //线路上站点间
  402 + mileage = calcMileageByRoutes(stationRoutes[upDown], qdzCode, zdzCode);
  403 + time = gb_common.mul(gb_common.accDiv(sch.bcsj, sch.jhlcOrig), mileage);
  404 + }
343 405 }
344 406  
345 407 $f('mileage', f).val(mileage);
... ... @@ -349,6 +411,7 @@
349 411 if (type2 != 1) {
350 412 reCalcEndTime.call(this);
351 413 }
  414 + reCalcMileageCount();
352 415 }
353 416  
354 417 /**
... ... @@ -363,26 +426,34 @@
363 426 return;
364 427  
365 428 var time;
366   - if (type2 == 1) {
367   - time = gb_common.mul(gb_common.accDiv(sch.bcsj, sch.jhlcOrig), mileage);
368   - }
369   - else if (type2 == 2) {
370   - //进场
371   - var qdzCode = $f('startStation', f).val(),
372   - updown = inout_updown(qdzCode, sch);
373   -
374   - if (updown == -1)
375   - return;
376   - time = updown == 0 ? information.upInTimer : information.downInTimer;
  429 + //从站到场里获取数据
  430 + var stp = search_st_park(f);
  431 + if(stp){
  432 + mileage=type2==2?stp['mileage1']:stp['mileage2'];
  433 + time=type2==2?stp['time1']:stp['time2'];
377 434 }
378   - else if (type2 == 3) {
379   - //出场
380   - var zdzCode = $f('endStation', f).val(),
381   - updown = inout_updown(zdzCode, sch);
382   -
383   - if (updown == -1)
384   - return;
385   - time = updown == 0 ? information.upOutTimer : information.downOutTimer;
  435 + else{
  436 + if (type2 == 1) {
  437 + time = gb_common.mul(gb_common.accDiv(sch.bcsj, sch.jhlcOrig), mileage);
  438 + }
  439 + else if (type2 == 2) {
  440 + //进场
  441 + var qdzCode = $f('startStation', f).val(),
  442 + updown = inout_updown(qdzCode, sch);
  443 +
  444 + if (updown == -1)
  445 + return;
  446 + time = updown == 0 ? information.upInTimer : information.downInTimer;
  447 + }
  448 + else if (type2 == 3) {
  449 + //出场
  450 + var zdzCode = $f('endStation', f).val(),
  451 + updown = inout_updown(zdzCode, sch);
  452 +
  453 + if (updown == -1)
  454 + return;
  455 + time = updown == 0 ? information.upOutTimer : information.downOutTimer;
  456 + }
386 457 }
387 458  
388 459 var et = moment(startDate, 'HH:mm').add(time, 'minutes');
... ... @@ -456,6 +527,16 @@
456 527 $('.destroy_reason_wrap', f).hide();
457 528 f.removeAttr('destroy').removeClass('destroy_form');
458 529 }
  530 + reCalcMileageCount();
  531 + }
  532 +
  533 + function changeMileageType() {
  534 + var f = $(this).parents('.sub_task_form_v2'),
  535 + mileageType = $(this).val();
  536 + if (mileageType) {
  537 + f.removeClass('service_form empty_form').addClass(mileageType + '_form');
  538 + reCalcMileageCount();
  539 + }
459 540 }
460 541  
461 542 function $f(name, f) {
... ... @@ -464,6 +545,7 @@
464 545  
465 546 function closeTaskForm() {
466 547 $(this).parents('.sub_task_form_v2').remove();
  548 + reCalcMileageCount();
467 549 }
468 550  
469 551 /**
... ... @@ -480,6 +562,47 @@
480 562 return -1;
481 563 }
482 564  
  565 + function search_st_park(f) {
  566 + var stp;
  567 + var qdSelect=$f('startStation', f)[0],zdSelect=$f('endStation', f)[0];
  568 +
  569 + var qdzName=qdSelect.options[qdSelect.options.selectedIndex].text,
  570 + zdzName=zdSelect.options[zdSelect.options.selectedIndex].text,
  571 + type2 = $f('type2', f).val();
  572 +
  573 + if(type2!=2 && type2!=3)
  574 + return;
  575 +
  576 + $.each(st_park_data, function () {
  577 + if((type2==2 && this.stationName==qdzName && this.parkName==zdzName)
  578 + || (type2==3 && this.stationName==zdzName && this.parkName==qdzName)){
  579 + stp = this;
  580 + return false;
  581 + }
  582 + });
  583 +
  584 + return stp;
  585 + }
  586 +
  587 + $('.left_tabs_lg', modal).on('show.uk.switcher', reCalcMileageCount);
  588 +
  589 + function reCalcMileageCount() {
  590 + $('.footer_mileage_count', modal).trigger('refresh');
  591 + var f = $(this).parents('.sub_task_form_v2');
  592 + if($f('type2',f).val()==1)
  593 + reCalcEndTime.call(this);
  594 + }
  595 +
  596 +
  597 + var folder = '/real_control_v2/fragments/line_schedule/context_menu';
  598 + /**
  599 + * 弹出站 到 场对照表
  600 + */
  601 + $('.station_to_park_link', modal).on('click', function () {
  602 + open_modal(folder + '/utils/station_to_park.html', {
  603 + sch: sch
  604 + }, {center: false, bgclose: false, modal: false});
  605 + });
483 606 })();
484 607 </script>
485 608 </div>
486 609 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/tzrc.html
... ... @@ -54,8 +54,7 @@
54 54 </div>
55 55 <div class="uk-width-1-2">
56 56 <div class="uk-form-row">
57   - <label class="uk-form-label">驾驶员 <i class="uk-icon-question-circle" data-uk-tooltip
58   - title="如果有驾驶员未提示,请至后台“基础信息 -人员信息”里纠正该员工的“工种”类别 "></i></label>
  57 + <label class="uk-form-label">驾驶员 </label>
59 58 <div class="uk-form-controls">
60 59 <div class="uk-autocomplete uk-form jsy-autocom">
61 60 <input type="text" value="" name="jsy" required>
... ... @@ -192,7 +191,10 @@
192 191 //});
193 192  
194 193 //submit
195   - var f = $('form.tzrc_form', modal).formValidation(gb_form_validation_opts);
  194 + var f = $('form.tzrc_form', modal).formValidation({
  195 + framework: 'uikit',
  196 + locale: 'zh_CN'
  197 + });
196 198 f.on('success.form.fv', function (e) {
197 199 e.preventDefault();
198 200 var param = $(this).serializeJSON();
... ...