Commit a18cd45479d16b585691847399afff885978a133

Authored by 廖磊
2 parents d942ede2 d274d563

Merge branch 'minhang' of

http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing 37 changed files with 2197 additions and 821 deletions
src/main/java/com/bsth/controller/traffic/VehicleInoutStopController.java
... ... @@ -2,8 +2,17 @@ package com.bsth.controller.traffic;
2 2  
3 3 import com.bsth.controller.BaseController;
4 4 import com.bsth.entity.traffic.VehicleInoutStop;
  5 +import com.bsth.service.traffic.VehicleInoutStopService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.data.domain.Page;
  8 +import org.springframework.data.domain.PageImpl;
  9 +import org.springframework.data.domain.PageRequest;
5 10 import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RequestParam;
6 12 import org.springframework.web.bind.annotation.RestController;
  13 +
  14 +import java.util.Map;
  15 +
7 16 /**
8 17 *
9 18 * @author BSTH
... ... @@ -12,4 +21,26 @@ import org.springframework.web.bind.annotation.RestController;
12 21 @RestController
13 22 @RequestMapping("vehicle_stop")
14 23 public class VehicleInoutStopController extends BaseController<VehicleInoutStop,Integer> {
  24 +
  25 + @Autowired
  26 + VehicleInoutStopService vehicleInoutStopService;
  27 +
  28 + /**
  29 + * 给定条件查车载上报停靠站
  30 + * @param map
  31 + * @param page
  32 + * @param size
  33 + * @return
  34 + */
  35 + @RequestMapping(value = "getVehicleInoutStopByParam")
  36 + public Page<Map<String, Object>> getVehicleInoutStopByParam(@RequestParam Map<String, Object> map,
  37 + @RequestParam(defaultValue = "0") int page,
  38 + @RequestParam(defaultValue = "10") int size) {
  39 + map.put("page",page);
  40 + map.put("size",size);
  41 + long total = vehicleInoutStopService.getVehicleInoutStopCountByParam(map);
  42 + Page<Map<String, Object>> result = new PageImpl<>(vehicleInoutStopService.getVehicleInoutStopByParam(map),
  43 + new PageRequest(page, size, null),total);
  44 + return result;
  45 + }
