Commit cc2b5ea94c33a7bd2b0c2ed061bfe233fad8be79

Authored by 廖磊
2 parents 896f18b2 e38abc75

Merge branch 'minhang' of

http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing 25 changed files with 873 additions and 65 deletions
src/main/java/com/bsth/data/BasicData.java
@@ -31,7 +31,7 @@ public class BasicData implements CommandLineRunner { @@ -31,7 +31,7 @@ public class BasicData implements CommandLineRunner {
31 //公司代码和公司名对照(K: 公司编码,V:公司名) 31 //公司代码和公司名对照(K: 公司编码,V:公司名)
32 public static Map<String, String> businessCodeNameMap; 32 public static Map<String, String> businessCodeNameMap;
33 33
34 - //分公司公司代码和分公司公司名对照(K: 公司编码+分公司编码,V:分公司公司名) 34 + //分公司公司代码和分公司公司名对照(K: 公司编码_分公司编码,V:分公司公司名)
35 public static Map<String, String> businessFgsCodeNameMap; 35 public static Map<String, String> businessFgsCodeNameMap;
36 36
37 //设备号和车辆自编号 (K: 设备编码 ,V:车辆自编号) 37 //设备号和车辆自编号 (K: 设备编码 ,V:车辆自编号)
@@ -333,7 +333,7 @@ public class BasicData implements CommandLineRunner { @@ -333,7 +333,7 @@ public class BasicData implements CommandLineRunner {
333 333
334 perTempMap.put(jobCode, p); 334 perTempMap.put(jobCode, p);
335 335
336 - allPersonMap.put(jobCode.substring(jobCode.indexOf("-")+1), p.getPersonnelName()); 336 + allPersonMap.put(jobCode, p.getPersonnelName());
337 } 337 }
338 338
339 jsyMap = jsyTempMap; 339 jsyMap = jsyTempMap;
src/main/java/com/bsth/entity/schedule/rule/RerunRule.java
@@ -73,10 +73,21 @@ public class RerunRule extends BEntity { @@ -73,10 +73,21 @@ public class RerunRule extends BEntity {
73 /** 车辆配置 */ 73 /** 车辆配置 */
74 @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY) 74 @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
75 private CarConfigInfo useCarConfig; 75 private CarConfigInfo useCarConfig;
  76 +
  77 + private Integer cl; // 冗余字段(车辆id)
  78 + private String clZbh; // 冗余字段(车辆自编号)
  79 +
76 /** 人员配置 */ 80 /** 人员配置 */
77 @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY) 81 @ManyToOne(cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
78 private EmployeeConfigInfo useEmployeeConfig; 82 private EmployeeConfigInfo useEmployeeConfig;
79 83
  84 + private Integer j; // 冗余字段(驾驶员Id)
  85 + private String jGh; // 冗余字段(驾驶员工号)
  86 + private String jName; // 冗余字段(驾驶员姓名)
  87 + private Integer s; // 冗余字段(售票员Id)
  88 + private String sGh; // 冗余字段(售票员工号)
  89 + private String sName; // 冗余字段(售票员姓名)
  90 +
80 /** 是否删除(标记) */ 91 /** 是否删除(标记) */
81 @Column(nullable = false) 92 @Column(nullable = false)
82 private Boolean isCancel = false; 93 private Boolean isCancel = false;
@@ -176,4 +187,68 @@ public class RerunRule extends BEntity { @@ -176,4 +187,68 @@ public class RerunRule extends BEntity {
176 public void setRerunTtinfodetailFcsjs(String rerunTtinfodetailFcsjs) { 187 public void setRerunTtinfodetailFcsjs(String rerunTtinfodetailFcsjs) {
177 this.rerunTtinfodetailFcsjs = rerunTtinfodetailFcsjs; 188 this.rerunTtinfodetailFcsjs = rerunTtinfodetailFcsjs;
178 } 189 }
  190 +
  191 + public Integer getCl() {
  192 + return cl;
  193 + }
  194 +
  195 + public void setCl(Integer cl) {
  196 + this.cl = cl;
  197 + }
  198 +
  199 + public String getClZbh() {
  200 + return clZbh;
  201 + }
  202 +
  203 + public void setClZbh(String clZbh) {
  204 + this.clZbh = clZbh;
  205 + }
  206 +
  207 + public Integer getJ() {
  208 + return j;
  209 + }
  210 +
  211 + public void setJ(Integer j) {
  212 + this.j = j;
  213 + }
  214 +
  215 + public String getjGh() {
  216 + return jGh;
  217 + }
  218 +
  219 + public void setjGh(String jGh) {
  220 + this.jGh = jGh;
  221 + }
  222 +
  223 + public String getjName() {
  224 + return jName;
  225 + }
  226 +
  227 + public void setjName(String jName) {
  228 + this.jName = jName;
  229 + }
  230 +
  231 + public Integer getS() {
  232 + return s;
  233 + }
  234 +
  235 + public void setS(Integer s) {
  236 + this.s = s;
  237 + }
  238 +
  239 + public String getsGh() {
  240 + return sGh;
  241 + }
  242 +
  243 + public void setsGh(String sGh) {
  244 + this.sGh = sGh;
  245 + }
  246 +
  247 + public String getsName() {
  248 + return sName;
  249 + }
  250 +
  251 + public void setsName(String sName) {
  252 + this.sName = sName;
  253 + }
179 } 254 }
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -341,10 +341,36 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -341,10 +341,36 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
341 rs.put("msg", "驾驶员工号不能为空!"); 341 rs.put("msg", "驾驶员工号不能为空!");
342 return rs; 342 return rs;
343 } 343 }
344 - //截取工号 344 + //截取驾驶员工号
345 if (t.getjGh().indexOf("-") != -1) { 345 if (t.getjGh().indexOf("-") != -1) {
346 t.setjGh(t.getjGh().split("-")[1]); 346 t.setjGh(t.getjGh().split("-")[1]);
347 } 347 }
  348 + //检查驾驶员工号
  349 + String jName = BasicData.allPerson.get(t.getGsBm() + '-' + t.getjGh());
  350 + if(StringUtils.isEmpty(jName)){
  351 + rs.put("msg", t.getXlName() + "所属的公司编码下找不到工号为【" + t.getjGh() + "】的驾驶员");
  352 + rs.put("status", ResponseCode.ERROR);
  353 + return rs;
  354 + }
  355 + else if(StringUtils.isEmpty(t.getjName())){
  356 + t.setjName(jName);//补上驾驶员名称
  357 + }
  358 +
  359 + //有售票员
  360 + if(StringUtils.isNotEmpty(t.getsGh())){
  361 + String sName = BasicData.allPerson.get(t.getGsBm() + '-' + t.getsGh());
  362 + if(StringUtils.isEmpty(sName)){
  363 + rs.put("msg", t.getXlName() + "所属的公司编码下找不到工号为【" + t.getjGh() + "】的售票员");
  364 + rs.put("status", ResponseCode.ERROR);
  365 + return rs;
  366 + }else if(StringUtils.isEmpty(t.getsName())){
  367 + t.setsName(sName);//补上售票员名称
  368 + }
  369 + }
  370 +
  371 + //公司 和 分公司名称
  372 + t.setGsName(BasicData.businessCodeNameMap.get(t.getGsBm()));
  373 + t.setFgsName(BasicData.businessFgsCodeNameMap.get(t.getGsBm() + "_" + t.getFgsBm()));
348 374
349 t.setScheduleDateStr(schDate); 375 t.setScheduleDateStr(schDate);
350 t.setScheduleDate(sdfyyyyMMdd.parse(schDate)); 376 t.setScheduleDate(sdfyyyyMMdd.parse(schDate));
@@ -2843,13 +2869,21 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2843,13 +2869,21 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2843 continue; 2869 continue;
2844 2870
2845 if (StringUtils.isNotEmpty(cpc.getJsy())) { 2871 if (StringUtils.isNotEmpty(cpc.getJsy())) {
  2872 + String jGh = cpc.getJsy().split("/")[0];
  2873 + if(!BasicData.allPerson.containsKey(sch.getGsBm()+"-"+jGh)){
  2874 + rs.put("msg", sch.getXlName() + "所属的公司编码下找不到工号为【" + jGh + "】的驾驶员");
  2875 + rs.put("status", ResponseCode.ERROR);
  2876 + return rs;
  2877 + }
2846 //换驾驶员 2878 //换驾驶员
2847 - persoChange(sch, cpc.getJsy().split("/")[0]); 2879 + persoChange(sch, jGh);
  2880 + set.add(sch);
2848 } 2881 }
2849 2882
2850 //换售票员 2883 //换售票员
2851 if (StringUtils.isNotEmpty(cpc.getSpy())) { 2884 if (StringUtils.isNotEmpty(cpc.getSpy())) {
2852 persoChangeSPY(sch, cpc.getSpy().split("/")[0]); 2885 persoChangeSPY(sch, cpc.getSpy().split("/")[0]);
  2886 + set.add(sch);
2853 } 2887 }
2854 2888
2855 //换车 2889 //换车
@@ -2873,7 +2907,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -2873,7 +2907,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2873 public void persoChange(ScheduleRealInfo sch, String jGh) { 2907 public void persoChange(ScheduleRealInfo sch, String jGh) {
2874 if (sch.getjGh().equals(jGh)) 2908 if (sch.getjGh().equals(jGh))
2875 return; 2909 return;
2876 - String jName = BasicData.allPerson.get(jGh); 2910 + String jName = BasicData.allPerson.get(sch.getGsBm() + "-"+ jGh);
2877 if (StringUtils.isNotEmpty(jName)) { 2911 if (StringUtils.isNotEmpty(jName)) {
2878 2912
2879 if (jGh.indexOf("-") != -1) 2913 if (jGh.indexOf("-") != -1)
src/main/java/com/bsth/service/schedule/impl/SchedulePlanServiceImpl.java
@@ -12,6 +12,7 @@ import com.bsth.service.schedule.exception.ScheduleException; @@ -12,6 +12,7 @@ import com.bsth.service.schedule.exception.ScheduleException;
12 import com.bsth.service.schedule.rules.ScheduleRuleService; 12 import com.bsth.service.schedule.rules.ScheduleRuleService;
13 import com.bsth.service.schedule.rules.plan.PlanCalcuParam_input; 13 import com.bsth.service.schedule.rules.plan.PlanCalcuParam_input;
14 import com.bsth.service.schedule.rules.plan.PlanResult; 14 import com.bsth.service.schedule.rules.plan.PlanResult;
  15 +import com.bsth.service.schedule.rules.rerun.RerunRule_input;
15 import com.bsth.service.schedule.rules.shiftloop.ScheduleCalcuParam_input; 16 import com.bsth.service.schedule.rules.shiftloop.ScheduleCalcuParam_input;
16 import com.bsth.service.schedule.rules.shiftloop.ScheduleResults_output; 17 import com.bsth.service.schedule.rules.shiftloop.ScheduleResults_output;
17 import com.bsth.service.schedule.rules.shiftloop.ScheduleRule_input; 18 import com.bsth.service.schedule.rules.shiftloop.ScheduleRule_input;
@@ -101,7 +102,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im @@ -101,7 +102,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im
101 // 执行完毕销毁,有日志的也要关闭 102 // 执行完毕销毁,有日志的也要关闭
102 session.dispose(); 103 session.dispose();
103 104
104 - logger.info("循环规则输出={}", scheduleResults_output.showGuideboardDesc1()); 105 +// logger.info("循环规则输出={}", scheduleResults_output.showGuideboardDesc1());
105 106
106 return scheduleResults_output; 107 return scheduleResults_output;
107 } 108 }
@@ -258,6 +259,8 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im @@ -258,6 +259,8 @@ public class SchedulePlanServiceImpl extends BServiceImpl&lt;SchedulePlan, Long&gt; im
258 PlanResult planResult = SchedulePlanWithOutRerun(schedulePlan); 259 PlanResult planResult = SchedulePlanWithOutRerun(schedulePlan);
259 260
260 // TODO 3、确定套跑规则 261 // TODO 3、确定套跑规则
  262 + List<RerunRule_input> rerunRule_inputs = scheduleRuleService.findRerunrule(schedulePlan.getXl().getId());
  263 + logger.info("套跑数量 {} 组", rerunRule_inputs.size());
261 264
262 // 4、保存数据(jdbcTemplate 批量插入) 265 // 4、保存数据(jdbcTemplate 批量插入)
263 Date start4 = new Date(); 266 Date start4 = new Date();
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
@@ -98,10 +98,10 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im @@ -98,10 +98,10 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
98 public List<Map<String, Object>> findZdAndTcc(int lineid, int xldir) { 98 public List<Map<String, Object>> findZdAndTcc(int lineid, int xldir) {
99 String sql = "select * from " + 99 String sql = "select * from " +
100 "(" + 100 "(" +
101 - "select station_code as zcode, station_name as zname from bsth_c_stationroute " + 101 + "select station_code as zcode, station_name as zname, concat(station_name, '(站点)') as aname from bsth_c_stationroute " +
102 "where destroy = 0 and line = ? and directions = ? " + 102 "where destroy = 0 and line = ? and directions = ? " +
103 "union all " + 103 "union all " +
104 - "select park_code as zcode, park_name as zname from bsth_c_car_park " + 104 + "select park_code as zcode, park_name as zname, concat(park_name, '(停车场)') as aname from bsth_c_car_park " +
105 "where destroy = 0 " + 105 "where destroy = 0 " +
106 ") a "; 106 ") a ";
107 107
src/main/java/com/bsth/service/schedule/rules/ScheduleRuleService.java
@@ -3,6 +3,7 @@ package com.bsth.service.schedule.rules; @@ -3,6 +3,7 @@ package com.bsth.service.schedule.rules;
3 import com.bsth.entity.schedule.SchedulePlan; 3 import com.bsth.entity.schedule.SchedulePlan;
4 import com.bsth.entity.schedule.SchedulePlanInfo; 4 import com.bsth.entity.schedule.SchedulePlanInfo;
5 import com.bsth.entity.schedule.temp.SchedulePlanRuleResult; 5 import com.bsth.entity.schedule.temp.SchedulePlanRuleResult;
  6 +import com.bsth.service.schedule.rules.rerun.RerunRule_input;
6 7
7 import java.util.Date; 8 import java.util.Date;
8 import java.util.List; 9 import java.util.List;
@@ -42,5 +43,13 @@ public interface ScheduleRuleService { @@ -42,5 +43,13 @@ public interface ScheduleRuleService {
42 * @param dateto 结束日期 43 * @param dateto 结束日期
43 */ 44 */
44 void deelteSchedulePlanInfo(Integer xlid, Date datefrom, Date dateto); 45 void deelteSchedulePlanInfo(Integer xlid, Date datefrom, Date dateto);
  46 +
  47 + /**
  48 + * 查找线路的套跑规则,并封装成规则输入对象。
  49 + * @param xlid
  50 + * @return
  51 + */
  52 + List<RerunRule_input> findRerunrule(Integer xlid);
  53 +
45 } 54 }
46 55
src/main/java/com/bsth/service/schedule/rules/ScheduleRuleServiceImpl.java
@@ -3,13 +3,11 @@ package com.bsth.service.schedule.rules; @@ -3,13 +3,11 @@ package com.bsth.service.schedule.rules;
3 import com.bsth.entity.schedule.SchedulePlan; 3 import com.bsth.entity.schedule.SchedulePlan;
4 import com.bsth.entity.schedule.SchedulePlanInfo; 4 import com.bsth.entity.schedule.SchedulePlanInfo;
5 import com.bsth.entity.schedule.temp.SchedulePlanRuleResult; 5 import com.bsth.entity.schedule.temp.SchedulePlanRuleResult;
  6 +import com.bsth.service.schedule.rules.rerun.RerunRule_input;
6 import org.slf4j.Logger; 7 import org.slf4j.Logger;
7 import org.slf4j.LoggerFactory; 8 import org.slf4j.LoggerFactory;
8 import org.springframework.beans.factory.annotation.Autowired; 9 import org.springframework.beans.factory.annotation.Autowired;
9 -import org.springframework.jdbc.core.BatchPreparedStatementSetter;  
10 -import org.springframework.jdbc.core.JdbcTemplate;  
11 -import org.springframework.jdbc.core.PreparedStatementCreator;  
12 -import org.springframework.jdbc.core.RowMapper; 10 +import org.springframework.jdbc.core.*;
13 import org.springframework.jdbc.support.GeneratedKeyHolder; 11 import org.springframework.jdbc.support.GeneratedKeyHolder;
14 import org.springframework.jdbc.support.KeyHolder; 12 import org.springframework.jdbc.support.KeyHolder;
15 import org.springframework.stereotype.Service; 13 import org.springframework.stereotype.Service;
@@ -37,6 +35,75 @@ public class ScheduleRuleServiceImpl implements ScheduleRuleService { @@ -37,6 +35,75 @@ public class ScheduleRuleServiceImpl implements ScheduleRuleService {
37 private JdbcTemplate jdbcTemplate; 35 private JdbcTemplate jdbcTemplate;
38 36
39 @Override 37 @Override
  38 + public List<RerunRule_input> findRerunrule(Integer xlid) {
  39 + String sql = "select " +
  40 + "rerun_type as type " +
  41 + ", rerun_xl as m_xl " +
  42 + ", rerun_ttinfo as m_ttinfo " +
  43 + ", rerun_lp as m_lp " +
  44 + ", rerun_ttinfodetail_fcsjs as m_fcsjs " +
  45 + ", use_xl as s_dylp_xl " +
  46 + ", use_lp as s_dylp_lp " +
  47 + ", cl as s_dybc_cl " +
  48 + ", cl_zbh as s_dybc_clzbh " +
  49 + ", j as s_dybc_j " +
  50 + ", j_gh as s_dybc_jgh " +
  51 + ", j_name as s_dybc_jname " +
  52 + ", s as s_dybc_s " +
  53 + ", s_gh as s_dybc_sgh " +
  54 + ", s_name as s_dybc_sname " +
  55 + "from bsth_c_s_rerun_rule " +
  56 + "where rerun_xl = ? ";
  57 +
  58 + final List<RerunRule_input> rerunRule_inputs = new ArrayList<>();
  59 +
  60 + jdbcTemplate.query(sql, new Object[]{xlid}, new RowCallbackHandler() {
  61 + @Override
  62 + public void processRow(ResultSet resultSet) throws SQLException {
  63 + // 发车时间
  64 + String[] fcsjs = resultSet.getString("m_fcsjs").split(",");
  65 + for (String fcsj: fcsjs) {
  66 + RerunRule_input rerunRule_input = new RerunRule_input();
  67 + rerunRule_input.setXl(String.valueOf(resultSet.getInt("m_xl")));
  68 + rerunRule_input.setTtinfo(String.valueOf(resultSet.getLong("m_ttinfo")));
  69 + rerunRule_input.setLp(String.valueOf(resultSet.getLong("m_lp")));
  70 + rerunRule_input.setFcsj(fcsj);
  71 +
  72 + rerunRule_input.setType(resultSet.getString("type"));
  73 + // 对应班次类型
  74 + if ("dybc".equals(resultSet.getString("type"))) {
  75 + rerunRule_input.setS_xl(String.valueOf(resultSet.getInt("s_dylp_xl")));
  76 + rerunRule_input.setS_lp(String.valueOf(resultSet.getLong("s_dylp_lp")));
  77 + } else if ("dylp".equals(resultSet.getString("type"))) {
  78 + rerunRule_input.setCl(resultSet.getInt("s_dybc_cl"));
  79 + rerunRule_input.setZbh(resultSet.getString("s_dybc_clzbh"));
  80 + rerunRule_input.setJ(resultSet.getInt("s_dybc_j"));
  81 + rerunRule_input.setJgh(resultSet.getString("s_dybc_jgh"));
  82 + rerunRule_input.setJname(resultSet.getString("s_dybc_jname"));
  83 + rerunRule_input.setS(resultSet.getInt("s_dybc_s"));
  84 + rerunRule_input.setSgh(resultSet.getString("s_dybc_sgh"));
  85 + rerunRule_input.setSname(resultSet.getString("s_dybc_sname"));
  86 + }
  87 +
  88 + rerunRule_inputs.add(rerunRule_input);
  89 + }
  90 +
  91 + }
  92 + });
  93 +
  94 + return rerunRule_inputs;
  95 + }
  96 +
  97 + public void test() {
  98 + jdbcTemplate.query("", new RowCallbackHandler() {
  99 + @Override
  100 + public void processRow(ResultSet resultSet) throws SQLException {
  101 +
  102 + }
  103 + });
  104 + }
  105 +
  106 + @Override
40 public List<SchedulePlanRuleResult> findLastByXl(String xlid, Date from) { 107 public List<SchedulePlanRuleResult> findLastByXl(String xlid, Date from) {
41 String sql = "select * from bsth_c_s_sp_rule_rst a " + 108 String sql = "select * from bsth_c_s_sp_rule_rst a " +
42 "where exists (select 1 from " + 109 "where exists (select 1 from " +
src/main/java/com/bsth/service/schedule/rules/rerun/RerunRule_input.java 0 → 100644
  1 +package com.bsth.service.schedule.rules.rerun;
  2 +
  3 +/**
  4 + * Created by xu on 17/4/26.
  5 + */
  6 +public class RerunRule_input {
  7 + private String xl; // 主线路Id
  8 + private String ttinfo; // 时刻表Id
  9 + private String lp; // 路牌
  10 + private String fcsj; // 发车时间
  11 +
  12 + private String type; // 套跑类型(dylp-对应路牌, dybc-对应班车)
  13 + private String s_xl; // 对应路牌,线路Id
  14 + private String s_lp; // 对应路牌,路牌Id
  15 +
  16 + private Integer cl; // 对应班车,车辆Id
  17 + private String zbh; // 对应班车,车辆自编号
  18 + private Integer j; // 对应班车,驾驶员Id
  19 + private String jgh; // 对应班车,驾驶员工号
  20 + private String jname; // 对应班车,驾驶员姓名
  21 + private Integer s; // 对应班车,售票员Id
  22 + private String sgh; // 对应班车,售票员工号
  23 + private String sname; // 对应班车,售票员姓名
  24 +
  25 + public String getXl() {
  26 + return xl;
  27 + }
  28 +
  29 + public void setXl(String xl) {
  30 + this.xl = xl;
  31 + }
  32 +
  33 + public String getTtinfo() {
  34 + return ttinfo;
  35 + }
  36 +
  37 + public void setTtinfo(String ttinfo) {
  38 + this.ttinfo = ttinfo;
  39 + }
  40 +
  41 + public String getLp() {
  42 + return lp;
  43 + }
  44 +
  45 + public void setLp(String lp) {
  46 + this.lp = lp;
  47 + }
  48 +
  49 + public String getFcsj() {
  50 + return fcsj;
  51 + }
  52 +
  53 + public void setFcsj(String fcsj) {
  54 + this.fcsj = fcsj;
  55 + }
  56 +
  57 + public String getType() {
  58 + return type;
  59 + }
  60 +
  61 + public void setType(String type) {
  62 + this.type = type;
  63 + }
  64 +
  65 + public String getS_xl() {
  66 + return s_xl;
  67 + }
  68 +
  69 + public void setS_xl(String s_xl) {
  70 + this.s_xl = s_xl;
  71 + }
  72 +
  73 + public String getS_lp() {
  74 + return s_lp;
  75 + }
  76 +
  77 + public void setS_lp(String s_lp) {
  78 + this.s_lp = s_lp;
  79 + }
  80 +
  81 + public Integer getCl() {
  82 + return cl;
  83 + }
  84 +
  85 + public void setCl(Integer cl) {
  86 + this.cl = cl;
  87 + }
  88 +
  89 + public String getZbh() {
  90 + return zbh;
  91 + }
  92 +
  93 + public void setZbh(String zbh) {
  94 + this.zbh = zbh;
  95 + }
  96 +
  97 + public Integer getJ() {
  98 + return j;
  99 + }
  100 +
  101 + public void setJ(Integer j) {
  102 + this.j = j;
  103 + }
  104 +
  105 + public String getJgh() {
  106 + return jgh;
  107 + }
  108 +
  109 + public void setJgh(String jgh) {
  110 + this.jgh = jgh;
  111 + }
  112 +
  113 + public String getJname() {
  114 + return jname;
  115 + }
  116 +
  117 + public void setJname(String jname) {
  118 + this.jname = jname;
  119 + }
  120 +
  121 + public Integer getS() {
  122 + return s;
  123 + }
  124 +
  125 + public void setS(Integer s) {
  126 + this.s = s;
  127 + }
  128 +
  129 + public String getSgh() {
  130 + return sgh;
  131 + }
  132 +
  133 + public void setSgh(String sgh) {
  134 + this.sgh = sgh;
  135 + }
  136 +
  137 + public String getSname() {
  138 + return sname;
  139 + }
  140 +
  141 + public void setSname(String sname) {
  142 + this.sname = sname;
  143 + }
  144 +}
src/main/resources/application-dev.properties
@@ -6,7 +6,7 @@ spring.jpa.hibernate.ddl-auto= update @@ -6,7 +6,7 @@ spring.jpa.hibernate.ddl-auto= update
6 spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy 6 spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
7 #DATABASE 7 #DATABASE
8 spring.jpa.database= MYSQL 8 spring.jpa.database= MYSQL
9 -spring.jpa.show-sql= true 9 +spring.jpa.show-sql= false
10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver 10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver
11 spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false 11 spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
12 spring.datasource.username= root 12 spring.datasource.username= root
src/main/resources/rules/shiftloop_fb_2.drl
@@ -76,7 +76,7 @@ rule &quot;calcu_days_1_&quot; @@ -76,7 +76,7 @@ rule &quot;calcu_days_1_&quot;
76 76
77 insert(cdrp); 77 insert(cdrp);
78 78
79 - log.info("总共需要排班的天数 sdays={} ruleId={} from={} to={}", (p2.getDays() + 1), $ruleId, $fromDate, $toDate); 79 +// log.info("总共需要排班的天数 sdays={} ruleId={} from={} to={}", (p2.getDays() + 1), $ruleId, $fromDate, $toDate);
80 80
81 end 81 end
82 82
@@ -108,7 +108,7 @@ rule &quot;calcu_days_2_&quot; @@ -108,7 +108,7 @@ rule &quot;calcu_days_2_&quot;
108 108
109 insert(cdrp); 109 insert(cdrp);
110 110
111 - log.info("总共需要排班的天数 sdays={} ruleId={} from={} to={}", (p2.getDays() + 1), $ruleId, $qyrq, $toDate); 111 +// log.info("总共需要排班的天数 sdays={} ruleId={} from={} to={}", (p2.getDays() + 1), $ruleId, $qyrq, $toDate);
112 112
113 end 113 end
114 114
@@ -169,7 +169,7 @@ rule &quot;calcu_days_1_with_result&quot; @@ -169,7 +169,7 @@ rule &quot;calcu_days_1_with_result&quot;
169 ) 169 )
170 then 170 then
171 // 修正排班数据 171 // 修正排班数据
172 - log.info("准备修正 ruleId={} historyDate={}", $ruleId, $scheduleDate); 172 +// log.info("准备修正 ruleId={} historyDate={}", $ruleId, $scheduleDate);
173 173
174 $cdrp.setCalcu_index_lp(Integer.valueOf($self.getGidindex())); 174 $cdrp.setCalcu_index_lp(Integer.valueOf($self.getGidindex()));
175 $cdrp.setCalcu_index_ry(Integer.valueOf($self.getEcindex())); 175 $cdrp.setCalcu_index_ry(Integer.valueOf($self.getEcindex()));
@@ -211,8 +211,8 @@ rule &quot;Calcu_loop1_1_&quot; // 路牌在时刻表中存在,就翻 @@ -211,8 +211,8 @@ rule &quot;Calcu_loop1_1_&quot; // 路牌在时刻表中存在,就翻
211 $cdrp.setCalcu_index_ry(($ryindex + 1) % $ryrangesize); 211 $cdrp.setCalcu_index_ry(($ryindex + 1) % $ryrangesize);
212 $cdrp.setCalcu_start_date_1($csd1.plusDays(1)); 212 $cdrp.setCalcu_start_date_1($csd1.plusDays(1));
213 213
214 - log.info("Calcu_loop1_1_ ruleId={}, calcu_index_lp/ry={}/{}",  
215 - $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry()); 214 +// log.info("Calcu_loop1_1_ ruleId={}, calcu_index_lp/ry={}/{}",
  215 +// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry());
216 216
217 update($cdrp); 217 update($cdrp);
218 end 218 end
@@ -233,8 +233,8 @@ rule &quot;Calcu_loop1_2_&quot; // 路牌在时刻表中不存在,就不翻 @@ -233,8 +233,8 @@ rule &quot;Calcu_loop1_2_&quot; // 路牌在时刻表中不存在,就不翻
233 then 233 then
234 $cdrp.setCalcu_start_date_1($csd1.plusDays(1)); 234 $cdrp.setCalcu_start_date_1($csd1.plusDays(1));
235 235
236 - log.info("Calcu_loop1_2_ ruleId={}, calcu_index_lp/ry={}/{}",  
237 - $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry()); 236 +// log.info("Calcu_loop1_2_ ruleId={}, calcu_index_lp/ry={}/{}",
  237 +// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry());
238 238
239 update($cdrp); 239 update($cdrp);
240 end 240 end
@@ -304,8 +304,8 @@ rule &quot;Calcu_loop2_1_&quot; // 路牌在时刻表中存在,就翻 @@ -304,8 +304,8 @@ rule &quot;Calcu_loop2_1_&quot; // 路牌在时刻表中存在,就翻
304 scheduleResult.getSchedulePlanRuleResults().add(schedulePlanRuleResult); 304 scheduleResult.getSchedulePlanRuleResults().add(schedulePlanRuleResult);
305 305
306 306
307 - log.info("Calcu_loop2_1_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}",  
308 - $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2); 307 +// log.info("Calcu_loop2_1_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}",
  308 +// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2);
309 309
310 update($cdrp); 310 update($cdrp);
311 end 311 end
@@ -359,8 +359,8 @@ rule &quot;Calcu_loop2_2_&quot; // 路牌在时刻表中不存在,就不翻 @@ -359,8 +359,8 @@ rule &quot;Calcu_loop2_2_&quot; // 路牌在时刻表中不存在,就不翻
359 // 359 //
360 // scheduleResult.getSchedulePlanRuleResults().add(schedulePlanRuleResult); 360 // scheduleResult.getSchedulePlanRuleResults().add(schedulePlanRuleResult);
361 361
362 - log.info("Calcu_loop2_2_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}",  
363 - $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2); 362 +// log.info("Calcu_loop2_2_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}",
  363 +// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2);
364 364
365 update($cdrp); 365 update($cdrp);
366 end 366 end
src/main/resources/rules/ttinfo.drl
@@ -82,7 +82,7 @@ rule &quot;calcu_days&quot; @@ -82,7 +82,7 @@ rule &quot;calcu_days&quot;
82 cdr.setCalcu_end_date(($toDate)); 82 cdr.setCalcu_end_date(($toDate));
83 cdr.setXlId($xlId); 83 cdr.setXlId($xlId);
84 84
85 - log.info("总共需要计算的天数 calcu_days={} 之后的计算从第1天开始 ", p.getDays() + 1); 85 +// log.info("总共需要计算的天数 calcu_days={} 之后的计算从第1天开始 ", p.getDays() + 1);
86 86
87 insert(cdr); // 插入fact数据,进入下一个阶段 87 insert(cdr); // 插入fact数据,进入下一个阶段
88 end 88 end
@@ -107,7 +107,7 @@ rule &quot;calcu_ttinfo_enable&quot; @@ -107,7 +107,7 @@ rule &quot;calcu_ttinfo_enable&quot;
107 cter.setTtInfo_input_list($ttInfo_input_list); 107 cter.setTtInfo_input_list($ttInfo_input_list);
108 cter.setCalcu_date($calcu_date); 108 cter.setCalcu_date($calcu_date);
109 109
110 - log.info("启用的时刻表:xlId={} 时刻表个数={}", $xlId, $ttInfo_input_list.size()); 110 +// log.info("启用的时刻表:xlId={} 时刻表个数={}", $xlId, $ttInfo_input_list.size());
111 111
112 insert (cter); 112 insert (cter);
113 113
@@ -130,7 +130,7 @@ rule &quot;calcu_ttinfo_special_day&quot; // 特殊日期匹配 @@ -130,7 +130,7 @@ rule &quot;calcu_ttinfo_special_day&quot; // 特殊日期匹配
130 $calcu_days_result.setCalcu_date(new_calcu_date); 130 $calcu_days_result.setCalcu_date(new_calcu_date);
131 $calcu_days_result.setCalcu_weekday(new_calcu_date.getDayOfWeek()); 131 $calcu_days_result.setCalcu_weekday(new_calcu_date.getDayOfWeek());
132 132
133 - log.info("启用特殊日期时刻表:xlId={} 时刻表个数={} 特殊日期={}", $xlId, $ttinfolist.size(), $calcu_date); 133 +// log.info("启用特殊日期时刻表:xlId={} 时刻表个数={} 特殊日期={}", $xlId, $ttinfolist.size(), $calcu_date);
134 134
135 // $ttinfolist按时间倒排序,result输出 135 // $ttinfolist按时间倒排序,result输出
136 Collections.sort($ttinfolist); 136 Collections.sort($ttinfolist);
@@ -161,7 +161,7 @@ rule &quot;calcu_ttinfo_normal_day&quot; // 平日匹配 @@ -161,7 +161,7 @@ rule &quot;calcu_ttinfo_normal_day&quot; // 平日匹配
161 $calcu_days_result.setCalcu_date(new_calcu_date); 161 $calcu_days_result.setCalcu_date(new_calcu_date);
162 $calcu_days_result.setCalcu_weekday(new_calcu_date.getDayOfWeek()); 162 $calcu_days_result.setCalcu_weekday(new_calcu_date.getDayOfWeek());
163 163
164 - log.info("启用常规日期时刻表:xlId={} 时刻表个数={} 常规日期={} 星期几={} 路牌size={}", $xlId, $ttinfolist.size(), $calcu_date, $calcu_weekday, $lpInfoResults.size()); 164 +// log.info("启用常规日期时刻表:xlId={} 时刻表个数={} 常规日期={} 星期几={} 路牌size={}", $xlId, $ttinfolist.size(), $calcu_date, $calcu_weekday, $lpInfoResults.size());
165 165
166 // $ttinfolist按时间倒排序,result输出 166 // $ttinfolist按时间倒排序,result输出
167 Collections.sort($ttinfolist); 167 Collections.sort($ttinfolist);
@@ -192,7 +192,7 @@ rule &quot;calcu_ttinfo_other_day&quot; // 都没有的情况下,匹配 @@ -192,7 +192,7 @@ rule &quot;calcu_ttinfo_other_day&quot; // 都没有的情况下,匹配
192 $calcu_days_result.setCalcu_date(new_calcu_date); 192 $calcu_days_result.setCalcu_date(new_calcu_date);
193 $calcu_days_result.setCalcu_weekday(new_calcu_date.getDayOfWeek()); 193 $calcu_days_result.setCalcu_weekday(new_calcu_date.getDayOfWeek());
194 194
195 - log.info("启用默认日期时刻表:xlId={} 时刻表个数={} 常规日期={} 星期几={}", $xlId, $ttinfolist.size(), $calcu_date, $calcu_weekday); 195 +// log.info("启用默认日期时刻表:xlId={} 时刻表个数={} 常规日期={} 星期几={}", $xlId, $ttinfolist.size(), $calcu_date, $calcu_weekday);
196 196
197 // $ttinfolist按时间倒排序,result输出 197 // $ttinfolist按时间倒排序,result输出
198 Collections.sort($ttinfolist); 198 Collections.sort($ttinfolist);
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/edit.html
@@ -181,7 +181,7 @@ @@ -181,7 +181,7 @@
181 <div class="col-md-3"> 181 <div class="col-md-3">
182 <sa-Select5 name="useCarConfig" 182 <sa-Select5 name="useCarConfig"
183 model="ctrl.rerunManageForSave" 183 model="ctrl.rerunManageForSave"
184 - cmaps="{'useCarConfig.id' : 'id'}" 184 + cmaps="{'useCarConfig.id' : 'id', 'cl': 'cl.id', 'clZbh': 'cl.insideCode'}"
185 dcname="useCarConfig.id" 185 dcname="useCarConfig.id"
186 icname="id" 186 icname="id"
187 dsparams="{{ {type: 'ajax', param:{'type': 'all', 'isCancel_eq': false}, atype:'cci2' } | json }}" 187 dsparams="{{ {type: 'ajax', param:{'type': 'all', 'isCancel_eq': false}, atype:'cci2' } | json }}"
@@ -203,7 +203,7 @@ @@ -203,7 +203,7 @@
203 <div class="col-md-5"> 203 <div class="col-md-5">
204 <sa-Select5 name="useEmployeeConfig" 204 <sa-Select5 name="useEmployeeConfig"
205 model="ctrl.rerunManageForSave" 205 model="ctrl.rerunManageForSave"
206 - cmaps="{'useEmployeeConfig.id' : 'id'}" 206 + cmaps="{'useEmployeeConfig.id' : 'id', 'j': 'jsy.id', 'jGh': 'jsy.jobCode', 'jName': 'jsy.personnelName', 's': 'spy.id', 'sGh': 'spy.jobCode', 'sName': 'spy.personnelName'}"
207 dcname="useEmployeeConfig.id" 207 dcname="useEmployeeConfig.id"
208 icname="id" 208 icname="id"
209 dsparams="{{ {type: 'ajax', param:{'type': 'all', 'isCancel_eq': false}, atype:'eci3' } | json }}" 209 dsparams="{{ {type: 'ajax', param:{'type': 'all', 'isCancel_eq': false}, atype:'eci3' } | json }}"
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/form.html
@@ -181,7 +181,7 @@ @@ -181,7 +181,7 @@
181 <div class="col-md-3"> 181 <div class="col-md-3">
182 <sa-Select5 name="useCarConfig" 182 <sa-Select5 name="useCarConfig"
183 model="ctrl.rerunManageForSave" 183 model="ctrl.rerunManageForSave"
184 - cmaps="{'useCarConfig.id' : 'id'}" 184 + cmaps="{'useCarConfig.id' : 'id', 'cl': 'cl.id', 'clZbh': 'cl.insideCode'}"
185 dcname="useCarConfig.id" 185 dcname="useCarConfig.id"
186 icname="id" 186 icname="id"
187 dsparams="{{ {type: 'ajax', param:{'type': 'all', 'isCancel_eq': false}, atype:'cci2' } | json }}" 187 dsparams="{{ {type: 'ajax', param:{'type': 'all', 'isCancel_eq': false}, atype:'cci2' } | json }}"
@@ -203,7 +203,7 @@ @@ -203,7 +203,7 @@
203 <div class="col-md-5"> 203 <div class="col-md-5">
204 <sa-Select5 name="useEmployeeConfig" 204 <sa-Select5 name="useEmployeeConfig"
205 model="ctrl.rerunManageForSave" 205 model="ctrl.rerunManageForSave"
206 - cmaps="{'useEmployeeConfig.id' : 'id'}" 206 + cmaps="{'useEmployeeConfig.id' : 'id', 'j': 'jsy.id', 'jGh': 'jsy.jobCode', 'jName': 'jsy.personnelName', 's': 'spy.id', 'sGh': 'spy.jobCode', 'sName': 'spy.personnelName'}"
207 dcname="useEmployeeConfig.id" 207 dcname="useEmployeeConfig.id"
208 icname="id" 208 icname="id"
209 dsparams="{{ {type: 'ajax', param:{'type': 'all', 'isCancel_eq': false}, atype:'eci3' } | json }}" 209 dsparams="{{ {type: 'ajax', param:{'type': 'all', 'isCancel_eq': false}, atype:'eci3' } | json }}"
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail.html
@@ -95,9 +95,9 @@ @@ -95,9 +95,9 @@
95 icname="zcode" 95 icname="zcode"
96 dsparams="{{ {type: 'ajax', param:{'lineid': ctrl.TimeTableDetailForSave.xl.id, 'xldir': ctrl.TimeTableDetailForSave.xlDir}, atype:'zd_tcc' } | json }}" 96 dsparams="{{ {type: 'ajax', param:{'lineid': ctrl.TimeTableDetailForSave.xl.id, 'xldir': ctrl.TimeTableDetailForSave.xlDir}, atype:'zd_tcc' } | json }}"
97 iterobjname="item" 97 iterobjname="item"
98 - iterobjexp="item.zname" 98 + iterobjexp="item.aname"
99 searchph="请输拼音..." 99 searchph="请输拼音..."
100 - searchexp="this.zname" 100 + searchexp="this.aname"
101 required > 101 required >
102 </sa-Select5> 102 </sa-Select5>
103 </div> 103 </div>
@@ -116,9 +116,9 @@ @@ -116,9 +116,9 @@
116 icname="zcode" 116 icname="zcode"
117 dsparams="{{ {type: 'ajax', param:{'lineid': ctrl.TimeTableDetailForSave.xl.id, 'xldir': ctrl.TimeTableDetailForSave.xlDir}, atype:'zd_tcc' } | json }}" 117 dsparams="{{ {type: 'ajax', param:{'lineid': ctrl.TimeTableDetailForSave.xl.id, 'xldir': ctrl.TimeTableDetailForSave.xlDir}, atype:'zd_tcc' } | json }}"
118 iterobjname="item" 118 iterobjname="item"
119 - iterobjexp="item.zname" 119 + iterobjexp="item.aname"
120 searchph="请输拼音..." 120 searchph="请输拼音..."
121 - searchexp="this.zname" 121 + searchexp="this.aname"
122 required > 122 required >
123 </sa-Select5> 123 </sa-Select5>
124 </div> 124 </div>
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit-detail2.html
@@ -76,9 +76,9 @@ @@ -76,9 +76,9 @@
76 icname="zcode" 76 icname="zcode"
77 dsparams="{{ {type: 'ajax', param:{'lineid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd_tcc' } | json }}" 77 dsparams="{{ {type: 'ajax', param:{'lineid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd_tcc' } | json }}"
78 iterobjname="item" 78 iterobjname="item"
79 - iterobjexp="item.zname" 79 + iterobjexp="item.aname"
80 searchph="请输拼音..." 80 searchph="请输拼音..."
81 - searchexp="this.zname" 81 + searchexp="this.aname"
82 required > 82 required >
83 </sa-Select5> 83 </sa-Select5>
84 </div> 84 </div>
@@ -93,9 +93,9 @@ @@ -93,9 +93,9 @@
93 icname="zcode" 93 icname="zcode"
94 dsparams="{{ {type: 'ajax', param:{'lineid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd_tcc' } | json }}" 94 dsparams="{{ {type: 'ajax', param:{'lineid': ctrl.xlid, 'xldir': ctrl.tt.xlDir}, atype:'zd_tcc' } | json }}"
95 iterobjname="item" 95 iterobjname="item"
96 - iterobjexp="item.zname" 96 + iterobjexp="item.aname"
97 searchph="请输拼音..." 97 searchph="请输拼音..."
98 - searchexp="this.zname" 98 + searchexp="this.aname"
99 required > 99 required >
100 </sa-Select5> 100 </sa-Select5>
101 </div> 101 </div>
src/main/resources/static/real_control_v2/fragments/home/context_menu.html
@@ -10,8 +10,11 @@ @@ -10,8 +10,11 @@
10 <form class="uk-form"> 10 <form class="uk-form">
11 <input type="hidden" value="{{nbbm}}" name="nbbm" /> 11 <input type="hidden" value="{{nbbm}}" name="nbbm" />
12 <div class="uk-form-row"> 12 <div class="uk-form-row">
13 - <select> 13 + <select style="width: 170px;" class="common_phrase_sel">
14 <option value="">------ 常用短语 -------</option> 14 <option value="">------ 常用短语 -------</option>
  15 + <option value="天气异常,请小心驾驶">天气异常,请小心驾驶</option>
  16 + <option value="请适当减速慢行,保持最佳行车间距">请适当减速慢行,保持最佳行车间距</option>
  17 + <option value="请准点执行班次任务">请准点执行班次任务</option>
15 </select> 18 </select>
16 </div> 19 </div>
17 <div class="uk-form-row"> 20 <div class="uk-form-row">
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/add_temp_sch.html
@@ -9,14 +9,14 @@ @@ -9,14 +9,14 @@
9 <ul data-uk-switcher="{connect:'#tempScheduleContent'}" class="uk-nav uk-nav-side left_tabs_lg" > 9 <ul data-uk-switcher="{connect:'#tempScheduleContent'}" class="uk-nav uk-nav-side left_tabs_lg" >
10 <li data-handle="normal"><a>1、临加班次</a></li> 10 <li data-handle="normal"><a>1、临加班次</a></li>
11 <li data-handle="toAndFro"><a>2、往返</a></li> 11 <li data-handle="toAndFro"><a>2、往返</a></li>
12 - <!--<li data-handle="parkToPark"><a>3、场到场</a></li>--> 12 + <li data-handle="parkToPark"><a>3、场到场</a></li>
13 </ul> 13 </ul>
14 </div> 14 </div>
15 <div class="uk-width-3-4"> 15 <div class="uk-width-3-4">
16 <ul id="tempScheduleContent" class="uk-switcher"> 16 <ul id="tempScheduleContent" class="uk-switcher">
17 <li class="normalCont"></li> 17 <li class="normalCont"></li>
18 <li class="toAndFroCont"></li> 18 <li class="toAndFroCont"></li>
19 - <!--<li></li>--> 19 + <li class="parkToParkCont"></li>
20 </ul> 20 </ul>
21 </div> 21 </div>
22 </div> 22 </div>
@@ -393,6 +393,134 @@ @@ -393,6 +393,134 @@
393 </div> 393 </div>
394 </script> 394 </script>
395 395
  396 +
  397 + <!-- 场到场临加班次 -->
  398 + <script id="add_park2park_sch-form-temp" type="text/html">
  399 + <form class="uk-form uk-form-horizontal">
  400 + <div class="uk-grid">
  401 + <div class="uk-width-1-2">
  402 + <div class="uk-form-row">
  403 + <label class="uk-form-label">班次类型</label>
  404 + <div class="uk-form-controls">
  405 + <select class="form-control" name="bcType">
  406 + <option value="in">进场</option>
  407 + </select>
  408 + </div>
  409 + </div>
  410 + </div>
  411 + <div class="uk-width-1-2">
  412 + <div class="uk-form-row">
  413 + <label class="uk-form-label">上下行</label>
  414 + <div class="uk-form-controls">
  415 + <select name="xlDir">
  416 + <option value="0">上行</option>
  417 + <option value="1">下行</option>
  418 + </select>
  419 + </div>
  420 + </div>
  421 + </div>
  422 + </div>
  423 + <div class="uk-grid">
  424 + <div class="uk-width-1-2">
  425 + <div class="uk-form-row">
  426 + <label class="uk-form-label">起点站</label>
  427 + <div class="uk-form-controls">
  428 + <select name="qdzCode" required>
  429 + </select>
  430 + </div>
  431 + </div>
  432 + </div>
  433 + <div class="uk-width-1-2">
  434 + <div class="uk-form-row">
  435 + <label class="uk-form-label">终点站</label>
  436 + <div class="uk-form-controls">
  437 + <select name="zdzCode" required>
  438 + </select>
  439 + </div>
  440 + </div>
  441 + </div>
  442 + </div>
  443 + <div class="uk-grid">
  444 + <div class="uk-width-1-2">
  445 + <div class="uk-form-row">
  446 + <label class="uk-form-label">开始时间</label>
  447 + <div class="uk-form-controls">
  448 + <input type="time" value="{{zdsj}}" name="fcsj" required>
  449 + </div>
  450 + </div>
  451 + </div>
  452 + <div class="uk-width-1-2">
  453 + <div class="uk-form-row">
  454 + <label class="uk-form-label">结束时间</label>
  455 + <div class="uk-form-controls">
  456 + <input type="time" name="zdsj" value="{{zdsj}}" required>
  457 + </div>
  458 + </div>
  459 + </div>
  460 + </div>
  461 + <div class="uk-grid">
  462 + <div class="uk-width-1-2">
  463 + <div class="uk-form-row">
  464 + <label class="uk-form-label">车辆</label>
  465 + <div class="uk-form-controls">
  466 + <div class="uk-autocomplete uk-form car-autocom">
  467 + <input type="text" value="{{clZbh}}" name="clZbh" required>
  468 + </div>
  469 + </div>
  470 + </div>
  471 + </div>
  472 + <div class="uk-width-1-2">
  473 + <div class="uk-form-row">
  474 + <label class="uk-form-label">里程</label>
  475 + <div class="uk-form-controls">
  476 + <input type="text" name="jhlc" value="{{jhlc}}" max=222 data-fv-lessthan-inclusive="false"
  477 + required>
  478 + </div>
  479 + </div>
  480 + </div>
  481 + </div>
  482 + <div class="uk-grid">
  483 + <div class="uk-width-1-2">
  484 + <div class="uk-form-row">
  485 + <label class="uk-form-label">驾驶员</label>
  486 + <div class="uk-form-controls">
  487 + <div class="uk-autocomplete uk-form jsy-autocom">
  488 + <input type="text" value="{{jGh}}/{{jName}}" name="jsy" required>
  489 + </div>
  490 + </div>
  491 + </div>
  492 + </div>
  493 + <div class="uk-width-1-2">
  494 + <div class="uk-form-row">
  495 + <label class="uk-form-label">售票员</label>
  496 + <div class="uk-form-controls">
  497 + <div class="uk-autocomplete uk-form spy-autocom">
  498 + <input type="text" name="spy" value="{{sGh}}/{{sName}}">
  499 + </div>
  500 + </div>
  501 + </div>
  502 + </div>
  503 + </div>
  504 + <div class="uk-grid">
  505 + <div class="uk-width-1-1">
  506 + <div class="uk-form-row">
  507 + <label class="uk-form-label">备注</label>
  508 + <div class="uk-form-controls">
  509 + <div class="uk-autocomplete uk-form remarks-autocom">
  510 + <input type="text" name="remarks">
  511 + </div>
  512 + </div>
  513 + </div>
  514 + </div>
  515 + </div>
  516 + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
  517 + <span class="ct_line_lp_badge" ></span>
  518 + <button type="button" class="uk-button uk-modal-close">取消</button>
  519 + <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> &nbsp;保存</button>
  520 + </div>
  521 + </form>
  522 + </script>
  523 +
396 <script> 524 <script>
397 (function () { 525 (function () {
398 var modal = '#schedule-addsch-modal', 526 var modal = '#schedule-addsch-modal',
@@ -777,10 +905,69 @@ @@ -777,10 +905,69 @@
777 } 905 }
778 })(); 906 })();
779 907
  908 + /**
  909 + * 场到场
  910 + */
  911 + var parkToParkObj = (function () {
  912 +
  913 + var cont = $('.parkToParkCont', modal);
  914 + var show = function () {
  915 + var formHtml = template('add_park2park_sch-form-temp', sch);
  916 + cont.html(formHtml);
  917 + var f = $('form', cont);
  918 +
  919 + initAutoCom(f);
  920 + //字典转换
  921 + dictionaryUtils.transformDom($('.nt-dictionary', f));
  922 +
  923 + //park options
  924 + var park_opts;
  925 + for (var code in parks)
  926 + park_opts += '<option value="' + code + '">' + parks[code] + '</option>';
  927 + $('[name=qdzCode]', f).html(park_opts);
  928 + $('[name=zdzCode]', f).html(park_opts);
  929 + if(sch.bcType=='in'){
  930 + $('[name=qdzCode]', f).val(sch.zdzCode);
  931 + //选中的也是场到场班次
  932 + if(gb_data_basic.getCarparkByCode(sch.qdzCode) != null){
  933 + //默认做返程
  934 + $('[name=zdzCode]', f).val(sch.qdzCode);
  935 + $('[name=remarks]', f).val(sch.remarks);
  936 + $('[name=jhlc]', f).val(sch.jhlc);
  937 + //时间
  938 + var zdsj = moment(sch.zdsj, 'HH:mm').add('minutes', sch.bcsj).format('HH:mm');
  939 + $('[name=zdsj]', f).val(zdsj);
  940 + }
  941 + }
  942 +
  943 + //校验
  944 + f.formValidation({framework: 'uikit', locale: 'zh_CN'});
  945 + //提交
  946 + f.on('success.form.fv', function (e) {
  947 + e.preventDefault();
  948 +
  949 + disabled_submit_btn(f);
  950 + var data = $(f).serializeJSON();
  951 + submitScheduleForm(data, function (rs) {
  952 + //前端数据更新
  953 + gb_schedule_table.insertSchedule(rs.t, rs.ts);
  954 + $('#schedule-lj_zrw-modal .main-schedule-table').trigger('refresh', {sch: rs.t});
  955 + UIkit.modal(modal).hide();
  956 + });
  957 + });
  958 + $('.ct_line_lp_badge', f).html(sch.xlName + ',&nbsp;'+sch.lpName);
  959 + };
  960 +
  961 + return {
  962 + show: show
  963 + }
  964 + })();
  965 +
780 /** 左 tabs 切换处理*/ 966 /** 左 tabs 切换处理*/
781 var leftTabsHandles = { 967 var leftTabsHandles = {
782 normal: normalObj.show, 968 normal: normalObj.show,
783 - toAndFro: toAndFroObj.show 969 + toAndFro: toAndFroObj.show,
  970 + parkToPark: parkToParkObj.show
784 }; 971 };
785 972
786 //返回另一个走向对应的站点 973 //返回另一个走向对应的站点
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/jhlb.html
@@ -92,7 +92,7 @@ @@ -92,7 +92,7 @@
92 <div class="uk-width-1-1"> 92 <div class="uk-width-1-1">
93 <div class="uk-form-row ct-stacked"> 93 <div class="uk-form-row ct-stacked">
94 <div class="uk-form-controls" style="margin-top: 5px;"> 94 <div class="uk-form-controls" style="margin-top: 5px;">
95 - <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="20" placeholder="烂班说明,不超过20个字符。非必填"></textarea> 95 + <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="20" placeholder="烂班说明,不超过20个字符"></textarea>
96 </div> 96 </div>
97 </div> 97 </div>
98 </div> 98 </div>
src/main/resources/static/real_control_v2/js/common.js
@@ -27,6 +27,30 @@ var gb_common = (function () { @@ -27,6 +27,30 @@ var gb_common = (function () {
27 return rs; 27 return rs;
28 }; 28 };
29 29
  30 + /**
  31 + * 从班次集合里提取驾驶员
  32 + * @param list
  33 + */
  34 + var extractJsy = function (list) {
  35 + var rs = {};
  36 + $.each(list, function () {
  37 + rs[this.jGh + '/' + this.jName]=1;
  38 + });
  39 + return rs;
  40 + };
  41 +
  42 + /**
  43 + * 从班次集合里提取路牌
  44 + * @param list
  45 + */
  46 + var extractLpName = function (list) {
  47 + var rs = {};
  48 + $.each(list, function () {
  49 + rs[this.lpName]=1;
  50 + });
  51 + return rs;
  52 + };
  53 +
30 var compileTempByDom = function (dom, opts) { 54 var compileTempByDom = function (dom, opts) {
31 var tps = {}, 55 var tps = {},
32 id; 56 id;
@@ -334,6 +358,8 @@ var gb_common = (function () { @@ -334,6 +358,8 @@ var gb_common = (function () {
334 return { 358 return {
335 reqCode80: reqCode80, 359 reqCode80: reqCode80,
336 groupBy: groupBy, 360 groupBy: groupBy,
  361 + extractJsy: extractJsy,
  362 + extractLpName: extractLpName,
337 compileTempByDom: compileTempByDom, 363 compileTempByDom: compileTempByDom,
338 $get: $get, 364 $get: $get,
339 $post: $post, 365 $post: $post,
src/main/resources/static/real_control_v2/js/data/data_basic.js
@@ -57,11 +57,12 @@ var gb_data_basic = (function () { @@ -57,11 +57,12 @@ var gb_data_basic = (function () {
57 function loadAllPersonnel(cb) { 57 function loadAllPersonnel(cb) {
58 $.get('/basic/all_personnel', function (rs) { 58 $.get('/basic/all_personnel', function (rs) {
59 //转换成自动补全组件需要的数据 59 //转换成自动补全组件需要的数据
60 - var data = [], name; 60 + var data = [], name, code;
61 for (var jobCode in rs) { 61 for (var jobCode in rs) {
62 name = rs[jobCode]; 62 name = rs[jobCode];
  63 + code = jobCode.indexOf('-')!=-1?jobCode.split('-')[1]:jobCode;
63 data.push({ 64 data.push({
64 - value: jobCode + '/' + name, 65 + value: code + '/' + name,
65 fullChars: pinyin.getFullChars(name).toUpperCase(), 66 fullChars: pinyin.getFullChars(name).toUpperCase(),
66 camelChars: pinyin.getCamelChars(name) 67 camelChars: pinyin.getCamelChars(name)
67 }); 68 });
src/main/resources/static/real_control_v2/js/home/context_menu.js
@@ -64,6 +64,9 @@ var gb_home_context_menu = (function() { @@ -64,6 +64,9 @@ var gb_home_context_menu = (function() {
64 64
65 //form submit 65 //form submit
66 var f = $('form', modal).formValidation(gb_form_validation_opts); 66 var f = $('form', modal).formValidation(gb_form_validation_opts);
  67 + $('.common_phrase_sel', f).on('change', function () {
  68 + $('[name=text]', f).text($(this).val());
  69 + });
67 f.on('success.form.fv', function(e) { 70 f.on('success.form.fv', function(e) {
68 e.preventDefault(); 71 e.preventDefault();
69 ajaxPostPhrase(f.serializeJSON(), function() { 72 ajaxPostPhrase(f.serializeJSON(), function() {
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
@@ -407,7 +407,6 @@ var gb_schedule_table = (function () { @@ -407,7 +407,6 @@ var gb_schedule_table = (function () {
407 tempDL.addClass('relevance-active'); 407 tempDL.addClass('relevance-active');
408 if (i < schArr.length - 1 && this.id == id) { 408 if (i < schArr.length - 1 && this.id == id) {
409 nextSch = schArr[i + 1]; 409 nextSch = schArr[i + 1];
410 - //tempDL.addClass('intimity');  
411 } 410 }
412 }); 411 });
413 412
src/main/resources/static/real_control_v2/js/line_schedule/search.js
@@ -7,7 +7,7 @@ var gb_sch_search = (function() { @@ -7,7 +7,7 @@ var gb_sch_search = (function() {
7 ' {{~items}}' + 7 ' {{~items}}' +
8 ' <li data-value="{{ $item.value }}">' + 8 ' <li data-value="{{ $item.value }}">' +
9 ' <a>' + 9 ' <a>' +
10 - ' {{ $item.value }}' + 10 + ' {{ $item.text }}' +
11 ' <small >{{$item.exec}}</small>' + 11 ' <small >{{$item.exec}}</small>' +
12 ' <small class="search-result-desc">{{{ $item.desc }}}</small>' + 12 ' <small class="search-result-desc">{{{ $item.desc }}}</small>' +
13 ' </a>' + 13 ' </a>' +
@@ -17,7 +17,7 @@ var gb_sch_search = (function() { @@ -17,7 +17,7 @@ var gb_sch_search = (function() {
17 '</script>'; 17 '</script>';
18 18
19 var ips = '.search_sch_panel input', 19 var ips = '.search_sch_panel input',
20 - _input, schArr, lineCode, group_cars; 20 + _input, schArr, lineCode, group_cars, lp_pinyins, jsy_pinyins, searchType;
21 $(document) 21 $(document)
22 .on('focus', ips, function() { 22 .on('focus', ips, function() {
23 $(this).parent().addClass('active'); 23 $(this).parent().addClass('active');
@@ -25,16 +25,36 @@ var gb_sch_search = (function() { @@ -25,16 +25,36 @@ var gb_sch_search = (function() {
25 schArr = gb_common.get_vals(gb_schedule_table.findScheduleByLine(lineCode)); 25 schArr = gb_common.get_vals(gb_schedule_table.findScheduleByLine(lineCode));
26 26
27 group_cars = gb_common.groupBy(schArr, 'clZbh'); 27 group_cars = gb_common.groupBy(schArr, 'clZbh');
  28 + var group_lp = gb_common.extractLpName(schArr);
  29 + //路牌对照
  30 + lp_pinyins = [];
  31 + for(var lp in group_lp){
  32 + lp_pinyins.push({
  33 + fullChars: pinyin.getFullChars(lp).toUpperCase(),
  34 + camelChars: pinyin.getCamelChars(lp),
  35 + lp: lp
  36 + });
  37 + }
  38 + //驾驶员对照
  39 + /* var group_jsy = gb_common.extractJsy(schArr);
  40 + jsy_pinyins = [];
  41 + for(var jsy in group_jsy){
  42 + jsy_pinyins.push({
  43 + fullChars: pinyin.getFullChars(jsy).toUpperCase(),
  44 + camelChars: pinyin.getCamelChars(jsy),
  45 + val: jsy
  46 + });
  47 + }*/
28 _input = $(this); 48 _input = $(this);
29 }) 49 })
30 .on('blur', ips, function() { 50 .on('blur', ips, function() {
31 if ($(this).val() == ''){ 51 if ($(this).val() == ''){
32 - reset_all(); 52 + reset_all($(this).parents('li.line_schedule'));
33 } 53 }
34 }); 54 });
35 55
36 $(document).on('click', '.search_sch_panel i.cancel', function(){ 56 $(document).on('click', '.search_sch_panel i.cancel', function(){
37 - reset_all(); 57 + reset_all($(this).parents('li.line_schedule'));
38 }); 58 });
39 59
40 var elements = '.search_sch_panel .sch-search-autocom'; 60 var elements = '.search_sch_panel .sch-search-autocom';
@@ -56,16 +76,21 @@ var gb_sch_search = (function() { @@ -56,16 +76,21 @@ var gb_sch_search = (function() {
56 }).on('selectitem.uk.autocomplete', selectitem); 76 }).on('selectitem.uk.autocomplete', selectitem);
57 } 77 }
58 78
59 - var autocomplete_source = function(release) {  
60 - var rs = [],  
61 - v = _input.val().toUpperCase(),  
62 - gps, yfwf_map = gb_schedule_table.car_yfwf_map(lineCode);  
63 - 79 + /**
  80 + * 车辆搜索函数
  81 + * @param v
  82 + * @param release
  83 + */
  84 + var searchCar = function (v, release) {
  85 + var rs = [], gps;
  86 + //应发未发数据
  87 + var yfwf_map = gb_schedule_table.car_yfwf_map(lineCode);
64 for (var car in group_cars) { 88 for (var car in group_cars) {
65 if (car.indexOf(v) != -1) { 89 if (car.indexOf(v) != -1) {
66 //车辆对应的gps 90 //车辆对应的gps
67 gps = gb_data_gps.findGpsByNbbm(car) 91 gps = gb_data_gps.findGpsByNbbm(car)
68 rs.push({ 92 rs.push({
  93 + text: car,
69 value: car, 94 value: car,
70 desc: '应发未发:' + (yfwf_map[car] == null ? 0 : yfwf_map[car]), 95 desc: '应发未发:' + (yfwf_map[car] == null ? 0 : yfwf_map[car]),
71 exec: execSch(gps) 96 exec: execSch(gps)
@@ -73,14 +98,123 @@ var gb_sch_search = (function() { @@ -73,14 +98,123 @@ var gb_sch_search = (function() {
73 } 98 }
74 } 99 }
75 100
  101 + searchType = 'car';
  102 + release && release(rs);
  103 + }
  104 +
  105 + /**
  106 + * 路牌搜索函数
  107 + * @param v
  108 + * @param release
  109 + */
  110 + var searchLp = function (v, release) {
  111 + var rs = [];
  112 + v = v.split('LP')[1];
  113 +
  114 + $.each(lp_pinyins, function () {
  115 + if(this.lp.indexOf(v) != -1 || this.fullChars.indexOf(v) != -1 || this.camelChars.indexOf(v) != -1){
  116 + rs.push({
  117 + text: this.lp,
  118 + value: 'lp' + this.lp,
  119 + desc: '',
  120 + exec: '路牌'
  121 + });
  122 + }
  123 + });
  124 + searchType = 'lp';
76 release && release(rs); 125 release && release(rs);
77 } 126 }
78 127
79 - var reset_all = function() {  
80 - var cont = 'li.line_schedule[data-id=' + lineCode + ']'; 128 + /**
  129 + * 按时间范围搜索
  130 + */
  131 + var dt = 1000 * 60 * 60 * 24;
  132 + var gbRange = {};
  133 + var searchTimeRange = function (v, release) {
  134 + var sm, em, text,value, fs = 'HH:mm',fs2='HHmm';
  135 + var start = v.indexOf('ST')==0;
  136 + var ei = v.indexOf('ET');
  137 + var end = ei!=-1 && v.length > ei + 2;
  138 +
  139 + if(start && !end){
  140 + sm = strToTime(v.substr(2));
  141 + text = '搜索' + sm.format(fs) + '之后的班次';
  142 + value = 'st' + sm.format(fs2);
  143 + }
  144 + else if(!start && end){
  145 + em = strToTime(v.substr(2));
  146 + text = '搜索' + em.format(fs) + '之前的班次';
  147 + value = 'et' + em.format(fs2);
  148 + }
  149 + else if(start && end){
  150 + sm = strToTime(v.substring(2, ei));
  151 + em = strToTime(v.substr(ei + 2));
  152 + text = '搜索' + sm.format(fs) + ' 至 ' + em.format(fs) + '之间的班次';
  153 + value = 'st' + sm.format(fs2) + 'et' + em.format(fs2);
  154 + }
  155 +
  156 + var threeBefore = moment().format('HH') < '02';
  157 +
  158 + if(sm) {
  159 + gbRange.st = sm.format('x');
  160 + if (threeBefore)
  161 + gbRange.st -= dt;
  162 + }
  163 + if(em){
  164 + gbRange.et = em.format('x');
  165 + if (threeBefore)
  166 + gbRange.et -= dt;
  167 + }
  168 + searchType = 'timeRange';
  169 + release && release([{
  170 + text: text,
  171 + value: value,
  172 + desc: '',
  173 + exec: ''
  174 + }]);
  175 + }
  176 +
  177 + /**
  178 + * 按驾驶员搜索
  179 +
  180 + var searchJsy = function (v, release) {
  181 + var rs = [];
  182 + v = v.split('JSY')[1];
  183 +
  184 + $.each(jsy_pinyins, function () {
  185 + if(this.val.indexOf(v) != -1 || this.fullChars.indexOf(v) != -1 || this.camelChars.indexOf(v) != -1){
  186 + rs.push({
  187 + text: this.val,
  188 + value: 'jsy' + this.val,
  189 + desc: '',
  190 + exec: '驾驶员'
  191 + });
  192 + }
  193 + });
  194 + searchType = 'jsy';
  195 + release && release(rs);
  196 + }*/
  197 +
  198 + var defaultHandler = searchCar;
  199 + var searchHandlerMapp = {'LP': searchLp/*,'JSY': searchJsy*/, 'ST': searchTimeRange, 'ET': searchTimeRange};
  200 + var autocomplete_source = function(release) {
  201 + var v = _input.val().toUpperCase();
  202 +
  203 + for(var k in searchHandlerMapp){
  204 + if(v.indexOf(k) == 0 && v!=k){
  205 + searchHandlerMapp[k](v, release);
  206 + return;
  207 + }
  208 + }
  209 + //搜索车辆
  210 + searchCar(v, release);
  211 + }
  212 +
  213 + var reset_all = function(cont) {
  214 + //var cont = 'li.line_schedule[data-id=' + lineCode + ']';
81 //uikit 会记住上一次搜索值,触发keyup以清空该值 215 //uikit 会记住上一次搜索值,触发keyup以清空该值
82 $('.sch-search-autocom input', cont).val('').trigger('keyup').parent().removeClass('active'); 216 $('.sch-search-autocom input', cont).val('').trigger('keyup').parent().removeClass('active');
83 - $('.line-schedule-table .ct_table_body dl._search_hide', cont).removeClass('_search_hide'); 217 + $('.line-schedule-table .ct_table_body', cont).removeClass('search_result_body').find('dl._search_hide').removeClass('_search_hide');
84 //更新滚动条高度 218 //更新滚动条高度
85 $('.ct_table_wrap', cont).perfectScrollbar('update'); 219 $('.ct_table_wrap', cont).perfectScrollbar('update');
86 } 220 }
@@ -98,13 +232,28 @@ var gb_sch_search = (function() { @@ -98,13 +232,28 @@ var gb_sch_search = (function() {
98 var cont = 'li.line_schedule[data-id=' + lineCode + ']', 232 var cont = 'li.line_schedule[data-id=' + lineCode + ']',
99 tbodys = $('.line-schedule-table .ct_table_body', cont); 233 tbodys = $('.line-schedule-table .ct_table_body', cont);
100 234
  235 + tbodys.addClass('search_result_body');
101 $('.sch-search-autocom input', cont).val(data.value).parent().addClass('active'); 236 $('.sch-search-autocom input', cont).val(data.value).parent().addClass('active');
102 237
  238 + var v = splitVal(data.value, searchType);
103 $.each(tbodys, function() { 239 $.each(tbodys, function() {
104 - filterScheduleByNbbm(this, data.value); 240 + if(searchType=='car')
  241 + filterScheduleByNbbm(this, v);
  242 + if(searchType=='lp')
  243 + filterScheduleByLpName(this, v);
  244 + if(searchType=='timeRange')
  245 + filterScheduleByTimeRange(this);
  246 + /*if(searchType=='jsy')
  247 + filterScheduleByJsy(this, v);*/
105 }); 248 });
  249 + gbRange = {};
106 } 250 }
107 251
  252 + /**
  253 + * 根据车辆过滤表格
  254 + * @param tbody
  255 + * @param car
  256 + */
108 var filterScheduleByNbbm = function(tbody, car) { 257 var filterScheduleByNbbm = function(tbody, car) {
109 var dls = $('dl', tbody), 258 var dls = $('dl', tbody),
110 dds; 259 dds;
@@ -119,6 +268,111 @@ var gb_sch_search = (function() { @@ -119,6 +268,111 @@ var gb_sch_search = (function() {
119 $(tbody).parents('.ct_table_wrap')[0].scrollTop = 0; 268 $(tbody).parents('.ct_table_wrap')[0].scrollTop = 0;
120 } 269 }
121 270
  271 + /**
  272 + * 根据路牌过滤表格
  273 + * @param tbody
  274 + * @param lpName
  275 + */
  276 + var filterScheduleByLpName = function (tbody, lpName) {
  277 + var dls = $('dl', tbody),
  278 + dds;
  279 + dls.removeClass('_search_hide');
  280 + $.each(dls, function() {
  281 + dds = $('dd', this);
  282 + if (lpName != $('a', dds[1]).text())
  283 + $(this).addClass('_search_hide');
  284 + });
  285 +
  286 + //滚动条置顶
  287 + $(tbody).parents('.ct_table_wrap')[0].scrollTop = 0;
  288 + }
  289 +
  290 + /**
  291 + * 根据时间范围过滤表格
  292 + * @param tbody
  293 + */
  294 + var filterScheduleByTimeRange = function (tbody) {
  295 + var dls = $('dl', tbody),
  296 + dds;
  297 + dls.removeClass('_search_hide');
  298 + $.each(dls, function() {
  299 + dds = $('dd', this);
  300 + var t = $(dds[6]).data('sort-val');
  301 + if((gbRange.st && t < gbRange.st)
  302 + || (gbRange.et && t > gbRange.et)){
  303 + $(this).addClass('_search_hide');
  304 + }
  305 + });
  306 +
  307 + //滚动条置顶
  308 + $(tbody).parents('.ct_table_wrap')[0].scrollTop = 0;
  309 + }
  310 +
  311 + /**
  312 + * 根据驾驶员过滤表格
  313 +
  314 + var filterScheduleByJsy = function (tbody, jsy) {
  315 +
  316 + }*/
  317 +
  318 +
  319 + function splitVal(v, type) {
  320 + if(type=='car')
  321 + return v;
  322 + if(type=='lp')
  323 + return v.split('lp')[1];
  324 + }
  325 +
  326 + function strToTime(str) {
  327 + var len=str.length, array=new Array(2);
  328 + str = str.replace(new RegExp(':','gm'),':');
  329 + if(str.indexOf(':') != -1){
  330 + array = str.split(':');
  331 + array[0] = splitBefore(array[0], 2);
  332 + array[1] = splitBefore(array[1], 2);
  333 + }
  334 + else{
  335 + if(len == 1)
  336 + str = '0'+str+'00';
  337 + else {
  338 + str = splitBefore2(str);
  339 + }
  340 + array[0] = str.substr(0, 2);
  341 + array[1] = str.substr(2, 2);
  342 + }
  343 +
  344 + return moment(array[0]+array[1], 'HHmm');
  345 + }
  346 +
  347 + function splitBefore(str, size) {
  348 + var len = str.length;
  349 + if(len==size)
  350 + return str;
  351 + else if(len > size)
  352 + return str.substr(0, 2);
  353 + else{
  354 + var coverStr='';
  355 + var c = size - len;
  356 + for(var i = 0; i < c; i ++)
  357 + coverStr+='0';
  358 + return coverStr + str;
  359 + }
  360 + }
  361 +
  362 + function splitBefore2(str, size) {
  363 + var len = str.length;
  364 + if(len==size)
  365 + return str;
  366 + else if(len > size)
  367 + return str.substr(0, 2);
  368 + else{
  369 + var coverStr='';
  370 + var c = size - len;
  371 + for(var i = 0; i < c; i ++)
  372 + coverStr+='0';
  373 + return str + coverStr;
  374 + }
  375 + }
122 return { 376 return {
123 init: init 377 init: init
124 }; 378 };
src/main/resources/static/real_control_v2/js/main.js
@@ -171,8 +171,8 @@ var disabled_submit_btn = function (form) { @@ -171,8 +171,8 @@ var disabled_submit_btn = function (form) {
171 function showUpdateDescription() { 171 function showUpdateDescription() {
172 //更新说明 172 //更新说明
173 var updateDescription = { 173 var updateDescription = {
174 - date: '2017-04-25',  
175 - text: '<h5>临加班次功能扩展!</h5>' 174 + date: '2017-04-26',
  175 + text: '<h5>临加班次新增一项场到场</h5><h5>搜索框可按路牌搜索,lp 打头,st 和 et打头可搜索时间范围</h5>'
176 }; 176 };
177 177
178 var storage = window.localStorage 178 var storage = window.localStorage
src/test/resources/testdata/problem.properties
@@ -11,4 +11,7 @@ @@ -11,4 +11,7 @@
11 ##11=人员基础信息导入问题,工号前要加公司代码 11 ##11=人员基础信息导入问题,工号前要加公司代码
12 12=套跑规则嵌入到主排班规则中 12 12=套跑规则嵌入到主排班规则中
13 13=导入数据功能,需要加用户名 13 13=导入数据功能,需要加用户名
14 -14=路牌编号自动生成  
15 \ No newline at end of file 14 \ No newline at end of file
  15 +14=路牌编号自动生成
  16 +15=时刻表导入的时候表头后面不需要加数字
  17 +16=时间框中文
  18 +