15 46 }
... ...
src/main/java/com/bsth/data/pilot80/PilotReport.java
... ... @@ -156,7 +156,7 @@ public class PilotReport {
156 156 if (d80.getConfirmRs() == 0) {
157 157 String nbbm = BasicData.deviceId2NbbmMap.get(d80.getDeviceId());
158 158  
159   - ScheduleRealInfo sch = dayOfSchedule.nextByBcType(nbbm, "out");
  159 + ScheduleRealInfo sch = dayOfSchedule.searchNearByBcType(nbbm, "out");
160 160 if (null == sch)
161 161 return;
162 162  
... ...
src/main/java/com/bsth/entity/schedule/rule/ScheduleRule1Flat.java
... ... @@ -73,13 +73,29 @@ public class ScheduleRule1Flat extends BEntity {
73 73 @NotNull
74 74 private Integer ryStart;
75 75  
76   - /** 翻班格式(类似格式:1110011)*/
  76 + /** 翻班格式(类似格式:1110011),其中0表示当天不做跳过,1表示跳 */
77 77 private String fbgs;
78 78  
  79 + @Enumerated(EnumType.ORDINAL)
  80 + private FbgsTypeEnum fbtype = FbgsTypeEnum.TIMETABLEMODE;
  81 +
79 82 /** 备注 */
80 83 @Column(length = 1000)
81 84 private String remark;
82 85  
  86 + /** 翻班格式类型 */
  87 + public static enum FbgsTypeEnum {
  88 + /**
  89 + * 时刻表模式,当前翻到的路牌如果在当前时刻表中不存在,则跳过
  90 + */
  91 + TIMETABLEMODE,
  92 + /**
  93 + * 翻班格式模式,使用格式决定跳不跳过翻班,
  94 + * 翻班格式(类似格式:1110011),其中0表示当天不做跳过,1表示跳
  95 + */
  96 + FBGSMODE;
  97 + }
  98 +
83 99 public Long getId() {
84 100 return id;
85 101 }
... ... @@ -175,4 +191,12 @@ public class ScheduleRule1Flat extends BEntity {
175 191 public void setRemark(String remark) {
176 192 this.remark = remark;
177 193 }
  194 +
  195 + public FbgsTypeEnum getFbtype() {
  196 + return fbtype;
  197 + }
  198 +
  199 + public void setFbtype(FbgsTypeEnum fbtype) {
  200 + this.fbtype = fbtype;
  201 + }
178 202 }
... ...
src/main/java/com/bsth/entity/traffic/VehicleInoutStop.java
1 1 package com.bsth.entity.traffic;
2 2  
3   -import com.bsth.entity.Cars;
4   -import com.bsth.entity.Line;
5   -
6 3 import javax.persistence.*;
7 4 import java.util.Date;
8 5  
... ... @@ -27,11 +24,9 @@ public class VehicleInoutStop {
27 24 @GeneratedValue(strategy = GenerationType.IDENTITY)
28 25 private Integer id;
29 26  
30   - @ManyToOne
31   - private Line line;
  27 + private int line;
32 28  
33   - @ManyToOne
34   - private Cars cars;
  29 + private int cars;
35 30  
36 31 // 站点序号
37 32 private Integer stop;
... ... @@ -46,7 +41,7 @@ public class VehicleInoutStop {
46 41 private Integer inOutStop;
47 42  
48 43 // 上报时间
49   - private long reportDate;
  44 + private Date reportDate;
50 45  
51 46 public Integer getId() {
52 47 return id;
... ... @@ -56,19 +51,19 @@ public class VehicleInoutStop {
56 51 this.id = id;
57 52 }
58 53  
59   - public Line getLine() {
  54 + public int getLine() {
60 55 return line;
61 56 }
62 57  
63   - public void setLine(Line line) {
  58 + public void setLine(int line) {
64 59 this.line = line;
65 60 }
66 61  
67   - public Cars getCars() {
  62 + public int getCars() {
68 63 return cars;
69 64 }
70 65  
71   - public void setCars(Cars cars) {
  66 + public void setCars(int cars) {
72 67 this.cars = cars;
73 68 }
74 69  
... ... @@ -104,7 +99,11 @@ public class VehicleInoutStop {
104 99 this.inOutStop = inOutStop;
105 100 }
106 101  
107   - public long getReportDate() { return reportDate; }
  102 + public Date getReportDate() {
  103 + return reportDate;
  104 + }
108 105  
109   - public void setReportDate(long reportDate) { this.reportDate = reportDate; }
  106 + public void setReportDate(Date reportDate) {
  107 + this.reportDate = reportDate;
  108 + }
110 109 }
... ...
src/main/java/com/bsth/repository/StationRouteRepository.java
... ... @@ -273,6 +273,17 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
273 273 "and s.lineCode in(select lineCode from Line where inUse = 1) " +
274 274 "ORDER BY " +
275 275 "lineCode,directions,stationRouteCode")
  276 + List<Map<String, String>> findLineWithYgcAndInuse();
  277 +
  278 + @Query("SELECT new map(" +
  279 + "lineCode as lineCode,directions as directions,stationName as stationName,stationCode as stationCode," +
  280 + "line.linePlayType as linePlayType,s.stationMark as stationMark) " +
  281 + "FROM " +
  282 + "StationRoute s " +
  283 + "WHERE " +
  284 + "s.destroy = 0 " +
  285 + "ORDER BY " +
  286 + "lineCode,directions,stationRouteCode")
276 287 List<Map<String, String>> findAllLineWithYgc();
277 288  
278 289 @Modifying
... ...
src/main/java/com/bsth/service/excep/impl/NowSpeedingServiceImpl.java
... ... @@ -129,20 +129,19 @@ public class NowSpeedingServiceImpl implements NowSpeedingService {
129 129 @Override
130 130 public PageObject<Speeding> Pagequery(Map<String, Object> map) {
131 131 String sql="select count(*) record from bsth_c_speeding_handle where 1=1 ";
132   - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  132 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
133 133 Object line=map.get("line");
134 134 Object updown=map.get("updown");
135 135 Object startDate=map.get("startDate");
136 136 Object endDate=map.get("endDate");
137 137 Object times=map.get("times");
138   -
139   - if(line!=null){
  138 + if(line!=null && line != ""){
140 139 sql +=" and line like'%"+line.toString().trim()+"%'";
141 140 }
142   - if(updown!=null){
  141 + if(updown!=null && updown != ""){
143 142 sql +="and up_down like '%"+updown.toString()+"%'";
144 143 }
145   - if(startDate!=null){
  144 + if(startDate!=null && startDate != ""){
146 145 if (startDate.toString().length()>0) {
147 146 try {
148 147 Long t1 = sdf.parse(startDate.toString()+" 00:00:00").getTime();
... ... @@ -152,7 +151,7 @@ public class NowSpeedingServiceImpl implements NowSpeedingService {
152 151 }
153 152 }
154 153 }
155   - if(endDate!=null){
  154 + if(endDate!=null && endDate != ""){
156 155 if (endDate.toString().length()>0) {
157 156 try {
158 157 Long t2=sdf.parse(endDate.toString()+" 23:59:59").getTime();
... ... @@ -163,7 +162,7 @@ public class NowSpeedingServiceImpl implements NowSpeedingService {
163 162 }
164 163 }
165 164  
166   - if(times!=null && times.toString().length()>0){
  165 + if(times!=null && times.toString().length()>0 && times != ""){
167 166 sql +=" and (endTimestamp-startTimestamp) >="+Integer.valueOf(times.toString())*1000;
168 167 }
169 168  
... ...
src/main/java/com/bsth/service/schedule/rules/shiftloop/ScheduleRule_input.java
... ... @@ -34,7 +34,9 @@ public class ScheduleRule_input {
34 34 /** 车辆配置id */
35 35 private String carConfigId;
36 36  
37   - /** 车辆翻版(周一到周日是否启用) */
  37 + /** 翻班模式 */
  38 + private Integer fbtype;
  39 + /** 车辆翻班(周一到周日是否启用,可能是多个星期的组合,有的翻班是做六休一加做五休二) */
38 40 private List<Boolean> weekdays = new ArrayList<>();
39 41  
40 42 /** 排班输入规则类型 */
... ... @@ -66,19 +68,30 @@ public class ScheduleRule_input {
66 68 this.carConfigId = String.valueOf(scheduleRule1Flat.getCarConfigInfo().getId());
67 69  
68 70 /** 车辆翻版(周一到周日是否启用)*/
69   - String fbgs_temp = null;
70   - if (StringUtils.isEmpty(scheduleRule1Flat.getFbgs()) || "1".equals(scheduleRule1Flat.getFbgs())) {
71   - fbgs_temp = "1,1,1,1,1,1,1";
  71 + if (scheduleRule1Flat.getFbtype() == null || scheduleRule1Flat.getFbtype() == ScheduleRule1Flat.FbgsTypeEnum.TIMETABLEMODE) {
  72 + fbtype = ScheduleRule1Flat.FbgsTypeEnum.TIMETABLEMODE.ordinal();
  73 + weekdays.add(true);
72 74 } else {
73   - fbgs_temp = "1,1,1,1,1,0,0";
74   -// fbgs_temp = scheduleRule1Flat.getFbgs();
75   - }
76   - String[] days = fbgs_temp.split(",");
77   - for (int i = 0; i < 7; i++) {
78   - if ("1".equals(days[i])) {
  75 + fbtype = ScheduleRule1Flat.FbgsTypeEnum.FBGSMODE.ordinal();
  76 + if (StringUtils.isEmpty(scheduleRule1Flat.getFbgs())) { // 全1
79 77 weekdays.add(true);
80   - } else {
81   - weekdays.add(false);
  78 + } else if (scheduleRule1Flat.getFbgs().indexOf(",") >= 0) { // 逗号分隔
  79 + for (String fb : scheduleRule1Flat.getFbgs().split(",")) {
  80 + if ("1".equals(fb)) {
  81 + weekdays.add(true);
  82 + } else {
  83 + weekdays.add(false);
  84 + }
  85 + }
  86 + } else { // 一个一个字符分隔
  87 + for (int i = 0; i < scheduleRule1Flat.getFbgs().length(); i++) {
  88 + if ("1".equals(scheduleRule1Flat.getFbgs().substring(i, i + 1))) {
  89 + weekdays.add(true);
  90 + } else {
  91 + weekdays.add(false);
  92 + }
  93 + }
  94 +
82 95 }
83 96 }
84 97  
... ... @@ -174,4 +187,12 @@ public class ScheduleRule_input {
174 187 public void setsType(ScheduleRule_Type sType) {
175 188 this.sType = sType;
176 189 }
  190 +
  191 + public Integer getFbtype() {
  192 + return fbtype;
  193 + }
  194 +
  195 + public void setFbtype(Integer fbtype) {
  196 + this.fbtype = fbtype;
  197 + }
177 198 }
... ...
src/main/java/com/bsth/service/traffic/VehicleInoutStopService.java
... ... @@ -3,10 +3,26 @@ package com.bsth.service.traffic;
3 3 import com.bsth.entity.traffic.VehicleInoutStop;
4 4 import com.bsth.service.BaseService;
5 5  
  6 +import java.util.List;
  7 +import java.util.Map;
  8 +
6 9  
7 10 /**
8 11 * 时刻模板上传日志
9 12 */
10 13 public interface VehicleInoutStopService extends BaseService<VehicleInoutStop,Integer> {
11 14  
  15 + /**
  16 + * 给定条件查车载上报停靠站
  17 + * @param map
  18 + * @return
  19 + */
  20 + List<Map<String, Object>> getVehicleInoutStopByParam(Map<String,Object> map);
  21 +
  22 + /**
  23 + * 给定条件查车载上报停靠站的记录数
  24 + * @param map
  25 + * @return
  26 + */
  27 + long getVehicleInoutStopCountByParam(Map<String,Object> map);
12 28 }
... ...
src/main/java/com/bsth/service/traffic/impl/VehicleInoutStopServiceImpl.java
... ... @@ -3,10 +3,14 @@ package com.bsth.service.traffic.impl;
3 3 import com.bsth.entity.traffic.VehicleInoutStop;
4 4 import com.bsth.service.impl.BaseServiceImpl;
5 5 import com.bsth.service.traffic.VehicleInoutStopService;
6   -import org.slf4j.Logger;
7   -import org.slf4j.LoggerFactory;
  6 +import com.bsth.util.DateUtils;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.jdbc.core.JdbcTemplate;
8 9 import org.springframework.stereotype.Service;
9 10  
  11 +import java.util.List;
  12 +import java.util.Map;
  13 +
10 14 /**
11 15 *
12 16 * @ClassName: TrafficManageServiceImpl(运管处接口service业务层实现类)
... ... @@ -26,6 +30,70 @@ import org.springframework.stereotype.Service;
26 30 @Service
27 31 public class VehicleInoutStopServiceImpl extends BaseServiceImpl<VehicleInoutStop,Integer> implements VehicleInoutStopService {
28 32  
29   - Logger logger = LoggerFactory.getLogger(this.getClass());
  33 + @Autowired
  34 + JdbcTemplate jdbcTemplate;
  35 +
  36 + /**
  37 + * 拼装sql
  38 + * @param map
  39 + * @param flag
  40 + * @return
  41 + */
  42 + private String packageParam(Map<String,Object> map,String flag){
  43 + StringBuffer sql = new StringBuffer(" where 1 = 1 ");
  44 + String lineId = map.get("lineId")+"";
  45 + String insideCode = map.get("insideCode")+"";
  46 + String carPlate = map.get("carPlate")+"";
  47 + String reportDate_start = map.get("reportDate_start")+"";
  48 + String reportDate_end = map.get("reportDate_end")+"";
  49 + int page = Integer.valueOf(map.get("page")+"");
  50 + int size = Integer.valueOf(map.get("size")+"");
  51 + String order = " order by report_date asc"+ " LIMIT "+page*size+","+size;
  52 + int dayNum = DateUtils.calcDaynumberInYear(reportDate_start.substring(0,8)) -1;
  53 + if(!lineId.equals("")){
  54 + sql.append(" and l.id = ").append(lineId);
  55 + }
  56 + if(!insideCode.equals("")){
  57 + sql.append(" and c.inside_code = ").append("'").append(insideCode.toUpperCase()).append("'");
  58 + }
  59 + if(!carPlate.equals("")){
  60 + sql.append(" and c.car_plate = ").append("'").append("沪").append(carPlate.substring(0,1)).append("-")
  61 + .append(carPlate.substring(1)).append("'");
  62 + }
  63 + sql.append(" and FROM_UNIXTIME(REPORT_DATE/1000,'%Y%m%d%H') between '").append(reportDate_start).
  64 + append("' and '").append(reportDate_end).append("'").append(" and r.day_year = ").append(dayNum);
  65 + if(flag.equals("count")){
  66 + return sql.toString();
  67 + }else{
  68 + return sql + order;
  69 + }
  70 + }
  71 +
  72 + /**
  73 + * 给定条件查车载上报停靠站
  74 + * @param map
  75 + * @return
  76 + */
  77 + public List<Map<String, Object>> getVehicleInoutStopByParam(Map<String,Object> map){
  78 + String sql = "SELECT c.branche_company,c.company,l.name,l.shanghai_linecode,inside_code,equipment_code,car_plate," +
  79 + "if( r.service_state= 0,'营运','停运') as service_state ," +
  80 + "if( r.up_down= 0,'上行','下行') as up_down ," +
  81 + "if( r.in_out_stop= 0,'站内','站外') as in_out_stop , " +
  82 + "r.stop,r.report_date FROM bsth_c_shreal r LEFT JOIN bsth_c_cars c on r.cars = c.id " +
  83 + "LEFT JOIN bsth_c_line l on r.line = l.id" + packageParam(map,"") ;
  84 + List<Map<String, Object>> result = jdbcTemplate.queryForList(sql);
  85 + return result;
  86 + }
30 87  
  88 + /**
  89 + * 给定条件查车载上报停靠站的记录数
  90 + * @param map
  91 + * @return
  92 + */
  93 + public long getVehicleInoutStopCountByParam(Map<String,Object> map){
  94 + String sql = "SELECT count(1) COUNT FROM bsth_c_shreal r LEFT JOIN bsth_c_cars c on r.cars = c.id " +
  95 + "LEFT JOIN bsth_c_line l on r.line = l.id" + packageParam(map,"count");
  96 + long result = Long.valueOf(jdbcTemplate.queryForMap(sql).get("COUNT")+"");
  97 + return result;
  98 + }
31 99 }
... ...
src/main/java/com/bsth/util/DateUtils.java
... ... @@ -133,4 +133,23 @@ public class DateUtils {
133 133 public static int calcHHmmDiff(String fcsj, String zdsj) throws ParseException {
134 134 return (int) (sdfHHmm.parse(zdsj).getTime() - sdfHHmm.parse(fcsj).getTime());
135 135 }
  136 +
  137 + /**
  138 + * 计算某天是这一年的第几天
  139 + * @param str
  140 + * @return
  141 + */
  142 + public static int calcDaynumberInYear(String str){
  143 + int num = 0;
  144 + SimpleDateFormat sdf= new SimpleDateFormat("yyyyMMdd");
  145 + try {
  146 + Date date =sdf.parse(str);
  147 + Calendar calendar = Calendar.getInstance();
  148 + calendar.setTime(date);
  149 + num = calendar.get(Calendar.DAY_OF_YEAR);
  150 + } catch (Exception e) {
  151 + e.printStackTrace();
  152 + }
  153 + return num;
  154 + }
136 155 }
... ...
src/main/resources/datatools/ktrs/carsDataInput.ktr
... ... @@ -280,9 +280,208 @@
280 280 <hop> <from>&#x516c;&#x53f8;&#x4ee3;&#x7801;&#x4e0d;&#x4e3a;&#x7a7a;</from><to>&#x5206;&#x516c;&#x53f8;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
281 281 <hop> <from>&#x5206;&#x516c;&#x53f8;&#x67e5;&#x8be2;</from><to>&#x5206;&#x516c;&#x53f8;&#x4ee3;&#x7801;&#x4e0d;&#x4e3a;&#x7a7a;</to><enabled>Y</enabled> </hop>
282 282 <hop> <from>&#x5206;&#x516c;&#x53f8;&#x4ee3;&#x7801;&#x4e0d;&#x4e3a;&#x7a7a;</from><to>&#x8f66;&#x8f86;&#x7f16;&#x7801;</to><enabled>Y</enabled> </hop>
283   - <hop> <from>&#x8f66;&#x8f86;&#x7f16;&#x7801;</from><to>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_cars 2</to><enabled>Y</enabled> </hop>
  283 + <hop> <from>&#x8f66;&#x8f86;&#x7f16;&#x7801;</from><to>&#x662f;&#x5426;&#x7535;&#x8f66;</to><enabled>Y</enabled> </hop>
  284 + <hop> <from>&#x662f;&#x5426;&#x7535;&#x8f66;</from><to>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_cars 2</to><enabled>Y</enabled> </hop>
284 285 </order>
285 286 <step>
  287 + <name>&#x516c;&#x53f8;&#x4ee3;&#x7801;&#x4e0d;&#x4e3a;&#x7a7a;</name>
  288 + <type>FilterRows</type>
  289 + <description/>
  290 + <distribute>Y</distribute>
  291 + <custom_distribution/>
  292 + <copies>1</copies>
  293 + <partitioning>
  294 + <method>none</method>
  295 + <schema_name/>
  296 + </partitioning>
  297 +<send_true_to/>
  298 +<send_false_to/>
  299 + <compare>
  300 +<condition>
  301 + <negated>N</negated>
  302 + <conditions>
  303 + <condition>
  304 + <negated>N</negated>
  305 + <leftvalue>gs_code</leftvalue>
  306 + <function>IS NOT NULL</function>
  307 + <rightvalue/>
  308 + </condition>
  309 + </conditions>
  310 + </condition>
  311 + </compare>
  312 + <cluster_schema/>
  313 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  314 + <xloc>542</xloc>
  315 + <yloc>164</yloc>
  316 + <draw>Y</draw>
  317 + </GUI>
  318 + </step>
  319 +
  320 + <step>
  321 + <name>&#x516c;&#x53f8;&#x67e5;&#x8be2;</name>
  322 + <type>DBLookup</type>
  323 + <description/>
  324 + <distribute>Y</distribute>
  325 + <custom_distribution/>
  326 + <copies>1</copies>
  327 + <partitioning>
  328 + <method>none</method>
  329 + <schema_name/>
  330 + </partitioning>
  331 + <connection>bus_control_variable</connection>
  332 + <cache>N</cache>
  333 + <cache_load_all>N</cache_load_all>
  334 + <cache_size>0</cache_size>
  335 + <lookup>
  336 + <schema/>
  337 + <table>bsth_c_business</table>
  338 + <orderby/>
  339 + <fail_on_multiple>N</fail_on_multiple>
  340 + <eat_row_on_failure>N</eat_row_on_failure>
  341 + <key>
  342 + <name>up_code</name>
  343 + <field>up_code</field>
  344 + <condition>&#x3d;</condition>
  345 + <name2/>
  346 + </key>
  347 + <key>
  348 + <name>&#x6240;&#x5c5e;&#x516c;&#x53f8;</name>
  349 + <field>business_name</field>
  350 + <condition>&#x3d;</condition>
  351 + <name2/>
  352 + </key>
  353 + <value>
  354 + <name>business_code</name>
  355 + <rename>gs_code</rename>
  356 + <default/>
  357 + <type>String</type>
  358 + </value>
  359 + </lookup>
  360 + <cluster_schema/>
  361 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  362 + <xloc>540</xloc>
  363 + <yloc>59</yloc>
  364 + <draw>Y</draw>
  365 + </GUI>
  366 + </step>
  367 +
  368 + <step>
  369 + <name>&#x5185;&#x90e8;&#x7f16;&#x7801;&#x4e0d;&#x4e3a;&#x7a7a;</name>
  370 + <type>FilterRows</type>
  371 + <description/>
  372 + <distribute>Y</distribute>
  373 + <custom_distribution/>
  374 + <copies>1</copies>
  375 + <partitioning>
  376 + <method>none</method>
  377 + <schema_name/>
  378 + </partitioning>
  379 +<send_true_to/>
  380 +<send_false_to/>
  381 + <compare>
  382 +<condition>
  383 + <negated>N</negated>
  384 + <conditions>
  385 + <condition>
  386 + <negated>N</negated>
  387 + <leftvalue>&#x5185;&#x90e8;&#x7f16;&#x7801;</leftvalue>
  388 + <function>IS NOT NULL</function>
  389 + <rightvalue/>
  390 + </condition>
  391 + </conditions>
  392 + </condition>
  393 + </compare>
  394 + <cluster_schema/>
  395 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  396 + <xloc>218</xloc>
  397 + <yloc>164</yloc>
  398 + <draw>Y</draw>
  399 + </GUI>
  400 + </step>
  401 +
  402 + <step>
  403 + <name>&#x5206;&#x516c;&#x53f8;&#x4ee3;&#x7801;&#x4e0d;&#x4e3a;&#x7a7a;</name>
  404 + <type>FilterRows</type>
  405 + <description/>
  406 + <distribute>Y</distribute>
  407 + <custom_distribution/>
  408 + <copies>1</copies>
  409 + <partitioning>
  410 + <method>none</method>
  411 + <schema_name/>
  412 + </partitioning>
  413 +<send_true_to/>
  414 +<send_false_to/>
  415 + <compare>
  416 +<condition>
  417 + <negated>N</negated>
  418 + <conditions>
  419 + <condition>
  420 + <negated>N</negated>
  421 + <leftvalue>fgs_code</leftvalue>
  422 + <function>IS NOT NULL</function>
  423 + <rightvalue/>
  424 + </condition>
  425 + </conditions>
  426 + </condition>
  427 + </compare>
  428 + <cluster_schema/>
  429 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  430 + <xloc>685</xloc>
  431 + <yloc>162</yloc>
  432 + <draw>Y</draw>
  433 + </GUI>
  434 + </step>
  435 +
  436 + <step>
  437 + <name>&#x5206;&#x516c;&#x53f8;&#x67e5;&#x8be2;</name>
  438 + <type>DBLookup</type>
  439 + <description/>
  440 + <distribute>Y</distribute>
  441 + <custom_distribution/>
  442 + <copies>1</copies>
  443 + <partitioning>
  444 + <method>none</method>
  445 + <schema_name/>
  446 + </partitioning>
  447 + <connection>bus_control_variable</connection>
  448 + <cache>N</cache>
  449 + <cache_load_all>N</cache_load_all>
  450 + <cache_size>0</cache_size>
  451 + <lookup>
  452 + <schema/>
  453 + <table>bsth_c_business</table>
  454 + <orderby/>
  455 + <fail_on_multiple>N</fail_on_multiple>
  456 + <eat_row_on_failure>N</eat_row_on_failure>
  457 + <key>
  458 + <name>gs_code</name>
  459 + <field>up_code</field>
  460 + <condition>&#x3d;</condition>
  461 + <name2/>
  462 + </key>
  463 + <key>
  464 + <name>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;</name>
  465 + <field>business_name</field>
  466 + <condition>&#x3d;</condition>
  467 + <name2/>
  468 + </key>
  469 + <value>
  470 + <name>business_code</name>
  471 + <rename>fgs_code</rename>
  472 + <default/>
  473 + <type>String</type>
  474 + </value>
  475 + </lookup>
  476 + <cluster_schema/>
  477 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  478 + <xloc>683</xloc>
  479 + <yloc>59</yloc>
  480 + <draw>Y</draw>
  481 + </GUI>
  482 + </step>
  483 +
  484 + <step>
286 485 <name>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</name>
287 486 <type>ExcelInput</type>
288 487 <description/>
... ... @@ -388,6 +587,18 @@
388 587 <decimal/>
389 588 <group/>
390 589 </field>
  590 + <field>
  591 + <name>&#x662f;&#x5426;&#x7535;&#x8f66;</name>
  592 + <type>String</type>
  593 + <length>-1</length>
  594 + <precision>-1</precision>
  595 + <trim_type>none</trim_type>
  596 + <repeat>N</repeat>
  597 + <format/>
  598 + <currency/>
  599 + <decimal/>
  600 + <group/>
  601 + </field>
391 602 </fields>
392 603 <sheets>
393 604 <sheet>
... ... @@ -490,11 +701,46 @@
490 701 <rename>&#x8bbe;&#x5907;&#x7ec8;&#x7aef;&#x53f7;</rename>
491 702 <update>Y</update>
492 703 </value>
  704 + <value>
  705 + <name>sfdc</name>
  706 + <rename>sfdc_cal</rename>
  707 + <update>Y</update>
  708 + </value>
493 709 </lookup>
494 710 <cluster_schema/>
495 711 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
496   - <xloc>690</xloc>
497   - <yloc>393</yloc>
  712 + <xloc>561</xloc>
  713 + <yloc>359</yloc>
  714 + <draw>Y</draw>
  715 + </GUI>
  716 + </step>
  717 +
  718 + <step>
  719 + <name>&#x6dfb;&#x52a0;&#x67e5;&#x8be2;&#x5e38;&#x91cf;</name>
  720 + <type>ScriptValueMod</type>
  721 + <description/>
  722 + <distribute>Y</distribute>
  723 + <custom_distribution/>
  724 + <copies>1</copies>
  725 + <partitioning>
  726 + <method>none</method>
  727 + <schema_name/>
  728 + </partitioning>
  729 + <compatible>N</compatible>
  730 + <optimizationLevel>9</optimizationLevel>
  731 + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
  732 + <jsScript_name>Script 1</jsScript_name>
  733 + <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var up_code &#x3d; &#x27;88&#x27;&#x3b;</jsScript_script>
  734 + </jsScript> </jsScripts> <fields> <field> <name>up_code</name>
  735 + <rename>up_code</rename>
  736 + <type>String</type>
  737 + <length>-1</length>
  738 + <precision>-1</precision>
  739 + <replace>N</replace>
  740 + </field> </fields> <cluster_schema/>
  741 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  742 + <xloc>389</xloc>
  743 + <yloc>61</yloc>
498 744 <draw>Y</draw>
499 745 </GUI>
500 746 </step>
... ... @@ -545,6 +791,36 @@
545 791 </step>
546 792  
547 793 <step>
  794 + <name>&#x8f66;&#x8f86;&#x7f16;&#x7801;</name>
  795 + <type>ScriptValueMod</type>
  796 + <description/>
  797 + <distribute>Y</distribute>
  798 + <custom_distribution/>
  799 + <copies>1</copies>
  800 + <partitioning>
  801 + <method>none</method>
  802 + <schema_name/>
  803 + </partitioning>
  804 + <compatible>N</compatible>
  805 + <optimizationLevel>9</optimizationLevel>
  806 + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
  807 + <jsScript_name>Script 1</jsScript_name>
  808 + <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var cl_code &#x3d; gs_code &#x2b; &#x22;0&#x22; &#x2b; &#x5185;&#x90e8;&#x7f16;&#x7801;&#x3b;</jsScript_script>
  809 + </jsScript> </jsScripts> <fields> <field> <name>cl_code</name>
  810 + <rename>cl_code</rename>
  811 + <type>String</type>
  812 + <length>-1</length>
  813 + <precision>-1</precision>
  814 + <replace>N</replace>
  815 + </field> </fields> <cluster_schema/>
  816 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  817 + <xloc>688</xloc>
  818 + <yloc>273</yloc>
  819 + <draw>Y</draw>
  820 + </GUI>
  821 + </step>
  822 +
  823 + <step>
548 824 <name>&#x9519;&#x8bef;&#x8f93;&#x51fa; 2</name>
549 825 <type>ExcelOutput</type>
550 826 <description/>
... ... @@ -655,242 +931,14 @@
655 931 </custom>
656 932 <cluster_schema/>
657 933 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
658   - <xloc>502</xloc>
659   - <yloc>395</yloc>
660   - <draw>Y</draw>
661   - </GUI>
662   - </step>
663   -
664   - <step>
665   - <name>&#x5185;&#x90e8;&#x7f16;&#x7801;&#x4e0d;&#x4e3a;&#x7a7a;</name>
666   - <type>FilterRows</type>
667   - <description/>
668   - <distribute>Y</distribute>
669   - <custom_distribution/>
670   - <copies>1</copies>
671   - <partitioning>
672   - <method>none</method>
673   - <schema_name/>
674   - </partitioning>
675   -<send_true_to/>
676   -<send_false_to/>
677   - <compare>
678   -<condition>
679   - <negated>N</negated>
680   - <conditions>
681   - <condition>
682   - <negated>N</negated>
683   - <leftvalue>&#x5185;&#x90e8;&#x7f16;&#x7801;</leftvalue>
684   - <function>IS NOT NULL</function>
685   - <rightvalue/>
686   - </condition>
687   - </conditions>
688   - </condition>
689   - </compare>
690   - <cluster_schema/>
691   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
692   - <xloc>218</xloc>
693   - <yloc>164</yloc>
694   - <draw>Y</draw>
695   - </GUI>
696   - </step>
697   -
698   - <step>
699   - <name>&#x6dfb;&#x52a0;&#x67e5;&#x8be2;&#x5e38;&#x91cf;</name>
700   - <type>ScriptValueMod</type>
701   - <description/>
702   - <distribute>Y</distribute>
703   - <custom_distribution/>
704   - <copies>1</copies>
705   - <partitioning>
706   - <method>none</method>
707   - <schema_name/>
708   - </partitioning>
709   - <compatible>N</compatible>
710   - <optimizationLevel>9</optimizationLevel>
711   - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
712   - <jsScript_name>Script 1</jsScript_name>
713   - <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var up_code &#x3d; &#x27;88&#x27;&#x3b;</jsScript_script>
714   - </jsScript> </jsScripts> <fields> <field> <name>up_code</name>
715   - <rename>up_code</rename>
716   - <type>String</type>
717   - <length>-1</length>
718   - <precision>-1</precision>
719   - <replace>N</replace>
720   - </field> </fields> <cluster_schema/>
721   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
722   - <xloc>389</xloc>
723   - <yloc>61</yloc>
724   - <draw>Y</draw>
725   - </GUI>
726   - </step>
727   -
728   - <step>
729   - <name>&#x516c;&#x53f8;&#x67e5;&#x8be2;</name>
730   - <type>DBLookup</type>
731   - <description/>
732   - <distribute>Y</distribute>
733   - <custom_distribution/>
734   - <copies>1</copies>
735   - <partitioning>
736   - <method>none</method>
737   - <schema_name/>
738   - </partitioning>
739   - <connection>bus_control_variable</connection>
740   - <cache>N</cache>
741   - <cache_load_all>N</cache_load_all>
742   - <cache_size>0</cache_size>
743   - <lookup>
744   - <schema/>
745   - <table>bsth_c_business</table>
746   - <orderby/>
747   - <fail_on_multiple>N</fail_on_multiple>
748   - <eat_row_on_failure>N</eat_row_on_failure>
749   - <key>
750   - <name>up_code</name>
751   - <field>up_code</field>
752   - <condition>&#x3d;</condition>
753   - <name2/>
754   - </key>
755   - <key>
756   - <name>&#x6240;&#x5c5e;&#x516c;&#x53f8;</name>
757   - <field>business_name</field>
758   - <condition>&#x3d;</condition>
759   - <name2/>
760   - </key>
761   - <value>
762   - <name>business_code</name>
763   - <rename>gs_code</rename>
764   - <default/>
765   - <type>String</type>
766   - </value>
767   - </lookup>
768   - <cluster_schema/>
769   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
770   - <xloc>540</xloc>
771   - <yloc>59</yloc>
772   - <draw>Y</draw>
773   - </GUI>
774   - </step>
775   -
776   - <step>
777   - <name>&#x516c;&#x53f8;&#x4ee3;&#x7801;&#x4e0d;&#x4e3a;&#x7a7a;</name>
778   - <type>FilterRows</type>
779   - <description/>
780   - <distribute>Y</distribute>
781   - <custom_distribution/>
782   - <copies>1</copies>
783   - <partitioning>
784   - <method>none</method>
785   - <schema_name/>
786   - </partitioning>
787   -<send_true_to/>
788   -<send_false_to/>
789   - <compare>
790   -<condition>
791   - <negated>N</negated>
792   - <conditions>
793   - <condition>
794   - <negated>N</negated>
795   - <leftvalue>gs_code</leftvalue>
796   - <function>IS NOT NULL</function>
797   - <rightvalue/>
798   - </condition>
799   - </conditions>
800   - </condition>
801   - </compare>
802   - <cluster_schema/>
803   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
804   - <xloc>542</xloc>
805   - <yloc>164</yloc>
  934 + <xloc>373</xloc>
  935 + <yloc>361</yloc>
806 936 <draw>Y</draw>
807 937 </GUI>
808 938 </step>
809 939  
810 940 <step>
811   - <name>&#x5206;&#x516c;&#x53f8;&#x67e5;&#x8be2;</name>
812   - <type>DBLookup</type>
813   - <description/>
814   - <distribute>Y</distribute>
815   - <custom_distribution/>
816   - <copies>1</copies>
817   - <partitioning>
818   - <method>none</method>
819   - <schema_name/>
820   - </partitioning>
821   - <connection>bus_control_variable</connection>
822   - <cache>N</cache>
823   - <cache_load_all>N</cache_load_all>
824   - <cache_size>0</cache_size>
825   - <lookup>
826   - <schema/>
827   - <table>bsth_c_business</table>
828   - <orderby/>
829   - <fail_on_multiple>N</fail_on_multiple>
830   - <eat_row_on_failure>N</eat_row_on_failure>
831   - <key>
832   - <name>gs_code</name>
833   - <field>up_code</field>
834   - <condition>&#x3d;</condition>
835   - <name2/>
836   - </key>
837   - <key>
838   - <name>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;</name>
839   - <field>business_name</field>
840   - <condition>&#x3d;</condition>
841   - <name2/>
842   - </key>
843   - <value>
844   - <name>business_code</name>
845   - <rename>fgs_code</rename>
846   - <default/>
847   - <type>String</type>
848   - </value>
849   - </lookup>
850   - <cluster_schema/>
851   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
852   - <xloc>683</xloc>
853   - <yloc>59</yloc>
854   - <draw>Y</draw>
855   - </GUI>
856   - </step>
857   -
858   - <step>
859   - <name>&#x5206;&#x516c;&#x53f8;&#x4ee3;&#x7801;&#x4e0d;&#x4e3a;&#x7a7a;</name>
860   - <type>FilterRows</type>
861   - <description/>
862   - <distribute>Y</distribute>
863   - <custom_distribution/>
864   - <copies>1</copies>
865   - <partitioning>
866   - <method>none</method>
867   - <schema_name/>
868   - </partitioning>
869   -<send_true_to/>
870   -<send_false_to/>
871   - <compare>
872   -<condition>
873   - <negated>N</negated>
874   - <conditions>
875   - <condition>
876   - <negated>N</negated>
877   - <leftvalue>fgs_code</leftvalue>
878   - <function>IS NOT NULL</function>
879   - <rightvalue/>
880   - </condition>
881   - </conditions>
882   - </condition>
883   - </compare>
884   - <cluster_schema/>
885   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
886   - <xloc>685</xloc>
887   - <yloc>162</yloc>
888   - <draw>Y</draw>
889   - </GUI>
890   - </step>
891   -
892   - <step>
893   - <name>&#x8f66;&#x8f86;&#x7f16;&#x7801;</name>
  941 + <name>&#x662f;&#x5426;&#x7535;&#x8f66;</name>
894 942 <type>ScriptValueMod</type>
895 943 <description/>
896 944 <distribute>Y</distribute>
... ... @@ -904,16 +952,16 @@
904 952 <optimizationLevel>9</optimizationLevel>
905 953 <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
906 954 <jsScript_name>Script 1</jsScript_name>
907   - <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var cl_code &#x3d; gs_code &#x2b; &#x22;0&#x22; &#x2b; &#x5185;&#x90e8;&#x7f16;&#x7801;&#x3b;</jsScript_script>
908   - </jsScript> </jsScripts> <fields> <field> <name>cl_code</name>
909   - <rename>cl_code</rename>
910   - <type>String</type>
911   - <length>-1</length>
912   - <precision>-1</precision>
  955 + <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var sfdc_cal &#x3d; 0&#x3b;&#xa;&#xa;if &#x28;&#x662f;&#x5426;&#x7535;&#x8f66; &#x3d;&#x3d; &#x22;&#x662f;&#x22;&#x29; &#x7b;&#xa; sfdc_cal &#x3d; 1&#x3b;&#xa;&#x7d;</jsScript_script>
  956 + </jsScript> </jsScripts> <fields> <field> <name>sfdc_cal</name>
  957 + <rename>sfdc_cal</rename>
  958 + <type>Integer</type>
  959 + <length>16</length>
  960 + <precision>2</precision>
913 961 <replace>N</replace>
914 962 </field> </fields> <cluster_schema/>
915 963 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
916   - <xloc>688</xloc>
  964 + <xloc>888</xloc>
917 965 <yloc>273</yloc>
918 966 <draw>Y</draw>
919 967 </GUI>
... ...
src/main/resources/datatools/ktrs/carsDataOutput.ktr
... ... @@ -271,11 +271,12 @@
271 271 </attributes>
272 272 </connection>
273 273 <order>
274   - <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
275   - <hop> <from>&#x8f66;&#x8f86;&#x4fe1;&#x606f;&#x8868;&#x8f93;&#x5165;</from><to>&#x6dfb;&#x52a0;&#x67e5;&#x8be2;&#x5e38;&#x91cf;</to><enabled>Y</enabled> </hop>
276   - <hop> <from>&#x6dfb;&#x52a0;&#x67e5;&#x8be2;&#x5e38;&#x91cf;</from><to>&#x516c;&#x53f8;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
277 274 <hop> <from>&#x516c;&#x53f8;&#x67e5;&#x8be2;</from><to>&#x5206;&#x516c;&#x53f8;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
278 275 <hop> <from>&#x5206;&#x516c;&#x53f8;&#x67e5;&#x8be2;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>
  276 + <hop> <from>&#x6dfb;&#x52a0;&#x67e5;&#x8be2;&#x5e38;&#x91cf;</from><to>&#x516c;&#x53f8;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  277 + <hop> <from>&#x8f66;&#x8f86;&#x4fe1;&#x606f;&#x8868;&#x8f93;&#x5165;</from><to>&#x6dfb;&#x52a0;&#x67e5;&#x8be2;&#x5e38;&#x91cf;</to><enabled>Y</enabled> </hop>
  278 + <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>&#x662f;&#x5426;&#x7535;&#x8f66;</to><enabled>Y</enabled> </hop>
  279 + <hop> <from>&#x662f;&#x5426;&#x7535;&#x8f66;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
279 280 </order>
280 281 <step>
281 282 <name>Excel&#x8f93;&#x51fa;</name>
... ... @@ -348,6 +349,11 @@
348 349 <type>String</type>
349 350 <format/>
350 351 </field>
  352 + <field>
  353 + <name>&#x662f;&#x5426;&#x7535;&#x8f66;</name>
  354 + <type>String</type>
  355 + <format/>
  356 + </field>
351 357 </fields>
352 358 <custom>
353 359 <header_font_name>arial</header_font_name>
... ... @@ -368,8 +374,104 @@
368 374 </custom>
369 375 <cluster_schema/>
370 376 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
371   - <xloc>514</xloc>
372   - <yloc>293</yloc>
  377 + <xloc>498</xloc>
  378 + <yloc>348</yloc>
  379 + <draw>Y</draw>
  380 + </GUI>
  381 + </step>
  382 +
  383 + <step>
  384 + <name>&#x516c;&#x53f8;&#x67e5;&#x8be2;</name>
  385 + <type>DBLookup</type>
  386 + <description/>
  387 + <distribute>Y</distribute>
  388 + <custom_distribution/>
  389 + <copies>1</copies>
  390 + <partitioning>
  391 + <method>none</method>
  392 + <schema_name/>
  393 + </partitioning>
  394 + <connection>bus_control_variable</connection>
  395 + <cache>N</cache>
  396 + <cache_load_all>N</cache_load_all>
  397 + <cache_size>0</cache_size>
  398 + <lookup>
  399 + <schema/>
  400 + <table>bsth_c_business</table>
  401 + <orderby/>
  402 + <fail_on_multiple>N</fail_on_multiple>
  403 + <eat_row_on_failure>N</eat_row_on_failure>
  404 + <key>
  405 + <name>up_code</name>
  406 + <field>up_code</field>
  407 + <condition>&#x3d;</condition>
  408 + <name2/>
  409 + </key>
  410 + <key>
  411 + <name>business_code</name>
  412 + <field>business_code</field>
  413 + <condition>&#x3d;</condition>
  414 + <name2/>
  415 + </key>
  416 + <value>
  417 + <name>business_name</name>
  418 + <rename>gs</rename>
  419 + <default/>
  420 + <type>String</type>
  421 + </value>
  422 + </lookup>
  423 + <cluster_schema/>
  424 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  425 + <xloc>364</xloc>
  426 + <yloc>60</yloc>
  427 + <draw>Y</draw>
  428 + </GUI>
  429 + </step>
  430 +
  431 + <step>
  432 + <name>&#x5206;&#x516c;&#x53f8;&#x67e5;&#x8be2;</name>
  433 + <type>DBLookup</type>
  434 + <description/>
  435 + <distribute>Y</distribute>
  436 + <custom_distribution/>
  437 + <copies>1</copies>
  438 + <partitioning>
  439 + <method>none</method>
  440 + <schema_name/>
  441 + </partitioning>
  442 + <connection>bus_control_variable</connection>
  443 + <cache>N</cache>
  444 + <cache_load_all>N</cache_load_all>
  445 + <cache_size>0</cache_size>
  446 + <lookup>
  447 + <schema/>
  448 + <table>bsth_c_business</table>
  449 + <orderby/>
  450 + <fail_on_multiple>N</fail_on_multiple>
  451 + <eat_row_on_failure>N</eat_row_on_failure>
  452 + <key>
  453 + <name>business_code</name>
  454 + <field>up_code</field>
  455 + <condition>&#x3d;</condition>
  456 + <name2/>
  457 + </key>
  458 + <key>
  459 + <name>branche_company_code</name>
  460 + <field>business_code</field>
  461 + <condition>&#x3d;</condition>
  462 + <name2/>
  463 + </key>
  464 + <value>
  465 + <name>business_name</name>
  466 + <rename>fgs</rename>
  467 + <default/>
  468 + <type>String</type>
  469 + </value>
  470 + </lookup>
  471 + <cluster_schema/>
  472 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  473 + <xloc>491</xloc>
  474 + <yloc>60</yloc>
373 475 <draw>Y</draw>
374 476 </GUI>
375 477 </step>
... ... @@ -409,37 +511,15 @@
409 511 <rename>&#x8bbe;&#x5907;&#x7ec8;&#x7aef;&#x53f7;</rename>
410 512 <length>-2</length>
411 513 <precision>-2</precision>
  514 + </field> <field> <name>sfdc</name>
  515 + <rename>sfdc_cal</rename>
  516 + <length>-2</length>
  517 + <precision>-2</precision>
412 518 </field> <select_unspecified>N</select_unspecified>
413 519 </fields> <cluster_schema/>
414 520 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
415   - <xloc>512</xloc>
416   - <yloc>181</yloc>
417   - <draw>Y</draw>
418   - </GUI>
419   - </step>
420   -
421   - <step>
422   - <name>&#x8f66;&#x8f86;&#x4fe1;&#x606f;&#x8868;&#x8f93;&#x5165;</name>
423   - <type>TableInput</type>
424   - <description/>
425   - <distribute>Y</distribute>
426   - <custom_distribution/>
427   - <copies>1</copies>
428   - <partitioning>
429   - <method>none</method>
430   - <schema_name/>
431   - </partitioning>
432   - <connection>bus_control_variable</connection>
433   - <sql>SELECT &#x2a; FROM bsth_c_cars&#xa;where concat&#x28;business_code, &#x27;_&#x27;, branche_company_code&#x29; in &#x28;&#x24;&#x7b;cgsbm_in&#x7d;&#x29;</sql>
434   - <limit>0</limit>
435   - <lookup/>
436   - <execute_each_row>N</execute_each_row>
437   - <variables_active>Y</variables_active>
438   - <lazy_conversion_active>N</lazy_conversion_active>
439   - <cluster_schema/>
440   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
441   - <xloc>105</xloc>
442   - <yloc>67</yloc>
  521 + <xloc>495</xloc>
  522 + <yloc>173</yloc>
443 523 <draw>Y</draw>
444 524 </GUI>
445 525 </step>
... ... @@ -468,15 +548,15 @@
468 548 <replace>N</replace>
469 549 </field> </fields> <cluster_schema/>
470 550 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
471   - <xloc>244</xloc>
472   - <yloc>67</yloc>
  551 + <xloc>227</xloc>
  552 + <yloc>59</yloc>
473 553 <draw>Y</draw>
474 554 </GUI>
475 555 </step>
476 556  
477 557 <step>
478   - <name>&#x516c;&#x53f8;&#x67e5;&#x8be2;</name>
479   - <type>DBLookup</type>
  558 + <name>&#x8f66;&#x8f86;&#x4fe1;&#x606f;&#x8868;&#x8f93;&#x5165;</name>
  559 + <type>TableInput</type>
480 560 <description/>
481 561 <distribute>Y</distribute>
482 562 <custom_distribution/>
... ... @@ -486,45 +566,23 @@
486 566 <schema_name/>
487 567 </partitioning>
488 568 <connection>bus_control_variable</connection>
489   - <cache>N</cache>
490   - <cache_load_all>N</cache_load_all>
491   - <cache_size>0</cache_size>
492   - <lookup>
493   - <schema/>
494   - <table>bsth_c_business</table>
495   - <orderby/>
496   - <fail_on_multiple>N</fail_on_multiple>
497   - <eat_row_on_failure>N</eat_row_on_failure>
498   - <key>
499   - <name>up_code</name>
500   - <field>up_code</field>
501   - <condition>&#x3d;</condition>
502   - <name2/>
503   - </key>
504   - <key>
505   - <name>business_code</name>
506   - <field>business_code</field>
507   - <condition>&#x3d;</condition>
508   - <name2/>
509   - </key>
510   - <value>
511   - <name>business_name</name>
512   - <rename>gs</rename>
513   - <default/>
514   - <type>String</type>
515   - </value>
516   - </lookup>
  569 + <sql>SELECT &#x2a; FROM bsth_c_cars&#xa;&#xa;</sql>
  570 + <limit>0</limit>
  571 + <lookup/>
  572 + <execute_each_row>N</execute_each_row>
  573 + <variables_active>Y</variables_active>
  574 + <lazy_conversion_active>N</lazy_conversion_active>
517 575 <cluster_schema/>
518 576 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
519   - <xloc>381</xloc>
520   - <yloc>68</yloc>
  577 + <xloc>88</xloc>
  578 + <yloc>59</yloc>
521 579 <draw>Y</draw>
522 580 </GUI>
523 581 </step>
524 582  
525 583 <step>
526   - <name>&#x5206;&#x516c;&#x53f8;&#x67e5;&#x8be2;</name>
527   - <type>DBLookup</type>
  584 + <name>&#x662f;&#x5426;&#x7535;&#x8f66;</name>
  585 + <type>ScriptValueMod</type>
528 586 <description/>
529 587 <distribute>Y</distribute>
530 588 <custom_distribution/>
... ... @@ -533,39 +591,21 @@
533 591 <method>none</method>
534 592 <schema_name/>
535 593 </partitioning>
536   - <connection>bus_control_variable</connection>
537   - <cache>N</cache>
538   - <cache_load_all>N</cache_load_all>
539   - <cache_size>0</cache_size>
540   - <lookup>
541   - <schema/>
542   - <table>bsth_c_business</table>
543   - <orderby/>
544   - <fail_on_multiple>N</fail_on_multiple>
545   - <eat_row_on_failure>N</eat_row_on_failure>
546   - <key>
547   - <name>business_code</name>
548   - <field>up_code</field>
549   - <condition>&#x3d;</condition>
550   - <name2/>
551   - </key>
552   - <key>
553   - <name>branche_company_code</name>
554   - <field>business_code</field>
555   - <condition>&#x3d;</condition>
556   - <name2/>
557   - </key>
558   - <value>
559   - <name>business_name</name>
560   - <rename>fgs</rename>
561   - <default/>
  594 + <compatible>N</compatible>
  595 + <optimizationLevel>9</optimizationLevel>
  596 + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
  597 + <jsScript_name>Script 1</jsScript_name>
  598 + <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var &#x662f;&#x5426;&#x7535;&#x8f66; &#x3d; &#x22;&#x5426;&#x22;&#x3b;&#xa;&#xa;if&#x28;sfdc_cal&#x29; &#x7b;&#xa; &#x662f;&#x5426;&#x7535;&#x8f66; &#x3d; &#x22;&#x662f;&#x22;&#x3b;&#xa;&#x7d;&#xa;</jsScript_script>
  599 + </jsScript> </jsScripts> <fields> <field> <name>&#x662f;&#x5426;&#x7535;&#x8f66;</name>
  600 + <rename>&#x662f;&#x5426;&#x7535;&#x8f66;</rename>
562 601 <type>String</type>
563   - </value>
564   - </lookup>
565   - <cluster_schema/>
  602 + <length>-1</length>
  603 + <precision>-1</precision>
  604 + <replace>N</replace>
  605 + </field> </fields> <cluster_schema/>
566 606 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
567   - <xloc>508</xloc>
568   - <yloc>68</yloc>
  607 + <xloc>695</xloc>
  608 + <yloc>173</yloc>
569 609 <draw>Y</draw>
570 610 </GUI>
571 611 </step>
... ...
src/main/resources/datatools/ktrs/scheduleRuleDataInput.ktr
... ... @@ -291,10 +291,11 @@
291 291 <hop> <from>&#x5408;&#x5e76;&#x5206;&#x73ed;&#x4eba;&#x5458;&#x914d;&#x7f6e;id</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55; 2</to><enabled>Y</enabled> </hop>
292 292 <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55; 2</from><to>&#x5206;&#x7ec4;&#x5408;&#x5e76;&#x4eba;&#x5458;&#x914d;&#x7f6e;id</to><enabled>Y</enabled> </hop>
293 293 <hop> <from>&#x5206;&#x7ec4;&#x5408;&#x5e76;&#x4eba;&#x5458;&#x914d;&#x7f6e;id</from><to>&#x542f;&#x7528;&#x65e5;&#x671f;&#x8f6c;&#x6362;</to><enabled>Y</enabled> </hop>
294   - <hop> <from>&#x542f;&#x7528;&#x65e5;&#x671f;&#x8f6c;&#x6362;</from><to>&#x5220;&#x9664;</to><enabled>Y</enabled> </hop>
295 294 <hop> <from>&#x5220;&#x9664;</from><to>&#x963b;&#x585e;&#x6570;&#x636e;&#x76f4;&#x5230;&#x6b65;&#x9aa4;&#x90fd;&#x5b8c;&#x6210;</to><enabled>Y</enabled> </hop>
296 295 <hop> <from>&#x963b;&#x585e;&#x6570;&#x636e;&#x76f4;&#x5230;&#x6b65;&#x9aa4;&#x90fd;&#x5b8c;&#x6210;</from><to>&#x89c4;&#x5219;&#x8868;&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
297 296 <hop> <from>&#x89c4;&#x5219;&#x8868;&#x8f93;&#x51fa;</from><to>&#x9519;&#x8bef;&#x8f93;&#x51fa; 2</to><enabled>Y</enabled> </hop>
  297 + <hop> <from>&#x542f;&#x7528;&#x65e5;&#x671f;&#x8f6c;&#x6362;</from><to>&#x9ed8;&#x8ba4;&#x7ffb;&#x73ed;&#x7c7b;&#x578b;</to><enabled>Y</enabled> </hop>
  298 + <hop> <from>&#x9ed8;&#x8ba4;&#x7ffb;&#x73ed;&#x7c7b;&#x578b;</from><to>&#x5220;&#x9664;</to><enabled>Y</enabled> </hop>
298 299 </order>
299 300 <step>
300 301 <name>&#x4eba;&#x5458;&#x914d;&#x7f6e;id&#x67e5;&#x8be2;</name>
... ... @@ -545,6 +546,37 @@
545 546 </step>
546 547  
547 548 <step>
  549 + <name>&#x5220;&#x9664;</name>
  550 + <type>Delete</type>
  551 + <description/>
  552 + <distribute>Y</distribute>
  553 + <custom_distribution/>
  554 + <copies>1</copies>
  555 + <partitioning>
  556 + <method>none</method>
  557 + <schema_name/>
  558 + </partitioning>
  559 + <connection>bus_control_variable</connection>
  560 + <commit>100</commit>
  561 + <lookup>
  562 + <schema/>
  563 + <table>bsth_c_s_sr1_flat</table>
  564 + <key>
  565 + <name>xlid</name>
  566 + <field>xl</field>
  567 + <condition>&#x3d;</condition>
  568 + <name2/>
  569 + </key>
  570 + </lookup>
  571 + <cluster_schema/>
  572 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  573 + <xloc>508</xloc>
  574 + <yloc>381</yloc>
  575 + <draw>Y</draw>
  576 + </GUI>
  577 + </step>
  578 +
  579 + <step>
548 580 <name>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</name>
549 581 <type>ExcelInput</type>
550 582 <description/>
... ... @@ -1170,6 +1202,88 @@
1170 1202 </step>
1171 1203  
1172 1204 <step>
  1205 + <name>&#x89c4;&#x5219;&#x8868;&#x8f93;&#x51fa;</name>
  1206 + <type>TableOutput</type>
  1207 + <description/>
  1208 + <distribute>Y</distribute>
  1209 + <custom_distribution/>
  1210 + <copies>1</copies>
  1211 + <partitioning>
  1212 + <method>none</method>
  1213 + <schema_name/>
  1214 + </partitioning>
  1215 + <connection>bus_control_variable</connection>
  1216 + <schema/>
  1217 + <table>bsth_c_s_sr1_flat</table>
  1218 + <commit>1000</commit>
  1219 + <truncate>N</truncate>
  1220 + <ignore_errors>N</ignore_errors>
  1221 + <use_batch>Y</use_batch>
  1222 + <specify_fields>Y</specify_fields>
  1223 + <partitioning_enabled>N</partitioning_enabled>
  1224 + <partitioning_field/>
  1225 + <partitioning_daily>N</partitioning_daily>
  1226 + <partitioning_monthly>Y</partitioning_monthly>
  1227 + <tablename_in_field>N</tablename_in_field>
  1228 + <tablename_field/>
  1229 + <tablename_in_table>Y</tablename_in_table>
  1230 + <return_keys>N</return_keys>
  1231 + <return_field/>
  1232 + <fields>
  1233 + <field>
  1234 + <column_name>xl</column_name>
  1235 + <stream_name>xlid</stream_name>
  1236 + </field>
  1237 + <field>
  1238 + <column_name>car_config_info</column_name>
  1239 + <stream_name>cid</stream_name>
  1240 + </field>
  1241 + <field>
  1242 + <column_name>lp_names</column_name>
  1243 + <stream_name>lpnames</stream_name>
  1244 + </field>
  1245 + <field>
  1246 + <column_name>lp_ids</column_name>
  1247 + <stream_name>lpids</stream_name>
  1248 + </field>
  1249 + <field>
  1250 + <column_name>lp_start</column_name>
  1251 + <stream_name>&#x8d77;&#x59cb;&#x8def;&#x724c;</stream_name>
  1252 + </field>
  1253 + <field>
  1254 + <column_name>ry_start</column_name>
  1255 + <stream_name>&#x8d77;&#x59cb;&#x4eba;&#x5458;</stream_name>
  1256 + </field>
  1257 + <field>
  1258 + <column_name>qyrq</column_name>
  1259 + <stream_name>&#x542f;&#x7528;&#x65e5;&#x671f;</stream_name>
  1260 + </field>
  1261 + <field>
  1262 + <column_name>fbgs</column_name>
  1263 + <stream_name>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</stream_name>
  1264 + </field>
  1265 + <field>
  1266 + <column_name>ry_dbbms</column_name>
  1267 + <stream_name>rybms</stream_name>
  1268 + </field>
  1269 + <field>
  1270 + <column_name>ry_config_ids</column_name>
  1271 + <stream_name>rycids</stream_name>
  1272 + </field>
  1273 + <field>
  1274 + <column_name>fbtype</column_name>
  1275 + <stream_name>fbtype</stream_name>
  1276 + </field>
  1277 + </fields>
  1278 + <cluster_schema/>
  1279 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  1280 + <xloc>148</xloc>
  1281 + <yloc>380</yloc>
  1282 + <draw>Y</draw>
  1283 + </GUI>
  1284 + </step>
  1285 +
  1286 + <step>
1173 1287 <name>&#x8def;&#x724c;id&#x67e5;&#x8be2;</name>
1174 1288 <type>DBLookup</type>
1175 1289 <description/>
... ... @@ -1530,39 +1644,8 @@
1530 1644 </custom>
1531 1645 <cluster_schema/>
1532 1646 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
1533   - <xloc>253</xloc>
1534   - <yloc>501</yloc>
1535   - <draw>Y</draw>
1536   - </GUI>
1537   - </step>
1538   -
1539   - <step>
1540   - <name>&#x5220;&#x9664;</name>
1541   - <type>Delete</type>
1542   - <description/>
1543   - <distribute>Y</distribute>
1544   - <custom_distribution/>
1545   - <copies>1</copies>
1546   - <partitioning>
1547   - <method>none</method>
1548   - <schema_name/>
1549   - </partitioning>
1550   - <connection>bus_control_variable</connection>
1551   - <commit>100</commit>
1552   - <lookup>
1553   - <schema/>
1554   - <table>bsth_c_s_sr1_flat</table>
1555   - <key>
1556   - <name>xlid</name>
1557   - <field>xl</field>
1558   - <condition>&#x3d;</condition>
1559   - <name2/>
1560   - </key>
1561   - </lookup>
1562   - <cluster_schema/>
1563   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
1564   - <xloc>619</xloc>
1565   - <yloc>370</yloc>
  1647 + <xloc>142</xloc>
  1648 + <yloc>512</yloc>
1566 1649 <draw>Y</draw>
1567 1650 </GUI>
1568 1651 </step>
... ... @@ -1586,15 +1669,15 @@
1586 1669 </steps>
1587 1670 <cluster_schema/>
1588 1671 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
1589   - <xloc>450</xloc>
1590   - <yloc>370</yloc>
  1672 + <xloc>339</xloc>
  1673 + <yloc>381</yloc>
1591 1674 <draw>Y</draw>
1592 1675 </GUI>
1593 1676 </step>
1594 1677  
1595 1678 <step>
1596   - <name>&#x89c4;&#x5219;&#x8868;&#x8f93;&#x51fa;</name>
1597   - <type>TableOutput</type>
  1679 + <name>&#x9ed8;&#x8ba4;&#x7ffb;&#x73ed;&#x7c7b;&#x578b;</name>
  1680 + <type>Constant</type>
1598 1681 <description/>
1599 1682 <distribute>Y</distribute>
1600 1683 <custom_distribution/>
... ... @@ -1603,69 +1686,24 @@
1603 1686 <method>none</method>
1604 1687 <schema_name/>
1605 1688 </partitioning>
1606   - <connection>bus_control_variable</connection>
1607   - <schema/>
1608   - <table>bsth_c_s_sr1_flat</table>
1609   - <commit>1000</commit>
1610   - <truncate>N</truncate>
1611   - <ignore_errors>N</ignore_errors>
1612   - <use_batch>Y</use_batch>
1613   - <specify_fields>Y</specify_fields>
1614   - <partitioning_enabled>N</partitioning_enabled>
1615   - <partitioning_field/>
1616   - <partitioning_daily>N</partitioning_daily>
1617   - <partitioning_monthly>Y</partitioning_monthly>
1618   - <tablename_in_field>N</tablename_in_field>
1619   - <tablename_field/>
1620   - <tablename_in_table>Y</tablename_in_table>
1621   - <return_keys>N</return_keys>
1622   - <return_field/>
1623 1689 <fields>
1624   - <field>
1625   - <column_name>xl</column_name>
1626   - <stream_name>xlid</stream_name>
1627   - </field>
1628   - <field>
1629   - <column_name>car_config_info</column_name>
1630   - <stream_name>cid</stream_name>
1631   - </field>
1632   - <field>
1633   - <column_name>lp_names</column_name>
1634   - <stream_name>lpnames</stream_name>
1635   - </field>
1636   - <field>
1637   - <column_name>lp_ids</column_name>
1638   - <stream_name>lpids</stream_name>
1639   - </field>
1640   - <field>
1641   - <column_name>lp_start</column_name>
1642   - <stream_name>&#x8d77;&#x59cb;&#x8def;&#x724c;</stream_name>
1643   - </field>
1644   - <field>
1645   - <column_name>ry_start</column_name>
1646   - <stream_name>&#x8d77;&#x59cb;&#x4eba;&#x5458;</stream_name>
1647   - </field>
1648   - <field>
1649   - <column_name>qyrq</column_name>
1650   - <stream_name>&#x542f;&#x7528;&#x65e5;&#x671f;</stream_name>
1651   - </field>
1652   - <field>
1653   - <column_name>fbgs</column_name>
1654   - <stream_name>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</stream_name>
1655   - </field>
1656   - <field>
1657   - <column_name>ry_dbbms</column_name>
1658   - <stream_name>rybms</stream_name>
1659   - </field>
1660   - <field>
1661   - <column_name>ry_config_ids</column_name>
1662   - <stream_name>rycids</stream_name>
1663   - </field>
  1690 + <field>
  1691 + <name>fbtype</name>
  1692 + <type>String</type>
  1693 + <format/>
  1694 + <currency/>
  1695 + <decimal/>
  1696 + <group/>
  1697 + <nullif>0</nullif>
  1698 + <length>-1</length>
  1699 + <precision>-1</precision>
  1700 + <set_empty_string>N</set_empty_string>
  1701 + </field>
1664 1702 </fields>
1665 1703 <cluster_schema/>
1666 1704 <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
1667   - <xloc>259</xloc>
1668   - <yloc>369</yloc>
  1705 + <xloc>643</xloc>
  1706 + <yloc>368</yloc>
1669 1707 <draw>Y</draw>
1670 1708 </GUI>
1671 1709 </step>
... ...
src/main/resources/rules/shiftloop_fb_2.drl
... ... @@ -15,6 +15,8 @@ import com.bsth.service.schedule.rules.shiftloop.ScheduleResults_output;
15 15  
16 16 import com.bsth.entity.schedule.temp.SchedulePlanRuleResult;
17 17  
  18 +import com.bsth.entity.schedule.SchedulePlan;
  19 +
18 20 import com.bsth.service.schedule.rules.ScheduleRuleService;
19 21  
20 22 import org.slf4j.Logger;
... ... @@ -37,6 +39,10 @@ declare Calcu_days_result_pre
37 39 calcu_index_lp : Integer // 计算之后路牌的起始索引
38 40 calcu_index_ry : Integer // 计算之后人员的起始索引
39 41  
  42 + fbtype: Integer // 翻班type,0:时刻表type 1:翻班格式type
  43 + fbweeks: List // 翻班格式,如:1111001111001
  44 + fbgs_index: Integer // 翻班格式起始索引(从0开始)
  45 +
40 46 // 1、第一部分循环需要用到的数据(当开始日期大于启用日期的时候才有)
41 47 calcu_start_date_1: DateTime // 第一部分开始计算日期
42 48 calcu_end_date_1: DateTime // 第一部分结束计算日期
... ... @@ -82,6 +88,11 @@ rule &quot;calcu_days_1_&quot;
82 88 cdrp.setCalcu_start_date_2($fromDate);
83 89 cdrp.setCalcu_end_date_2($toDate);
84 90  
  91 + // 翻班相关
  92 + cdrp.setFbtype($sri.getFbtype());
  93 + cdrp.setFbgs_index(0);
  94 + cdrp.setFbweeks($sri.getWeekdays());
  95 +
85 96 /**
86 97 * 规则md5值(不使用id判定,使用md5判定)
87 98 * 使用,启用日期,路牌范围,结合生成md5编码
... ... @@ -132,6 +143,11 @@ rule &quot;calcu_days_2_&quot;
132 143 cdrp.setCalcu_start_date_2($qyrq);
133 144 cdrp.setCalcu_end_date_2($toDate);
134 145  
  146 + // 翻班相关
  147 + cdrp.setFbtype($sri.getFbtype());
  148 + cdrp.setFbgs_index(0);
  149 + cdrp.setFbweeks($sri.getWeekdays());
  150 +
135 151 /**
136 152 * 规则md5值(不使用id判定,使用md5判定)
137 153 * 使用,启用日期,路牌范围,结合生成md5编码
... ... @@ -249,63 +265,279 @@ end
249 265  
250 266  
251 267 //------------------------- 第二阶段、计算规则准备数据2(第一组循环) ----------------------------//
252   -rule "Calcu_loop1_1_" // 路牌在时刻表中存在,就翻
  268 +
  269 +function void calcu_loop1_fb(Calcu_days_result_pre $cdrp, ScheduleRule_input $sri) {
  270 + Integer $lpindex = $cdrp.getCalcu_index_lp();
  271 + Integer $lprangesize = $sri.getGuideboardIds().size();
  272 + Integer $ryindex = $cdrp.getCalcu_index_ry();
  273 + Integer $ryrangesize = $sri.getEmployeeConfigIds().size();
  274 + Integer $fbindex = $cdrp.getFbgs_index();
  275 + Integer $fbfangesize = $sri.getWeekdays().size();
  276 + DateTime $csd1 = $cdrp.getCalcu_start_date_1();
  277 + String $ruleId = $cdrp.getRuleId();
  278 +
  279 + $cdrp.setCalcu_index_lp(($lpindex + 1) % $lprangesize);
  280 + $cdrp.setCalcu_index_ry(($ryindex + 1) % $ryrangesize);
  281 +
  282 + $cdrp.setFbgs_index(($fbindex + 1) % $fbfangesize);
  283 + $cdrp.setCalcu_start_date_1($csd1.plusDays(1));
  284 +
  285 +// log.info("calcu_loop1_fb ruleId={}, calcu_index_lp/ry={}/{}",
  286 +// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry());
  287 +}
  288 +function void calcu_loop1_not_fb(Calcu_days_result_pre $cdrp, ScheduleRule_input $sri) {
  289 + DateTime $csd1 = $cdrp.getCalcu_start_date_1();
  290 + Integer $fbindex = $cdrp.getFbgs_index();
  291 + Integer $fbfangesize = $sri.getWeekdays().size();
  292 +
  293 + $cdrp.setFbgs_index(($fbindex + 1) % $fbfangesize);
  294 + $cdrp.setCalcu_start_date_1($csd1.plusDays(1));
  295 +
  296 +// log.info("calcu_loop1_not_fb ruleId={}, calcu_index_lp/ry={}/{}",
  297 +// $cdrp.getRuleId(), $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry());
  298 +}
  299 +
  300 +
  301 +rule "Calcu_loop1_fbtype_with_0_" // 翻班模式为 type=1 使用翻班格式翻,当天翻班格式是false,就跳过
  302 + salience 900
  303 + when
  304 + $cdrp: Calcu_days_result_pre(
  305 + calcu_start_date_1.isBefore(calcu_end_date_1),
  306 + $ruleId: ruleId,
  307 + fbtype == "1",
  308 + $fbindex : fbgs_index
  309 + )
  310 + $sri: ScheduleRule_input(
  311 + ruleId == $ruleId,
  312 + weekdays[$fbindex] == false
  313 + )
  314 + then
  315 + calcu_loop1_not_fb($cdrp, $sri);
  316 + update($cdrp);
  317 +end
  318 +
  319 +rule "Calcu_loop1_fbtype_with_1_lp_" // 翻班模式为 type=1 使用翻班格式翻,当天翻班格式是true,并且当天时刻表里存在指定路牌,就翻
253 320 salience 900
254 321 when
255 322 $cdrp: Calcu_days_result_pre(
256 323 calcu_start_date_1.isBefore(calcu_end_date_1),
257 324 $csd1: calcu_start_date_1,
258   - $ced1: calcu_end_date_1,
259 325 $ruleId: ruleId,
  326 + fbtype == "1",
260 327 $lpindex: calcu_index_lp,
261   - $ryindex: calcu_index_ry
  328 + $fbindex : fbgs_index
262 329 )
263 330 $sri: ScheduleRule_input(
264 331 ruleId == $ruleId,
265 332 $gids: guideboardIds,
266   - $lprangesize : guideboardIds.size(),
267   - $ryrangesize: employeeConfigIds.size()
  333 + weekdays[$fbindex] == true
268 334 )
269 335 $liro: LpInfoResult_output(
270 336 dateTime.isEqual($csd1),
271   - $gids.get($lpindex) == lpId,
272   - $lpId: lpId
  337 + $gids[$lpindex] == lpId
273 338 )
274 339 then
275   - $cdrp.setCalcu_index_lp(($lpindex + 1) % $lprangesize);
276   - $cdrp.setCalcu_index_ry(($ryindex + 1) % $ryrangesize);
277   - $cdrp.setCalcu_start_date_1($csd1.plusDays(1));
  340 + calcu_loop1_fb($cdrp, $sri);
  341 + update($cdrp);
278 342  
279   -// log.info("Calcu_loop1_1_ ruleId={}, calcu_index_lp/ry={}/{}",
280   -// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry());
  343 +end
281 344  
  345 +rule "Calcu_loop1_fbtype_with_1_no_lp_" // 翻班模式为 type=1 使用翻班格式翻,当天翻班格式是true,并且当天时刻表里不存在指定路牌,就跳过
  346 + salience 900
  347 + when
  348 + $cdrp: Calcu_days_result_pre(
  349 + calcu_start_date_1.isBefore(calcu_end_date_1),
  350 + $csd1: calcu_start_date_1,
  351 + $ruleId: ruleId,
  352 + fbtype == "1",
  353 + $fbindex : fbgs_index
  354 + )
  355 + $sri: ScheduleRule_input(
  356 + ruleId == $ruleId,
  357 + weekdays[$fbindex] == true
  358 + )
  359 + then
  360 + calcu_loop1_not_fb($cdrp, $sri);
282 361 update($cdrp);
283 362 end
284 363  
285   -rule "Calcu_loop1_2_" // 路牌在时刻表中不存在,就不翻
  364 +
  365 +rule "Calcu_loop1_timetabletype_with_lp_" // 翻班模式为 type=0 使用时刻表格式翻,路牌在时刻表中存在,就翻
286 366 salience 900
287 367 when
288 368 $cdrp: Calcu_days_result_pre(
289 369 calcu_start_date_1.isBefore(calcu_end_date_1),
290 370 $csd1: calcu_start_date_1,
291   - $ced1: calcu_end_date_1,
292   - $ruleId: ruleId
  371 + $ruleId: ruleId,
  372 + fbtype == "0",
  373 + $lpindex: calcu_index_lp
293 374 )
294 375 $sri: ScheduleRule_input(
295 376 ruleId == $ruleId,
296   - $rangesize : guideboardIds.size()
  377 + $gids: guideboardIds
  378 + )
  379 + $liro: LpInfoResult_output(
  380 + dateTime.isEqual($csd1),
  381 + $gids[$lpindex] == lpId
297 382 )
298 383 then
299   - $cdrp.setCalcu_start_date_1($csd1.plusDays(1));
300   -
301   -// log.info("Calcu_loop1_2_ ruleId={}, calcu_index_lp/ry={}/{}",
302   -// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry());
  384 + calcu_loop1_fb($cdrp, $sri);
  385 + update($cdrp);
  386 +end
303 387  
  388 +rule "Calcu_loop1_timetabletype_with_no_lp_" // 翻班模式为 type=0 使用时刻表格式翻,路牌在时刻表中不存在,就跳过
  389 + salience 900
  390 + when
  391 + $cdrp: Calcu_days_result_pre(
  392 + calcu_start_date_1.isBefore(calcu_end_date_1),
  393 + $csd1: calcu_start_date_1,
  394 + $ruleId: ruleId,
  395 + fbtype == "0"
  396 + )
  397 + $sri: ScheduleRule_input(
  398 + ruleId == $ruleId
  399 + )
  400 + then
  401 + calcu_loop1_not_fb($cdrp, $sri);
304 402 update($cdrp);
305 403 end
306 404  
307 405 //------------------------- 第三阶段、计算规则准备数据2(第二组循环) ----------------------------//
308   -rule "Calcu_loop2_1_" // 路牌在时刻表中存在,就翻
  406 +
  407 +function void calcu_loop2_fb(
  408 + SchedulePlan $sp,
  409 + Calcu_days_result_pre $cdrp,
  410 + ScheduleRule_input $sri,
  411 + LpInfoResult_output $liro,
  412 + ScheduleResults_output rs,
  413 + Logger log) {
  414 + String $ruleId = $cdrp.getRuleId();
  415 + DateTime $csd2 = $cdrp.getCalcu_start_date_2();
  416 + DateTime $ced2 = $cdrp.getCalcu_end_date_2();
  417 + Integer $lpindex = $cdrp.getCalcu_index_lp();
  418 + List $gids = $sri.getGuideboardIds();
  419 + Integer $lprangesize = $sri.getGuideboardIds().size();
  420 + Integer $ryindex = $cdrp.getCalcu_index_ry();
  421 + List $eids = $sri.getEmployeeConfigIds();
  422 + Integer $ryrangesize = $sri.getEmployeeConfigIds().size();
  423 + Integer $fbindex = $cdrp.getFbgs_index();
  424 + Integer $fbfangesize = $sri.getWeekdays().size();
  425 + String $cid = $sri.getCarConfigId();
  426 + String $xlid = $sri.getXlId();
  427 +
  428 + com.bsth.entity.schedule.rule.ScheduleRule1Flat $srf = $sri.getSelf();
  429 +
  430 + String $ttinfoId = $liro.getTtInfoId();
  431 + String $ttinfoName = $liro.getTtInfoName();
  432 +
  433 + ScheduleResult_output ro = new ScheduleResult_output();
  434 + ro.setRuleId($ruleId);
  435 + ro.setSd($csd2);
  436 + ro.setGuideboardId(String.valueOf($gids.get($lpindex)));
  437 + ro.setEmployeeConfigId(String.valueOf($eids.get($ryindex)));
  438 + ro.setCarConfigId($cid);
  439 + ro.setXlId($xlid);
  440 +
  441 + // 类型
  442 + ro.setsType($sri.getsType());
  443 +
  444 + rs.getResults().add(ro);
  445 +
  446 +// log.info("gogoogogogogo");
  447 +
  448 + $cdrp.setCalcu_index_lp(($lpindex + 1) % $lprangesize);
  449 + $cdrp.setCalcu_index_ry(($ryindex + 1) % $ryrangesize);
  450 +
  451 + $cdrp.setFbgs_index(($fbindex + 1) % $fbfangesize);
  452 + $cdrp.setCalcu_start_date_2($csd2.plusDays(1));
  453 +
  454 + if ($sri.getsType() == ScheduleRule_Type.NORMAL) {
  455 + // 保存排班规则循环结果 --> SchedulePlanRuleResult
  456 + SchedulePlanRuleResult schedulePlanRuleResult = new SchedulePlanRuleResult($sp);
  457 +// schedulePlanRuleResult.setXlId(String.valueOf($srf.getXl().getId()));
  458 + schedulePlanRuleResult.setXlId($srf.getXl().getId());
  459 + schedulePlanRuleResult.setXlName($srf.getXl().getName());
  460 + schedulePlanRuleResult.setRuleId($ruleId);
  461 + schedulePlanRuleResult.setCcId($cid);
  462 + schedulePlanRuleResult.setCcZbh($srf.getCarConfigInfo().getCl().getInsideCode());
  463 + schedulePlanRuleResult.setGids($srf.getLpIds()); // 参与md5计算
  464 + schedulePlanRuleResult.setGnames($srf.getLpNames());
  465 + schedulePlanRuleResult.setGidindex(String.valueOf($lpindex));
  466 + schedulePlanRuleResult.setEcids($srf.getRyConfigIds());
  467 + schedulePlanRuleResult.setEcdbbms($srf.getRyDbbms());
  468 + schedulePlanRuleResult.setEcindex(String.valueOf($ryindex));
  469 + schedulePlanRuleResult.setScheduleDate($csd2.toDate());
  470 + schedulePlanRuleResult.setTtinfoId($ttinfoId);
  471 + schedulePlanRuleResult.setTtinfoName($ttinfoName);
  472 + schedulePlanRuleResult.setQyrq($sri.getQyrq().toDate()); // 参与md5计算
  473 + schedulePlanRuleResult.setOrigingidindex(String.valueOf($sri.getSelf().getLpStart())); // 参与md5计算
  474 +
  475 + rs.getSchedulePlanRuleResults().add(schedulePlanRuleResult);
  476 + }
  477 +
  478 +
  479 +
  480 + log.info("calcu_loop2_fb ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}",
  481 + $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2);
  482 +
  483 +}
  484 +
  485 +function void calcu_loop2_not_fb(
  486 + Calcu_days_result_pre $cdrp,
  487 + ScheduleRule_input $sri,
  488 + ScheduleResults_output rs) {
  489 +
  490 + String $ruleId = $cdrp.getRuleId();
  491 + DateTime $csd2 = $cdrp.getCalcu_start_date_2();
  492 + Integer $lpindex = $cdrp.getCalcu_index_lp();
  493 + List $gids = $sri.getGuideboardIds();
  494 + Integer $ryindex = $cdrp.getCalcu_index_ry();
  495 + List $eids = $sri.getEmployeeConfigIds();
  496 + Integer $fbindex = $cdrp.getFbgs_index();
  497 + Integer $fbfangesize = $sri.getWeekdays().size();
  498 + String $cid = $sri.getCarConfigId();
  499 + String $xlid = $sri.getXlId();
  500 +
  501 + ScheduleResult_output ro = new ScheduleResult_output();
  502 + ro.setRuleId($ruleId);
  503 + ro.setSd($csd2);
  504 +// ro.setGuideboardId(String.valueOf($gids.get($lpindex)));
  505 + ro.setGuideboardId("not_fb_lp"); // 不翻班,路牌id用假的,后面会过滤
  506 + ro.setEmployeeConfigId(String.valueOf($eids.get($ryindex)));
  507 + ro.setCarConfigId($cid);
  508 + ro.setXlId($xlid);
  509 +
  510 + // 类型
  511 + ro.setsType($sri.getsType());
  512 +
  513 + rs.getResults().add(ro);
  514 +
  515 + $cdrp.setFbgs_index(($fbindex + 1) % $fbfangesize);
  516 + $cdrp.setCalcu_start_date_2($csd2.plusDays(1));
  517 +}
  518 +
  519 +rule "Calcu_loop2_fbtype_with_0_" // 翻班模式为 type=1 使用翻班格式翻,当天翻班格式是false,就跳过
  520 + salience 800
  521 + when
  522 + ScheduleCalcuParam_input($sp: schedulePlan, $xlid: xlId)
  523 + $cdrp: Calcu_days_result_pre(
  524 + calcu_start_date_1.isEqual(calcu_end_date_1),
  525 + calcu_start_date_2.isBefore(calcu_end_date_2) || calcu_start_date_2.isEqual(calcu_end_date_2),
  526 + $ruleId: ruleId,
  527 + fbtype == "1",
  528 + $fbindex : fbgs_index
  529 + )
  530 + $sri: ScheduleRule_input(
  531 + ruleId == $ruleId,
  532 + weekdays[$fbindex] == false
  533 + )
  534 + then
  535 + calcu_loop2_not_fb($cdrp, $sri, scheduleResult);
  536 + update($cdrp);
  537 +
  538 +end
  539 +
  540 +rule "Calcu_loop2_fbtype_with_1_lp_" // 翻班模式为 type=1 使用翻班格式翻,当天翻班格式是true,并且当天时刻表里存在指定路牌,就翻
309 541 salience 800
310 542 when
311 543 ScheduleCalcuParam_input($sp: schedulePlan, $xlid: xlId)
... ... @@ -313,80 +545,47 @@ rule &quot;Calcu_loop2_1_&quot; // 路牌在时刻表中存在,就翻
313 545 calcu_start_date_1.isEqual(calcu_end_date_1),
314 546 calcu_start_date_2.isBefore(calcu_end_date_2) || calcu_start_date_2.isEqual(calcu_end_date_2),
315 547 $csd2: calcu_start_date_2,
316   - $ced2: calcu_end_date_2,
317 548 $ruleId: ruleId,
  549 + fbtype == "1",
318 550 $lpindex: calcu_index_lp,
319   - $ryindex: calcu_index_ry
  551 + $fbindex : fbgs_index
320 552 )
321 553 $sri: ScheduleRule_input(
322 554 ruleId == $ruleId,
323   - $cid: carConfigId,
324 555 $gids: guideboardIds,
325   - $eids: employeeConfigIds,
326   - $lprangesize : guideboardIds.size(),
327   - $ryrangesize: employeeConfigIds.size(),
328   - $srf: self
  556 + weekdays[$fbindex] == true
329 557 )
330 558 $liro: LpInfoResult_output(
331 559 dateTime.isEqual($csd2),
332   - $gids.get($lpindex) == lpId,
333   - $lpId: lpId,
334   - $ttinfoId: ttInfoId,
335   - $ttinfoName: ttInfoName
  560 + $gids[$lpindex] == lpId
336 561 )
337 562 then
338   - ScheduleResult_output ro = new ScheduleResult_output();
339   - ro.setRuleId($ruleId);
340   - ro.setSd($csd2);
341   - ro.setGuideboardId(String.valueOf($gids.get($lpindex)));
342   - ro.setEmployeeConfigId(String.valueOf($eids.get($ryindex)));
343   - ro.setCarConfigId($cid);
344   - ro.setXlId($xlid);
345   -
346   - // 类型
347   - ro.setsType($sri.getsType());
348   -
349   - scheduleResult.getResults().add(ro);
350   -
351   -// log.info("gogoogogogogo");
352   -
353   - $cdrp.setCalcu_index_lp(($lpindex + 1) % $lprangesize);
354   - $cdrp.setCalcu_index_ry(($ryindex + 1) % $ryrangesize);
355   - $cdrp.setCalcu_start_date_2($csd2.plusDays(1));
356   -
357   - if ($sri.getsType() == ScheduleRule_Type.NORMAL) {
358   - // 保存排班规则循环结果 --> SchedulePlanRuleResult
359   - SchedulePlanRuleResult schedulePlanRuleResult = new SchedulePlanRuleResult($sp);
360   -// schedulePlanRuleResult.setXlId(String.valueOf($srf.getXl().getId()));
361   - schedulePlanRuleResult.setXlId($srf.getXl().getId());
362   - schedulePlanRuleResult.setXlName($srf.getXl().getName());
363   - schedulePlanRuleResult.setRuleId($ruleId);
364   - schedulePlanRuleResult.setCcId($cid);
365   - schedulePlanRuleResult.setCcZbh($srf.getCarConfigInfo().getCl().getInsideCode());
366   - schedulePlanRuleResult.setGids($srf.getLpIds()); // 参与md5计算
367   - schedulePlanRuleResult.setGnames($srf.getLpNames());
368   - schedulePlanRuleResult.setGidindex(String.valueOf($lpindex));
369   - schedulePlanRuleResult.setEcids($srf.getRyConfigIds());
370   - schedulePlanRuleResult.setEcdbbms($srf.getRyDbbms());
371   - schedulePlanRuleResult.setEcindex(String.valueOf($ryindex));
372   - schedulePlanRuleResult.setScheduleDate($csd2.toDate());
373   - schedulePlanRuleResult.setTtinfoId($ttinfoId);
374   - schedulePlanRuleResult.setTtinfoName($ttinfoName);
375   - schedulePlanRuleResult.setQyrq($sri.getQyrq().toDate()); // 参与md5计算
376   - schedulePlanRuleResult.setOrigingidindex(String.valueOf($sri.getSelf().getLpStart())); // 参与md5计算
377   -
378   - scheduleResult.getSchedulePlanRuleResults().add(schedulePlanRuleResult);
379   - }
380   -
381   -
382   -
383   -// log.info("Calcu_loop2_1_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}",
384   -// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2);
  563 + calcu_loop2_fb($sp, $cdrp, $sri, $liro, scheduleResult, log);
  564 + update($cdrp);
  565 +end
385 566  
  567 +rule "Calcu_loop2_fbtype_with_1_no_lp_" // 翻班模式为 type=1 使用翻班格式翻,当天翻班格式是true,并且当天时刻表里不存在指定路牌,就跳过
  568 + salience 800
  569 + when
  570 + ScheduleCalcuParam_input($sp: schedulePlan, $xlid: xlId)
  571 + $cdrp: Calcu_days_result_pre(
  572 + calcu_start_date_1.isEqual(calcu_end_date_1),
  573 + calcu_start_date_2.isBefore(calcu_end_date_2) || calcu_start_date_2.isEqual(calcu_end_date_2),
  574 + $ruleId: ruleId,
  575 + fbtype == "1",
  576 + $fbindex : fbgs_index
  577 + )
  578 + $sri: ScheduleRule_input(
  579 + ruleId == $ruleId,
  580 + weekdays[$fbindex] == true
  581 + )
  582 + then
  583 + calcu_loop2_not_fb($cdrp, $sri, scheduleResult);
386 584 update($cdrp);
  585 +
387 586 end
388 587  
389   -rule "Calcu_loop2_2_" // 路牌在时刻表中不存在,就不
  588 +rule "Calcu_loop2_timetabletype_with_lp_" // 翻班模式为 type=0 使用时刻表格式翻,路牌在时刻表中存在,就
390 589 salience 800
391 590 when
392 591 ScheduleCalcuParam_input($sp: schedulePlan, $xlid: xlId)
... ... @@ -394,54 +593,40 @@ rule &quot;Calcu_loop2_2_&quot; // 路牌在时刻表中不存在,就不翻
394 593 calcu_start_date_1.isEqual(calcu_end_date_1),
395 594 calcu_start_date_2.isBefore(calcu_end_date_2) || calcu_start_date_2.isEqual(calcu_end_date_2),
396 595 $csd2: calcu_start_date_2,
397   - $ced2: calcu_end_date_2,
398 596 $ruleId: ruleId,
  597 + fbtype == "0",
399 598 $lpindex: calcu_index_lp,
400   - $ryindex: calcu_index_ry
  599 + $fbindex : fbgs_index
401 600 )
402 601 $sri: ScheduleRule_input(
403 602 ruleId == $ruleId,
404   - $cid: carConfigId,
405   - $gids: guideboardIds,
406   - $eids: employeeConfigIds,
407   - $srf: self
  603 + $gids: guideboardIds
  604 + )
  605 + $liro: LpInfoResult_output(
  606 + dateTime.isEqual($csd2),
  607 + $gids[$lpindex] == lpId
408 608 )
409 609 then
410   - ScheduleResult_output ro = new ScheduleResult_output();
411   - ro.setRuleId($ruleId);
412   - ro.setSd($csd2);
413   - ro.setGuideboardId(String.valueOf($gids.get($lpindex)));
414   - ro.setEmployeeConfigId(String.valueOf($eids.get($ryindex)));
415   - ro.setCarConfigId($cid);
416   - ro.setXlId($xlid);
417   -
418   - // 类型
419   - ro.setsType($sri.getsType());
420   -
421   - scheduleResult.getResults().add(ro);
422   -
423   - $cdrp.setCalcu_start_date_2($csd2.plusDays(1));
424   -
425   -// // 保存排班规则循环结果 --> SchedulePlanRuleResult
426   -// SchedulePlanRuleResult schedulePlanRuleResult = new SchedulePlanRuleResult($sp);
427   -// schedulePlanRuleResult.setXlId(String.valueOf($srf.getXl().getId()));
428   -// schedulePlanRuleResult.setXlName($srf.getXl().getName());
429   -// schedulePlanRuleResult.setRuleId($ruleId);
430   -// schedulePlanRuleResult.setCcId($cid);
431   -// schedulePlanRuleResult.setCcZbh($srf.getCarConfigInfo().getCl().getInsideCode());
432   -// schedulePlanRuleResult.setGids($srf.getLpIds());
433   -// schedulePlanRuleResult.setGnames($srf.getLpNames());
434   -// schedulePlanRuleResult.setGidindex(String.valueOf($lpindex));
435   -// schedulePlanRuleResult.setEcids($srf.getRyConfigIds());
436   -// schedulePlanRuleResult.setEcdbbms($srf.getRyDbbms());
437   -// schedulePlanRuleResult.setEcindex(String.valueOf($ryindex));
438   -// schedulePlanRuleResult.setScheduleDate($csd2.toDate());
439   -//
440   -// scheduleResult.getSchedulePlanRuleResults().add(schedulePlanRuleResult);
441   -
442   -// log.info("Calcu_loop2_2_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}",
443   -// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2);
  610 + calcu_loop2_fb($sp, $cdrp, $sri, $liro, scheduleResult, log);
  611 + update($cdrp);
  612 +
  613 +end
444 614  
  615 +rule "Calcu_loop2_timetabletype_with_no_lp_" // 翻班模式为 type=0 使用时刻表格式翻,路牌在时刻表中不存在,就跳过
  616 + salience 800
  617 + when
  618 + ScheduleCalcuParam_input($sp: schedulePlan, $xlid: xlId)
  619 + $cdrp: Calcu_days_result_pre(
  620 + calcu_start_date_1.isEqual(calcu_end_date_1),
  621 + calcu_start_date_2.isBefore(calcu_end_date_2) || calcu_start_date_2.isEqual(calcu_end_date_2),
  622 + $ruleId: ruleId,
  623 + fbtype == "0"
  624 + )
  625 + $sri: ScheduleRule_input(
  626 + ruleId == $ruleId
  627 + )
  628 + then
  629 + calcu_loop2_not_fb($cdrp, $sri, scheduleResult);
445 630 update($cdrp);
446 631 end
447 632  
... ... @@ -450,3 +635,5 @@ end
450 635  
451 636  
452 637  
  638 +
  639 +
... ...
src/main/resources/static/pages/base/station/js/station-list-table.js
... ... @@ -262,7 +262,6 @@
262 262 var i = layer.load(2);
263 263 // 异步请求获取表格数据
264 264 $.get('/stationroute',params,function(result){
265   - console.log(result);
266 265 // 添加序号
267 266 result.content.page = page;
268 267 // 把数据填充到模版中
... ...
src/main/resources/static/pages/base/timesmodel/add.html
... ... @@ -134,6 +134,9 @@
134 134 <label >
135 135 <input type="radio" class="icheck" name="baseRes" value=1 checked> 班型/人次/车辆
136 136 </label>
  137 + <label>
  138 + <input type="radio" class="icheck" name="baseRes" value=2> 发车间隔分析
  139 + </label>
137 140 <label>
138 141 <input type="radio" class="icheck" name="baseRes" value=0> 客流大数据分析
139 142 </label>
... ...
src/main/resources/static/pages/base/timesmodel/js/add-form-wizard.js
... ... @@ -322,6 +322,8 @@ var SKBFormWizard = function() {
322 322 tempName = 'carnum_temp';
323 323 else if(n==1)
324 324 tempName = 'bctype_temp';
  325 + else if (n==2)
  326 + tempName = 'fcjx_temp';
325 327 // 2、获参数详情模版html内容.
326 328 $.get('/pages/base/timesmodel/tepms/'+ tempName + '.html', function(html){
327 329 $('#tab3').append(html);
... ... @@ -381,7 +383,12 @@ var SKBFormWizard = function() {
381 383 }else if(n==1) {
382 384 // 返回参数详情模版.
383 385 return cb && cb ({'forminput':template(tempName,{map:map}),'datadisplay': template(tempName +'config',{map:null})});
384   - }
  386 + }else if (n==2) {
  387 + return cb && cb({
  388 + 'forminput': template(tempName, {map: map}),
  389 + 'datadisplay': template(tempName + '_config', {map: null})
  390 + });
  391 + }
385 392 });
386 393 }
387 394  
... ... @@ -829,34 +836,105 @@ var SKBFormWizard = function() {
829 836 getHtmlTemp(baseRes,r.content[0],lineId,krl,function(htlMap) {
830 837 $('#tab3').html(htlMap.forminput);
831 838 $('#tab4').html(htlMap.datadisplay);
832   - $('#linePlayTypeSelect').val(r.content[0].line.linePlayType);
833   - if(baseRes==1)
834   - ComponentsBootstrapTagsinput.init();// 初始化班型人次Input Tag.
835   - // 日期控件
836   - $('#qdzsbsjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 起始站首班时间
837   - $('#qdzmbsjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 起始站末班时间
838   - $('#zdzsbsjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 终点站首班时间
839   - $('#zdzmbsjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 终点站末班时间
840   - $('#zgfkssjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 早高峰开始时间
841   - $('#zgfjssjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 早高峰结束时间
842   - $('#wgfkssjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 晚高峰开始时间
843   - $('#wgfjssjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 晚高峰结束时间
844   - // 初始化停车场下拉框.
845   - gettccInfo(function(cd) {
846   - var options = '<option value="">请选择...</option><optgroup label="停车场">';
847   - var $_len = cd.length;
848   - if($_len>0) {
849   - $.each(cd, function(i, d){
850   - options += '<option value="'+d.parkCode+'">'+d.parkName+'</option>';
851   - });
852   -
853   - }
854   - options += '</optgroup>';
855   - $('#carParkSelect').html(options).select2();
856   - $('#carParkSelect').select2("val",r.content[0].carPark);
857   - // 关闭弹出加载层
858   - layer.close(i);
859   - });
  839 +
  840 + if (baseRes == 0) { // 客流大数据分析
  841 + $('#linePlayTypeSelect').val(r.content[0].line.linePlayType);
  842 + // 日期控件
  843 + $('#qdzsbsjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 起始站首班时间
  844 + $('#qdzmbsjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 起始站末班时间
  845 + $('#zdzsbsjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 终点站首班时间
  846 + $('#zdzmbsjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 终点站末班时间
  847 + $('#zgfkssjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 早高峰开始时间
  848 + $('#zgfjssjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 早高峰结束时间
  849 + $('#wgfkssjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 晚高峰开始时间
  850 + $('#wgfjssjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 晚高峰结束时间
  851 + // 初始化停车场下拉框.
  852 + gettccInfo(function(cd) {
  853 + var options = '<option value="">请选择...</option><optgroup label="停车场">';
  854 + var $_len = cd.length;
  855 + if($_len>0) {
  856 + $.each(cd, function(i, d){
  857 + options += '<option value="'+d.parkCode+'">'+d.parkName+'</option>';
  858 + });
  859 +
  860 + }
  861 + options += '</optgroup>';
  862 + $('#carParkSelect').html(options).select2();
  863 + $('#carParkSelect').select2("val",r.content[0].carPark);
  864 + // 关闭弹出加载层
  865 + layer.close(i);
  866 + });
  867 +
  868 + } else if (baseRes == 1) { // 班次/人次/车辆
  869 + $('#linePlayTypeSelect').val(r.content[0].line.linePlayType);
  870 + ComponentsBootstrapTagsinput.init();// 初始化班型人次Input Tag.
  871 + // 日期控件
  872 + $('#qdzsbsjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 起始站首班时间
  873 + $('#qdzmbsjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 起始站末班时间
  874 + $('#zdzsbsjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 终点站首班时间
  875 + $('#zdzmbsjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 终点站末班时间
  876 + $('#zgfkssjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 早高峰开始时间
  877 + $('#zgfjssjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 早高峰结束时间
  878 + $('#wgfkssjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 晚高峰开始时间
  879 + $('#wgfjssjInput').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});// 晚高峰结束时间
  880 + // 初始化停车场下拉框.
  881 + gettccInfo(function(cd) {
  882 + var options = '<option value="">请选择...</option><optgroup label="停车场">';
  883 + var $_len = cd.length;
  884 + if($_len>0) {
  885 + $.each(cd, function(i, d){
  886 + options += '<option value="'+d.parkCode+'">'+d.parkName+'</option>';
  887 + });
  888 +
  889 + }
  890 + options += '</optgroup>';
  891 + $('#carParkSelect').html(options).select2();
  892 + $('#carParkSelect').select2("val",r.content[0].carPark);
  893 + // 关闭弹出加载层
  894 + layer.close(i);
  895 + });
  896 +
  897 + } else if (baseRes == 2) { // 发车间隔分析
  898 + // 上下行首末班日期控件
  899 + $('#startStationFirstTime_id').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});
  900 + $('#startStationEndTime_id').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});
  901 + $('#endStationFirstTime_id').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});
  902 + $('#endStationEndTime_id').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});
  903 +
  904 + // 早高峰晚高峰日期控件
  905 + $('#earlyStartTime_id').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});
  906 + $('#earlyEndTime_id').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});
  907 + $('#lateStartTime_id').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});
  908 + $('#lateEndTime_id').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});
  909 +
  910 + // 线路规划类型日期控件
  911 + $('#linePlayType_id').val(r.content[0].line.linePlayType);
  912 +
  913 + // 停车场下拉框控件
  914 + gettccInfo(function(cd) {
  915 + var options = '<option value="">请选择...</option><optgroup label="停车场">';
  916 + var $_len = cd.length;
  917 + if($_len>0) {
  918 + $.each(cd, function(i, d){
  919 + options += '<option value="'+d.parkCode+'">'+d.parkName+'</option>';
  920 + });
  921 +
  922 + }
  923 + options += '</optgroup>';
  924 + $('#carPark_id').html(options).select2();
  925 + $('#carPark_id').select2("val",r.content[0].carPark);
  926 + // 关闭弹出加载层
  927 + layer.close(i);
  928 + });
  929 +
  930 + // 发车间隙选择控件
  931 + ComponentsBootstrapTagsinput.init_fcjx();
  932 +
  933 + // TODO:发车间隔分析参数设置
  934 +
  935 + layer.close(i);
  936 + }
  937 +
860 938 });
861 939 });
862 940 }
... ...
src/main/resources/static/pages/base/timesmodel/js/base-fun.js
... ... @@ -794,44 +794,44 @@ var BaseFun = function() {
794 794  
795 795 // 第一步 根据表单中的参数得到所有路牌下的班次数[从各路牌下的第一个班次发车时间 到 营运结束时间点并且是连续的班次数].
796 796 var allLMapBc = baseF.GetByArgusInitAllLpDownedBcCollections(saa , cara , map , seMap , dataMap);
797   - //return {'json':allLMapBc,'bxrcgs':null};
  797 + return {'json':allLMapBc,'bxrcgs':null};
798 798  
799   - // 第二步 纵向调整
800   - baseF.evenStartDepartSpace(allLMapBc , dataMap);
801   - //return {'json':allLMapBc,'bxrcgs':null};
802   -
803   - // 第三步 剔除首末班车以外的班次,并确认首末班车.
804   - var markArray = baseF.markFirstAndLastBusAlsoDietNotInRangeBc(allLMapBc , dataMap);
805   - //return {'json':markArray,'bxrcgs':null};
806   - // 第四步 横向调整
807   - baseF.resizeByPitStopTime(cara , markArray , dataMap);
808   - //return {'json':markArray,'bxrcgs':null};
809   - /**
810   - * 第五步 把班型合理的分配到各个路牌上.
811   - *
812   - * 切割班型/人次/配车数 字符串 为 数组对象.
813   - *
814   - * 把班型分配到对应的具体路牌上.
815   - */
816   - // 切割班型/人次/配车数 字符串 为 数组对象.
817   - var list = baseF.getBxRcListCollection(map.bxrc);
818   - // 把班型分配到对应的具体路牌上.
819   - baseF.bxAlloTotLp(list,cara);
820   - ////return {'json':markArray,'bxrcgs':null};
  799 + //// 第二步 纵向调整
  800 + //baseF.evenStartDepartSpace(allLMapBc , dataMap);
  801 + ////return {'json':allLMapBc,'bxrcgs':null};
821 802 //
822   - //
823   - // 第六步 抽车来满足工时.
824   - var tempA = baseF.abstractCar(list , markArray , cara , saa , dataMap , map);
825   - //return {'json':tempA,'bxrcgs':null};
826   - // 第七步 确定吃饭时间.
827   - if (map.cfdd) { // NEW,没有选择吃饭地点,不设定吃饭班次
828   - baseF.markeEatTime(list , tempA , cara , saa , dataMap ,map);
829   - }
830   - baseF.resizeByPitStopTime(cara , tempA , dataMap);
831   - baseF.updfcno01(tempA,0);
832   - //return {'json':tempA,'bxrcgs':null};
833   - // 确定进出场、早晚例保时间.并返回班次数组集合
834   - return {'json':baseF.addInOutFieldBc(cara,tempA,dataMap,saa,map),'bxrcgs':null};
  803 + //// 第三步 剔除首末班车以外的班次,并确认首末班车.
  804 + //var markArray = baseF.markFirstAndLastBusAlsoDietNotInRangeBc(allLMapBc , dataMap);
  805 + ////return {'json':markArray,'bxrcgs':null};
  806 + //// 第四步 横向调整
  807 + //baseF.resizeByPitStopTime(cara , markArray , dataMap);
  808 + ////return {'json':markArray,'bxrcgs':null};
  809 + ///**
  810 + // * 第五步 把班型合理的分配到各个路牌上.
  811 + // *
  812 + // * 切割班型/人次/配车数 字符串 为 数组对象.
  813 + // *
  814 + // * 把班型分配到对应的具体路牌上.
  815 + // */
  816 + //// 切割班型/人次/配车数 字符串 为 数组对象.
  817 + //var list = baseF.getBxRcListCollection(map.bxrc);
  818 + //// 把班型分配到对应的具体路牌上.
  819 + //baseF.bxAlloTotLp(list,cara);
  820 + //////return {'json':markArray,'bxrcgs':null};
  821 + ////
  822 + ////
  823 + //// 第六步 抽车来满足工时.
  824 + //var tempA = baseF.abstractCar(list , markArray , cara , saa , dataMap , map);
  825 + ////return {'json':tempA,'bxrcgs':null};
  826 + //// 第七步 确定吃饭时间.
  827 + //if (map.cfdd) { // NEW,没有选择吃饭地点,不设定吃饭班次
  828 + // baseF.markeEatTime(list , tempA , cara , saa , dataMap ,map);
  829 + //}
  830 + //baseF.resizeByPitStopTime(cara , tempA , dataMap);
  831 + //baseF.updfcno01(tempA,0);
  832 + ////return {'json':tempA,'bxrcgs':null};
  833 + //// 确定进出场、早晚例保时间.并返回班次数组集合
  834 + //return {'json':baseF.addInOutFieldBc(cara,tempA,dataMap,saa,map),'bxrcgs':null};
835 835 },
836 836  
837 837 markeEatTime : function(list , markArray , cara , saa , dataMap ,map) {
... ...
src/main/resources/static/pages/base/timesmodel/js/gantt.js
... ... @@ -50,11 +50,16 @@
50 50 var CSMap = null,data = null;
51 51 if(map.baseRes== '0') {
52 52 CSMap = getMaxCarAndStopSpace0(map,seMap);
  53 + // 发车间隙
  54 + map.fcjx = CSMap.fcjx;
53 55 }else if(map.baseRes== '1') {
54 56 CSMap = getMaxCarAndStopSpace1(map);
55   - }
56   - // 发车间隙
57   - map.fcjx = CSMap.fcjx;
  57 + // 发车间隙
  58 + map.fcjx = CSMap.fcjx;
  59 + }else if (map.baseRes == '2') {
  60 + // TODO:之后可能有新的参数加入
  61 + }
  62 +
58 63 // 定义时间参数.
59 64 var stopAraay = getsj(map);
60 65 if(isNull(objD)) {
... ... @@ -66,7 +71,11 @@
66 71 // data = BaseFun.BXPplaceClassesTime(stopAraay,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA);
67 72 // data = BaseFun.BXPplaceClassesTime01(stopAraay,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA);
68 73 data = BaseFun.BXPplaceClassesTime02(stopAraay,CSMap.maxCar,map,seMap,dataMap);
69   - }
  74 + } else if (map.baseRes == '2') {
  75 + // TODO:绘制gantt图表
  76 + // TODO:var seDate = getksjssj(null,seMap.s); 关联参数必须设置
  77 + alert("TODO:gantt图表数据");
  78 + }
70 79  
71 80 }else {
72 81 var jsonA = JSON.parse(objD);
... ...
src/main/resources/static/pages/base/timesmodel/js/tagsinput.js
... ... @@ -78,10 +78,53 @@ var ComponentsBootstrapTagsinput = function() {
78 78 tag = false;
79 79 return tag;
80 80 }
81   - }
  81 + };
  82 +
  83 + var handelDemo3 = function() {
  84 + // 定义tags控件class
  85 + var elt = $('#fcjx_tagsinput');
  86 + elt.tagsinput({
  87 + tagClass: function(item) {
  88 + return 'label label-danger label-important';
  89 + },
  90 + itemValue: 'value',
  91 + itemText: 'text'
  92 + });
  93 +
  94 + // 初始化内部控件,时间控件
  95 + $('#fcjx_tagsinput_starttime').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});
  96 + $('#fcjx_tagsinput_endtime').datetimepicker({format : 'HH:mm',locale: 'zh-cn'});
  97 +
  98 + $('#fcjx_tagsinput').on('beforeItemAdd', function(event) {
  99 + // TODO:这里可以做一些逻辑判定
  100 + });
  101 +
  102 + $('#fcjx_tagsinput_add').on('click', function(){
  103 + var starttime = $('#fcjx_tagsinput_starttime').val();
  104 + var endtime = $('#fcjx_tagsinput_endtime').val();
  105 + var fcjx = $('#fcjx_tagsinput_value').val();
  106 +
  107 + if (starttime && endtime && fcjx) {
  108 + // TODO:这里做一些逻辑判定
  109 +
  110 + elt.tagsinput('add', {
  111 + "value": starttime + '/' + endtime + '/' + fcjx,
  112 + "text": starttime + '/' + endtime + '/' + fcjx
  113 + });
  114 + $('#fcjx_tagsinput_starttime').val(null);
  115 + $('#fcjx_tagsinput_endtime').val(null);
  116 + $('#fcjx_tagsinput_value').val(null);
  117 + }
  118 + });
  119 +
  120 +
  121 + };
82 122 return {
83 123 init: function() {
84 124 handleDemo2();
  125 + },
  126 + init_fcjx: function() {
  127 + handelDemo3();
85 128 }
86 129 };
87 130 }();
88 131 \ No newline at end of file
... ...
src/main/resources/static/pages/base/timesmodel/tepms/fcjx_temp.html 0 → 100644
  1 +<script type="text/html" id = "fcjx_temp">
  2 +
  3 + <div class="form-group">
  4 + <div class="col-md-6">
  5 + <label class="control-label col-md-5">
  6 + <span class="required"> * </span> 上行首班时间 :
  7 + </label>
  8 + <div class="col-md-5">
  9 + <input type="text" class="form-control" name="startStationFirstTime" value="{{map.line.startStationFirstTime}}" id="startStationFirstTime_id"
  10 + placeholder="请输入起始站首班时间">
  11 + </div>
  12 + </div>
  13 + <div class="col-md-6">
  14 + <label class="control-label col-md-5">
  15 + <span class="required"> * </span> 上行末班时间 :
  16 + </label>
  17 + <div class="col-md-5">
  18 + <input type="text" class="form-control" name="startStationEndTime" value="{{map.line.startStationEndTime}}" id="startStationEndTime_id"
  19 + placeholder="请输入起始站末班时间">
  20 + </div>
  21 + </div>
  22 + </div>
  23 +
  24 + <div class="form-group">
  25 + <div class="col-md-6">
  26 + <label class="control-label col-md-5">
  27 + <span class="required"> * </span> 下行首班时间 :
  28 + </label>
  29 + <div class="col-md-5">
  30 + <input type="text" class="form-control" name="endStationFirstTime" value="{{map.line.endStationFirstTime}}" id="endStationFirstTime_id"
  31 + placeholder="请输入终点站首班时间">
  32 + </div>
  33 + </div>
  34 + <div class="col-md-6">
  35 + <label class="control-label col-md-5">
  36 + <span class="required"> * </span> 下行末班时间 :
  37 + </label>
  38 + <div class="col-md-5">
  39 + <input type="text" class="form-control" name="endStationEndTime" value="{{map.line.endStationEndTime}}" id="endStationEndTime_id"
  40 + placeholder="请输入终点站末班时间">
  41 + </div>
  42 + </div>
  43 + </div>
  44 +
  45 + <div class="form-group">
  46 + <div class="col-md-6">
  47 + <label class="control-label col-md-5">
  48 + <span class="required"> * </span> 早高峰开始时间 :
  49 + </label>
  50 + <div class="col-md-5">
  51 + <input type="text" class="form-control" name="earlyStartTime" value="{{map.earlyStartTime}}" id="earlyStartTime_id"
  52 + placeholder="请输入早高峰开始时间">
  53 + </div>
  54 + </div>
  55 + <div class="col-md-6">
  56 + <label class="control-label col-md-5">
  57 + <span class="required"> * </span> 早高峰结束时间 :
  58 + </label>
  59 + <div class="col-md-5">
  60 + <input type="text" class="form-control" name="earlyEndTime" value="{{map.earlyEndTime}}" id="earlyEndTime_id"
  61 + placeholder="请输入早高峰结束时间">
  62 + </div>
  63 + </div>
  64 + </div>
  65 +
  66 + <div class="form-group">
  67 + <div class="col-md-6">
  68 + <label class="control-label col-md-5">
  69 + <span class="required"> * </span> 晚高峰开始时间 :
  70 + </label>
  71 + <div class="col-md-5">
  72 + <input type="text" class="form-control" name="lateStartTime" value="{{map.lateStartTime}}" id="lateStartTime_id"
  73 + placeholder="请输入晚高峰开始时间">
  74 + </div>
  75 + </div>
  76 + <div class="col-md-6">
  77 + <label class="control-label col-md-5">
  78 + <span class="required"> * </span> 晚高峰结束时间 :
  79 + </label>
  80 + <div class="col-md-5">
  81 + <input type="text" class="form-control" name="lateEndTime" value="{{map.lateEndTime}}" id="lateEndTime_id"
  82 + placeholder="请输入晚高峰结束时间">
  83 + </div>
  84 + </div>
  85 + </div>
  86 +
  87 + <div class="form-group">
  88 + <div class="col-md-6">
  89 + <label class="control-label col-md-5">
  90 + <span class="required"> * </span> 线路规划类型  :
  91 + </label>
  92 + <div class="col-md-5">
  93 + <select name="linePlayType" class="form-control" id="linePlayType_id">
  94 + <option value="">-- 请选择线路类型 --</option>
  95 + <option value="0">双向</option>
  96 + <option value="1">环线</option>
  97 + </select>
  98 + </div>
  99 + </div>
  100 + <div class="col-md-6">
  101 + <label class="control-label col-md-5">吃饭地点    :</label>
  102 + <div class="col-md-5">
  103 + <select type="text" class="form-control" name="cfdd" id="cfdd_id">
  104 + <option value="">请选择...</option>
  105 + <option value="0">{{map.line.startStationName}}</option>
  106 + <option value="1">{{map.line.endStationName}}</option>
  107 + <option value="allYes">起终点站都可以</option>
  108 + </select>
  109 + </div>
  110 + </div>
  111 + </div>
  112 +
  113 + <div class="form-group">
  114 + <div class="col-md-6">
  115 + <label class="control-label col-md-5">早晚例行保养  :</label>
  116 + <div class="col-md-5">
  117 + <input type="text" class="form-control" name="lb" value="{{map.lb}}" id="lb_id"
  118 + placeholder="请输入早晚例行保养">
  119 + </div>
  120 + </div>
  121 + <div class="col-md-6">
  122 + <label class="control-label col-md-5">停车场     :</label>
  123 + <div class="col-md-5">
  124 + <select name="carPark" class="form-control" id="carPark_id" style="width:100%"></select>
  125 + </div>
  126 + </div>
  127 + </div>
  128 +
  129 + <div class="form-group">
  130 + <div class="col-md-6">
  131 + <label class="control-label col-md-5">工作餐午餐时间 :</label>
  132 + <div class="col-md-5">
  133 + <input type="text" class="form-control" name="workeLunch" value="{{map.workeLunch}}" id="workeLunch_id"
  134 + placeholder="请输入工作餐午餐时间">
  135 + </div>
  136 + </div>
  137 + <div class="col-md-6">
  138 + <label class="control-label col-md-5">工作餐晚餐时间 :</label>
  139 + <div class="col-md-5">
  140 + <input type="text" class="form-control" name="workeDinner" value="{{map.workeDinner}}" id="workeDinner_id"
  141 + placeholder="请输入工作餐晚餐时间">
  142 + </div>
  143 + </div>
  144 + </div>
  145 +
  146 + <div class="form-group">
  147 + <div class="col-md-6 ">
  148 + <label class="control-label col-md-5"><span class="required"> * </span>发车间隔时段 :</label>
  149 + <div class="col-md-5 tagsDiv">
  150 + <div class="row" style="margin-left: 15px;">
  151 + <input type="text" value="" name="fcjx" id="fcjx_tagsinput" style="display: none;">
  152 + </div>
  153 +
  154 + <div class="row" style="margin-top: 10px;">
  155 + <label class="control-label col-md-4">开始时间:</label>
  156 + <div class="col-md-8">
  157 + <input type="text" class="form-control" placeholder="时段开始时间" id="fcjx_tagsinput_starttime">
  158 + </div>
  159 + </div>
  160 +
  161 + <div class="row" style="margin-top: 10px;">
  162 + <label class="control-label col-md-4">结束时间:</label>
  163 + <div class="col-md-8">
  164 + <input type="text" class="form-control" placeholder="时段结束时间" id="fcjx_tagsinput_endtime">
  165 + </div>
  166 + </div>
  167 +
  168 + <div class="row" style="margin-top: 10px;">
  169 + <label class="control-label col-md-4">间隔值:</label>
  170 + <div class="col-md-8">
  171 + <input type="number" class="form-control" placeholder="间隔时间" id="fcjx_tagsinput_value" min="1">
  172 + </div>
  173 + </div>
  174 +
  175 + <div class="row" style="margin-top: 10px;margin-left: 116px;">
  176 + <a href="javascript:" class="btn red" id="fcjx_tagsinput_add">添加</a>
  177 + </div>
  178 + </div>
  179 + </div>
  180 + </div>
  181 +
  182 + <!-- 隐藏字段-时间 -->
  183 + <!-- 上下行行驶时间 -->
  184 + <input type="hidden" name="upTravelTime" value="{{map.upTravelTime}}" id="upTravelTime_id"/>
  185 + <input type="hidden" name="downTravelTime" value="{{map.downTravelTime}}" id="downTravelTime_id"/>
  186 + <!-- 早高峰/晚高峰上下行行驶时间 -->
  187 + <input type="hidden" name="earlyUpTime" value="{{map.earlyUpTime}}" id="earlyUpTime_id" />
  188 + <input type="hidden" name="earlyDownTime" value="{{map.earlyDownTime}}" id="earlyDownTime_id" />
  189 + <input type="hidden" name="lateUpTime" value="{{map.lateUpTime}}" id="lateUpTime_id"/>
  190 + <input type="hidden" name="lateDownTime" value="{{map.lateDownTime}}" id="lateDownTime_id"/>
  191 + <!-- 低谷上下行行驶时间 -->
  192 + <input type="hidden" name="troughUpTime" value="{{map.troughUpTime}}" id="troughUpTime_id"/>
  193 + <input type="hidden" name="troughDownTime" value="{{map.troughDownTime}}" id="troughDownTime_id"/>
  194 + <!-- 上下行进场出场时间 -->
  195 + <input type="hidden" name="upInTimer" value="{{map.upInTimer}}" id="upInTimer_id"/>
  196 + <input type="hidden" name="downInTimer" value="{{map.downInTimer}}" id="downInTimer_id"/>
  197 + <input type="hidden" name="upOutTimer" value="{{map.upOutTimer}}" id="upOutTimer_id"/>
  198 + <input type="hidden" name="downOutTimer" value="{{map.downOutTimer}}" id="downOutTimer_id"/>
  199 +
  200 + <!-- 隐藏字段-里程 -->
  201 + <!-- 上下行行驶里程 -->
  202 + <input type="hidden" name="upMileage" value="{{map.upMileage}}" id="upMileage_id"/>
  203 + <input type="hidden" name="downMileage" value="{{map.downMileage}}" id="downMileage_id"/>
  204 + <!-- 上下行进场出场里程 -->
  205 + <input type="hidden" name="upInMileage" value="{{map.upInMileage}}" id="upInMileage_id"/>
  206 + <input type="hidden" name="downInMileage" value="{{map.downInMileage}}" id="downInMileage_id"/>
  207 + <input type="hidden" name="upOutMileage" value="{{map.upOutMileage}}" id="upOutMileage_id"/>
  208 + <input type="hidden" name="downOutMileage" value="{{map.downOutMileage}}" id="downOutMileage_id"/>
  209 +
  210 +</script>
  211 +
  212 +<script type="text/html" id="fcjx_temp_config">
  213 + <h4 class="form-section"> 时刻表与线路名称 </h4>
  214 + <div class="form-group">
  215 + <div class="col-md-6">
  216 + <label class="control-label col-md-5"> 时刻表名称   : </label>
  217 + <div class="col-md-7">
  218 + <p class="form-control-static" data-display="skbName"> </p>
  219 + </div>
  220 + </div>
  221 + <div class="col-md-6">
  222 + <label class="control-label col-md-5"> 线路名称    :</label>
  223 + <div class="col-md-4">
  224 + <p class="form-control-static" data-display="lineName"> </p>
  225 + </div>
  226 + </div>
  227 + </div>
  228 + <h4 class="form-section"> 参数详情 </h4>
  229 +
  230 + <div class="form-group">
  231 + <div class="col-md-6">
  232 + <label class="control-label col-md-5">
  233 + <span class="required"> * </span> 上行首班时间 :
  234 + </label>
  235 + <div class="col-md-4">
  236 + <p class="form-control-static" data-display="startStationFirstTime"> </p>
  237 + </div>
  238 + </div>
  239 + <div class="col-md-6">
  240 + <label class="control-label col-md-5">
  241 + <span class="required"> * </span> 上行末班时间 :
  242 + </label>
  243 + <div class="col-md-4">
  244 + <p class="form-control-static" data-display="startStationEndTime"> </p>
  245 + </div>
  246 + </div>
  247 + </div>
  248 +
  249 + <div class="form-group">
  250 + <div class="col-md-6">
  251 + <label class="control-label col-md-5">
  252 + <span class="required"> * </span> 下行首班时间 :
  253 + </label>
  254 + <div class="col-md-4">
  255 + <p class="form-control-static" data-display="endStationFirstTime"> </p>
  256 + </div>
  257 + </div>
  258 + <div class="col-md-6">
  259 + <label class="control-label col-md-5">
  260 + <span class="required"> * </span> 下行末班时间 :
  261 + </label>
  262 + <div class="col-md-4">
  263 + <p class="form-control-static" data-display="endStationEndTime"> </p>
  264 + </div>
  265 + </div>
  266 + </div>
  267 +
  268 + <div class="form-group">
  269 + <div class="col-md-6">
  270 + <label class="control-label col-md-5">
  271 + <span class="required"> * </span> 早高峰开始时间 :
  272 + </label>
  273 + <div class="col-md-4">
  274 + <p class="form-control-static" data-display="earlyStartTime"> </p>
  275 + </div>
  276 + </div>
  277 + <div class="col-md-6">
  278 + <label class="control-label col-md-5">
  279 + <span class="required"> * </span> 早高峰结束时间 :
  280 + </label>
  281 + <div class="col-md-4">
  282 + <p class="form-control-static" data-display="earlyEndTime"> </p>
  283 + </div>
  284 + </div>
  285 + </div>
  286 +
  287 + <div class="form-group">
  288 + <div class="col-md-6">
  289 + <label class="control-label col-md-5">
  290 + <span class="required"> * </span> 晚高峰开始时间 :
  291 + </label>
  292 + <div class="col-md-4">
  293 + <p class="form-control-static" data-display="lateStartTime"> </p>
  294 + </div>
  295 + </div>
  296 + <div class="col-md-6">
  297 + <label class="control-label col-md-5">
  298 + <span class="required"> * </span> 晚高峰结束时间 :
  299 + </label>
  300 + <div class="col-md-4">
  301 + <p class="form-control-static" data-display="lateEndTime"> </p>
  302 + </div>
  303 + </div>
  304 + </div>
  305 +
  306 + <div class="form-group">
  307 + <div class="col-md-6">
  308 + <label class="control-label col-md-5">
  309 + <span class="required"> * </span> 线路规划类型  :
  310 + </label>
  311 + <div class="col-md-4">
  312 + <p class="form-control-static" data-display="linePlayType"> </p>
  313 + </div>
  314 + </div>
  315 + <div class="col-md-6">
  316 + <label class="control-label col-md-5">吃饭地点    :</label>
  317 + <div class="col-md-7">
  318 + <p class="form-control-static" data-display="cfdd"> </p>
  319 + </div>
  320 + </div>
  321 + </div>
  322 +
  323 + <div class="form-group">
  324 + <div class="col-md-6">
  325 + <label class="control-label col-md-5">早晚例行保养  :</label>
  326 + <div class="col-md-4">
  327 + <p class="form-control-static" data-display="lb"> </p>
  328 + </div>
  329 + </div>
  330 + <div class="col-md-6">
  331 + <label class="control-label col-md-5">停车场     :</label>
  332 + <div class="col-md-7">
  333 + <p class="form-control-static" data-display="carPark"> </p>
  334 + </div>
  335 + </div>
  336 + </div>
  337 +
  338 + <div class="form-group">
  339 + <div class="col-md-6">
  340 + <label class="control-label col-md-5"> 工作餐午餐时间 : </label>
  341 + <div class="col-md-4">
  342 + <p class="form-control-static" data-display="workeLunch"> </p>
  343 + </div>
  344 + </div>
  345 + <div class="col-md-6">
  346 + <label class="control-label col-md-5"> 工作餐晚餐时间 : </label>
  347 + <div class="col-md-4">
  348 + <p class="form-control-static" data-display="workeDinner"> </p>
  349 + </div>
  350 + </div>
  351 + </div>
  352 +
  353 +</script>
0 354 \ No newline at end of file
... ...
src/main/resources/static/pages/excep/mhspeedingList.html
... ... @@ -302,17 +302,17 @@ $(function(){
302 302 var cells = $('tr.filter')[0].cells
303 303 ,params = {}
304 304 ,name;
305   - $.each(cells, function(i, cell){
306   - var items = $('input,select', cell);
307   - for(var j = 0, item; item = items[j++];){
308   - name = $(item).attr('name');
309   - if(name){
310   - params[name] = $(item).val();
  305 + $.each(cells, function(i, cell){
  306 + var items = $('input,select', cell);
  307 + for(var j = 0, item; item = items[j++];){
  308 + name = $(item).attr('name');
  309 + if(name){
  310 + params[name] = $(item).val();
  311 + }
311 312 }
312   - }
313   - });
314   - page = num - 1;
315   - jsDoQuery(params, false);
  313 + });
  314 + page = num - 1;
  315 + jsDoQuery(params, false);
316 316 }
317 317 });
318 318 }
... ...
src/main/resources/static/pages/scheduleApp/Gruntfile.js
... ... @@ -83,6 +83,7 @@ module.exports = function (grunt) {
83 83 'module/common/dts1/radioButton/saRadiogroup.js', // 单选框组整合指令
84 84 'module/common/dts1/checkbox/saCheckboxgroup.js', // 多选框组整合指令
85 85 'module/common/dts2/dateGroup/saDategroup.js', // 特殊日期选择指令
  86 + 'module/common/dts2/fbgsGroup/saFbgsgroup.js', // 翻班格式选择指令
86 87 'module/common/dts2/guideboardGroup/saGuideboardgroup.js', // 路牌选择整合指令
87 88 'module/common/dts2/employeeGroup/saEmployeegroup.js', // 人员选饿整合指令
88 89 'module/common/dts2/bcGroup/saBcgroup.js', // 班次选择整合指令
... ...
src/main/resources/static/pages/scheduleApp/module/common/dts2/employeeGroup/saEmployeegroupTemplate.html
... ... @@ -17,6 +17,7 @@
17 17 }
18 18 .employee-select .employee-select-body {
19 19 margin-top: 5px;
  20 + margin-bottom: 5px;
20 21 overflow: auto;
21 22 width: auto;
22 23 min-height: 5px;
... ...
src/main/resources/static/pages/scheduleApp/module/common/dts2/fbgsGroup/saFbgsgroup.js 0 → 100644
  1 +/**
  2 + * saFbgsgroup指令
  3 + * 属性如下:
  4 + * name(必须):控件的名字
  5 + * model(必须):指定一个外部object,独立作用域,如:model=ctrl.employeeInfoForSave
  6 + * fbgsvalue(必须):绑定的model翻班格式值,如:fbgsvalue={{ctrl.employeeInfoForSave.fbgs}}
  7 + * fbgsname(必须):绑定的model翻班格式字段名,如:fbgsname=fbgs
  8 + *
  9 + * required(可选):是否要用required验证
  10 + *
  11 + */
  12 +angular.module('ScheduleApp').directive(
  13 + 'saFbgsgroup',
  14 + [
  15 + function() {
  16 + return {
  17 + restrict: 'E',
  18 + templateUrl: '/pages/scheduleApp/module/common/dts2/fbgsGroup/saFbgsgroupTemplate.html',
  19 + scope: {
  20 + model: "=" // 独立作用域,关联外部的模型object
  21 + },
  22 + controllerAs: '$saFbgsgroupCtrl',
  23 + bindToController: true,
  24 + controller: function() {
  25 + var self = this;
  26 +
  27 + self.$$dataSelected = []; // 选中的路牌列表
  28 +
  29 + // saFbgsgroup组件的ng-model,用于外部绑定等操作
  30 + self.$$internalmodel = undefined;
  31 + },
  32 +
  33 + /**
  34 + * 此阶段可以改dom结构,此时angular还没扫描指令,
  35 + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。
  36 + * @param tElem
  37 + * @param tAttrs
  38 + * @returns {{pre: Function, post: Function}}
  39 + */
  40 + compile: function(tElem, tAttrs) {
  41 + // 获取所有属性
  42 + var $name_attr = tAttrs["name"]; // 控件的名字
  43 + var $required_attr = tAttrs["required"]; // 是否需要required验证
  44 + var $fbgsname_attr = tAttrs["fbgsname"]; // 绑定的model翻班格式字段名
  45 +
  46 + // controlAs名字
  47 + var ctrlAs = '$saFbgsgroupCtrl';
  48 +
  49 + // 如果有required属性,添加angularjs required验证
  50 + if ($required_attr != undefined) {
  51 + //console.log(tElem.html());
  52 + tElem.find("div").attr("required", "");
  53 + }
  54 +
  55 + return {
  56 + pre: function(scope, element, attr) {
  57 +
  58 + },
  59 +
  60 + /**
  61 + * 相当于link函数。
  62 + * @param scope
  63 + * @param element
  64 + * @param attr
  65 + */
  66 + post: function(scope, element, attr) {
  67 + // name属性
  68 + if ($name_attr) {
  69 + scope[ctrlAs]["$name_attr"] = $name_attr;
  70 + }
  71 +
  72 + /**
  73 + * 路牌列表点击(路牌列表中选中路牌)
  74 + * @param fbcode
  75 + */
  76 + scope[ctrlAs].$$internal_fb_click = function(fbcode) {
  77 + scope[ctrlAs].$$dataSelected.push(fbcode);
  78 + };
  79 +
  80 + /**
  81 + * 选中的路牌双击(删除选中的路牌)
  82 + * @param $index
  83 + */
  84 + scope[ctrlAs].$$internal_sellplist_dbclick = function($index) {
  85 + scope[ctrlAs].$$dataSelected.splice($index, 1);
  86 + };
  87 +
  88 + /**
  89 + * 验证内部数据,更新外部model
  90 + */
  91 + scope[ctrlAs].$$internal_validate_model = function() {
  92 + var data_temp = scope[ctrlAs].$$dataSelected;
  93 +
  94 + if (data_temp &&
  95 + data_temp.length > 0) {
  96 +
  97 + // 更新内部model,用于外部验证
  98 + // 内部model的值暂时随意,以后再改
  99 + scope[ctrlAs].$$internalmodel = {desc: "ok"};
  100 +
  101 + // 更新外部model字段
  102 + if ($fbgsname_attr) {
  103 + console.log("$fbgsname=" + data_temp.join(','));
  104 + eval("scope[ctrlAs].model" + "." + $fbgsname_attr + " = data_temp.join(',');");
  105 + }
  106 +
  107 + } else {
  108 + scope[ctrlAs].$$internalmodel = undefined;
  109 + }
  110 + };
  111 +
  112 + // 监控内部数据,$$data_selected 变化
  113 + scope.$watch(
  114 + function() {
  115 + return scope[ctrlAs].$$dataSelected;
  116 + },
  117 + function(newValue, oldValue) {
  118 + scope[ctrlAs].$$internal_validate_model();
  119 + },
  120 + true
  121 + );
  122 +
  123 + // 监控路牌名称范围值的变化,处理初始化赋值
  124 + attr.$observe("fbgsvalue", function(value) {
  125 + var data_temp = scope[ctrlAs].$$dataSelected;
  126 +
  127 + if (value && value != "" && data_temp && data_temp.length == 0) { // 初始创建
  128 + var data_temp = scope[ctrlAs].$$dataSelected;
  129 + var fbgses = [];
  130 + var i = 0;
  131 +
  132 + // 分隔翻班格式
  133 + if (value.indexOf(",") >= 0) { // 以逗号分隔,如 1,1,0,1
  134 + fbgses = value.split(",");
  135 + } else {
  136 + for (i = 0; i < value.length; i++) { // 字符串形式,如 1101
  137 + fbgses.push(value.substr(i, 1));
  138 + }
  139 + }
  140 +
  141 + for (i = 0; i < fbgses.length; i++) {
  142 + if (fbgses[i] == "1" || fbgses[i] == "0") {
  143 + data_temp.push(fbgses[i]);
  144 + }
  145 + }
  146 + }
  147 + });
  148 + }
  149 + };
  150 + }
  151 + }
  152 + }
  153 + ]);
0 154 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/common/dts2/fbgsGroup/saFbgsgroupTemplate.html 0 → 100644
  1 +<div name="{{$saFbgsgroupCtrl.$name_attr}}"
  2 + ng-model="$saFbgsgroupCtrl.$$internalmodel">
  3 +
  4 + <style>
  5 + .fbgs-select {
  6 + min-height: 180px;
  7 + border: 1px solid #ddd;
  8 + }
  9 + .fbgs-select .fbgs-input {
  10 + margin: 5px 5px 0px 5px;
  11 + padding-left: 0;
  12 + }
  13 + .fbgs-select .fbgs-select-cont {
  14 + text-align: left;
  15 + min-height: 60px;
  16 + padding-right: 0px;
  17 + }
  18 + .fbgs-select .fbgs-select-body {
  19 + margin-top: 5px;
  20 + margin-bottom: 5px;
  21 + overflow: auto;
  22 + width: auto;
  23 + min-height: 5px;
  24 + }
  25 + .fbgs-select .fbgs {
  26 + display: inline-block;
  27 + padding: 8px;
  28 + min-width: 50px;
  29 + text-align: center;
  30 + border: 1px solid #C1C1C1;
  31 + color: #666;
  32 + border-radius: 5px !important;
  33 + margin: 5px;
  34 + }
  35 + .fbgs-select .fbgs.active {
  36 + color: white;
  37 + background: #4095E8;
  38 + border: 1px solid #4095E8;
  39 + }
  40 +
  41 + </style>
  42 +
  43 + <div class="col-md-12 fbgs-select">
  44 + <div class="col-md-12 fbgs-input">
  45 + <div class="col-md-7" style="padding-right: 0px;">
  46 + <small>
  47 + 翻班格式描述,1代表翻路牌。0代表休息跳过
  48 + </small>
  49 + </div>
  50 + </div>
  51 + <div class="col-md-12 fbgs-select-cont">
  52 + <div class="fbgs-select-body">
  53 + <div class="fbgs active"
  54 + ng-click="$saFbgsgroupCtrl.$$internal_fb_click(1)">
  55 + 1
  56 + </div>
  57 + <div class="fbgs active"
  58 + ng-click="$saFbgsgroupCtrl.$$internal_fb_click(0)">
  59 + 0
  60 + </div>
  61 + </div>
  62 + </div>
  63 + <div class="col-md-12 fbgs-input">
  64 + <div class="col-md-12">
  65 + <small>
  66 + 已经选中的翻班,共{{$saFbgsgroupCtrl.$$dataSelected.length}}个,
  67 + </small>
  68 + </div>
  69 + </div>
  70 + <div class="col-md-12 fbgs-select-cont">
  71 + <div class="fbgs-select-body">
  72 + <div class="fbgs active"
  73 + ng-repeat="$d in $saFbgsgroupCtrl.$$dataSelected track by $index"
  74 + ng-dblclick="$saFbgsgroupCtrl.$$internal_sellplist_dbclick($index)">
  75 + {{$d}}
  76 + </div>
  77 + </div>
  78 + </div>
  79 + </div>
  80 +
  81 +</div>
0 82 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/common/dts2/guideboardGroup/saGuideboardgroupTemplate.html
... ... @@ -17,6 +17,7 @@
17 17 }
18 18 .guideboard-select .guideboard-select-body {
19 19 margin-top: 5px;
  20 + margin-bottom: 5px;
20 21 overflow: auto;
21 22 width: auto;
22 23 min-height: 5px;
... ...
src/main/resources/static/pages/scheduleApp/module/common/main.js
... ... @@ -62,8 +62,25 @@ ScheduleApp.factory(&#39;DataStore&#39;, [
62 62 function($http, $q) {
63 63 // 本地数据存储,如车辆数据,人员数据
64 64 var dataMap = {
65   - "cl": [],
66   - "ry": []
  65 + "cl": [], // 车辆信息
  66 + "ry": [], // 人员信息
  67 + "ddreasons": [ // 调度原因(调度执勤日报里的)
  68 + {code: "0", name: "营运"},
  69 + {code: "1", name: "缺车"},
  70 + {code: "2", name: "气候"},
  71 + {code: "3", name: "肇事"},
  72 + {code: "4", name: "纠纷"},
  73 + {code: "5", name: "抽减"},
  74 + {code: "6", name: "配车"},
  75 + {code: "7", name: "故障"},
  76 + {code: "8", name: "路阻"},
  77 + {code: "9", name: "客稀"},
  78 + {code: "10", name: "吊慢"},
  79 + {code: "11", name: "其他"},
  80 + {code: "12", name: "保养"},
  81 + {code: "13", name: "缺人"},
  82 + {code: "14", name: "援外"}
  83 + ]
67 84 };
68 85  
69 86 var dataPromise_cars = function() {
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
... ... @@ -2409,6 +2409,160 @@ angular.module(&#39;ScheduleApp&#39;).directive(&#39;saDategroup&#39;, [
2409 2409 ]);
2410 2410  
2411 2411  
  2412 +/**
  2413 + * saFbgsgroup指令
  2414 + * 属性如下:
  2415 + * name(必须):控件的名字
  2416 + * model(必须):指定一个外部object,独立作用域,如:model=ctrl.employeeInfoForSave
  2417 + * fbgsvalue(必须):绑定的model翻班格式值,如:fbgsvalue={{ctrl.employeeInfoForSave.fbgs}}
  2418 + * fbgsname(必须):绑定的model翻班格式字段名,如:fbgsname=fbgs
  2419 + *
  2420 + * required(可选):是否要用required验证
  2421 + *
  2422 + */
  2423 +angular.module('ScheduleApp').directive(
  2424 + 'saFbgsgroup',
  2425 + [
  2426 + function() {
  2427 + return {
  2428 + restrict: 'E',
  2429 + templateUrl: '/pages/scheduleApp/module/common/dts2/fbgsGroup/saFbgsgroupTemplate.html',
  2430 + scope: {
  2431 + model: "=" // 独立作用域,关联外部的模型object
  2432 + },
  2433 + controllerAs: '$saFbgsgroupCtrl',
  2434 + bindToController: true,
  2435 + controller: function() {
  2436 + var self = this;
  2437 +
  2438 + self.$$dataSelected = []; // 选中的路牌列表
  2439 +
  2440 + // saFbgsgroup组件的ng-model,用于外部绑定等操作
  2441 + self.$$internalmodel = undefined;
  2442 + },
  2443 +
  2444 + /**
  2445 + * 此阶段可以改dom结构,此时angular还没扫描指令,
  2446 + * 这里就可以动态添加其他angularjs的指令字符串,如required指令字符串。
  2447 + * @param tElem
  2448 + * @param tAttrs
  2449 + * @returns {{pre: Function, post: Function}}
  2450 + */
  2451 + compile: function(tElem, tAttrs) {
  2452 + // 获取所有属性
  2453 + var $name_attr = tAttrs["name"]; // 控件的名字
  2454 + var $required_attr = tAttrs["required"]; // 是否需要required验证
  2455 + var $fbgsname_attr = tAttrs["fbgsname"]; // 绑定的model翻班格式字段名
  2456 +
  2457 + // controlAs名字
  2458 + var ctrlAs = '$saFbgsgroupCtrl';
  2459 +
  2460 + // 如果有required属性,添加angularjs required验证
  2461 + if ($required_attr != undefined) {
  2462 + //console.log(tElem.html());
  2463 + tElem.find("div").attr("required", "");
  2464 + }
  2465 +
  2466 + return {
  2467 + pre: function(scope, element, attr) {
  2468 +
  2469 + },
  2470 +
  2471 + /**
  2472 + * 相当于link函数。
  2473 + * @param scope
  2474 + * @param element
  2475 + * @param attr
  2476 + */
  2477 + post: function(scope, element, attr) {
  2478 + // name属性
  2479 + if ($name_attr) {
  2480 + scope[ctrlAs]["$name_attr"] = $name_attr;
  2481 + }
  2482 +
  2483 + /**
  2484 + * 路牌列表点击(路牌列表中选中路牌)
  2485 + * @param fbcode
  2486 + */
  2487 + scope[ctrlAs].$$internal_fb_click = function(fbcode) {
  2488 + scope[ctrlAs].$$dataSelected.push(fbcode);
  2489 + };
  2490 +
  2491 + /**
  2492 + * 选中的路牌双击(删除选中的路牌)
  2493 + * @param $index
  2494 + */
  2495 + scope[ctrlAs].$$internal_sellplist_dbclick = function($index) {
  2496 + scope[ctrlAs].$$dataSelected.splice($index, 1);
  2497 + };
  2498 +
  2499 + /**
  2500 + * 验证内部数据,更新外部model
  2501 + */
  2502 + scope[ctrlAs].$$internal_validate_model = function() {
  2503 + var data_temp = scope[ctrlAs].$$dataSelected;
  2504 +
  2505 + if (data_temp &&
  2506 + data_temp.length > 0) {
  2507 +
  2508 + // 更新内部model,用于外部验证
  2509 + // 内部model的值暂时随意,以后再改
  2510 + scope[ctrlAs].$$internalmodel = {desc: "ok"};
  2511 +
  2512 + // 更新外部model字段
  2513 + if ($fbgsname_attr) {
  2514 + console.log("$fbgsname=" + data_temp.join(','));
  2515 + eval("scope[ctrlAs].model" + "." + $fbgsname_attr + " = data_temp.join(',');");
  2516 + }
  2517 +
  2518 + } else {
  2519 + scope[ctrlAs].$$internalmodel = undefined;
  2520 + }
  2521 + };
  2522 +
  2523 + // 监控内部数据,$$data_selected 变化
  2524 + scope.$watch(
  2525 + function() {
  2526 + return scope[ctrlAs].$$dataSelected;
  2527 + },
  2528 + function(newValue, oldValue) {
  2529 + scope[ctrlAs].$$internal_validate_model();
  2530 + },
  2531 + true
  2532 + );
  2533 +
  2534 + // 监控路牌名称范围值的变化,处理初始化赋值
  2535 + attr.$observe("fbgsvalue", function(value) {
  2536 + var data_temp = scope[ctrlAs].$$dataSelected;
  2537 +
  2538 + if (value && value != "" && data_temp && data_temp.length == 0) {
  2539 + var data_temp = scope[ctrlAs].$$dataSelected;
  2540 + var fbgses = [];
  2541 + var i = 0;
  2542 +
  2543 + if (value.indexOf(",") >= 0) {
  2544 + fbgses = value.split(",");
  2545 + } else {
  2546 + for (i = 0; i < value.length; i++) {
  2547 + fbgses.push(value.substr(i, 1));
  2548 + }
  2549 + }
  2550 +
  2551 + if (data_temp && data_temp.length == 0) { // 初始创建
  2552 + for (i = 0; i < fbgses.length; i++) {
  2553 + if (fbgses[i] == "1" || fbgses[i] == "0") {
  2554 + data_temp.push(fbgses[i]);
  2555 + }
  2556 + }
  2557 + }
  2558 + }
  2559 + });
  2560 + }
  2561 + };
  2562 + }
  2563 + }
  2564 + }
  2565 + ]);
2412 2566  
2413 2567  
2414 2568 /**
... ... @@ -4084,6 +4238,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(
4084 4238 formobj.fcno = cellinfo.fcno;
4085 4239 formobj.bcs = cellinfo.bcs;
4086 4240 formobj.isFB = cellinfo.isfb;
  4241 + formobj.isTS = 0;
4087 4242  
4088 4243 formobj.bcType = colinfo.bc_type;
4089 4244 formobj.xlDir = colinfo.xldir;
... ...
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/ext/edit.html
... ... @@ -46,6 +46,23 @@
46 46 <div class="form-body">
47 47 <div class="form-group">
48 48 <div class="col-md-5">
  49 + <div class="form-group">
  50 + <label class="col-md-5 control-label">营运状态:</label>
  51 + <div class="col-md-7">
  52 + <sa-Select5 name="cl2"
  53 + model="ctrl.formData"
  54 + cmaps="{'ddr': 'code'}"
  55 + dcname="ddr"
  56 + icname="code"
  57 + dsparams="{{ {type: 'local', param: 'ddreasons' } | json }}"
  58 + iterobjname="item"
  59 + iterobjexp="item.name"
  60 + searchph="请输拼音..."
  61 + searchexp="this.name"
  62 + >
  63 + </sa-Select5>
  64 + </div>
  65 + </div>
49 66 <div class="form-group has-success has-feedback">
50 67 <label class="col-md-5 control-label">车辆1*:</label>
51 68 <div class="col-md-7">
... ... @@ -68,7 +85,7 @@
68 85 车辆1必须选择
69 86 </div>
70 87 </div>
71   - <div class="form-group has-success has-feedback">
  88 + <div class="form-group">
72 89 <label class="col-md-5 control-label">车辆2:</label>
73 90 <div class="col-md-7">
74 91 <sa-Select5 name="cl2"
... ... @@ -109,7 +126,7 @@
109 126 </div>
110 127 </div>
111 128  
112   - <div class="form-group has-success has-feedback">
  129 + <div class="form-group">
113 130 <label class="col-md-5 control-label">售票员1:</label>
114 131 <div class="col-md-7">
115 132 <sa-Select5 name="s1"
... ... @@ -127,7 +144,7 @@
127 144 </div>
128 145 </div>
129 146  
130   - <div class="form-group has-success has-feedback">
  147 + <div class="form-group">
131 148 <label class="col-md-5 control-label">驾驶员2:</label>
132 149 <div class="col-md-7">
133 150 <sa-Select5 name="j2"
... ... @@ -145,7 +162,7 @@
145 162 </div>
146 163 </div>
147 164  
148   - <div class="form-group has-success has-feedback">
  165 + <div class="form-group">
149 166 <label class="col-md-5 control-label">售票员2:</label>
150 167 <div class="col-md-7">
151 168 <sa-Select5 name="s2"
... ... @@ -163,7 +180,7 @@
163 180 </div>
164 181 </div>
165 182  
166   - <div class="form-group has-success has-feedback">
  183 + <div class="form-group">
167 184 <label class="col-md-5 control-label">驾驶员3:</label>
168 185 <div class="col-md-7">
169 186 <sa-Select5 name="j3"
... ... @@ -181,7 +198,7 @@
181 198 </div>
182 199 </div>
183 200  
184   - <div class="form-group has-success has-feedback">
  201 + <div class="form-group">
185 202 <label class="col-md-5 control-label">售票员3:</label>
186 203 <div class="col-md-7">
187 204 <sa-Select5 name="s3"
... ...
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/report/ext/module.js
... ... @@ -264,6 +264,8 @@ angular.module(&#39;ScheduleApp&#39;).controller(
264 264 self.formData.j3 = {}; // 驾驶员3
265 265 self.formData.s3 = {}; // 售票员3
266 266  
  267 + self.formData.ddr = "0"; // 调度原因,默认0-营运
  268 +
267 269 self.planInfos = undefined; // 排班明细
268 270  
269 271 var sdd = new Date();
... ...
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/edit.html
... ... @@ -150,17 +150,41 @@
150 150 </div>
151 151  
152 152 <div class="form-group has-success has-feedback">
  153 + <label class="col-md-2 control-label">翻班类型*:</label>
  154 + <div class="col-md-3">
  155 + <sa-Select5 name="fbtype"
  156 + model="ctrl.scheduleRuleManageForSave"
  157 + cmaps="{'fbtype': 'code'}"
  158 + dcname="fbtype"
  159 + icname="code"
  160 + dsparams="{{ {type: 'dic', param: 'FbType' } | json }}"
  161 + iterobjname="item"
  162 + iterobjexp="item.name"
  163 + searchph="翻班类型..."
  164 + searchexp="this.name"
  165 + required >
  166 + </sa-Select5>
  167 + </div>
  168 + <!-- 隐藏快,显示验证信息 -->
  169 + <div class="alert alert-danger well-sm" ng-show="myForm.fbtype.$error.required">
  170 + 翻班类型必须选择
  171 + </div>
  172 + </div>
  173 +
  174 +
  175 + <div class="form-group has-success has-feedback" ng-if="ctrl.scheduleRuleManageForSave.fbtype == 'FBGSMODE'">
153 176 <label class="col-md-2 control-label">翻班格式*:</label>
154 177 <div class="col-md-6">
155   - <sa-Checkboxgroup model="ctrl.scheduleRuleManageForSave"
156   - name="fbgs"
157   - dcvalue="{{ctrl.scheduleRuleManageForSave.fbgs}}"
158   - dcname="fbgs"
159   - required >
160   - </sa-Checkboxgroup>
  178 + <sa-Fbgsgroup model="ctrl.scheduleRuleManageForSave"
  179 + name="fbgs"
  180 + fbgsvalue="{{ctrl.scheduleRuleManageForSave.fbgs}}"
  181 + fbgsname="fbgs"
  182 + required
  183 + >
  184 + </sa-Fbgsgroup>
161 185 </div>
162 186 <div class="alert alert-danger well-sm" ng-show="myForm.fbgs.$error.required">
163   - 请操作一下1
  187 + 翻班格式不能为空
164 188 </div>
165 189 </div>
166 190  
... ...
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/form.html
... ... @@ -148,13 +148,44 @@
148 148 </div>
149 149 </div>
150 150  
151   - <!--<div class="form-group">-->
152   - <!--<label class="col-md-2 control-label">翻班格式:</label>-->
153   - <!--<div class="col-md-4">-->
154   - <!--<input type="text" class="form-control" name="fbgs" ng-model="ctrl.scheduleRuleManageForSave.fbgs"-->
155   - <!--placeholder="车辆翻班格式"/>-->
156   - <!--</div>-->
157   - <!--</div>-->
  151 + <div class="form-group has-success has-feedback">
  152 + <label class="col-md-2 control-label">翻班类型*:</label>
  153 + <div class="col-md-3">
  154 + <sa-Select5 name="fbtype"
  155 + model="ctrl.scheduleRuleManageForSave"
  156 + cmaps="{'fbtype': 'code'}"
  157 + dcname="fbtype"
  158 + icname="code"
  159 + dsparams="{{ {type: 'dic', param: 'FbType' } | json }}"
  160 + iterobjname="item"
  161 + iterobjexp="item.name"
  162 + searchph="翻班类型..."
  163 + searchexp="this.name"
  164 + required >
  165 + </sa-Select5>
  166 + </div>
  167 + <!-- 隐藏快,显示验证信息 -->
  168 + <div class="alert alert-danger well-sm" ng-show="myForm.fbtype.$error.required">
  169 + 翻班类型必须选择
  170 + </div>
  171 + </div>
  172 +
  173 +
  174 + <div class="form-group has-success has-feedback" ng-if="ctrl.scheduleRuleManageForSave.fbtype == 'FBGSMODE'">
  175 + <label class="col-md-2 control-label">翻班格式*:</label>
  176 + <div class="col-md-6">
  177 + <sa-Fbgsgroup model="ctrl.scheduleRuleManageForSave"
  178 + name="fbgs"
  179 + fbgsvalue="{{ctrl.scheduleRuleManageForSave.fbgs}}"
  180 + fbgsname="fbgs"
  181 + required
  182 + >
  183 + </sa-Fbgsgroup>
  184 + </div>
  185 + <div class="alert alert-danger well-sm" ng-show="myForm.fbgs.$error.required">
  186 + 翻班格式不能为空
  187 + </div>
  188 + </div>
158 189  
159 190  
160 191 <!-- 其他form-group -->
... ...
src/main/resources/static/pages/scheduleApp/module/core/scheduleRuleManage/module.js
... ... @@ -277,14 +277,19 @@ angular.module(&#39;ScheduleApp&#39;).controller(
277 277 if (id) {
278 278 ScheduleRuleManage.get({id: id}, function(value) {
279 279 self.scheduleRuleManageForSave = value;
  280 + self.scheduleRuleManageForSave.fbtype = self.scheduleRuleManageForSave.fbtype || "TIMETABLEMODE";
280 281 });
281 282 } else {
282 283 // 初始表单,从查询条件中获取线路id
283 284 self.scheduleRuleManageForSave.xl.id = service.getSearchCondition()['xl.id_eq'];
  285 + self.scheduleRuleManageForSave.fbtype = self.scheduleRuleManageForSave.fbtype || "TIMETABLEMODE";
284 286 }
285 287  
286 288 // 提交方法
287 289 self.submit = function() {
  290 + //// test
  291 + //self.scheduleRuleManageForSave.fbtype = 0;
  292 +
288 293 // 保存或更新
289 294 self.scheduleRuleManageForSave.$save(function() {
290 295 $state.go("scheduleRuleManage");
... ...
src/main/resources/static/pages/trafficManage/js/lineStationUploadRecord.js
... ... @@ -114,30 +114,12 @@
114 114 $.each(inputs, function(i, element) {
115 115 params[$(element).attr("name")] = $(element).val();
116 116 });
117   -
118   - var startDate = params['startDate'];
119   - var endDate = params['endDate'];
  117 + var startDate = params['startDate'] == "" ? "0" : params['startDate'];
  118 + var endDate = params['endDate'] == "" ? "23" : params['endDate'];
120 119 var reportDate = params['reportDate'];
121   - if($("#carPlate").val() != ''){
122   - params['cars.carPlate_eq'] = changeCarPlate($("#carPlate").val());
123   - }
124   - if($("#insideCode").val() != ''){
125   - params['cars.insideCode_eq'] = $("#insideCode").val().toUpperCase();
126   - }
127   - // 默认开始时间
128   - params['reportDate_ge'] = str2datetime(reportDate+" 00:00:00");
129   - // 默认结束时间
130   - params['reportDate_le'] = str2datetime(reportDate+" 23:59:59");
131   -
132   - // 指定的开始时间
133   - if(startDate != ''){
134   - params['reportDate_gt'] = str2datetime(reportDate+" "+ (startDate > 9 ? startDate : "0"+startDate + ":00:00"));
135   - }
136   - // 指定的结束时间
137   - if(endDate != ''){
138   - params['reportDate_lt'] = str2datetime(reportDate+" "+ (endDate > 9 ? endDate : "0"+endDate + ":59:59"));
139   - }
140   - $get('/vehicle_stop', params, function(data) {
  120 + params['reportDate_start'] = reportDate.replace(/-/g,'') + (startDate > 9 ? startDate : "0"+startDate);
  121 + params['reportDate_end'] = reportDate.replace(/-/g,'') + (endDate > 9 ? endDate : "0"+endDate);
  122 + $get('/vehicle_stop/getVehicleInoutStopByParam', params, function(data) {
141 123 var content = data.content;
142 124 _dateFormat(content);
143 125 var bodyHtm = template('lineStationUploadRecord_list_temp', {
... ... @@ -183,7 +165,7 @@
183 165 function _dateFormat(list) {
184 166 var fs = 'YYYY-MM-DD HH:mm:ss';
185 167 $.each(list, function(i, obj) {
186   - obj.reportDate = moment(obj.reportDate).format(fs);
  168 + obj['report_date'] = moment(obj['report_date']).format(fs);
187 169 });
188 170 }
189 171  
... ... @@ -191,10 +173,4 @@
191 173 function str2datetime(stringTime){
192 174 return Date.parse(new Date(stringTime));
193 175 }
194   -
195   - // 时间字符串转成时间戳
196   - function changeCarPlate(carPlate){
197   - var tmp = "沪" + carPlate.substr(0, 1) + "-" + carPlate.substr(1, carPlate.length);
198   - return tmp.toUpperCase();;
199   - }
200 176 })();
201 177 \ No newline at end of file
... ...
src/main/resources/static/pages/trafficManage/lineStationUploadRecord.html
... ... @@ -20,15 +20,15 @@
20 20 </div>
21 21 <div class="inLine_block" style="display: inline-block;margin-left: 15px;">
22 22 <span class="item-label" style="width: 80px;">线路名称:</span>
23   - <select class="form-control" name="line.id_eq" id="line" style="width: 150px;"></select>
  23 + <select class="form-control" name="lineId" id="line" style="width: 150px;"></select>
24 24 </div>
25 25 <div class="inLine_block" style="display: inline-block;margin-left: 15px;">
26 26 <span class="item-label" style="width: 80px;">内部编码:</span>
27   - <input type="text" name="cars.insideCode_eq" id="insideCode" style="width: 120px;" maxlength="40"/>
  27 + <input type="text" name="insideCode" id="insideCode" style="width: 120px;" maxlength="40"/>
28 28 </div>
29 29 <div class="inLine_block" style="display: inline-block;margin-left: 15px;">
30 30 <span class="item-label" style="width: 80px;">车牌号:</span>
31   - <input type="text" name="cars.carPlate_eq" id="carPlate" style="width: 120px;" maxlength="40"/>
  31 + <input type="text" name="carPlate" id="carPlate" style="width: 120px;" maxlength="40"/>
32 32 <span style="color: red;width: 80px;">(沪D-12345 '沪'和'-'去掉)</span>
33 33 </div>
34 34 <div class="form-group" style="display: inline-block;margin-left: 15px;">
... ... @@ -76,114 +76,40 @@
76 76 {{i+1}}
77 77 </td>
78 78 <td>
79   - {{if obj.line.company == '55'}}
80   - 上南公司
81   - {{else if obj.line.company == '22'}}
82   - 金高公司
83   - {{else if obj.line.company == '05'}}
84   - 杨高公司
85   - {{else if obj.line.company == '26'}}
86   - 南汇公司
87   - {{else if obj.line.company == '77'}}
88   - 闵行公司
89   - {{/if}}
  79 + {{obj['branche_company']}}
90 80 </td>
91 81 <td>
92   - {{if obj.line.company == '55'}}
93   -
94   - {{if obj.line.brancheCompany == '1'}}
95   - 上南二分公司
96   - {{else if obj.line.brancheCompany == '2'}}
97   - 上南三分公司
98   - {{else if obj.line.brancheCompany == '3'}}
99   - 上南六分公司
100   - {{else if obj.line.brancheCompany == '4'}}
101   - 上南一分公司
102   - {{/if}}
103   -
104   - {{else if obj.line.company == '22'}}
105   -
106   - {{if obj.line.brancheCompany == '1'}}
107   - 四分公司
108   - {{else if obj.line.brancheCompany == '2'}}
109   - 二分公司
110   - {{else if obj.line.brancheCompany == '3'}}
111   - 三分公司
112   - {{else if obj.line.brancheCompany == '5'}}
113   - 一分公司
114   - {{/if}}
115   -
116   - {{else if obj.line.company == '05'}}
117   -
118   - {{if obj.line.brancheCompany == '1'}}
119   - 川沙分公司
120   - {{else if obj.line.brancheCompany == '2'}}
121   - 金桥分公司
122   - {{else if obj.line.brancheCompany == '3'}}
123   - 芦潮港分公司
124   - {{else if obj.line.brancheCompany == '5'}}
125   - 杨高分公司
126   - {{else if obj.line.brancheCompany == '6'}}
127   - 周浦分公司
128   - {{/if}}
129   -
130   - {{else if obj.line.company == '26'}}
131   -
132   - {{if obj.line.brancheCompany == '1'}}
133   - 南汇一分
134   - {{else if obj.line.brancheCompany == '2'}}
135   - 南汇二分
136   - {{else if obj.line.brancheCompany == '3'}}
137   - 南汇三分
138   - {{else if obj.line.brancheCompany == '4'}}
139   - 南汇维修公司
140   - {{else if obj.line.brancheCompany == '5'}}
141   - 南汇公司
142   - {{/if}}
143   -
144   - {{/if}}
  82 + {{obj['company']}}
145 83 </td>
146 84 <td>
147   - {{obj.line.name}}
  85 + {{obj['name']}}
148 86 </td>
149 87 <td>
150   - {{obj.line.shanghaiLinecode}}
  88 + {{obj['shanghai_linecode']}}
151 89 </td>
152 90 <td>
153   - {{obj.cars.insideCode}}
  91 + {{obj['inside_code']}}
154 92 </td>
155 93 <td>
156   - {{obj.cars.equipmentCode}}
  94 + {{obj['equipment_code']}}
157 95 </td>
158 96 <td>
159   - {{obj.cars.carPlate}}
  97 + {{obj['car_plate']}}
160 98 </td>
161 99 <td>
162   - {{obj.stop}}
  100 + {{obj['stop']}}
163 101 </td>
164 102 <td>
165   - {{if obj.serviceState == 0}}
166   - 营运
167   - {{else if obj.serviceState == 1}}
168   - 停运
169   - {{/if}}
  103 + {{obj['service_state']}}
170 104 </td>
171 105 <td>
172   - {{if obj.upDown == 0}}
173   - 上行
174   - {{else if obj.upDown == 1}}
175   - 下行
176   - {{/if}}
  106 + {{obj['up_down']}}
177 107 </td>
178 108 <td>
179   - {{if obj.inOutStop == 0}}
180   - 站内
181   - {{else if obj.inOutStop == 1}}
182   - 站外
183   - {{/if}}
  109 + {{obj['in_out_stop']}}
184 110 </td>
185 111 <td>
186   - {{obj.reportDate}}
  112 + {{obj['report_date']}}
187 113 </td>
188 114 </tr>
189 115 {{/each}}
... ...
src/main/resources/static/real_control_v2/js/main.js
... ... @@ -47,7 +47,7 @@ var gb_main_ep = new EventProxy(),
47 47 $('li.map-panel', '#main-tab-content').load('/real_control_v2/mapmonitor/real.html');
48 48 }, 1000);
49 49 //弹出更新说明
50   - //showUpdateDescription();
  50 + showUpdateDescription();
51 51 });
52 52  
53 53 function g_emit(id) {
... ... @@ -168,8 +168,8 @@ var disabled_submit_btn = function (form) {
168 168 function showUpdateDescription() {
169 169 //更新说明
170 170 var updateDescription = {
171   - date: '2017-09-24',
172   - text: '<h5>1、尝试解决 “祝桥2路” 和 “机场七线” 进站问题!</h5>'
  171 + date: '2017-09-28',
  172 + text: '<h5>1、修复了一个bug,该bug曾导致,出场时间设置为请求出场的线路,有几率早出场时间会误跳至分班班次!</h5>'
173 173 };
174 174  
175 175 var storage = window.localStorage
... ...