Commit ab1f6f09b6f6ea19e86436c1eaaae86774b37ce3

Authored by 廖磊
2 parents f40957f5 5e947ca0

Merge branch 'minhang' of

http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing 30 changed files with 7540 additions and 7086 deletions
src/main/java/com/bsth/Application.java
@@ -2,10 +2,6 @@ package com.bsth; @@ -2,10 +2,6 @@ package com.bsth;
2 2
3 import com.fasterxml.jackson.databind.ObjectMapper; 3 import com.fasterxml.jackson.databind.ObjectMapper;
4 import com.fasterxml.jackson.databind.SerializationFeature; 4 import com.fasterxml.jackson.databind.SerializationFeature;
5 -  
6 -import java.util.concurrent.Executors;  
7 -import java.util.concurrent.ScheduledExecutorService;  
8 -  
9 import org.springframework.boot.SpringApplication; 5 import org.springframework.boot.SpringApplication;
10 import org.springframework.boot.autoconfigure.SpringBootApplication; 6 import org.springframework.boot.autoconfigure.SpringBootApplication;
11 import org.springframework.boot.builder.SpringApplicationBuilder; 7 import org.springframework.boot.builder.SpringApplicationBuilder;
@@ -13,10 +9,13 @@ import org.springframework.boot.context.web.SpringBootServletInitializer; @@ -13,10 +9,13 @@ import org.springframework.boot.context.web.SpringBootServletInitializer;
13 import org.springframework.context.annotation.Bean; 9 import org.springframework.context.annotation.Bean;
14 import org.springframework.context.annotation.Primary; 10 import org.springframework.context.annotation.Primary;
15 11
  12 +import java.util.concurrent.Executors;
  13 +import java.util.concurrent.ScheduledExecutorService;
  14 +
16 @SpringBootApplication 15 @SpringBootApplication
17 public class Application extends SpringBootServletInitializer { 16 public class Application extends SpringBootServletInitializer {
18 17
19 - public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(12); 18 + public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(13);
20 19
21 @Override 20 @Override
22 protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { 21 protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
src/main/java/com/bsth/controller/realcontrol/LineConfigController.java
@@ -14,39 +14,91 @@ public class LineConfigController extends BaseController<LineConfig, Integer>{ @@ -14,39 +14,91 @@ public class LineConfigController extends BaseController<LineConfig, Integer>{
14 14
15 @Autowired 15 @Autowired
16 LineConfigService lineConfigService; 16 LineConfigService lineConfigService;
17 - 17 +
  18 + /**
  19 + * 检查是否有线路配置信息
  20 + * @param codeArray
  21 + * @return
  22 + */
18 @RequestMapping("/check") 23 @RequestMapping("/check")
19 public Map<String, Object> check(@RequestParam String[] codeArray){ 24 public Map<String, Object> check(@RequestParam String[] codeArray){
20 return lineConfigService.check(codeArray); 25 return lineConfigService.check(codeArray);
21 } 26 }
22 - 27 +
  28 + /**
  29 + * 初始化线路配置
  30 + * @param lineCode
  31 + * @return
  32 + * @throws Exception
  33 + */
23 @RequestMapping("/init/{lineCode}") 34 @RequestMapping("/init/{lineCode}")
24 public Integer init(@PathVariable("lineCode") String lineCode) throws Exception{ 35 public Integer init(@PathVariable("lineCode") String lineCode) throws Exception{
25 return lineConfigService.init(lineCode); 36 return lineConfigService.init(lineCode);
26 } 37 }
27 - 38 +
  39 + /**
  40 + * 修改班次刷新时间
  41 + * @param time
  42 + * @param lineCode
  43 + * @return
  44 + */
28 @RequestMapping(value = "/editTime", method = RequestMethod.POST) 45 @RequestMapping(value = "/editTime", method = RequestMethod.POST)
29 public Map<String, Object> editStartOptTime(@RequestParam String time,@RequestParam String lineCode){ 46 public Map<String, Object> editStartOptTime(@RequestParam String time,@RequestParam String lineCode){
30 return lineConfigService.editStartOptTime(time, lineCode); 47 return lineConfigService.editStartOptTime(time, lineCode);
31 } 48 }
32 - 49 +
  50 + /**
  51 + * 修改出场时间类型
  52 + * @param lineCode
  53 + * @param type
  54 + * @return
  55 + */
33 @RequestMapping(value = "/editOutTimeType", method = RequestMethod.POST) 56 @RequestMapping(value = "/editOutTimeType", method = RequestMethod.POST)
34 - public Map<String, Object> editOutTimeType(@RequestParam String lineCode, @RequestParam int type){  
35 - return lineConfigService.editOutTimeType(lineCode, type); 57 + public Map<String, Object> editOutTimeType(@RequestParam String lineCode, @RequestParam int type,@RequestParam String parkCode,@RequestParam String stationCode){
  58 + return lineConfigService.editOutTimeType(lineCode, type, parkCode, stationCode);
36 } 59 }
37 60
  61 + /**
  62 + * 启用原线路回场
  63 + * @param lineCode
  64 + * @param enable
  65 + * @return
  66 + */
38 @RequestMapping(value = "/enableInParkForSource", method = RequestMethod.POST) 67 @RequestMapping(value = "/enableInParkForSource", method = RequestMethod.POST)
39 public Map<String, Object> enableInParkForSource(@RequestParam String lineCode, @RequestParam int enable){ 68 public Map<String, Object> enableInParkForSource(@RequestParam String lineCode, @RequestParam int enable){
40 return lineConfigService.enableInParkForSource(lineCode, enable); 69 return lineConfigService.enableInParkForSource(lineCode, enable);
41 } 70 }
42 71
  72 + /**
  73 + * 根据线路编码获取配置信息
  74 + * @param lineCode
  75 + * @return
  76 + */
43 @RequestMapping(value = "/getByLineCode") 77 @RequestMapping(value = "/getByLineCode")
44 public LineConfig getByLineCode(@RequestParam String lineCode){ 78 public LineConfig getByLineCode(@RequestParam String lineCode){
45 return lineConfigService.getByLineCode(lineCode); 79 return lineConfigService.getByLineCode(lineCode);
46 } 80 }
47 81
  82 + /**
  83 + * 到站缓冲区设置
  84 + * @param lineCode
  85 + * @param field
  86 + * @param value
  87 + * @return
  88 + */
48 @RequestMapping(value = "/bufferTimeDiff", method = RequestMethod.POST) 89 @RequestMapping(value = "/bufferTimeDiff", method = RequestMethod.POST)
49 public Map<String, Object> bufferTimeDiff(@RequestParam String lineCode, @RequestParam String field,@RequestParam String value){ 90 public Map<String, Object> bufferTimeDiff(@RequestParam String lineCode, @RequestParam String field,@RequestParam String value){
50 return lineConfigService.bufferTimeDiff(lineCode, field, value); 91 return lineConfigService.bufferTimeDiff(lineCode, field, value);
51 } 92 }
  93 +
  94 + /**
  95 + * 应急停靠设置
  96 + * @param map
  97 + * @return
  98 + */
  99 + @RequestMapping(value = "/yjtkSet", method = RequestMethod.POST)
  100 + public Map<String, Object> yjtkSet(@RequestParam Map<String, String> map){
  101 + //System.out.println(map);
  102 + return lineConfigService.yjtkSet(map);
  103 + }
52 } 104 }
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
1 package com.bsth.controller.realcontrol; 1 package com.bsth.controller.realcontrol;
2 2
3 import com.alibaba.fastjson.JSONArray; 3 import com.alibaba.fastjson.JSONArray;
  4 +import com.bsth.common.ResponseCode;
4 import com.bsth.controller.BaseController; 5 import com.bsth.controller.BaseController;
5 import com.bsth.controller.realcontrol.dto.ChangePersonCar; 6 import com.bsth.controller.realcontrol.dto.ChangePersonCar;
6 import com.bsth.controller.realcontrol.dto.DfsjChange; 7 import com.bsth.controller.realcontrol.dto.DfsjChange;
@@ -486,4 +487,33 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo, @@ -486,4 +487,33 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
486 public Map<String, Object> lpChangeMulti(@RequestParam String leftIdx, @RequestParam String rightIdx,@RequestParam int type){ 487 public Map<String, Object> lpChangeMulti(@RequestParam String leftIdx, @RequestParam String rightIdx,@RequestParam int type){
487 return scheduleRealInfoService.lpChangeMulti(leftIdx, rightIdx, type); 488 return scheduleRealInfoService.lpChangeMulti(leftIdx, rightIdx, type);
488 } 489 }
  490 +
  491 + /**
  492 + * 删除当日实际排班
  493 + * @return
  494 + */
  495 + @RequestMapping(value = "deleteRealSchedule", method = RequestMethod.POST)
  496 + public Map<String, Object> deleteRealSchedule(@RequestParam String lineCode){
  497 + return dayOfSchedule.deleteRealSchedule(lineCode);
  498 + }
  499 +
  500 + /**
  501 + * 从计划表重新加载当日排班
  502 + * @param lineCode
  503 + * @return
  504 + */
  505 + @RequestMapping(value = "reLoadRealSchedule", method = RequestMethod.POST)
  506 + public Map<String, Object> reLoadRealSchedule(@RequestParam String lineCode){
  507 + Map<String, Object> rs = new HashMap<>();
  508 + List<ScheduleRealInfo> list = dayOfSchedule.findByLineCode(lineCode);
  509 + if(list != null && list.size() > 0){
  510 + rs.put("status", ResponseCode.ERROR);
  511 + rs.put("msg", "失败," + list.get(0).getXlName() + "当日存在实际排班,无法重新加载。");
  512 + return rs;
  513 + }
  514 +
  515 + int code = dayOfSchedule.reloadSch(lineCode);
  516 + rs.put("status", code==0? ResponseCode.SUCCESS: ResponseCode.ERROR);
  517 + return rs;
  518 + }
489 } 519 }
src/main/java/com/bsth/data/LineConfigData.java
1 package com.bsth.data; 1 package com.bsth.data;
2 2
  3 +import com.bsth.Application;
3 import com.bsth.entity.Line; 4 import com.bsth.entity.Line;
4 import com.bsth.entity.realcontrol.D80ReplyTemp; 5 import com.bsth.entity.realcontrol.D80ReplyTemp;
5 import com.bsth.entity.realcontrol.LineConfig; 6 import com.bsth.entity.realcontrol.LineConfig;
6 -import com.bsth.oplog.normal.OpLogger; 7 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
7 import com.bsth.service.LineService; 8 import com.bsth.service.LineService;
8 import com.bsth.service.realcontrol.LineConfigService; 9 import com.bsth.service.realcontrol.LineConfigService;
9 import org.slf4j.Logger; 10 import org.slf4j.Logger;
@@ -14,101 +15,151 @@ import org.springframework.core.annotation.Order; @@ -14,101 +15,151 @@ import org.springframework.core.annotation.Order;
14 import org.springframework.stereotype.Component; 15 import org.springframework.stereotype.Component;
15 16
16 import java.util.*; 17 import java.util.*;
  18 +import java.util.concurrent.TimeUnit;
17 19
18 /** 20 /**
19 - * 21 + * @author PanZhao
20 * @ClassName: LineConfigData 22 * @ClassName: LineConfigData
21 * @Description: TODO(线路配置数据管理) 23 * @Description: TODO(线路配置数据管理)
22 - * @author PanZhao  
23 * @date 2016年8月15日 下午2:50:19 24 * @date 2016年8月15日 下午2:50:19
24 - *  
25 */ 25 */
26 @Component 26 @Component
27 @Order(value = 2) 27 @Order(value = 2)
28 public class LineConfigData implements CommandLineRunner { 28 public class LineConfigData implements CommandLineRunner {
29 -  
30 - Logger logger = LoggerFactory.getLogger(this.getClass());  
31 -  
32 - // 线路编码和配置  
33 - private Map<String, LineConfig> lineConfMap;  
34 -  
35 - @Autowired  
36 - LineConfigService lineConfigService;  
37 -  
38 - @Autowired  
39 - LineService lineService;  
40 -  
41 - @Autowired  
42 - OpLogger opLog;  
43 -  
44 - @Override  
45 - public void run(String... arg0) throws Exception {  
46 - lineConfMap = new HashMap<>();  
47 -  
48 - Iterator<LineConfig> itr = lineConfigService.findAll().iterator();  
49 - while (itr.hasNext())  
50 - setBuffer(itr.next());  
51 -  
52 - opLog.info("Line_config_data");  
53 - }  
54 -  
55 - public LineConfig get(String lineCode){  
56 - return lineConfMap.get(lineCode);  
57 - }  
58 -  
59 - public Collection<LineConfig> getAll(){  
60 - return lineConfMap.values();  
61 - }  
62 -  
63 - public void set(LineConfig conf){  
64 - lineConfigService.save(conf);  
65 - setBuffer(conf);  
66 - }  
67 -  
68 - public void setBuffer(LineConfig conf){  
69 - lineConfMap.put(conf.getLine().getLineCode(), conf);  
70 - }  
71 -  
72 - /**  
73 - *  
74 - * @Title: init  
75 - * @Description: TODO(初始化配置信息)  
76 - */  
77 - public void init(String lineCode) throws Exception{  
78 - LineConfig conf = new LineConfig();  
79 - //线路  
80 - Line line = lineService.findByLineCode(lineCode);  
81 - if(null == line)  
82 - throw new NullPointerException("异常的lineCode");  
83 -  
84 - conf.setLine(line);  
85 - //开始运营时间  
86 - conf.setStartOpt("02:00");  
87 - //托管状态  
88 - conf.setTrust(true);  
89 - //出场时间类型  
90 - conf.setOutConfig(0);  
91 - //进场时间类型  
92 - //conf.setInConfig(1);  
93 - //短语模板  
94 - conf.setPhraseTemps("");  
95 - //调度指令模板  
96 - conf.setSchDirectiveTemp("");  
97 -  
98 - //80指令回复  
99 - D80ReplyTemp t50 = new D80ReplyTemp(conf, (short)0x50, "同意,回电详谈", "不同意,请回电")  
100 - ,t60 = new D80ReplyTemp(conf, (short)0x60, "同意,回电详谈", "不同意,请回电")  
101 - ,tA2 = new D80ReplyTemp(conf, (short)0xA2, "同意,回电详谈", "不同意,请回电")  
102 - ,t70 = new D80ReplyTemp(conf, (short)0x70, "同意,回电详谈", "不同意,请回电")  
103 - ,t11 = new D80ReplyTemp(conf, (short)0x11, "同意,回电详谈", "不同意,请回电");  
104 -  
105 - Set<D80ReplyTemp> temps = conf.getD80Temps();  
106 - temps.add(t50);  
107 - temps.add(t60);  
108 - temps.add(tA2);  
109 - temps.add(t70);  
110 - temps.add(t11);  
111 -  
112 - set(conf);  
113 - } 29 +
  30 + static Logger logger = LoggerFactory.getLogger(LineConfigData.class);
  31 +
  32 + // 线路编码和配置
  33 + private Map<String, LineConfig> lineConfMap;
  34 +
  35 + @Autowired
  36 + LineConfigService lineConfigService;
  37 +
  38 + @Autowired
  39 + LineService lineService;
  40 +
  41 + //入库缓冲
  42 + static LinkedList<LineConfig> saveBuffers = new LinkedList<>();
  43 +
  44 + @Autowired
  45 + LineConfigPersistThread configPersistThread;
  46 +
  47 + @Override
  48 + public void run(String... arg0) throws Exception {
  49 + lineConfMap = new HashMap<>();
  50 +
  51 + Iterator<LineConfig> itr = lineConfigService.findAll().iterator();
  52 + while (itr.hasNext())
  53 + setBuffer(itr.next());
  54 +
  55 + //异步入库
  56 + Application.mainServices.scheduleWithFixedDelay(configPersistThread, 60, 60, TimeUnit.SECONDS);
  57 + }
  58 +
  59 + /**
  60 + * 起点发出,应用缓冲区设置参数
  61 + * @param sch
  62 + * @param timestamp
  63 + * @return
  64 + */
  65 + public long applyOut(ScheduleRealInfo sch, Long timestamp) {
  66 + LineConfig config = lineConfMap.get(sch.getXlBm());
  67 + int diff = sch.getXlDir()=="0"?config.getUpOutDiff():config.getDownOutDiff();
  68 + return timestamp - (diff * 1000);
  69 + }
  70 +
  71 + /**
  72 + * 终点到达,应用缓冲区设置参数
  73 + * @param sch
  74 + * @param timestamp
  75 + * @return
  76 + */
  77 + public long applyIn(ScheduleRealInfo sch, Long timestamp){
  78 + LineConfig config = lineConfMap.get(sch.getXlBm());
  79 + int diff = sch.getXlDir()=="0"?config.getUpInDiff():config.getDownInDiff();
  80 + return timestamp - (diff * 1000);
  81 + }
  82 +
  83 + @Component
  84 + private static class LineConfigPersistThread extends Thread {
  85 +
  86 + @Autowired
  87 + LineConfigService lineConfigService;
  88 +
  89 + @Override
  90 + public void run() {
  91 + LineConfig config;
  92 + for (int i = 0; i < 800; i++) {
  93 + config = saveBuffers.poll();
  94 + if (config == null)
  95 + break;
  96 +
  97 + try {
  98 + lineConfigService.save(config);
  99 + }catch (Exception e){
  100 + logger.error("", e);
  101 + }
  102 + }
  103 + }
  104 + }
  105 +
  106 + public LineConfig get(String lineCode) {
  107 + return lineConfMap.get(lineCode);
  108 + }
  109 +
  110 + public Collection<LineConfig> getAll() {
  111 + return lineConfMap.values();
  112 + }
  113 +
  114 + public void set(LineConfig conf) {
  115 + //lineConfigService.save(conf);
  116 + saveBuffers.add(conf);
  117 + setBuffer(conf);
  118 + }
  119 +
  120 + public void setBuffer(LineConfig conf) {
  121 + lineConfMap.put(conf.getLine().getLineCode(), conf);
  122 + }
  123 +
  124 + /**
  125 + * @Title: init
  126 + * @Description: TODO(初始化配置信息)
  127 + */
  128 + public void init(String lineCode) throws Exception {
  129 + LineConfig conf = new LineConfig();
  130 + //线路
  131 + Line line = lineService.findByLineCode(lineCode);
  132 + if (null == line)
  133 + throw new NullPointerException("异常的lineCode");
  134 +
  135 + conf.setLine(line);
  136 + //开始运营时间
  137 + conf.setStartOpt("02:00");
  138 + //托管状态
  139 + conf.setTrust(true);
  140 + //出场时间类型
  141 + conf.setOutConfig(0);
  142 + //进场时间类型
  143 + //conf.setInConfig(1);
  144 + //短语模板
  145 + conf.setPhraseTemps("");
  146 + //调度指令模板
  147 + conf.setSchDirectiveTemp("");
  148 +
  149 + //80指令回复 闵行用
  150 + D80ReplyTemp t50 = new D80ReplyTemp(conf, (short) 0x50, "同意,回电详谈", "不同意,请回电"), t60 = new D80ReplyTemp(conf, (short) 0x60, "同意,回电详谈", "不同意,请回电"), tA2 = new D80ReplyTemp(conf, (short) 0xA2, "同意,回电详谈", "不同意,请回电"), t70 = new D80ReplyTemp(conf, (short) 0x70, "同意,回电详谈", "不同意,请回电"), t11 = new D80ReplyTemp(conf, (short) 0x11, "同意,回电详谈", "不同意,请回电");
  151 +
  152 + //应急停靠默认值
  153 + conf.setYjtkStart("00:00");
  154 + conf.setYjtkEnd("23:59");
  155 +
  156 + Set<D80ReplyTemp> temps = conf.getD80Temps();
  157 + temps.add(t50);
  158 + temps.add(t60);
  159 + temps.add(tA2);
  160 + temps.add(t70);
  161 + temps.add(t11);
  162 +
  163 + set(conf);
  164 + }
114 } 165 }
src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java
@@ -135,8 +135,11 @@ public class InOutStationSignalHandle extends SignalHandle{ @@ -135,8 +135,11 @@ public class InOutStationSignalHandle extends SignalHandle{
135 if(StringUtils.isNotEmpty(sch.getFcsjActual())) 135 if(StringUtils.isNotEmpty(sch.getFcsjActual()))
136 return; 136 return;
137 137
  138 + //应用到离站缓冲区设置参数
  139 + long rsT = lineConfigData.applyOut(sch, gps.getTimestamp());
  140 +
138 //实发时间 141 //实发时间
139 - sch.setFcsjActualAll(gps.getTimestamp()); 142 + sch.setFcsjActualAll(rsT);
140 //通知客户端 143 //通知客户端
141 sendUtils.sendFcsj(sch); 144 sendUtils.sendFcsj(sch);
142 //持久化 145 //持久化
@@ -215,7 +218,10 @@ public class InOutStationSignalHandle extends SignalHandle{ @@ -215,7 +218,10 @@ public class InOutStationSignalHandle extends SignalHandle{
215 if(StringUtils.isNotEmpty(sch.getZdsjActual())) 218 if(StringUtils.isNotEmpty(sch.getZdsjActual()))
216 return; 219 return;
217 220
218 - sch.setZdsjActualAll(gps.getTimestamp()); 221 + //应用到离站缓冲区设置参数
  222 + long rsT = lineConfigData.applyIn(sch, gps.getTimestamp());
  223 +
  224 + sch.setZdsjActualAll(rsT);
219 //已完成班次数 225 //已完成班次数
220 int doneSum = dayOfSchedule.doneSum(sch.getClZbh()); 226 int doneSum = dayOfSchedule.doneSum(sch.getClZbh());
221 ScheduleRealInfo next = dayOfSchedule.next(sch); 227 ScheduleRealInfo next = dayOfSchedule.next(sch);
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
@@ -3,6 +3,7 @@ package com.bsth.data.schedule; @@ -3,6 +3,7 @@ package com.bsth.data.schedule;
3 import com.alibaba.fastjson.JSON; 3 import com.alibaba.fastjson.JSON;
4 import com.alibaba.fastjson.JSONArray; 4 import com.alibaba.fastjson.JSONArray;
5 import com.bsth.Application; 5 import com.bsth.Application;
  6 +import com.bsth.common.ResponseCode;
6 import com.bsth.data.BasicData; 7 import com.bsth.data.BasicData;
7 import com.bsth.data.LineConfigData; 8 import com.bsth.data.LineConfigData;
8 import com.bsth.data.directive.DirectivesPstThread; 9 import com.bsth.data.directive.DirectivesPstThread;
@@ -18,7 +19,6 @@ import com.bsth.util.BatchSaveUtils; @@ -18,7 +19,6 @@ import com.bsth.util.BatchSaveUtils;
18 import com.bsth.util.DateUtils; 19 import com.bsth.util.DateUtils;
19 import com.bsth.websocket.handler.SendUtils; 20 import com.bsth.websocket.handler.SendUtils;
20 import com.google.common.collect.ArrayListMultimap; 21 import com.google.common.collect.ArrayListMultimap;
21 -import com.google.common.collect.TreeMultimap;  
22 import org.apache.commons.lang3.StringUtils; 22 import org.apache.commons.lang3.StringUtils;
23 import org.joda.time.format.DateTimeFormat; 23 import org.joda.time.format.DateTimeFormat;
24 import org.joda.time.format.DateTimeFormatter; 24 import org.joda.time.format.DateTimeFormatter;
@@ -56,7 +56,7 @@ public class DayOfSchedule implements CommandLineRunner { @@ -56,7 +56,7 @@ public class DayOfSchedule implements CommandLineRunner {
56 private static Map<Long, ScheduleRealInfo> id2SchedulMap; 56 private static Map<Long, ScheduleRealInfo> id2SchedulMap;
57 57
58 // 车辆和排班起终点站对照(包括进出的停车场,区间起终点) 58 // 车辆和排班起终点站对照(包括进出的停车场,区间起终点)
59 - private static TreeMultimap<String, String> nbbm2SEStationMap; 59 + //private static TreeMultimap<String, String> nbbm2SEStationMap;
60 60
61 //车辆 ——> 当前执行班次 61 //车辆 ——> 当前执行班次
62 private static Map<String, ScheduleRealInfo> carExecutePlanMap; 62 private static Map<String, ScheduleRealInfo> carExecutePlanMap;
@@ -99,7 +99,7 @@ public class DayOfSchedule implements CommandLineRunner { @@ -99,7 +99,7 @@ public class DayOfSchedule implements CommandLineRunner {
99 pstBuffer = new LinkedList<>(); 99 pstBuffer = new LinkedList<>();
100 schFCSJComparator = new ScheduleComparator.FCSJ(); 100 schFCSJComparator = new ScheduleComparator.FCSJ();
101 currSchDateMap = new HashMap<>(); 101 currSchDateMap = new HashMap<>();
102 - nbbm2SEStationMap = TreeMultimap.create(); 102 + //nbbm2SEStationMap = TreeMultimap.create();
103 carExecutePlanMap = new HashMap<>(); 103 carExecutePlanMap = new HashMap<>();
104 104
105 schedulePlanMap = new HashMap<>(); 105 schedulePlanMap = new HashMap<>();
@@ -244,6 +244,10 @@ public class DayOfSchedule implements CommandLineRunner { @@ -244,6 +244,10 @@ public class DayOfSchedule implements CommandLineRunner {
244 return 0; 244 return 0;
245 } 245 }
246 246
  247 + public int reloadSch(String lineCode){
  248 + return reloadSch(lineCode, calcSchDate(lineCode), true);
  249 + }
  250 +
247 /** 251 /**
248 * @Title: searchAllCars 252 * @Title: searchAllCars
249 * @Description: TODO(搜索班次集合中的车辆) 253 * @Description: TODO(搜索班次集合中的车辆)
@@ -480,9 +484,9 @@ public class DayOfSchedule implements CommandLineRunner { @@ -480,9 +484,9 @@ public class DayOfSchedule implements CommandLineRunner {
480 return id2SchedulMap.get(id); 484 return id2SchedulMap.get(id);
481 } 485 }
482 486
483 - public Set<String> getSEStationList(String nbbm) { 487 + /* public Set<String> getSEStationList(String nbbm) {
484 return nbbm2SEStationMap.get(nbbm); 488 return nbbm2SEStationMap.get(nbbm);
485 - } 489 + }*/
486 490
487 /** 491 /**
488 * @Title: next 492 * @Title: next
@@ -610,8 +614,8 @@ public class DayOfSchedule implements CommandLineRunner { @@ -610,8 +614,8 @@ public class DayOfSchedule implements CommandLineRunner {
610 614
611 String nbbm = sch.getClZbh(); 615 String nbbm = sch.getClZbh();
612 nbbmScheduleMap.put(nbbm, sch); 616 nbbmScheduleMap.put(nbbm, sch);
613 - nbbm2SEStationMap.put(nbbm, sch.getQdzCode());  
614 - nbbm2SEStationMap.put(nbbm, sch.getZdzCode()); 617 + //nbbm2SEStationMap.put(nbbm, sch.getQdzCode());
  618 + //nbbm2SEStationMap.put(nbbm, sch.getZdzCode());
615 619
616 //主键索引 620 //主键索引
617 id2SchedulMap.put(sch.getId(), sch); 621 id2SchedulMap.put(sch.getId(), sch);
@@ -630,9 +634,6 @@ public class DayOfSchedule implements CommandLineRunner { @@ -630,9 +634,6 @@ public class DayOfSchedule implements CommandLineRunner {
630 //return sch; 634 //return sch;
631 } 635 }
632 636
633 -// public void calcQdzTimePlan(String nbbm){  
634 -// schAttrCalculator.calcQdzTimePlan(nbbmScheduleMap.get(nbbm));  
635 -// }  
636 637
637 public List<ScheduleRealInfo> updateQdzTimePlan(String nbbm) { 638 public List<ScheduleRealInfo> updateQdzTimePlan(String nbbm) {
638 Collections.sort(nbbmScheduleMap.get(nbbm), schFCSJComparator); 639 Collections.sort(nbbmScheduleMap.get(nbbm), schFCSJComparator);
@@ -640,27 +641,6 @@ public class DayOfSchedule implements CommandLineRunner { @@ -640,27 +641,6 @@ public class DayOfSchedule implements CommandLineRunner {
640 } 641 }
641 642
642 /** 643 /**
643 - *  
644 - * @Title: nextAll  
645 - * @Description: TODO(之后的所有班次)  
646 - */  
647 -/* public List<ScheduleRealInfo> nextAll(ScheduleRealInfo sch) {  
648 - List<ScheduleRealInfo> list = nbbmScheduleMap.get(sch.getClZbh());  
649 - // 排序  
650 - Collections.sort(list, schFCSJComparator);  
651 -  
652 - List<ScheduleRealInfo> rs = new ArrayList<>();  
653 - ScheduleRealInfo temp;  
654 - for (int i = 0; i < list.size() - 1; i++) {  
655 - temp = list.get(i);  
656 - if(temp.getFcsjT() > sch.getFcsjT())  
657 - rs.add(temp);  
658 -  
659 - }  
660 - return rs;  
661 - }*/  
662 -  
663 - /**  
664 * @Title: doneSum 644 * @Title: doneSum
665 * @Description: TODO(已完成班次总数) 645 * @Description: TODO(已完成班次总数)
666 */ 646 */
@@ -828,8 +808,8 @@ public class DayOfSchedule implements CommandLineRunner { @@ -828,8 +808,8 @@ public class DayOfSchedule implements CommandLineRunner {
828 808
829 sch.setClZbh(newClZbh); 809 sch.setClZbh(newClZbh);
830 nbbmScheduleMap.put(newClZbh, sch); 810 nbbmScheduleMap.put(newClZbh, sch);
831 - nbbm2SEStationMap.put(newClZbh, sch.getQdzCode());  
832 - nbbm2SEStationMap.put(newClZbh, sch.getZdzCode()); 811 + //nbbm2SEStationMap.put(newClZbh, sch.getQdzCode());
  812 + //nbbm2SEStationMap.put(newClZbh, sch.getZdzCode());
833 813
834 //重新计算班次应到时间 814 //重新计算班次应到时间
835 ups.addAll(updateQdzTimePlan(oldClzbh)); 815 ups.addAll(updateQdzTimePlan(oldClzbh));
@@ -876,43 +856,50 @@ public class DayOfSchedule implements CommandLineRunner { @@ -876,43 +856,50 @@ public class DayOfSchedule implements CommandLineRunner {
876 } 856 }
877 857
878 /** 858 /**
879 - * 获取班次的计划停站时间  
880 - * @param sch 859 + * 删除实际排班
  860 + * @param lineCode
881 * @return 861 * @return
  862 + */
  863 + public Map<String, Object> deleteRealSchedule(String lineCode) {
  864 + Map<String, Object> rs = new HashMap<>();
882 865
883 - public int stopTimePlan(Object task) { 866 + try {
  867 + String rq = currSchDateMap.get(lineCode);
  868 + if(StringUtils.isNotEmpty(rq)){
  869 + //解除gps 和班次之间的关联
  870 + List<ScheduleRealInfo> unions = calcUnion(findByLineCode(lineCode), carExecutePlanMap.values());
  871 + for(ScheduleRealInfo sch : unions){
  872 + removeExecPlan(sch.getClZbh());
  873 + }
884 874
885 - ScheduleRealInfo sch = prev((ScheduleRealInfo) task); 875 + //删除班次数据
  876 + removeRealSch(lineCode, rq);
  877 + //删除相关班次修正记录
  878 + }
  879 + rs.put("status", ResponseCode.SUCCESS);
  880 + }catch (Exception e){
  881 + logger.error("", e);
  882 + rs.put("status", ResponseCode.ERROR);
  883 + }
886 884
887 - sch.getzdsj  
888 - return -1;  
889 - }*/ 885 + return rs;
  886 + }
890 887
891 /** 888 /**
  889 + * 计算并集
892 * 890 *
893 - * @Title: linkToSchPlan  
894 - * @Description: TODO(车辆关联到班次) 891 + * @param all
  892 + * @param sub
  893 + * @return
895 */ 894 */
896 -/* public void linkToSchPlan(String nbbm) {  
897 - //当前GPS状态  
898 - GpsEntity gps = gpsRealData.get(BasicData.deviceId2NbbmMap.inverse().get(nbbm));  
899 - if(null == gps)  
900 - return;  
901 -  
902 - //班次集合  
903 - List<ScheduleRealInfo> schArr = nbbmScheduleMap.get(nbbm);  
904 -  
905 - for(ScheduleRealInfo sch : schArr){  
906 - if(sch.getStatus() == 2)  
907 - continue;  
908 - if(sch.isDestroy())  
909 - continue;  
910 - if(!sch.getXlBm().equals(gps.getLineId())  
911 - || Integer.parseInt(sch.getXlDir()) != gps.getUpDown().intValue())  
912 - continue;  
913 -  
914 - addExecPlan(sch);  
915 - break;  
916 - }  
917 - }*/ 895 + public List<ScheduleRealInfo> calcUnion(Collection<ScheduleRealInfo> c1, Collection<ScheduleRealInfo> c2) {
  896 + List<ScheduleRealInfo> rs = new ArrayList<>();
  897 +
  898 + for (ScheduleRealInfo sch : c1) {
  899 + if(c2.contains(sch)){
  900 + rs.add(sch);
  901 + }
  902 + }
  903 + return rs;
  904 + }
918 } 905 }
919 \ No newline at end of file 906 \ No newline at end of file
src/main/java/com/bsth/data/schedule/thread/ScheduleRefreshThread.java
@@ -2,7 +2,6 @@ package com.bsth.data.schedule.thread; @@ -2,7 +2,6 @@ package com.bsth.data.schedule.thread;
2 2
3 import com.bsth.data.BasicData; 3 import com.bsth.data.BasicData;
4 import com.bsth.data.LineConfigData; 4 import com.bsth.data.LineConfigData;
5 -import com.bsth.data.arrival.ArrivalData_GPS;  
6 import com.bsth.data.directive.DayOfDirectives; 5 import com.bsth.data.directive.DayOfDirectives;
7 import com.bsth.data.pilot80.PilotReport; 6 import com.bsth.data.pilot80.PilotReport;
8 import com.bsth.data.schedule.DayOfSchedule; 7 import com.bsth.data.schedule.DayOfSchedule;
@@ -29,8 +28,8 @@ public class ScheduleRefreshThread extends Thread{ @@ -29,8 +28,8 @@ public class ScheduleRefreshThread extends Thread{
29 @Autowired 28 @Autowired
30 DayOfSchedule dayOfSchedule; 29 DayOfSchedule dayOfSchedule;
31 30
32 - @Autowired  
33 - ArrivalData_GPS arrivalData; 31 + /*@Autowired
  32 + ArrivalData_GPS arrivalData;*/
34 33
35 @Autowired 34 @Autowired
36 LineConfigData lineConfs; 35 LineConfigData lineConfs;
@@ -59,7 +58,7 @@ public class ScheduleRefreshThread extends Thread{ @@ -59,7 +58,7 @@ public class ScheduleRefreshThread extends Thread{
59 58
60 logger.info(lineCode + "开始翻班, " + currSchDate); 59 logger.info(lineCode + "开始翻班, " + currSchDate);
61 //清除进出站数据 60 //清除进出站数据
62 - arrivalData.clearRAMData(lineCode); 61 + //arrivalData.clearRAMData(lineCode);
63 //清除指令数据 62 //清除指令数据
64 Set<String> cars = dayOfSchedule.findCarByLineCode(lineCode); 63 Set<String> cars = dayOfSchedule.findCarByLineCode(lineCode);
65 for(String car : cars) 64 for(String car : cars)
src/main/java/com/bsth/entity/realcontrol/LineConfig.java
@@ -50,6 +50,9 @@ public class LineConfig { @@ -50,6 +50,9 @@ public class LineConfig {
50 /** 出站既出场 对应的停车场 */ 50 /** 出站既出场 对应的停车场 */
51 private String twinsPark; 51 private String twinsPark;
52 52
  53 + /** 出站既出场 对应的起点站 */
  54 + private String twinsStation;
  55 +
53 /** 短语模板 , 号分隔多个 */ 56 /** 短语模板 , 号分隔多个 */
54 private String phraseTemps; 57 private String phraseTemps;
55 58
@@ -268,4 +271,12 @@ public class LineConfig { @@ -268,4 +271,12 @@ public class LineConfig {
268 public void setEnableYjtk(boolean enableYjtk) { 271 public void setEnableYjtk(boolean enableYjtk) {
269 this.enableYjtk = enableYjtk; 272 this.enableYjtk = enableYjtk;
270 } 273 }
  274 +
  275 + public String getTwinsStation() {
  276 + return twinsStation;
  277 + }
  278 +
  279 + public void setTwinsStation(String twinsStation) {
  280 + this.twinsStation = twinsStation;
  281 + }
271 } 282 }
src/main/java/com/bsth/service/realcontrol/LineConfigService.java
@@ -13,11 +13,13 @@ public interface LineConfigService extends BaseService&lt;LineConfig, Integer&gt;{ @@ -13,11 +13,13 @@ public interface LineConfigService extends BaseService&lt;LineConfig, Integer&gt;{
13 13
14 Map<String, Object> editStartOptTime(String time, String lineCode); 14 Map<String, Object> editStartOptTime(String time, String lineCode);
15 15
16 - Map<String, Object> editOutTimeType(String lineCode, int type); 16 + Map<String, Object> editOutTimeType(String lineCode, int type, String parkCode, String stationCode);
17 17
18 LineConfig getByLineCode(String lineCode); 18 LineConfig getByLineCode(String lineCode);
19 19
20 Map<String,Object> enableInParkForSource(String lineCode, int enable); 20 Map<String,Object> enableInParkForSource(String lineCode, int enable);
21 21
22 Map<String,Object> bufferTimeDiff(String lineCode, String field, String value); 22 Map<String,Object> bufferTimeDiff(String lineCode, String field, String value);
  23 +
  24 + Map<String,Object> yjtkSet(Map<String, String> map);
23 } 25 }
src/main/java/com/bsth/service/realcontrol/impl/LineConfigServiceImpl.java
@@ -75,17 +75,20 @@ public class LineConfigServiceImpl extends BaseServiceImpl&lt;LineConfig, Integer&gt; @@ -75,17 +75,20 @@ public class LineConfigServiceImpl extends BaseServiceImpl&lt;LineConfig, Integer&gt;
75 } 75 }
76 76
77 @Override 77 @Override
78 - public Map<String, Object> editOutTimeType(String lineCode, int type) { 78 + public Map<String, Object> editOutTimeType(String lineCode, int type, String parkCode, String stationCode) {
79 Map<String, Object> rs = new HashMap<>(); 79 Map<String, Object> rs = new HashMap<>();
80 try { 80 try {
81 LineConfig conf = lineConfigData.get(lineCode); 81 LineConfig conf = lineConfigData.get(lineCode);
82 82
83 conf.setOutConfig(type); 83 conf.setOutConfig(type);
84 - //conf.setInConfig(type); 84 + if(type == 2){
  85 + conf.setTwinsPark(parkCode);
  86 + conf.setTwinsStation(stationCode);
  87 + }
85 lineConfigData.set(conf); 88 lineConfigData.set(conf);
86 89
87 rs.put("status", ResponseCode.SUCCESS); 90 rs.put("status", ResponseCode.SUCCESS);
88 - rs.put("type", type); 91 + rs.put("conf", conf);
89 } catch (Exception e) { 92 } catch (Exception e) {
90 rs.put("status", ResponseCode.ERROR); 93 rs.put("status", ResponseCode.ERROR);
91 rs.put("msg", e.getMessage()); 94 rs.put("msg", e.getMessage());
@@ -140,4 +143,40 @@ public class LineConfigServiceImpl extends BaseServiceImpl&lt;LineConfig, Integer&gt; @@ -140,4 +143,40 @@ public class LineConfigServiceImpl extends BaseServiceImpl&lt;LineConfig, Integer&gt;
140 } 143 }
141 return rs; 144 return rs;
142 } 145 }
  146 +
  147 + @Override
  148 + public Map<String, Object> yjtkSet(Map<String, String> map) {
  149 + String lineCode = map.get("lineCode").toString();
  150 + int enableYjtk = Integer.parseInt(map.get("enableYjtk").toString());
  151 +
  152 + Map<String, Object> rs = new HashMap<>();
  153 + try {
  154 + LineConfig conf = lineConfigData.get(lineCode);
  155 +
  156 + if(enableYjtk == 1){
  157 + String yjtkStart = map.containsKey("yjtkStart") ? map.get("yjtkStart").toString() : "00:00";
  158 + String yjtkEnd = map.containsKey("yjtkEnd") ? map.get("yjtkEnd").toString() : "23:59";
  159 + int upStopMinute = Integer.parseInt(map.get("upStopMinute").toString());
  160 + int downStopMinute = Integer.parseInt(map.get("downStopMinute").toString());
  161 +
  162 + conf.setEnableYjtk(true);
  163 + conf.setYjtkStart(yjtkStart);
  164 + conf.setYjtkEnd(yjtkEnd);
  165 + conf.setUpStopMinute(upStopMinute);
  166 + conf.setDownStopMinute(downStopMinute);
  167 + }
  168 + else
  169 + conf.setEnableYjtk(false);
  170 +
  171 + lineConfigData.set(conf);
  172 +
  173 + rs.put("status", ResponseCode.SUCCESS);
  174 + rs.put("conf", conf);
  175 + } catch (Exception e) {
  176 + rs.put("status", ResponseCode.ERROR);
  177 + rs.put("msg", e.getMessage());
  178 + logger.error("", e);
  179 + }
  180 + return rs;
  181 + }
143 } 182 }
src/main/resources/datatools/ktrs/carsConfigDataOutput.ktr
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<transformation>  
3 - <info>  
4 - <name>&#x8f66;&#x8f86;&#x914d;&#x7f6e;&#x4fe1;&#x606f;&#x5bfc;&#x51fa;</name>  
5 - <description/>  
6 - <extended_description/>  
7 - <trans_version/>  
8 - <trans_type>Normal</trans_type>  
9 - <trans_status>0</trans_status>  
10 - <directory>&#x2f;</directory>  
11 - <parameters>  
12 - <parameter>  
13 - <name>filepath</name>  
14 - <default_value/>  
15 - <description>excel&#x6587;&#x4ef6;&#x8def;&#x5f84;</description>  
16 - </parameter>  
17 - <parameter>  
18 - <name>templatepath</name>  
19 - <default_value/>  
20 - <description>&#x6a21;&#x7248;&#x6587;&#x4ef6;&#x8def;&#x5f84;</description>  
21 - </parameter>  
22 - <parameter>  
23 - <name>xlid</name>  
24 - <default_value/>  
25 - <description>&#x7ebf;&#x8def;id</description>  
26 - </parameter>  
27 - </parameters>  
28 - <log>  
29 -<trans-log-table><connection/>  
30 -<schema/>  
31 -<table/>  
32 -<size_limit_lines/>  
33 -<interval/>  
34 -<timeout_days/>  
35 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>  
36 -<perf-log-table><connection/>  
37 -<schema/>  
38 -<table/>  
39 -<interval/>  
40 -<timeout_days/>  
41 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>  
42 -<channel-log-table><connection/>  
43 -<schema/>  
44 -<table/>  
45 -<timeout_days/>  
46 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>  
47 -<step-log-table><connection/>  
48 -<schema/>  
49 -<table/>  
50 -<timeout_days/>  
51 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>  
52 -<metrics-log-table><connection/>  
53 -<schema/>  
54 -<table/>  
55 -<timeout_days/>  
56 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>  
57 - </log>  
58 - <maxdate>  
59 - <connection/>  
60 - <table/>  
61 - <field/>  
62 - <offset>0.0</offset>  
63 - <maxdiff>0.0</maxdiff>  
64 - </maxdate>  
65 - <size_rowset>10000</size_rowset>  
66 - <sleep_time_empty>50</sleep_time_empty>  
67 - <sleep_time_full>50</sleep_time_full>  
68 - <unique_connections>N</unique_connections>  
69 - <feedback_shown>Y</feedback_shown>  
70 - <feedback_size>50000</feedback_size>  
71 - <using_thread_priorities>Y</using_thread_priorities>  
72 - <shared_objects_file/>  
73 - <capture_step_performance>N</capture_step_performance>  
74 - <step_performance_capturing_delay>1000</step_performance_capturing_delay>  
75 - <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>  
76 - <dependencies>  
77 - </dependencies>  
78 - <partitionschemas>  
79 - </partitionschemas>  
80 - <slaveservers>  
81 - </slaveservers>  
82 - <clusterschemas>  
83 - </clusterschemas>  
84 - <created_user>-</created_user>  
85 - <created_date>2017&#x2f;01&#x2f;11 14&#x3a;14&#x3a;13.722</created_date>  
86 - <modified_user>-</modified_user>  
87 - <modified_date>2017&#x2f;01&#x2f;11 14&#x3a;14&#x3a;13.722</modified_date>  
88 - <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>  
89 - <is_key_private>N</is_key_private>  
90 - </info>  
91 - <notepads>  
92 - <notepad>  
93 - <note>&#x8fd9;&#x91cc;&#x6709;&#x4e9b;&#x95ee;&#x9898;&#xa;&#x5728;window2012&#x7684;&#x73af;&#x5883;&#x4e0b;&#xff0c;&#xa;MySql&#x6570;&#x636e;&#x5e93;&#x67e5;&#x8be2;&#x4e2d;&#x5982;&#x679c;&#x8fd4;&#x56de;&#x4e2d;&#x6587;&#x5185;&#x5bb9;&#x7684;&#x5b57;&#x6bb5;&#xff0c;&#x8fd9;&#x4e2a;&#x5185;&#x5bb9;&#x4e71;&#x7801;&#xa;&#x89e3;&#x51b3;&#x529e;&#x6cd5;&#xff0c;&#x5c31;&#x662f;&#x6570;&#x636e;&#x5e93;&#x67e5;&#x8be2;&#x5168;&#x90e8;&#x7f13;&#x5b58;&#xff0c;&#x5c31;&#x4e0d;&#x4e71;&#x7801;&#xa;linux&#x73af;&#x5883;&#x4e0b;&#x6ca1;&#x95ee;&#x9898;</note>  
94 - <xloc>81</xloc>  
95 - <yloc>172</yloc>  
96 - <width>333</width>  
97 - <heigth>90</heigth>  
98 - <fontname>YaHei Consolas Hybrid</fontname>  
99 - <fontsize>12</fontsize>  
100 - <fontbold>N</fontbold>  
101 - <fontitalic>N</fontitalic>  
102 - <fontcolorred>0</fontcolorred>  
103 - <fontcolorgreen>0</fontcolorgreen>  
104 - <fontcolorblue>0</fontcolorblue>  
105 - <backgroundcolorred>255</backgroundcolorred>  
106 - <backgroundcolorgreen>205</backgroundcolorgreen>  
107 - <backgroundcolorblue>112</backgroundcolorblue>  
108 - <bordercolorred>100</bordercolorred>  
109 - <bordercolorgreen>100</bordercolorgreen>  
110 - <bordercolorblue>100</bordercolorblue>  
111 - <drawshadow>Y</drawshadow>  
112 - </notepad>  
113 - </notepads>  
114 - <connection>  
115 - <name>bus_control_variable</name>  
116 - <server>&#x24;&#x7b;v_db_ip&#x7d;</server>  
117 - <type>MYSQL</type>  
118 - <access>Native</access>  
119 - <database>&#x24;&#x7b;v_db_dname&#x7d;</database>  
120 - <port>3306</port>  
121 - <username>&#x24;&#x7b;v_db_uname&#x7d;</username>  
122 - <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>  
123 - <servername/>  
124 - <data_tablespace/>  
125 - <index_tablespace/>  
126 - <attributes>  
127 - <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute>  
128 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
129 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
130 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
131 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
132 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
133 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
134 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
135 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
136 - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>  
137 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
138 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
139 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
140 - </attributes>  
141 - </connection>  
142 - <connection>  
143 - <name>bus_control_&#x516c;&#x53f8;_201</name>  
144 - <server>localhost</server>  
145 - <type>MYSQL</type>  
146 - <access>Native</access>  
147 - <database>control</database>  
148 - <port>3306</port>  
149 - <username>root</username>  
150 - <password>Encrypted </password>  
151 - <servername/>  
152 - <data_tablespace/>  
153 - <index_tablespace/>  
154 - <attributes>  
155 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
156 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
157 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
158 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
159 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
160 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
161 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
162 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
163 - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>  
164 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
165 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
166 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
167 - </attributes>  
168 - </connection>  
169 - <connection>  
170 - <name>bus_control_&#x672c;&#x673a;</name>  
171 - <server>localhost</server>  
172 - <type>MYSQL</type>  
173 - <access>Native</access>  
174 - <database>control</database>  
175 - <port>3306</port>  
176 - <username>root</username>  
177 - <password>Encrypted </password>  
178 - <servername/>  
179 - <data_tablespace/>  
180 - <index_tablespace/>  
181 - <attributes>  
182 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
183 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
184 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
185 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
186 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
187 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
188 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
189 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
190 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
191 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
192 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
193 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
194 - </attributes>  
195 - </connection>  
196 - <connection>  
197 - <name>xlab_mysql_youle</name>  
198 - <server>101.231.124.8</server>  
199 - <type>MYSQL</type>  
200 - <access>Native</access>  
201 - <database>xlab_youle</database>  
202 - <port>45687</port>  
203 - <username>xlab-youle</username>  
204 - <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>  
205 - <servername/>  
206 - <data_tablespace/>  
207 - <index_tablespace/>  
208 - <attributes>  
209 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
210 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
211 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
212 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
213 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
214 - <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>  
215 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
216 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
217 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
218 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>  
219 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>  
220 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
221 - </attributes>  
222 - </connection>  
223 - <connection>  
224 - <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>  
225 - <server>localhost</server>  
226 - <type>MYSQL</type>  
227 - <access>Native</access>  
228 - <database>xlab_youle</database>  
229 - <port>3306</port>  
230 - <username>root</username>  
231 - <password>Encrypted </password>  
232 - <servername/>  
233 - <data_tablespace/>  
234 - <index_tablespace/>  
235 - <attributes>  
236 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
237 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
238 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
239 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
240 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
241 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
242 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
243 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
244 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
245 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>  
246 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>  
247 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
248 - </attributes>  
249 - </connection>  
250 - <connection>  
251 - <name>xlab_youle</name>  
252 - <server/>  
253 - <type>MYSQL</type>  
254 - <access>JNDI</access>  
255 - <database>xlab_youle</database>  
256 - <port>1521</port>  
257 - <username/>  
258 - <password>Encrypted </password>  
259 - <servername/>  
260 - <data_tablespace/>  
261 - <index_tablespace/>  
262 - <attributes>  
263 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
264 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
265 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
266 - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>  
267 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
268 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
269 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
270 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
271 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
272 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
273 - </attributes>  
274 - </connection>  
275 - <order>  
276 - <hop> <from>&#x8f66;&#x8f86;&#x914d;&#x7f6e;&#xff08;&#x6ca1;&#x6709;&#x4f5c;&#x5e9f;&#xff09;</from><to>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>  
277 - <hop> <from>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</from><to>&#x8f66;&#x8f86;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>  
278 - <hop> <from>&#x8f66;&#x8f86;&#x67e5;&#x8be2;</from><to>&#x683c;&#x5f0f;&#x5316;&#x65e5;&#x671f;</to><enabled>Y</enabled> </hop>  
279 - <hop> <from>&#x683c;&#x5f0f;&#x5316;&#x65e5;&#x671f;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>  
280 - <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>  
281 - <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>  
282 - </order>  
283 - <step>  
284 - <name>Excel&#x8f93;&#x51fa;</name>  
285 - <type>ExcelOutput</type>  
286 - <description/>  
287 - <distribute>Y</distribute>  
288 - <custom_distribution/>  
289 - <copies>1</copies>  
290 - <partitioning>  
291 - <method>none</method>  
292 - <schema_name/>  
293 - </partitioning>  
294 - <header>Y</header>  
295 - <footer>N</footer>  
296 - <encoding/>  
297 - <append>N</append>  
298 - <add_to_result_filenames>Y</add_to_result_filenames>  
299 - <file>  
300 - <name>&#x24;&#x7b;filepath&#x7d;</name>  
301 - <extention/>  
302 - <do_not_open_newfile_init>N</do_not_open_newfile_init>  
303 - <create_parent_folder>N</create_parent_folder>  
304 - <split>N</split>  
305 - <add_date>N</add_date>  
306 - <add_time>N</add_time>  
307 - <SpecifyFormat>N</SpecifyFormat>  
308 - <date_time_format>yyyyMMddHHmmss</date_time_format>  
309 - <sheetname>&#x5de5;&#x4f5c;&#x8868;1</sheetname>  
310 - <autosizecolums>N</autosizecolums>  
311 - <nullisblank>N</nullisblank>  
312 - <protect_sheet>N</protect_sheet>  
313 - <password>Encrypted </password>  
314 - <splitevery>0</splitevery>  
315 - <usetempfiles>N</usetempfiles>  
316 - <tempdirectory/>  
317 - </file>  
318 - <template>  
319 - <enabled>N</enabled>  
320 - <append>N</append>  
321 - <filename>template.xls</filename>  
322 - </template>  
323 - <fields>  
324 - <field>  
325 - <name>&#x7ebf;&#x8def;</name>  
326 - <type>String</type>  
327 - <format/>  
328 - </field>  
329 - <field>  
330 - <name>&#x5185;&#x90e8;&#x7f16;&#x7801;</name>  
331 - <type>String</type>  
332 - <format/>  
333 - </field>  
334 - <field>  
335 - <name>&#x542f;&#x7528;&#x65e5;&#x671f;</name>  
336 - <type>String</type>  
337 - <format/>  
338 - </field>  
339 - <field>  
340 - <name>&#x7ec8;&#x7ed3;&#x65e5;&#x671f;</name>  
341 - <type>String</type>  
342 - <format/>  
343 - </field>  
344 - <field>  
345 - <name>&#x505c;&#x8f66;&#x70b9;</name>  
346 - <type>String</type>  
347 - <format/>  
348 - </field>  
349 - </fields>  
350 - <custom>  
351 - <header_font_name>arial</header_font_name>  
352 - <header_font_size>10</header_font_size>  
353 - <header_font_bold>N</header_font_bold>  
354 - <header_font_italic>N</header_font_italic>  
355 - <header_font_underline>no</header_font_underline>  
356 - <header_font_orientation>horizontal</header_font_orientation>  
357 - <header_font_color>black</header_font_color>  
358 - <header_background_color>none</header_background_color>  
359 - <header_row_height>255</header_row_height>  
360 - <header_alignment>left</header_alignment>  
361 - <header_image/>  
362 - <row_font_name>arial</row_font_name>  
363 - <row_font_size>10</row_font_size>  
364 - <row_font_color>black</row_font_color>  
365 - <row_background_color>none</row_background_color>  
366 - </custom>  
367 - <cluster_schema/>  
368 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
369 - <xloc>596</xloc>  
370 - <yloc>265</yloc>  
371 - <draw>Y</draw>  
372 - </GUI>  
373 - </step>  
374 -  
375 - <step>  
376 - <name>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</name>  
377 - <type>SelectValues</type>  
378 - <description/>  
379 - <distribute>Y</distribute>  
380 - <custom_distribution/>  
381 - <copies>1</copies>  
382 - <partitioning>  
383 - <method>none</method>  
384 - <schema_name/>  
385 - </partitioning>  
386 - <fields> <field> <name>xlmc</name>  
387 - <rename>&#x7ebf;&#x8def;</rename>  
388 - <length>-2</length>  
389 - <precision>-2</precision>  
390 - </field> <field> <name>zbh</name>  
391 - <rename>&#x5185;&#x90e8;&#x7f16;&#x7801;</rename>  
392 - <length>-2</length>  
393 - <precision>-2</precision>  
394 - </field> <field> <name>qyrq</name>  
395 - <rename>&#x542f;&#x7528;&#x65e5;&#x671f;</rename>  
396 - <length>-2</length>  
397 - <precision>-2</precision>  
398 - </field> <field> <name>zzrq</name>  
399 - <rename>&#x7ec8;&#x7ed3;&#x65e5;&#x671f;</rename>  
400 - <length>-2</length>  
401 - <precision>-2</precision>  
402 - </field> <field> <name>tcd</name>  
403 - <rename>&#x505c;&#x8f66;&#x70b9;</rename>  
404 - <length>-2</length>  
405 - <precision>-2</precision>  
406 - </field> <select_unspecified>N</select_unspecified>  
407 - </fields> <cluster_schema/>  
408 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
409 - <xloc>595</xloc>  
410 - <yloc>167</yloc>  
411 - <draw>Y</draw>  
412 - </GUI>  
413 - </step>  
414 -  
415 - <step>  
416 - <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</name>  
417 - <type>SortRows</type>  
418 - <description/>  
419 - <distribute>Y</distribute>  
420 - <custom_distribution/>  
421 - <copies>1</copies>  
422 - <partitioning>  
423 - <method>none</method>  
424 - <schema_name/>  
425 - </partitioning>  
426 - <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>  
427 - <prefix>out</prefix>  
428 - <sort_size>1000000</sort_size>  
429 - <free_memory/>  
430 - <compress>N</compress>  
431 - <compress_variable/>  
432 - <unique_rows>N</unique_rows>  
433 - <fields>  
434 - <field>  
435 - <name>xlmc</name>  
436 - <ascending>Y</ascending>  
437 - <case_sensitive>N</case_sensitive>  
438 - <presorted>N</presorted>  
439 - </field>  
440 - <field>  
441 - <name>zbh</name>  
442 - <ascending>Y</ascending>  
443 - <case_sensitive>N</case_sensitive>  
444 - <presorted>N</presorted>  
445 - </field>  
446 - <field>  
447 - <name>qyrq</name>  
448 - <ascending>Y</ascending>  
449 - <case_sensitive>N</case_sensitive>  
450 - <presorted>N</presorted>  
451 - </field>  
452 - </fields>  
453 - <cluster_schema/>  
454 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
455 - <xloc>592</xloc>  
456 - <yloc>66</yloc>  
457 - <draw>Y</draw>  
458 - </GUI>  
459 - </step>  
460 -  
461 - <step>  
462 - <name>&#x683c;&#x5f0f;&#x5316;&#x65e5;&#x671f;</name>  
463 - <type>SelectValues</type>  
464 - <description/>  
465 - <distribute>Y</distribute>  
466 - <custom_distribution/>  
467 - <copies>1</copies>  
468 - <partitioning>  
469 - <method>none</method>  
470 - <schema_name/>  
471 - </partitioning>  
472 - <fields> <select_unspecified>N</select_unspecified>  
473 - <meta> <name>qyrq</name>  
474 - <rename>qyrq</rename>  
475 - <type>String</type>  
476 - <length>-2</length>  
477 - <precision>-2</precision>  
478 - <conversion_mask>yyyy-MM-dd</conversion_mask>  
479 - <date_format_lenient>false</date_format_lenient>  
480 - <date_format_locale/>  
481 - <date_format_timezone/>  
482 - <lenient_string_to_number>false</lenient_string_to_number>  
483 - <encoding/>  
484 - <decimal_symbol/>  
485 - <grouping_symbol/>  
486 - <currency_symbol/>  
487 - <storage_type/>  
488 - </meta> <meta> <name>zzrq</name>  
489 - <rename>zzrq</rename>  
490 - <type>String</type>  
491 - <length>-2</length>  
492 - <precision>-2</precision>  
493 - <conversion_mask>yyyy-MM-dd</conversion_mask>  
494 - <date_format_lenient>false</date_format_lenient>  
495 - <date_format_locale/>  
496 - <date_format_timezone/>  
497 - <lenient_string_to_number>false</lenient_string_to_number>  
498 - <encoding/>  
499 - <decimal_symbol/>  
500 - <grouping_symbol/>  
501 - <currency_symbol/>  
502 - <storage_type/>  
503 - </meta> </fields> <cluster_schema/>  
504 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
505 - <xloc>478</xloc>  
506 - <yloc>66</yloc>  
507 - <draw>Y</draw>  
508 - </GUI>  
509 - </step>  
510 -  
511 - <step>  
512 - <name>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</name>  
513 - <type>DBLookup</type>  
514 - <description/>  
515 - <distribute>Y</distribute>  
516 - <custom_distribution/>  
517 - <copies>1</copies>  
518 - <partitioning>  
519 - <method>none</method>  
520 - <schema_name/>  
521 - </partitioning>  
522 - <connection>bus_control_variable</connection>  
523 - <cache>Y</cache>  
524 - <cache_load_all>Y</cache_load_all>  
525 - <cache_size>0</cache_size>  
526 - <lookup>  
527 - <schema/>  
528 - <table>bsth_c_line</table>  
529 - <orderby/>  
530 - <fail_on_multiple>N</fail_on_multiple>  
531 - <eat_row_on_failure>N</eat_row_on_failure>  
532 - <key>  
533 - <name>xl</name>  
534 - <field>id</field>  
535 - <condition>&#x3d;</condition>  
536 - <name2/>  
537 - </key>  
538 - <value>  
539 - <name>name</name>  
540 - <rename>xlmc</rename>  
541 - <default/>  
542 - <type>String</type>  
543 - </value>  
544 - </lookup>  
545 - <cluster_schema/>  
546 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
547 - <xloc>248</xloc>  
548 - <yloc>67</yloc>  
549 - <draw>Y</draw>  
550 - </GUI>  
551 - </step>  
552 -  
553 - <step>  
554 - <name>&#x8f66;&#x8f86;&#x67e5;&#x8be2;</name>  
555 - <type>DBLookup</type>  
556 - <description/>  
557 - <distribute>Y</distribute>  
558 - <custom_distribution/>  
559 - <copies>1</copies>  
560 - <partitioning>  
561 - <method>none</method>  
562 - <schema_name/>  
563 - </partitioning>  
564 - <connection>bus_control_variable</connection>  
565 - <cache>N</cache>  
566 - <cache_load_all>N</cache_load_all>  
567 - <cache_size>0</cache_size>  
568 - <lookup>  
569 - <schema/>  
570 - <table>bsth_c_cars</table>  
571 - <orderby/>  
572 - <fail_on_multiple>N</fail_on_multiple>  
573 - <eat_row_on_failure>N</eat_row_on_failure>  
574 - <key>  
575 - <name>cl</name>  
576 - <field>id</field>  
577 - <condition>&#x3d;</condition>  
578 - <name2/>  
579 - </key>  
580 - <value>  
581 - <name>inside_code</name>  
582 - <rename>zbh</rename>  
583 - <default/>  
584 - <type>String</type>  
585 - </value>  
586 - </lookup>  
587 - <cluster_schema/>  
588 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
589 - <xloc>361</xloc>  
590 - <yloc>67</yloc>  
591 - <draw>Y</draw>  
592 - </GUI>  
593 - </step>  
594 -  
595 - <step>  
596 - <name>&#x8f66;&#x8f86;&#x914d;&#x7f6e;&#xff08;&#x6ca1;&#x6709;&#x4f5c;&#x5e9f;&#xff09;</name>  
597 - <type>TableInput</type>  
598 - <description/>  
599 - <distribute>Y</distribute>  
600 - <custom_distribution/>  
601 - <copies>1</copies>  
602 - <partitioning>  
603 - <method>none</method>  
604 - <schema_name/>  
605 - </partitioning>  
606 - <connection>bus_control_variable</connection>  
607 - <sql>select &#x2a; from bsth_c_s_ccinfo where is_cancel &#x3d; 0 and xl &#x3d; &#x24;&#x7b;xlid&#x7d;</sql>  
608 - <limit>0</limit>  
609 - <lookup/>  
610 - <execute_each_row>N</execute_each_row>  
611 - <variables_active>Y</variables_active>  
612 - <lazy_conversion_active>N</lazy_conversion_active>  
613 - <cluster_schema/>  
614 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
615 - <xloc>106</xloc>  
616 - <yloc>68</yloc>  
617 - <draw>Y</draw>  
618 - </GUI>  
619 - </step>  
620 -  
621 - <step_error_handling>  
622 - </step_error_handling>  
623 - <slave-step-copy-partition-distribution>  
624 -</slave-step-copy-partition-distribution>  
625 - <slave_transformation>N</slave_transformation>  
626 -  
627 -</transformation> 1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<transformation>
  3 + <info>
  4 + <name>&#x8f66;&#x8f86;&#x914d;&#x7f6e;&#x4fe1;&#x606f;&#x5bfc;&#x51fa;</name>
  5 + <description/>
  6 + <extended_description/>
  7 + <trans_version/>
  8 + <trans_type>Normal</trans_type>
  9 + <trans_status>0</trans_status>
  10 + <directory>&#x2f;</directory>
  11 + <parameters>
  12 + <parameter>
  13 + <name>filepath</name>
  14 + <default_value/>
  15 + <description>excel&#x6587;&#x4ef6;&#x8def;&#x5f84;</description>
  16 + </parameter>
  17 + <parameter>
  18 + <name>templatepath</name>
  19 + <default_value/>
  20 + <description>&#x6a21;&#x7248;&#x6587;&#x4ef6;&#x8def;&#x5f84;</description>
  21 + </parameter>
  22 + <parameter>
  23 + <name>xlid</name>
  24 + <default_value/>
  25 + <description>&#x7ebf;&#x8def;id</description>
  26 + </parameter>
  27 + </parameters>
  28 + <log>
  29 +<trans-log-table><connection/>
  30 +<schema/>
  31 +<table/>
  32 +<size_limit_lines/>
  33 +<interval/>
  34 +<timeout_days/>
  35 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>
  36 +<perf-log-table><connection/>
  37 +<schema/>
  38 +<table/>
  39 +<interval/>
  40 +<timeout_days/>
  41 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>
  42 +<channel-log-table><connection/>
  43 +<schema/>
  44 +<table/>
  45 +<timeout_days/>
  46 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>
  47 +<step-log-table><connection/>
  48 +<schema/>
  49 +<table/>
  50 +<timeout_days/>
  51 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>
  52 +<metrics-log-table><connection/>
  53 +<schema/>
  54 +<table/>
  55 +<timeout_days/>
  56 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>
  57 + </log>
  58 + <maxdate>
  59 + <connection/>
  60 + <table/>
  61 + <field/>
  62 + <offset>0.0</offset>
  63 + <maxdiff>0.0</maxdiff>
  64 + </maxdate>
  65 + <size_rowset>10000</size_rowset>
  66 + <sleep_time_empty>50</sleep_time_empty>
  67 + <sleep_time_full>50</sleep_time_full>
  68 + <unique_connections>N</unique_connections>
  69 + <feedback_shown>Y</feedback_shown>
  70 + <feedback_size>50000</feedback_size>
  71 + <using_thread_priorities>Y</using_thread_priorities>
  72 + <shared_objects_file/>
  73 + <capture_step_performance>N</capture_step_performance>
  74 + <step_performance_capturing_delay>1000</step_performance_capturing_delay>
  75 + <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
  76 + <dependencies>
  77 + </dependencies>
  78 + <partitionschemas>
  79 + </partitionschemas>
  80 + <slaveservers>
  81 + </slaveservers>
  82 + <clusterschemas>
  83 + </clusterschemas>
  84 + <created_user>-</created_user>
  85 + <created_date>2017&#x2f;01&#x2f;11 14&#x3a;14&#x3a;13.722</created_date>
  86 + <modified_user>-</modified_user>
  87 + <modified_date>2017&#x2f;01&#x2f;11 14&#x3a;14&#x3a;13.722</modified_date>
  88 + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>
  89 + <is_key_private>N</is_key_private>
  90 + </info>
  91 + <notepads>
  92 + <notepad>
  93 + <note>&#x8fd9;&#x91cc;&#x6709;&#x4e9b;&#x95ee;&#x9898;&#xa;&#x5728;window2012&#x7684;&#x73af;&#x5883;&#x4e0b;&#xff0c;&#xa;MySql&#x6570;&#x636e;&#x5e93;&#x67e5;&#x8be2;&#x4e2d;&#x5982;&#x679c;&#x8fd4;&#x56de;&#x4e2d;&#x6587;&#x5185;&#x5bb9;&#x7684;&#x5b57;&#x6bb5;&#xff0c;&#x8fd9;&#x4e2a;&#x5185;&#x5bb9;&#x4e71;&#x7801;&#xa;&#x89e3;&#x51b3;&#x529e;&#x6cd5;&#xff0c;&#x5c31;&#x662f;&#x6570;&#x636e;&#x5e93;&#x67e5;&#x8be2;&#x5168;&#x90e8;&#x7f13;&#x5b58;&#xff0c;&#x5c31;&#x4e0d;&#x4e71;&#x7801;&#xa;linux&#x73af;&#x5883;&#x4e0b;&#x6ca1;&#x95ee;&#x9898;</note>
  94 + <xloc>81</xloc>
  95 + <yloc>172</yloc>
  96 + <width>333</width>
  97 + <heigth>90</heigth>
  98 + <fontname>YaHei Consolas Hybrid</fontname>
  99 + <fontsize>12</fontsize>
  100 + <fontbold>N</fontbold>
  101 + <fontitalic>N</fontitalic>
  102 + <fontcolorred>0</fontcolorred>
  103 + <fontcolorgreen>0</fontcolorgreen>
  104 + <fontcolorblue>0</fontcolorblue>
  105 + <backgroundcolorred>255</backgroundcolorred>
  106 + <backgroundcolorgreen>205</backgroundcolorgreen>
  107 + <backgroundcolorblue>112</backgroundcolorblue>
  108 + <bordercolorred>100</bordercolorred>
  109 + <bordercolorgreen>100</bordercolorgreen>
  110 + <bordercolorblue>100</bordercolorblue>
  111 + <drawshadow>Y</drawshadow>
  112 + </notepad>
  113 + </notepads>
  114 + <connection>
  115 + <name>bus_control_variable</name>
  116 + <server>&#x24;&#x7b;v_db_ip&#x7d;</server>
  117 + <type>MYSQL</type>
  118 + <access>Native</access>
  119 + <database>&#x24;&#x7b;v_db_dname&#x7d;</database>
  120 + <port>3306</port>
  121 + <username>&#x24;&#x7b;v_db_uname&#x7d;</username>
  122 + <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>
  123 + <servername/>
  124 + <data_tablespace/>
  125 + <index_tablespace/>
  126 + <attributes>
  127 + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute>
  128 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  129 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  130 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  131 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  132 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  133 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  134 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  135 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  136 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  137 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  138 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  139 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  140 + </attributes>
  141 + </connection>
  142 + <connection>
  143 + <name>bus_control_&#x516c;&#x53f8;_201</name>
  144 + <server>localhost</server>
  145 + <type>MYSQL</type>
  146 + <access>Native</access>
  147 + <database>control</database>
  148 + <port>3306</port>
  149 + <username>root</username>
  150 + <password>Encrypted </password>
  151 + <servername/>
  152 + <data_tablespace/>
  153 + <index_tablespace/>
  154 + <attributes>
  155 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  156 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  157 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  158 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  159 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  160 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  161 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  162 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  163 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  164 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  165 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  166 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  167 + </attributes>
  168 + </connection>
  169 + <connection>
  170 + <name>bus_control_&#x672c;&#x673a;</name>
  171 + <server>localhost</server>
  172 + <type>MYSQL</type>
  173 + <access>Native</access>
  174 + <database>control</database>
  175 + <port>3306</port>
  176 + <username>root</username>
  177 + <password>Encrypted </password>
  178 + <servername/>
  179 + <data_tablespace/>
  180 + <index_tablespace/>
  181 + <attributes>
  182 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  183 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  184 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  185 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  186 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  187 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  188 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  189 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  190 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  191 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  192 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  193 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  194 + </attributes>
  195 + </connection>
  196 + <connection>
  197 + <name>xlab_mysql_youle</name>
  198 + <server>101.231.124.8</server>
  199 + <type>MYSQL</type>
  200 + <access>Native</access>
  201 + <database>xlab_youle</database>
  202 + <port>45687</port>
  203 + <username>xlab-youle</username>
  204 + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>
  205 + <servername/>
  206 + <data_tablespace/>
  207 + <index_tablespace/>
  208 + <attributes>
  209 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  210 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  211 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  212 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  213 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  214 + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>
  215 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  216 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  217 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  218 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  219 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  220 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  221 + </attributes>
  222 + </connection>
  223 + <connection>
  224 + <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>
  225 + <server>localhost</server>
  226 + <type>MYSQL</type>
  227 + <access>Native</access>
  228 + <database>xlab_youle</database>
  229 + <port>3306</port>
  230 + <username>root</username>
  231 + <password>Encrypted </password>
  232 + <servername/>
  233 + <data_tablespace/>
  234 + <index_tablespace/>
  235 + <attributes>
  236 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  237 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  238 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  239 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  240 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  241 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  242 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  243 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  244 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  245 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  246 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  247 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  248 + </attributes>
  249 + </connection>
  250 + <connection>
  251 + <name>xlab_youle</name>
  252 + <server/>
  253 + <type>MYSQL</type>
  254 + <access>JNDI</access>
  255 + <database>xlab_youle</database>
  256 + <port>1521</port>
  257 + <username/>
  258 + <password>Encrypted </password>
  259 + <servername/>
  260 + <data_tablespace/>
  261 + <index_tablespace/>
  262 + <attributes>
  263 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  264 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  265 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  266 + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
  267 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  268 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  269 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  270 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  271 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  272 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  273 + </attributes>
  274 + </connection>
  275 + <order>
  276 + <hop> <from>&#x8f66;&#x8f86;&#x914d;&#x7f6e;&#xff08;&#x6ca1;&#x6709;&#x4f5c;&#x5e9f;&#xff09;</from><to>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  277 + <hop> <from>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</from><to>&#x8f66;&#x8f86;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  278 + <hop> <from>&#x8f66;&#x8f86;&#x67e5;&#x8be2;</from><to>&#x683c;&#x5f0f;&#x5316;&#x65e5;&#x671f;</to><enabled>Y</enabled> </hop>
  279 + <hop> <from>&#x683c;&#x5f0f;&#x5316;&#x65e5;&#x671f;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  280 + <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>
  281 + <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
  282 + </order>
  283 + <step>
  284 + <name>Excel&#x8f93;&#x51fa;</name>
  285 + <type>ExcelOutput</type>
  286 + <description/>
  287 + <distribute>Y</distribute>
  288 + <custom_distribution/>
  289 + <copies>1</copies>
  290 + <partitioning>
  291 + <method>none</method>
  292 + <schema_name/>
  293 + </partitioning>
  294 + <header>Y</header>
  295 + <footer>N</footer>
  296 + <encoding/>
  297 + <append>N</append>
  298 + <add_to_result_filenames>Y</add_to_result_filenames>
  299 + <file>
  300 + <name>&#x24;&#x7b;filepath&#x7d;</name>
  301 + <extention/>
  302 + <do_not_open_newfile_init>N</do_not_open_newfile_init>
  303 + <create_parent_folder>N</create_parent_folder>
  304 + <split>N</split>
  305 + <add_date>N</add_date>
  306 + <add_time>N</add_time>
  307 + <SpecifyFormat>N</SpecifyFormat>
  308 + <date_time_format>yyyyMMddHHmmss</date_time_format>
  309 + <sheetname>&#x5de5;&#x4f5c;&#x8868;1</sheetname>
  310 + <autosizecolums>N</autosizecolums>
  311 + <nullisblank>N</nullisblank>
  312 + <protect_sheet>N</protect_sheet>
  313 + <password>Encrypted </password>
  314 + <splitevery>0</splitevery>
  315 + <usetempfiles>N</usetempfiles>
  316 + <tempdirectory/>
  317 + </file>
  318 + <template>
  319 + <enabled>N</enabled>
  320 + <append>N</append>
  321 + <filename>template.xls</filename>
  322 + </template>
  323 + <fields>
  324 + <field>
  325 + <name>&#x7ebf;&#x8def;</name>
  326 + <type>String</type>
  327 + <format/>
  328 + </field>
  329 + <field>
  330 + <name>&#x5185;&#x90e8;&#x7f16;&#x7801;</name>
  331 + <type>String</type>
  332 + <format/>
  333 + </field>
  334 + <field>
  335 + <name>&#x542f;&#x7528;&#x65e5;&#x671f;</name>
  336 + <type>String</type>
  337 + <format/>
  338 + </field>
  339 + <field>
  340 + <name>&#x7ec8;&#x7ed3;&#x65e5;&#x671f;</name>
  341 + <type>String</type>
  342 + <format/>
  343 + </field>
  344 + <field>
  345 + <name>&#x505c;&#x8f66;&#x70b9;</name>
  346 + <type>String</type>
  347 + <format/>
  348 + </field>
  349 + </fields>
  350 + <custom>
  351 + <header_font_name>arial</header_font_name>
  352 + <header_font_size>10</header_font_size>
  353 + <header_font_bold>N</header_font_bold>
  354 + <header_font_italic>N</header_font_italic>
  355 + <header_font_underline>no</header_font_underline>
  356 + <header_font_orientation>horizontal</header_font_orientation>
  357 + <header_font_color>black</header_font_color>
  358 + <header_background_color>none</header_background_color>
  359 + <header_row_height>255</header_row_height>
  360 + <header_alignment>left</header_alignment>
  361 + <header_image/>
  362 + <row_font_name>arial</row_font_name>
  363 + <row_font_size>10</row_font_size>
  364 + <row_font_color>black</row_font_color>
  365 + <row_background_color>none</row_background_color>
  366 + </custom>
  367 + <cluster_schema/>
  368 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  369 + <xloc>596</xloc>
  370 + <yloc>265</yloc>
  371 + <draw>Y</draw>
  372 + </GUI>
  373 + </step>
  374 +
  375 + <step>
  376 + <name>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</name>
  377 + <type>SelectValues</type>
  378 + <description/>
  379 + <distribute>Y</distribute>
  380 + <custom_distribution/>
  381 + <copies>1</copies>
  382 + <partitioning>
  383 + <method>none</method>
  384 + <schema_name/>
  385 + </partitioning>
  386 + <fields> <field> <name>xlmc</name>
  387 + <rename>&#x7ebf;&#x8def;</rename>
  388 + <length>-2</length>
  389 + <precision>-2</precision>
  390 + </field> <field> <name>zbh</name>
  391 + <rename>&#x5185;&#x90e8;&#x7f16;&#x7801;</rename>
  392 + <length>-2</length>
  393 + <precision>-2</precision>
  394 + </field> <field> <name>qyrq</name>
  395 + <rename>&#x542f;&#x7528;&#x65e5;&#x671f;</rename>
  396 + <length>-2</length>
  397 + <precision>-2</precision>
  398 + </field> <field> <name>zzrq</name>
  399 + <rename>&#x7ec8;&#x7ed3;&#x65e5;&#x671f;</rename>
  400 + <length>-2</length>
  401 + <precision>-2</precision>
  402 + </field> <field> <name>tcd</name>
  403 + <rename>&#x505c;&#x8f66;&#x70b9;</rename>
  404 + <length>-2</length>
  405 + <precision>-2</precision>
  406 + </field> <select_unspecified>N</select_unspecified>
  407 + </fields> <cluster_schema/>
  408 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  409 + <xloc>595</xloc>
  410 + <yloc>167</yloc>
  411 + <draw>Y</draw>
  412 + </GUI>
  413 + </step>
  414 +
  415 + <step>
  416 + <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</name>
  417 + <type>SortRows</type>
  418 + <description/>
  419 + <distribute>Y</distribute>
  420 + <custom_distribution/>
  421 + <copies>1</copies>
  422 + <partitioning>
  423 + <method>none</method>
  424 + <schema_name/>
  425 + </partitioning>
  426 + <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>
  427 + <prefix>out</prefix>
  428 + <sort_size>1000000</sort_size>
  429 + <free_memory/>
  430 + <compress>N</compress>
  431 + <compress_variable/>
  432 + <unique_rows>N</unique_rows>
  433 + <fields>
  434 + <field>
  435 + <name>xlmc</name>
  436 + <ascending>Y</ascending>
  437 + <case_sensitive>N</case_sensitive>
  438 + <presorted>N</presorted>
  439 + </field>
  440 + <field>
  441 + <name>zbh</name>
  442 + <ascending>Y</ascending>
  443 + <case_sensitive>N</case_sensitive>
  444 + <presorted>N</presorted>
  445 + </field>
  446 + <field>
  447 + <name>qyrq</name>
  448 + <ascending>Y</ascending>
  449 + <case_sensitive>N</case_sensitive>
  450 + <presorted>N</presorted>
  451 + </field>
  452 + </fields>
  453 + <cluster_schema/>
  454 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  455 + <xloc>592</xloc>
  456 + <yloc>66</yloc>
  457 + <draw>Y</draw>
  458 + </GUI>
  459 + </step>
  460 +
  461 + <step>
  462 + <name>&#x683c;&#x5f0f;&#x5316;&#x65e5;&#x671f;</name>
  463 + <type>SelectValues</type>
  464 + <description/>
  465 + <distribute>Y</distribute>
  466 + <custom_distribution/>
  467 + <copies>1</copies>
  468 + <partitioning>
  469 + <method>none</method>
  470 + <schema_name/>
  471 + </partitioning>
  472 + <fields> <select_unspecified>N</select_unspecified>
  473 + <meta> <name>qyrq</name>
  474 + <rename>qyrq</rename>
  475 + <type>String</type>
  476 + <length>-2</length>
  477 + <precision>-2</precision>
  478 + <conversion_mask>yyyy-MM-dd</conversion_mask>
  479 + <date_format_lenient>false</date_format_lenient>
  480 + <date_format_locale/>
  481 + <date_format_timezone/>
  482 + <lenient_string_to_number>false</lenient_string_to_number>
  483 + <encoding/>
  484 + <decimal_symbol/>
  485 + <grouping_symbol/>
  486 + <currency_symbol/>
  487 + <storage_type/>
  488 + </meta> <meta> <name>zzrq</name>
  489 + <rename>zzrq</rename>
  490 + <type>String</type>
  491 + <length>-2</length>
  492 + <precision>-2</precision>
  493 + <conversion_mask>yyyy-MM-dd</conversion_mask>
  494 + <date_format_lenient>false</date_format_lenient>
  495 + <date_format_locale/>
  496 + <date_format_timezone/>
  497 + <lenient_string_to_number>false</lenient_string_to_number>
  498 + <encoding/>
  499 + <decimal_symbol/>
  500 + <grouping_symbol/>
  501 + <currency_symbol/>
  502 + <storage_type/>
  503 + </meta> </fields> <cluster_schema/>
  504 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  505 + <xloc>478</xloc>
  506 + <yloc>66</yloc>
  507 + <draw>Y</draw>
  508 + </GUI>
  509 + </step>
  510 +
  511 + <step>
  512 + <name>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</name>
  513 + <type>DBLookup</type>
  514 + <description/>
  515 + <distribute>Y</distribute>
  516 + <custom_distribution/>
  517 + <copies>1</copies>
  518 + <partitioning>
  519 + <method>none</method>
  520 + <schema_name/>
  521 + </partitioning>
  522 + <connection>bus_control_variable</connection>
  523 + <cache>Y</cache>
  524 + <cache_load_all>Y</cache_load_all>
  525 + <cache_size>0</cache_size>
  526 + <lookup>
  527 + <schema/>
  528 + <table>bsth_c_line</table>
  529 + <orderby/>
  530 + <fail_on_multiple>N</fail_on_multiple>
  531 + <eat_row_on_failure>N</eat_row_on_failure>
  532 + <key>
  533 + <name>xl</name>
  534 + <field>id</field>
  535 + <condition>&#x3d;</condition>
  536 + <name2/>
  537 + </key>
  538 + <value>
  539 + <name>name</name>
  540 + <rename>xlmc</rename>
  541 + <default/>
  542 + <type>String</type>
  543 + </value>
  544 + </lookup>
  545 + <cluster_schema/>
  546 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  547 + <xloc>248</xloc>
  548 + <yloc>67</yloc>
  549 + <draw>Y</draw>
  550 + </GUI>
  551 + </step>
  552 +
  553 + <step>
  554 + <name>&#x8f66;&#x8f86;&#x67e5;&#x8be2;</name>
  555 + <type>DBLookup</type>
  556 + <description/>
  557 + <distribute>Y</distribute>
  558 + <custom_distribution/>
  559 + <copies>1</copies>
  560 + <partitioning>
  561 + <method>none</method>
  562 + <schema_name/>
  563 + </partitioning>
  564 + <connection>bus_control_variable</connection>
  565 + <cache>N</cache>
  566 + <cache_load_all>N</cache_load_all>
  567 + <cache_size>0</cache_size>
  568 + <lookup>
  569 + <schema/>
  570 + <table>bsth_c_cars</table>
  571 + <orderby/>
  572 + <fail_on_multiple>N</fail_on_multiple>
  573 + <eat_row_on_failure>N</eat_row_on_failure>
  574 + <key>
  575 + <name>cl</name>
  576 + <field>id</field>
  577 + <condition>&#x3d;</condition>
  578 + <name2/>
  579 + </key>
  580 + <value>
  581 + <name>inside_code</name>
  582 + <rename>zbh</rename>
  583 + <default/>
  584 + <type>String</type>
  585 + </value>
  586 + </lookup>
  587 + <cluster_schema/>
  588 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  589 + <xloc>361</xloc>
  590 + <yloc>67</yloc>
  591 + <draw>Y</draw>
  592 + </GUI>
  593 + </step>
  594 +
  595 + <step>
  596 + <name>&#x8f66;&#x8f86;&#x914d;&#x7f6e;&#xff08;&#x6ca1;&#x6709;&#x4f5c;&#x5e9f;&#xff09;</name>
  597 + <type>TableInput</type>
  598 + <description/>
  599 + <distribute>Y</distribute>
  600 + <custom_distribution/>
  601 + <copies>1</copies>
  602 + <partitioning>
  603 + <method>none</method>
  604 + <schema_name/>
  605 + </partitioning>
  606 + <connection>bus_control_variable</connection>
  607 + <sql>select &#x2a; from bsth_c_s_ccinfo where is_cancel &#x3d; 0 and xl &#x3d; &#x24;&#x7b;xlid&#x7d;</sql>
  608 + <limit>0</limit>
  609 + <lookup/>
  610 + <execute_each_row>N</execute_each_row>
  611 + <variables_active>Y</variables_active>
  612 + <lazy_conversion_active>N</lazy_conversion_active>
  613 + <cluster_schema/>
  614 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  615 + <xloc>106</xloc>
  616 + <yloc>68</yloc>
  617 + <draw>Y</draw>
  618 + </GUI>
  619 + </step>
  620 +
  621 + <step_error_handling>
  622 + </step_error_handling>
  623 + <slave-step-copy-partition-distribution>
  624 +</slave-step-copy-partition-distribution>
  625 + <slave_transformation>N</slave_transformation>
  626 +
  627 +</transformation>
src/main/resources/datatools/ktrs/employeesConfigDataOutput.ktr
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<transformation>  
3 - <info>  
4 - <name>&#x4eba;&#x5458;&#x914d;&#x7f6e;&#x4fe1;&#x606f;&#x5bfc;&#x51fa;</name>  
5 - <description/>  
6 - <extended_description/>  
7 - <trans_version/>  
8 - <trans_type>Normal</trans_type>  
9 - <trans_status>0</trans_status>  
10 - <directory>&#x2f;</directory>  
11 - <parameters>  
12 - <parameter>  
13 - <name>filepath</name>  
14 - <default_value/>  
15 - <description>excel&#x6587;&#x4ef6;&#x8def;&#x5f84;</description>  
16 - </parameter>  
17 - <parameter>  
18 - <name>xlid</name>  
19 - <default_value/>  
20 - <description>&#x7ebf;&#x8def;id</description>  
21 - </parameter>  
22 - </parameters>  
23 - <log>  
24 -<trans-log-table><connection/>  
25 -<schema/>  
26 -<table/>  
27 -<size_limit_lines/>  
28 -<interval/>  
29 -<timeout_days/>  
30 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>  
31 -<perf-log-table><connection/>  
32 -<schema/>  
33 -<table/>  
34 -<interval/>  
35 -<timeout_days/>  
36 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>  
37 -<channel-log-table><connection/>  
38 -<schema/>  
39 -<table/>  
40 -<timeout_days/>  
41 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>  
42 -<step-log-table><connection/>  
43 -<schema/>  
44 -<table/>  
45 -<timeout_days/>  
46 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>  
47 -<metrics-log-table><connection/>  
48 -<schema/>  
49 -<table/>  
50 -<timeout_days/>  
51 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>  
52 - </log>  
53 - <maxdate>  
54 - <connection/>  
55 - <table/>  
56 - <field/>  
57 - <offset>0.0</offset>  
58 - <maxdiff>0.0</maxdiff>  
59 - </maxdate>  
60 - <size_rowset>10000</size_rowset>  
61 - <sleep_time_empty>50</sleep_time_empty>  
62 - <sleep_time_full>50</sleep_time_full>  
63 - <unique_connections>N</unique_connections>  
64 - <feedback_shown>Y</feedback_shown>  
65 - <feedback_size>50000</feedback_size>  
66 - <using_thread_priorities>Y</using_thread_priorities>  
67 - <shared_objects_file/>  
68 - <capture_step_performance>N</capture_step_performance>  
69 - <step_performance_capturing_delay>1000</step_performance_capturing_delay>  
70 - <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>  
71 - <dependencies>  
72 - </dependencies>  
73 - <partitionschemas>  
74 - </partitionschemas>  
75 - <slaveservers>  
76 - </slaveservers>  
77 - <clusterschemas>  
78 - </clusterschemas>  
79 - <created_user>-</created_user>  
80 - <created_date>2017&#x2f;01&#x2f;11 15&#x3a;36&#x3a;10.101</created_date>  
81 - <modified_user>-</modified_user>  
82 - <modified_date>2017&#x2f;01&#x2f;11 15&#x3a;36&#x3a;10.101</modified_date>  
83 - <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>  
84 - <is_key_private>N</is_key_private>  
85 - </info>  
86 - <notepads>  
87 - <notepad>  
88 - <note>&#x8fd9;&#x91cc;&#x6709;&#x4e9b;&#x95ee;&#x9898;&#xa;&#x5728;window2012&#x7684;&#x73af;&#x5883;&#x4e0b;&#xff0c;&#xa;MySql&#x6570;&#x636e;&#x5e93;&#x67e5;&#x8be2;&#x4e2d;&#x5982;&#x679c;&#x8fd4;&#x56de;&#x4e2d;&#x6587;&#x5185;&#x5bb9;&#x7684;&#x5b57;&#x6bb5;&#xff0c;&#x8fd9;&#x4e2a;&#x5185;&#x5bb9;&#x4e71;&#x7801;&#xa;&#x89e3;&#x51b3;&#x529e;&#x6cd5;&#xff0c;&#x5c31;&#x662f;&#x6570;&#x636e;&#x5e93;&#x67e5;&#x8be2;&#x5168;&#x90e8;&#x7f13;&#x5b58;&#xff0c;&#x5c31;&#x4e0d;&#x4e71;&#x7801;&#xa;linux&#x73af;&#x5883;&#x4e0b;&#x6ca1;&#x95ee;&#x9898;</note>  
89 - <xloc>66</xloc>  
90 - <yloc>151</yloc>  
91 - <width>333</width>  
92 - <heigth>90</heigth>  
93 - <fontname>YaHei Consolas Hybrid</fontname>  
94 - <fontsize>12</fontsize>  
95 - <fontbold>N</fontbold>  
96 - <fontitalic>N</fontitalic>  
97 - <fontcolorred>0</fontcolorred>  
98 - <fontcolorgreen>0</fontcolorgreen>  
99 - <fontcolorblue>0</fontcolorblue>  
100 - <backgroundcolorred>255</backgroundcolorred>  
101 - <backgroundcolorgreen>205</backgroundcolorgreen>  
102 - <backgroundcolorblue>112</backgroundcolorblue>  
103 - <bordercolorred>100</bordercolorred>  
104 - <bordercolorgreen>100</bordercolorgreen>  
105 - <bordercolorblue>100</bordercolorblue>  
106 - <drawshadow>Y</drawshadow>  
107 - </notepad>  
108 - </notepads>  
109 - <connection>  
110 - <name>bus_control_variable</name>  
111 - <server>&#x24;&#x7b;v_db_ip&#x7d;</server>  
112 - <type>MYSQL</type>  
113 - <access>Native</access>  
114 - <database>&#x24;&#x7b;v_db_dname&#x7d;</database>  
115 - <port>3306</port>  
116 - <username>&#x24;&#x7b;v_db_uname&#x7d;</username>  
117 - <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>  
118 - <servername/>  
119 - <data_tablespace/>  
120 - <index_tablespace/>  
121 - <attributes>  
122 - <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute>  
123 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
124 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
125 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
126 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
127 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
128 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
129 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
130 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
131 - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>  
132 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
133 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
134 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
135 - </attributes>  
136 - </connection>  
137 - <connection>  
138 - <name>bus_control_&#x516c;&#x53f8;_201</name>  
139 - <server>localhost</server>  
140 - <type>MYSQL</type>  
141 - <access>Native</access>  
142 - <database>control</database>  
143 - <port>3306</port>  
144 - <username>root</username>  
145 - <password>Encrypted </password>  
146 - <servername/>  
147 - <data_tablespace/>  
148 - <index_tablespace/>  
149 - <attributes>  
150 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
151 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
152 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
153 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
154 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
155 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
156 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
157 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
158 - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>  
159 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
160 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
161 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
162 - </attributes>  
163 - </connection>  
164 - <connection>  
165 - <name>bus_control_&#x672c;&#x673a;</name>  
166 - <server>localhost</server>  
167 - <type>MYSQL</type>  
168 - <access>Native</access>  
169 - <database>control</database>  
170 - <port>3306</port>  
171 - <username>root</username>  
172 - <password>Encrypted </password>  
173 - <servername/>  
174 - <data_tablespace/>  
175 - <index_tablespace/>  
176 - <attributes>  
177 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
178 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
179 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
180 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
181 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
182 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
183 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
184 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
185 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
186 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
187 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
188 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
189 - </attributes>  
190 - </connection>  
191 - <connection>  
192 - <name>xlab_mysql_youle</name>  
193 - <server>101.231.124.8</server>  
194 - <type>MYSQL</type>  
195 - <access>Native</access>  
196 - <database>xlab_youle</database>  
197 - <port>45687</port>  
198 - <username>xlab-youle</username>  
199 - <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>  
200 - <servername/>  
201 - <data_tablespace/>  
202 - <index_tablespace/>  
203 - <attributes>  
204 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
205 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
206 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
207 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
208 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
209 - <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>  
210 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
211 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
212 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
213 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>  
214 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>  
215 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
216 - </attributes>  
217 - </connection>  
218 - <connection>  
219 - <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>  
220 - <server>localhost</server>  
221 - <type>MYSQL</type>  
222 - <access>Native</access>  
223 - <database>xlab_youle</database>  
224 - <port>3306</port>  
225 - <username>root</username>  
226 - <password>Encrypted </password>  
227 - <servername/>  
228 - <data_tablespace/>  
229 - <index_tablespace/>  
230 - <attributes>  
231 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
232 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
233 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
234 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
235 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
236 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
237 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
238 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
239 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
240 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>  
241 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>  
242 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
243 - </attributes>  
244 - </connection>  
245 - <connection>  
246 - <name>xlab_youle</name>  
247 - <server/>  
248 - <type>MYSQL</type>  
249 - <access>JNDI</access>  
250 - <database>xlab_youle</database>  
251 - <port>1521</port>  
252 - <username/>  
253 - <password>Encrypted </password>  
254 - <servername/>  
255 - <data_tablespace/>  
256 - <index_tablespace/>  
257 - <attributes>  
258 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
259 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
260 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
261 - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>  
262 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
263 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
264 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
265 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
266 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
267 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
268 - </attributes>  
269 - </connection>  
270 - <order>  
271 - <hop> <from>&#x4eba;&#x5458;&#x914d;&#x7f6e;&#xff08;&#x6ca1;&#x6709;&#x4f5c;&#x5e9f;&#xff09;</from><to>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>  
272 - <hop> <from>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</from><to>&#x9a7e;&#x9a76;&#x5458;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>  
273 - <hop> <from>&#x9a7e;&#x9a76;&#x5458;&#x67e5;&#x8be2;</from><to>&#x552e;&#x7968;&#x5458;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>  
274 - <hop> <from>&#x552e;&#x7968;&#x5458;&#x67e5;&#x8be2;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>  
275 - <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>  
276 - <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>  
277 - </order>  
278 - <step>  
279 - <name>Excel&#x8f93;&#x51fa;</name>  
280 - <type>ExcelOutput</type>  
281 - <description/>  
282 - <distribute>Y</distribute>  
283 - <custom_distribution/>  
284 - <copies>1</copies>  
285 - <partitioning>  
286 - <method>none</method>  
287 - <schema_name/>  
288 - </partitioning>  
289 - <header>Y</header>  
290 - <footer>N</footer>  
291 - <encoding/>  
292 - <append>N</append>  
293 - <add_to_result_filenames>Y</add_to_result_filenames>  
294 - <file>  
295 - <name>&#x24;&#x7b;filepath&#x7d;</name>  
296 - <extention/>  
297 - <do_not_open_newfile_init>N</do_not_open_newfile_init>  
298 - <create_parent_folder>N</create_parent_folder>  
299 - <split>N</split>  
300 - <add_date>N</add_date>  
301 - <add_time>N</add_time>  
302 - <SpecifyFormat>N</SpecifyFormat>  
303 - <date_time_format>yyyyMMddHHmmss</date_time_format>  
304 - <sheetname>&#x5de5;&#x4f5c;&#x8868;1</sheetname>  
305 - <autosizecolums>N</autosizecolums>  
306 - <nullisblank>N</nullisblank>  
307 - <protect_sheet>N</protect_sheet>  
308 - <password>Encrypted </password>  
309 - <splitevery>0</splitevery>  
310 - <usetempfiles>N</usetempfiles>  
311 - <tempdirectory/>  
312 - </file>  
313 - <template>  
314 - <enabled>N</enabled>  
315 - <append>N</append>  
316 - <filename>template.xls</filename>  
317 - </template>  
318 - <fields>  
319 - <field>  
320 - <name>&#x7ebf;&#x8def;</name>  
321 - <type>String</type>  
322 - <format/>  
323 - </field>  
324 - <field>  
325 - <name>&#x642d;&#x73ed;&#x7f16;&#x7801;</name>  
326 - <type>String</type>  
327 - <format/>  
328 - </field>  
329 - <field>  
330 - <name>&#x9a7e;&#x9a76;&#x5458;&#x5de5;&#x53f7;</name>  
331 - <type>String</type>  
332 - <format/>  
333 - </field>  
334 - <field>  
335 - <name>&#x9a7e;&#x9a76;&#x5458;</name>  
336 - <type>String</type>  
337 - <format/>  
338 - </field>  
339 - <field>  
340 - <name>&#x552e;&#x7968;&#x5458;&#x5de5;&#x53f7;</name>  
341 - <type>String</type>  
342 - <format/>  
343 - </field>  
344 - <field>  
345 - <name>&#x552e;&#x7968;&#x5458;</name>  
346 - <type>String</type>  
347 - <format/>  
348 - </field>  
349 - </fields>  
350 - <custom>  
351 - <header_font_name>arial</header_font_name>  
352 - <header_font_size>10</header_font_size>  
353 - <header_font_bold>N</header_font_bold>  
354 - <header_font_italic>N</header_font_italic>  
355 - <header_font_underline>no</header_font_underline>  
356 - <header_font_orientation>horizontal</header_font_orientation>  
357 - <header_font_color>black</header_font_color>  
358 - <header_background_color>none</header_background_color>  
359 - <header_row_height>255</header_row_height>  
360 - <header_alignment>left</header_alignment>  
361 - <header_image/>  
362 - <row_font_name>arial</row_font_name>  
363 - <row_font_size>10</row_font_size>  
364 - <row_font_color>black</row_font_color>  
365 - <row_background_color>none</row_background_color>  
366 - </custom>  
367 - <cluster_schema/>  
368 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
369 - <xloc>696</xloc>  
370 - <yloc>257</yloc>  
371 - <draw>Y</draw>  
372 - </GUI>  
373 - </step>  
374 -  
375 - <step>  
376 - <name>&#x4eba;&#x5458;&#x914d;&#x7f6e;&#xff08;&#x6ca1;&#x6709;&#x4f5c;&#x5e9f;&#xff09;</name>  
377 - <type>TableInput</type>  
378 - <description/>  
379 - <distribute>Y</distribute>  
380 - <custom_distribution/>  
381 - <copies>1</copies>  
382 - <partitioning>  
383 - <method>none</method>  
384 - <schema_name/>  
385 - </partitioning>  
386 - <connection>bus_control_variable</connection>  
387 - <sql>select &#x2a; from bsth_c_s_ecinfo where is_cancel &#x3d; 0 and xl &#x3d; &#x24;&#x7b;xlid&#x7d;</sql>  
388 - <limit>0</limit>  
389 - <lookup/>  
390 - <execute_each_row>N</execute_each_row>  
391 - <variables_active>Y</variables_active>  
392 - <lazy_conversion_active>N</lazy_conversion_active>  
393 - <cluster_schema/>  
394 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
395 - <xloc>90</xloc>  
396 - <yloc>59</yloc>  
397 - <draw>Y</draw>  
398 - </GUI>  
399 - </step>  
400 -  
401 - <step>  
402 - <name>&#x552e;&#x7968;&#x5458;&#x67e5;&#x8be2;</name>  
403 - <type>DBJoin</type>  
404 - <description/>  
405 - <distribute>Y</distribute>  
406 - <custom_distribution/>  
407 - <copies>1</copies>  
408 - <partitioning>  
409 - <method>none</method>  
410 - <schema_name/>  
411 - </partitioning>  
412 - <connection>bus_control_variable</connection>  
413 - <rowlimit>1</rowlimit>  
414 - <sql>select job_code as scode, personnel_name as sname from bsth_c_personnel&#xa;where id &#x3d; &#x3f;</sql>  
415 - <outer_join>Y</outer_join>  
416 - <replace_vars>N</replace_vars>  
417 - <parameter>  
418 - <field>  
419 - <name>spy</name>  
420 - <type>Integer</type>  
421 - </field>  
422 - </parameter>  
423 - <cluster_schema/>  
424 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
425 - <xloc>491</xloc>  
426 - <yloc>60</yloc>  
427 - <draw>Y</draw>  
428 - </GUI>  
429 - </step>  
430 -  
431 - <step>  
432 - <name>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</name>  
433 - <type>SelectValues</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 - <fields> <field> <name>xlmc</name>  
443 - <rename>&#x7ebf;&#x8def;</rename>  
444 - <length>-2</length>  
445 - <precision>-2</precision>  
446 - </field> <field> <name>dbbm</name>  
447 - <rename>&#x642d;&#x73ed;&#x7f16;&#x7801;</rename>  
448 - <length>-2</length>  
449 - <precision>-2</precision>  
450 - </field> <field> <name>jcode</name>  
451 - <rename>&#x9a7e;&#x9a76;&#x5458;&#x5de5;&#x53f7;</rename>  
452 - <length>-2</length>  
453 - <precision>-2</precision>  
454 - </field> <field> <name>jname</name>  
455 - <rename>&#x9a7e;&#x9a76;&#x5458;</rename>  
456 - <length>-2</length>  
457 - <precision>-2</precision>  
458 - </field> <field> <name>scode</name>  
459 - <rename>&#x552e;&#x7968;&#x5458;&#x5de5;&#x53f7;</rename>  
460 - <length>-2</length>  
461 - <precision>-2</precision>  
462 - </field> <field> <name>sname</name>  
463 - <rename>&#x552e;&#x7968;&#x5458;</rename>  
464 - <length>-2</length>  
465 - <precision>-2</precision>  
466 - </field> <select_unspecified>N</select_unspecified>  
467 - </fields> <cluster_schema/>  
468 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
469 - <xloc>492</xloc>  
470 - <yloc>164</yloc>  
471 - <draw>Y</draw>  
472 - </GUI>  
473 - </step>  
474 -  
475 - <step>  
476 - <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</name>  
477 - <type>SortRows</type>  
478 - <description/>  
479 - <distribute>Y</distribute>  
480 - <custom_distribution/>  
481 - <copies>1</copies>  
482 - <partitioning>  
483 - <method>none</method>  
484 - <schema_name/>  
485 - </partitioning>  
486 - <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>  
487 - <prefix>out</prefix>  
488 - <sort_size>1000000</sort_size>  
489 - <free_memory/>  
490 - <compress>N</compress>  
491 - <compress_variable/>  
492 - <unique_rows>N</unique_rows>  
493 - <fields>  
494 - <field>  
495 - <name>&#x7ebf;&#x8def;</name>  
496 - <ascending>Y</ascending>  
497 - <case_sensitive>N</case_sensitive>  
498 - <presorted>N</presorted>  
499 - </field>  
500 - <field>  
501 - <name>&#x642d;&#x73ed;&#x7f16;&#x7801;</name>  
502 - <ascending>Y</ascending>  
503 - <case_sensitive>N</case_sensitive>  
504 - <presorted>N</presorted>  
505 - </field>  
506 - </fields>  
507 - <cluster_schema/>  
508 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
509 - <xloc>692</xloc>  
510 - <yloc>164</yloc>  
511 - <draw>Y</draw>  
512 - </GUI>  
513 - </step>  
514 -  
515 - <step>  
516 - <name>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</name>  
517 - <type>DBLookup</type>  
518 - <description/>  
519 - <distribute>Y</distribute>  
520 - <custom_distribution/>  
521 - <copies>1</copies>  
522 - <partitioning>  
523 - <method>none</method>  
524 - <schema_name/>  
525 - </partitioning>  
526 - <connection>bus_control_variable</connection>  
527 - <cache>Y</cache>  
528 - <cache_load_all>Y</cache_load_all>  
529 - <cache_size>0</cache_size>  
530 - <lookup>  
531 - <schema/>  
532 - <table>bsth_c_line</table>  
533 - <orderby/>  
534 - <fail_on_multiple>N</fail_on_multiple>  
535 - <eat_row_on_failure>N</eat_row_on_failure>  
536 - <key>  
537 - <name>xl</name>  
538 - <field>id</field>  
539 - <condition>&#x3d;</condition>  
540 - <name2/>  
541 - </key>  
542 - <value>  
543 - <name>name</name>  
544 - <rename>xlmc</rename>  
545 - <default/>  
546 - <type>String</type>  
547 - </value>  
548 - </lookup>  
549 - <cluster_schema/>  
550 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
551 - <xloc>227</xloc>  
552 - <yloc>59</yloc>  
553 - <draw>Y</draw>  
554 - </GUI>  
555 - </step>  
556 -  
557 - <step>  
558 - <name>&#x9a7e;&#x9a76;&#x5458;&#x67e5;&#x8be2;</name>  
559 - <type>DBJoin</type>  
560 - <description/>  
561 - <distribute>Y</distribute>  
562 - <custom_distribution/>  
563 - <copies>1</copies>  
564 - <partitioning>  
565 - <method>none</method>  
566 - <schema_name/>  
567 - </partitioning>  
568 - <connection>bus_control_variable</connection>  
569 - <rowlimit>1</rowlimit>  
570 - <sql>select job_code as jcode, personnel_name as jname from bsth_c_personnel&#xa;where id &#x3d; &#x3f;</sql>  
571 - <outer_join>Y</outer_join>  
572 - <replace_vars>N</replace_vars>  
573 - <parameter>  
574 - <field>  
575 - <name>jsy</name>  
576 - <type>Integer</type>  
577 - </field>  
578 - </parameter>  
579 - <cluster_schema/>  
580 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
581 - <xloc>366</xloc>  
582 - <yloc>60</yloc>  
583 - <draw>Y</draw>  
584 - </GUI>  
585 - </step>  
586 -  
587 - <step_error_handling>  
588 - </step_error_handling>  
589 - <slave-step-copy-partition-distribution>  
590 -</slave-step-copy-partition-distribution>  
591 - <slave_transformation>N</slave_transformation>  
592 -  
593 -</transformation> 1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<transformation>
  3 + <info>
  4 + <name>&#x4eba;&#x5458;&#x914d;&#x7f6e;&#x4fe1;&#x606f;&#x5bfc;&#x51fa;</name>
  5 + <description/>
  6 + <extended_description/>
  7 + <trans_version/>
  8 + <trans_type>Normal</trans_type>
  9 + <trans_status>0</trans_status>
  10 + <directory>&#x2f;</directory>
  11 + <parameters>
  12 + <parameter>
  13 + <name>filepath</name>
  14 + <default_value/>
  15 + <description>excel&#x6587;&#x4ef6;&#x8def;&#x5f84;</description>
  16 + </parameter>
  17 + <parameter>
  18 + <name>xlid</name>
  19 + <default_value/>
  20 + <description>&#x7ebf;&#x8def;id</description>
  21 + </parameter>
  22 + </parameters>
  23 + <log>
  24 +<trans-log-table><connection/>
  25 +<schema/>
  26 +<table/>
  27 +<size_limit_lines/>
  28 +<interval/>
  29 +<timeout_days/>
  30 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>
  31 +<perf-log-table><connection/>
  32 +<schema/>
  33 +<table/>
  34 +<interval/>
  35 +<timeout_days/>
  36 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>
  37 +<channel-log-table><connection/>
  38 +<schema/>
  39 +<table/>
  40 +<timeout_days/>
  41 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>
  42 +<step-log-table><connection/>
  43 +<schema/>
  44 +<table/>
  45 +<timeout_days/>
  46 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>
  47 +<metrics-log-table><connection/>
  48 +<schema/>
  49 +<table/>
  50 +<timeout_days/>
  51 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>
  52 + </log>
  53 + <maxdate>
  54 + <connection/>
  55 + <table/>
  56 + <field/>
  57 + <offset>0.0</offset>
  58 + <maxdiff>0.0</maxdiff>
  59 + </maxdate>
  60 + <size_rowset>10000</size_rowset>
  61 + <sleep_time_empty>50</sleep_time_empty>
  62 + <sleep_time_full>50</sleep_time_full>
  63 + <unique_connections>N</unique_connections>
  64 + <feedback_shown>Y</feedback_shown>
  65 + <feedback_size>50000</feedback_size>
  66 + <using_thread_priorities>Y</using_thread_priorities>
  67 + <shared_objects_file/>
  68 + <capture_step_performance>N</capture_step_performance>
  69 + <step_performance_capturing_delay>1000</step_performance_capturing_delay>
  70 + <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
  71 + <dependencies>
  72 + </dependencies>
  73 + <partitionschemas>
  74 + </partitionschemas>
  75 + <slaveservers>
  76 + </slaveservers>
  77 + <clusterschemas>
  78 + </clusterschemas>
  79 + <created_user>-</created_user>
  80 + <created_date>2017&#x2f;01&#x2f;11 15&#x3a;36&#x3a;10.101</created_date>
  81 + <modified_user>-</modified_user>
  82 + <modified_date>2017&#x2f;01&#x2f;11 15&#x3a;36&#x3a;10.101</modified_date>
  83 + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>
  84 + <is_key_private>N</is_key_private>
  85 + </info>
  86 + <notepads>
  87 + <notepad>
  88 + <note>&#x8fd9;&#x91cc;&#x6709;&#x4e9b;&#x95ee;&#x9898;&#xa;&#x5728;window2012&#x7684;&#x73af;&#x5883;&#x4e0b;&#xff0c;&#xa;MySql&#x6570;&#x636e;&#x5e93;&#x67e5;&#x8be2;&#x4e2d;&#x5982;&#x679c;&#x8fd4;&#x56de;&#x4e2d;&#x6587;&#x5185;&#x5bb9;&#x7684;&#x5b57;&#x6bb5;&#xff0c;&#x8fd9;&#x4e2a;&#x5185;&#x5bb9;&#x4e71;&#x7801;&#xa;&#x89e3;&#x51b3;&#x529e;&#x6cd5;&#xff0c;&#x5c31;&#x662f;&#x6570;&#x636e;&#x5e93;&#x67e5;&#x8be2;&#x5168;&#x90e8;&#x7f13;&#x5b58;&#xff0c;&#x5c31;&#x4e0d;&#x4e71;&#x7801;&#xa;linux&#x73af;&#x5883;&#x4e0b;&#x6ca1;&#x95ee;&#x9898;</note>
  89 + <xloc>66</xloc>
  90 + <yloc>151</yloc>
  91 + <width>333</width>
  92 + <heigth>90</heigth>
  93 + <fontname>YaHei Consolas Hybrid</fontname>
  94 + <fontsize>12</fontsize>
  95 + <fontbold>N</fontbold>
  96 + <fontitalic>N</fontitalic>
  97 + <fontcolorred>0</fontcolorred>
  98 + <fontcolorgreen>0</fontcolorgreen>
  99 + <fontcolorblue>0</fontcolorblue>
  100 + <backgroundcolorred>255</backgroundcolorred>
  101 + <backgroundcolorgreen>205</backgroundcolorgreen>
  102 + <backgroundcolorblue>112</backgroundcolorblue>
  103 + <bordercolorred>100</bordercolorred>
  104 + <bordercolorgreen>100</bordercolorgreen>
  105 + <bordercolorblue>100</bordercolorblue>
  106 + <drawshadow>Y</drawshadow>
  107 + </notepad>
  108 + </notepads>
  109 + <connection>
  110 + <name>bus_control_variable</name>
  111 + <server>&#x24;&#x7b;v_db_ip&#x7d;</server>
  112 + <type>MYSQL</type>
  113 + <access>Native</access>
  114 + <database>&#x24;&#x7b;v_db_dname&#x7d;</database>
  115 + <port>3306</port>
  116 + <username>&#x24;&#x7b;v_db_uname&#x7d;</username>
  117 + <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>
  118 + <servername/>
  119 + <data_tablespace/>
  120 + <index_tablespace/>
  121 + <attributes>
  122 + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute>
  123 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  124 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  125 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  126 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  127 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  128 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  129 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  130 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  131 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  132 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  133 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  134 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  135 + </attributes>
  136 + </connection>
  137 + <connection>
  138 + <name>bus_control_&#x516c;&#x53f8;_201</name>
  139 + <server>localhost</server>
  140 + <type>MYSQL</type>
  141 + <access>Native</access>
  142 + <database>control</database>
  143 + <port>3306</port>
  144 + <username>root</username>
  145 + <password>Encrypted </password>
  146 + <servername/>
  147 + <data_tablespace/>
  148 + <index_tablespace/>
  149 + <attributes>
  150 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  151 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  152 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  153 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  154 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  155 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  156 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  157 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  158 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  159 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  160 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  161 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  162 + </attributes>
  163 + </connection>
  164 + <connection>
  165 + <name>bus_control_&#x672c;&#x673a;</name>
  166 + <server>localhost</server>
  167 + <type>MYSQL</type>
  168 + <access>Native</access>
  169 + <database>control</database>
  170 + <port>3306</port>
  171 + <username>root</username>
  172 + <password>Encrypted </password>
  173 + <servername/>
  174 + <data_tablespace/>
  175 + <index_tablespace/>
  176 + <attributes>
  177 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  178 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  179 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  180 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  181 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  182 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  183 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  184 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  185 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  186 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  187 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  188 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  189 + </attributes>
  190 + </connection>
  191 + <connection>
  192 + <name>xlab_mysql_youle</name>
  193 + <server>101.231.124.8</server>
  194 + <type>MYSQL</type>
  195 + <access>Native</access>
  196 + <database>xlab_youle</database>
  197 + <port>45687</port>
  198 + <username>xlab-youle</username>
  199 + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>
  200 + <servername/>
  201 + <data_tablespace/>
  202 + <index_tablespace/>
  203 + <attributes>
  204 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  205 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  206 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  207 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  208 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  209 + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>
  210 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  211 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  212 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  213 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  214 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  215 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  216 + </attributes>
  217 + </connection>
  218 + <connection>
  219 + <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>
  220 + <server>localhost</server>
  221 + <type>MYSQL</type>
  222 + <access>Native</access>
  223 + <database>xlab_youle</database>
  224 + <port>3306</port>
  225 + <username>root</username>
  226 + <password>Encrypted </password>
  227 + <servername/>
  228 + <data_tablespace/>
  229 + <index_tablespace/>
  230 + <attributes>
  231 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  232 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  233 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  234 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  235 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  236 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  237 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  238 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  239 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  240 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  241 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  242 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  243 + </attributes>
  244 + </connection>
  245 + <connection>
  246 + <name>xlab_youle</name>
  247 + <server/>
  248 + <type>MYSQL</type>
  249 + <access>JNDI</access>
  250 + <database>xlab_youle</database>
  251 + <port>1521</port>
  252 + <username/>
  253 + <password>Encrypted </password>
  254 + <servername/>
  255 + <data_tablespace/>
  256 + <index_tablespace/>
  257 + <attributes>
  258 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  259 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  260 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  261 + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
  262 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  263 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  264 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  265 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  266 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  267 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  268 + </attributes>
  269 + </connection>
  270 + <order>
  271 + <hop> <from>&#x4eba;&#x5458;&#x914d;&#x7f6e;&#xff08;&#x6ca1;&#x6709;&#x4f5c;&#x5e9f;&#xff09;</from><to>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  272 + <hop> <from>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</from><to>&#x9a7e;&#x9a76;&#x5458;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  273 + <hop> <from>&#x9a7e;&#x9a76;&#x5458;&#x67e5;&#x8be2;</from><to>&#x552e;&#x7968;&#x5458;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  274 + <hop> <from>&#x552e;&#x7968;&#x5458;&#x67e5;&#x8be2;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>
  275 + <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  276 + <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
  277 + </order>
  278 + <step>
  279 + <name>Excel&#x8f93;&#x51fa;</name>
  280 + <type>ExcelOutput</type>
  281 + <description/>
  282 + <distribute>Y</distribute>
  283 + <custom_distribution/>
  284 + <copies>1</copies>
  285 + <partitioning>
  286 + <method>none</method>
  287 + <schema_name/>
  288 + </partitioning>
  289 + <header>Y</header>
  290 + <footer>N</footer>
  291 + <encoding/>
  292 + <append>N</append>
  293 + <add_to_result_filenames>Y</add_to_result_filenames>
  294 + <file>
  295 + <name>&#x24;&#x7b;filepath&#x7d;</name>
  296 + <extention/>
  297 + <do_not_open_newfile_init>N</do_not_open_newfile_init>
  298 + <create_parent_folder>N</create_parent_folder>
  299 + <split>N</split>
  300 + <add_date>N</add_date>
  301 + <add_time>N</add_time>
  302 + <SpecifyFormat>N</SpecifyFormat>
  303 + <date_time_format>yyyyMMddHHmmss</date_time_format>
  304 + <sheetname>&#x5de5;&#x4f5c;&#x8868;1</sheetname>
  305 + <autosizecolums>N</autosizecolums>
  306 + <nullisblank>N</nullisblank>
  307 + <protect_sheet>N</protect_sheet>
  308 + <password>Encrypted </password>
  309 + <splitevery>0</splitevery>
  310 + <usetempfiles>N</usetempfiles>
  311 + <tempdirectory/>
  312 + </file>
  313 + <template>
  314 + <enabled>N</enabled>
  315 + <append>N</append>
  316 + <filename>template.xls</filename>
  317 + </template>
  318 + <fields>
  319 + <field>
  320 + <name>&#x7ebf;&#x8def;</name>
  321 + <type>String</type>
  322 + <format/>
  323 + </field>
  324 + <field>
  325 + <name>&#x642d;&#x73ed;&#x7f16;&#x7801;</name>
  326 + <type>String</type>
  327 + <format/>
  328 + </field>
  329 + <field>
  330 + <name>&#x9a7e;&#x9a76;&#x5458;&#x5de5;&#x53f7;</name>
  331 + <type>String</type>
  332 + <format/>
  333 + </field>
  334 + <field>
  335 + <name>&#x9a7e;&#x9a76;&#x5458;</name>
  336 + <type>String</type>
  337 + <format/>
  338 + </field>
  339 + <field>
  340 + <name>&#x552e;&#x7968;&#x5458;&#x5de5;&#x53f7;</name>
  341 + <type>String</type>
  342 + <format/>
  343 + </field>
  344 + <field>
  345 + <name>&#x552e;&#x7968;&#x5458;</name>
  346 + <type>String</type>
  347 + <format/>
  348 + </field>
  349 + </fields>
  350 + <custom>
  351 + <header_font_name>arial</header_font_name>
  352 + <header_font_size>10</header_font_size>
  353 + <header_font_bold>N</header_font_bold>
  354 + <header_font_italic>N</header_font_italic>
  355 + <header_font_underline>no</header_font_underline>
  356 + <header_font_orientation>horizontal</header_font_orientation>
  357 + <header_font_color>black</header_font_color>
  358 + <header_background_color>none</header_background_color>
  359 + <header_row_height>255</header_row_height>
  360 + <header_alignment>left</header_alignment>
  361 + <header_image/>
  362 + <row_font_name>arial</row_font_name>
  363 + <row_font_size>10</row_font_size>
  364 + <row_font_color>black</row_font_color>
  365 + <row_background_color>none</row_background_color>
  366 + </custom>
  367 + <cluster_schema/>
  368 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  369 + <xloc>696</xloc>
  370 + <yloc>257</yloc>
  371 + <draw>Y</draw>
  372 + </GUI>
  373 + </step>
  374 +
  375 + <step>
  376 + <name>&#x4eba;&#x5458;&#x914d;&#x7f6e;&#xff08;&#x6ca1;&#x6709;&#x4f5c;&#x5e9f;&#xff09;</name>
  377 + <type>TableInput</type>
  378 + <description/>
  379 + <distribute>Y</distribute>
  380 + <custom_distribution/>
  381 + <copies>1</copies>
  382 + <partitioning>
  383 + <method>none</method>
  384 + <schema_name/>
  385 + </partitioning>
  386 + <connection>bus_control_variable</connection>
  387 + <sql>select &#x2a; from bsth_c_s_ecinfo where is_cancel &#x3d; 0 and xl &#x3d; &#x24;&#x7b;xlid&#x7d;</sql>
  388 + <limit>0</limit>
  389 + <lookup/>
  390 + <execute_each_row>N</execute_each_row>
  391 + <variables_active>Y</variables_active>
  392 + <lazy_conversion_active>N</lazy_conversion_active>
  393 + <cluster_schema/>
  394 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  395 + <xloc>90</xloc>
  396 + <yloc>59</yloc>
  397 + <draw>Y</draw>
  398 + </GUI>
  399 + </step>
  400 +
  401 + <step>
  402 + <name>&#x552e;&#x7968;&#x5458;&#x67e5;&#x8be2;</name>
  403 + <type>DBJoin</type>
  404 + <description/>
  405 + <distribute>Y</distribute>
  406 + <custom_distribution/>
  407 + <copies>1</copies>
  408 + <partitioning>
  409 + <method>none</method>
  410 + <schema_name/>
  411 + </partitioning>
  412 + <connection>bus_control_variable</connection>
  413 + <rowlimit>1</rowlimit>
  414 + <sql>select job_code as scode, personnel_name as sname from bsth_c_personnel&#xa;where id &#x3d; &#x3f;</sql>
  415 + <outer_join>Y</outer_join>
  416 + <replace_vars>N</replace_vars>
  417 + <parameter>
  418 + <field>
  419 + <name>spy</name>
  420 + <type>Integer</type>
  421 + </field>
  422 + </parameter>
  423 + <cluster_schema/>
  424 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  425 + <xloc>491</xloc>
  426 + <yloc>60</yloc>
  427 + <draw>Y</draw>
  428 + </GUI>
  429 + </step>
  430 +
  431 + <step>
  432 + <name>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</name>
  433 + <type>SelectValues</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 + <fields> <field> <name>xlmc</name>
  443 + <rename>&#x7ebf;&#x8def;</rename>
  444 + <length>-2</length>
  445 + <precision>-2</precision>
  446 + </field> <field> <name>dbbm</name>
  447 + <rename>&#x642d;&#x73ed;&#x7f16;&#x7801;</rename>
  448 + <length>-2</length>
  449 + <precision>-2</precision>
  450 + </field> <field> <name>jcode</name>
  451 + <rename>&#x9a7e;&#x9a76;&#x5458;&#x5de5;&#x53f7;</rename>
  452 + <length>-2</length>
  453 + <precision>-2</precision>
  454 + </field> <field> <name>jname</name>
  455 + <rename>&#x9a7e;&#x9a76;&#x5458;</rename>
  456 + <length>-2</length>
  457 + <precision>-2</precision>
  458 + </field> <field> <name>scode</name>
  459 + <rename>&#x552e;&#x7968;&#x5458;&#x5de5;&#x53f7;</rename>
  460 + <length>-2</length>
  461 + <precision>-2</precision>
  462 + </field> <field> <name>sname</name>
  463 + <rename>&#x552e;&#x7968;&#x5458;</rename>
  464 + <length>-2</length>
  465 + <precision>-2</precision>
  466 + </field> <select_unspecified>N</select_unspecified>
  467 + </fields> <cluster_schema/>
  468 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  469 + <xloc>492</xloc>
  470 + <yloc>164</yloc>
  471 + <draw>Y</draw>
  472 + </GUI>
  473 + </step>
  474 +
  475 + <step>
  476 + <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</name>
  477 + <type>SortRows</type>
  478 + <description/>
  479 + <distribute>Y</distribute>
  480 + <custom_distribution/>
  481 + <copies>1</copies>
  482 + <partitioning>
  483 + <method>none</method>
  484 + <schema_name/>
  485 + </partitioning>
  486 + <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>
  487 + <prefix>out</prefix>
  488 + <sort_size>1000000</sort_size>
  489 + <free_memory/>
  490 + <compress>N</compress>
  491 + <compress_variable/>
  492 + <unique_rows>N</unique_rows>
  493 + <fields>
  494 + <field>
  495 + <name>&#x7ebf;&#x8def;</name>
  496 + <ascending>Y</ascending>
  497 + <case_sensitive>N</case_sensitive>
  498 + <presorted>N</presorted>
  499 + </field>
  500 + <field>
  501 + <name>&#x642d;&#x73ed;&#x7f16;&#x7801;</name>
  502 + <ascending>Y</ascending>
  503 + <case_sensitive>N</case_sensitive>
  504 + <presorted>N</presorted>
  505 + </field>
  506 + </fields>
  507 + <cluster_schema/>
  508 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  509 + <xloc>692</xloc>
  510 + <yloc>164</yloc>
  511 + <draw>Y</draw>
  512 + </GUI>
  513 + </step>
  514 +
  515 + <step>
  516 + <name>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</name>
  517 + <type>DBLookup</type>
  518 + <description/>
  519 + <distribute>Y</distribute>
  520 + <custom_distribution/>
  521 + <copies>1</copies>
  522 + <partitioning>
  523 + <method>none</method>
  524 + <schema_name/>
  525 + </partitioning>
  526 + <connection>bus_control_variable</connection>
  527 + <cache>Y</cache>
  528 + <cache_load_all>Y</cache_load_all>
  529 + <cache_size>0</cache_size>
  530 + <lookup>
  531 + <schema/>
  532 + <table>bsth_c_line</table>
  533 + <orderby/>
  534 + <fail_on_multiple>N</fail_on_multiple>
  535 + <eat_row_on_failure>N</eat_row_on_failure>
  536 + <key>
  537 + <name>xl</name>
  538 + <field>id</field>
  539 + <condition>&#x3d;</condition>
  540 + <name2/>
  541 + </key>
  542 + <value>
  543 + <name>name</name>
  544 + <rename>xlmc</rename>
  545 + <default/>
  546 + <type>String</type>
  547 + </value>
  548 + </lookup>
  549 + <cluster_schema/>
  550 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  551 + <xloc>227</xloc>
  552 + <yloc>59</yloc>
  553 + <draw>Y</draw>
  554 + </GUI>
  555 + </step>
  556 +
  557 + <step>
  558 + <name>&#x9a7e;&#x9a76;&#x5458;&#x67e5;&#x8be2;</name>
  559 + <type>DBJoin</type>
  560 + <description/>
  561 + <distribute>Y</distribute>
  562 + <custom_distribution/>
  563 + <copies>1</copies>
  564 + <partitioning>
  565 + <method>none</method>
  566 + <schema_name/>
  567 + </partitioning>
  568 + <connection>bus_control_variable</connection>
  569 + <rowlimit>1</rowlimit>
  570 + <sql>select job_code as jcode, personnel_name as jname from bsth_c_personnel&#xa;where id &#x3d; &#x3f;</sql>
  571 + <outer_join>Y</outer_join>
  572 + <replace_vars>N</replace_vars>
  573 + <parameter>
  574 + <field>
  575 + <name>jsy</name>
  576 + <type>Integer</type>
  577 + </field>
  578 + </parameter>
  579 + <cluster_schema/>
  580 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  581 + <xloc>366</xloc>
  582 + <yloc>60</yloc>
  583 + <draw>Y</draw>
  584 + </GUI>
  585 + </step>
  586 +
  587 + <step_error_handling>
  588 + </step_error_handling>
  589 + <slave-step-copy-partition-distribution>
  590 +</slave-step-copy-partition-distribution>
  591 + <slave_transformation>N</slave_transformation>
  592 +
  593 +</transformation>
src/main/resources/datatools/ktrs/guideboardDataOutput.ktr
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<transformation>  
3 - <info>  
4 - <name>&#x8def;&#x724c;&#x4fe1;&#x606f;&#x5bfc;&#x51fa;</name>  
5 - <description/>  
6 - <extended_description/>  
7 - <trans_version/>  
8 - <trans_type>Normal</trans_type>  
9 - <trans_status>0</trans_status>  
10 - <directory>&#x2f;</directory>  
11 - <parameters>  
12 - <parameter>  
13 - <name>filepath</name>  
14 - <default_value/>  
15 - <description>excel&#x6587;&#x4ef6;&#x8def;&#x5f84;</description>  
16 - </parameter>  
17 - <parameter>  
18 - <name>xlid</name>  
19 - <default_value/>  
20 - <description>&#x7ebf;&#x8def;id</description>  
21 - </parameter>  
22 - </parameters>  
23 - <log>  
24 -<trans-log-table><connection/>  
25 -<schema/>  
26 -<table/>  
27 -<size_limit_lines/>  
28 -<interval/>  
29 -<timeout_days/>  
30 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>  
31 -<perf-log-table><connection/>  
32 -<schema/>  
33 -<table/>  
34 -<interval/>  
35 -<timeout_days/>  
36 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>  
37 -<channel-log-table><connection/>  
38 -<schema/>  
39 -<table/>  
40 -<timeout_days/>  
41 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>  
42 -<step-log-table><connection/>  
43 -<schema/>  
44 -<table/>  
45 -<timeout_days/>  
46 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>  
47 -<metrics-log-table><connection/>  
48 -<schema/>  
49 -<table/>  
50 -<timeout_days/>  
51 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>  
52 - </log>  
53 - <maxdate>  
54 - <connection/>  
55 - <table/>  
56 - <field/>  
57 - <offset>0.0</offset>  
58 - <maxdiff>0.0</maxdiff>  
59 - </maxdate>  
60 - <size_rowset>10000</size_rowset>  
61 - <sleep_time_empty>50</sleep_time_empty>  
62 - <sleep_time_full>50</sleep_time_full>  
63 - <unique_connections>N</unique_connections>  
64 - <feedback_shown>Y</feedback_shown>  
65 - <feedback_size>50000</feedback_size>  
66 - <using_thread_priorities>Y</using_thread_priorities>  
67 - <shared_objects_file/>  
68 - <capture_step_performance>N</capture_step_performance>  
69 - <step_performance_capturing_delay>1000</step_performance_capturing_delay>  
70 - <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>  
71 - <dependencies>  
72 - </dependencies>  
73 - <partitionschemas>  
74 - </partitionschemas>  
75 - <slaveservers>  
76 - </slaveservers>  
77 - <clusterschemas>  
78 - </clusterschemas>  
79 - <created_user>-</created_user>  
80 - <created_date>2017&#x2f;02&#x2f;06 11&#x3a;05&#x3a;17.781</created_date>  
81 - <modified_user>-</modified_user>  
82 - <modified_date>2017&#x2f;02&#x2f;06 11&#x3a;05&#x3a;17.781</modified_date>  
83 - <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>  
84 - <is_key_private>N</is_key_private>  
85 - </info>  
86 - <notepads>  
87 - </notepads>  
88 - <connection>  
89 - <name>bus_control_variable</name>  
90 - <server>&#x24;&#x7b;v_db_ip&#x7d;</server>  
91 - <type>MYSQL</type>  
92 - <access>Native</access>  
93 - <database>&#x24;&#x7b;v_db_dname&#x7d;</database>  
94 - <port>3306</port>  
95 - <username>&#x24;&#x7b;v_db_uname&#x7d;</username>  
96 - <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>  
97 - <servername/>  
98 - <data_tablespace/>  
99 - <index_tablespace/>  
100 - <attributes>  
101 - <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute>  
102 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
103 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
104 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
105 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
106 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
107 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
108 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
109 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
110 - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>  
111 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
112 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
113 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
114 - </attributes>  
115 - </connection>  
116 - <connection>  
117 - <name>bus_control_&#x516c;&#x53f8;_201</name>  
118 - <server>localhost</server>  
119 - <type>MYSQL</type>  
120 - <access>Native</access>  
121 - <database>control</database>  
122 - <port>3306</port>  
123 - <username>root</username>  
124 - <password>Encrypted </password>  
125 - <servername/>  
126 - <data_tablespace/>  
127 - <index_tablespace/>  
128 - <attributes>  
129 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
130 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
131 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
132 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
133 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
134 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
135 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
136 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
137 - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>  
138 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
139 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
140 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
141 - </attributes>  
142 - </connection>  
143 - <connection>  
144 - <name>bus_control_&#x672c;&#x673a;</name>  
145 - <server>localhost</server>  
146 - <type>MYSQL</type>  
147 - <access>Native</access>  
148 - <database>control</database>  
149 - <port>3306</port>  
150 - <username>root</username>  
151 - <password>Encrypted </password>  
152 - <servername/>  
153 - <data_tablespace/>  
154 - <index_tablespace/>  
155 - <attributes>  
156 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
157 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
158 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
159 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
160 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
161 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
162 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
163 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
164 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
165 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
166 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
167 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
168 - </attributes>  
169 - </connection>  
170 - <connection>  
171 - <name>xlab_mysql_youle</name>  
172 - <server>101.231.124.8</server>  
173 - <type>MYSQL</type>  
174 - <access>Native</access>  
175 - <database>xlab_youle</database>  
176 - <port>45687</port>  
177 - <username>xlab-youle</username>  
178 - <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>  
179 - <servername/>  
180 - <data_tablespace/>  
181 - <index_tablespace/>  
182 - <attributes>  
183 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
184 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
185 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
186 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
187 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
188 - <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>  
189 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
190 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
191 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
192 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>  
193 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>  
194 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
195 - </attributes>  
196 - </connection>  
197 - <connection>  
198 - <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>  
199 - <server>localhost</server>  
200 - <type>MYSQL</type>  
201 - <access>Native</access>  
202 - <database>xlab_youle</database>  
203 - <port>3306</port>  
204 - <username>root</username>  
205 - <password>Encrypted </password>  
206 - <servername/>  
207 - <data_tablespace/>  
208 - <index_tablespace/>  
209 - <attributes>  
210 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
211 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
212 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
213 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
214 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
215 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
216 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
217 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
218 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
219 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>  
220 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>  
221 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
222 - </attributes>  
223 - </connection>  
224 - <connection>  
225 - <name>xlab_youle</name>  
226 - <server/>  
227 - <type>MYSQL</type>  
228 - <access>JNDI</access>  
229 - <database>xlab_youle</database>  
230 - <port>1521</port>  
231 - <username/>  
232 - <password>Encrypted </password>  
233 - <servername/>  
234 - <data_tablespace/>  
235 - <index_tablespace/>  
236 - <attributes>  
237 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
238 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
239 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
240 - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>  
241 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
242 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
243 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
244 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
245 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
246 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
247 - </attributes>  
248 - </connection>  
249 - <order>  
250 - <hop> <from>&#x8def;&#x724c;&#x6570;&#x636e;&#xff08;&#x6ca1;&#x6709;&#x4f5c;&#x5e9f;&#xff09;</from><to>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>  
251 - <hop> <from>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>  
252 - <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>  
253 - <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>  
254 - </order>  
255 - <step>  
256 - <name>Excel&#x8f93;&#x51fa;</name>  
257 - <type>ExcelOutput</type>  
258 - <description/>  
259 - <distribute>Y</distribute>  
260 - <custom_distribution/>  
261 - <copies>1</copies>  
262 - <partitioning>  
263 - <method>none</method>  
264 - <schema_name/>  
265 - </partitioning>  
266 - <header>Y</header>  
267 - <footer>N</footer>  
268 - <encoding/>  
269 - <append>N</append>  
270 - <add_to_result_filenames>Y</add_to_result_filenames>  
271 - <file>  
272 - <name>&#x24;&#x7b;filepath&#x7d;</name>  
273 - <extention/>  
274 - <do_not_open_newfile_init>N</do_not_open_newfile_init>  
275 - <create_parent_folder>N</create_parent_folder>  
276 - <split>N</split>  
277 - <add_date>N</add_date>  
278 - <add_time>N</add_time>  
279 - <SpecifyFormat>N</SpecifyFormat>  
280 - <date_time_format>yyyyMMddHHmmss</date_time_format>  
281 - <sheetname>&#x5de5;&#x4f5c;&#x8868;1</sheetname>  
282 - <autosizecolums>N</autosizecolums>  
283 - <nullisblank>N</nullisblank>  
284 - <protect_sheet>N</protect_sheet>  
285 - <password>Encrypted </password>  
286 - <splitevery>0</splitevery>  
287 - <usetempfiles>N</usetempfiles>  
288 - <tempdirectory/>  
289 - </file>  
290 - <template>  
291 - <enabled>N</enabled>  
292 - <append>N</append>  
293 - <filename>template.xls</filename>  
294 - </template>  
295 - <fields>  
296 - <field>  
297 - <name>&#x7ebf;&#x8def;</name>  
298 - <type>String</type>  
299 - <format/>  
300 - </field>  
301 - <field>  
302 - <name>&#x8def;&#x724c;&#x7f16;&#x53f7;</name>  
303 - <type>String</type>  
304 - <format/>  
305 - </field>  
306 - <field>  
307 - <name>&#x8def;&#x724c;&#x540d;&#x79f0;</name>  
308 - <type>String</type>  
309 - <format/>  
310 - </field>  
311 - <field>  
312 - <name>&#x8def;&#x724c;&#x7c7b;&#x578b;</name>  
313 - <type>String</type>  
314 - <format/>  
315 - </field>  
316 - </fields>  
317 - <custom>  
318 - <header_font_name>arial</header_font_name>  
319 - <header_font_size>10</header_font_size>  
320 - <header_font_bold>N</header_font_bold>  
321 - <header_font_italic>N</header_font_italic>  
322 - <header_font_underline>no</header_font_underline>  
323 - <header_font_orientation>horizontal</header_font_orientation>  
324 - <header_font_color>black</header_font_color>  
325 - <header_background_color>none</header_background_color>  
326 - <header_row_height>255</header_row_height>  
327 - <header_alignment>left</header_alignment>  
328 - <header_image/>  
329 - <row_font_name>arial</row_font_name>  
330 - <row_font_size>10</row_font_size>  
331 - <row_font_color>black</row_font_color>  
332 - <row_background_color>none</row_background_color>  
333 - </custom>  
334 - <cluster_schema/>  
335 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
336 - <xloc>644</xloc>  
337 - <yloc>92</yloc>  
338 - <draw>Y</draw>  
339 - </GUI>  
340 - </step>  
341 -  
342 - <step>  
343 - <name>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</name>  
344 - <type>SelectValues</type>  
345 - <description/>  
346 - <distribute>Y</distribute>  
347 - <custom_distribution/>  
348 - <copies>1</copies>  
349 - <partitioning>  
350 - <method>none</method>  
351 - <schema_name/>  
352 - </partitioning>  
353 - <fields> <select_unspecified>N</select_unspecified>  
354 - <meta> <name>xlmc</name>  
355 - <rename>&#x7ebf;&#x8def;</rename>  
356 - <type>None</type>  
357 - <length>-2</length>  
358 - <precision>-2</precision>  
359 - <conversion_mask/>  
360 - <date_format_lenient>false</date_format_lenient>  
361 - <date_format_locale/>  
362 - <date_format_timezone/>  
363 - <lenient_string_to_number>false</lenient_string_to_number>  
364 - <encoding/>  
365 - <decimal_symbol/>  
366 - <grouping_symbol/>  
367 - <currency_symbol/>  
368 - <storage_type/>  
369 - </meta> <meta> <name>lp_no</name>  
370 - <rename>&#x8def;&#x724c;&#x7f16;&#x53f7;</rename>  
371 - <type>String</type>  
372 - <length>-2</length>  
373 - <precision>-2</precision>  
374 - <conversion_mask>&#x23;</conversion_mask>  
375 - <date_format_lenient>false</date_format_lenient>  
376 - <date_format_locale/>  
377 - <date_format_timezone/>  
378 - <lenient_string_to_number>false</lenient_string_to_number>  
379 - <encoding/>  
380 - <decimal_symbol/>  
381 - <grouping_symbol/>  
382 - <currency_symbol/>  
383 - <storage_type/>  
384 - </meta> <meta> <name>lp_name</name>  
385 - <rename>&#x8def;&#x724c;&#x540d;&#x79f0;</rename>  
386 - <type>None</type>  
387 - <length>-2</length>  
388 - <precision>-2</precision>  
389 - <conversion_mask/>  
390 - <date_format_lenient>false</date_format_lenient>  
391 - <date_format_locale/>  
392 - <date_format_timezone/>  
393 - <lenient_string_to_number>false</lenient_string_to_number>  
394 - <encoding/>  
395 - <decimal_symbol/>  
396 - <grouping_symbol/>  
397 - <currency_symbol/>  
398 - <storage_type/>  
399 - </meta> <meta> <name>lp_type</name>  
400 - <rename>&#x8def;&#x724c;&#x7c7b;&#x578b;</rename>  
401 - <type>None</type>  
402 - <length>-2</length>  
403 - <precision>-2</precision>  
404 - <conversion_mask/>  
405 - <date_format_lenient>false</date_format_lenient>  
406 - <date_format_locale/>  
407 - <date_format_timezone/>  
408 - <lenient_string_to_number>false</lenient_string_to_number>  
409 - <encoding/>  
410 - <decimal_symbol/>  
411 - <grouping_symbol/>  
412 - <currency_symbol/>  
413 - <storage_type/>  
414 - </meta> </fields> <cluster_schema/>  
415 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
416 - <xloc>507</xloc>  
417 - <yloc>91</yloc>  
418 - <draw>Y</draw>  
419 - </GUI>  
420 - </step>  
421 -  
422 - <step>  
423 - <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</name>  
424 - <type>SortRows</type>  
425 - <description/>  
426 - <distribute>Y</distribute>  
427 - <custom_distribution/>  
428 - <copies>1</copies>  
429 - <partitioning>  
430 - <method>none</method>  
431 - <schema_name/>  
432 - </partitioning>  
433 - <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>  
434 - <prefix>out</prefix>  
435 - <sort_size>1000000</sort_size>  
436 - <free_memory/>  
437 - <compress>N</compress>  
438 - <compress_variable/>  
439 - <unique_rows>N</unique_rows>  
440 - <fields>  
441 - <field>  
442 - <name>xl</name>  
443 - <ascending>Y</ascending>  
444 - <case_sensitive>N</case_sensitive>  
445 - <presorted>N</presorted>  
446 - </field>  
447 - <field>  
448 - <name>lp_no</name>  
449 - <ascending>Y</ascending>  
450 - <case_sensitive>N</case_sensitive>  
451 - <presorted>N</presorted>  
452 - </field>  
453 - <field>  
454 - <name>is_cancel</name>  
455 - <ascending>N</ascending>  
456 - <case_sensitive>N</case_sensitive>  
457 - <presorted>N</presorted>  
458 - </field>  
459 - </fields>  
460 - <cluster_schema/>  
461 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
462 - <xloc>384</xloc>  
463 - <yloc>91</yloc>  
464 - <draw>Y</draw>  
465 - </GUI>  
466 - </step>  
467 -  
468 - <step>  
469 - <name>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</name>  
470 - <type>DBLookup</type>  
471 - <description/>  
472 - <distribute>Y</distribute>  
473 - <custom_distribution/>  
474 - <copies>1</copies>  
475 - <partitioning>  
476 - <method>none</method>  
477 - <schema_name/>  
478 - </partitioning>  
479 - <connection>bus_control_variable</connection>  
480 - <cache>Y</cache>  
481 - <cache_load_all>Y</cache_load_all>  
482 - <cache_size>0</cache_size>  
483 - <lookup>  
484 - <schema/>  
485 - <table>bsth_c_line</table>  
486 - <orderby/>  
487 - <fail_on_multiple>N</fail_on_multiple>  
488 - <eat_row_on_failure>N</eat_row_on_failure>  
489 - <key>  
490 - <name>xl</name>  
491 - <field>id</field>  
492 - <condition>&#x3d;</condition>  
493 - <name2/>  
494 - </key>  
495 - <value>  
496 - <name>name</name>  
497 - <rename>xlmc</rename>  
498 - <default/>  
499 - <type>String</type>  
500 - </value>  
501 - </lookup>  
502 - <cluster_schema/>  
503 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
504 - <xloc>262</xloc>  
505 - <yloc>92</yloc>  
506 - <draw>Y</draw>  
507 - </GUI>  
508 - </step>  
509 -  
510 - <step>  
511 - <name>&#x8def;&#x724c;&#x6570;&#x636e;&#xff08;&#x6ca1;&#x6709;&#x4f5c;&#x5e9f;&#xff09;</name>  
512 - <type>TableInput</type>  
513 - <description/>  
514 - <distribute>Y</distribute>  
515 - <custom_distribution/>  
516 - <copies>1</copies>  
517 - <partitioning>  
518 - <method>none</method>  
519 - <schema_name/>  
520 - </partitioning>  
521 - <connection>bus_control_variable</connection>  
522 - <sql>select &#x2a; from bsth_c_s_gbi&#xa;where is_cancel &#x3d; 0 and xl &#x3d; &#x24;&#x7b;xlid&#x7d;</sql>  
523 - <limit>0</limit>  
524 - <lookup/>  
525 - <execute_each_row>N</execute_each_row>  
526 - <variables_active>Y</variables_active>  
527 - <lazy_conversion_active>N</lazy_conversion_active>  
528 - <cluster_schema/>  
529 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
530 - <xloc>134</xloc>  
531 - <yloc>92</yloc>  
532 - <draw>Y</draw>  
533 - </GUI>  
534 - </step>  
535 -  
536 - <step_error_handling>  
537 - </step_error_handling>  
538 - <slave-step-copy-partition-distribution>  
539 -</slave-step-copy-partition-distribution>  
540 - <slave_transformation>N</slave_transformation>  
541 -  
542 -</transformation> 1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<transformation>
  3 + <info>
  4 + <name>&#x8def;&#x724c;&#x4fe1;&#x606f;&#x5bfc;&#x51fa;</name>
  5 + <description/>
  6 + <extended_description/>
  7 + <trans_version/>
  8 + <trans_type>Normal</trans_type>
  9 + <trans_status>0</trans_status>
  10 + <directory>&#x2f;</directory>
  11 + <parameters>
  12 + <parameter>
  13 + <name>filepath</name>
  14 + <default_value/>
  15 + <description>excel&#x6587;&#x4ef6;&#x8def;&#x5f84;</description>
  16 + </parameter>
  17 + <parameter>
  18 + <name>xlid</name>
  19 + <default_value/>
  20 + <description>&#x7ebf;&#x8def;id</description>
  21 + </parameter>
  22 + </parameters>
  23 + <log>
  24 +<trans-log-table><connection/>
  25 +<schema/>
  26 +<table/>
  27 +<size_limit_lines/>
  28 +<interval/>
  29 +<timeout_days/>
  30 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>
  31 +<perf-log-table><connection/>
  32 +<schema/>
  33 +<table/>
  34 +<interval/>
  35 +<timeout_days/>
  36 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>
  37 +<channel-log-table><connection/>
  38 +<schema/>
  39 +<table/>
  40 +<timeout_days/>
  41 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>
  42 +<step-log-table><connection/>
  43 +<schema/>
  44 +<table/>
  45 +<timeout_days/>
  46 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>
  47 +<metrics-log-table><connection/>
  48 +<schema/>
  49 +<table/>
  50 +<timeout_days/>
  51 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>
  52 + </log>
  53 + <maxdate>
  54 + <connection/>
  55 + <table/>
  56 + <field/>
  57 + <offset>0.0</offset>
  58 + <maxdiff>0.0</maxdiff>
  59 + </maxdate>
  60 + <size_rowset>10000</size_rowset>
  61 + <sleep_time_empty>50</sleep_time_empty>
  62 + <sleep_time_full>50</sleep_time_full>
  63 + <unique_connections>N</unique_connections>
  64 + <feedback_shown>Y</feedback_shown>
  65 + <feedback_size>50000</feedback_size>
  66 + <using_thread_priorities>Y</using_thread_priorities>
  67 + <shared_objects_file/>
  68 + <capture_step_performance>N</capture_step_performance>
  69 + <step_performance_capturing_delay>1000</step_performance_capturing_delay>
  70 + <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
  71 + <dependencies>
  72 + </dependencies>
  73 + <partitionschemas>
  74 + </partitionschemas>
  75 + <slaveservers>
  76 + </slaveservers>
  77 + <clusterschemas>
  78 + </clusterschemas>
  79 + <created_user>-</created_user>
  80 + <created_date>2017&#x2f;02&#x2f;06 11&#x3a;05&#x3a;17.781</created_date>
  81 + <modified_user>-</modified_user>
  82 + <modified_date>2017&#x2f;02&#x2f;06 11&#x3a;05&#x3a;17.781</modified_date>
  83 + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>
  84 + <is_key_private>N</is_key_private>
  85 + </info>
  86 + <notepads>
  87 + </notepads>
  88 + <connection>
  89 + <name>bus_control_variable</name>
  90 + <server>&#x24;&#x7b;v_db_ip&#x7d;</server>
  91 + <type>MYSQL</type>
  92 + <access>Native</access>
  93 + <database>&#x24;&#x7b;v_db_dname&#x7d;</database>
  94 + <port>3306</port>
  95 + <username>&#x24;&#x7b;v_db_uname&#x7d;</username>
  96 + <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>
  97 + <servername/>
  98 + <data_tablespace/>
  99 + <index_tablespace/>
  100 + <attributes>
  101 + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute>
  102 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  103 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  104 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  105 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  106 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  107 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  108 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  109 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  110 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  111 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  112 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  113 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  114 + </attributes>
  115 + </connection>
  116 + <connection>
  117 + <name>bus_control_&#x516c;&#x53f8;_201</name>
  118 + <server>localhost</server>
  119 + <type>MYSQL</type>
  120 + <access>Native</access>
  121 + <database>control</database>
  122 + <port>3306</port>
  123 + <username>root</username>
  124 + <password>Encrypted </password>
  125 + <servername/>
  126 + <data_tablespace/>
  127 + <index_tablespace/>
  128 + <attributes>
  129 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  130 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  131 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  132 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  133 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  134 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  135 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  136 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  137 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  138 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  139 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  140 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  141 + </attributes>
  142 + </connection>
  143 + <connection>
  144 + <name>bus_control_&#x672c;&#x673a;</name>
  145 + <server>localhost</server>
  146 + <type>MYSQL</type>
  147 + <access>Native</access>
  148 + <database>control</database>
  149 + <port>3306</port>
  150 + <username>root</username>
  151 + <password>Encrypted </password>
  152 + <servername/>
  153 + <data_tablespace/>
  154 + <index_tablespace/>
  155 + <attributes>
  156 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  157 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  158 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  159 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  160 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  161 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  162 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  163 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  164 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  165 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  166 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  167 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  168 + </attributes>
  169 + </connection>
  170 + <connection>
  171 + <name>xlab_mysql_youle</name>
  172 + <server>101.231.124.8</server>
  173 + <type>MYSQL</type>
  174 + <access>Native</access>
  175 + <database>xlab_youle</database>
  176 + <port>45687</port>
  177 + <username>xlab-youle</username>
  178 + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>
  179 + <servername/>
  180 + <data_tablespace/>
  181 + <index_tablespace/>
  182 + <attributes>
  183 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  184 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  185 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  186 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  187 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  188 + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>
  189 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  190 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  191 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  192 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  193 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  194 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  195 + </attributes>
  196 + </connection>
  197 + <connection>
  198 + <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>
  199 + <server>localhost</server>
  200 + <type>MYSQL</type>
  201 + <access>Native</access>
  202 + <database>xlab_youle</database>
  203 + <port>3306</port>
  204 + <username>root</username>
  205 + <password>Encrypted </password>
  206 + <servername/>
  207 + <data_tablespace/>
  208 + <index_tablespace/>
  209 + <attributes>
  210 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  211 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  212 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  213 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  214 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  215 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  216 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  217 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  218 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  219 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  220 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  221 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  222 + </attributes>
  223 + </connection>
  224 + <connection>
  225 + <name>xlab_youle</name>
  226 + <server/>
  227 + <type>MYSQL</type>
  228 + <access>JNDI</access>
  229 + <database>xlab_youle</database>
  230 + <port>1521</port>
  231 + <username/>
  232 + <password>Encrypted </password>
  233 + <servername/>
  234 + <data_tablespace/>
  235 + <index_tablespace/>
  236 + <attributes>
  237 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  238 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  239 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  240 + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
  241 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  242 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  243 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  244 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  245 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  246 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  247 + </attributes>
  248 + </connection>
  249 + <order>
  250 + <hop> <from>&#x8def;&#x724c;&#x6570;&#x636e;&#xff08;&#x6ca1;&#x6709;&#x4f5c;&#x5e9f;&#xff09;</from><to>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  251 + <hop> <from>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  252 + <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>
  253 + <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
  254 + </order>
  255 + <step>
  256 + <name>Excel&#x8f93;&#x51fa;</name>
  257 + <type>ExcelOutput</type>
  258 + <description/>
  259 + <distribute>Y</distribute>
  260 + <custom_distribution/>
  261 + <copies>1</copies>
  262 + <partitioning>
  263 + <method>none</method>
  264 + <schema_name/>
  265 + </partitioning>
  266 + <header>Y</header>
  267 + <footer>N</footer>
  268 + <encoding/>
  269 + <append>N</append>
  270 + <add_to_result_filenames>Y</add_to_result_filenames>
  271 + <file>
  272 + <name>&#x24;&#x7b;filepath&#x7d;</name>
  273 + <extention/>
  274 + <do_not_open_newfile_init>N</do_not_open_newfile_init>
  275 + <create_parent_folder>N</create_parent_folder>
  276 + <split>N</split>
  277 + <add_date>N</add_date>
  278 + <add_time>N</add_time>
  279 + <SpecifyFormat>N</SpecifyFormat>
  280 + <date_time_format>yyyyMMddHHmmss</date_time_format>
  281 + <sheetname>&#x5de5;&#x4f5c;&#x8868;1</sheetname>
  282 + <autosizecolums>N</autosizecolums>
  283 + <nullisblank>N</nullisblank>
  284 + <protect_sheet>N</protect_sheet>
  285 + <password>Encrypted </password>
  286 + <splitevery>0</splitevery>
  287 + <usetempfiles>N</usetempfiles>
  288 + <tempdirectory/>
  289 + </file>
  290 + <template>
  291 + <enabled>N</enabled>
  292 + <append>N</append>
  293 + <filename>template.xls</filename>
  294 + </template>
  295 + <fields>
  296 + <field>
  297 + <name>&#x7ebf;&#x8def;</name>
  298 + <type>String</type>
  299 + <format/>
  300 + </field>
  301 + <field>
  302 + <name>&#x8def;&#x724c;&#x7f16;&#x53f7;</name>
  303 + <type>String</type>
  304 + <format/>
  305 + </field>
  306 + <field>
  307 + <name>&#x8def;&#x724c;&#x540d;&#x79f0;</name>
  308 + <type>String</type>
  309 + <format/>
  310 + </field>
  311 + <field>
  312 + <name>&#x8def;&#x724c;&#x7c7b;&#x578b;</name>
  313 + <type>String</type>
  314 + <format/>
  315 + </field>
  316 + </fields>
  317 + <custom>
  318 + <header_font_name>arial</header_font_name>
  319 + <header_font_size>10</header_font_size>
  320 + <header_font_bold>N</header_font_bold>
  321 + <header_font_italic>N</header_font_italic>
  322 + <header_font_underline>no</header_font_underline>
  323 + <header_font_orientation>horizontal</header_font_orientation>
  324 + <header_font_color>black</header_font_color>
  325 + <header_background_color>none</header_background_color>
  326 + <header_row_height>255</header_row_height>
  327 + <header_alignment>left</header_alignment>
  328 + <header_image/>
  329 + <row_font_name>arial</row_font_name>
  330 + <row_font_size>10</row_font_size>
  331 + <row_font_color>black</row_font_color>
  332 + <row_background_color>none</row_background_color>
  333 + </custom>
  334 + <cluster_schema/>
  335 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  336 + <xloc>644</xloc>
  337 + <yloc>92</yloc>
  338 + <draw>Y</draw>
  339 + </GUI>
  340 + </step>
  341 +
  342 + <step>
  343 + <name>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</name>
  344 + <type>SelectValues</type>
  345 + <description/>
  346 + <distribute>Y</distribute>
  347 + <custom_distribution/>
  348 + <copies>1</copies>
  349 + <partitioning>
  350 + <method>none</method>
  351 + <schema_name/>
  352 + </partitioning>
  353 + <fields> <select_unspecified>N</select_unspecified>
  354 + <meta> <name>xlmc</name>
  355 + <rename>&#x7ebf;&#x8def;</rename>
  356 + <type>None</type>
  357 + <length>-2</length>
  358 + <precision>-2</precision>
  359 + <conversion_mask/>
  360 + <date_format_lenient>false</date_format_lenient>
  361 + <date_format_locale/>
  362 + <date_format_timezone/>
  363 + <lenient_string_to_number>false</lenient_string_to_number>
  364 + <encoding/>
  365 + <decimal_symbol/>
  366 + <grouping_symbol/>
  367 + <currency_symbol/>
  368 + <storage_type/>
  369 + </meta> <meta> <name>lp_no</name>
  370 + <rename>&#x8def;&#x724c;&#x7f16;&#x53f7;</rename>
  371 + <type>String</type>
  372 + <length>-2</length>
  373 + <precision>-2</precision>
  374 + <conversion_mask>&#x23;</conversion_mask>
  375 + <date_format_lenient>false</date_format_lenient>
  376 + <date_format_locale/>
  377 + <date_format_timezone/>
  378 + <lenient_string_to_number>false</lenient_string_to_number>
  379 + <encoding/>
  380 + <decimal_symbol/>
  381 + <grouping_symbol/>
  382 + <currency_symbol/>
  383 + <storage_type/>
  384 + </meta> <meta> <name>lp_name</name>
  385 + <rename>&#x8def;&#x724c;&#x540d;&#x79f0;</rename>
  386 + <type>None</type>
  387 + <length>-2</length>
  388 + <precision>-2</precision>
  389 + <conversion_mask/>
  390 + <date_format_lenient>false</date_format_lenient>
  391 + <date_format_locale/>
  392 + <date_format_timezone/>
  393 + <lenient_string_to_number>false</lenient_string_to_number>
  394 + <encoding/>
  395 + <decimal_symbol/>
  396 + <grouping_symbol/>
  397 + <currency_symbol/>
  398 + <storage_type/>
  399 + </meta> <meta> <name>lp_type</name>
  400 + <rename>&#x8def;&#x724c;&#x7c7b;&#x578b;</rename>
  401 + <type>None</type>
  402 + <length>-2</length>
  403 + <precision>-2</precision>
  404 + <conversion_mask/>
  405 + <date_format_lenient>false</date_format_lenient>
  406 + <date_format_locale/>
  407 + <date_format_timezone/>
  408 + <lenient_string_to_number>false</lenient_string_to_number>
  409 + <encoding/>
  410 + <decimal_symbol/>
  411 + <grouping_symbol/>
  412 + <currency_symbol/>
  413 + <storage_type/>
  414 + </meta> </fields> <cluster_schema/>
  415 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  416 + <xloc>507</xloc>
  417 + <yloc>91</yloc>
  418 + <draw>Y</draw>
  419 + </GUI>
  420 + </step>
  421 +
  422 + <step>
  423 + <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</name>
  424 + <type>SortRows</type>
  425 + <description/>
  426 + <distribute>Y</distribute>
  427 + <custom_distribution/>
  428 + <copies>1</copies>
  429 + <partitioning>
  430 + <method>none</method>
  431 + <schema_name/>
  432 + </partitioning>
  433 + <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>
  434 + <prefix>out</prefix>
  435 + <sort_size>1000000</sort_size>
  436 + <free_memory/>
  437 + <compress>N</compress>
  438 + <compress_variable/>
  439 + <unique_rows>N</unique_rows>
  440 + <fields>
  441 + <field>
  442 + <name>xl</name>
  443 + <ascending>Y</ascending>
  444 + <case_sensitive>N</case_sensitive>
  445 + <presorted>N</presorted>
  446 + </field>
  447 + <field>
  448 + <name>lp_no</name>
  449 + <ascending>Y</ascending>
  450 + <case_sensitive>N</case_sensitive>
  451 + <presorted>N</presorted>
  452 + </field>
  453 + <field>
  454 + <name>is_cancel</name>
  455 + <ascending>N</ascending>
  456 + <case_sensitive>N</case_sensitive>
  457 + <presorted>N</presorted>
  458 + </field>
  459 + </fields>
  460 + <cluster_schema/>
  461 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  462 + <xloc>384</xloc>
  463 + <yloc>91</yloc>
  464 + <draw>Y</draw>
  465 + </GUI>
  466 + </step>
  467 +
  468 + <step>
  469 + <name>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</name>
  470 + <type>DBLookup</type>
  471 + <description/>
  472 + <distribute>Y</distribute>
  473 + <custom_distribution/>
  474 + <copies>1</copies>
  475 + <partitioning>
  476 + <method>none</method>
  477 + <schema_name/>
  478 + </partitioning>
  479 + <connection>bus_control_variable</connection>
  480 + <cache>Y</cache>
  481 + <cache_load_all>Y</cache_load_all>
  482 + <cache_size>0</cache_size>
  483 + <lookup>
  484 + <schema/>
  485 + <table>bsth_c_line</table>
  486 + <orderby/>
  487 + <fail_on_multiple>N</fail_on_multiple>
  488 + <eat_row_on_failure>N</eat_row_on_failure>
  489 + <key>
  490 + <name>xl</name>
  491 + <field>id</field>
  492 + <condition>&#x3d;</condition>
  493 + <name2/>
  494 + </key>
  495 + <value>
  496 + <name>name</name>
  497 + <rename>xlmc</rename>
  498 + <default/>
  499 + <type>String</type>
  500 + </value>
  501 + </lookup>
  502 + <cluster_schema/>
  503 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  504 + <xloc>262</xloc>
  505 + <yloc>92</yloc>
  506 + <draw>Y</draw>
  507 + </GUI>
  508 + </step>
  509 +
  510 + <step>
  511 + <name>&#x8def;&#x724c;&#x6570;&#x636e;&#xff08;&#x6ca1;&#x6709;&#x4f5c;&#x5e9f;&#xff09;</name>
  512 + <type>TableInput</type>
  513 + <description/>
  514 + <distribute>Y</distribute>
  515 + <custom_distribution/>
  516 + <copies>1</copies>
  517 + <partitioning>
  518 + <method>none</method>
  519 + <schema_name/>
  520 + </partitioning>
  521 + <connection>bus_control_variable</connection>
  522 + <sql>select &#x2a; from bsth_c_s_gbi&#xa;where is_cancel &#x3d; 0 and xl &#x3d; &#x24;&#x7b;xlid&#x7d;</sql>
  523 + <limit>0</limit>
  524 + <lookup/>
  525 + <execute_each_row>N</execute_each_row>
  526 + <variables_active>Y</variables_active>
  527 + <lazy_conversion_active>N</lazy_conversion_active>
  528 + <cluster_schema/>
  529 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  530 + <xloc>134</xloc>
  531 + <yloc>92</yloc>
  532 + <draw>Y</draw>
  533 + </GUI>
  534 + </step>
  535 +
  536 + <step_error_handling>
  537 + </step_error_handling>
  538 + <slave-step-copy-partition-distribution>
  539 +</slave-step-copy-partition-distribution>
  540 + <slave_transformation>N</slave_transformation>
  541 +
  542 +</transformation>
src/main/resources/datatools/ktrs/scheduleRuleDataOutput.ktr
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<transformation>  
3 - <info>  
4 - <name>&#x6392;&#x73ed;&#x89c4;&#x5219;&#x4fe1;&#x606f;&#x5bfc;&#x51fa;</name>  
5 - <description/>  
6 - <extended_description/>  
7 - <trans_version/>  
8 - <trans_type>Normal</trans_type>  
9 - <trans_status>0</trans_status>  
10 - <directory>&#x2f;</directory>  
11 - <parameters>  
12 - <parameter>  
13 - <name>filepath</name>  
14 - <default_value>&#x2f;Users&#x2f;xu&#x2f;resource&#x2f;project_code&#x2f;runtime_temp&#x2f;bsth_control_u_d_files&#x2f;test.xls</default_value>  
15 - <description>excel&#x6587;&#x4ef6;&#x8def;&#x5f84;</description>  
16 - </parameter>  
17 - <parameter>  
18 - <name>templatepath</name>  
19 - <default_value>&#x2f;Users&#x2f;xu&#x2f;resource&#x2f;project_code&#x2f;runtime_temp&#x2f;bsth_control_u_d_files&#x2f;template</default_value>  
20 - <description>&#x6a21;&#x7248;&#x6587;&#x4ef6;&#x8def;&#x5f84;</description>  
21 - </parameter>  
22 - <parameter>  
23 - <name>xlid</name>  
24 - <default_value>115</default_value>  
25 - <description>&#x7ebf;&#x8def;id</description>  
26 - </parameter>  
27 - </parameters>  
28 - <log>  
29 -<trans-log-table><connection/>  
30 -<schema/>  
31 -<table/>  
32 -<size_limit_lines/>  
33 -<interval/>  
34 -<timeout_days/>  
35 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>  
36 -<perf-log-table><connection/>  
37 -<schema/>  
38 -<table/>  
39 -<interval/>  
40 -<timeout_days/>  
41 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>  
42 -<channel-log-table><connection/>  
43 -<schema/>  
44 -<table/>  
45 -<timeout_days/>  
46 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>  
47 -<step-log-table><connection/>  
48 -<schema/>  
49 -<table/>  
50 -<timeout_days/>  
51 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>  
52 -<metrics-log-table><connection/>  
53 -<schema/>  
54 -<table/>  
55 -<timeout_days/>  
56 -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>  
57 - </log>  
58 - <maxdate>  
59 - <connection/>  
60 - <table/>  
61 - <field/>  
62 - <offset>0.0</offset>  
63 - <maxdiff>0.0</maxdiff>  
64 - </maxdate>  
65 - <size_rowset>10000</size_rowset>  
66 - <sleep_time_empty>50</sleep_time_empty>  
67 - <sleep_time_full>50</sleep_time_full>  
68 - <unique_connections>N</unique_connections>  
69 - <feedback_shown>Y</feedback_shown>  
70 - <feedback_size>50000</feedback_size>  
71 - <using_thread_priorities>Y</using_thread_priorities>  
72 - <shared_objects_file/>  
73 - <capture_step_performance>N</capture_step_performance>  
74 - <step_performance_capturing_delay>1000</step_performance_capturing_delay>  
75 - <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>  
76 - <dependencies>  
77 - </dependencies>  
78 - <partitionschemas>  
79 - </partitionschemas>  
80 - <slaveservers>  
81 - </slaveservers>  
82 - <clusterschemas>  
83 - </clusterschemas>  
84 - <created_user>-</created_user>  
85 - <created_date>2017&#x2f;01&#x2f;09 13&#x3a;35&#x3a;19.384</created_date>  
86 - <modified_user>-</modified_user>  
87 - <modified_date>2017&#x2f;01&#x2f;09 13&#x3a;35&#x3a;19.384</modified_date>  
88 - <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>  
89 - <is_key_private>N</is_key_private>  
90 - </info>  
91 - <notepads>  
92 - <notepad>  
93 - <note>&#x8fd9;&#x91cc;&#x6709;&#x4e9b;&#x95ee;&#x9898;&#xa;&#x5728;window2012&#x7684;&#x73af;&#x5883;&#x4e0b;&#xff0c;&#xa;MySql&#x6570;&#x636e;&#x5e93;&#x67e5;&#x8be2;&#x4e2d;&#x5982;&#x679c;&#x8fd4;&#x56de;&#x4e2d;&#x6587;&#x5185;&#x5bb9;&#x7684;&#x5b57;&#x6bb5;&#xff0c;&#x8fd9;&#x4e2a;&#x5185;&#x5bb9;&#x4e71;&#x7801;&#xa;&#x89e3;&#x51b3;&#x529e;&#x6cd5;&#xff0c;&#x5c31;&#x662f;&#x6570;&#x636e;&#x5e93;&#x67e5;&#x8be2;&#x5168;&#x90e8;&#x7f13;&#x5b58;&#xff0c;&#x5c31;&#x4e0d;&#x4e71;&#x7801;&#xa;linux&#x73af;&#x5883;&#x4e0b;&#x6ca1;&#x95ee;&#x9898;</note>  
94 - <xloc>118</xloc>  
95 - <yloc>158</yloc>  
96 - <width>333</width>  
97 - <heigth>90</heigth>  
98 - <fontname>YaHei Consolas Hybrid</fontname>  
99 - <fontsize>12</fontsize>  
100 - <fontbold>N</fontbold>  
101 - <fontitalic>N</fontitalic>  
102 - <fontcolorred>0</fontcolorred>  
103 - <fontcolorgreen>0</fontcolorgreen>  
104 - <fontcolorblue>0</fontcolorblue>  
105 - <backgroundcolorred>255</backgroundcolorred>  
106 - <backgroundcolorgreen>205</backgroundcolorgreen>  
107 - <backgroundcolorblue>112</backgroundcolorblue>  
108 - <bordercolorred>100</bordercolorred>  
109 - <bordercolorgreen>100</bordercolorgreen>  
110 - <bordercolorblue>100</bordercolorblue>  
111 - <drawshadow>Y</drawshadow>  
112 - </notepad>  
113 - <notepad>  
114 - <note>&#x4f7f;&#x7528;&#x6a21;&#x7248;&#x4f1a;&#x62a5;&#x9519;&#xff0c;&#xa;PDI-5031&#xa;</note>  
115 - <xloc>806</xloc>  
116 - <yloc>315</yloc>  
117 - <width>106</width>  
118 - <heigth>58</heigth>  
119 - <fontname>YaHei Consolas Hybrid</fontname>  
120 - <fontsize>12</fontsize>  
121 - <fontbold>N</fontbold>  
122 - <fontitalic>N</fontitalic>  
123 - <fontcolorred>0</fontcolorred>  
124 - <fontcolorgreen>0</fontcolorgreen>  
125 - <fontcolorblue>0</fontcolorblue>  
126 - <backgroundcolorred>255</backgroundcolorred>  
127 - <backgroundcolorgreen>205</backgroundcolorgreen>  
128 - <backgroundcolorblue>112</backgroundcolorblue>  
129 - <bordercolorred>100</bordercolorred>  
130 - <bordercolorgreen>100</bordercolorgreen>  
131 - <bordercolorblue>100</bordercolorblue>  
132 - <drawshadow>Y</drawshadow>  
133 - </notepad>  
134 - </notepads>  
135 - <connection>  
136 - <name>bus_control_variable</name>  
137 - <server>&#x24;&#x7b;v_db_ip&#x7d;</server>  
138 - <type>MYSQL</type>  
139 - <access>Native</access>  
140 - <database>&#x24;&#x7b;v_db_dname&#x7d;</database>  
141 - <port>3306</port>  
142 - <username>&#x24;&#x7b;v_db_uname&#x7d;</username>  
143 - <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>  
144 - <servername/>  
145 - <data_tablespace/>  
146 - <index_tablespace/>  
147 - <attributes>  
148 - <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute>  
149 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
150 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
151 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
152 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
153 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
154 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
155 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
156 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
157 - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>  
158 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
159 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
160 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
161 - </attributes>  
162 - </connection>  
163 - <connection>  
164 - <name>bus_control_&#x516c;&#x53f8;_201</name>  
165 - <server>localhost</server>  
166 - <type>MYSQL</type>  
167 - <access>Native</access>  
168 - <database>control</database>  
169 - <port>3306</port>  
170 - <username>root</username>  
171 - <password>Encrypted </password>  
172 - <servername/>  
173 - <data_tablespace/>  
174 - <index_tablespace/>  
175 - <attributes>  
176 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
177 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
178 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
179 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
180 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
181 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
182 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
183 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
184 - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>  
185 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
186 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
187 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
188 - </attributes>  
189 - </connection>  
190 - <connection>  
191 - <name>bus_control_&#x672c;&#x673a;</name>  
192 - <server>localhost</server>  
193 - <type>MYSQL</type>  
194 - <access>Native</access>  
195 - <database>control</database>  
196 - <port>3306</port>  
197 - <username>root</username>  
198 - <password>Encrypted </password>  
199 - <servername/>  
200 - <data_tablespace/>  
201 - <index_tablespace/>  
202 - <attributes>  
203 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
204 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
205 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
206 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
207 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
208 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
209 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
210 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
211 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
212 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
213 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
214 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
215 - </attributes>  
216 - </connection>  
217 - <connection>  
218 - <name>xlab_mysql_youle</name>  
219 - <server>101.231.124.8</server>  
220 - <type>MYSQL</type>  
221 - <access>Native</access>  
222 - <database>xlab_youle</database>  
223 - <port>45687</port>  
224 - <username>xlab-youle</username>  
225 - <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>  
226 - <servername/>  
227 - <data_tablespace/>  
228 - <index_tablespace/>  
229 - <attributes>  
230 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
231 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
232 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
233 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
234 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
235 - <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>  
236 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
237 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
238 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
239 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>  
240 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>  
241 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
242 - </attributes>  
243 - </connection>  
244 - <connection>  
245 - <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>  
246 - <server>localhost</server>  
247 - <type>MYSQL</type>  
248 - <access>Native</access>  
249 - <database>xlab_youle</database>  
250 - <port>3306</port>  
251 - <username>root</username>  
252 - <password>Encrypted </password>  
253 - <servername/>  
254 - <data_tablespace/>  
255 - <index_tablespace/>  
256 - <attributes>  
257 - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>  
258 - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>  
259 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
260 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
261 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
262 - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>  
263 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
264 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
265 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
266 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>  
267 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>  
268 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
269 - </attributes>  
270 - </connection>  
271 - <connection>  
272 - <name>xlab_youle</name>  
273 - <server/>  
274 - <type>MYSQL</type>  
275 - <access>JNDI</access>  
276 - <database>xlab_youle</database>  
277 - <port>1521</port>  
278 - <username/>  
279 - <password>Encrypted </password>  
280 - <servername/>  
281 - <data_tablespace/>  
282 - <index_tablespace/>  
283 - <attributes>  
284 - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>  
285 - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>  
286 - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>  
287 - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>  
288 - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>  
289 - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>  
290 - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>  
291 - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>  
292 - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>  
293 - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>  
294 - </attributes>  
295 - </connection>  
296 - <order>  
297 - <hop> <from>&#x6392;&#x7248;&#x89c4;&#x5219;</from><to>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>  
298 - <hop> <from>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</from><to>&#x8f66;&#x8f86;&#x914d;&#x7f6e;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>  
299 - <hop> <from>&#x8f66;&#x8f86;&#x914d;&#x7f6e;&#x67e5;&#x8be2;</from><to>&#x8f66;&#x8f86;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>  
300 - <hop> <from>&#x8f66;&#x8f86;&#x67e5;&#x8be2;</from><to>&#x683c;&#x5f0f;&#x5316;&#x65e5;&#x671f;</to><enabled>Y</enabled> </hop>  
301 - <hop> <from>&#x683c;&#x5f0f;&#x5316;&#x65e5;&#x671f;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>  
302 - <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>  
303 - <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>  
304 - </order>  
305 - <step>  
306 - <name>Excel&#x8f93;&#x51fa;</name>  
307 - <type>ExcelOutput</type>  
308 - <description/>  
309 - <distribute>Y</distribute>  
310 - <custom_distribution/>  
311 - <copies>1</copies>  
312 - <partitioning>  
313 - <method>none</method>  
314 - <schema_name/>  
315 - </partitioning>  
316 - <header>Y</header>  
317 - <footer>N</footer>  
318 - <encoding/>  
319 - <append>N</append>  
320 - <add_to_result_filenames>Y</add_to_result_filenames>  
321 - <file>  
322 - <name>&#x24;&#x7b;filepath&#x7d;</name>  
323 - <extention/>  
324 - <do_not_open_newfile_init>Y</do_not_open_newfile_init>  
325 - <create_parent_folder>N</create_parent_folder>  
326 - <split>N</split>  
327 - <add_date>N</add_date>  
328 - <add_time>N</add_time>  
329 - <SpecifyFormat>N</SpecifyFormat>  
330 - <date_time_format>yyyyMMddHHmmss</date_time_format>  
331 - <sheetname>&#x5de5;&#x4f5c;&#x8868;1</sheetname>  
332 - <autosizecolums>N</autosizecolums>  
333 - <nullisblank>N</nullisblank>  
334 - <protect_sheet>N</protect_sheet>  
335 - <password>Encrypted </password>  
336 - <splitevery>0</splitevery>  
337 - <usetempfiles>N</usetempfiles>  
338 - <tempdirectory/>  
339 - </file>  
340 - <template>  
341 - <enabled>N</enabled>  
342 - <append>N</append>  
343 - <filename>&#x24;&#x7b;templatepath&#x7d;&#x2f;t1.xls</filename>  
344 - </template>  
345 - <fields>  
346 - <field>  
347 - <name>&#x7ebf;&#x8def;</name>  
348 - <type>String</type>  
349 - <format/>  
350 - </field>  
351 - <field>  
352 - <name>&#x5185;&#x90e8;&#x7f16;&#x7801;</name>  
353 - <type>String</type>  
354 - <format/>  
355 - </field>  
356 - <field>  
357 - <name>&#x542f;&#x7528;&#x65e5;&#x671f;</name>  
358 - <type>String</type>  
359 - <format/>  
360 - </field>  
361 - <field>  
362 - <name>&#x8d77;&#x59cb;&#x8def;&#x724c;</name>  
363 - <type>String</type>  
364 - <format/>  
365 - </field>  
366 - <field>  
367 - <name>&#x8def;&#x724c;&#x8303;&#x56f4;</name>  
368 - <type>String</type>  
369 - <format/>  
370 - </field>  
371 - <field>  
372 - <name>&#x8d77;&#x59cb;&#x4eba;&#x5458;</name>  
373 - <type>String</type>  
374 - <format/>  
375 - </field>  
376 - <field>  
377 - <name>&#x4eba;&#x5458;&#x8303;&#x56f4;</name>  
378 - <type>String</type>  
379 - <format/>  
380 - </field>  
381 - <field>  
382 - <name>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</name>  
383 - <type>String</type>  
384 - <format/>  
385 - </field>  
386 - </fields>  
387 - <custom>  
388 - <header_font_name>arial</header_font_name>  
389 - <header_font_size>10</header_font_size>  
390 - <header_font_bold>N</header_font_bold>  
391 - <header_font_italic>N</header_font_italic>  
392 - <header_font_underline>no</header_font_underline>  
393 - <header_font_orientation>horizontal</header_font_orientation>  
394 - <header_font_color>black</header_font_color>  
395 - <header_background_color>none</header_background_color>  
396 - <header_row_height>255</header_row_height>  
397 - <header_alignment>left</header_alignment>  
398 - <header_image/>  
399 - <row_font_name>arial</row_font_name>  
400 - <row_font_size>10</row_font_size>  
401 - <row_font_color>black</row_font_color>  
402 - <row_background_color>none</row_background_color>  
403 - </custom>  
404 - <cluster_schema/>  
405 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
406 - <xloc>707</xloc>  
407 - <yloc>348</yloc>  
408 - <draw>Y</draw>  
409 - </GUI>  
410 - </step>  
411 -  
412 - <step>  
413 - <name>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</name>  
414 - <type>SelectValues</type>  
415 - <description/>  
416 - <distribute>Y</distribute>  
417 - <custom_distribution/>  
418 - <copies>1</copies>  
419 - <partitioning>  
420 - <method>none</method>  
421 - <schema_name/>  
422 - </partitioning>  
423 - <fields> <field> <name>xlmc</name>  
424 - <rename>&#x7ebf;&#x8def;</rename>  
425 - <length>-2</length>  
426 - <precision>-2</precision>  
427 - </field> <field> <name>zbh</name>  
428 - <rename>&#x5185;&#x90e8;&#x7f16;&#x7801;</rename>  
429 - <length>-2</length>  
430 - <precision>-2</precision>  
431 - </field> <field> <name>qyrq</name>  
432 - <rename>&#x542f;&#x7528;&#x65e5;&#x671f;</rename>  
433 - <length>-2</length>  
434 - <precision>-2</precision>  
435 - </field> <field> <name>lp_start</name>  
436 - <rename>&#x8d77;&#x59cb;&#x8def;&#x724c;</rename>  
437 - <length>-2</length>  
438 - <precision>-2</precision>  
439 - </field> <field> <name>lp_names</name>  
440 - <rename>&#x8def;&#x724c;&#x8303;&#x56f4;</rename>  
441 - <length>-2</length>  
442 - <precision>-2</precision>  
443 - </field> <field> <name>ry_start</name>  
444 - <rename>&#x8d77;&#x59cb;&#x4eba;&#x5458;</rename>  
445 - <length>-2</length>  
446 - <precision>-2</precision>  
447 - </field> <field> <name>ry_dbbms</name>  
448 - <rename>&#x4eba;&#x5458;&#x8303;&#x56f4;</rename>  
449 - <length>-2</length>  
450 - <precision>-2</precision>  
451 - </field> <field> <name>fbgs</name>  
452 - <rename>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</rename>  
453 - <length>-2</length>  
454 - <precision>-2</precision>  
455 - </field> <select_unspecified>N</select_unspecified>  
456 - </fields> <cluster_schema/>  
457 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
458 - <xloc>705</xloc>  
459 - <yloc>270</yloc>  
460 - <draw>Y</draw>  
461 - </GUI>  
462 - </step>  
463 -  
464 - <step>  
465 - <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</name>  
466 - <type>SortRows</type>  
467 - <description/>  
468 - <distribute>Y</distribute>  
469 - <custom_distribution/>  
470 - <copies>1</copies>  
471 - <partitioning>  
472 - <method>none</method>  
473 - <schema_name/>  
474 - </partitioning>  
475 - <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>  
476 - <prefix>out</prefix>  
477 - <sort_size>1000000</sort_size>  
478 - <free_memory/>  
479 - <compress>N</compress>  
480 - <compress_variable/>  
481 - <unique_rows>N</unique_rows>  
482 - <fields>  
483 - <field>  
484 - <name>xlmc</name>  
485 - <ascending>Y</ascending>  
486 - <case_sensitive>N</case_sensitive>  
487 - <presorted>N</presorted>  
488 - </field>  
489 - <field>  
490 - <name>zbh</name>  
491 - <ascending>Y</ascending>  
492 - <case_sensitive>N</case_sensitive>  
493 - <presorted>N</presorted>  
494 - </field>  
495 - <field>  
496 - <name>qyrq</name>  
497 - <ascending>Y</ascending>  
498 - <case_sensitive>N</case_sensitive>  
499 - <presorted>N</presorted>  
500 - </field>  
501 - <field>  
502 - <name>lp_names</name>  
503 - <ascending>Y</ascending>  
504 - <case_sensitive>N</case_sensitive>  
505 - <presorted>N</presorted>  
506 - </field>  
507 - <field>  
508 - <name>ry_dbbms</name>  
509 - <ascending>Y</ascending>  
510 - <case_sensitive>N</case_sensitive>  
511 - <presorted>N</presorted>  
512 - </field>  
513 - </fields>  
514 - <cluster_schema/>  
515 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
516 - <xloc>705</xloc>  
517 - <yloc>177</yloc>  
518 - <draw>Y</draw>  
519 - </GUI>  
520 - </step>  
521 -  
522 - <step>  
523 - <name>&#x6392;&#x7248;&#x89c4;&#x5219;</name>  
524 - <type>TableInput</type>  
525 - <description/>  
526 - <distribute>Y</distribute>  
527 - <custom_distribution/>  
528 - <copies>1</copies>  
529 - <partitioning>  
530 - <method>none</method>  
531 - <schema_name/>  
532 - </partitioning>  
533 - <connection>bus_control_variable</connection>  
534 - <sql>SELECT &#x2a; FROM bsth_c_s_sr1_flat&#xa;where xl &#x3d; &#x24;&#x7b;xlid&#x7d;</sql>  
535 - <limit>0</limit>  
536 - <lookup/>  
537 - <execute_each_row>N</execute_each_row>  
538 - <variables_active>Y</variables_active>  
539 - <lazy_conversion_active>N</lazy_conversion_active>  
540 - <cluster_schema/>  
541 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
542 - <xloc>129</xloc>  
543 - <yloc>65</yloc>  
544 - <draw>Y</draw>  
545 - </GUI>  
546 - </step>  
547 -  
548 - <step>  
549 - <name>&#x683c;&#x5f0f;&#x5316;&#x65e5;&#x671f;</name>  
550 - <type>SelectValues</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 - <fields> <select_unspecified>N</select_unspecified>  
560 - <meta> <name>qyrq</name>  
561 - <rename>qyrq</rename>  
562 - <type>String</type>  
563 - <length>-2</length>  
564 - <precision>-2</precision>  
565 - <conversion_mask>yyyy-MM-dd</conversion_mask>  
566 - <date_format_lenient>false</date_format_lenient>  
567 - <date_format_locale/>  
568 - <date_format_timezone/>  
569 - <lenient_string_to_number>false</lenient_string_to_number>  
570 - <encoding/>  
571 - <decimal_symbol/>  
572 - <grouping_symbol/>  
573 - <currency_symbol/>  
574 - <storage_type/>  
575 - </meta> <meta> <name>lp_start</name>  
576 - <rename>lp_start</rename>  
577 - <type>String</type>  
578 - <length>-2</length>  
579 - <precision>-2</precision>  
580 - <conversion_mask/>  
581 - <date_format_lenient>false</date_format_lenient>  
582 - <date_format_locale/>  
583 - <date_format_timezone/>  
584 - <lenient_string_to_number>false</lenient_string_to_number>  
585 - <encoding/>  
586 - <decimal_symbol/>  
587 - <grouping_symbol/>  
588 - <currency_symbol/>  
589 - <storage_type/>  
590 - </meta> <meta> <name>ry_start</name>  
591 - <rename>ry_start</rename>  
592 - <type>String</type>  
593 - <length>-2</length>  
594 - <precision>-2</precision>  
595 - <conversion_mask>&#x23;</conversion_mask>  
596 - <date_format_lenient>false</date_format_lenient>  
597 - <date_format_locale/>  
598 - <date_format_timezone/>  
599 - <lenient_string_to_number>false</lenient_string_to_number>  
600 - <encoding/>  
601 - <decimal_symbol/>  
602 - <grouping_symbol/>  
603 - <currency_symbol/>  
604 - <storage_type/>  
605 - </meta> </fields> <cluster_schema/>  
606 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
607 - <xloc>705</xloc>  
608 - <yloc>65</yloc>  
609 - <draw>Y</draw>  
610 - </GUI>  
611 - </step>  
612 -  
613 - <step>  
614 - <name>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</name>  
615 - <type>DBLookup</type>  
616 - <description/>  
617 - <distribute>Y</distribute>  
618 - <custom_distribution/>  
619 - <copies>1</copies>  
620 - <partitioning>  
621 - <method>none</method>  
622 - <schema_name/>  
623 - </partitioning>  
624 - <connection>bus_control_variable</connection>  
625 - <cache>Y</cache>  
626 - <cache_load_all>Y</cache_load_all>  
627 - <cache_size>0</cache_size>  
628 - <lookup>  
629 - <schema/>  
630 - <table>bsth_c_line</table>  
631 - <orderby/>  
632 - <fail_on_multiple>N</fail_on_multiple>  
633 - <eat_row_on_failure>N</eat_row_on_failure>  
634 - <key>  
635 - <name>xl</name>  
636 - <field>id</field>  
637 - <condition>&#x3d;</condition>  
638 - <name2/>  
639 - </key>  
640 - <value>  
641 - <name>name</name>  
642 - <rename>xlmc</rename>  
643 - <default/>  
644 - <type>String</type>  
645 - </value>  
646 - </lookup>  
647 - <cluster_schema/>  
648 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
649 - <xloc>329</xloc>  
650 - <yloc>65</yloc>  
651 - <draw>Y</draw>  
652 - </GUI>  
653 - </step>  
654 -  
655 - <step>  
656 - <name>&#x8f66;&#x8f86;&#x67e5;&#x8be2;</name>  
657 - <type>DBLookup</type>  
658 - <description/>  
659 - <distribute>Y</distribute>  
660 - <custom_distribution/>  
661 - <copies>1</copies>  
662 - <partitioning>  
663 - <method>none</method>  
664 - <schema_name/>  
665 - </partitioning>  
666 - <connection>bus_control_variable</connection>  
667 - <cache>N</cache>  
668 - <cache_load_all>N</cache_load_all>  
669 - <cache_size>0</cache_size>  
670 - <lookup>  
671 - <schema/>  
672 - <table>bsth_c_cars</table>  
673 - <orderby/>  
674 - <fail_on_multiple>N</fail_on_multiple>  
675 - <eat_row_on_failure>N</eat_row_on_failure>  
676 - <key>  
677 - <name>clid</name>  
678 - <field>id</field>  
679 - <condition>&#x3d;</condition>  
680 - <name2/>  
681 - </key>  
682 - <value>  
683 - <name>inside_code</name>  
684 - <rename>zbh</rename>  
685 - <default/>  
686 - <type>String</type>  
687 - </value>  
688 - </lookup>  
689 - <cluster_schema/>  
690 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
691 - <xloc>600</xloc>  
692 - <yloc>64</yloc>  
693 - <draw>Y</draw>  
694 - </GUI>  
695 - </step>  
696 -  
697 - <step>  
698 - <name>&#x8f66;&#x8f86;&#x914d;&#x7f6e;&#x67e5;&#x8be2;</name>  
699 - <type>DBLookup</type>  
700 - <description/>  
701 - <distribute>Y</distribute>  
702 - <custom_distribution/>  
703 - <copies>1</copies>  
704 - <partitioning>  
705 - <method>none</method>  
706 - <schema_name/>  
707 - </partitioning>  
708 - <connection>bus_control_variable</connection>  
709 - <cache>N</cache>  
710 - <cache_load_all>N</cache_load_all>  
711 - <cache_size>0</cache_size>  
712 - <lookup>  
713 - <schema/>  
714 - <table>bsth_c_s_ccinfo</table>  
715 - <orderby/>  
716 - <fail_on_multiple>N</fail_on_multiple>  
717 - <eat_row_on_failure>N</eat_row_on_failure>  
718 - <key>  
719 - <name>car_config_info</name>  
720 - <field>id</field>  
721 - <condition>&#x3d;</condition>  
722 - <name2/>  
723 - </key>  
724 - <value>  
725 - <name>cl</name>  
726 - <rename>clid</rename>  
727 - <default/>  
728 - <type>Integer</type>  
729 - </value>  
730 - </lookup>  
731 - <cluster_schema/>  
732 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
733 - <xloc>471</xloc>  
734 - <yloc>64</yloc>  
735 - <draw>Y</draw>  
736 - </GUI>  
737 - </step>  
738 -  
739 - <step_error_handling>  
740 - </step_error_handling>  
741 - <slave-step-copy-partition-distribution>  
742 -</slave-step-copy-partition-distribution>  
743 - <slave_transformation>N</slave_transformation>  
744 -  
745 -</transformation> 1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<transformation>
  3 + <info>
  4 + <name>&#x6392;&#x73ed;&#x89c4;&#x5219;&#x4fe1;&#x606f;&#x5bfc;&#x51fa;</name>
  5 + <description/>
  6 + <extended_description/>
  7 + <trans_version/>
  8 + <trans_type>Normal</trans_type>
  9 + <trans_status>0</trans_status>
  10 + <directory>&#x2f;</directory>
  11 + <parameters>
  12 + <parameter>
  13 + <name>filepath</name>
  14 + <default_value>&#x2f;Users&#x2f;xu&#x2f;resource&#x2f;project_code&#x2f;runtime_temp&#x2f;bsth_control_u_d_files&#x2f;test.xls</default_value>
  15 + <description>excel&#x6587;&#x4ef6;&#x8def;&#x5f84;</description>
  16 + </parameter>
  17 + <parameter>
  18 + <name>templatepath</name>
  19 + <default_value>&#x2f;Users&#x2f;xu&#x2f;resource&#x2f;project_code&#x2f;runtime_temp&#x2f;bsth_control_u_d_files&#x2f;template</default_value>
  20 + <description>&#x6a21;&#x7248;&#x6587;&#x4ef6;&#x8def;&#x5f84;</description>
  21 + </parameter>
  22 + <parameter>
  23 + <name>xlid</name>
  24 + <default_value>115</default_value>
  25 + <description>&#x7ebf;&#x8def;id</description>
  26 + </parameter>
  27 + </parameters>
  28 + <log>
  29 +<trans-log-table><connection/>
  30 +<schema/>
  31 +<table/>
  32 +<size_limit_lines/>
  33 +<interval/>
  34 +<timeout_days/>
  35 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>
  36 +<perf-log-table><connection/>
  37 +<schema/>
  38 +<table/>
  39 +<interval/>
  40 +<timeout_days/>
  41 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>
  42 +<channel-log-table><connection/>
  43 +<schema/>
  44 +<table/>
  45 +<timeout_days/>
  46 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>
  47 +<step-log-table><connection/>
  48 +<schema/>
  49 +<table/>
  50 +<timeout_days/>
  51 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>
  52 +<metrics-log-table><connection/>
  53 +<schema/>
  54 +<table/>
  55 +<timeout_days/>
  56 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>
  57 + </log>
  58 + <maxdate>
  59 + <connection/>
  60 + <table/>
  61 + <field/>
  62 + <offset>0.0</offset>
  63 + <maxdiff>0.0</maxdiff>
  64 + </maxdate>
  65 + <size_rowset>10000</size_rowset>
  66 + <sleep_time_empty>50</sleep_time_empty>
  67 + <sleep_time_full>50</sleep_time_full>
  68 + <unique_connections>N</unique_connections>
  69 + <feedback_shown>Y</feedback_shown>
  70 + <feedback_size>50000</feedback_size>
  71 + <using_thread_priorities>Y</using_thread_priorities>
  72 + <shared_objects_file/>
  73 + <capture_step_performance>N</capture_step_performance>
  74 + <step_performance_capturing_delay>1000</step_performance_capturing_delay>
  75 + <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
  76 + <dependencies>
  77 + </dependencies>
  78 + <partitionschemas>
  79 + </partitionschemas>
  80 + <slaveservers>
  81 + </slaveservers>
  82 + <clusterschemas>
  83 + </clusterschemas>
  84 + <created_user>-</created_user>
  85 + <created_date>2017&#x2f;01&#x2f;09 13&#x3a;35&#x3a;19.384</created_date>
  86 + <modified_user>-</modified_user>
  87 + <modified_date>2017&#x2f;01&#x2f;09 13&#x3a;35&#x3a;19.384</modified_date>
  88 + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>
  89 + <is_key_private>N</is_key_private>
  90 + </info>
  91 + <notepads>
  92 + <notepad>
  93 + <note>&#x8fd9;&#x91cc;&#x6709;&#x4e9b;&#x95ee;&#x9898;&#xa;&#x5728;window2012&#x7684;&#x73af;&#x5883;&#x4e0b;&#xff0c;&#xa;MySql&#x6570;&#x636e;&#x5e93;&#x67e5;&#x8be2;&#x4e2d;&#x5982;&#x679c;&#x8fd4;&#x56de;&#x4e2d;&#x6587;&#x5185;&#x5bb9;&#x7684;&#x5b57;&#x6bb5;&#xff0c;&#x8fd9;&#x4e2a;&#x5185;&#x5bb9;&#x4e71;&#x7801;&#xa;&#x89e3;&#x51b3;&#x529e;&#x6cd5;&#xff0c;&#x5c31;&#x662f;&#x6570;&#x636e;&#x5e93;&#x67e5;&#x8be2;&#x5168;&#x90e8;&#x7f13;&#x5b58;&#xff0c;&#x5c31;&#x4e0d;&#x4e71;&#x7801;&#xa;linux&#x73af;&#x5883;&#x4e0b;&#x6ca1;&#x95ee;&#x9898;</note>
  94 + <xloc>118</xloc>
  95 + <yloc>158</yloc>
  96 + <width>333</width>
  97 + <heigth>90</heigth>
  98 + <fontname>YaHei Consolas Hybrid</fontname>
  99 + <fontsize>12</fontsize>
  100 + <fontbold>N</fontbold>
  101 + <fontitalic>N</fontitalic>
  102 + <fontcolorred>0</fontcolorred>
  103 + <fontcolorgreen>0</fontcolorgreen>
  104 + <fontcolorblue>0</fontcolorblue>
  105 + <backgroundcolorred>255</backgroundcolorred>
  106 + <backgroundcolorgreen>205</backgroundcolorgreen>
  107 + <backgroundcolorblue>112</backgroundcolorblue>
  108 + <bordercolorred>100</bordercolorred>
  109 + <bordercolorgreen>100</bordercolorgreen>
  110 + <bordercolorblue>100</bordercolorblue>
  111 + <drawshadow>Y</drawshadow>
  112 + </notepad>
  113 + <notepad>
  114 + <note>&#x4f7f;&#x7528;&#x6a21;&#x7248;&#x4f1a;&#x62a5;&#x9519;&#xff0c;&#xa;PDI-5031&#xa;</note>
  115 + <xloc>806</xloc>
  116 + <yloc>315</yloc>
  117 + <width>106</width>
  118 + <heigth>58</heigth>
  119 + <fontname>YaHei Consolas Hybrid</fontname>
  120 + <fontsize>12</fontsize>
  121 + <fontbold>N</fontbold>
  122 + <fontitalic>N</fontitalic>
  123 + <fontcolorred>0</fontcolorred>
  124 + <fontcolorgreen>0</fontcolorgreen>
  125 + <fontcolorblue>0</fontcolorblue>
  126 + <backgroundcolorred>255</backgroundcolorred>
  127 + <backgroundcolorgreen>205</backgroundcolorgreen>
  128 + <backgroundcolorblue>112</backgroundcolorblue>
  129 + <bordercolorred>100</bordercolorred>
  130 + <bordercolorgreen>100</bordercolorgreen>
  131 + <bordercolorblue>100</bordercolorblue>
  132 + <drawshadow>Y</drawshadow>
  133 + </notepad>
  134 + </notepads>
  135 + <connection>
  136 + <name>bus_control_variable</name>
  137 + <server>&#x24;&#x7b;v_db_ip&#x7d;</server>
  138 + <type>MYSQL</type>
  139 + <access>Native</access>
  140 + <database>&#x24;&#x7b;v_db_dname&#x7d;</database>
  141 + <port>3306</port>
  142 + <username>&#x24;&#x7b;v_db_uname&#x7d;</username>
  143 + <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>
  144 + <servername/>
  145 + <data_tablespace/>
  146 + <index_tablespace/>
  147 + <attributes>
  148 + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute>
  149 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  150 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  151 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  152 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  153 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  154 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  155 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  156 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  157 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  158 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  159 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  160 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  161 + </attributes>
  162 + </connection>
  163 + <connection>
  164 + <name>bus_control_&#x516c;&#x53f8;_201</name>
  165 + <server>localhost</server>
  166 + <type>MYSQL</type>
  167 + <access>Native</access>
  168 + <database>control</database>
  169 + <port>3306</port>
  170 + <username>root</username>
  171 + <password>Encrypted </password>
  172 + <servername/>
  173 + <data_tablespace/>
  174 + <index_tablespace/>
  175 + <attributes>
  176 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  177 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  178 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  179 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  180 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  181 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  182 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  183 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  184 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  185 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  186 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  187 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  188 + </attributes>
  189 + </connection>
  190 + <connection>
  191 + <name>bus_control_&#x672c;&#x673a;</name>
  192 + <server>localhost</server>
  193 + <type>MYSQL</type>
  194 + <access>Native</access>
  195 + <database>control</database>
  196 + <port>3306</port>
  197 + <username>root</username>
  198 + <password>Encrypted </password>
  199 + <servername/>
  200 + <data_tablespace/>
  201 + <index_tablespace/>
  202 + <attributes>
  203 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  204 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  205 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  206 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  207 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  208 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  209 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  210 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  211 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  212 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  213 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  214 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  215 + </attributes>
  216 + </connection>
  217 + <connection>
  218 + <name>xlab_mysql_youle</name>
  219 + <server>101.231.124.8</server>
  220 + <type>MYSQL</type>
  221 + <access>Native</access>
  222 + <database>xlab_youle</database>
  223 + <port>45687</port>
  224 + <username>xlab-youle</username>
  225 + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>
  226 + <servername/>
  227 + <data_tablespace/>
  228 + <index_tablespace/>
  229 + <attributes>
  230 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  231 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  232 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  233 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  234 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  235 + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>
  236 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  237 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  238 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  239 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  240 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  241 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  242 + </attributes>
  243 + </connection>
  244 + <connection>
  245 + <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>
  246 + <server>localhost</server>
  247 + <type>MYSQL</type>
  248 + <access>Native</access>
  249 + <database>xlab_youle</database>
  250 + <port>3306</port>
  251 + <username>root</username>
  252 + <password>Encrypted </password>
  253 + <servername/>
  254 + <data_tablespace/>
  255 + <index_tablespace/>
  256 + <attributes>
  257 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  258 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  259 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  260 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  261 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  262 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  263 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  264 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  265 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  266 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  267 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  268 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  269 + </attributes>
  270 + </connection>
  271 + <connection>
  272 + <name>xlab_youle</name>
  273 + <server/>
  274 + <type>MYSQL</type>
  275 + <access>JNDI</access>
  276 + <database>xlab_youle</database>
  277 + <port>1521</port>
  278 + <username/>
  279 + <password>Encrypted </password>
  280 + <servername/>
  281 + <data_tablespace/>
  282 + <index_tablespace/>
  283 + <attributes>
  284 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  285 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  286 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  287 + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
  288 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  289 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  290 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  291 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  292 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  293 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  294 + </attributes>
  295 + </connection>
  296 + <order>
  297 + <hop> <from>&#x6392;&#x7248;&#x89c4;&#x5219;</from><to>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  298 + <hop> <from>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</from><to>&#x8f66;&#x8f86;&#x914d;&#x7f6e;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  299 + <hop> <from>&#x8f66;&#x8f86;&#x914d;&#x7f6e;&#x67e5;&#x8be2;</from><to>&#x8f66;&#x8f86;&#x67e5;&#x8be2;</to><enabled>Y</enabled> </hop>
  300 + <hop> <from>&#x8f66;&#x8f86;&#x67e5;&#x8be2;</from><to>&#x683c;&#x5f0f;&#x5316;&#x65e5;&#x671f;</to><enabled>Y</enabled> </hop>
  301 + <hop> <from>&#x683c;&#x5f0f;&#x5316;&#x65e5;&#x671f;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  302 + <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>
  303 + <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
  304 + </order>
  305 + <step>
  306 + <name>Excel&#x8f93;&#x51fa;</name>
  307 + <type>ExcelOutput</type>
  308 + <description/>
  309 + <distribute>Y</distribute>
  310 + <custom_distribution/>
  311 + <copies>1</copies>
  312 + <partitioning>
  313 + <method>none</method>
  314 + <schema_name/>
  315 + </partitioning>
  316 + <header>Y</header>
  317 + <footer>N</footer>
  318 + <encoding/>
  319 + <append>N</append>
  320 + <add_to_result_filenames>Y</add_to_result_filenames>
  321 + <file>
  322 + <name>&#x24;&#x7b;filepath&#x7d;</name>
  323 + <extention/>
  324 + <do_not_open_newfile_init>Y</do_not_open_newfile_init>
  325 + <create_parent_folder>N</create_parent_folder>
  326 + <split>N</split>
  327 + <add_date>N</add_date>
  328 + <add_time>N</add_time>
  329 + <SpecifyFormat>N</SpecifyFormat>
  330 + <date_time_format>yyyyMMddHHmmss</date_time_format>
  331 + <sheetname>&#x5de5;&#x4f5c;&#x8868;1</sheetname>
  332 + <autosizecolums>N</autosizecolums>
  333 + <nullisblank>N</nullisblank>
  334 + <protect_sheet>N</protect_sheet>
  335 + <password>Encrypted </password>
  336 + <splitevery>0</splitevery>
  337 + <usetempfiles>N</usetempfiles>
  338 + <tempdirectory/>
  339 + </file>
  340 + <template>
  341 + <enabled>N</enabled>
  342 + <append>N</append>
  343 + <filename>&#x24;&#x7b;templatepath&#x7d;&#x2f;t1.xls</filename>
  344 + </template>
  345 + <fields>
  346 + <field>
  347 + <name>&#x7ebf;&#x8def;</name>
  348 + <type>String</type>
  349 + <format/>
  350 + </field>
  351 + <field>
  352 + <name>&#x5185;&#x90e8;&#x7f16;&#x7801;</name>
  353 + <type>String</type>
  354 + <format/>
  355 + </field>
  356 + <field>
  357 + <name>&#x542f;&#x7528;&#x65e5;&#x671f;</name>
  358 + <type>String</type>
  359 + <format/>
  360 + </field>
  361 + <field>
  362 + <name>&#x8d77;&#x59cb;&#x8def;&#x724c;</name>
  363 + <type>String</type>
  364 + <format/>
  365 + </field>
  366 + <field>
  367 + <name>&#x8def;&#x724c;&#x8303;&#x56f4;</name>
  368 + <type>String</type>
  369 + <format/>
  370 + </field>
  371 + <field>
  372 + <name>&#x8d77;&#x59cb;&#x4eba;&#x5458;</name>
  373 + <type>String</type>
  374 + <format/>
  375 + </field>
  376 + <field>
  377 + <name>&#x4eba;&#x5458;&#x8303;&#x56f4;</name>
  378 + <type>String</type>
  379 + <format/>
  380 + </field>
  381 + <field>
  382 + <name>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</name>
  383 + <type>String</type>
  384 + <format/>
  385 + </field>
  386 + </fields>
  387 + <custom>
  388 + <header_font_name>arial</header_font_name>
  389 + <header_font_size>10</header_font_size>
  390 + <header_font_bold>N</header_font_bold>
  391 + <header_font_italic>N</header_font_italic>
  392 + <header_font_underline>no</header_font_underline>
  393 + <header_font_orientation>horizontal</header_font_orientation>
  394 + <header_font_color>black</header_font_color>
  395 + <header_background_color>none</header_background_color>
  396 + <header_row_height>255</header_row_height>
  397 + <header_alignment>left</header_alignment>
  398 + <header_image/>
  399 + <row_font_name>arial</row_font_name>
  400 + <row_font_size>10</row_font_size>
  401 + <row_font_color>black</row_font_color>
  402 + <row_background_color>none</row_background_color>
  403 + </custom>
  404 + <cluster_schema/>
  405 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  406 + <xloc>707</xloc>
  407 + <yloc>348</yloc>
  408 + <draw>Y</draw>
  409 + </GUI>
  410 + </step>
  411 +
  412 + <step>
  413 + <name>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</name>
  414 + <type>SelectValues</type>
  415 + <description/>
  416 + <distribute>Y</distribute>
  417 + <custom_distribution/>
  418 + <copies>1</copies>
  419 + <partitioning>
  420 + <method>none</method>
  421 + <schema_name/>
  422 + </partitioning>
  423 + <fields> <field> <name>xlmc</name>
  424 + <rename>&#x7ebf;&#x8def;</rename>
  425 + <length>-2</length>
  426 + <precision>-2</precision>
  427 + </field> <field> <name>zbh</name>
  428 + <rename>&#x5185;&#x90e8;&#x7f16;&#x7801;</rename>
  429 + <length>-2</length>
  430 + <precision>-2</precision>
  431 + </field> <field> <name>qyrq</name>
  432 + <rename>&#x542f;&#x7528;&#x65e5;&#x671f;</rename>
  433 + <length>-2</length>
  434 + <precision>-2</precision>
  435 + </field> <field> <name>lp_start</name>
  436 + <rename>&#x8d77;&#x59cb;&#x8def;&#x724c;</rename>
  437 + <length>-2</length>
  438 + <precision>-2</precision>
  439 + </field> <field> <name>lp_names</name>
  440 + <rename>&#x8def;&#x724c;&#x8303;&#x56f4;</rename>
  441 + <length>-2</length>
  442 + <precision>-2</precision>
  443 + </field> <field> <name>ry_start</name>
  444 + <rename>&#x8d77;&#x59cb;&#x4eba;&#x5458;</rename>
  445 + <length>-2</length>
  446 + <precision>-2</precision>
  447 + </field> <field> <name>ry_dbbms</name>
  448 + <rename>&#x4eba;&#x5458;&#x8303;&#x56f4;</rename>
  449 + <length>-2</length>
  450 + <precision>-2</precision>
  451 + </field> <field> <name>fbgs</name>
  452 + <rename>&#x7ffb;&#x73ed;&#x683c;&#x5f0f;</rename>
  453 + <length>-2</length>
  454 + <precision>-2</precision>
  455 + </field> <select_unspecified>N</select_unspecified>
  456 + </fields> <cluster_schema/>
  457 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  458 + <xloc>705</xloc>
  459 + <yloc>270</yloc>
  460 + <draw>Y</draw>
  461 + </GUI>
  462 + </step>
  463 +
  464 + <step>
  465 + <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</name>
  466 + <type>SortRows</type>
  467 + <description/>
  468 + <distribute>Y</distribute>
  469 + <custom_distribution/>
  470 + <copies>1</copies>
  471 + <partitioning>
  472 + <method>none</method>
  473 + <schema_name/>
  474 + </partitioning>
  475 + <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>
  476 + <prefix>out</prefix>
  477 + <sort_size>1000000</sort_size>
  478 + <free_memory/>
  479 + <compress>N</compress>
  480 + <compress_variable/>
  481 + <unique_rows>N</unique_rows>
  482 + <fields>
  483 + <field>
  484 + <name>xlmc</name>
  485 + <ascending>Y</ascending>
  486 + <case_sensitive>N</case_sensitive>
  487 + <presorted>N</presorted>
  488 + </field>
  489 + <field>
  490 + <name>zbh</name>
  491 + <ascending>Y</ascending>
  492 + <case_sensitive>N</case_sensitive>
  493 + <presorted>N</presorted>
  494 + </field>
  495 + <field>
  496 + <name>qyrq</name>
  497 + <ascending>Y</ascending>
  498 + <case_sensitive>N</case_sensitive>
  499 + <presorted>N</presorted>
  500 + </field>
  501 + <field>
  502 + <name>lp_names</name>
  503 + <ascending>Y</ascending>
  504 + <case_sensitive>N</case_sensitive>
  505 + <presorted>N</presorted>
  506 + </field>
  507 + <field>
  508 + <name>ry_dbbms</name>
  509 + <ascending>Y</ascending>
  510 + <case_sensitive>N</case_sensitive>
  511 + <presorted>N</presorted>
  512 + </field>
  513 + </fields>
  514 + <cluster_schema/>
  515 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  516 + <xloc>705</xloc>
  517 + <yloc>177</yloc>
  518 + <draw>Y</draw>
  519 + </GUI>
  520 + </step>
  521 +
  522 + <step>
  523 + <name>&#x6392;&#x7248;&#x89c4;&#x5219;</name>
  524 + <type>TableInput</type>
  525 + <description/>
  526 + <distribute>Y</distribute>
  527 + <custom_distribution/>
  528 + <copies>1</copies>
  529 + <partitioning>
  530 + <method>none</method>
  531 + <schema_name/>
  532 + </partitioning>
  533 + <connection>bus_control_variable</connection>
  534 + <sql>SELECT &#x2a; FROM bsth_c_s_sr1_flat&#xa;where xl &#x3d; &#x24;&#x7b;xlid&#x7d;</sql>
  535 + <limit>0</limit>
  536 + <lookup/>
  537 + <execute_each_row>N</execute_each_row>
  538 + <variables_active>Y</variables_active>
  539 + <lazy_conversion_active>N</lazy_conversion_active>
  540 + <cluster_schema/>
  541 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  542 + <xloc>129</xloc>
  543 + <yloc>65</yloc>
  544 + <draw>Y</draw>
  545 + </GUI>
  546 + </step>
  547 +
  548 + <step>
  549 + <name>&#x683c;&#x5f0f;&#x5316;&#x65e5;&#x671f;</name>
  550 + <type>SelectValues</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 + <fields> <select_unspecified>N</select_unspecified>
  560 + <meta> <name>qyrq</name>
  561 + <rename>qyrq</rename>
  562 + <type>String</type>
  563 + <length>-2</length>
  564 + <precision>-2</precision>
  565 + <conversion_mask>yyyy-MM-dd</conversion_mask>
  566 + <date_format_lenient>false</date_format_lenient>
  567 + <date_format_locale/>
  568 + <date_format_timezone/>
  569 + <lenient_string_to_number>false</lenient_string_to_number>
  570 + <encoding/>
  571 + <decimal_symbol/>
  572 + <grouping_symbol/>
  573 + <currency_symbol/>
  574 + <storage_type/>
  575 + </meta> <meta> <name>lp_start</name>
  576 + <rename>lp_start</rename>
  577 + <type>String</type>
  578 + <length>-2</length>
  579 + <precision>-2</precision>
  580 + <conversion_mask/>
  581 + <date_format_lenient>false</date_format_lenient>
  582 + <date_format_locale/>
  583 + <date_format_timezone/>
  584 + <lenient_string_to_number>false</lenient_string_to_number>
  585 + <encoding/>
  586 + <decimal_symbol/>
  587 + <grouping_symbol/>
  588 + <currency_symbol/>
  589 + <storage_type/>
  590 + </meta> <meta> <name>ry_start</name>
  591 + <rename>ry_start</rename>
  592 + <type>String</type>
  593 + <length>-2</length>
  594 + <precision>-2</precision>
  595 + <conversion_mask>&#x23;</conversion_mask>
  596 + <date_format_lenient>false</date_format_lenient>
  597 + <date_format_locale/>
  598 + <date_format_timezone/>
  599 + <lenient_string_to_number>false</lenient_string_to_number>
  600 + <encoding/>
  601 + <decimal_symbol/>
  602 + <grouping_symbol/>
  603 + <currency_symbol/>
  604 + <storage_type/>
  605 + </meta> </fields> <cluster_schema/>
  606 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  607 + <xloc>705</xloc>
  608 + <yloc>65</yloc>
  609 + <draw>Y</draw>
  610 + </GUI>
  611 + </step>
  612 +
  613 + <step>
  614 + <name>&#x7ebf;&#x8def;&#x67e5;&#x8be2;</name>
  615 + <type>DBLookup</type>
  616 + <description/>
  617 + <distribute>Y</distribute>
  618 + <custom_distribution/>
  619 + <copies>1</copies>
  620 + <partitioning>
  621 + <method>none</method>
  622 + <schema_name/>
  623 + </partitioning>
  624 + <connection>bus_control_variable</connection>
  625 + <cache>Y</cache>
  626 + <cache_load_all>Y</cache_load_all>
  627 + <cache_size>0</cache_size>
  628 + <lookup>
  629 + <schema/>
  630 + <table>bsth_c_line</table>
  631 + <orderby/>
  632 + <fail_on_multiple>N</fail_on_multiple>
  633 + <eat_row_on_failure>N</eat_row_on_failure>
  634 + <key>
  635 + <name>xl</name>
  636 + <field>id</field>
  637 + <condition>&#x3d;</condition>
  638 + <name2/>
  639 + </key>
  640 + <value>
  641 + <name>name</name>
  642 + <rename>xlmc</rename>
  643 + <default/>
  644 + <type>String</type>
  645 + </value>
  646 + </lookup>
  647 + <cluster_schema/>
  648 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  649 + <xloc>329</xloc>
  650 + <yloc>65</yloc>
  651 + <draw>Y</draw>
  652 + </GUI>
  653 + </step>
  654 +
  655 + <step>
  656 + <name>&#x8f66;&#x8f86;&#x67e5;&#x8be2;</name>
  657 + <type>DBLookup</type>
  658 + <description/>
  659 + <distribute>Y</distribute>
  660 + <custom_distribution/>
  661 + <copies>1</copies>
  662 + <partitioning>
  663 + <method>none</method>
  664 + <schema_name/>
  665 + </partitioning>
  666 + <connection>bus_control_variable</connection>
  667 + <cache>N</cache>
  668 + <cache_load_all>N</cache_load_all>
  669 + <cache_size>0</cache_size>
  670 + <lookup>
  671 + <schema/>
  672 + <table>bsth_c_cars</table>
  673 + <orderby/>
  674 + <fail_on_multiple>N</fail_on_multiple>
  675 + <eat_row_on_failure>N</eat_row_on_failure>
  676 + <key>
  677 + <name>clid</name>
  678 + <field>id</field>
  679 + <condition>&#x3d;</condition>
  680 + <name2/>
  681 + </key>
  682 + <value>
  683 + <name>inside_code</name>
  684 + <rename>zbh</rename>
  685 + <default/>
  686 + <type>String</type>
  687 + </value>
  688 + </lookup>
  689 + <cluster_schema/>
  690 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  691 + <xloc>600</xloc>
  692 + <yloc>64</yloc>
  693 + <draw>Y</draw>
  694 + </GUI>
  695 + </step>
  696 +
  697 + <step>
  698 + <name>&#x8f66;&#x8f86;&#x914d;&#x7f6e;&#x67e5;&#x8be2;</name>
  699 + <type>DBLookup</type>
  700 + <description/>
  701 + <distribute>Y</distribute>
  702 + <custom_distribution/>
  703 + <copies>1</copies>
  704 + <partitioning>
  705 + <method>none</method>
  706 + <schema_name/>
  707 + </partitioning>
  708 + <connection>bus_control_variable</connection>
  709 + <cache>N</cache>
  710 + <cache_load_all>N</cache_load_all>
  711 + <cache_size>0</cache_size>
  712 + <lookup>
  713 + <schema/>
  714 + <table>bsth_c_s_ccinfo</table>
  715 + <orderby/>
  716 + <fail_on_multiple>N</fail_on_multiple>
  717 + <eat_row_on_failure>N</eat_row_on_failure>
  718 + <key>
  719 + <name>car_config_info</name>
  720 + <field>id</field>
  721 + <condition>&#x3d;</condition>
  722 + <name2/>
  723 + </key>
  724 + <value>
  725 + <name>cl</name>
  726 + <rename>clid</rename>
  727 + <default/>
  728 + <type>Integer</type>
  729 + </value>
  730 + </lookup>
  731 + <cluster_schema/>
  732 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  733 + <xloc>471</xloc>
  734 + <yloc>64</yloc>
  735 + <draw>Y</draw>
  736 + </GUI>
  737 + </step>
  738 +
  739 + <step_error_handling>
  740 + </step_error_handling>
  741 + <slave-step-copy-partition-distribution>
  742 +</slave-step-copy-partition-distribution>
  743 + <slave_transformation>N</slave_transformation>
  744 +
  745 +</transformation>
src/main/resources/static/pages/base/timesmodel/js/ContextJS/css/context.standalone.css
1 -/**  
2 - * ContextJS Styles  
3 - * For use WITHOUT Twitters Bootstrap CSS  
4 - */  
5 -  
6 -.nav-header {  
7 - display: block;  
8 - padding: 3px 15px;  
9 - font-size: 11px;  
10 - font-weight: bold;  
11 - line-height: 20px;  
12 - color: #999;  
13 - text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);  
14 - text-transform: uppercase;  
15 -}  
16 -.dropdown-menu {  
17 - position: absolute;  
18 - top: 100%;  
19 - left: 0;  
20 - /* z-index: 1000; */  
21 - z-index: 100000 !important;  
22 - display: none;  
23 - float: left;  
24 - min-width: 160px;  
25 - padding: 5px 0;  
26 - margin: 2px 0 0;  
27 - list-style: none;  
28 - background-color: #ffffff;  
29 - border: 1px solid #ccc;  
30 - border: 1px solid rgba(0, 0, 0, 0.2);  
31 - font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;  
32 - font-size: 14px;  
33 - *border-right-width: 2px;  
34 - *border-bottom-width: 2px;  
35 - -webkit-border-radius: 6px;  
36 - -moz-border-radius: 6px;  
37 - border-radius: 6px;  
38 - -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);  
39 - -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);  
40 - box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);  
41 - -webkit-background-clip: padding-box;  
42 - -moz-background-clip: padding;  
43 - background-clip: padding-box;  
44 - text-align:left;  
45 -}  
46 -.dropdown-menu.pull-right {  
47 - right: 0;  
48 - left: auto;  
49 -}  
50 -.dropdown-menu .divider {  
51 - *width: 100%;  
52 - height: 1px;  
53 - margin: 9px 1px;  
54 - *margin: -5px 0 5px;  
55 - overflow: hidden;  
56 - background-color: #e5e5e5;  
57 - border-bottom: 1px solid #ffffff;  
58 -}  
59 -.dropdown-menu a {  
60 - display: block;  
61 - padding: 3px 20px;  
62 - clear: both;  
63 - font-weight: normal;  
64 - line-height: 20px;  
65 - color: #333333;  
66 - white-space: nowrap;  
67 - text-decoration: none;  
68 -}  
69 -.dropdown-menu li > a:hover, .dropdown-menu li > a:focus, .dropdown-submenu:hover > a {  
70 - color: #ffffff;  
71 - text-decoration: none;  
72 - background-color: #0088cc;  
73 - background-color: #0081c2;  
74 - background-image: -moz-linear-gradient(top, #0088cc, #0077b3);  
75 - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));  
76 - background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);  
77 - background-image: -o-linear-gradient(top, #0088cc, #0077b3);  
78 - background-image: linear-gradient(to bottom, #0088cc, #0077b3);  
79 - background-repeat: repeat-x;  
80 - filter: progid: dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);  
81 -}  
82 -.dropdown-menu .active > a, .dropdown-menu .active > a:hover {  
83 - color: #ffffff;  
84 - text-decoration: none;  
85 - background-color: #0088cc;  
86 - background-color: #0081c2;  
87 - background-image: linear-gradient(to bottom, #0088cc, #0077b3);  
88 - background-image: -moz-linear-gradient(top, #0088cc, #0077b3);  
89 - background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));  
90 - background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);  
91 - background-image: -o-linear-gradient(top, #0088cc, #0077b3);  
92 - background-repeat: repeat-x;  
93 - outline: 0;  
94 - filter: progid  
95 - : dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);  
96 -}  
97 -.dropdown-menu .disabled > a, .dropdown-menu .disabled > a:hover {  
98 - color: #999999;  
99 -}  
100 -.dropdown-menu .disabled > a:hover {  
101 - text-decoration: none;  
102 - cursor: default;  
103 - background-color: transparent;  
104 -}  
105 -.open {  
106 - *z-index: 1000;  
107 -}  
108 -.open > .dropdown-menu {  
109 - display: block;  
110 -}  
111 -.pull-right > .dropdown-menu {  
112 - right: 0;  
113 - left: auto;  
114 -}  
115 -.dropup .caret, .navbar-fixed-bottom .dropdown .caret {  
116 - border-top: 0;  
117 - border-bottom: 4px solid #000000;  
118 - content: "\2191";  
119 -}  
120 -.dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu {  
121 - top: auto;  
122 - bottom: 100%;  
123 - margin-bottom: 1px;  
124 -}  
125 -.dropdown-submenu {  
126 - position: relative;  
127 -}  
128 -.dropdown-submenu > .dropdown-menu {  
129 - top: 0;  
130 - left: 100%;  
131 - margin-top: -6px;  
132 - margin-left: -1px;  
133 - -webkit-border-radius: 0 6px 6px 6px;  
134 - -moz-border-radius: 0 6px 6px 6px;  
135 - border-radius: 0 6px 6px 6px;  
136 -}  
137 -.dropdown-submenu > .dropdown-menu.drop-left{  
138 - left:-100%;  
139 -}  
140 -.dropdown-submenu:hover .dropdown-menu {  
141 - display: block;  
142 -}  
143 -.dropdown-submenu > a:after {  
144 - display: block;  
145 - float: right;  
146 - width: 0;  
147 - height: 0;  
148 - margin-top: 5px;  
149 - margin-right: -10px;  
150 - border-color: transparent;  
151 - border-left-color: #cccccc;  
152 - border-style: solid;  
153 - border-width: 5px 0 5px 5px;  
154 - content: " ";  
155 -}  
156 -.dropdown-submenu:hover > a:after {  
157 - border-left-color: #ffffff;  
158 -}  
159 -.dropdown .dropdown-menu .nav-header {  
160 - padding-right: 20px;  
161 - padding-left: 20px;  
162 -}  
163 -/**  
164 - * Context Styles  
165 - */  
166 -  
167 -.dropdown-context .nav-header {  
168 - cursor: default;  
169 -}  
170 -.dropdown-context:before, .dropdown-context-up:before {  
171 - position: absolute;  
172 - top: -7px;  
173 - left: 9px;  
174 - display: inline-block;  
175 - border-right: 7px solid transparent;  
176 - border-bottom: 7px solid #ccc;  
177 - border-left: 7px solid transparent;  
178 - border-bottom-color: rgba(0, 0, 0, 0.2);  
179 - content: '';  
180 -}  
181 -.dropdown-context:after, .dropdown-context-up:after {  
182 - position: absolute;  
183 - top: -6px;  
184 - left: 10px;  
185 - display: inline-block;  
186 - border-right: 6px solid transparent;  
187 - border-bottom: 6px solid #ffffff;  
188 - border-left: 6px solid transparent;  
189 - content: '';  
190 -}  
191 -.dropdown-context-up:before, .dropdown-context-up:after {  
192 - top: auto;  
193 - bottom: -7px;  
194 - z-index: 9999;  
195 -}  
196 -.dropdown-context-up:before {  
197 - border-right: 7px solid transparent;  
198 - border-top: 7px solid #ccc;  
199 - border-bottom: none;  
200 - border-left: 7px solid transparent;  
201 -}  
202 -.dropdown-context-up:after {  
203 - border-right: 6px solid transparent;  
204 - border-top: 6px solid #ffffff;  
205 - border-left: 6px solid transparent;  
206 - border-bottom: none;  
207 -}  
208 -.dropdown-context-sub:before, .dropdown-context-sub:after {  
209 - display: none;  
210 -}  
211 -.dropdown-context .dropdown-submenu:hover .dropdown-menu {  
212 - display: none;  
213 -}  
214 -.dropdown-context .dropdown-submenu:hover > .dropdown-menu {  
215 - display: block;  
216 -}  
217 -  
218 -.compressed-context a{  
219 - padding-left: 14px;  
220 - padding-top: 0;  
221 - padding-bottom: 0;  
222 - font-size: 13px;  
223 - }  
224 -.compressed-context .divider{  
225 - margin: 5px 1px;  
226 - }  
227 -.compressed-context .nav-header{  
228 - padding:1px 13px;  
229 - } 1 +/**
  2 + * ContextJS Styles
  3 + * For use WITHOUT Twitters Bootstrap CSS
  4 + */
  5 +
  6 +.nav-header {
  7 + display: block;
  8 + padding: 3px 15px;
  9 + font-size: 11px;
  10 + font-weight: bold;
  11 + line-height: 20px;
  12 + color: #999;
  13 + text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  14 + text-transform: uppercase;
  15 +}
  16 +.dropdown-menu {
  17 + position: absolute;
  18 + top: 100%;
  19 + left: 0;
  20 + /* z-index: 1000; */
  21 + z-index: 100000 !important;
  22 + display: none;
  23 + float: left;
  24 + min-width: 160px;
  25 + padding: 5px 0;
  26 + margin: 2px 0 0;
  27 + list-style: none;
  28 + background-color: #ffffff;
  29 + border: 1px solid #ccc;
  30 + border: 1px solid rgba(0, 0, 0, 0.2);
  31 + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
  32 + font-size: 14px;
  33 + *border-right-width: 2px;
  34 + *border-bottom-width: 2px;
  35 + -webkit-border-radius: 6px;
  36 + -moz-border-radius: 6px;
  37 + border-radius: 6px;
  38 + -webkit-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  39 + -moz-box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  40 + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
  41 + -webkit-background-clip: padding-box;
  42 + -moz-background-clip: padding;
  43 + background-clip: padding-box;
  44 + text-align:left;
  45 +}
  46 +.dropdown-menu.pull-right {
  47 + right: 0;
  48 + left: auto;
  49 +}
  50 +.dropdown-menu .divider {
  51 + *width: 100%;
  52 + height: 1px;
  53 + margin: 9px 1px;
  54 + *margin: -5px 0 5px;
  55 + overflow: hidden;
  56 + background-color: #e5e5e5;
  57 + border-bottom: 1px solid #ffffff;
  58 +}
  59 +.dropdown-menu a {
  60 + display: block;
  61 + padding: 3px 20px;
  62 + clear: both;
  63 + font-weight: normal;
  64 + line-height: 20px;
  65 + color: #333333;
  66 + white-space: nowrap;
  67 + text-decoration: none;
  68 +}
  69 +.dropdown-menu li > a:hover, .dropdown-menu li > a:focus, .dropdown-submenu:hover > a {
  70 + color: #ffffff;
  71 + text-decoration: none;
  72 + background-color: #0088cc;
  73 + background-color: #0081c2;
  74 + background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
  75 + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
  76 + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
  77 + background-image: -o-linear-gradient(top, #0088cc, #0077b3);
  78 + background-image: linear-gradient(to bottom, #0088cc, #0077b3);
  79 + background-repeat: repeat-x;
  80 + filter: progid: dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
  81 +}
  82 +.dropdown-menu .active > a, .dropdown-menu .active > a:hover {
  83 + color: #ffffff;
  84 + text-decoration: none;
  85 + background-color: #0088cc;
  86 + background-color: #0081c2;
  87 + background-image: linear-gradient(to bottom, #0088cc, #0077b3);
  88 + background-image: -moz-linear-gradient(top, #0088cc, #0077b3);
  89 + background-image: -webkit-gradient(linear, 0 0, 0 100%, from(#0088cc), to(#0077b3));
  90 + background-image: -webkit-linear-gradient(top, #0088cc, #0077b3);
  91 + background-image: -o-linear-gradient(top, #0088cc, #0077b3);
  92 + background-repeat: repeat-x;
  93 + outline: 0;
  94 + filter: progid
  95 + : dximagetransform.microsoft.gradient(startColorstr='#ff0088cc', endColorstr='#ff0077b3', GradientType=0);
  96 +}
  97 +.dropdown-menu .disabled > a, .dropdown-menu .disabled > a:hover {
  98 + color: #999999;
  99 +}
  100 +.dropdown-menu .disabled > a:hover {
  101 + text-decoration: none;
  102 + cursor: default;
  103 + background-color: transparent;
  104 +}
  105 +.open {
  106 + *z-index: 1000;
  107 +}
  108 +.open > .dropdown-menu {
  109 + display: block;
  110 +}
  111 +.pull-right > .dropdown-menu {
  112 + right: 0;
  113 + left: auto;
  114 +}
  115 +.dropup .caret, .navbar-fixed-bottom .dropdown .caret {
  116 + border-top: 0;
  117 + border-bottom: 4px solid #000000;
  118 + content: "\2191";
  119 +}
  120 +.dropup .dropdown-menu, .navbar-fixed-bottom .dropdown .dropdown-menu {
  121 + top: auto;
  122 + bottom: 100%;
  123 + margin-bottom: 1px;
  124 +}
  125 +.dropdown-submenu {
  126 + position: relative;
  127 +}
  128 +.dropdown-submenu > .dropdown-menu {
  129 + top: 0;
  130 + left: 100%;
  131 + margin-top: -6px;
  132 + margin-left: -1px;
  133 + -webkit-border-radius: 0 6px 6px 6px;
  134 + -moz-border-radius: 0 6px 6px 6px;
  135 + border-radius: 0 6px 6px 6px;
  136 +}
  137 +.dropdown-submenu > .dropdown-menu.drop-left{
  138 + left:-100%;
  139 +}
  140 +.dropdown-submenu:hover .dropdown-menu {
  141 + display: block;
  142 +}
  143 +.dropdown-submenu > a:after {
  144 + display: block;
  145 + float: right;
  146 + width: 0;
  147 + height: 0;
  148 + margin-top: 5px;
  149 + margin-right: -10px;
  150 + border-color: transparent;
  151 + border-left-color: #cccccc;
  152 + border-style: solid;
  153 + border-width: 5px 0 5px 5px;
  154 + content: " ";
  155 +}
  156 +.dropdown-submenu:hover > a:after {
  157 + border-left-color: #ffffff;
  158 +}
  159 +.dropdown .dropdown-menu .nav-header {
  160 + padding-right: 20px;
  161 + padding-left: 20px;
  162 +}
  163 +/**
  164 + * Context Styles
  165 + */
  166 +
  167 +.dropdown-context .nav-header {
  168 + cursor: default;
  169 +}
  170 +.dropdown-context:before, .dropdown-context-up:before {
  171 + position: absolute;
  172 + top: -7px;
  173 + left: 9px;
  174 + display: inline-block;
  175 + border-right: 7px solid transparent;
  176 + border-bottom: 7px solid #ccc;
  177 + border-left: 7px solid transparent;
  178 + border-bottom-color: rgba(0, 0, 0, 0.2);
  179 + content: '';
  180 +}
  181 +.dropdown-context:after, .dropdown-context-up:after {
  182 + position: absolute;
  183 + top: -6px;
  184 + left: 10px;
  185 + display: inline-block;
  186 + border-right: 6px solid transparent;
  187 + border-bottom: 6px solid #ffffff;
  188 + border-left: 6px solid transparent;
  189 + content: '';
  190 +}
  191 +.dropdown-context-up:before, .dropdown-context-up:after {
  192 + top: auto;
  193 + bottom: -7px;
  194 + z-index: 9999;
  195 +}
  196 +.dropdown-context-up:before {
  197 + border-right: 7px solid transparent;
  198 + border-top: 7px solid #ccc;
  199 + border-bottom: none;
  200 + border-left: 7px solid transparent;
  201 +}
  202 +.dropdown-context-up:after {
  203 + border-right: 6px solid transparent;
  204 + border-top: 6px solid #ffffff;
  205 + border-left: 6px solid transparent;
  206 + border-bottom: none;
  207 +}
  208 +.dropdown-context-sub:before, .dropdown-context-sub:after {
  209 + display: none;
  210 +}
  211 +.dropdown-context .dropdown-submenu:hover .dropdown-menu {
  212 + display: none;
  213 +}
  214 +.dropdown-context .dropdown-submenu:hover > .dropdown-menu {
  215 + display: block;
  216 +}
  217 +
  218 +.compressed-context a{
  219 + padding-left: 14px;
  220 + padding-top: 0;
  221 + padding-bottom: 0;
  222 + font-size: 13px;
  223 + }
  224 +.compressed-context .divider{
  225 + margin: 5px 1px;
  226 + }
  227 +.compressed-context .nav-header{
  228 + padding:1px 13px;
  229 + }
src/main/resources/static/pages/base/timesmodel/js/ContextJS/css/demo.css
1 -  
2 -a, a:visited{  
3 - color:#333  
4 - }  
5 -::selection{  
6 - background:transparent;  
7 - }  
8 --moz-::selection{  
9 - background:transparent;  
10 - }  
11 -h1, h2, h4{  
12 - font-family: 'Rokkitt', serif;  
13 - font-weight:100;  
14 - font-size:72px;  
15 - }  
16 - h1{  
17 - text-align:center;  
18 - }  
19 - h2{  
20 - font-size:36px;  
21 - margin-bottom:0;  
22 - }  
23 - h4{  
24 - font-size:30px;  
25 - text-align:center;  
26 - }  
27 - h4 a{  
28 - text-decoration:none;  
29 - }  
30 -h3{  
31 - font-family: 'Rokkitt', serif;  
32 - margin-bottom: 0;  
33 - border-bottom: 1px solid #DDD;  
34 - -webkit-box-shadow: 0 1px 0 white;  
35 - -moz-box-shadow: 0 1px 0 white;  
36 - box-shadow: 0 1px 0 white;  
37 - margin-top: 20px;  
38 - }  
39 - #download{  
40 - background: #fefefe;  
41 - width: 500px;  
42 - margin: 0 auto;  
43 - padding: 20px;  
44 - -webkit-border-radius: 5px;  
45 - -moz-border-radius: 5px;  
46 - border-radius: 5px;  
47 - border: 1px solid rgba(0,0,0,0.2);  
48 - }  
49 -  
50 - .description{  
51 - text-align:left;  
52 - width:540px;  
53 - margin:0 auto;  
54 - padding:20px;  
55 - }  
56 -  
57 - pre{  
58 - background: #333;  
59 - overflow: auto;  
60 - padding: 10px;  
61 - color: #fefefe;  
62 - text-shadow: 0 1px 2px #000;  
63 - -webkit-box-shadow: 0 1px 0 #fff, 0 1px 2px #000 inset;  
64 - -moz-box-shadow: 0 1px 0 #fff, 0 1px 2px #000 inset;  
65 - box-shadow: 0 1px 0 #fff, 0 1px 2px #000 inset;  
66 - }  
67 -  
68 - .dropdown-menu{  
69 - text-shadow:none;  
70 - }  
71 -  
72 -  
73 - table{  
74 - font-size:12px;  
75 - border-collapse:collapse;  
76 - background:#fefefe;  
77 - border: 1px solid rgba(0,0,0,0.2);  
78 - font-family:monospace;  
79 - }  
80 - table th:last-child{  
81 - width:175px;  
82 - }  
83 -  
84 - table th, table td:last-child{  
85 - font-family:arial;  
86 - }  
87 -  
88 - .me-codesta{  
89 - display: block;  
90 - margin: 0 auto;  
91 - }  
92 -  
93 - .amp{  
94 - font-family:Baskerville,'Goudy Bookletter 1911',Palatino,'Book Antiqua',serif;  
95 - font-style:italic;  
96 - }  
97 - .finale{  
98 - position:relative;  
99 - height:150px;  
100 - }  
101 - .finale h1{  
102 - position:absolute;  
103 - width:100%;  
104 - -webkit-transition: opacity 0.2s linear;  
105 - -moz-transition: opacity 0.2s linear;  
106 - -o-transition: opacity 0.2s linear;  
107 - transition: opacity 0.2s linear;  
108 - }  
109 - .finale .toggle{  
110 - opacity:0;  
111 - }  
112 -  
113 - #donate{  
114 - display:none;  
115 - }  
116 - .thanks{  
117 - width:500px;  
118 - margin:30px auto;  
119 - }  
120 - a#download{  
121 - display:block;  
122 - text-decoration:none;  
123 - } 1 +
  2 +a, a:visited{
  3 + color:#333
  4 + }
  5 +::selection{
  6 + background:transparent;
  7 + }
  8 +-moz-::selection{
  9 + background:transparent;
  10 + }
  11 +h1, h2, h4{
  12 + font-family: 'Rokkitt', serif;
  13 + font-weight:100;
  14 + font-size:72px;
  15 + }
  16 + h1{
  17 + text-align:center;
  18 + }
  19 + h2{
  20 + font-size:36px;
  21 + margin-bottom:0;
  22 + }
  23 + h4{
  24 + font-size:30px;
  25 + text-align:center;
  26 + }
  27 + h4 a{
  28 + text-decoration:none;
  29 + }
  30 +h3{
  31 + font-family: 'Rokkitt', serif;
  32 + margin-bottom: 0;
  33 + border-bottom: 1px solid #DDD;
  34 + -webkit-box-shadow: 0 1px 0 white;
  35 + -moz-box-shadow: 0 1px 0 white;
  36 + box-shadow: 0 1px 0 white;
  37 + margin-top: 20px;
  38 + }
  39 + #download{
  40 + background: #fefefe;
  41 + width: 500px;
  42 + margin: 0 auto;
  43 + padding: 20px;
  44 + -webkit-border-radius: 5px;
  45 + -moz-border-radius: 5px;
  46 + border-radius: 5px;
  47 + border: 1px solid rgba(0,0,0,0.2);
  48 + }
  49 +
  50 + .description{
  51 + text-align:left;
  52 + width:540px;
  53 + margin:0 auto;
  54 + padding:20px;
  55 + }
  56 +
  57 + pre{
  58 + background: #333;
  59 + overflow: auto;
  60 + padding: 10px;
  61 + color: #fefefe;
  62 + text-shadow: 0 1px 2px #000;
  63 + -webkit-box-shadow: 0 1px 0 #fff, 0 1px 2px #000 inset;
  64 + -moz-box-shadow: 0 1px 0 #fff, 0 1px 2px #000 inset;
  65 + box-shadow: 0 1px 0 #fff, 0 1px 2px #000 inset;
  66 + }
  67 +
  68 + .dropdown-menu{
  69 + text-shadow:none;
  70 + }
  71 +
  72 +
  73 + table{
  74 + font-size:12px;
  75 + border-collapse:collapse;
  76 + background:#fefefe;
  77 + border: 1px solid rgba(0,0,0,0.2);
  78 + font-family:monospace;
  79 + }
  80 + table th:last-child{
  81 + width:175px;
  82 + }
  83 +
  84 + table th, table td:last-child{
  85 + font-family:arial;
  86 + }
  87 +
  88 + .me-codesta{
  89 + display: block;
  90 + margin: 0 auto;
  91 + }
  92 +
  93 + .amp{
  94 + font-family:Baskerville,'Goudy Bookletter 1911',Palatino,'Book Antiqua',serif;
  95 + font-style:italic;
  96 + }
  97 + .finale{
  98 + position:relative;
  99 + height:150px;
  100 + }
  101 + .finale h1{
  102 + position:absolute;
  103 + width:100%;
  104 + -webkit-transition: opacity 0.2s linear;
  105 + -moz-transition: opacity 0.2s linear;
  106 + -o-transition: opacity 0.2s linear;
  107 + transition: opacity 0.2s linear;
  108 + }
  109 + .finale .toggle{
  110 + opacity:0;
  111 + }
  112 +
  113 + #donate{
  114 + display:none;
  115 + }
  116 + .thanks{
  117 + width:500px;
  118 + margin:30px auto;
  119 + }
  120 + a#download{
  121 + display:block;
  122 + text-decoration:none;
  123 + }
src/main/resources/static/pages/base/timesmodel/js/ContextJS/js/context.js
1 -/*  
2 - * @description (TODO) Context.js 右键菜单栏轻量级修订版.  
3 - *  
4 - * 》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》  
5 - * http://lab.jakiestfu.com/contextjs/ API说明文档.  
6 - * 《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《  
7 - *  
8 - */  
9 -  
10 -var context = context || (function () {  
11 -  
12 - // 标记是否在创建右键菜单栏.作用与rect元素的拖炸事件.  
13 - var isContext = false;  
14 -  
15 - // 设置插件的配置参数信息.  
16 - var options = {  
17 - fadeSpeed: 100,// 上下文菜单淡入的速度(以毫秒为单位)  
18 - filter: function ($obj) {  
19 - // 每个完成的列表元素将通过以进行额外修改的功能。  
20 - },  
21 - above: 'auto',// 如果设置为“自动”,如果下面没有足够的空间,菜单将显示为“下拉”。设置为true将使菜单默认为“弹出”。  
22 - preventDoubleContext: true,// 如果设置为true,则基于浏览器的上下文菜单将无法在contextjs菜单上使用。  
23 - compress: false // 如果设置为true,则上下文菜单将具有较少的填充,使它们(希望)更不引人注目  
24 - };  
25 -  
26 - /**  
27 - * @description : (TODO) 初始化  
28 - *  
29 - * @param [opts--配置参数]  
30 - * */  
31 - function initialize(opts) {  
32 - // 修改options配置参数.  
33 - options = $.extend({}, options, opts);  
34 - // 监听htmlclick事件.  
35 - $(document).on('click', 'html', function () {  
36 - // 使用淡出效果来隐藏一个菜单栏.  
37 - $('.dropdown-context').fadeOut(options.fadeSpeed, function(){  
38 - $('.dropdown-context').css({display:''}).find('.drop-left').removeClass('drop-left');  
39 - d3.selectAll('.selected').classed({'selected':false});  
40 - setisContext(false);  
41 - });  
42 - });  
43 - // 判断.如果设置为true,则基于浏览器的上下文菜单将无法在contextjs菜单上使用。  
44 - if(options.preventDoubleContext){  
45 - $(document).on('contextmenu', '.dropdown-context', function (e) {  
46 - e.preventDefault();  
47 - });  
48 - }  
49 - // 当鼠标指针进入(穿过)元素时.  
50 - $(document).on('mouseenter', '.dropdown-submenu', function(){  
51 - var $sub = $(this).find('.dropdown-context-sub:first'),  
52 - subWidth = $sub.width(),  
53 - subLeft = $sub.offset().left,  
54 - collision = (subWidth+subLeft) > window.innerWidth;  
55 - if(collision){  
56 - $sub.addClass('drop-left');  
57 - }  
58 - });  
59 -  
60 - }  
61 -  
62 - /**  
63 - * @description : (TODO) 更新配置参数.  
64 - *  
65 - * @status OK.  
66 - * */  
67 - function updateOptions(opts){  
68 - // 重新赋值options.  
69 - options = $.extend({}, options, opts);  
70 - }  
71 -  
72 - /**  
73 - * @description : (TODO) 创建加载菜单栏.  
74 - *  
75 - * @param [data--菜单栏内容;id--菜单栏父容器ID值;subMenu--menu字符串值]  
76 - *  
77 - * @returns 返回菜单栏元素对象.  
78 - * */  
79 - function buildMenu(data, id, subMenu) {  
80 - // 判断subMenu是否为空或者undefined,如果为空则默认赋值一个空字符串.否则使用本身.  
81 - var subClass = (subMenu) ? ' dropdown-context-sub' : '',  
82 - compressed = options.compress ? ' compressed-context' : '',// 如果设置为true,则上下文菜单将具有较少的填充,使它们(希望)更不引人注目.  
83 - $menu = $('<ul class="dropdown-menu dropdown-context' + subClass + compressed+'" id="dropdown-' + id + '"></ul>');// 获取菜单栏元素对象.  
84 - var i = 0, linkTarget = '';  
85 - for(i; i<data.length; i++) {  
86 - // 是否使用分割线.  
87 - if (typeof data[i].divider !== 'undefined') {  
88 - $menu.append('<li class="divider"></li>');  
89 - // 是否有标题.  
90 - } else if (typeof data[i].header !== 'undefined') {  
91 - $menu.append('<li class="nav-header">' + data[i].header + '</li>');  
92 - } else {  
93 - // 是否有超链接的URL.  
94 - if (typeof data[i].href == 'undefined') {  
95 - data[i].href = '#';  
96 - }  
97 - // 是否打开新标签页.  
98 - if (typeof data[i].target !== 'undefined') {  
99 - linkTarget = ' target="'+data[i].target+'"';  
100 - }  
101 - // 是否有子菜单.  
102 - if (typeof data[i].subMenu !== 'undefined') {  
103 - $sub = ('<li class="dropdown-submenu"><a tabindex="-1" href="' + data[i].href + '">' + data[i].text + '</a></li>');  
104 - } else {  
105 - $sub = $('<li><a tabindex="-1" href="' + data[i].href + '"'+linkTarget+'>' + data[i].text + '</a></li>');  
106 - }  
107 - // 是否有自定义的action方法.如果有则给该a标签元素监听click事件.  
108 - if (typeof data[i].action !== 'undefined') {  
109 - var actiond = new Date(),  
110 - actionID = 'event-' + actiond.getTime() * Math.floor(Math.random()*100000),  
111 - eventAction = data[i].action;  
112 - $sub.find('a').attr('id', actionID);  
113 - $('#' + actionID).addClass('context-event');  
114 - $(document).on('click', '#' + actionID, eventAction);  
115 - }  
116 - // 添加元素,做为当前元素的子元素.  
117 - $menu.append($sub);  
118 - // 追加子菜单.  
119 - if (typeof data[i].subMenu != 'undefined') {  
120 - var subMenuData = buildMenu(data[i].subMenu, id, true);  
121 - $menu.find('li:last').append(subMenuData);  
122 - }  
123 - }  
124 - // 每个完成的列表元素将通过以进行额外修改的功能。  
125 - if (typeof options.filter == 'function') {  
126 - options.filter($menu.find('li:last'));  
127 - }  
128 - }  
129 - return $menu;  
130 - }  
131 -  
132 - /**  
133 - * @description : (TODO) 鼠标右键rect元素创建菜单栏.  
134 - *  
135 - * @param [selector--右键创建菜单栏元素;data--菜单栏内容]  
136 - *  
137 - * @status OK.  
138 - * */  
139 - function addContext(selector, data) {  
140 - // 获取时间的毫秒数来作为唯一ID.  
141 - var d = new Date(),  
142 - id = d.getTime(),  
143 - $menu = buildMenu(data, id);  
144 - // 添加右键菜单HTML内容.  
145 - $('.ganttSvgContainer').append($menu);  
146 - /**  
147 - * @description : (TODO) 监听contextmenu事件.  
148 - *  
149 - * @status OK.  
150 - * */  
151 - $(document).on('contextmenu', selector, function (e) {  
152 - // 获取右键rect元素的数据属性.  
153 - var $dt = d3.select(this).data()[0];  
154 - // 判断.如果右键点击的是统计值的rect元素,则结束.否则继续往下执行.  
155 - if($dt.bcType=='tjz')  
156 - return;  
157 - setisContext(true);  
158 - // 去除除本次鼠标右键点击选择的rect元素之外的 所有鼠标右键点击过的rect元素.  
159 - d3.selectAll('.selected').classed({'selected':false});  
160 - // 给当前rect元素添加标记选择.  
161 - d3.select(this).classed({'selected':true});  
162 - // 阻止元素发生默认的行为(例如,当点击提交按钮时阻止对表单的提交;点击a标记的URL时阻止打开链接等等.).  
163 - e.preventDefault();  
164 - // 阻止事件冒泡.不再派发事件.阻止把事件分派到其他节点。  
165 - e.stopPropagation();  
166 - // 隐藏元素.  
167 - $('.dropdown-context:not(.dropdown-context-sub)').hide();  
168 - // 选择元素.  
169 - $dd = $('#dropdown-' + id);  
170 - // 判断. 根据插件配置的参数值.设置为true将使菜单默认为“弹出”。  
171 - if (typeof options.above == 'boolean' && options.above) {  
172 - $dd.addClass('dropdown-context-up').css({  
173 - top: e.pageY - 20 - $('#dropdown-' + id).height(),  
174 - left: e.pageX - 13  
175 - }).fadeIn(options.fadeSpeed);  
176 - // 如果设置为“自动”,如果下面没有足够的空间,菜单将显示为“下拉”。  
177 - } else if (typeof options.above == 'string' && options.above == 'auto') {  
178 - // 删除样式.  
179 - $dd.removeClass('dropdown-context-up');  
180 - // 计算高度.  
181 - var autoH = $dd.height() + 12;  
182 - // 计算宽度.  
183 - var autoW = $dd.width() + 12;  
184 - // 获取元素.  
185 - var container = $('.ganttSvgContainer'), scrollTo = $(this);  
186 - // 修改元素的位置属性值.  
187 - $dd.css({  
188 - top: e.offsetY + 10,  
189 - left: e.offsetX - 13  
190 - }).fadeIn(options.fadeSpeed);  
191 - // 判断.如果鼠标指针的位置(相对于文档的左边缘)的Y + 右键菜单栏高度 大于 了svg父容器的高度,则移动浏览器垂直滚动条位置.  
192 - if ((e.pageY + autoH) > $('.ganttSvgContainer').height()) {  
193 - container.animate({ scrollTop: scrollTo.offset().top - container.offset().top + container.scrollTop()});  
194 - }  
195 - // 判断.如果鼠标指针的位置(相对于文档的左边缘)的X + 右键菜单栏宽度 大于了最大宽度 ,则移动浏览器水平滚动条位置.  
196 - if ((e.pageX + autoW) > 1529) {  
197 - container.animate({scrollLeft: e.offsetX + autoW - $('.ganttSvgContainer').width() + 20});  
198 - }  
199 - // 判断.如果鼠标指针的位置(相对于文档的左边缘)的X 小于了最小宽度 ,则移动浏览器水平滚动条位置.  
200 - if (e.pageX < 300) {  
201 - container.animate({ scrollLeft: e.offsetX - 20});  
202 - }  
203 - }  
204 - });  
205 - }  
206 -  
207 - /**  
208 - * @description : (TODO) 销毁右键菜单栏.  
209 - *  
210 - * @status OK.  
211 - * */  
212 - function destroyContext(selector) {  
213 - $(document).off('contextmenu', selector).off('click', '.context-event');  
214 - }  
215 -  
216 - function setisContext(boolean) {  
217 - isContext = boolean;  
218 - }  
219 -  
220 - function getisContext() {  
221 - return isContext;  
222 - }  
223 -  
224 - // 返回context对象.  
225 - return {  
226 - init: initialize,  
227 - settings: updateOptions,  
228 - attach: addContext,  
229 - destroy: destroyContext,  
230 - getisContext:getisContext,  
231 - setisContext:setisContext  
232 - }; 1 +/*
  2 + * @description (TODO) Context.js 右键菜单栏轻量级修订版.
  3 + *
  4 + * 》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》》
  5 + * http://lab.jakiestfu.com/contextjs/ API说明文档.
  6 + * 《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《《
  7 + *
  8 + */
  9 +
  10 +var context = context || (function () {
  11 +
  12 + // 标记是否在创建右键菜单栏.作用与rect元素的拖炸事件.
  13 + var isContext = false;
  14 +
  15 + // 设置插件的配置参数信息.
  16 + var options = {
  17 + fadeSpeed: 100,// 上下文菜单淡入的速度(以毫秒为单位)
  18 + filter: function ($obj) {
  19 + // 每个完成的列表元素将通过以进行额外修改的功能。
  20 + },
  21 + above: 'auto',// 如果设置为“自动”,如果下面没有足够的空间,菜单将显示为“下拉”。设置为true将使菜单默认为“弹出”。
  22 + preventDoubleContext: true,// 如果设置为true,则基于浏览器的上下文菜单将无法在contextjs菜单上使用。
  23 + compress: false // 如果设置为true,则上下文菜单将具有较少的填充,使它们(希望)更不引人注目
  24 + };
  25 +
  26 + /**
  27 + * @description : (TODO) 初始化
  28 + *
  29 + * @param [opts--配置参数]
  30 + * */
  31 + function initialize(opts) {
  32 + // 修改options配置参数.
  33 + options = $.extend({}, options, opts);
  34 + // 监听htmlclick事件.
  35 + $(document).on('click', 'html', function () {
  36 + // 使用淡出效果来隐藏一个菜单栏.
  37 + $('.dropdown-context').fadeOut(options.fadeSpeed, function(){
  38 + $('.dropdown-context').css({display:''}).find('.drop-left').removeClass('drop-left');
  39 + d3.selectAll('.selected').classed({'selected':false});
  40 + setisContext(false);
  41 + });
  42 + });
  43 + // 判断.如果设置为true,则基于浏览器的上下文菜单将无法在contextjs菜单上使用。
  44 + if(options.preventDoubleContext){
  45 + $(document).on('contextmenu', '.dropdown-context', function (e) {
  46 + e.preventDefault();
  47 + });
  48 + }
  49 + // 当鼠标指针进入(穿过)元素时.
  50 + $(document).on('mouseenter', '.dropdown-submenu', function(){
  51 + var $sub = $(this).find('.dropdown-context-sub:first'),
  52 + subWidth = $sub.width(),
  53 + subLeft = $sub.offset().left,
  54 + collision = (subWidth+subLeft) > window.innerWidth;
  55 + if(collision){
  56 + $sub.addClass('drop-left');
  57 + }
  58 + });
  59 +
  60 + }
  61 +
  62 + /**
  63 + * @description : (TODO) 更新配置参数.
  64 + *
  65 + * @status OK.
  66 + * */
  67 + function updateOptions(opts){
  68 + // 重新赋值options.
  69 + options = $.extend({}, options, opts);
  70 + }
  71 +
  72 + /**
  73 + * @description : (TODO) 创建加载菜单栏.
  74 + *
  75 + * @param [data--菜单栏内容;id--菜单栏父容器ID值;subMenu--menu字符串值]
  76 + *
  77 + * @returns 返回菜单栏元素对象.
  78 + * */
  79 + function buildMenu(data, id, subMenu) {
  80 + // 判断subMenu是否为空或者undefined,如果为空则默认赋值一个空字符串.否则使用本身.
  81 + var subClass = (subMenu) ? ' dropdown-context-sub' : '',
  82 + compressed = options.compress ? ' compressed-context' : '',// 如果设置为true,则上下文菜单将具有较少的填充,使它们(希望)更不引人注目.
  83 + $menu = $('<ul class="dropdown-menu dropdown-context' + subClass + compressed+'" id="dropdown-' + id + '"></ul>');// 获取菜单栏元素对象.
  84 + var i = 0, linkTarget = '';
  85 + for(i; i<data.length; i++) {
  86 + // 是否使用分割线.
  87 + if (typeof data[i].divider !== 'undefined') {
  88 + $menu.append('<li class="divider"></li>');
  89 + // 是否有标题.
  90 + } else if (typeof data[i].header !== 'undefined') {
  91 + $menu.append('<li class="nav-header">' + data[i].header + '</li>');
  92 + } else {
  93 + // 是否有超链接的URL.
  94 + if (typeof data[i].href == 'undefined') {
  95 + data[i].href = '#';
  96 + }
  97 + // 是否打开新标签页.
  98 + if (typeof data[i].target !== 'undefined') {
  99 + linkTarget = ' target="'+data[i].target+'"';
  100 + }
  101 + // 是否有子菜单.
  102 + if (typeof data[i].subMenu !== 'undefined') {
  103 + $sub = ('<li class="dropdown-submenu"><a tabindex="-1" href="' + data[i].href + '">' + data[i].text + '</a></li>');
  104 + } else {
  105 + $sub = $('<li><a tabindex="-1" href="' + data[i].href + '"'+linkTarget+'>' + data[i].text + '</a></li>');
  106 + }
  107 + // 是否有自定义的action方法.如果有则给该a标签元素监听click事件.
  108 + if (typeof data[i].action !== 'undefined') {
  109 + var actiond = new Date(),
  110 + actionID = 'event-' + actiond.getTime() * Math.floor(Math.random()*100000),
  111 + eventAction = data[i].action;
  112 + $sub.find('a').attr('id', actionID);
  113 + $('#' + actionID).addClass('context-event');
  114 + $(document).on('click', '#' + actionID, eventAction);
  115 + }
  116 + // 添加元素,做为当前元素的子元素.
  117 + $menu.append($sub);
  118 + // 追加子菜单.
  119 + if (typeof data[i].subMenu != 'undefined') {
  120 + var subMenuData = buildMenu(data[i].subMenu, id, true);
  121 + $menu.find('li:last').append(subMenuData);
  122 + }
  123 + }
  124 + // 每个完成的列表元素将通过以进行额外修改的功能。
  125 + if (typeof options.filter == 'function') {
  126 + options.filter($menu.find('li:last'));
  127 + }
  128 + }
  129 + return $menu;
  130 + }
  131 +
  132 + /**
  133 + * @description : (TODO) 鼠标右键rect元素创建菜单栏.
  134 + *
  135 + * @param [selector--右键创建菜单栏元素;data--菜单栏内容]
  136 + *
  137 + * @status OK.
  138 + * */
  139 + function addContext(selector, data) {
  140 + // 获取时间的毫秒数来作为唯一ID.
  141 + var d = new Date(),
  142 + id = d.getTime(),
  143 + $menu = buildMenu(data, id);
  144 + // 添加右键菜单HTML内容.
  145 + $('.ganttSvgContainer').append($menu);
  146 + /**
  147 + * @description : (TODO) 监听contextmenu事件.
  148 + *
  149 + * @status OK.
  150 + * */
  151 + $(document).on('contextmenu', selector, function (e) {
  152 + // 获取右键rect元素的数据属性.
  153 + var $dt = d3.select(this).data()[0];
  154 + // 判断.如果右键点击的是统计值的rect元素,则结束.否则继续往下执行.
  155 + if($dt.bcType=='tjz')
  156 + return;
  157 + setisContext(true);
  158 + // 去除除本次鼠标右键点击选择的rect元素之外的 所有鼠标右键点击过的rect元素.
  159 + d3.selectAll('.selected').classed({'selected':false});
  160 + // 给当前rect元素添加标记选择.
  161 + d3.select(this).classed({'selected':true});
  162 + // 阻止元素发生默认的行为(例如,当点击提交按钮时阻止对表单的提交;点击a标记的URL时阻止打开链接等等.).
  163 + e.preventDefault();
  164 + // 阻止事件冒泡.不再派发事件.阻止把事件分派到其他节点。
  165 + e.stopPropagation();
  166 + // 隐藏元素.
  167 + $('.dropdown-context:not(.dropdown-context-sub)').hide();
  168 + // 选择元素.
  169 + $dd = $('#dropdown-' + id);
  170 + // 判断. 根据插件配置的参数值.设置为true将使菜单默认为“弹出”。
  171 + if (typeof options.above == 'boolean' && options.above) {
  172 + $dd.addClass('dropdown-context-up').css({
  173 + top: e.pageY - 20 - $('#dropdown-' + id).height(),
  174 + left: e.pageX - 13
  175 + }).fadeIn(options.fadeSpeed);
  176 + // 如果设置为“自动”,如果下面没有足够的空间,菜单将显示为“下拉”。
  177 + } else if (typeof options.above == 'string' && options.above == 'auto') {
  178 + // 删除样式.
  179 + $dd.removeClass('dropdown-context-up');
  180 + // 计算高度.
  181 + var autoH = $dd.height() + 12;
  182 + // 计算宽度.
  183 + var autoW = $dd.width() + 12;
  184 + // 获取元素.
  185 + var container = $('.ganttSvgContainer'), scrollTo = $(this);
  186 + // 修改元素的位置属性值.
  187 + $dd.css({
  188 + top: e.offsetY + 10,
  189 + left: e.offsetX - 13
  190 + }).fadeIn(options.fadeSpeed);
  191 + // 判断.如果鼠标指针的位置(相对于文档的左边缘)的Y + 右键菜单栏高度 大于 了svg父容器的高度,则移动浏览器垂直滚动条位置.
  192 + if ((e.pageY + autoH) > $('.ganttSvgContainer').height()) {
  193 + container.animate({ scrollTop: scrollTo.offset().top - container.offset().top + container.scrollTop()});
  194 + }
  195 + // 判断.如果鼠标指针的位置(相对于文档的左边缘)的X + 右键菜单栏宽度 大于了最大宽度 ,则移动浏览器水平滚动条位置.
  196 + if ((e.pageX + autoW) > 1529) {
  197 + container.animate({scrollLeft: e.offsetX + autoW - $('.ganttSvgContainer').width() + 20});
  198 + }
  199 + // 判断.如果鼠标指针的位置(相对于文档的左边缘)的X 小于了最小宽度 ,则移动浏览器水平滚动条位置.
  200 + if (e.pageX < 300) {
  201 + container.animate({ scrollLeft: e.offsetX - 20});
  202 + }
  203 + }
  204 + });
  205 + }
  206 +
  207 + /**
  208 + * @description : (TODO) 销毁右键菜单栏.
  209 + *
  210 + * @status OK.
  211 + * */
  212 + function destroyContext(selector) {
  213 + $(document).off('contextmenu', selector).off('click', '.context-event');
  214 + }
  215 +
  216 + function setisContext(boolean) {
  217 + isContext = boolean;
  218 + }
  219 +
  220 + function getisContext() {
  221 + return isContext;
  222 + }
  223 +
  224 + // 返回context对象.
  225 + return {
  226 + init: initialize,
  227 + settings: updateOptions,
  228 + attach: addContext,
  229 + destroy: destroyContext,
  230 + getisContext:getisContext,
  231 + setisContext:setisContext
  232 + };
233 })(); 233 })();
234 \ No newline at end of file 234 \ No newline at end of file
src/main/resources/static/pages/base/timesmodel/js/d3.relationshipgraph.js
1 -/**  
2 - * @discription TODO(图层类)  
3 - *  
4 - * @author bsth@lq  
5 - *  
6 - * @date 二〇一六年十二月八日 10:39:52  
7 - *  
8 - **/  
9 -  
10 -/**  
11 - *  
12 - * 图层作用域下的全局变量定义  
13 - *  
14 - ************************************************************************************************************************************************/  
15 -var historyArray = [],// 保存操作图形后的数据集合(撤销与恢复操作)  
16 - $_keyIndex = 0,// 记录当前操作步骤 (在撤销与恢复操作时)  
17 - $_GlobalGraph = new Object(),// 图层对象(在创建图层对象时)  
18 - flagIndex = 0,// 鼠标绘制的当前选择框标识(这里限制只做一次性选择元素拖拽,在绘制选择框时)  
19 - _singElmtDrStartX = 0, // 记录单个rect元素(班次)做左右拖拽(拖拽开始...)鼠标开始位置.  
20 - _singElemtDrStatus = false,// 标记单个rect元素沿X方向进行拖拽状态.默认关闭状态.  
21 - drwaStartY = 0,// 鼠标从选择框按下开始标记Y值(在选择框做上下【↕】拖拽时)  
22 - drwaStartYStatus = false,// 标记选择框沿Y方向进行拖拽状态.默认关闭状态.  
23 - drwaStartX = 0,// 鼠标从选择框左右拖拽中心点按下开始标记X值 (在选择框上边线中心点做左右【↔】拖拽时)  
24 - drwaStartXStatus = false,// 标记鼠标从选择框中心点按下沿X方向进行拖拽状态.默认关闭状态.  
25 - drwaRightX = 0,// 鼠标从选择框右拖拽中心点按下开始标记X值 (在选择框右边线中心点做右【→】拖拽时)  
26 - drwaRightXStatus = false,// 标记鼠标从选择框右边点按下沿X方向进行拖拽状态.默认关闭状态.  
27 - drwaLeftX = 0,// 鼠标从选择框左拖拽中心点按下开始标记X值 (在选择框左边线中心点做左【←】拖拽时)  
28 - drwaLeftXStatus = false,// 标记鼠标从选择框左边点按下沿X方向进行拖拽状态.默认关闭状态.  
29 - gClassNameArray = new Array(),// 标记被选择的元素(在绘制选择框完成时)  
30 - yAxisYArray = new Array(),// Y轴坐标数组  
31 - tipEventTimer = null,// 提示工具栏定时器.  
32 - workeType = [{'type':'六工一休','minueV':6.40,'hourV':6.66},  
33 - {'type':'五工一休','minueV':6.51,'hourV':6.85},  
34 - {'type':'四工一休','minueV':7.08,'hourV':7.14},  
35 - {'type':'三工一休','minueV':7.37,'hourV':7.61},  
36 - {'type':'二工一休','minueV':8.34,'hourV':8.34},  
37 - {'type':'一工一休','minueV':11.25,'hourV':11.42},  
38 - {'type':'五工二休','minueV':8.00,'hourV':7.99},  
39 - {'type':'无工休', 'minueV':5.43,'hourV':5.67}];// 班工时规定  
40 -/************************************************************************************************************************************************/  
41 -  
42 -/**  
43 - * @description : (TODO) : 撤销事件(后退)  
44 - *  
45 - * @see ✿ 判断是否在图层编辑(元素拖拽)中。  
46 - *  
47 - * 如果在,关闭图层编辑状态,记录当前操作步骤,根据步骤数在保存操作图形后的数据集合中获取数据重新渲染图层。  
48 - *  
49 - * @status OK.  
50 - ************************************************************************************************************************************************/  
51 -$('.revoke').on('click',function() {  
52 - // 判断选择框是否存在.  
53 - if(RelationshipGraph.getFlagIndex()>0){  
54 - // 关闭所有提示弹出层.  
55 - layer.closeAll();  
56 - layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【撤销】!', {  
57 - btn : [ '确认提示并提交', '取消' ]  
58 - },function () {  
59 - // 执行选择框关闭函数.  
60 - RelationshipGraph.gClose();  
61 - // 执行撤销函数.  
62 - RelationshipGraph.cancel();  
63 - });  
64 - }else {  
65 - // 执行撤销函数.  
66 - RelationshipGraph.cancel();  
67 - }  
68 -});  
69 -/************************************************************************************************************************************************/  
70 -  
71 -  
72 -/**  
73 - * @description : (TODO) 监听恢复事件(前进)  
74 - *  
75 - * @see ✿ 判断是否在图层编辑(元素拖拽)中。  
76 - *  
77 - * 如果在,关闭图层编辑状态,记录当前操作步骤,根据步骤数在保存操作图形后的数据集合中获取数据重新渲染图层。  
78 - *  
79 - * @status OK.  
80 - ************************************************************************************************************************************************/  
81 -$('.recover').on('click',function() {  
82 - // 判断选择框是否存在.  
83 - if(RelationshipGraph.getFlagIndex()>0) {  
84 - // 关闭所有提示弹出层.  
85 - layer.closeAll();  
86 - layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【恢复】!', {  
87 - btn : [ '确认提示并提交', '取消' ]  
88 - },function () {  
89 - // 执行选择框关闭函数.  
90 - RelationshipGraph.gClose();  
91 - // 执行恢复函数.  
92 - RelationshipGraph.regain();  
93 - });  
94 - }else {  
95 - // 执行恢复函数.  
96 - RelationshipGraph.regain();  
97 - }  
98 -});  
99 -/************************************************************************************************************************************************/  
100 -  
101 -/**  
102 - * @desciption (TODO) 监听删除事件.  
103 - *  
104 - * @status OK.  
105 - ************************************************************************************************************************************************/  
106 -$('.reladelete').on('click',function() {  
107 - // 判断是否存在选择框选中班次状态.  
108 - if(RelationshipGraph.getFlagIndex()<1) {  
109 - layer.msg('批量删除需要【框选择中班次】才可以操作哦...!');  
110 - return;  
111 - }  
112 - // 关闭所有提示弹出层.  
113 - layer.closeAll();  
114 - // 定义路牌.发车序号数组.  
115 - var lp = new Array(),fcno = new Array();  
116 - for(var c =0;c<gClassNameArray.length;c++) {  
117 - if(typeof(gClassNameArray[c])=='string') {  
118 - var data = d3.select('rect[parent-node='+ gClassNameArray[c] +']').data()[0];  
119 - if(lp.indexOf(data.lpName)<0)  
120 - lp.push(data.lpName);  
121 - fcno.push(data.fcno);  
122 - }  
123 - }  
124 - layer.confirm('您确定要进行批量删除路牌【'+ lp.toString() +'】-->发车序号【'+ fcno.toString() +'】嘛!'+  
125 - '</br>&nbsp;&nbsp;&nbsp;* 注意:如需要撤销当前操作,您可以在系统工具下拉选择点击【撤销按钮】进行恢复.', {  
126 - btn : [ '确认提示并提交', '取消' ]  
127 - }, function() {  
128 - // 关闭所有提示弹出层.  
129 - layer.closeAll();  
130 - // 删除class为case_g的g元素。  
131 - $("g.case_g").remove();  
132 - // 获取选择框所有的元素.  
133 - var nodes = d3.selectAll('.caseactive')[0];  
134 - // 删除选择框.  
135 - $_GlobalGraph.removeNodes(nodes);  
136 - // 选择框标记清零.  
137 - RelationshipGraph.setFlagIndex(0);  
138 - // 清空标记被选择框选中的元素数组.  
139 - gClassNameArray.splice(0,gClassNameArray.length);  
140 - // 重新绘制发车时刻,并重新统计.  
141 - RelationshipGraph.reDrawDepart();  
142 - // 记录当前操作.  
143 - $_GlobalGraph.addHistory();  
144 - });  
145 -});  
146 -/************************************************************************************************************************************************/  
147 -  
148 -  
149 -/**  
150 - * @description : (TODO) 监听添加班次事件.  
151 - *  
152 - * @status OK.  
153 - ************************************************************************************************************************************************/  
154 -$('.reladplus').on('click',function() {  
155 - // 判断选择框是否存在.  
156 - if(RelationshipGraph.getFlagIndex()>0) {  
157 - // 关闭所有提示弹出层.  
158 - layer.closeAll();  
159 - layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【添加班次】!', {  
160 - btn : [ '确认提示并提交', '取消' ]  
161 - },function () {  
162 - // 关闭所有提示弹出层.  
163 - layer.closeAll();  
164 - // 执行选择框关闭函数.  
165 - RelationshipGraph.gClose();  
166 - // 执行添加班次函数.  
167 - RelationshipGraph.reladplus();  
168 - });  
169 - }else {  
170 - // 执行添加班次函数.  
171 - RelationshipGraph.reladplus();  
172 - }  
173 -});  
174 -/************************************************************************************************************************************************/  
175 -  
176 -/**  
177 - * @description : (TODO) 监听添加路牌事件.  
178 - *  
179 - * @status OK.  
180 - ************************************************************************************************************************************************/  
181 - $('.addlp').on('click',function() {  
182 - // 判断选择框是否存在.  
183 - if(RelationshipGraph.getFlagIndex()>0) {  
184 - // 关闭所有提示弹出层.  
185 - layer.closeAll();  
186 - layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【添加路牌】!', {  
187 - btn : [ '确认提示并提交', '取消' ]  
188 - },function () {  
189 - // 关闭所有提示弹出层.  
190 - layer.closeAll();  
191 - // 执行选择框关闭函数.  
192 - RelationshipGraph.gClose();  
193 - // 执行添加路牌函数.  
194 - RelationshipGraph.addlp();  
195 - });  
196 - }else {  
197 - // 执行添加路牌函数.  
198 - RelationshipGraph.addlp();  
199 - }  
200 - });  
201 -/************************************************************************************************************************************************/  
202 -  
203 -/**  
204 - * @description : (TODO) 均匀发车事件.  
205 - *  
206 - * @stutas : OK.  
207 - *  
208 - ************************************************************************************************************************************************/  
209 -$('.updownread').on('click',function() {  
210 - // 判断选择框是否存在.  
211 - if(RelationshipGraph.getFlagIndex()>0) {  
212 - // 关闭所有提示弹出层.  
213 - layer.closeAll();  
214 - layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【均匀发车间隙】!', {  
215 - btn : [ '确认提示并提交', '取消' ]  
216 - },function () {  
217 - // 关闭所有提示弹出层.  
218 - layer.closeAll();  
219 - // 执行选择框关闭函数.  
220 - RelationshipGraph.gClose();  
221 - // 执行均匀发车间隙函数.  
222 - RelationshipGraph.updownread();  
223 - });  
224 - }else {  
225 - // 执行均匀发车间隙函数  
226 - RelationshipGraph.updownread();  
227 - }  
228 -});  
229 -/************************************************************************************************************************************************/  
230 -  
231 -/**  
232 - * 调整班次点击事件  
233 - *  
234 - ************************************************************************************************************************************************/  
235 -$('.aboutread').on('click',function() {  
236 - // 判断选择框是否存在.  
237 - if(RelationshipGraph.getFlagIndex()>0) {  
238 - // 关闭所有提示弹出层.  
239 - layer.closeAll();  
240 - layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【调整班次】!', {  
241 - btn : [ '确认提示并提交', '取消' ]  
242 - },function () {  
243 - // 关闭所有提示弹出层.  
244 - layer.closeAll();  
245 - // 执行选择框关闭函数.  
246 - RelationshipGraph.gClose();  
247 - // 执行均匀发车间隙函数.  
248 - RelationshipGraph.aboutread();  
249 - });  
250 - }else {  
251 - // 执行均匀发车间隙函数  
252 - RelationshipGraph.aboutread();  
253 - }  
254 -});  
255 -/************************************************************************************************************************************************/  
256 -  
257 -/**  
258 - * @description : (TODO) 保存数据.  
259 - *  
260 - * @status OK.  
261 - ************************************************************************************************************************************************/  
262 - $('.checkAdd').on('click',function() {  
263 - // 判断选择框是否存在.  
264 - if(RelationshipGraph.getFlagIndex()>0) {  
265 - // 关闭所有提示弹出层.  
266 - layer.closeAll();  
267 - layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【保存数据】!', {  
268 - btn : [ '确认提示并提交', '取消' ]  
269 - },function () {  
270 - // 关闭所有提示弹出层.  
271 - layer.closeAll();  
272 - // 执行选择框关闭函数.  
273 - RelationshipGraph.gClose();  
274 - // 执行均匀发车间隙函数.  
275 - RelationshipGraph.checkAdd();  
276 - });  
277 - }else {  
278 - // 执行均匀发车间隙函数  
279 - RelationshipGraph.checkAdd();  
280 - }  
281 - });  
282 -/************************************************************************************************************************************************/  
283 -  
284 -/**  
285 - * @description : (TODO)获取路牌对应的班次数(这里的班次不包括早晚例保班次、吃饭时间)  
286 - *  
287 - * @params : [a1--班次数组;a2--路牌数组]  
288 - *  
289 - * @return : 返回一个数组.这里返回的是一个封装的每个路牌对应的班次数(这里的班次不包括早晚例保班次、吃饭时间、班次时间为0的班次)  
290 - ************************************************************************************************************************************************/  
291 -var getbczs = function (a1,a2) {  
292 - var array = new Array();  
293 - // 1、遍历路牌数组  
294 - for(var i = 0;i<a2.length;i++) {  
295 - var bcs = 0;  
296 - // 2、遍历班次数组  
297 - for(var j =0;j<a1.length;j++) {  
298 - // 3、判断当前班次j是否属于当前路牌i下,除去早晚例保班次、吃饭时间、班次时间为0的班次  
299 - if(a1[j].parent == a2[i].lpA.lpNo && a1[j].bcType!='bd' && a1[j].bcType!='lc' && a1[j].bcType!='cf' && a1[j].bcsj>0)  
300 - bcs++;  
301 - }  
302 - // 4、把每个路牌下的对应班次数一一封装在一起,并添加到返回数组里边  
303 - array.push({lpNo:a2[i].lpA.lpNo,bcs:bcs});  
304 - }  
305 - return array;  
306 -}  
307 -/************************************************************************************************************************************************/  
308 -  
309 -  
310 -/**  
311 - * d3动画过度  
312 - *  
313 - * @param {Object} d3 Element  
314 - *  
315 - * @returns {Function} 动画函数部分  
316 - ************************************************************************************************************************************************/  
317 -var _animation = function(d3Node) {return d3Node.transition().delay(function(d,i){return 0.001;}).duration(300).ease("linear");}  
318 -/************************************************************************************************************************************************/  
319 -  
320 -  
321 -/** 创建提示框内容  
322 - *  
323 - * @param {Object} RelationshipGraph 对象  
324 - *  
325 - * @returns {Object} table.outerHTML  
326 - ************************************************************************************************************************************************/  
327 -var createTooltip = function createTooltip(self) {  
328 - var hiddenKeys = ['_PRIVATE_','fcno' ,'PARENTCOLOR', 'SETNODECOLOR', 'SETNODESTROKECOLOR', /*'INTERVAL',*/'num'],  
329 - showKeys = self.configuration.showKeys;  
330 - return d3.tip().attr('class', 'relationshipGraph-tip').offset([-8, -10]).html(function (obj) {  
331 - var keys = Object.keys(obj),  
332 - table = document.createElement('table'),  
333 - count = keys.length,  
334 - rows = [];  
335 - while (count--) {  
336 - var element = keys[count],  
337 - upperCaseKey = element.toUpperCase();  
338 - if (!RelationshipGraph.contains(hiddenKeys, upperCaseKey) && !upperCaseKey.startsWith('__') && obj[element] !='tjz') {  
339 - var row = document.createElement('tr'),  
340 - key = showKeys ? document.createElement('td') : null,  
341 - value = document.createElement('td');  
342 - if (showKeys) {  
343 - var changeKey = null;  
344 - if(element=='fcsj')  
345 - changeKey = '发车时间:';  
346 - else if(element=='ARRIVALTIME')  
347 - changeKey = '到站时间:';  
348 - else if(element=='bcsj')  
349 - changeKey = '行驶时间:';  
350 - else if(element=='STOPTIME')  
351 - changeKey = '停息时间:';  
352 - else if(element=='xlDir')  
353 - changeKey = '行驶方向:';  
354 - else if(element=='parent')  
355 - changeKey = '当前车辆:';  
356 - else if(element=='bcType')  
357 - changeKey = '班次类型:';  
358 - else if(element=='tjbx')  
359 - changeKey = '推荐班型:';  
360 - else  
361 - changeKey = element;  
362 - key.innerHTML =changeKey;  
363 - row.appendChild(key);  
364 - }  
365 -  
366 - if (upperCaseKey == 'VALUE' && !self.configuration.valueKeyName) {  
367 - continue;  
368 - }  
369 -  
370 - if(obj[element]=='relationshipGraph-up')  
371 - value.innerHTML = '上行';  
372 - else if(obj[element]=='relationshipGraph-down')  
373 - value.innerHTML = '下行';  
374 - else if(obj[element]=='normal')  
375 - value.innerHTML = '正常';  
376 - else if(obj[element]=='region')  
377 - value.innerHTML = '区间';  
378 - else if(obj[element]=='fb')  
379 - value.innerHTML = '分班';  
380 - else if(obj[element]=='in')  
381 - value.innerHTML = '进场';  
382 - else if(obj[element]=='lc')  
383 - value.innerHTML = '保养';  
384 - else if(obj[element]=='out')  
385 - value.innerHTML = '出场';  
386 - else if(obj[element]=='bd')  
387 - value.innerHTML = '保养';  
388 - else  
389 - value.innerHTML = obj[element];  
390 - value.style.fontWeight = 'normal';  
391 - row.appendChild(value);  
392 - rows.push(row);  
393 - }  
394 - }  
395 - var rowCount = rows.length;  
396 - while (rowCount--) {  
397 - table.appendChild(rows[rowCount]);  
398 - }  
399 - return table.outerHTML;  
400 - });  
401 -};  
402 -/************************************************************************************************************************************************/  
403 -  
404 -var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();  
405 -  
406 -var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };  
407 -  
408 -function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("不能调用一个类作为函数."); } }  
409 -  
410 -/** 定义图层类  
411 - *  
412 - * @return {Object} 返回图层对象  
413 - *  
414 - **/  
415 -var RelationshipGraph = function () {  
416 -  
417 - /**  
418 - * 创建对象  
419 - *  
420 - * @param {d3.selection} 选择包含图的元素的标识  
421 - *  
422 - * @param {Object} 图层参数配置信息  
423 - *  
424 - **/  
425 - function RelationshipGraph(selection) {  
426 - // 获取配置参数  
427 - var userConfig = arguments.length <= 1 || arguments[1] === undefined ? { showTooltips: true, maxChildCount: 0, thresholds: [] } : arguments[1];  
428 - // 不能把类作为函数调用  
429 - _classCallCheck(this, RelationshipGraph);  
430 - var defaultOnClick = { parent: RelationshipGraph.noop, child: RelationshipGraph.noop };  
431 - // 图层配置参数信息  
432 - this.configuration = {  
433 - multiple: userConfig.multiple || 0,  
434 - hours : userConfig.hours || 24,  
435 - dxHours : userConfig.dxHours,  
436 - width:userConfig.width || 0,// 图层宽  
437 - height:userConfig.height || 0,// 图层高  
438 - offsetX:userConfig.offsetX || 0,// 偏移X值  
439 - offsetY:userConfig.offsetY || 0,// 偏移Y值  
440 - widtMargin:userConfig.widtMargin || 0,// 宽边距  
441 - heightMargin : userConfig.heightMargin ||0,// 高边距  
442 - downDy :userConfig.downDy ||0,// 下行发车时刻Y值差距  
443 - upDy : userConfig.upDy ||0,// 下行发车时刻Y值差值  
444 - timeDomainStart : userConfig.timeDomainStart,// 开始时间  
445 - timeDomainEnd : userConfig.timeDomainEnd,// 结束时间  
446 - startStr:userConfig.startStr,  
447 - endStr: userConfig.endStr,  
448 - taskTypes : userConfig.taskTypes,  
449 - lpNoA : userConfig.lpNoA,  
450 - tickFormat: userConfig.tickFormat,  
451 - stopAraay : userConfig.stopAraay,  
452 - dataMap : userConfig.dataMap,  
453 - selection: selection, // 图形的标识.  
454 - showTooltips: userConfig.showTooltips, // 是否显示工具提示在盘旋  
455 - maxChildCount: userConfig.maxChildCount || 0, // 每行最多显示的儿童数量.  
456 - onClick: userConfig.onClick || defaultOnClick, // 回调函数调用.  
457 - showKeys: userConfig.showKeys, // 是否显示在工具提示中的钥匙.  
458 - transitionTime: userConfig.transitionTime || 1500, // 过渡到开始和完成的时间.  
459 - valueKeyName: userConfig.valueKeyName, // 设置工具提示自定义键  
460 - bxrcgs : userConfig.bxrcgs  
461 - };  
462 - // 是否开启提示框 ,默认开启。  
463 - if (this.configuration.showTooltips === undefined)  
464 - this.configuration.showTooltips = true;  
465 - // 是否显示键 ,默认显示。  
466 - if (this.configuration.showKeys === undefined)  
467 - this.configuration.showKeys = true;  
468 - // 是否显示值,默认显示。  
469 - if (this.configuration.keyValueName === undefined)  
470 - this.configuration.keyValueName = 'value';  
471 -  
472 - this.measurementDiv = document.createElement('div');  
473 -  
474 - this.measurementDiv.className = 'relationshipGraph-measurement';  
475 -  
476 - document.body.appendChild(this.measurementDiv);  
477 -  
478 - this.measuredCache = {};  
479 -  
480 - this.representation = [];  
481 -  
482 - this._spacing = 1;  
483 -  
484 - this._d3V4 = !!this.configuration.selection._groups;  
485 -  
486 - if (this.configuration.showTooltips) {  
487 - this.tooltip = createTooltip(this);  
488 - this.tooltip.direction('n');  
489 - } else {  
490 - this.tooltip = null;  
491 - }  
492 -  
493 - this.svg = this.configuration.selection.select('svg').select('g');  
494 - if (this.svg.empty()) {  
495 - // 创建SVG元素将包含图  
496 - this.svg = this.configuration.selection.append('svg').attr("class", "svg-chart")  
497 - .attr('width',this.configuration.width + this.configuration.widtMargin)  
498 - .attr('height', this.configuration.height + this.configuration.heightMargin)  
499 - .attr('style', 'display: block')  
500 - .append('g').attr("class", "gantt-chart");  
501 -  
502 - // 创建时间线性区域  
503 - var x = d3.time  
504 - .scale()  
505 - .domain([ this.configuration.timeDomainStart, this.configuration.timeDomainEnd ])  
506 - .range([ 0, this.configuration.width])  
507 - .clamp(true),  
508 - // 创建Y线性区域  
509 - y = d3.scale  
510 - .ordinal()  
511 - .domain(this.configuration.lpNoA)  
512 - .rangeRoundBands([ 0, this.configuration.height], .1);  
513 -  
514 - this.configuration.y = y;  
515 - // 创建X轴  
516 - var xAxis = d3.svg  
517 - .axis()  
518 - .scale(x)  
519 - .orient("top")  
520 - .ticks(this.configuration.hours)  
521 - .tickFormat(d3.time.format(this.configuration.tickFormat))  
522 - .tickSubdivide(true)  
523 - .tickSize(8)  
524 - .tickPadding(8)  
525 - .innerTickSize(-(this.configuration.height)),  
526 - // 创建Y轴  
527 - yAxis = d3.svg  
528 - .axis()  
529 - .scale(y)  
530 - .orient("left")  
531 - .tickSize(0),  
532 - // 创建上行发车时间刻度尺轴  
533 - upxAxis = d3.svg  
534 - .axis()  
535 - .scale(x)  
536 - .orient("top")  
537 - .ticks(this.configuration.hours)  
538 - .tickFormat(d3.time.format(this.configuration.tickFormat))  
539 - .tickSubdivide(true)  
540 - .tickSize(30).tickPadding(3),  
541 - // 创建下行发车时间刻度尺轴  
542 - downxAxis = d3.svg  
543 - .axis()  
544 - .scale(x)  
545 - .orient("top")  
546 - .ticks(this.configuration.hours)  
547 - .tickFormat(d3.time.format(this.configuration.tickFormat))  
548 - .tickSubdivide(true)  
549 - .tickSize(30).tickPadding(3);  
550 - // 添加X轴  
551 - this.svg  
552 - .append("g")  
553 - .attr("class", "x axis")  
554 - .attr("transform", "translate(" + this.configuration.offsetX + ", " + this.configuration.offsetY + ")")  
555 - .transition()  
556 - .call(xAxis);  
557 - // 添加Y轴  
558 - this.svg  
559 - .append("g")  
560 - .attr("class", "y axis")  
561 - .attr("transform", "translate(" + this.configuration.offsetX + ", " + this.configuration.offsetY + ")")  
562 - .transition().call(yAxis);  
563 - // 添加上行发车时间刻度尺  
564 - this.svg  
565 - .append("g")  
566 - .attr("class", "up")  
567 - .attr("transform", "translate(" + this.configuration.offsetX + ", " + (this.configuration.offsetY - this.configuration.upDy) + ")")  
568 - .transition().call(upxAxis);  
569 - // 添加下行发车时间刻度尺  
570 - this.svg  
571 - .append("g")  
572 - .attr("class", "down")  
573 - .attr("transform", "translate(" + this.configuration.offsetX + ", " + (this.configuration.offsetY - this.configuration.downDy) + ")")  
574 - .transition().call(downxAxis);  
575 - this.svg  
576 - .append("g")  
577 - .attr("class", "shift");  
578 - var $_UP = d3.select('g.up')  
579 - .append('g')  
580 - .attr('class','tick')  
581 - .attr('transform','translate(0,0)')  
582 - .style('opacity',1),  
583 - $_DOWN = d3.select('g.down')  
584 - .append('g')  
585 - .attr('class','tick')  
586 - .attr('transform','translate(0,0)')  
587 - .style('opacity',1)  
588 - $_UP.append('line').attr('x2',0).attr('y2',0);  
589 - $_UP.append('text').attr('x',-10).attr('dy','.32em').attr('y',0).style('text-anchor','end').text('上行发车时刻');  
590 - $_DOWN.append('line').attr('x2',0).attr('y2',0);  
591 - $_DOWN.append('text').attr('x',-10).attr('dy','.32em').attr('y',0).style('text-anchor','end').text('下行发车时刻');  
592 - this.addListenerMouseEvent();  
593 - this.createStatistics();  
594 - // 清空数组  
595 - if(yAxisYArray.length>0)  
596 - yAxisYArray.splice(0,yAxisYArray.length);  
597 - for(var t = 0;t<this.configuration.taskTypes.length;t++) {  
598 - yAxisYArray.push({  
599 - y:y(this.configuration.taskTypes[t].lpNo)+this.configuration.offsetY,  
600 - carname:this.configuration.taskTypes[t].lpName,  
601 - lpA : this.configuration.taskTypes[t]});  
602 - }  
603 - }  
604 - this.graph = this;  
605 - }  
606 - _createClass(RelationshipGraph, [{  
607 - key: 'data',  
608 - value: function data(json) {  
609 - if (RelationshipGraph.verifyJson(json)) {  
610 - /** 上、下行JSON数组 */  
611 - var upArray = new Array(),downArray = new Array();  
612 - for(var j = 0 ; j< json.length ; j++) {  
613 - if(json[j].bcType=='normal' || json[j].bcType=='region') {  
614 - if(json[j].xlDir == 'relationshipGraph-up')  
615 - upArray.push(json[j]);  
616 - else if(json[j].xlDir == 'relationshipGraph-down')  
617 - downArray.push(json[j])  
618 - }  
619 - }  
620 - this.removeNodes(d3.selectAll('g.up_tick')[0]);  
621 - this.removeNodes(d3.selectAll('g.down_tick')[0]);  
622 - this.removeNodes($('g.shift').children());  
623 - var upNodes = this.configuration.selection.select('svg').select('g.up').selectAll('.up_tick').data(upArray),  
624 - downNodes = this.configuration.selection.select('svg').select('g.down').selectAll('.down_tick').data(downArray),  
625 - nodes = this.configuration.selection.select('svg').select('g.shift').selectAll('.data').data(json);  
626 - // 绘制上行发车时刻  
627 - this.createUpTime(upNodes);  
628 - // 绘制下行发车时刻  
629 - this.createDownTime(downNodes);  
630 - // 绘制班次  
631 - this.createClasses(nodes);  
632 - // 绘制统计值  
633 - this.statistics();  
634 - if (this.configuration.showTooltips) {  
635 - d3.select('.d3-tip').remove();  
636 - this.svg.call(this.tooltip);  
637 - }  
638 - }  
639 - return this;  
640 - }  
641 - }, {  
642 - key : 'createUpTime',  
643 - value : function createUpTime(upNodes) {  
644 - var _this = this;  
645 - var $g_tick = upNodes.enter().append('g').attr('class','up_tick')  
646 - .attr('transform', function (obj) {  
647 - var hourMinue = obj.fcsj.split(":");  
648 - var rectX = (parseInt(hourMinue[0])-_this.configuration.dxHours )*60*_this.configuration.multiple +  
649 - parseInt(hourMinue[1])*_this.configuration.multiple;  
650 - return 'translate(' + rectX + ',0)';  
651 - });  
652 - $g_tick.append('line').attr('y2',-5).attr('x2',0);  
653 - $g_tick.append('text').attr('y',-10).attr('dy','0em').attr('x',0).style('text-anchor','middle')  
654 - .text(function(obj) {  
655 - var hourMinue = obj.fcsj.split(":");  
656 - return hourMinue[1];  
657 - });  
658 - }  
659 - }, {  
660 - key : 'createDownTime',  
661 - value: function createDownTime(downNodes) {  
662 - var _this = this;  
663 - var $g_tick = downNodes.enter().append('g').attr('class','down_tick')  
664 - .attr('transform', function (obj) {  
665 - var hourMinue = obj.fcsj.split(":");  
666 - var rectX = (parseInt(hourMinue[0])-_this.configuration.dxHours )*60*_this.configuration.multiple + parseInt(hourMinue[1])*_this.configuration.multiple;  
667 - return 'translate(' + rectX + ',0)';  
668 - });  
669 - $g_tick.append('line').attr('y2',-5).attr('x2',0);  
670 - $g_tick.append('text').attr('y',-10).attr('dy','0em').attr('x',0).style('text-anchor','middle')  
671 - .text(function(obj) {  
672 - var hourMinue = obj.fcsj.split(":");  
673 - return hourMinue[1];  
674 - });  
675 -  
676 - }  
677 - }, {  
678 - key: 'setBxTagType',  
679 - value : function setBxTagType(node) {  
680 -  
681 - }  
682 -  
683 - }, {  
684 - /**  
685 - * @description : (TODO) 创建rect、text(班次对象、班次属性值)元素对象  
686 - *  
687 - * @param {Object} Elements  
688 - *  
689 - * @status : OK.  
690 - */  
691 - key: 'createClasses',  
692 - value: function createClasses(childrenNodes) {  
693 - // 把当前对象赋值给_this.  
694 - var _this = this;  
695 - // 添加底层rect元素(班次)对象.  
696 - childrenNodes.enter().append('rect').attr('id',RelationshipGraph.setIdValue) // 设值id  
697 - .attr('x',RelationshipGraph.setXValue) // 设值x坐标  
698 - .attr('y',RelationshipGraph.setYValue) // 设值y坐标.  
699 - .attr('class',RelationshipGraph.setRectClassV)// 设值class  
700 - .attr('width',RelationshipGraph.setRectWidthV) // 设值宽度  
701 - .attr('height',RelationshipGraph.setRectHeight)// 设值高度  
702 - .attr('parent-node',RelationshipGraph.setRectParenNodeIdV)// 设值父元素id  
703 - .attr('next-node',RelationshipGraph.setNextNodeIdV)// 设值下个元素的id  
704 - .attr('last-node',RelationshipGraph.setLastNodeIdV)// 设值上个元素的id  
705 - .attr('rect-type',RelationshipGraph.setNodeType('shift')); // 设值元素类型  
706 - // 添加第一行text元素(班次属性值[发车时间~到站时间])对象.  
707 - childrenNodes.enter().append('text').attr('id',RelationshipGraph.setText01IdV) //设值id.  
708 - .attr('x',RelationshipGraph.setXValue) // 设值x坐标.  
709 - .attr('y',RelationshipGraph.setYValue) // 设值y.  
710 - .attr('dx',RelationshipGraph.setTextDxV(5)) // 设值x方向偏移量.  
711 - .attr('dy',RelationshipGraph.setTextDyV(18))// 设值y方向偏移量.  
712 - .attr('class',RelationshipGraph.setTextClassV) //设值class.  
713 - .text(RelationshipGraph.setText01text)// 设值text文本  
714 - .attr('parent-node',RelationshipGraph.setIdValue)// 设置父元素id  
715 - .attr('text-type',RelationshipGraph.setNodeType('timeslot'));// 设值元素类型.  
716 - // 添加第二行text元素(班次属性值[行驶时间])对象.  
717 - childrenNodes.enter().append('text').attr('id',RelationshipGraph.setText02IdV)// 设值id.  
718 - .attr('x',RelationshipGraph.setXValue)// 设值x.  
719 - .attr('y',RelationshipGraph.setYValue)// 设值y.  
720 - .attr('dx',RelationshipGraph.setTextDxV(5))// 设值x方向偏移量.  
721 - .attr('dy',RelationshipGraph.setTextDyV(36))// 设值y方向偏移量.  
722 - .attr('class',RelationshipGraph.setTextClassV) // 设值class.  
723 - .text(RelationshipGraph.setText02text)// 设值text文本.  
724 - .attr('parent-node',RelationshipGraph.setIdValue)// 设值父元素id  
725 - .attr('text-type', RelationshipGraph.setNodeType('travel'));// 设置元素类型.  
726 - // 添加第三行text元素(班次属性值[停息时间])对象.  
727 - childrenNodes.enter().append('text').attr('id',RelationshipGraph.setText03IdV)// 设值id.  
728 - .attr('x',RelationshipGraph.setXValue)// 设值x  
729 - .attr('y',RelationshipGraph.setYValue)// 设值y  
730 - .attr('dx',RelationshipGraph.setTextDxV(5))// 设值x方向偏移量.  
731 - .attr('dy',RelationshipGraph.setTextDyV(54))// 设值y方向偏移量.  
732 - .attr('class',RelationshipGraph.setTextClassV)// 设值class.  
733 - .text(RelationshipGraph.setText03text)// 设值text文本.  
734 - .attr('parent-node',RelationshipGraph.setIdValue)// 设值父元素id.  
735 - .attr('text-type',RelationshipGraph.setNodeType('gap'));// 设值元素类型.  
736 - // 添加底层rect元素上的圆.  
737 - childrenNodes.enter().append('circle').attr('id',RelationshipGraph.setCircleIdV)// 设值id.  
738 - .attr('cx',RelationshipGraph.setCirclecxV)// 设值cx.  
739 - .attr('cy',RelationshipGraph.setCirclecyV)// 设值cy.  
740 - .attr('r',RelationshipGraph.setCircleRV)// 设值半径r.  
741 - .attr('class',RelationshipGraph.setCircleClass)// 设值class.  
742 - .attr('parent-node',RelationshipGraph.setIdValue);// 设值父元素id.  
743 - // 添加圆里的text元素(班次类型值)对象  
744 - childrenNodes.enter().append('text').attr('id',RelationshipGraph.setText04IdV)// 设值id.  
745 - .attr('x',RelationshipGraph.setText04XV)// 设值x.  
746 - .attr('y',RelationshipGraph.setText04YV)// 设值y.  
747 - .attr('class',RelationshipGraph.setText04ClassV)// 设值class  
748 - .text(RelationshipGraph.setText04text)//设值text文本.  
749 - .attr('parent-node', RelationshipGraph.setIdValue)// 设值父元素id.  
750 - .attr('text-type',RelationshipGraph.setNodeType('bcType'));// 设值元素类型.  
751 - // 添加底层rect元素的rect对象(覆盖层). 添加覆盖层是为了对拖拽事件的响应.  
752 - childrenNodes.enter().append('rect').attr('id',RelationshipGraph.setCoverRectIdV)// 设值id.  
753 - .attr('x',RelationshipGraph.setXValue)// 设值x.  
754 - .attr('y',RelationshipGraph.setYValue)// 设值y.  
755 - .attr('class',RelationshipGraph.setCoverRectClassV('rect-cover'))// 设值class.  
756 - .attr('width',RelationshipGraph.setRectWidthV)// 设值宽度.  
757 - .attr('height',RelationshipGraph.setRectHeight)// 设值高度.  
758 - .attr('parent-node',RelationshipGraph.setCoverRectParentV)// 设值父元素id.  
759 - .attr('rect-type',RelationshipGraph.setNodeType('cover'))// 设值元素类型.  
760 - .attr('next-node',RelationshipGraph.setCoverRectLastIdV)// 设值下个元素id.  
761 - .on('mouseover', _this.tooltip ? _this.tooltip.show : RelationshipGraph.noop)// 监听鼠标移入事件.  
762 - .on('mouseout', _this.tooltip ? _this.tooltip.hide : RelationshipGraph.noop)// 监听鼠标移出事件.  
763 - .on('mousedown', function (obj) {  
764 - _this.tooltip.hide();  
765 - _this.configuration.onClick.child(obj);  
766 - // 这里很关键.移除鼠标右击时做拖拽事件.决定了鼠标右击时只做左菜单.  
767 - if(window.event.which==3)  
768 - context.setisContext(true);  
769 - }).call(d3.behavior.drag()  
770 - .on("dragstart", RelationshipGraph.singleElementDrawStart) // 监听单个rect元素拖拽开始事件  
771 - .on("drag",RelationshipGraph.singleElementDrawRuing)// 监听单个rect元素拖拽中事件.  
772 - .on("dragend",RelationshipGraph.singleElementDrawStop));// 监听单个rect元素拖拽结束事件.  
773 - }  
774 - }, {  
775 - key: 'removeNodes',  
776 - value: function removeNodes(nodes) {  
777 - for(var n = 0 ;n<nodes.length;n++) {  
778 - $(nodes[n]).remove();  
779 - }  
780 - }  
781 - }, {  
782 - key : 'getSvgyAxisTransformY',  
783 - value : function getSvgyAxisTransformY() {  
784 - var listChildrNodes = $(".y").children(".tick");  
785 - var len_node = listChildrNodes.length;  
786 - var y_array = new Array();  
787 - for(var n = 0;n<len_node;n++) {  
788 - var transform = $(listChildrNodes[n]).attr("transform");  
789 - var t_value = transform.substring(transform.indexOf("(")+1 ,transform.lastIndexOf(")") ).split(",");  
790 - y_array.push(parseInt(t_value[1]));  
791 - }  
792 - return y_array;  
793 - }  
794 - }, {  
795 - key : 'getDataArray',  
796 - value : function getDataArray() {  
797 - var nodes = d3.selectAll('rect.data')[0],dataArray = new Array();  
798 - for(var i = 0 ; i<nodes.length;i++) {  
799 - dataArray.push(d3.select(nodes[i]).data()[0]);  
800 - }  
801 - return dataArray;  
802 - }  
803 - }, {  
804 - key : 'addHistory' ,  
805 - value : function addHistory() {  
806 - historyArray.push({'data':JSON.stringify(this.getDataArray()),'granph':JSON.stringify(this.configuration)});  
807 - $_keyIndex++;  
808 - }  
809 - }, {  
810 - key : 'statistics',  
811 - value : function statistics() {  
812 - var $_this = this,  
813 - array = $_this.getSvgyAxisTransformY(),  
814 - gdata = d3.selectAll('rect.data')[0],  
815 - arrayTemp = new Array(),  
816 - minValue = 0,timeNum;  
817 - for(var a=0;a<array.length;a++) {  
818 - var tempNum = 0,timeNum = 0,lpNo = '';  
819 - for(var g = 0 ; g <gdata.length;g++) {  
820 - var temp_i = parseInt(d3.select(gdata[g]).attr('y'))-this.configuration.offsetY;  
821 - if(temp_i<array[a] && temp_i>minValue) {  
822 - var parentNodeCName = d3.select(gdata[g]).attr('id'),  
823 - // nodes = d3.selectAll('text[parent-node='+ parentNodeCName +']')[0]  
824 - $_d = d3.select(gdata[g]).data()[0];  
825 - lpNo = $_d.lpNo;  
826 - timeNum = timeNum + parseInt($_d.STOPTIME) + parseInt($_d.bcsj);  
827 - if($_d.bcType!='bd' && $_d.bcType!='lc' && $_d.bcType!='cf' && $_d.bcsj>0)  
828 - tempNum++;  
829 - }  
830 - }  
831 - minValue = array[a];  
832 - var className = 'statis_container_' + array[a];  
833 - var textNodes = $("."+className).children("text");  
834 - /*var hours = parseInt(timeNum/60);  
835 - var mimus = timeNum%60,zgs = hours + (mimus==0? "": "." + mimus);*/  
836 - var zgs = parseFloat((timeNum/60).toFixed(2));  
837 - $(textNodes[0]).text("总工时:" + zgs);  
838 - $(textNodes[1]).text("总班次:"+(tempNum));  
839 - $_this.pptjbx($("."+className).children("rect")[2],zgs*1,lpNo,$_this);  
840 - }  
841 - }  
842 -  
843 - }, {  
844 -  
845 - }, {  
846 - key : 'pptjbx',  
847 - value : function pptjbx(node,gs,lpNo,$_this) {  
848 - if($_this.configuration.bxrcgs!=null) {  
849 - for(var t = 0 ; t<$_this.configuration.bxrcgs.length;t++) {  
850 - if($_this.configuration.bxrcgs[t].lpNo == lpNo)  
851 - d3.select(node).data()[0].tjbx = $_this.configuration.bxrcgs[t].type;  
852 - }  
853 - }else {  
854 - workeType.sort(function(a,b){return b.hourV-a.hourV});  
855 - var zhHoursA = new Array();  
856 - if(gs>(workeType[0].hourV+1)) {  
857 - for(var k = 0 ; k<workeType.length;k++) {  
858 - var kHourV = workeType[k].hourV;  
859 - for(var a = k ; a<workeType.length;a++) {  
860 - var aHourV = workeType[a].hourV;  
861 - var dx = Math.abs(parseInt(kHourV + aHourV - gs));  
862 - zhHoursA.push({'bx1': workeType[k].type,'bx2': '</br></br>' + workeType[a].type,'countGs':dx});  
863 - }  
864 - }  
865 - }else {  
866 - for(var b = 0 ; b<workeType.length;b++) {  
867 - zhHoursA.push({'bx1': workeType[b].type,'bx2':'','countGs':Math.abs(parseInt(workeType[b].hourV - gs))});  
868 - }  
869 - }  
870 - zhHoursA.sort(function(a,b){return a.countGs-b.countGs});  
871 - d3.select(node).data()[0].tjbx = zhHoursA[0].bx1 + zhHoursA[0].bx2;  
872 - }  
873 - /*if(gs>16) {  
874 - d3.select(node).data()[0].tjbx = 'zyxy';  
875 - } else {  
876 - var bclx = 'wz';  
877 - for(var g = 0 ; g<workeType.length;g++) {  
878 - if((gs<workeType[g].value && gs>workeType[g].value-10) || (gs<workeType[g].value*2 && gs>workeType[g].value2* -10)){  
879 - bclx = workeType[g].type;  
880 - break;  
881 - }  
882 - }  
883 - d3.select(node).data()[0].tjbx = bclx;  
884 - }*/  
885 - }  
886 - }, {  
887 - key : 'createStatistics',  
888 - value : function createStatistics() {  
889 - var svg = d3.select('.gantt-chart'),  
890 - _this = this,  
891 - array = _this.getSvgyAxisTransformY();  
892 - var g_statis = svg.selectAll('.g_statis').data([1]).enter().append('g').classed({'g_statis':true}).attr("transform", "translate(" + _this.configuration.offsetX + ", " + _this.configuration.offsetY + ")");  
893 - for(var c = 0 ;c<array.length;c++) {  
894 - var className = 'statis_container_' + array[c];  
895 - var statis_container = g_statis.append('g').attr("class",className).attr("transform", "translate(" + 0 + ", " + array[c] + ")");  
896 - statis_container.append('rect').classed({'rect_shift':true})  
897 - .attr("x",-_this.configuration.offsetX)  
898 - .attr("y",9)  
899 - .attr("rx",5)  
900 - .attr("ry",5)  
901 - .attr("width",_this.configuration.offsetX)  
902 - .attr("height",20);  
903 - statis_container.append('rect').classed({'rect_Whours':true})  
904 - .attr("x",-_this.configuration.offsetX)  
905 - .attr("y",32)  
906 - .attr("rx",5)  
907 - .attr("ry",5)  
908 - .attr("width",_this.configuration.offsetX)  
909 - .attr("height",20);  
910 - statis_container.append("text")  
911 - .attr("class","statis_text")  
912 - .attr("x",-_this.configuration.offsetX)  
913 - .attr("y",9)  
914 - .attr('dx',15)  
915 - .attr('dy',15)  
916 - .text("总工时:");  
917 - statis_container.append("text")  
918 - .attr("class","statis_text")  
919 - .attr("x",-_this.configuration.offsetX)  
920 - .attr("y",32)  
921 - .attr('dx',15)  
922 - .attr('dy',15)  
923 - .text("总班次:");  
924 - statis_container.append('rect').data([{'tjbx':'未知','bcType':'tjz'}]).classed({'rect-cover-statis':true})  
925 - .attr("x",-_this.configuration.offsetX)  
926 - .attr("y",8)  
927 - .attr("rx",5)  
928 - .attr("ry",5)  
929 - .attr("width",_this.configuration.offsetX)  
930 - .attr("height",20)  
931 - .on('mouseover', _this.tooltip ? _this.tooltip.show : RelationshipGraph.noop)  
932 - .on('mouseout', _this.tooltip ? _this.tooltip.hide : RelationshipGraph.noop);  
933 - statis_container.append('rect').data([{'bcType':'tjz'}]).classed({'rect-cover-statis':true})  
934 - .attr("x",-_this.configuration.offsetX)  
935 - .attr("y",32)  
936 - .attr("rx",5)  
937 - .attr("ry",5)  
938 - .attr("width",_this.configuration.offsetX)  
939 - .attr("height",20);  
940 - }  
941 - }  
942 -  
943 - }, {  
944 - /**  
945 - * @description : (TODO) 添加鼠标监听事件.  
946 - *  
947 - * ^^^^^^^^^^^^^^^^^^^^^  
948 - * 此事件做绘制选中班次框.  
949 - *  
950 - **/  
951 - key: 'addListenerMouseEvent',  
952 - value : function addListenerMouseEvent() {  
953 - // 1、 控制鼠标操作从 按下(300ms开始,并且按下时不能移动鼠标,打开开关) ---> 移动(画选择框) ---> 松开(关闭开关) 过程.  
954 - var flag = false,stop;  
955 - // 2、获取DIV ID为 [ganttSvg] svg容器.  
956 - var svg = d3.select("#ganttSvg");  
957 - // 3、给svg容器元素对象 添加鼠标按下事件.  
958 - svg.on('mousedown',function(e){  
959 - // 3.1、如果开关没打开,或者已存在选择框对象,或者从rect元素(班次)对象上按下时,提前结束鼠标操作过程.  
960 - if(flag || RelationshipGraph.getFlagIndex()>0 || d3.event.target.nodeName =='rect')  
961 - return false;  
962 - // 3.2、定义鼠标按下的x、y坐标 .  
963 - var d3MouseDown_x = parseInt(d3.mouse(this)[0]),d3MouseDown_y = parseInt(d3.mouse(this)[1]);  
964 - // 3.3、计时鼠标是否按下已有300ms,并且在300ms中鼠标未曾移动,则打开开关,进入鼠标操作过程.  
965 - stop = setTimeout(function(e) {  
966 - // 3.4、打开鼠标移动和松开事件开关.  
967 - flag = true;  
968 - // 3.5、记录当前选择框数 .  
969 - RelationshipGraph.setFlagIndex(1);  
970 - // 3.6、创建选择框 .  
971 - var container_g = d3.selectAll(".gantt-chart").selectAll('.case_g').data([1]).enter().append('g').classed({'case_g':true});  
972 - // 3.7、给选择框添加class为case_rect caseactive 元素.  
973 - container_g.append('rect').data([{'bcType':'tjz'}]).classed({'case_rect caseactive':true})  
974 - .attr('id', 'case_rectId')  
975 - .attr('x', d3MouseDown_x)  
976 - .attr('y', d3MouseDown_y)  
977 - .attr('rect-type', function (obj) {  
978 - return 'case';  
979 - }).call(d3.behavior.drag()  
980 - .on("dragstart",RelationshipGraph.regionDrawStart) // 3.7.1 给选择框添加沿X轴开始拖拽事件.  
981 - .on("drag",RelationshipGraph.regionDrawRuing) // 3.7.2 给选择框添加沿X轴拖拽中事件.  
982 - .on("dragend",RelationshipGraph.regionDrawStop));// 3.7.3 给选择框添加沿X轴拖拽结束事件.  
983 - // 3.8 打开小tips提示层.  
984 - layer.tips('鼠标绘制工具已打开,从此处位置开始绘制选中框来进行选中班次。', '.case_rect', {  
985 - tips: [1, '#3595CC'],  
986 - time: 4000  
987 - });  
988 - },200);  
989 - // 4、给svg容器元素对象 添加鼠标移动事件 . 这里等同于绘制选择框.  
990 - }).on('mousemove',function(e){  
991 - // 4.1 判断开关是否打开状态.  
992 - if(flag) {  
993 - // 4.1.1、定义鼠标移动的x、y坐标.  
994 - var d3MouseMove_x = parseInt(d3.mouse(this)[0]),d3MouseMove_y = parseInt(d3.mouse(this)[1]);  
995 - // 4.1.2、获取class 为case_rect 的元素起始x、y坐标点.  
996 - var mdX = parseInt($("rect.case_rect").attr("x")),mdY = parseInt($("rect.case_rect").attr("y"));  
997 - // 4.1.3、根据两点之间计算高和宽,并给class为case_rect元素设置高和宽的属性值.  
998 - svg.selectAll('rect.case_rect').attr("width", Math.abs(d3MouseMove_x - mdX)).attr("height", Math.abs(d3MouseMove_y - mdY));  
999 - }else {  
1000 - // 4.2 清楚定时器.  
1001 - clearTimeout(stop);  
1002 - }  
1003 - // 5、 给svg容器元素对象 添加鼠标松开事件.  
1004 - }).on('mouseup',function(e){  
1005 - if(flag) {  
1006 - layer.closeAll();// 关闭弹出层.  
1007 - RelationshipGraph.mouseUpEvent(flag);  
1008 - flag = false;  
1009 - } else {  
1010 - clearTimeout(stop);  
1011 - }  
1012 - // 6、给svg容器元素对象 添加鼠标移出事件.解决鼠标在其他元素上松开而不关闭开关问题.只有在绑定 mouseleave 事件的元素上,将鼠标移出时,才会触发该事件。  
1013 - }).on('mouseleave',function() {  
1014 - if(flag) {  
1015 - layer.closeAll();// 关闭弹出层.  
1016 - RelationshipGraph.mouseUpEvent(flag);  
1017 - flag = false;  
1018 - } else {  
1019 - clearTimeout(stop);  
1020 - }  
1021 - });  
1022 - }  
1023 - }], [{  
1024 - key: 'contains',  
1025 - value: function contains(arr, key) {  
1026 - return arr.indexOf(key) > -1;  
1027 - }  
1028 - }, {  
1029 - /**  
1030 - * @description : (TODO) 获取鼠标绘制的当前选择框标识(这里限制只做一次性选择元素拖拽,在绘制选择框时)  
1031 - *  
1032 - * @return 返回一个数值. 鼠标绘制的当前选择框标识(这里限制只做一次性选择元素拖拽,在绘制选择框时)  
1033 - * */  
1034 - key : 'getFlagIndex',  
1035 - value : function getFlagIndex() {  
1036 - return flagIndex;  
1037 - }  
1038 -  
1039 - }, {  
1040 - /**  
1041 - * @description : (TODO) 设值鼠标绘制的当前选择框标识(这里限制只做一次性选择元素拖拽,在绘制选择框时).  
1042 - *  
1043 - * @param [v--数值]  
1044 - * */  
1045 - key : 'setFlagIndex',  
1046 - value: function setFlagIndex(v) {  
1047 - flagIndex = v;  
1048 - }  
1049 - }, {  
1050 - /**  
1051 - * @description : (TODO) 关闭选择框按钮事件.  
1052 - *  
1053 - * @status OK.  
1054 - * */  
1055 - key : 'gClose',  
1056 - value : function gClose() {  
1057 - $("g.case_g").remove();  
1058 - RelationshipGraph.setFlagIndex(0);  
1059 - gClassNameArray = [];  
1060 - d3.selectAll('.caseactive').classed({'caseactive':false});  
1061 - }  
1062 - }, {  
1063 - /**  
1064 - * @description : (TODO) 添加班次事件.  
1065 - *  
1066 - * @status OK.  
1067 - * */  
1068 - key : 'reladplus',  
1069 - value : function reladplus() {  
1070 - // 弹出层mobal页面  
1071 - $.get('/pages/base/timesmodel/reladplus.html', function(m){  
1072 - $(pjaxContainer).append(m);  
1073 - // 规定被选元素要触发的事件。可以使自定义事件(使用 bind() 函数来附加),或者任何标准事件。  
1074 - $('#reladplus_mobal').trigger('reladplusMobal.show',[$_GlobalGraph,BaseFun,yAxisYArray]);  
1075 - });  
1076 - }  
1077 - }, {  
1078 - /**  
1079 - * @description : (TODO) 添加路牌.  
1080 - *  
1081 - * @status OK.  
1082 - * */  
1083 - key : 'addlp',  
1084 - value : function addlp() {  
1085 - // 获取初始路牌总数.  
1086 - var len = $_GlobalGraph.configuration.taskTypes.length;  
1087 - // 添加路牌.  
1088 - $_GlobalGraph.configuration.taskTypes.push({'lp':null,'lpName':len+1,'lpNo':len+1,'lpType':'普通路牌'});  
1089 - // 添加路牌编码  
1090 - $_GlobalGraph.configuration.lpNoA.push(len+1);  
1091 - // 修改图形高度  
1092 - $_GlobalGraph.configuration.height = $_GlobalGraph.configuration.lpNoA.length*60 + 240;  
1093 - // 修改初始化图形时间轴开始时间  
1094 - $_GlobalGraph.configuration.timeDomainStart=new Date($_GlobalGraph.configuration.startStr);  
1095 - // 修改初始化图形时间轴结束时间  
1096 - $_GlobalGraph.configuration.timeDomainEnd=new Date($_GlobalGraph.configuration.endStr);  
1097 - // 获取数据.  
1098 - var data_ = $_GlobalGraph.getDataArray();  
1099 - // 删除图形.  
1100 - $('svg.svg-chart').remove();  
1101 - // 重新创建图形.  
1102 - var graph_ = d3.select('#ganttSvg').relationshipGraph($_GlobalGraph.configuration);  
1103 - // 根据数据重新渲染图形.  
1104 - graph_.data(data_);  
1105 - $_GlobalGraph = graph_;  
1106 - // 记录当前操作.  
1107 - graph_.addHistory();  
1108 - // 弹出提示消息  
1109 - layer.msg('操作成功!已添路牌【'+ (len+1) +'】!');  
1110 - }  
1111 -  
1112 - }, {  
1113 - key : 'testFcno',  
1114 - value : function testFcno(arr) {  
1115 - for(var r = 0 ; r<arr.length;r++) {  
1116 - console.log(arr[r].fcno);  
1117 - }  
1118 - }  
1119 - }, {  
1120 - key : 'updownread',  
1121 - value : function updownread() {  
1122 - //var index = layer.load(1, {shade: [0.1,'#fff'] });//0.1透明度的白色背景  
1123 - // 1、获取所有班次数.  
1124 - var list = $_GlobalGraph.getDataArray();  
1125 - console.log(list.length);  
1126 - // 2、获取方向代码.  
1127 - var upDir = $_GlobalGraph.configuration.dataMap.dira[0],// 2.1 上行方向.  
1128 - downDir = $_GlobalGraph.configuration.dataMap.dira[1];// 2.2 下行方向.  
1129 - // 3、获取周转时间.  
1130 - var zzsj = $_GlobalGraph.configuration.stopAraay[0].zzsj;  
1131 - // 4、根据方向,归类班次.[上行班次;下行班次;其他班次(早晚例保、进出场、吃饭时间)].  
1132 - var tempa = BaseFun.getDirBc(list,$_GlobalGraph.configuration.dataMap.dira);  
1133 - console.log(tempa);  
1134 - //console.log(tempa.upArr.concat(tempa.downArr).length);  
1135 - // 5、均匀上行班次的发车间距.  
1136 - var sxbc = BaseFun.jhfcjx(tempa.upArr,upDir,zzsj,$_GlobalGraph.configuration.dataMap);  
1137 - console.log('getDirBc---- '+tempa.downArr.length);  
1138 - // 6、均匀下行班次的发车间距.  
1139 - var xxbc = BaseFun.jhfcjx(tempa.downArr,downDir,zzsj,$_GlobalGraph.configuration.dataMap);  
1140 - console.log('jhfcjx---'+ xxbc.length);  
1141 - //console.log(sxbc.concat(xxbc).length);  
1142 - // $_GlobalGraph.data(sxbc);  
1143 - // console.log($_GlobalGraph.configuration);  
1144 - var rsData = BaseFun.tztzsj01(sxbc.concat(xxbc),$_GlobalGraph.configuration.lpNoA,$_GlobalGraph.configuration.dataMap);  
1145 -  
1146 - var jar = BaseFun.tzsmbcsj(BaseFun.setbcsAndfcno(rsData),$_GlobalGraph.configuration.dataMap.smbcsjArr,  
1147 - $_GlobalGraph.configuration.dataMap.ccsjArr,  
1148 - $_GlobalGraph.configuration.dataMap.cclcArr,  
1149 - $_GlobalGraph.configuration.dataMap.qdzArr,  
1150 - $_GlobalGraph.configuration.stopAraay[0].lbsj);  
1151 -  
1152 - // 删除图形.  
1153 - $('svg.svg-chart').remove();  
1154 - // 重新创建图形.  
1155 - var graph_ = d3.select('#ganttSvg').relationshipGraph($_GlobalGraph.configuration);  
1156 - // 根据数据重新渲染图形.  
1157 - graph_.data(jar);  
1158 - $_GlobalGraph = graph_;  
1159 - // $_GlobalGraph.data(rsData);  
1160 - /*BaseFun.tztzsj(jar,$_GlobalGraph.configuration.lpNoA,$_GlobalGraph.configuration.dataMap);*/  
1161 - /*var resultJA = new Array();  
1162 - for(var m = 0 ; m < $_GlobalGraph.configuration.taskTypes.length; m++) {  
1163 - // 获取路牌编号.  
1164 - var lpNo_ = $_GlobalGraph.configuration.taskTypes[m].lpNo;  
1165 - // 定义路牌下的所有班次.  
1166 - var lpbc_ = new Array();  
1167 - // 遍历班次数.  
1168 - for(var j =0 ; j <jar.length; j++) {  
1169 - // 判断当期遍历的班次是否属于当前的路牌.  
1170 - if(jar[j].lpNo == lpNo_)  
1171 - lpbc_.push(jar[j]);  
1172 - }  
1173 - // 按照发车序号顺序排序.  
1174 - lpbc_.sort(function(a,b){return a.fcno-b.fcno});  
1175 - resultJA = resultJA.concat(BaseFun.addjclbbc(lpbc_,  
1176 - $_GlobalGraph.configuration.dataMap,$_GlobalGraph.configuration.stopAraay[0].lbsj,$_GlobalGraph.configuration.dataMap.map));  
1177 - }*/  
1178 -  
1179 - // BaseFun.tztzsj01(xxbc.concat(sxbc),$_GlobalGraph.configuration.lpNoA,$_GlobalGraph.configuration.dataMap)  
1180 - // $_GlobalGraph.data(BaseFun.tztzsj01(jar,$_GlobalGraph.configuration.lpNoA,$_GlobalGraph.configuration.dataMap));  
1181 - // 7、调整停站间隙.  
1182 - // var data = BaseFun.tztzsj(sxbc.concat(xxbc).concat(tempa.qt),$_GlobalGraph.configuration.lpNoA,$_GlobalGraph.configuration.dataMap);  
1183 - // 8、重新给定班次序号和发车序号.再确定首末班车时间.最后渲染数据.  
1184 - /*$_GlobalGraph.data(BaseFun.tzsmbcsj(BaseFun.setbcsAndfcno(data),  
1185 - $_GlobalGraph.configuration.dataMap.smbcsjArr,  
1186 - $_GlobalGraph.configuration.dataMap.ccsjArr,  
1187 - $_GlobalGraph.configuration.dataMap.cclcArr,  
1188 - $_GlobalGraph.configuration.dataMap.qdzArr,  
1189 - $_GlobalGraph.configuration.dataMap.lbsj));*/  
1190 - // 9、记录早操.并保存历史班次数据.  
1191 - // $_GlobalGraph.addHistory();  
1192 - //layer.close(index);  
1193 - }  
1194 - }, {  
1195 - /**  
1196 - * @description : (TODO) 调整班次函数.  
1197 - *  
1198 - * @status OK.  
1199 - * */  
1200 - key : 'aboutread',  
1201 - value : function aboutread() {  
1202 - // 弹出层mobal页面  
1203 - $.get('/pages/base/timesmodel/bctz.html', function(m){  
1204 - $(pjaxContainer).append(m);  
1205 - $('#tzbc_mobal').trigger('tzbcMobal.show',[$_GlobalGraph,getbczs($_GlobalGraph.getDataArray(),yAxisYArray),BaseFun]);  
1206 - });  
1207 - }  
1208 -  
1209 - }, {  
1210 - key : 'checkAdd',  
1211 - value : function checkAdd() {  
1212 - var xl = $_GlobalGraph.configuration.dataMap.map.lineName.split('_');  
1213 - if($_GlobalGraph.configuration.dataMap.map.istidc==1) {  
1214 - layer.confirm('系统已存在-->线路【'+  
1215 - $_GlobalGraph.configuration.dataMap.map.xlmc +'】-->时刻表【'+  
1216 - $_GlobalGraph.configuration.dataMap.map.skbmc +  
1217 - '】明细!是否覆盖!', {  
1218 - btn : [ '确认并提交', '取消' ]  
1219 - },function () {  
1220 - // 关闭所有提示弹出层.  
1221 - layer.closeAll();  
1222 - RelationshipGraph.submit($_GlobalGraph.configuration.dataMap.map.skbName,xl[0]);  
1223 - });  
1224 - }else {  
1225 - RelationshipGraph.submit($_GlobalGraph.configuration.dataMap.map.skbName,xl[0]);  
1226 - }  
1227 - }  
1228 -  
1229 - },{  
1230 - key : 'submit',  
1231 - value : function submit(skb,xl) {  
1232 - // 1、获取所有班次数据.  
1233 - var listA = $_GlobalGraph.getDataArray();  
1234 - // 2、弹出提示层.  
1235 - var index = layer.load(1, {  
1236 - shade: [0.1,'#fff'] // 0.1透明度的白色背景  
1237 - });  
1238 - // 3、post请求保存数据.  
1239 - $post('/tidc/skbDetailMxSave',{'d':JSON.stringify(listA), 'xl':xl, 'skb':skb},function(result) {  
1240 - // 3.1、关闭弹出层.  
1241 - layer.close(index);  
1242 - if(result){  
1243 - if(result.status=='SUCCESS') {  
1244 - layer.msg('保存成功...');// 弹出添加成功提示消息  
1245 - } else if(result.status=='ERROR') {  
1246 - layer.msg('保存失败...');// 弹出添加失败提示消息  
1247 - }  
1248 - }  
1249 - loadPage('index.html');// 返回index.html页面  
1250 - });  
1251 - }  
1252 - }, {  
1253 - /**  
1254 - * @description : (TODO) 撤销函数.  
1255 - *  
1256 - * @status OK.  
1257 - * */  
1258 - key : 'cancel',  
1259 - value : function cancel() {  
1260 - // 关闭弹出层.  
1261 - layer.closeAll();  
1262 - // 判断当对图形操作的步骤.  
1263 - if($_keyIndex==1) {  
1264 - layer.msg('已经是撤回到操作记录的【第一步】了!');  
1265 - return;  
1266 - }  
1267 - // 标记操作下标后退.  
1268 - $_keyIndex--;  
1269 - // 删除图形.  
1270 - $('svg.svg-chart').remove();  
1271 - // 获取撤销到当前操作下标的数据.  
1272 - var _obj = historyArray[$_keyIndex-1];  
1273 - // 创建图形对象.  
1274 - var graph_ = d3.select('#ganttSvg').relationshipGraph(JSON.parse(_obj.granph));  
1275 - // 根据数据重新渲染图形.  
1276 - graph_.data(JSON.parse(_obj.data));  
1277 - // 重新赋值图形对象.  
1278 - $_GlobalGraph = graph_;  
1279 - // 重新赋值图形对象.  
1280 - layer.msg('您已成功从【第 '+ ($_keyIndex+1) +'】撤销到【第 ' + ($_keyIndex) + '步】!');  
1281 - },  
1282 - }, {  
1283 - /**  
1284 - * @description : (TODO) 恢复函数.  
1285 - *  
1286 - * @status OK.  
1287 - * */  
1288 - key : 'regain',  
1289 - value : function regain() {  
1290 - // 关闭弹出层.  
1291 - layer.closeAll();  
1292 - // 判断当前操作是否恢复到最后一步的操纵.  
1293 - if($_keyIndex==historyArray.length) {  
1294 - layer.msg('已经是恢复到操作记录的【最后一步】了!');  
1295 - return;  
1296 - }  
1297 - // 标记操作下标前进.  
1298 - $_keyIndex++;  
1299 - // 删除图形.  
1300 - $('svg.svg-chart').remove();  
1301 - // 获取撤销到当前操作下标的数据.  
1302 - var _obj = historyArray[$_keyIndex-1];  
1303 - // 创建图形对象.  
1304 - var graph_ = d3.select('#ganttSvg').relationshipGraph(JSON.parse(_obj.granph));  
1305 - // 根据数据重新渲染图形.  
1306 - graph_.data(JSON.parse(_obj.data));  
1307 - // 重新赋值图形对象.  
1308 - $_GlobalGraph = graph_;  
1309 - // 弹出提示.  
1310 - layer.msg('您已成功从【第 '+ ($_keyIndex-1) +'】恢复到【第 ' + ($_keyIndex) + '步】!');  
1311 - },  
1312 - }, {  
1313 - /**  
1314 - * @description : (TODO) 获取底层Rect元素Id属性值.  
1315 - *  
1316 - * @param [obj--当前班次对象属性值]  
1317 - *  
1318 - * @return 返回一个底层Rect元素Id属性值.  
1319 - *  
1320 - * @status OK.  
1321 - * */  
1322 - key : 'setIdValue',  
1323 - value : function setIdValue(obj) {  
1324 - // 设置id属性值. 由一个 常量字符串 + 班次数 + 常量字符串 + 发车序号 + 常量字符 + 对应的y轴值.  
1325 - return 'shift-rect-' + obj.bcs + '_' + obj.fcno + '_' + $_GlobalGraph.configuration.y(obj.parent);  
1326 - }  
1327 - }, {  
1328 - /**  
1329 - * @description : (TODO) 获取X坐标属性值.  
1330 - *  
1331 - * @param [obj--当前班次对象属性值]  
1332 - *  
1333 - * @return 返回一个X坐标属性值.  
1334 - *  
1335 - * @status OK.  
1336 - * */  
1337 - key : 'setXValue',  
1338 - value : function setXValue(obj) {  
1339 - // 设置x坐标值.  
1340 - var hourMinue = obj.fcsj.split(":");  
1341 - return (parseInt(hourMinue[0])-$_GlobalGraph.configuration.dxHours )*60*$_GlobalGraph.configuration.multiple +  
1342 - parseInt(hourMinue[1])*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX;  
1343 - }  
1344 - }, {  
1345 - /**  
1346 - * @description : (TODO) 获取Y坐标属性值.  
1347 - *  
1348 - * @param [obj--当前班次对象属性值]  
1349 - *  
1350 - * @return 返回一个Y坐标属性值.  
1351 - *  
1352 - * @status OK.  
1353 - * */  
1354 - key : 'setYValue',  
1355 - value : function setYValue(obj) {  
1356 - return $_GlobalGraph.configuration.y(obj.parent) + $_GlobalGraph.configuration.offsetY;  
1357 - }  
1358 - }, {  
1359 - /**  
1360 - * @description : (TODO) 获取Rect元素class属性值.  
1361 - *  
1362 - * @param [obj--当前班次对象属性值]  
1363 - *  
1364 - * @return 返回一个Rect元素class属性值.  
1365 - *  
1366 - * @status OK.  
1367 - * */  
1368 - key : 'setRectClassV',  
1369 - value : function setRectClassV(obj) {  
1370 - return obj.xlDir+ " data";  
1371 - }  
1372 - }, {  
1373 - /**  
1374 - * @description : (TODO) 获取Rect元素width属性值.  
1375 - *  
1376 - * @param [obj--当前班次对象属性值]  
1377 - *  
1378 - * @return 返回一个Rect元素width属性值.  
1379 - *  
1380 - * @status OK.  
1381 - * */  
1382 - key : 'setRectWidthV',  
1383 - value : function setRectWidthV(obj) {  
1384 - return obj.bcsj * $_GlobalGraph.configuration.multiple;  
1385 - }  
1386 - }, {  
1387 - /**  
1388 - * @description : (TODO) 获取Rect元素高度属性值.  
1389 - *  
1390 - * @param [obj--当前班次对象属性值]  
1391 - *  
1392 - * @return 返回一个Rect元素高度属性值.  
1393 - *  
1394 - * @status OK.  
1395 - * */  
1396 - key : 'setRectHeight',  
1397 - value : function setRectHeight(obj) {  
1398 - return $_GlobalGraph.configuration.y.rangeBand() + 2;  
1399 - }  
1400 - }, {  
1401 - /**  
1402 - * @description : (TODO) 获取底层rect父元素ID属性值.  
1403 - *  
1404 - * @param [obj--当前班次对象属性值]  
1405 - *  
1406 - * @return 返回一个底层rect父元素ID属性值.  
1407 - *  
1408 - * @status OK.  
1409 - * */  
1410 - key : 'setRectParenNodeIdV',  
1411 - value : function setRectParenNodeIdV(obj) {  
1412 - return 'parent_' + $_GlobalGraph.configuration.y(obj.parent) + '_' + obj.bcs + "_node_" + obj.fcno;  
1413 - }  
1414 - }, {  
1415 - /**  
1416 - * @description : (TODO) 获取下一个底层rect元素ID值.  
1417 - *  
1418 - * @param [obj--当前班次对象属性值]  
1419 - *  
1420 - * @return 返回一个下一个底层rect元素ID值.  
1421 - *  
1422 - * @status OK.  
1423 - * */  
1424 - key : 'setNextNodeIdV',  
1425 - value : function setNextNodeIdV(obj) {  
1426 - return "shift-rect-" + (obj.bcs+1) + '_' + (obj.fcno+1) + '_' + $_GlobalGraph.configuration.y(obj.parent);  
1427 - }  
1428 - }, {  
1429 - /**  
1430 - * @description : (TODO) 获取上一个底层rect元素ID值.  
1431 - *  
1432 - * @param [obj--当前班次对象属性值]  
1433 - *  
1434 - * @return 返回一个上一个底层rect元素ID值.  
1435 - *  
1436 - * @status OK.  
1437 - * */  
1438 - key : 'setLastNodeIdV',  
1439 - value : function setLastNodeIdV(obj) {  
1440 - return "shift-rect-" + (obj.bcs-1) + '_' + (obj.fcno-1)+ '_' + $_GlobalGraph.configuration.y(obj.parent);  
1441 - }  
1442 - }, {  
1443 - /**  
1444 - * @description : (TODO) 获取元素类型.  
1445 - *  
1446 - * @param [obj--当前班次对象属性值]  
1447 - *  
1448 - * @return 返回一个元素类型.  
1449 - *  
1450 - * @status OK.  
1451 - * */  
1452 - key : 'setNodeType',  
1453 - value : function setNodeType(type) {  
1454 - return type;  
1455 - }  
1456 - }, {  
1457 - /**  
1458 - * @description : (TODO) 获取text01元素ID属性值.  
1459 - *  
1460 - * @param [obj--当前班次对象属性值]  
1461 - *  
1462 - * @return 返回一个text01元素ID属性值.  
1463 - *  
1464 - * @status OK.  
1465 - * */  
1466 - key : 'setText01IdV',  
1467 - value : function setText01IdV(obj) {  
1468 - return "shift-rect-text01-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);  
1469 - }  
1470 - }, {  
1471 - /**  
1472 - * @description : (TODO) 获取text元素dx属性值.  
1473 - *  
1474 - * @param [obj--当前班次对象属性值]  
1475 - *  
1476 - * @return 返回一个text元素dx属性值.  
1477 - *  
1478 - * @status OK.  
1479 - * */  
1480 - key : 'setTextDxV',  
1481 - value : function setTextDxV(dx) {  
1482 - return dx;  
1483 - }  
1484 - }, {  
1485 - /**  
1486 - * @description : (TODO) 获取text元素dy属性值.  
1487 - *  
1488 - * @param [obj--当前班次对象属性值]  
1489 - *  
1490 - * @return 返回一个text元素dy属性值.  
1491 - *  
1492 - * @status OK.  
1493 - * */  
1494 - key : 'setTextDyV',  
1495 - value : function setTextDyV(dy) {  
1496 - return dy;  
1497 - }  
1498 - }, {  
1499 - /**  
1500 - * @description : (TODO) 获取text元素class属性值.  
1501 - *  
1502 - * @param [obj--当前班次对象属性值]  
1503 - *  
1504 - * @return 返回一个text元素class属性值.  
1505 - *  
1506 - * @status OK.  
1507 - * */  
1508 - key : 'setTextClassV',  
1509 - value : function setTextClassV(obj) {  
1510 - return obj.xlDir+ "-text";  
1511 - }  
1512 - }, {  
1513 - /**  
1514 - * @description : (TODO) 获取text01元素text文本.  
1515 - *  
1516 - * @param [obj--当前班次对象属性值]  
1517 - *  
1518 - * @return 返回一个text01元素text文本.  
1519 - *  
1520 - * @status OK.  
1521 - * */  
1522 - key : 'setText01text',  
1523 - value :function setText01text(obj) {  
1524 - var text = '';  
1525 - // 判断.如果班次时间大于〇 ,并且当前班次类型是 (正常班次、区间班次、直放班次、放站班次)其中的一种.则展示.这里的判断班次时间是为了隐藏那些班次时间为零的班次.  
1526 - if(obj.bcsj > 0 && (obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.normal ||  
1527 - obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.region ||  
1528 - obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.major ||  
1529 - obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.venting)) {  
1530 - var nowDate = new Date($_GlobalGraph.configuration.timeDomainStart);  
1531 - var hourMinuArray = obj.fcsj.split(":");  
1532 - nowDate.setHours(parseInt(hourMinuArray[0]));  
1533 - nowDate.setMinutes(parseInt(hourMinuArray[1])+obj.bcsj);  
1534 - text = obj.fcsj + '~' + (nowDate.getHours()<10? "0" + nowDate.getHours():nowDate.getHours()) +  
1535 - ":" +  
1536 - (nowDate.getMinutes()<10?"0"+nowDate.getMinutes():nowDate.getMinutes());  
1537 - }  
1538 - return text;  
1539 - }  
1540 - }, {  
1541 - /**  
1542 - * @description : (TODO) 获取circle圆元素ID值.  
1543 - *  
1544 - * @param [obj--当前班次对象属性值]  
1545 - *  
1546 - * @return 返回一个circle圆元素ID值.  
1547 - *  
1548 - * @status OK.  
1549 - * */  
1550 - key : 'setCircleIdV',  
1551 - value : function setCircleIdV(obj) {  
1552 - return "shift-rect-circle-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);  
1553 - }  
1554 - }, {  
1555 - /**  
1556 - * @description : (TODO) 获取circle圆元素cx值.  
1557 - *  
1558 - * @param [obj--当前班次对象属性值]  
1559 - *  
1560 - * @return 返回一个circle圆元素cx值.  
1561 - *  
1562 - * @status OK.  
1563 - * */  
1564 - key : 'setCirclecxV',  
1565 - value : function setCirclecxV(obj) {  
1566 - var hourMinue = obj.fcsj.split(":");  
1567 - return (parseInt(hourMinue[0])-$_GlobalGraph.configuration.dxHours )*60*$_GlobalGraph.configuration.multiple +  
1568 - parseInt(hourMinue[1])*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX +  
1569 - obj.bcsj * $_GlobalGraph.configuration.multiple - 12;  
1570 - }  
1571 - }, {  
1572 - /**  
1573 - * @description : (TODO) 获取circle圆元素cy值.  
1574 - *  
1575 - * @param [obj--当前班次对象属性值]  
1576 - *  
1577 - * @return 返回一个circle圆元素cy值.  
1578 - *  
1579 - * @status OK.  
1580 - * */  
1581 - key : 'setCirclecyV',  
1582 - value : function setCirclecyV(obj) {  
1583 - return $_GlobalGraph.configuration.y(obj.parent) + $_GlobalGraph.configuration.offsetY + 12;  
1584 - }  
1585 - }, {  
1586 - /**  
1587 - * @description : (TODO) 获取circle圆元素r半径值.  
1588 - *  
1589 - * @param [obj--当前班次对象属性值]  
1590 - *  
1591 - * @return 返回一个circle圆元素r半径值.  
1592 - *  
1593 - * @status OK.  
1594 - * */  
1595 - key : 'setCircleRV',  
1596 - value : function setCircleRV(obj) {  
1597 - // 设置圆的半径.判断.如果班次时间大于〇则设置圆的半径常量8. 这里的判断是为了隐藏那些班次时间为零的班次.  
1598 - if(obj.bcsj>0)  
1599 - return 8 ;  
1600 - else  
1601 - return 0;  
1602 - }  
1603 - }, {  
1604 - /**  
1605 - * @description : (TODO) 获取circle圆元素class值.  
1606 - *  
1607 - * @param [obj--当前班次对象属性值]  
1608 - *  
1609 - * @return 返回一个circle圆元素class值.  
1610 - *  
1611 - * @status OK.  
1612 - * */  
1613 - key : 'setCircleClass',  
1614 - value : function setCircleClass(obj) {  
1615 - return obj.xlDir+ "-circle";  
1616 - }  
1617 - }, {  
1618 - /**  
1619 - * @description : (TODO) 获取text02元素ID属性值.  
1620 - *  
1621 - * @param [obj--当前班次对象属性值]  
1622 - *  
1623 - * @return 返回一个text02元素ID属性值.  
1624 - *  
1625 - * @status OK.  
1626 - * */  
1627 - key : 'setText02IdV',  
1628 - value : function setText02IdV(obj) {  
1629 - return "shift-rect-text02-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);  
1630 - }  
1631 - }, {  
1632 - /**  
1633 - * @description : (TODO) 获取text02元素text文本值.  
1634 - *  
1635 - * @param [obj--当前班次对象属性值]  
1636 - *  
1637 - * @return 返回一个text02元素text文本值.  
1638 - *  
1639 - * @status OK.  
1640 - * */  
1641 - key : 'setText02text',  
1642 - value : function setText02text(obj) {  
1643 - var text = '';  
1644 - if(obj.bcsj>0) {  
1645 - if(obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.bd ||  
1646 - obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.out||  
1647 - obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.in_||  
1648 - obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.lc)  
1649 - text = obj.fcsj;  
1650 - else if(obj.bcType=='cf')  
1651 - text = '吃:' + obj.bcsj;  
1652 - else  
1653 - text = "行:" + obj.bcsj;  
1654 - }  
1655 - return text;  
1656 - }  
1657 - }, {  
1658 - /**  
1659 - * @description : (TODO) 获取text03元素ID属性值.  
1660 - *  
1661 - * @param [obj--当前班次对象属性值]  
1662 - *  
1663 - * @return 返回一个text03元素ID属性值.  
1664 - *  
1665 - * @status OK.  
1666 - * */  
1667 - key : 'setText03IdV',  
1668 - value : function setText03IdV(obj) {  
1669 - return "shift-rect-text03-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);  
1670 - }  
1671 - }, {  
1672 - /**  
1673 - * @description : (TODO) 获取text03元素text文本值.  
1674 - *  
1675 - * @param [obj--当前班次对象属性值]  
1676 - *  
1677 - * @return 返回一个text03元素text文本值.  
1678 - *  
1679 - * @status OK.  
1680 - * */  
1681 - key : 'setText03text',  
1682 - value : function setText03text(obj) {  
1683 - var text = '';  
1684 - if(obj.bcsj>0) {  
1685 - if(obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.bd ||  
1686 - obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.lc)  
1687 - text = "保:" + obj.bcsj;  
1688 - else if(obj.bcType=='out' || obj.bcType=='in')  
1689 - text = "行:" + obj.bcsj;  
1690 - else  
1691 - text = "停:" + obj.STOPTIME;  
1692 - }  
1693 - return text;  
1694 - }  
1695 - }, {  
1696 - /**  
1697 - * @description : (TODO) 获取text04元素ID属性值.  
1698 - *  
1699 - * @param [obj--当前班次对象属性值]  
1700 - *  
1701 - * @return 返回一个text04元素ID属性值.  
1702 - *  
1703 - * @status OK.  
1704 - * */  
1705 - key : 'setText04IdV',  
1706 - value : function (obj) {  
1707 - return "shift-rect-text04-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);  
1708 - }  
1709 - }, {  
1710 - /**  
1711 - * @description : (TODO) 获取text04元素x属性值.  
1712 - *  
1713 - * @param [obj--当前班次对象属性值]  
1714 - *  
1715 - * @return 返回一个text04元素x属性值.  
1716 - *  
1717 - * @status OK.  
1718 - * */  
1719 - key : 'setText04XV',  
1720 - value : function (obj) {  
1721 - var hourMinue = obj.fcsj.split(":");  
1722 - return (parseInt(hourMinue[0])-$_GlobalGraph.configuration.dxHours )*60*$_GlobalGraph.configuration.multiple +  
1723 - parseInt(hourMinue[1])*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX +  
1724 - obj.bcsj * $_GlobalGraph.configuration.multiple - 18;  
1725 - }  
1726 - }, {  
1727 - /**  
1728 - * @description : (TODO) 获取text04元素y属性值.  
1729 - *  
1730 - * @param [obj--当前班次对象属性值]  
1731 - *  
1732 - * @return 返回一个text04元素y属性值.  
1733 - *  
1734 - * @status OK.  
1735 - * */  
1736 - key : 'setText04YV',  
1737 - value : function setText04YV(obj) {  
1738 - return $_GlobalGraph.configuration.y(obj.parent) + $_GlobalGraph.configuration.offsetY + 16;  
1739 - }  
1740 - }, {  
1741 - /**  
1742 - * @description : (TODO) 获取text04元素class属性值.  
1743 - *  
1744 - * @param [obj--当前班次对象属性值]  
1745 - *  
1746 - * @return 返回一个text04元素class属性值.  
1747 - *  
1748 - * @status OK.  
1749 - * */  
1750 - key : 'setText04ClassV',  
1751 - value : function setText04ClassV(obj) {  
1752 - return obj.xlDir+ "-circle-text";  
1753 - }  
1754 - }, {  
1755 - /**  
1756 - * @description : (TODO) 获取text04元素text文本值.  
1757 - *  
1758 - * @param [obj--当前班次对象属性值]  
1759 - *  
1760 - * @return 返回一个text04元素text文本值.  
1761 - *  
1762 - * @status OK.  
1763 - * */  
1764 - key : 'setText04text',  
1765 - value : function(obj) {  
1766 - if(obj.bcsj>0) {  
1767 - if(obj.isfb == 1){  
1768 - return '分';  
1769 - }else {  
1770 - if(obj.bcType=='normal')  
1771 - return '正';  
1772 - else if(obj.bcType=='region')  
1773 - return '区';  
1774 - else if(obj.bcType=='major')  
1775 - return '站';  
1776 - else if(obj.bcType=='venting')  
1777 - return '直';  
1778 - else if(obj.bcType=='fb')  
1779 - return '分';  
1780 - else if(obj.bcType=='in')  
1781 - return '进';  
1782 - else if(obj.bcType=='lc')  
1783 - return '离';  
1784 - else if(obj.bcType=='out')  
1785 - return '出';  
1786 - else if(obj.bcType=='bd')  
1787 - return '到';  
1788 - else if(obj.bcType=='cf')  
1789 - return '吃';  
1790 - }  
1791 - }  
1792 - }  
1793 - }, {  
1794 - /**  
1795 - * @description : (TODO) 获取底层Rect元素的覆盖层rect元素Id属性值.  
1796 - *  
1797 - * @param [obj--当前班次对象属性值]  
1798 - *  
1799 - * @return 返回一个底层Rect元素的覆盖层rect元素Id属性值.  
1800 - *  
1801 - * @status OK.  
1802 - * */  
1803 - key : 'setCoverRectIdV',  
1804 - value : function setCoverRectIdV(obj) {  
1805 - return "shift-rect-cover-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);  
1806 - }  
1807 - }, {  
1808 - /**  
1809 - * @description : (TODO) 获取底层Rect元素的覆盖层rect元素class属性值.  
1810 - *  
1811 - * @param [obj--当前班次对象属性值]  
1812 - *  
1813 - * @return 返回一个底层Rect元素的覆盖层rect元素class属性值.  
1814 - *  
1815 - * @status OK.  
1816 - * */  
1817 - key : 'setCoverRectClassV',  
1818 - value : function setCoverRectClassV(className) {  
1819 - return className;  
1820 - }  
1821 - }, {  
1822 - /**  
1823 - * @description : (TODO) 获取底层Rect元素的覆盖层rect元素paren-node属性值.  
1824 - *  
1825 - * @param [obj--当前班次对象属性值]  
1826 - *  
1827 - * @return 返回一个底层Rect元素的覆盖层rect元素paren-node属性值.  
1828 - *  
1829 - * @status OK.  
1830 - * */  
1831 - key : 'setCoverRectParentV',  
1832 - value : function setCoverRectParentV(obj) {  
1833 - return "shift-rect-" + obj.bcs + '_' + obj.fcno + '_' + $_GlobalGraph.configuration.y(obj.parent) + '-cover';  
1834 - }  
1835 - }, {  
1836 - /**  
1837 - * @description : (TODO) 获取底层Rect元素的覆盖层rect元素next-node属性值.  
1838 - *  
1839 - * @param [obj--当前班次对象属性值]  
1840 - *  
1841 - * @return 返回一个底层Rect元素的覆盖层rect元素next-node属性值.  
1842 - *  
1843 - * @status OK.  
1844 - * */  
1845 - key : 'setCoverRectLastIdV',  
1846 - value : function setCoverRectLastIdV(obj) {  
1847 - return "shift-rect-cover-" + obj.bcs + '_' + (obj.fcno+1) + $_GlobalGraph.configuration.y(obj.parent);  
1848 - }  
1849 - }, {  
1850 - key : 'mouseUpEvent',  
1851 - value : function mouseUpEvent(flag) {  
1852 - // 5.1.2、 获取选择框的最小X、最小Y、最大X、最大Y.  
1853 - var caseRect = RelationshipGraph.getCaseRectAttribute(d3.selectAll('rect.case_rect'));  
1854 - // 5.1.3、获取所有的class为data的rect元素(班次)对象.  
1855 - var rectNodes = $('rect.data');  
1856 - // 5.1.4、定义被选中的上、下行元素(班次)元素对象x、y、parentId值数组 .  
1857 - var arrayUpX = new Array(),arrayUpY = new Array(),arrayDownX = new Array(),arrayDownY = new Array(),parA = new Array();  
1858 - // 5.1.5、遍历所有的元素对象. 获取出被选中的元素(班次)对象.  
1859 - for(var n = 0;n<rectNodes.length;n++) {  
1860 - // 5.1.5.1、定义当前元素最小X  
1861 - var downStartX = parseInt($(rectNodes[n]).attr('x')),  
1862 - downEndX = downStartX + parseInt($(rectNodes[n]).attr('width'));// 5.1.5.2、定义当前元素最大X  
1863 - // 5.1.5.3、定义当前元素最小Y  
1864 - var downStartY = parseInt($(rectNodes[n]).attr('y')),  
1865 - downEndY = downStartY + parseInt($(rectNodes[n]).attr('height'));// 5.1.5.4、定义当前元素最大Y  
1866 - /**  
1867 - * 5.1.5.4、 判断当前班次是否被框选在选中框内  
1868 - *  
1869 - * ✿ 图形理解判断条件 最大框代表选择框,框中的小方块代表选中的班次.  
1870 - *  
1871 - * minX----------------------------- maxY  
1872 - * │ │  
1873 - * │ □ □ □ □ □ □ □ □ □ │  
1874 - * │ │  
1875 - * minY----------------------------- maxX  
1876 - *  
1877 - * 如果当前小方块的最大X > 选择框的minX 并且 当前小方块的最小X < 选择框的maxX  
1878 - * 并且当前小方块的最大Y > 选择框的minY 并且 当前小方块的最小Y < 选择框的maxY  
1879 - * 则代表当前小方块在选择框内.  
1880 - **/  
1881 - if((downEndX > caseRect.caseRectMinX && downStartX < caseRect.caseRectMaxX) &&  
1882 - (downEndY > caseRect.caseRectMinY && downStartY < caseRect.caseRectMaxY)){  
1883 - var node = d3.select(rectNodes[n]);  
1884 - // 5.1.5.4.1、 获取当前元素的data数据.  
1885 - var d = node.data()[0];  
1886 - // 除去首末班车班次、早晚例保、进出场班次、吃饭班次.  
1887 - if(RelationshipGraph.issmbc(d.fcsj) || d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd ||  
1888 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||  
1889 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.cf ||  
1890 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_ ||  
1891 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)  
1892 - continue;  
1893 - if(parA.indexOf(d.lpNo)<0)  
1894 - parA.push(d.lpNo);  
1895 - // 5.1.5.4.4、 把当前选择的最小x添加到arrayUpX数组中.  
1896 - arrayUpX.push(downStartX);  
1897 - // 5.1.5.4.5、 把当前选择的最小y添加到arrayUpY数组中.  
1898 - arrayUpY.push(downStartY);  
1899 - // 5.1.5.4.6、 把当前选择的最大x添加到arrayDownX数组中.  
1900 - arrayDownX.push(downEndX);  
1901 - // 5.1.5.4.7、 把当前选择的最大y添加到arrayDownY数组中.  
1902 - arrayDownY.push(downEndY);  
1903 - // 5.1.5.4.8、 把当前选择的元素的parent-node元素节点属性值添加到gClassNameArray中.  
1904 - gClassNameArray.push(node.attr('parent-node'));  
1905 - }  
1906 - }  
1907 - // 5.1.6、如果没有选择到元素(班次).给出提示,并执行选择框关闭事件.  
1908 - if(gClassNameArray.length==0) {  
1909 - // 5.1.6.1、弹出提示框.  
1910 - layer.msg('您没有框选中班次,请重新框选...');  
1911 - // 5.1.6.2、清除  
1912 - RelationshipGraph.gClose();  
1913 - // 5.1.6.3、结束事件.  
1914 - return false;  
1915 - }  
1916 - gClassNameArray.parA = parA;  
1917 - // 5.1.7、遍历 标记被选择的元素parent-node属性节点值的元素 添加class caseactive选中标记.  
1918 - for(var c =0;c<gClassNameArray.length;c++) {  
1919 - if(typeof(gClassNameArray[c])=='string') {  
1920 - var parentNodeCName = gClassNameArray[c], nodes = d3.selectAll('rect[parent-node='+ parentNodeCName +']')[0];  
1921 - for(var l =0;l<nodes.length;l++) {  
1922 - d3.select(nodes[l]).classed({'caseactive':true});  
1923 - var childrenNodesCName = $(nodes[l]).attr('id'),childrenNodes = $('text[parent-node='+ childrenNodesCName +']');  
1924 - d3.select('rect[parent-node='+ childrenNodesCName +'-cover]').classed({'caseactive':true});  
1925 - d3.select(d3.selectAll('circle[parent-node='+ childrenNodesCName +']')[0][0]).classed({'caseactive':true});  
1926 - for(var t = 0;t<childrenNodes.length;t++) {  
1927 - d3.select(childrenNodes[t]).classed({'caseactive':true});  
1928 - }  
1929 - }  
1930 - }  
1931 - }  
1932 - // 5.1.8、获取选择框元素对象.  
1933 - var d3CaseRectNode = d3.selectAll(".gantt-chart").selectAll('rect.case_rect');  
1934 - // 5.1.9、重新计算选择框的x、y、width、height属性值,并加上钢琴版动画效果.  
1935 - _animation(d3CaseRectNode).attr("x",function(d){  
1936 - return Math.min.apply(null, arrayUpX) -4;  
1937 - }).attr("y",function(d){  
1938 - return Math.min.apply(null, arrayUpY) -4;  
1939 - }).attr("width",function(d){  
1940 - return Math.max.apply(null, arrayDownX) - Math.min.apply(null, arrayUpX) + 8;  
1941 - }).attr("height",function(d){  
1942 - return Math.max.apply(null, arrayDownY) - Math.min.apply(null, arrayDownY) + parseInt(d3.select('rect[parent-node='+ gClassNameArray[0] +']').attr('height')) + 8;  
1943 - });  
1944 - // 5.1.9.10、延迟350毫秒绘制选择框上的关闭、拖动(左、右、中)按钮 .  
1945 - setTimeout(function(){  
1946 - RelationshipGraph._delayExecute();// 绘制选择框上的关闭、拖动(左、右、中)按钮.  
1947 - // 重新绘制g.shift下的选中元素.  
1948 - RelationshipGraph.restCaseNodes(document.querySelector("g.shift"),document.querySelectorAll("g.shift .caseactive"));  
1949 - // 重新绘制g.case_g下的选中元素.  
1950 - RelationshipGraph.restCaseNodes(document.querySelector("g.case_g"),document.querySelectorAll("g.case_g .caseactive"));  
1951 -  
1952 - },350);  
1953 - }  
1954 - }, {  
1955 - key : 'restCaseNodes',  
1956 - value : function(parends , nodes) {  
1957 - for(var n = 0 ; n<nodes.length;n++) {  
1958 - parends.removeChild(nodes[n]);  
1959 - parends.appendChild(nodes[n]);  
1960 - }  
1961 - }  
1962 - }, {  
1963 - key: 'noop',  
1964 - value: function noop() {}  
1965 - }, {  
1966 - key: 'isArray',  
1967 - value: function isArray(arr) {  
1968 - return Object.prototype.toString.call(arr) == '[object Array]';  
1969 - }  
1970 - }, {  
1971 - key : 'getCaseRectAttribute',  
1972 - value : function getCaseRectAttribute(node) {  
1973 - var caseRectMinX = parseInt(node.attr('x')),  
1974 - caseRectMinY = parseInt(node.attr('y'));  
1975 - var caseRectMaxX = caseRectMinX + parseInt(node.attr('width')),  
1976 - caseRectMaxY = caseRectMinY + parseInt(node.attr('height'));  
1977 - return {'caseRectMinX' : caseRectMinX, 'caseRectMinY': caseRectMinY, 'caseRectMaxX': caseRectMaxX,'caseRectMaxY':caseRectMaxY};  
1978 - }  
1979 - }, {  
1980 - /**  
1981 - * @description : (TODO) 绘制选择框上的关闭、拖动(左、右、中)按钮.  
1982 - *  
1983 - * @stauts : OK.  
1984 - *  
1985 - **/  
1986 - key : '_delayExecute',  
1987 - value : function _delayExecute() {  
1988 - // 1、获取选择框元素对象.  
1989 - var gCaseNode = d3.selectAll('g.case_g');  
1990 - // 2、获取选择框的最小X、最小Y、最大X、最大Y.  
1991 - var caseRect = RelationshipGraph.getCaseRectAttribute(d3.selectAll('rect.case_rect'));  
1992 - // 3、计算Y轴方向中间点的Y坐标.  
1993 - var Ds_yToe_d = Math.abs(caseRect.caseRectMaxY - caseRect.caseRectMinY)/2;  
1994 - // 4、计算X轴方向中间点的X坐标.  
1995 - var Ds_xToe_x = Math.abs(caseRect.caseRectMaxX - caseRect.caseRectMinX)/2;  
1996 - // 5、给选择框添加圆.这里画选择框关闭按钮  
1997 - gCaseNode.append('circle').classed({'c_close caseactive':true})  
1998 - .attr('cx', caseRect.caseRectMaxX+5).attr('cy', caseRect.caseRectMinY-5).attr('r', 8)  
1999 - .attr('group-id','c_close')  
2000 - .attr('parent-node','case_rectId');  
2001 - gCaseNode.append('circle').classed({'c_close_so caseactive':true})  
2002 - .attr('cx', caseRect.caseRectMaxX+5).attr('cy', caseRect.caseRectMinY-5).attr('r', 6)  
2003 - .attr('group-id','c_close')  
2004 - .attr('parent-node','case_rectId');  
2005 - gCaseNode.append('line').classed({'c_close_line_r caseactive':true})  
2006 - .attr('x1', caseRect.caseRectMaxX+2)  
2007 - .attr('y1', caseRect.caseRectMinY-8)  
2008 - .attr('x2', caseRect.caseRectMaxX+8)  
2009 - .attr('y2', caseRect.caseRectMinY-2)  
2010 - .attr('parent-node','case_rectId');  
2011 - gCaseNode.append('line').classed({'c_close_line_l caseactive':true})  
2012 - .attr('x1', caseRect.caseRectMaxX+2)  
2013 - .attr('y1', caseRect.caseRectMinY-2)  
2014 - .attr('x2', caseRect.caseRectMaxX+8)  
2015 - .attr('y2',caseRect.caseRectMinY-8)  
2016 - .attr('parent-node','case_rectId');  
2017 - gCaseNode.append('circle').classed({'c_close_cover caseactive':true})  
2018 - .attr('cx', caseRect.caseRectMaxX+5).attr('cy',caseRect.caseRectMinY-5).attr('r', 10)  
2019 - .attr('group-id','c_close')  
2020 - .attr('parent-node','case_rectId')  
2021 - .on('mouseover', function() {  
2022 - $(this).css("cursor","pointer");  
2023 - $("circle.c_close").css("opacity",1)  
2024 - $("line.c_close_line_r").css("opacity",1)  
2025 - $("line.c_close_line_l").css("opacity",1)  
2026 - }).on('mouseout',function() {  
2027 - $(this).css("cursor","default");  
2028 - $("circle.c_close").css("opacity",0.5)  
2029 - $("line.c_close_line_r").css("opacity",0.5)  
2030 - $("line.c_close_line_l").css("opacity",0.5)  
2031 - }).on('click', RelationshipGraph.gClose);  
2032 - // 6、给选择框添加圆.这里画左边拖拽点.  
2033 - gCaseNode.append('circle').classed({'test_r_left caseactive':true})  
2034 - .attr('cx', caseRect.caseRectMinX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 6)  
2035 - .attr('group-id','c_left')  
2036 - .attr('parent-node','case_rectId');  
2037 - gCaseNode.append('circle').classed({'test_r_left_so caseactive':true})  
2038 - .attr('cx', caseRect.caseRectMinX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 4)  
2039 - .attr('group-id','c_left')  
2040 - .attr('parent-node','case_rectId');  
2041 - gCaseNode.append('circle').classed({'test_r_left_solid caseactive':true})  
2042 - .attr('cx', caseRect.caseRectMinX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 2)  
2043 - .attr('group-id','c_left')  
2044 - .attr('parent-node','case_rectId');  
2045 - gCaseNode.append('circle').classed({'r_left_cover caseactive':true})  
2046 - .attr('cx', caseRect.caseRectMinX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 6)  
2047 - .attr('group-id','c_left')  
2048 - .attr('parent-node','case_rectId')  
2049 - .call(d3.behavior.drag()  
2050 - .on("dragstart",RelationshipGraph.dragLeftStart)  
2051 - .on("drag",RelationshipGraph.dragLeftRuing)  
2052 - .on("dragend",RelationshipGraph.dragLeftStop))  
2053 - .on('mouseover', function() {  
2054 - $(this).css("cursor","e-resize");  
2055 - }).on('mouseout',function() {  
2056 - $(this).css("cursor","default");  
2057 - });  
2058 - // 7、给选择框添加圆.这里画右边拖拽点.  
2059 - gCaseNode.append('circle').classed({'test_r_right caseactive':true})  
2060 - .attr('cx', caseRect.caseRectMaxX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 6)  
2061 - .attr('group-id','c_right')  
2062 - .attr('parent-node','case_rectId');  
2063 - gCaseNode.append('circle').classed({'test_r_right_so caseactive':true})  
2064 - .attr('cx', caseRect.caseRectMaxX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 4)  
2065 - .attr('group-id','c_right')  
2066 - .attr('parent-node','case_rectId');  
2067 - gCaseNode.append('circle').classed({'test_r_right_solid caseactive':true})  
2068 - .attr('cx', caseRect.caseRectMaxX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 2)  
2069 - .attr('group-id','c_right')  
2070 - .attr('parent-node','case_rectId');  
2071 - gCaseNode.append('circle').classed({'r_right_cover caseactive':true})  
2072 - .attr('cx', caseRect.caseRectMaxX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 6)  
2073 - .attr('group-id','c_right')  
2074 - .attr('parent-node','case_rectId')  
2075 - .call(d3.behavior.drag()  
2076 - .on("dragstart",RelationshipGraph.dragRightStart)  
2077 - .on("drag",RelationshipGraph.dragRightRuing)  
2078 - .on("dragend",RelationshipGraph.dragRightStop))  
2079 - .on('mouseover', function() {  
2080 - $(this).css("cursor","e-resize");  
2081 - }).on('mouseout',function() {  
2082 - $(this).css("cursor","default");  
2083 - });  
2084 - // 7、给选择框添加圆.这里画中心拖拽点.  
2085 - gCaseNode.append('circle').classed({'test_r_center caseactive':true})  
2086 - .attr('cx', Ds_xToe_x + caseRect.caseRectMinX).attr('cy', caseRect.caseRectMinY).attr('r', 8)  
2087 - .attr('group-id','c_center')  
2088 - .attr('parent-node','case_rectId');  
2089 - gCaseNode.append('circle').classed({'test_r_center_so caseactive':true})  
2090 - .attr('cx', Ds_xToe_x + caseRect.caseRectMinX).attr('cy', caseRect.caseRectMinY).attr('r', 6)  
2091 - .attr('group-id','c_center')  
2092 - .attr('parent-node','case_rectId');  
2093 - gCaseNode.append('circle').classed({'test_r_center_solid caseactive':true})  
2094 - .attr('cx', Ds_xToe_x + caseRect.caseRectMinX).attr('cy', caseRect.caseRectMinY).attr('r', 4)  
2095 - .attr('group-id','c_center')  
2096 - .attr('parent-node','case_rectId');  
2097 - gCaseNode.append('circle').classed({'r_center_cover caseactive':true})  
2098 - .attr('cx', Ds_xToe_x + caseRect.caseRectMinX).attr('cy', caseRect.caseRectMinY).attr('r', 8)  
2099 - .attr('group-id','c_center')  
2100 - .attr('parent-node','case_rectId')  
2101 - .call(d3.behavior.drag()  
2102 - .on("dragstart",RelationshipGraph.centerMoveSart)  
2103 - .on("drag",RelationshipGraph.centerMoveRuing)  
2104 - .on("dragend",RelationshipGraph.centerMoveStop))  
2105 - .on('mouseover', function() {  
2106 - $(this).css("cursor","move");  
2107 - }).on('mouseout',function() {  
2108 - $(this).css("cursor","default");  
2109 - });  
2110 - }  
2111 - }, {  
2112 - /**  
2113 - * @desription : (TODO) 选择框左边拖拽点沿X轴方向拖拽开始事件.  
2114 - *  
2115 - * @status : OK.  
2116 - **/  
2117 - key : 'dragLeftStart',  
2118 - value : function dragLeftStart(d,i) {  
2119 - // 1、拖拽开始鼠标当前坐标X点.  
2120 - drwaLeftX = d3.mouse(this)[0];  
2121 - }  
2122 - }, {  
2123 - /**  
2124 - * @desription : (TODO) 选择框左边拖拽点沿X轴方向拖拽中事件.  
2125 - *  
2126 - * @status : OK.  
2127 - **/  
2128 - key : 'dragLeftRuing',  
2129 - value : function dragLeftRuing(d,i) {  
2130 - // 1、开启标记鼠标从选择框左边点按下沿X方向进行拖拽状态.  
2131 - drwaLeftXStatus = true;  
2132 - // 2、记录鼠标当前X坐标  
2133 - var RDX = d3.mouse(this)[0];  
2134 - // 3、计算沿X轴方向偏移量. 当前坐标X - 初始起点坐标X.  
2135 - var dx = RDX - drwaLeftX;  
2136 - // 4、更新初始起点坐标X.  
2137 - drwaLeftX = RDX;  
2138 - RelationshipGraph.leftAndRightDraw(dx,'left');  
2139 - }  
2140 - }, {  
2141 - /**  
2142 - * @description : (TODO) 选择框左边拖拽点沿X轴方向停止拖拽事件.  
2143 - *  
2144 - * @status OK.  
2145 - * */  
2146 - key : 'dragLeftStop',  
2147 - value : function dragLeftStop(d,i) {  
2148 - if(drwaLeftXStatus) {  
2149 - // 1、关闭标记鼠标从选择框左边点按下沿X方向进行拖拽状态.  
2150 - drwaLeftXStatus = false;  
2151 - RelationshipGraph.leftAndRightStop('left');  
2152 - }  
2153 - }  
2154 -  
2155 - }, {  
2156 - /**  
2157 - * @description : (TODO) 选择框右边拖拽点沿X轴方向拖拽开始事件.  
2158 - *  
2159 - * @status OK.  
2160 - * */  
2161 - key : 'dragRightStart',  
2162 - value : function dragRightStart(d,i) {  
2163 - // 1、拖拽开始鼠标当前坐标X点.  
2164 - drwaRightX = d3.mouse(this)[0];  
2165 - }  
2166 -  
2167 - }, {  
2168 - /**  
2169 - * @description : (TODO) 选择框右边拖拽点沿X轴方向拖拽中事件.  
2170 - *  
2171 - * @status OK.  
2172 - * */  
2173 - key : 'dragRightRuing',  
2174 - value : function dragRightRuing(d,i) {  
2175 - // 1、开启标记鼠标从选择框右边点按下沿X方向进行拖拽状态.  
2176 - drwaRightXStatus = true;  
2177 - // 2、记录鼠标当前X坐标  
2178 - var RDX = d3.mouse(this)[0];  
2179 - // 3、计算沿X轴方向偏移量. 当前坐标X - 初始起点坐标X.  
2180 - var dx = RDX - drwaRightX;  
2181 - // 4、更新初始起点坐标X.  
2182 - drwaRightX = RDX;  
2183 - RelationshipGraph.leftAndRightDraw(dx,'right');  
2184 - }  
2185 -  
2186 - }, {  
2187 - /**  
2188 - * @description : (TODO) 选择框右边拖拽点沿X轴方向停止拖拽事件.  
2189 - *  
2190 - * @status OK.  
2191 - * */  
2192 - key : 'dragRightStop',  
2193 - value : function dragRightStop(d,i) {  
2194 - if(drwaRightXStatus) {  
2195 - drwaRightXStatus = false;  
2196 - RelationshipGraph.leftAndRightStop('right');  
2197 - }  
2198 - }  
2199 -  
2200 - }, {  
2201 - key : 'leftAndRightDraw',  
2202 - value : function leftAndRightDraw(dx,drawDir) {  
2203 - // 5、获取选中元素对象  
2204 - var rectTypeA = RelationshipGraph.getRectElementsNodes(d3.selectAll('.caseactive')[0],drawDir);  
2205 - RelationshipGraph.updCaseRect(RelationshipGraph.getCaseNodesAttr(rectTypeA.caseRect),dx,drawDir);  
2206 - var shiftRectA = rectTypeA.shiftRect,len = shiftRectA.length;  
2207 - var shiftRectA = rectTypeA.shiftRect,len = shiftRectA.length;  
2208 - for(var s = 0 ; s < len ; s++) {  
2209 - var rectNodesAttr = RelationshipGraph.getContextNodeAndData(d3.select(shiftRectA[s]).attr('id'));  
2210 - rectNodesAttr.qdbcNode.attr('x',parseInt(rectNodesAttr.qdbcNode.attr('x'))+(dx*shiftRectA[s].fcnodx));  
2211 - var tm = RelationshipGraph.zbTosj(parseInt(rectNodesAttr.qdbcNode.attr('x'))-$_GlobalGraph.configuration.offsetX);  
2212 - rectNodesAttr.dqbcData.fcsj = tm.hour + ':' + tm.min;  
2213 - var nowDate = BaseFun.getDateTime(rectNodesAttr.dqbcData.fcsj);  
2214 - nowDate.setMinutes(parseInt(tm.min)+rectNodesAttr.dqbcData.bcsj);  
2215 - rectNodesAttr.dqbcData.ARRIVALTIME = BaseFun.getTimeStr(nowDate);  
2216 - rectNodesAttr.dqbcData.STOPTIME = parseInt((BaseFun.getDateTime(rectNodesAttr.nextData.fcsj)-  
2217 - BaseFun.getDateTime(rectNodesAttr.dqbcData.ARRIVALTIME))/60000);  
2218 - for(var t = 0 ; t<rectNodesAttr.dqbctextNodes.length;t++) {  
2219 - RelationshipGraph.changeNode(rectNodesAttr.dqbctextNodes[t],dx*shiftRectA[s].fcnodx,rectNodesAttr.dqbcData);  
2220 - }  
2221 - rectNodesAttr.dqbcCircleNode.attr('cx',parseInt(rectNodesAttr.dqbcCircleNode.attr('cx'))+(dx*shiftRectA[s].fcnodx));  
2222 - if(rectNodesAttr.dqbcData.STOPTIME<0)  
2223 - d3.selectAll('text[parent-node='+ rectNodesAttr.qdbcNodeId +']').classed({'alert-danger':true});  
2224 - else  
2225 - d3.selectAll('text[parent-node='+ rectNodesAttr.qdbcNodeId +']').classed({'alert-danger':false});  
2226 - }  
2227 - }  
2228 - }, {  
2229 - key : 'leftAndRightStop',  
2230 - value : function leftAndRightStop(drawDir) {  
2231 - var rectTypeA = RelationshipGraph.getRectElementsNodes(d3.selectAll('.caseactive')[0],drawDir);  
2232 - var shiftRectA = rectTypeA.shiftRect,len = shiftRectA.length;  
2233 - for(var s = 0 ; s < len ; s++) {  
2234 - var rectNodesAttr = RelationshipGraph.getContextNodeAndData(d3.select(shiftRectA[s]).attr('id'));  
2235 - if(rectNodesAttr.dqbcData.STOPTIME<0) {  
2236 - var nextTzsjDx = $_GlobalGraph.configuration.dataMap.minztjx - rectNodesAttr.dqbcData.STOPTIME;  
2237 - // 修改遍历的当前元素数据的停站时间为最小停站时间.  
2238 - rectNodesAttr.dqbcData.STOPTIME = $_GlobalGraph.configuration.dataMap.minztjx;  
2239 - // 修改遍历的当前元素数据的文本展示停站时间  
2240 - for(var t = 0 ; t < rectNodesAttr.dqbctextNodes.length ; t++) {  
2241 - if(d3.select(rectNodesAttr.dqbctextNodes[t]).attr('text-type')=='gap')  
2242 - d3.select(rectNodesAttr.dqbctextNodes[t]).text('停:' + rectNodesAttr.dqbcData.STOPTIME);  
2243 - }  
2244 - /**  
2245 - * 修改下个班次的 发车时间、到达时间、停站时间  
2246 - *  
2247 - *  
2248 - * */  
2249 - var $_date = BaseFun.getDateTime(rectNodesAttr.dqbcData.ARRIVALTIME);  
2250 - $_date.setMinutes(parseInt($_date.getMinutes() + rectNodesAttr.dqbcData.STOPTIME));  
2251 - rectNodesAttr.nextData.fcsj = BaseFun.getTimeStr($_date);  
2252 - var $_x = parseInt($_date.getHours()-$_GlobalGraph.configuration.dxHours)*60*$_GlobalGraph.configuration.multiple +  
2253 - parseInt($_date.getMinutes())*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX;  
2254 - $_date.setMinutes(parseInt($_date.getMinutes() + rectNodesAttr.nextData.bcsj));  
2255 - rectNodesAttr.nextData.ARRIVALTIME = BaseFun.getTimeStr($_date);  
2256 - rectNodesAttr.nextData.STOPTIME = rectNodesAttr.nextData.STOPTIME-nextTzsjDx;  
2257 - /**  
2258 - * 修改下个班次的元素坐标属性值  
2259 - *  
2260 - * */  
2261 - rectNodesAttr.nextbcNode.attr('x',$_x);  
2262 - var rectCover = d3.select(d3.selectAll('rect[parent-node='+ rectNodesAttr.nextbcNodeId + '-cover' +']')[0][0]);  
2263 - rectCover.attr('x',$_x);  
2264 - rectNodesAttr.nextbcCircleNode.attr('cx',parseInt(rectNodesAttr.nextbcNode.attr('x')) +  
2265 - (rectNodesAttr.nextData.bcsj) * ($_GlobalGraph.configuration.multiple) - 12);  
2266 - var _text = parseInt(rectNodesAttr.nextbcNode.attr('x')) + (rectNodesAttr.nextData.bcsj) * ($_GlobalGraph.configuration.multiple) - 18;// 1.5.4、计算时刻转text X轴坐标值.  
2267 -  
2268 - for(var n = 0 ; n < rectNodesAttr.nextbctextNodes.length ; n++) {  
2269 - var _textType = d3.select(rectNodesAttr.nextbctextNodes[n]).attr('text-type'); // 1.5.4.1、获取当前text元素的类型.  
2270 - if(_textType =='bcType')  
2271 - d3.select(rectNodesAttr.nextbctextNodes[n]).attr('x',_text);  
2272 - else  
2273 - d3.select(rectNodesAttr.nextbctextNodes[n]).attr('x',$_x);  
2274 - if(_textType=='timeslot')  
2275 - d3.select(rectNodesAttr.nextbctextNodes[n]).text(rectNodesAttr.nextData.fcsj + '~' + rectNodesAttr.nextData.ARRIVALTIME);  
2276 - else if(_textType=='gap')  
2277 - d3.select(rectNodesAttr.nextbctextNodes[n]).text('停:' + rectNodesAttr.nextData.STOPTIME);  
2278 - }  
2279 - d3.selectAll('text[parent-node='+ rectNodesAttr.qdbcNodeId +']').classed({'alert-danger':false});  
2280 - }  
2281 - }  
2282 - }  
2283 - }, {  
2284 - /**  
2285 - * @description : (TODO) 修改选择框以及框边拖拽点的坐标属性值.  
2286 - *  
2287 - * @status OK.  
2288 - * */  
2289 - key : 'updCaseRect',  
2290 - value : function updCaseRect(nodes,dx,drawtype) {  
2291 - // 修改选择框元素的宽度属性值.  
2292 - if(drawtype == 'left') {  
2293 - nodes.caseRectNode.attr('width',parseInt(nodes.caseRectNode.attr('width'))-dx);  
2294 - // 修改选择框元素的X坐标属性值.  
2295 - nodes.caseRectNode.attr('x',parseInt(nodes.caseRectNode.attr('x'))+dx);  
2296 - }else if(drawtype == 'right') {  
2297 - nodes.caseRectNode.attr('width',parseInt(nodes.caseRectNode.attr('width'))+dx);  
2298 - var lineNodes = nodes.attrLine,_lLen = lineNodes.length;  
2299 - for(var l = 0 ; l < _lLen ; l++) {  
2300 - var line = d3.select(lineNodes[l]);  
2301 - line.attr('x1',parseInt(line.attr('x1'))+dx);  
2302 - line.attr('x2',parseInt(line.attr('x2'))+dx);  
2303 - }  
2304 - }  
2305 - var circleNodes = nodes.attrCircle,len = circleNodes.length;  
2306 - for(var c = 0 ; c < len ; c++) {  
2307 - var circle = d3.select(circleNodes[c]);  
2308 - var gourpId = circle.attr('group-id');  
2309 - if(gourpId=='c_left' && drawtype == 'left')  
2310 - circle.attr('cx',parseInt(circle.attr('cx'))+dx);  
2311 - else if(gourpId!='c_left' && gourpId!='c_center' && drawtype == 'right')  
2312 - circle.attr('cx',parseInt(circle.attr('cx'))+dx);  
2313 - else if(gourpId=='c_center')  
2314 - circle.attr('cx',parseInt(nodes.caseRectNode.attr('x')) + parseInt(nodes.caseRectNode.attr('width'))/2);  
2315 - }  
2316 - }  
2317 - }, {  
2318 - key : 'getRectNodesAttr',  
2319 - value : function getRectNodesAttr(rectNode) {  
2320 - var node = d3.select(rectNode);  
2321 - var nodeId = node.attr('id');  
2322 - return {'qdbcNodeId':nodeId,  
2323 - 'qdbcNode':node,  
2324 - 'dqbctextNodes':d3.selectAll('text[parent-node='+ nodeId +']')[0],// 当前班次元素对象的text文本元素.  
2325 - 'dqbcCircleNode':d3.select(d3.selectAll('circle[parent-node='+ nodeId +']')[0][0]),// 当前班次元素对象的circle圆元素  
2326 - 'dqbcData' : node.data()[0]  
2327 - }  
2328 - }  
2329 - }, {  
2330 - key : 'getCaseNodesAttr' ,  
2331 - value : function getCaseNodesAttr(caseRectNode) {  
2332 - var node = d3.select(caseRectNode);  
2333 - var nodeId = node.attr('id');  
2334 - return {'nodeId' : nodeId,  
2335 - 'caseRectNode' : node ,  
2336 - 'attrCircle' : d3.selectAll('circle[parent-node=' + nodeId + ']')[0],  
2337 - 'attrLine' : d3.selectAll('line[parent-node=' + nodeId + ']')[0]};  
2338 - }  
2339 - }, {  
2340 - key : 'getRectElementsNodes',  
2341 - value : function getRectElementsNodes(nodes,drawDir) {  
2342 - // 1、定义rect元素对象集合数组.  
2343 - var _rectNodes = new Array(),caseRect = null, tempAr = new Array();  
2344 - // 2、遍历nodes元素对象集合.  
2345 - for(var n = 0; n<nodes.length;n++) {  
2346 - // 2.1、定义遍历的当前元素对象的元素标签名称与rect-type名称.  
2347 - var tagName = $(nodes[n]).get(0).tagName;  
2348 - // 2.2、如果是rect并且是shift.则添加到rect元素集合数组中.  
2349 - if(tagName=='rect') {  
2350 - var rn = d3.select(nodes[n]);  
2351 - var rdt = rn.data()[0];  
2352 - var rectType = rn.attr('rect-type');  
2353 - if(rectType == 'shift') {  
2354 - _rectNodes.push(nodes[n]);// 2.3、添加到_rectNodes数组中.  
2355 - if(tempAr.indexOf(rdt.lpNo)<0)  
2356 - tempAr.push(rdt.lpNo);  
2357 - }else if(rectType == 'case') {  
2358 - caseRect = nodes[n];  
2359 - }  
2360 - }  
2361 - }  
2362 - var lpfcno = new Array();  
2363 - for(var p = 0 ; p < tempAr.length ; p++) {  
2364 - var fcnoA = new Array();  
2365 - for(var t = 0 ; t < _rectNodes.length ; t++) {  
2366 - var node = d3.select(_rectNodes[t]);  
2367 - var data = node.data()[0];  
2368 - if(data.lpNo == tempAr[p])  
2369 - fcnoA.push(data.fcno);  
2370 -  
2371 - }  
2372 - lpfcno.push({'lpNo':tempAr[p],'fcnoA' : fcnoA});  
2373 - }  
2374 -  
2375 - for(var r = 0;r<_rectNodes.length;r++ ) {  
2376 - var rtn = d3.select(_rectNodes[r]);  
2377 - var ndta = rtn.data()[0];  
2378 - for(var c = 0 ; c< lpfcno.length;c++) {  
2379 - if(ndta.lpNo == lpfcno[c].lpNo){  
2380 - if(drawDir=='right')  
2381 - _rectNodes[r].fcnodx = ndta.fcno - Math.min.apply(null, lpfcno[c].fcnoA);  
2382 - if(drawDir=='left')  
2383 - _rectNodes[r].fcnodx = Math.max.apply(null, lpfcno[c].fcnoA) - ndta.fcno;  
2384 - }  
2385 - }  
2386 - }  
2387 - return {shiftRect:_rectNodes,'caseRect':caseRect};  
2388 - }  
2389 - }, {  
2390 - /**  
2391 - * @desription : (TODO) 获取rect 元素对象.这里表示的是只获取班次元素对象.  
2392 - *  
2393 - * @params : [nodes--元素对象集合;type--移动的方向.]  
2394 - *  
2395 - * @status OK .  
2396 - **/  
2397 - key : 'getFirstRectElements',  
2398 - value : function getFirstRectElements(nodes,type) {  
2399 - // 遍历rect元素集合数组.  
2400 - for(var r =0; r<nodes.length;r++) {  
2401 - /**  
2402 - * 判断 type类型  
2403 - *  
2404 - * ✿ 如果是right.代表的是右拖拽时候.  
2405 - *  
2406 - * ✿ 如果是left.代表的是左拖拽时候.  
2407 - **/  
2408 - // 右拖拽.  
2409 - if(type=='right') {  
2410 - if(d3.select(_rectNodes[r]).attr('id').split('_')[1] != temp) {  
2411 - result.push({id:d3.select(_rectNodes[r]).attr('id')});  
2412 - }  
2413 - temp = d3.select(_rectNodes[r]).attr('id').split('_')[1];  
2414 - // 左拖拽.  
2415 - }else if(type =='left') {  
2416 - // 判断当前遍历是否到了数组下标最后一个.  
2417 - if(r<_rectNodes.length-1) {  
2418 - if(d3.select(_rectNodes[r]).attr('id').split('_')[1] != d3.select(_rectNodes[r+1]).attr('id').split('_')[1]) {  
2419 - result.push({id:d3.select(_rectNodes[r]).attr('id')});  
2420 - }  
2421 - }else {  
2422 - result.push({id:d3.select(_rectNodes[r]).attr('id')});  
2423 - }  
2424 - }  
2425 - }  
2426 - return {'fistnodes':result,'arr':_arr};  
2427 - }  
2428 -  
2429 - }, {  
2430 - /**  
2431 - * @desription : (TODO) 选择框沿Y轴拖拽开始事件.  
2432 - *  
2433 - * @status : OK.  
2434 - **/  
2435 - key : 'regionDrawStart',  
2436 - value : function regionDrawStart(d,i) {  
2437 - drwaStartY = d3.mouse(this)[1];// 给选择框往Y轴拖拽时开始点的Y坐标赋值.  
2438 - }  
2439 - }, {  
2440 - /**  
2441 - * @desription : (TODO) 选择框往Y轴方向拖拽中  
2442 - *  
2443 - * @status : OK.  
2444 - **/  
2445 - key : 'regionDrawRuing',  
2446 - value : function regionDrawRuing(d,i) {  
2447 - drwaStartYStatus = true;// 开启标记选择框沿Y方向进行拖拽状态.  
2448 - // 1、当前鼠标坐标位置.  
2449 - var RDY = d3.mouse(this)[1];  
2450 - // 2、当前鼠标位置的Y坐标 减去 起始点Y坐标 得到 Y轴方向的偏移量.  
2451 - var dy = RDY - drwaStartY;  
2452 - // 3、重新标记起始点.  
2453 - drwaStartY = RDY;  
2454 - // 4、获取选择的元素.  
2455 - var nodes = d3.selectAll('.caseactive')[0];  
2456 - // 5、遍历选中元素,并在拖拽过程中修改选中元素的属性值Y坐标.因为这里只沿Y轴方向进行拖拽,所以值修改Y坐标.  
2457 - for(var n = 0; n<nodes.length;n++) {  
2458 - // 5.1、获取当前元素的元素标签名称.  
2459 - var tagName = $(nodes[n]).get(0).tagName;  
2460 - // 5.2、判断 如果当前元素的元素标签名为rect元素.代表 方块  
2461 - if(tagName=='rect') {  
2462 - d3.select(nodes[n]).attr('y',parseInt(d3.select(nodes[n]).attr('y'))+dy);// 5.2.1、修改当前元素的Y属性值.  
2463 - // 5.3、判断 如果当前元素的元素标签名为text元素. 代表 文本  
2464 - }else if(tagName=='text') {  
2465 - d3.select(nodes[n]).attr('y',parseInt(d3.select(nodes[n]).attr('y'))+dy);// 5.3.1、修改当前元素的Y属性值.  
2466 - // 5.4、判断 如果当前元素的元素标签名为circle元素.代表 圆  
2467 - }else if(tagName == 'circle'){  
2468 - d3.select(nodes[n]).attr('cy',parseInt(d3.select(nodes[n]).attr('cy'))+dy);// 5.4.1、修改当前元素的Y属性值.  
2469 - // 5.5、判断 如果当前元素的元素标签名为circle元素.代表 线  
2470 - }else if(tagName=='line') {  
2471 - d3.select(nodes[n]).attr('y1',parseInt(d3.select(nodes[n]).attr('y1'))+dy);// 5.5.1、修改当前元素的Y属性值.  
2472 - d3.select(nodes[n]).attr('y2',parseInt(d3.select(nodes[n]).attr('y2'))+dy);// 5.5.2、修改当前元素的Y属性值.  
2473 - }  
2474 - }  
2475 - }  
2476 -  
2477 - }, {  
2478 - /**  
2479 - * @desription : (TODO) 选择框往Y轴方向拖拽结束.  
2480 - *  
2481 - * @status : OK.  
2482 - **/  
2483 - key : 'regionDrawStop',  
2484 - value : function regionDrawStop(d,i) {  
2485 - if(drwaStartYStatus) {  
2486 - drwaStartYStatus = false;// // 关闭标记选择框沿Y方向进行拖拽状态.  
2487 - // 1、获取拖拽元素当前的Y坐标点.  
2488 - var dqY = d3.select(this).attr("y");  
2489 - // 2、定义靠近对应路牌对应的Y坐标最近点,与路牌名称.  
2490 - var RDY = 0;//$_carName = '';  
2491 - for(var q = 0 ; q<yAxisYArray.length;q++) {  
2492 - if(dqY<yAxisYArray[q].y) {  
2493 - if(q==0) {  
2494 - RDY = yAxisYArray[q].y;  
2495 - }else {  
2496 - RDY = yAxisYArray[q-1].y;  
2497 - }  
2498 - break;  
2499 - }  
2500 - }  
2501 - // 3、当坐标点不在路牌所对应的坐标点范围内,如果小于最小路牌的Y坐标.则去最小路牌对应的Y坐标,如果大于最大路牌的Y坐标,则取最大路牌对应的Y坐标.  
2502 - var tagb = yAxisYArray[0].y-dqY < yAxisYArray[yAxisYArray.length-1].y-dqY;  
2503 - RDY = (RDY == 0 ? yAxisYArray[yAxisYArray.length-Math.max.apply(null, gClassNameArray.parA)].y : RDY);  
2504 - // 4、得到最终在沿Y拖拽过程中的Y轴偏移量.  
2505 - var dy = RDY - dqY - 4;  
2506 - // 5、获取选择的元素.  
2507 - var nodes = d3.selectAll('.caseactive')[0];  
2508 - // 6、遍历选中元素,并在拖拽过程中修改选中元素的属性值Y坐标.因为这里只沿Y轴方向进行拖拽,所以值修改Y坐标.  
2509 - for(var n = 0; n<nodes.length;n++) {  
2510 - // 6.1、获取当前元素的元素标签名称.  
2511 - var tagName = $(nodes[n]).get(0).tagName;  
2512 - // 6.2、判断 如果当前元素的元素标签名为rect元素.代表 方块  
2513 - if(tagName=='rect') {  
2514 - var y_dx = parseInt(d3.select(nodes[n]).attr('y'))+dy,lpA = '';  
2515 - _animation(d3.select(nodes[n])).attr('y',y_dx);  
2516 - for(var q = 0 ; q<yAxisYArray.length;q++) {  
2517 - if(y_dx<yAxisYArray[q].y) {  
2518 - if(q==0)  
2519 - lpA = yAxisYArray[q].lpA;  
2520 - else  
2521 - lpA = yAxisYArray[q-1].lpA;  
2522 - break;  
2523 - }  
2524 - }  
2525 - var tagb_ = yAxisYArray[0].y-y_dx < yAxisYArray[yAxisYArray.length-1].y-y_dx;  
2526 - lpA = (lpA == '' ? tagb_ ? yAxisYArray[yAxisYArray.length-1].lpA : yAxisYArray[0].lpA : lpA);  
2527 - var dt = d3.select(nodes[n]).data()[0];  
2528 - dt.parent = lpA.lpName;  
2529 - dt.lp = lpA.lp;  
2530 - dt.lpName = lpA.lpName;  
2531 - dt.lpNo = lpA.lpNo;  
2532 - dt.lpType = lpA.lpType;  
2533 - // 6.3、判断 如果当前元素的元素标签名为text元素. 代表 文本  
2534 - }else if(tagName=='text') {  
2535 - _animation(d3.select(nodes[n])).attr('y',parseInt(d3.select(nodes[n]).attr('y'))+dy);  
2536 - // 6.4、判断 如果当前元素的元素标签名为circle元素.代表 圆  
2537 - }else if(tagName == 'circle'){  
2538 - _animation(d3.select(nodes[n])).attr('cy',parseInt(d3.select(nodes[n]).attr('cy'))+dy);  
2539 - // 5.5、判断 如果当前元素的元素标签名为circle元素.代表 线  
2540 - }else if(tagName=='line') {  
2541 - _animation(d3.select(nodes[n])).attr('y1',parseInt(d3.select(nodes[n]).attr('y1'))+dy).attr('y2',parseInt(d3.select(nodes[n]).attr('y2'))+dy);  
2542 - }  
2543 - }  
2544 - setTimeout(function(){  
2545 - $_GlobalGraph.statistics();  
2546 - $_GlobalGraph.addHistory();  
2547 - },310);  
2548 - }  
2549 - }  
2550 - }, {  
2551 - /**  
2552 - * @description : (TODO) 鼠标从选择框中心点按下沿X方向左右拖拽开始事件.  
2553 - *  
2554 - * @status OK .  
2555 - **/  
2556 - key : 'centerMoveSart',  
2557 - value : function centerMoveSart(d,i) {  
2558 - // 1、记录拖拽起始点.  
2559 - drwaStartX = d3.mouse(this)[0];  
2560 - }  
2561 - }, {  
2562 - /**  
2563 - * @description : (TODO) 鼠标从选择框中心点按下沿X方向左右拖拽中事件.  
2564 - *  
2565 - * @status OK.  
2566 - **/  
2567 - key : 'centerMoveRuing',  
2568 - value : function centerMoveRuing(d,i) {  
2569 - // 1、开启标记鼠标从选择框中心点按下沿X方向进行拖拽状态.  
2570 - drwaStartXStatus = true;  
2571 - // 2、获取鼠标当前X坐标点位置.  
2572 - var RDX = d3.mouse(this)[0];  
2573 - // 3、计算起始点到当前点X方向的偏移量.  
2574 - var dx = RDX - drwaStartX;  
2575 - // 4、重新标记起点.  
2576 - drwaStartX = RDX;  
2577 - // 5、获取选中的元素.变量修改其元素属性值与数据.  
2578 - var nodes = d3.selectAll('.caseactive')[0];  
2579 - for(var n = 0; n<nodes.length;n++) {  
2580 - // 5.1、获取遍历的当前元素的元素标签名称.  
2581 - var tagName = $(nodes[n]).get(0).tagName;  
2582 - // 5.2、选择遍历的当前元素对象.  
2583 - var node = d3.select(nodes[n]);  
2584 - // 5.3、获取遍历的当前元素数据.  
2585 - var dt = node.data()[0];  
2586 - /**  
2587 - * 5.4、判断 tagName.  
2588 - *  
2589 - * 5.4.1、 ✿ 如果是rect 则修改X.并修改数据.  
2590 - *  
2591 - * 5.4.2、 ✿ 如果是text 修改文本属性值.  
2592 - *  
2593 - * 5.4.3、 ✿ 如果是circle 修改C.  
2594 - *  
2595 - * 5.4.4、 ✿ 如果是line 修改X1、X2.  
2596 - **/  
2597 - if(tagName=='rect') {  
2598 - // 5.4.1.1、修改遍历的当前元素X坐标属性值.  
2599 - node.attr('x',parseInt(node.attr('x'))+dx);  
2600 - // 5.4.1.2、根据X坐标值转为时刻  
2601 - var tm = RelationshipGraph.zbTosj(parseInt(node.attr('x'))-$_GlobalGraph.configuration.offsetX);  
2602 - // 5.4.1.3、修改遍历的当前元素数据的发车时间.  
2603 - dt.fcsj = tm.hour + ':' + tm.min;  
2604 - // 5.4.1.4、发车时间转时间对象  
2605 - var nowDate = BaseFun.getDateTime(dt.fcsj);  
2606 - // 5.4.1.5、修改时间.  
2607 - nowDate.setMinutes(parseInt(tm.min)+dt.bcsj);  
2608 - // 5.4.1.6、时间对象转字符串时刻.修改到达时间.  
2609 - dt.ARRIVALTIME = BaseFun.getTimeStr(nowDate);  
2610 - }else if(tagName=='text') {  
2611 - // 5.4.2.1、修改遍历的当前文本元素X坐标属性值.  
2612 - node.attr('x',parseInt(node.attr('x'))+dx);  
2613 - if(node.attr('text-type') =='timeslot') {  
2614 - if(dt.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.bd &&  
2615 - dt.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.out &&  
2616 - dt.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.cf &&  
2617 - dt.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.in_ &&  
2618 - dt.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)  
2619 - node.text(dt.fcsj + '~' + dt.ARRIVALTIME);// 5.4.2.2、修改第一行的text文本.发车时间 ~ 到达时间.  
2620 - }  
2621 - }else if(tagName == 'circle'){  
2622 - // 5.4.3.1、修改遍历的当前圆元素CX坐标属性值.  
2623 - node.attr('cx',parseInt(node.attr('cx'))+dx);  
2624 - }else if(tagName=='line') {  
2625 - // 5.4.3.1、修改遍历的当前line线1元素X1坐标属性值.  
2626 - node.attr('x1',parseInt(node.attr('x1'))+dx);  
2627 - // 5.4.3.1、修改遍历的当前line线2元素X1坐标属性值.  
2628 - node.attr('x2',parseInt(node.attr('x2'))+dx);  
2629 - }  
2630 - }  
2631 - // 6、重新统计值.  
2632 - RelationshipGraph.reDrawDepart();  
2633 - }  
2634 - }, {  
2635 - /**  
2636 - * @description : (TODO) 鼠标从选择框中心点按下沿X方向左右拖拽结束事件.  
2637 - *  
2638 - * @status OK.  
2639 - **/  
2640 - key : 'centerMoveStop',  
2641 - value : function centerMoveStop(d,i) {  
2642 - /**  
2643 - * 1、《《《《《《《《判断 是否已经过沿X方向左右拖拽》》》》》》》》  
2644 - *  
2645 - **/  
2646 - if(drwaStartXStatus) {  
2647 - // 1.1、关闭标记鼠标从选择框中心点按下沿X方向进行拖拽状态.  
2648 - drwaStartXStatus = false;  
2649 - // 1.2、保存该操作记录.  
2650 - $_GlobalGraph.addHistory();  
2651 - }  
2652 - }  
2653 - }, {  
2654 - /**  
2655 - * @description : (TODO) 重新绘制发车时刻,并重新统计.  
2656 - *  
2657 - * @status : OK.  
2658 - * */  
2659 - key : 'reDrawDepart',  
2660 - value : function reDrawDepart() {  
2661 - // 1、删除g元素class为up_tick的节点(包括子节点).这里等同与清楚上行的发车时刻.  
2662 - $_GlobalGraph.removeNodes(d3.selectAll('g.up_tick')[0]);  
2663 - // 2、删除g元素class为down_tick的节点(包括子节点).这里等同与清楚下行的发车时刻.  
2664 - $_GlobalGraph.removeNodes(d3.selectAll('g.down_tick')[0]);  
2665 - // 3、获取所有的班次数据.  
2666 - var $_json = $_GlobalGraph.getDataArray();  
2667 - // 4、定义上、下行班次数组.  
2668 - var upArray = new Array(),downArray = new Array();  
2669 - for(var j = 0 ; j< $_json.length ; j++) {  
2670 - // 4.1、判断遍历的当前班次类型是否为normal  
2671 - if($_json[j].bcType== $_GlobalGraph.configuration.dataMap.bcTypeArr.normal) {  
2672 - // 4.2、判断遍历的当前元素方向.  
2673 - if($_json[j].xlDir == $_GlobalGraph.configuration.dataMap.dira[0])  
2674 - upArray.push($_json[j]);  
2675 - else if($_json[j].xlDir == $_GlobalGraph.configuration.dataMap.dira[1])  
2676 - downArray.push($_json[j])  
2677 - }  
2678 - }  
2679 - // 5、定义上、下行发车时刻元素节点集合.  
2680 - var upNodes = $_GlobalGraph.configuration.selection.select('svg').select('g.up').selectAll('.up_tick').data(upArray),  
2681 - downNodes = $_GlobalGraph.configuration.selection.select('svg').select('g.down').selectAll('.down_tick').data(downArray);  
2682 - // 6、绘制上行发车时刻  
2683 - $_GlobalGraph.createUpTime(upNodes);  
2684 - // 7、绘制下行发车时刻  
2685 - $_GlobalGraph.createDownTime(downNodes);  
2686 - // 8、重新统计值.  
2687 - $_GlobalGraph.statistics();  
2688 - }  
2689 - }, {  
2690 - /**  
2691 - * @description : (TODO) 对单个rect元素(班次)做左右拖拽(拖拽开始...).  
2692 - *  
2693 - * @status : OK.  
2694 - **/  
2695 - key : 'singleElementDrawStart',  
2696 - value : function singleElementDrawStart(d,i) {  
2697 - _singElmtDrStartX = d3.mouse(this)[0];// 初始化对单个rect元素进行拖拽时开始点X坐标.  
2698 - }  
2699 - }, {  
2700 - /**  
2701 - * @description : (TODO) 对单个rect元素(班次)做左右拖拽(拖拽中...).  
2702 - *  
2703 - * @status : OK.  
2704 - **/  
2705 - key : 'singleElementDrawRuing',  
2706 - value : function singleElementDrawRuing(d,i) {  
2707 - /**  
2708 - * 1、判断  
2709 - *  
2710 - * ✿ 当前班次是首末班车班次,如果是则不能结束拖拽.(* 根据_singElemtDrStatus状态来判断 除去正在进行拖拽的班次刚好拖拽到首末班次班次的发车时间点.)  
2711 - *  
2712 - * ✿ 当前班次是早晚例保、进出场班次、吃饭班次.如果是则不能结束拖拽.  
2713 - *  
2714 - **/  
2715 - if((RelationshipGraph.issmbc(d.fcsj) ||  
2716 - context.getisContext() ||  
2717 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd ||  
2718 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||  
2719 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.cf ||  
2720 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_ ||  
2721 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.lc) && !_singElemtDrStatus)  
2722 - return;  
2723 - // 2、拖拽过程隐藏提示工具窗口.  
2724 - $_GlobalGraph.tooltip.hide();  
2725 - // 3、开启标记单个rect元素沿X方向进行拖拽状态.  
2726 - _singElemtDrStatus = true;  
2727 - // 4、获取鼠标在拖拽中的当前坐标点.  
2728 - var RDX = d3.mouse(this)[0];  
2729 - // 5、计算当前鼠标坐标X相对初始点坐标X的偏移量.  
2730 - var dx = RDX - _singElmtDrStartX;  
2731 - // 6、重新赋值初始点坐标X.  
2732 - _singElmtDrStartX = RDX;  
2733 - // 7、根据当前被拖拽的元素rect元素的parent-node属性值 , 来获取当前班次的底层rect元素的相邻两个班次元素的相关信息.  
2734 - var nodeContext = RelationshipGraph.getContextNodeAndData(d3.select(this).attr('parent-node').replace('-cover',''));  
2735 - // 8、计算rect元素的被拖拽后的X坐标值.  
2736 - var chageX = parseInt(nodeContext.qdbcNode.attr('x'))+dx;  
2737 -  
2738 - /****************************************** update 当前的班次数据以及相关元素对象属性值. START ************************************/  
2739 -  
2740 - /**  
2741 - * 9.1、修改当期rect(班次)data数据属性值.  
2742 - *  
2743 - * ✿ 因为rect元素是沿X轴移动的.这里修改的值一般是 [fcsj--发车时间;ARRIVALTIME--到达时间;STOPTIME--停站时间].  
2744 - *  
2745 - * ✿ 因为当前班次的到达时间改变,导致与下个班次的发车时间相隔时间段改变.也就是当前班次停站时间被改变.  
2746 - **/  
2747 - // 9.1.1、根据当前元素的X坐标值等到对应的时刻.  
2748 - var tm = RelationshipGraph.zbTosj(chageX-$_GlobalGraph.configuration.offsetX);  
2749 - // 9.1.2、修改当前班次的发车时间.  
2750 - d.fcsj = tm.hour + ':' + tm.min;  
2751 - // 9.1.3 、定义当前班次的到达时间对象.  
2752 - var nowDate = BaseFun.getDateTime(d.fcsj);  
2753 - nowDate.setMinutes(parseInt(tm.min)+d.bcsj);// 10.3.1、设置分钟.  
2754 - // 9.1.4、修改当前班次的到达时间.  
2755 - d.ARRIVALTIME = BaseFun.getTimeStr(nowDate);  
2756 - d.STOPTIME = parseInt((BaseFun.getDateTime(nodeContext.nextData.fcsj) - BaseFun.getDateTime(d.ARRIVALTIME))/ 60000);  
2757 - /**  
2758 - * 9.2、修改元素沿X轴方向的X坐标属性值.  
2759 - *  
2760 - * ✿ 这里的元素包括  
2761 - *  
2762 - * 当前被拖拽的元素(覆盖层)、当前被拖拽的元素的底层元素、text元素(文本元素)、circle元素(圆)  
2763 - **/  
2764 - // 9.2.1、修改当前被拖拽的班次rect元素覆盖层的X坐标值.  
2765 - d3.select(this).attr('x',chageX);  
2766 - // 9.2.2、修改当前被拖拽的班次rect底层元素X坐标值.  
2767 - nodeContext.qdbcNode.attr('x',chageX);  
2768 - // 9.2.3、修改当前被拖拽的rect底层元素上的 圆的元素对象.  
2769 - nodeContext.dqbcCircleNode.attr('cx',parseInt(nodeContext.dqbcCircleNode.attr('cx'))+dx);  
2770 - // 9.2.4、遍历text元素,并修改text属性值.  
2771 - for(var n = 0 ; n < nodeContext.dqbctextNodes.length ; n++) {  
2772 - // 9.2.4.1、修改text属性值.  
2773 - RelationshipGraph.changeNode(nodeContext.dqbctextNodes[n],dx,d);  
2774 - }  
2775 - /****************************************** update 当前的班次数据以及相关元素对象属性值. END ************************************/  
2776 -  
2777 - // 10、计算与上个班次的停站时间.  
2778 - var dxMinues = parseInt((BaseFun.getDateTime(d.fcsj) - BaseFun.getDateTime(nodeContext.lastData.ARRIVALTIME)) / 60000);  
2779 -  
2780 - /****************************************** update 上个的班次数据以及相关元素对象属性值. START ************************************/  
2781 -  
2782 - /**  
2783 - * 11、判断上个班次的类型.  
2784 - *  
2785 - * ✿ 11.1、如果是出场班次、吃饭班次 则停站时间为零,也就是说上个班次的到达时间是下个班次的发车时间.  
2786 - *  
2787 - * ✿ 11.2、如果是正常班次  
2788 - *  
2789 - **/  
2790 - if(nodeContext.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||  
2791 - nodeContext.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.cf) {  
2792 - /**  
2793 - * 11.1.1、 如果是出场班次、吃饭班次.修改上个班次数据属性值.  
2794 - *  
2795 - * ✿ 需要修改的数据属性值有[发车时间,到达时间].  
2796 - **/  
2797 - // 11.1.1.1、修改上个班次的到达时间.  
2798 - nodeContext.lastData.ARRIVALTIME = d.fcsj;  
2799 - var ddsj = BaseFun.getDateTime(nodeContext.lastData.ARRIVALTIME);  
2800 - ddsj.setMinutes(ddsj.getMinutes() - nodeContext.lastData.bcsj);  
2801 - // 11.1.1.2、修改上个班次的发车时间.  
2802 - nodeContext.lastData.fcsj = BaseFun.getTimeStr(ddsj);  
2803 - /**  
2804 - * 11.1.2、修改上个班次元素的属性值.  
2805 - *  
2806 - **/  
2807 - // 11.1.2.1、修改上个元素的rect覆盖层元素X坐标值.  
2808 - var lastRectCover = d3.select(d3.selectAll('rect[parent-node='+ nodeContext.qdbcNode.attr('last-node') + '-cover' +']')[0][0]);  
2809 - lastRectCover.attr('x',parseInt(lastRectCover.attr('x'))+dx);// 12.2.1.3.1、修改圆的cx属性值.  
2810 - // 11.1.2.2、修改上个元素的rect底层元素X坐标值.  
2811 - nodeContext.lastbcNode.attr('x',parseInt(nodeContext.lastbcNode.attr('x'))+dx);  
2812 - // 11.1.4.3、修改上个元素的rect底层元素上的 圆的元素CX坐标值  
2813 - nodeContext.lastbcCircleNode.attr('cx',parseInt(nodeContext.lastbcCircleNode.attr('cx'))+dx);  
2814 - // 11.1.4.4、遍历上个元素的text元素,并修改text属性值.  
2815 - for(var c = 0 ; c < nodeContext.lastTextNodes.length ; c++) {  
2816 - // 11.1.4.4.1、修改text属性值.  
2817 - RelationshipGraph.changeNode(nodeContext.lastTextNodes[c],dx,nodeContext.lastData);  
2818 - }  
2819 - // 11.1.4.5、获取上上个班次的元素对象.  
2820 - var xxgbcNode = d3.select('rect[id='+ nodeContext.lastbcNode.attr('last-node') +']');  
2821 - // 11.1.4.6、获取上上个班次的数据  
2822 - var xxgbc = xxgbcNode.data()[0];  
2823 -  
2824 - /**  
2825 - * 11.1.4.7、判断 上上个班次类型.  
2826 - *  
2827 - * ✿ 11.1.4.7.1、如果是保养班次.则修改这个班次的到达与发车时间以及元素属性值.  
2828 - *  
2829 - * ✿ 11.1.4.7.2、如果是正常班次.则修改这个班次的停站时间以及元素属性值.  
2830 - *  
2831 - **/  
2832 - if(xxgbc.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd) {  
2833 -  
2834 - /**  
2835 - * 11.1.4.7.1.1、修改上上个班次元素的数据属性值.  
2836 - *  
2837 - **/  
2838 - xxgbc.ARRIVALTIME = nodeContext.lastData.fcsj;// 修改到达时间  
2839 - var xxgbcddsj = BaseFun.getDateTime(xxgbc.ARRIVALTIME);  
2840 - xxgbcddsj.setMinutes(xxgbcddsj.getMinutes() - xxgbc.bcsj);  
2841 - xxgbc.fcsj = BaseFun.getTimeStr(xxgbcddsj);// 修改发车时间  
2842 - /**  
2843 - * 11.1.4.7.1.2、修改上上个班次元素的属性值.  
2844 - *  
2845 - **/  
2846 - xxgbcNode.attr('x',parseInt(xxgbcNode.attr('x'))+dx);// 修改底层rectX坐标值.  
2847 - var xxgbcCircle = d3.select(d3.selectAll('circle[parent-node='+ nodeContext.lastbcNode.attr('last-node') +']')[0][0]);  
2848 - xxgbcCircle.attr('cx',parseInt(xxgbcCircle.attr('cx'))+dx);// 修改圆的cx属性值.  
2849 - var xxgbcRectCover = d3.select(d3.selectAll('rect[parent-node='+ nodeContext.lastbcNode.attr('last-node') + '-cover' +']')[0][0]);  
2850 - xxgbcRectCover.attr('x',parseInt(xxgbcRectCover.attr('x'))+dx);// 修改覆盖层rectX坐标值.  
2851 - var xxgbcTextNodes = d3.selectAll('text[parent-node='+ nodeContext.lastbcNode.attr('last-node') +']')[0];  
2852 - for(var x = 0 ; x < xxgbcTextNodes.length ; x++) {  
2853 - RelationshipGraph.changeNode(xxgbcTextNodes[x],dx,xxgbc);// 修改text属性值.  
2854 - }  
2855 - }else if(xxgbc.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.normal) {  
2856 - /**  
2857 - * 11.1.4.7.2、如果是正常班次.  
2858 - *  
2859 - **/  
2860 - // 11.1.4.7.2.1、修改上上个班次元素的数据停站时间属性值.  
2861 - xxgbc.STOPTIME = parseInt((BaseFun.getDateTime(nodeContext.lastData.fcsj) - BaseFun.getDateTime(xxgbc.ARRIVALTIME)) / 60000);  
2862 - // 11.1.4.7.2.2、修改上上个班次text元素属性值.  
2863 - var _normalxxgbc = d3.selectAll('text[parent-node=' + nodeContext.lastbcNode.attr('last-node') +']')[0];  
2864 - for(var i = 0 ;i < _normalxxgbc.length ;i++) {  
2865 - var normalxxgbcNode_ = d3.select(_normalxxgbc[i]);  
2866 - if(normalxxgbcNode_.attr('text-type')=='gap')  
2867 - normalxxgbcNode_.text('停:' + xxgbc.STOPTIME);  
2868 - }  
2869 - }  
2870 - }else {  
2871 - /**  
2872 - * 11.2.1、如果是正常班次  
2873 - *  
2874 - * ✿ 需要修改的数据属性值有[停站时间].  
2875 - **/  
2876 - // 11.2.1.1、修改上个班次的停站时间.  
2877 - nodeContext.lastData.STOPTIME = dxMinues;  
2878 - /**  
2879 - * 11.2.2、修改上个班次元素的属性值.  
2880 - *  
2881 - **/  
2882 - for(var t = 0 ; t < nodeContext.lastTextNodes.length ;t++) {  
2883 - // 11.2.2.1、修改text元素对象.  
2884 - var lastNode_ = d3.select(nodeContext.lastTextNodes[t]);  
2885 - if(lastNode_.attr('text-type')=='gap')  
2886 - lastNode_.text('停:' + nodeContext.lastData.STOPTIME);// 15.4、修改第三行的text文本. 停站时间.  
2887 - }  
2888 - }  
2889 - /****************************************** update 上个的班次数据以及相关元素对象属性值. END ************************************/  
2890 - // 12、判断停站时间是否小于零.  
2891 - if(nodeContext.lastData.STOPTIME <0 || d.STOPTIME<0)  
2892 - d3.selectAll('text[parent-node='+ nodeContext.qdbcNodeId +']').classed({'alert-danger':true});// 12.1、添加停站时间小零的样式.  
2893 - else  
2894 - d3.selectAll('text[parent-node='+ nodeContext.qdbcNodeId +']').classed({'alert-danger':false});// 12.1、删除停站时间小零的样式.  
2895 - // 13、重新绘制发车时刻,并重新统计.  
2896 - RelationshipGraph.reDrawDepart();  
2897 - }  
2898 - }, {  
2899 - /**  
2900 - * @description : (TODO) 对单个rect元素(班次)做左右拖拽(拖拽结束...).  
2901 - *  
2902 - * @status : OK.  
2903 - *  
2904 - * */  
2905 - key : 'singleElementDrawStop',  
2906 - value : function singleElementDrawStop(d,i) {  
2907 - // 1、先判断是否进行过对该班次元素的拖拽行为.  
2908 - if(_singElemtDrStatus) {  
2909 - // 1.1、关闭标记单个rect元素沿X方向进行拖拽状态.  
2910 - _singElemtDrStatus = false;  
2911 - /**  
2912 - * 1.2、根据当前被拖拽的rect元素的parent-node属性值  
2913 - *  
2914 - * ✿ 获取当前班次的底层rect元素id属性值、以及底层的rect元素对象、以及属于该班次元素的属性值元素对象(circle、text)  
2915 - *  
2916 - * ✿ 获取上个班次的底层rect元素对象与数据. 以及属于该班次元素的属性值元素对象(circle、text).  
2917 - *  
2918 - * ✿ 获取下个班次的底层rect元素对象与数据. 以及属于该班次元素的属性值元素对象(circle、text).  
2919 - *  
2920 - **/  
2921 - var _obj = RelationshipGraph.getContextNodeAndData(d3.select(this).attr('parent-node').replace('-cover',''));  
2922 - // 1.3、定义最小停站间隙.  
2923 - var minSoptTime = $_GlobalGraph.configuration.dataMap.minztjx;  
2924 - // 1.4、创建当前时间对象.  
2925 - var $_date = new Date();  
2926 - // 1.5、判断 如果当前班次的停站时间小于零,则修改成最小停站时间.  
2927 - if(d.STOPTIME<0) {  
2928 - if(_obj.nextData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_)  
2929 - minSoptTime= 0;  
2930 - /**  
2931 - * 1.5.1、修改当前班次数据值.  
2932 - *  
2933 - **/  
2934 - $_date = BaseFun.getDateTime(_obj.nextData.fcsj);// 1.5.1.1、时间字符串转时间对象.  
2935 - $_date.setMinutes(parseInt($_date.getMinutes() - minSoptTime));// 1.5.1.2、修改分钟.  
2936 - d.STOPTIME = minSoptTime;// 1.5.1.3、修改当前班次的停站时间.  
2937 - d.ARRIVALTIME = BaseFun.getTimeStr($_date);// 1.5.1.4、修改当前班次的达到时间.  
2938 - $_date.setMinutes($_date.getMinutes()-d.bcsj);// 1.5.1.5、修改分钟.  
2939 - d.fcsj = BaseFun.getTimeStr($_date);// 1.5.1.4、修改当前班次的发车时间.  
2940 - // 1.5.2、计算时刻转rect X轴坐标值.  
2941 - var $_x = parseInt($_date.getHours()-$_GlobalGraph.configuration.dxHours)*60*$_GlobalGraph.configuration.multiple +  
2942 - parseInt($_date.getMinutes())*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX;  
2943 - /**  
2944 - * 1.5.3、修改当前班次元素属性值.  
2945 - *  
2946 - **/  
2947 - d3.select(this).attr('x',$_x);// 1.5.3.1、修改当前被拖拽元素覆盖层rect元素的X坐标属性值.  
2948 - _obj.qdbcNode.attr('x',$_x);// 1.5.3.2、修改底层rect元素的X坐标属性值.  
2949 - _obj.dqbcCircleNode.attr('cx',parseInt(_obj.qdbcNode.attr('x')) +  
2950 - (d.bcsj) * ($_GlobalGraph.configuration.multiple) - 12);// 1.5.3.3、修改属于当前班次元素的circle元素圆的cx值.  
2951 - var _text = parseInt(_obj.qdbcNode.attr('x')) + (d.bcsj) * ($_GlobalGraph.configuration.multiple) - 18;// 1.5.4、计算时刻转text X轴坐标值.  
2952 - /**  
2953 - * 1.5.4、修改当前班次元素下所属的text元素属性值.  
2954 - *  
2955 - **/  
2956 - for(var n = 0 ; n < _obj.dqbctextNodes.length ; n++) {  
2957 - var _textType = d3.select(_obj.dqbctextNodes[n]).attr('text-type'); // 1.5.4.1、获取当前text元素的类型.  
2958 - if(_textType =='bcType')  
2959 - d3.select(_obj.dqbctextNodes[n]).attr('x',_text);  
2960 - else  
2961 - d3.select(_obj.dqbctextNodes[n]).attr('x',$_x);  
2962 - if(_textType=='timeslot')  
2963 - d3.select(_obj.dqbctextNodes[n]).text(d.fcsj + '~' + d.ARRIVALTIME);  
2964 - else if(_textType=='gap')  
2965 - d3.select(_obj.dqbctextNodes[n]).text('停:' + d.STOPTIME);  
2966 - }  
2967 - if(_obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||  
2968 - _obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.cf) {  
2969 - // 11.1.1.1、修改上个班次的到达时间.  
2970 - _obj.lastData.ARRIVALTIME = d.fcsj;  
2971 - var ddsj = BaseFun.getDateTime(_obj.lastData.ARRIVALTIME);  
2972 - ddsj.setMinutes(ddsj.getMinutes() - _obj.lastData.bcsj);  
2973 - // 11.1.1.2、修改上个班次的发车时间.  
2974 - _obj.lastData.fcsj = BaseFun.getTimeStr(ddsj);  
2975 - var last_x = parseInt(ddsj.getHours()-$_GlobalGraph.configuration.dxHours)*60*$_GlobalGraph.configuration.multiple +  
2976 - parseInt(ddsj.getMinutes())*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX;  
2977 - /**  
2978 - * 11.1.2、修改上个班次元素的属性值.  
2979 - *  
2980 - **/  
2981 - // 11.1.2.1、修改上个元素的rect覆盖层元素X坐标值.  
2982 - var lastRectCover = d3.select(d3.selectAll('rect[parent-node='+ _obj.qdbcNode.attr('last-node') + '-cover' +']')[0][0]);  
2983 - lastRectCover.attr('x',last_x);// 12.2.1.3.1、修改圆的cx属性值.  
2984 - // 11.1.2.2、修改上个元素的rect底层元素X坐标值.  
2985 - _obj.lastbcNode.attr('x',last_x);  
2986 - // 11.1.4.3、修改上个元素的rect底层元素上的 圆的元素CX坐标值  
2987 - _obj.lastbcCircleNode.attr('cx',parseInt(_obj.lastbcNode.attr('x')) +  
2988 - (_obj.lastData.bcsj) * ($_GlobalGraph.configuration.multiple) - 12);// 1.5.3.3、修改属于当前班次元素的circle元素圆的cx值.  
2989 - var _text = parseInt(_obj.lastbcNode.attr('x')) + (_obj.lastData.bcsj) * ($_GlobalGraph.configuration.multiple) - 18;// 1.5.4、计算时刻转text X轴坐标值.  
2990 - // 11.1.4.4、遍历上个元素的text元素,并修改text属性值.  
2991 - for(var n = 0 ; n < _obj.lastTextNodes.length ; n++) {  
2992 - // 11.1.4.4.1、修改text属性值.  
2993 - // RelationshipGraph.changeNode(_obj.lastTextNodes[c],dx,_obj.lastData);  
2994 - var textNode = d3.select(_obj.lastTextNodes[n]);  
2995 - var _textType = textNode.attr('text-type'); // 1.5.4.1、获取当前text元素的类型.  
2996 - if(_textType =='bcType')  
2997 - d3.select(_obj.lastTextNodes[n]).attr('x',_text);  
2998 - else  
2999 - d3.select(_obj.lastTextNodes[n]).attr('x',last_x);  
3000 - if(_textType=='travel') {  
3001 - if(_obj.lastData.bcsj>0) {  
3002 - // 4.2 修改第二行的text文本.  
3003 - if(_obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd ||  
3004 - _obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||  
3005 - _obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_ ||  
3006 - _obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)  
3007 - textNode.text(_obj.lastData.fcsj);  
3008 - else if(_obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.cf)  
3009 - textNode.text('吃:' + _obj.lastData.bcsj);  
3010 - else  
3011 - textNode.text("行:" + _obj.lastData.bcsj);  
3012 - }  
3013 - }else if(_textType=='gap') {  
3014 - if(_obj.lastData.bcsj>0) {  
3015 - // 4.3 修改第三行的text文本. 停站时间.  
3016 - if(_obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd||  
3017 - _obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)  
3018 - textNode.text('保:' + d.bcsj);  
3019 - else if(_obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||  
3020 - _obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_)  
3021 - textNode.text('行:' + _obj.lastData.bcsj);  
3022 - else  
3023 - textNode.text('停:' + _obj.lastData.STOPTIME);  
3024 - }  
3025 - }  
3026 - }  
3027 - // 11.1.4.5、获取上上个班次的元素对象.  
3028 - var xxgbcNode = d3.select('rect[id='+ _obj.lastbcNode.attr('last-node') +']');  
3029 - // 11.1.4.6、获取上上个班次的数据  
3030 - var xxgbc = xxgbcNode.data()[0];  
3031 -  
3032 - /**  
3033 - * 11.1.4.7、判断 上上个班次类型.  
3034 - *  
3035 - * ✿ 11.1.4.7.1、如果是保养班次.则修改这个班次的到达与发车时间以及元素属性值.  
3036 - *  
3037 - * ✿ 11.1.4.7.2、如果是正常班次.则修改这个班次的停站时间以及元素属性值.  
3038 - *  
3039 - **/  
3040 - if(xxgbc.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd) {  
3041 -  
3042 - /**  
3043 - * 11.1.4.7.1.1、修改上上个班次元素的数据属性值.  
3044 - *  
3045 - **/  
3046 - xxgbc.ARRIVALTIME = _obj.lastData.fcsj;// 修改到达时间  
3047 - var xxgbcddsj = BaseFun.getDateTime(xxgbc.ARRIVALTIME);  
3048 - xxgbcddsj.setMinutes(xxgbcddsj.getMinutes() - xxgbc.bcsj);  
3049 - xxgbc.fcsj = BaseFun.getTimeStr(xxgbcddsj);// 修改发车时间  
3050 - var xxbgc_x = parseInt(xxgbcddsj.getHours()-$_GlobalGraph.configuration.dxHours)*60*$_GlobalGraph.configuration.multiple +  
3051 - parseInt(xxgbcddsj.getMinutes())*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX;  
3052 - /**  
3053 - * 11.1.4.7.1.2、修改上上个班次元素的属性值.  
3054 - *  
3055 - **/  
3056 - xxgbcNode.attr('x',xxbgc_x);// 修改底层rectX坐标值.  
3057 - var xxgbcCircle = d3.select(d3.selectAll('circle[parent-node='+ _obj.lastbcNode.attr('last-node') +']')[0][0]);  
3058 - xxgbcCircle.attr('cx',parseInt(xxgbcNode.attr('x')) +  
3059 - (xxgbc.bcsj) * ($_GlobalGraph.configuration.multiple) - 12);// 修改圆的cx属性值.  
3060 - var xxgbcRectCover = d3.select(d3.selectAll('rect[parent-node='+ _obj.lastbcNode.attr('last-node') + '-cover' +']')[0][0]);  
3061 - xxgbcRectCover.attr('x',xxbgc_x);// 修改覆盖层rectX坐标值.  
3062 - var xxgbcTextNodes = d3.selectAll('text[parent-node='+ _obj.lastbcNode.attr('last-node') +']')[0];  
3063 - var _text = parseInt(xxgbcNode.attr('x')) + (xxgbc.bcsj) * ($_GlobalGraph.configuration.multiple) - 18;// 1.5.4、计算时刻转text X轴坐标值.  
3064 - for(var x = 0 ; x < xxgbcTextNodes.length ; x++) {  
3065 - // RelationshipGraph.changeNode(xxgbcTextNodes[x],dx,xxgbc);// 修改text属性值.  
3066 - var textNode = d3.select(xxgbcTextNodes[x]);  
3067 - var _textType = textNode.attr('text-type'); // 1.5.4.1、获取当前text元素的类型.  
3068 - if(_textType =='bcType')  
3069 - d3.select(xxgbcTextNodes[x]).attr('x',_text);  
3070 - else  
3071 - d3.select(xxgbcTextNodes[x]).attr('x',xxbgc_x);  
3072 - if(_textType=='travel') {  
3073 - if(xxgbc.bcsj>0)  
3074 - textNode.text(xxgbc.fcsj);  
3075 - }else if(_textType=='gap') {  
3076 - if(xxgbc.bcsj>0)  
3077 - textNode.text('保:' + xxgbc.bcsj);  
3078 - }  
3079 - }  
3080 - }else if(xxgbc.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.normal) {  
3081 - /**  
3082 - * 11.1.4.7.2、如果是正常班次.  
3083 - *  
3084 - **/  
3085 - // 11.1.4.7.2.1、修改上上个班次元素的数据停站时间属性值.  
3086 - xxgbc.STOPTIME = parseInt((BaseFun.getDateTime(_obj.lastData.fcsj) - BaseFun.getDateTime(xxgbc.ARRIVALTIME)) / 60000);  
3087 - // 11.1.4.7.2.2、修改上上个班次text元素属性值.  
3088 - var _normalxxgbc = d3.selectAll('text[parent-node=' + _obj.lastbcNode.attr('last-node') +']')[0];  
3089 - for(var i = 0 ;i < _normalxxgbc.length ;i++) {  
3090 - var normalxxgbcNode_ = d3.select(_normalxxgbc[i]);  
3091 - if(normalxxgbcNode_.attr('text-type')=='gap')  
3092 - normalxxgbcNode_.text('停:' + xxgbc.STOPTIME);  
3093 - }  
3094 - }  
3095 - }else {  
3096 - /**  
3097 - * 1.5.6、修改上个元素班次与当前班次的停站时间和text元素的文本属性值.  
3098 - *  
3099 - **/  
3100 - _obj.lastData.STOPTIME = parseInt((BaseFun.getDateTime(d.fcsj) - BaseFun.getDateTime(_obj.lastData.ARRIVALTIME)) / 60000);  
3101 - for(var t = 0 ; t < _obj.lastTextNodes.length ;t++) {  
3102 - var nowTextNode = d3.select(_obj.lastTextNodes[t]);  
3103 - if(nowTextNode.attr('text-type')=='gap')  
3104 - d3.select(nowTextNode).text('停:' + _obj.lastData.STOPTIME);  
3105 - }  
3106 - }  
3107 - }else if(_obj.lastData.STOPTIME<0) {  
3108 - _obj.lastData.STOPTIME = minSoptTime;  
3109 - $_date = BaseFun.getDateTime(_obj.lastData.ARRIVALTIME);  
3110 - $_date.setMinutes($_date.getMinutes()+minSoptTime);  
3111 - var $_x = parseInt($_date.getHours()-$_GlobalGraph.configuration.dxHours)*60*$_GlobalGraph.configuration.multiple +  
3112 - parseInt($_date.getMinutes())*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX;  
3113 - d.fcsj = BaseFun.getTimeStr($_date);  
3114 - $_date.setMinutes($_date.getMinutes()+ d.bcsj);  
3115 - d.ARRIVALTIME = BaseFun.getTimeStr($_date);  
3116 - d3.select(this).attr('x',$_x);  
3117 - _obj.qdbcNode.attr('x',$_x);  
3118 - for(var t = 0 ; t < _obj.lastTextNodes.length ;t++) {  
3119 - var nowlastTextNode = d3.select(_obj.lastTextNodes[t]);  
3120 - if(nowlastTextNode.attr('text-type')=='gap')  
3121 - nowlastTextNode.text('停:' + _obj.lastData.STOPTIME);  
3122 - }  
3123 - _obj.dqbcCircleNode.attr('cx',  
3124 - parseInt(_obj.qdbcNode.attr('x')) + (d.bcsj) * ($_GlobalGraph.configuration.multiple) - 12);// 1.5.3.3、修改属于当前班次元素的circle元素圆的cx值.  
3125 - var _text = parseInt(_obj.qdbcNode.attr('x')) +  
3126 - (d.bcsj) * ($_GlobalGraph.configuration.multiple) - 18;  
3127 - var textNodes = _obj.dqbctextNodes;  
3128 - for(var n = 0 ; n < _obj.dqbctextNodes.length ; n++) {  
3129 - var tn = d3.select(_obj.dqbctextNodes[n]);  
3130 - var _textType = tn.attr('text-type');  
3131 - if(_textType =='bcType')  
3132 - d3.select(textNodes[n]).attr('x',_text);  
3133 - else  
3134 - d3.select(textNodes[n]).attr('x',$_x);  
3135 - if(_textType=='timeslot') {  
3136 - d3.select(_obj.dqbctextNodes[n]).text(d.fcsj + '~' + d.ARRIVALTIME);  
3137 - }else if(_textType=='gap') {  
3138 - d.STOPTIME = parseInt((BaseFun.getDateTime(_obj.nextData.fcsj) - BaseFun.getDateTime(d.ARRIVALTIME)) / 60000);  
3139 - d3.select(textNodes[n]).text('停:' + d.STOPTIME);  
3140 - }  
3141 -  
3142 - }  
3143 - }  
3144 - d3.selectAll('text[parent-node='+ _obj.qdbcNodeId +']').classed({'alert-danger':false});  
3145 - RelationshipGraph.reDrawDepart();  
3146 - $_GlobalGraph.addHistory();  
3147 - }  
3148 - }  
3149 - }, {  
3150 - /**  
3151 - * @description : (TODO) 根据一个班次rect元素属性ID值获取上下相邻两个班次的相关信息.  
3152 - *  
3153 - * @params [idValue--某个班次元素对象字符串ID值]  
3154 - *  
3155 - * @returns 返回一个Object  
3156 - *  
3157 - * @status OK.  
3158 - **/  
3159 - key : 'getContextNodeAndData',  
3160 - value : function(idValue) {  
3161 - // 1、定义当前元素班次的底层rect元素.  
3162 - var qdbcNode = d3.select('rect[id='+ idValue +']');  
3163 - // 2、定义当前班次数据.  
3164 - var dqbcData = qdbcNode.data()[0];  
3165 - // 3、定义上个班次、下个班次的ID属性值.  
3166 - var lastbcNodeId = qdbcNode.attr('last-node'),nextbcNodeId = qdbcNode.attr('next-node');  
3167 - // 4、定义上个元素班次的底层rect元素.  
3168 - var lastbcNode = d3.select('rect[id='+ lastbcNodeId +']');  
3169 - // 5、定义上个班次数据.  
3170 - var lastData = lastbcNode.data()[0];  
3171 - // 6、定义下个班次元素对象  
3172 - var nextbcNode = d3.select('rect[id='+ nextbcNodeId +']');  
3173 - // 7、定义下个班次数据.  
3174 - var nextData = nextbcNode.data()[0];  
3175 - return {'qdbcNodeId':idValue,  
3176 - 'qdbcNode':qdbcNode,  
3177 - 'dqbctextNodes':d3.selectAll('text[parent-node='+ idValue +']')[0],// 当前班次元素对象的text文本元素.  
3178 - 'dqbcCircleNode':d3.select(d3.selectAll('circle[parent-node='+ idValue +']')[0][0]),// 当前班次元素对象的circle圆元素  
3179 - 'dqbcData' : dqbcData,  
3180 - 'lastbcNodeId':lastbcNodeId,  
3181 - 'lastbcNode':lastbcNode,  
3182 - 'lastTextNodes': d3.selectAll('text[parent-node='+ lastbcNodeId +']')[0],// 下个班次元素对象的text元素对象  
3183 - 'lastbcCircleNode':d3.select(d3.selectAll('circle[parent-node='+ lastbcNodeId +']')[0][0]),// 下个班次元素对象的circle元素对象  
3184 - 'lastData':lastData,  
3185 - 'nextbcNodeId':nextbcNodeId,  
3186 - 'nextbcNode':nextbcNode,  
3187 - 'nextbctextNodes' : d3.selectAll('text[parent-node='+ nextbcNodeId +']')[0],// 下个班次元素对象的text元素对象  
3188 - 'nextbcCircleNode':d3.select(d3.selectAll('circle[parent-node='+ nextbcNodeId +']')[0][0]),// 下个班次元素对象的circle元素对象  
3189 - 'nextData':nextData  
3190 - };  
3191 - }  
3192 - }, {  
3193 - /**  
3194 - * @description : (TODO) 修改班次属性值.  
3195 - *  
3196 - * @param  
3197 - *  
3198 - * @status OK.  
3199 - *  
3200 - * */  
3201 - key : 'updbcData',  
3202 - value : function updbcData(obj) {  
3203 -  
3204 - }  
3205 - }, {  
3206 - /**  
3207 - * @description : (TODO) 判断是否为首末班车班次.  
3208 - *  
3209 - * @params : [str--时间字符串]  
3210 - *  
3211 - * @return : 返回布尔值.  
3212 - *  
3213 - **/  
3214 - key : 'issmbc',  
3215 - value : function issmbc(str) {  
3216 - var tag = false;  
3217 - var list = $_GlobalGraph.configuration.dataMap.smbcsjArr;// 获取起终点站首末班车时间对成数组  
3218 - var len = list.length;  
3219 - for(var t = 0 ; t<len ; t++) {  
3220 - if(str== list[t].kssj || str == list[t].jssj)  
3221 - tag = true;  
3222 - }  
3223 - return tag;  
3224 - }  
3225 - }, {  
3226 - key : 'zbTosj',  
3227 - value : function zbTosj(_d3x) {  
3228 - var hour = parseInt(_d3x/($_GlobalGraph.configuration.multiple*60)) + $_GlobalGraph.configuration.dxHours;  
3229 - var min = parseInt((_d3x%($_GlobalGraph.configuration.multiple*60))/$_GlobalGraph.configuration.multiple);  
3230 - return {'hour': hour<10? '0' + hour : hour ,'min' : min < 10 ? '0' + min : min};  
3231 -  
3232 - }  
3233 - }, {  
3234 - /**  
3235 - * @description : (TODO) 修改text沿X方向的X坐标属性值和文本内容.  
3236 - *  
3237 - * @status : OK.  
3238 - **/  
3239 - key : 'changeNode',  
3240 - value : function changeNode(node,dx,d) {  
3241 - // 1、获取当前text元素对象.  
3242 - var textNode = d3.select(node);  
3243 - // 2、修改当前text元素的X属性值  
3244 - textNode.attr('x',parseInt(textNode.attr('x'))+dx);  
3245 - // 3、获取当前元素的text-type属性值.  
3246 - var _textType = textNode.attr('text-type');  
3247 - /**  
3248 - * 4、判断当前元素的text-type属性值类型.  
3249 - *  
3250 - * ✿ 如果是timeslot.代表的是第一行的text文本.发车时间 ~ 到达时间  
3251 - *  
3252 - * ✿ 如果是gap.代表的是第三行的text文本. 停站时间.  
3253 - */  
3254 - if(_textType=='timeslot') {  
3255 - // 4.1、修改第一行的text文本.发车时间 ~ 到达时间  
3256 - if(d.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.bd &&  
3257 - d.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.out &&  
3258 - d.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.cf &&  
3259 - d.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.in_ &&  
3260 - d.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)  
3261 - textNode.text(d.fcsj + '~' + d.ARRIVALTIME);  
3262 -  
3263 - }else if(_textType=='travel') {  
3264 - if(d.bcsj>0) {  
3265 - // 4.2 修改第二行的text文本.  
3266 - if(d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd ||  
3267 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||  
3268 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_ ||  
3269 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)  
3270 - textNode.text(d.fcsj);  
3271 - else if(d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.cf)  
3272 - textNode.text('吃:' + d.bcsj);  
3273 - else  
3274 - textNode.text("行:" + d.bcsj);  
3275 - }  
3276 - }else if(_textType=='gap') {  
3277 - if(d.bcsj>0) {  
3278 - // 4.3 修改第三行的text文本. 停站时间.  
3279 - if(d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd||  
3280 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)  
3281 - textNode.text('保:' + d.bcsj);  
3282 - else if(d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||  
3283 - d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_)  
3284 - textNode.text('行:' + d.bcsj);  
3285 - else  
3286 - textNode.text('停:' + d.STOPTIME);  
3287 - }  
3288 - }  
3289 - }  
3290 - }, {  
3291 - key: 'verifyJson',  
3292 - value: function verifyJson(json) {  
3293 - if (!RelationshipGraph.isArray(json) || json.length < 0 || _typeof(json[0]) !== 'object') {  
3294 - throw 'JSON是JavaScript对象,不为空数组.';  
3295 - }  
3296 - var length = json.length;  
3297 - while (length--) {  
3298 - var element = json[length];  
3299 - var keys = Object.keys(element);  
3300 - var keyLength = keys.length;  
3301 - var parentColor = element.parentColor;  
3302 - if (element.parent === undefined) {  
3303 - throw '孩子没有父节点.';  
3304 - } else if (parentColor !== undefined && (parentColor > 4 || parentColor < 0)) {  
3305 - throw '父节点不支持该颜色.';  
3306 - }  
3307 - while (keyLength--) {  
3308 - if (keys[keyLength].toUpperCase() == 'VALUE') {  
3309 - if (keys[keyLength] != 'value') {  
3310 - json[length].value = json[length][keys[keyLength]];  
3311 - delete json[length][keys[keyLength]];  
3312 - }  
3313 - break;  
3314 - }  
3315 - }  
3316 - }  
3317 - return true;  
3318 - }  
3319 - }]);  
3320 - return RelationshipGraph;  
3321 -}();  
3322 -  
3323 -/** 创建关系图层  
3324 - *  
3325 - * @param {Object} 图层参数配置信息  
3326 - *  
3327 - * @return {Object} 返回创建图层对象  
3328 - *  
3329 - **/  
3330 -d3.selection.prototype.relationshipGraph = function (userConfig) {  
3331 - 'use strict';  
3332 - $_GlobalGraph = new RelationshipGraph(this, userConfig);  
3333 - return $_GlobalGraph;  
3334 -};  
3335 -  
3336 -/**  
3337 - * 全局定义,模块,svgelement  
3338 - *  
3339 - *  
3340 - */  
3341 -(function (root, factory) {  
3342 - 'use strict';  
3343 - if (typeof define === 'function' && define.amd) {  
3344 - define(['d3'], factory);  
3345 - } else if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object' && module.exports) {  
3346 - module.exports = function (d3) {  
3347 - d3.tip = factory(d3);  
3348 - return d3.tip;  
3349 - };  
3350 - } else {  
3351 - window.d3.tip = factory(d3);  
3352 - }  
3353 -})(undefined, function (d3) {  
3354 - 'use strict';  
3355 - return function () {  
3356 - var d3TipDirection = function d3TipDirection() {  
3357 - return 'n';  
3358 - };  
3359 - var d3TipOffset = function d3TipOffset() {  
3360 - return [0, 0];  
3361 - };  
3362 -  
3363 - var d3TipHtml = function d3TipHtml() {  
3364 - return ' ';  
3365 - };  
3366 - var initNode = function initNode() {  
3367 - var node = d3.select(document.createElement('div'));  
3368 - node.style('position', 'absolute').style('top', 0).style('opacity', 0).style('pointer-events', 'none').style('box-sizing', 'border-box');  
3369 - return node.node();  
3370 - };  
3371 - var getNodeEl = function getNodeEl() {  
3372 - if (node === null) {  
3373 - node = initNode();  
3374 - document.body.appendChild(node);  
3375 - }  
3376 -  
3377 - return d3.select(node);  
3378 - };  
3379 - var getScreenBBox = function getScreenBBox() {  
3380 - var targetel = target || d3.event.target;  
3381 -  
3382 - while ('undefined' === typeof targetel.getScreenCTM && 'undefined' === targetel.parentNode) {  
3383 - targetel = targetel.parentNode;  
3384 - }  
3385 -  
3386 - var bbox = {},  
3387 - matrix = targetel.getScreenCTM(),  
3388 - tbbox = targetel.getBBox(),  
3389 - width = tbbox.width,  
3390 - height = tbbox.height,  
3391 - x = tbbox.x,  
3392 - y = tbbox.y;  
3393 -  
3394 - point.x = x;  
3395 - point.y = y;  
3396 - bbox.nw = point.matrixTransform(matrix);  
3397 - point.x += width;  
3398 - bbox.ne = point.matrixTransform(matrix);  
3399 - point.y += height;  
3400 - bbox.se = point.matrixTransform(matrix);  
3401 - point.x -= width;  
3402 - bbox.sw = point.matrixTransform(matrix);  
3403 - point.y -= height / 2;  
3404 - bbox.w = point.matrixTransform(matrix);  
3405 - point.x += width;  
3406 - bbox.e = point.matrixTransform(matrix);  
3407 - point.x -= width / 2;  
3408 - point.y -= height / 2;  
3409 - bbox.n = point.matrixTransform(matrix);  
3410 - point.y += height;  
3411 - bbox.s = point.matrixTransform(matrix);  
3412 - return bbox;  
3413 - };  
3414 - var direction = d3TipDirection,  
3415 - offset = d3TipOffset,  
3416 - html = d3TipHtml,  
3417 - node = initNode(),  
3418 - svg = null,  
3419 - point = null,  
3420 - target = null;  
3421 - var getPageTopLeft = function getPageTopLeft(el) {  
3422 - var rect = el.getBoundingClientRect(),  
3423 - docEl = document.documentElement;  
3424 - return {  
3425 - top: rect.top + (window.pageYOffset || docEl.scrollTop || 0),  
3426 - right: rect.right + (window.pageXOffset || 0),  
3427 - bottom: rect.bottom + (window.pageYOffset || 0),  
3428 - left: rect.left + (window.pageXOffset || docEl.scrollLeft || 0)  
3429 - };  
3430 - };  
3431 - var functor = function functor(val) {  
3432 - return typeof val === 'function' ? val : function () {  
3433 - return val;  
3434 - };  
3435 - };  
3436 - var directionN = function directionN() {  
3437 - var bbox = getScreenBBox();  
3438 - return {  
3439 - top: bbox.n.y - node.offsetHeight,  
3440 - left: bbox.n.x - node.offsetWidth / 2  
3441 - };  
3442 - };  
3443 - var directionS = function directionS() {  
3444 - var bbox = getScreenBBox();  
3445 - return {  
3446 - top: bbox.s.y,  
3447 - left: bbox.s.x - node.offsetWidth / 2  
3448 - };  
3449 - };  
3450 - var directionE = function directionE() {  
3451 - var bbox = getScreenBBox();  
3452 - return {  
3453 - top: bbox.e.y - node.offsetHeight / 2,  
3454 - left: bbox.e.x  
3455 - };  
3456 - };  
3457 - var directionW = function directionW() {  
3458 - var bbox = getScreenBBox();  
3459 - return {  
3460 - top: bbox.w.y - node.offsetHeight / 2,  
3461 - left: bbox.w.x - node.offsetWidth  
3462 - };  
3463 - };  
3464 -  
3465 - var directionNW = function directionNW() {  
3466 - var bbox = getScreenBBox();  
3467 - return {  
3468 - top: bbox.nw.y - node.offsetHeight,  
3469 - left: bbox.nw.x - node.offsetWidth  
3470 - };  
3471 - };  
3472 - var directionNE = function directionNE() {  
3473 - var bbox = getScreenBBox();  
3474 - return {  
3475 - top: bbox.ne.y - node.offsetHeight,  
3476 - left: bbox.ne.x  
3477 - };  
3478 - };  
3479 - var directionSW = function directionSW() {  
3480 - var bbox = getScreenBBox();  
3481 - return {  
3482 - top: bbox.sw.y,  
3483 - left: bbox.sw.x - node.offsetWidth  
3484 - };  
3485 - };  
3486 -  
3487 - var directionSE = function directionSE() {  
3488 - var bbox = getScreenBBox();  
3489 - return {  
3490 - top: bbox.se.y,  
3491 - left: bbox.e.x  
3492 - };  
3493 - };  
3494 - var direction_callbacks = d3.map({  
3495 - n: directionN,  
3496 - s: directionS,  
3497 - e: directionE,  
3498 - w: directionW,  
3499 - nw: directionNW,  
3500 - ne: directionNE,  
3501 - sw: directionSW,  
3502 - se: directionSE  
3503 - }),  
3504 - directions = direction_callbacks.keys();  
3505 - var getSVGNode = function getSVGNode(el) {  
3506 - el = el.node();  
3507 - if (el.tagName.toLowerCase() === 'svg') {  
3508 - return el;  
3509 - }  
3510 - return el.ownerSVGElement;  
3511 - };  
3512 - var tip = function tip(vis) {  
3513 - svg = getSVGNode(vis);  
3514 - point = svg.createSVGPoint();  
3515 - document.body.appendChild(node);  
3516 - };  
3517 - tip.show = function () {  
3518 - var _this = this;  
3519 - var args = Array.prototype.slice.call(arguments);  
3520 - if (args[args.length - 1] instanceof SVGElement) {  
3521 - target = args.pop();  
3522 - }  
3523 - var content = html.apply(_this, args),  
3524 - poffset = offset.apply(_this, args),  
3525 - nodel = getNodeEl(),  
3526 - scrollTop = document.documentElement.scrollTop || document.body.scrollTop,  
3527 - scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;  
3528 - var coords = void 0,  
3529 - dir = direction.apply(_this, args),  
3530 - i = directions.length;  
3531 -  
3532 - tipEventTimer = setTimeout(function(e) {  
3533 - nodel.html(content).style('position', 'absolute').style('opacity', 1).style('pointer-events', 'all');  
3534 - },500);  
3535 -  
3536 - var node = nodel._groups ? nodel._groups[0][0] : nodel[0][0],  
3537 - nodeWidth = node.clientWidth,  
3538 - nodeHeight = node.clientHeight,  
3539 - windowWidth = window.innerWidth,  
3540 - windowHeight = window.innerHeight,  
3541 - elementCoords = getPageTopLeft(_this),  
3542 - breaksTop = elementCoords.top - nodeHeight < 0,  
3543 - breaksLeft = elementCoords.left - nodeWidth < 0,  
3544 - breaksRight = elementCoords.right + nodeHeight > windowWidth,  
3545 - breaksBottom = elementCoords.bottom + nodeHeight > windowHeight;  
3546 - if (breaksTop && !breaksRight && !breaksBottom && breaksLeft) {  
3547 - dir = 'e';  
3548 - } else if (breaksTop && !breaksRight && !breaksBottom && !breaksLeft) {  
3549 - dir = 's';  
3550 - } else if (breaksTop && breaksRight && !breaksBottom && !breaksLeft) {  
3551 - dir = 'w';  
3552 - } else if (!breaksTop && !breaksRight && !breaksBottom && breaksLeft) {  
3553 - dir = 'e';  
3554 - } else if (!breaksTop && !breaksRight && breaksBottom && breaksLeft) {  
3555 - dir = 'e';  
3556 - } else if (!breaksTop && !breaksRight && breaksBottom && !breaksLeft) {  
3557 - dir = 'e';  
3558 - } else if (!breaksTop && breaksRight && breaksBottom && !breaksLeft) {  
3559 - dir = 'n';  
3560 - } else if (!breaksTop && breaksRight && !breaksBottom && !breaksLeft) {  
3561 - dir = 'w';  
3562 - }  
3563 - direction(dir);  
3564 - while (i--) {  
3565 - nodel.classed(directions[i], false);  
3566 - }  
3567 - coords = direction_callbacks.get(dir).apply(_this);  
3568 - nodel.classed(dir, true).style('top', coords.top + poffset[0] + scrollTop + 'px').style('left', coords.left + poffset[1] + scrollLeft + 'px');  
3569 - return tip;  
3570 - };  
3571 - tip.hide = function () {  
3572 - clearTimeout(tipEventTimer);  
3573 - var nodel = getNodeEl();  
3574 - nodel.style('opacity', 0).style('pointer-events', 'none');  
3575 - return tip;  
3576 - };  
3577 - tip.attr = function (n) {  
3578 - if (arguments.length < 2 && typeof n === 'string') {  
3579 - return getNodeEl().attr(n);  
3580 - } else {  
3581 - var args = Array.prototype.slice.call(arguments);  
3582 - d3.selection.prototype.attr.apply(getNodeEl(), args);  
3583 - }  
3584 -  
3585 - return tip;  
3586 - };  
3587 - tip.style = function (n) {  
3588 - if (arguments.length < 2 && typeof n === 'string') {  
3589 - return getNodeEl().style(n);  
3590 - } else {  
3591 - var args = Array.prototype.slice.call(arguments);  
3592 -  
3593 - if (args.length === 1) {  
3594 - var styles = args[0],  
3595 - keys = Object.keys(styles);  
3596 -  
3597 - for (var key = 0; key < keys.length; key++) {  
3598 - d3.selection.prototype.style.apply(getNodeEl(), styles[key]);  
3599 - }  
3600 - }  
3601 - }  
3602 -  
3603 - return tip;  
3604 - };  
3605 - tip.direction = function (v) {  
3606 - if (!arguments.length) {  
3607 - return direction;  
3608 - }  
3609 - direction = v == null ? v : functor(v);  
3610 - return tip;  
3611 - };  
3612 - tip.offset = function (v) {  
3613 - if (!arguments.length) {  
3614 - return offset;  
3615 - }  
3616 - offset = v == null ? v : functor(v);  
3617 - return tip;  
3618 - };  
3619 - tip.html = function (v) {  
3620 - if (!arguments.length) {  
3621 - return html;  
3622 - }  
3623 - html = v == null ? v : functor(v);  
3624 - return tip;  
3625 - };  
3626 - tip.destroy = function () {  
3627 - if (node) {  
3628 - getNodeEl().remove();  
3629 - node = null;  
3630 - }  
3631 - return tip;  
3632 - };  
3633 - return tip;  
3634 - }; 1 +/**
  2 + * @discription TODO(图层类)
  3 + *
  4 + * @author bsth@lq
  5 + *
  6 + * @date 二〇一六年十二月八日 10:39:52
  7 + *
  8 + **/
  9 +
  10 +/**
  11 + *
  12 + * 图层作用域下的全局变量定义
  13 + *
  14 + ************************************************************************************************************************************************/
  15 +var historyArray = [],// 保存操作图形后的数据集合(撤销与恢复操作)
  16 + $_keyIndex = 0,// 记录当前操作步骤 (在撤销与恢复操作时)
  17 + $_GlobalGraph = new Object(),// 图层对象(在创建图层对象时)
  18 + flagIndex = 0,// 鼠标绘制的当前选择框标识(这里限制只做一次性选择元素拖拽,在绘制选择框时)
  19 + _singElmtDrStartX = 0, // 记录单个rect元素(班次)做左右拖拽(拖拽开始...)鼠标开始位置.
  20 + _singElemtDrStatus = false,// 标记单个rect元素沿X方向进行拖拽状态.默认关闭状态.
  21 + drwaStartY = 0,// 鼠标从选择框按下开始标记Y值(在选择框做上下【↕】拖拽时)
  22 + drwaStartYStatus = false,// 标记选择框沿Y方向进行拖拽状态.默认关闭状态.
  23 + drwaStartX = 0,// 鼠标从选择框左右拖拽中心点按下开始标记X值 (在选择框上边线中心点做左右【↔】拖拽时)
  24 + drwaStartXStatus = false,// 标记鼠标从选择框中心点按下沿X方向进行拖拽状态.默认关闭状态.
  25 + drwaRightX = 0,// 鼠标从选择框右拖拽中心点按下开始标记X值 (在选择框右边线中心点做右【→】拖拽时)
  26 + drwaRightXStatus = false,// 标记鼠标从选择框右边点按下沿X方向进行拖拽状态.默认关闭状态.
  27 + drwaLeftX = 0,// 鼠标从选择框左拖拽中心点按下开始标记X值 (在选择框左边线中心点做左【←】拖拽时)
  28 + drwaLeftXStatus = false,// 标记鼠标从选择框左边点按下沿X方向进行拖拽状态.默认关闭状态.
  29 + gClassNameArray = new Array(),// 标记被选择的元素(在绘制选择框完成时)
  30 + yAxisYArray = new Array(),// Y轴坐标数组
  31 + tipEventTimer = null,// 提示工具栏定时器.
  32 + workeType = [{'type':'六工一休','minueV':6.40,'hourV':6.66},
  33 + {'type':'五工一休','minueV':6.51,'hourV':6.85},
  34 + {'type':'四工一休','minueV':7.08,'hourV':7.14},
  35 + {'type':'三工一休','minueV':7.37,'hourV':7.61},
  36 + {'type':'二工一休','minueV':8.34,'hourV':8.34},
  37 + {'type':'一工一休','minueV':11.25,'hourV':11.42},
  38 + {'type':'五工二休','minueV':8.00,'hourV':7.99},
  39 + {'type':'无工休', 'minueV':5.43,'hourV':5.67}];// 班工时规定
  40 +/************************************************************************************************************************************************/
  41 +
  42 +/**
  43 + * @description : (TODO) : 撤销事件(后退)
  44 + *
  45 + * @see ✿ 判断是否在图层编辑(元素拖拽)中。
  46 + *
  47 + * 如果在,关闭图层编辑状态,记录当前操作步骤,根据步骤数在保存操作图形后的数据集合中获取数据重新渲染图层。
  48 + *
  49 + * @status OK.
  50 + ************************************************************************************************************************************************/
  51 +$('.revoke').on('click',function() {
  52 + // 判断选择框是否存在.
  53 + if(RelationshipGraph.getFlagIndex()>0){
  54 + // 关闭所有提示弹出层.
  55 + layer.closeAll();
  56 + layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【撤销】!', {
  57 + btn : [ '确认提示并提交', '取消' ]
  58 + },function () {
  59 + // 执行选择框关闭函数.
  60 + RelationshipGraph.gClose();
  61 + // 执行撤销函数.
  62 + RelationshipGraph.cancel();
  63 + });
  64 + }else {
  65 + // 执行撤销函数.
  66 + RelationshipGraph.cancel();
  67 + }
  68 +});
  69 +/************************************************************************************************************************************************/
  70 +
  71 +
  72 +/**
  73 + * @description : (TODO) 监听恢复事件(前进)
  74 + *
  75 + * @see ✿ 判断是否在图层编辑(元素拖拽)中。
  76 + *
  77 + * 如果在,关闭图层编辑状态,记录当前操作步骤,根据步骤数在保存操作图形后的数据集合中获取数据重新渲染图层。
  78 + *
  79 + * @status OK.
  80 + ************************************************************************************************************************************************/
  81 +$('.recover').on('click',function() {
  82 + // 判断选择框是否存在.
  83 + if(RelationshipGraph.getFlagIndex()>0) {
  84 + // 关闭所有提示弹出层.
  85 + layer.closeAll();
  86 + layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【恢复】!', {
  87 + btn : [ '确认提示并提交', '取消' ]
  88 + },function () {
  89 + // 执行选择框关闭函数.
  90 + RelationshipGraph.gClose();
  91 + // 执行恢复函数.
  92 + RelationshipGraph.regain();
  93 + });
  94 + }else {
  95 + // 执行恢复函数.
  96 + RelationshipGraph.regain();
  97 + }
  98 +});
  99 +/************************************************************************************************************************************************/
  100 +
  101 +/**
  102 + * @desciption (TODO) 监听删除事件.
  103 + *
  104 + * @status OK.
  105 + ************************************************************************************************************************************************/
  106 +$('.reladelete').on('click',function() {
  107 + // 判断是否存在选择框选中班次状态.
  108 + if(RelationshipGraph.getFlagIndex()<1) {
  109 + layer.msg('批量删除需要【框选择中班次】才可以操作哦...!');
  110 + return;
  111 + }
  112 + // 关闭所有提示弹出层.
  113 + layer.closeAll();
  114 + // 定义路牌.发车序号数组.
  115 + var lp = new Array(),fcno = new Array();
  116 + for(var c =0;c<gClassNameArray.length;c++) {
  117 + if(typeof(gClassNameArray[c])=='string') {
  118 + var data = d3.select('rect[parent-node='+ gClassNameArray[c] +']').data()[0];
  119 + if(lp.indexOf(data.lpName)<0)
  120 + lp.push(data.lpName);
  121 + fcno.push(data.fcno);
  122 + }
  123 + }
  124 + layer.confirm('您确定要进行批量删除路牌【'+ lp.toString() +'】-->发车序号【'+ fcno.toString() +'】嘛!'+
  125 + '</br>&nbsp;&nbsp;&nbsp;* 注意:如需要撤销当前操作,您可以在系统工具下拉选择点击【撤销按钮】进行恢复.', {
  126 + btn : [ '确认提示并提交', '取消' ]
  127 + }, function() {
  128 + // 关闭所有提示弹出层.
  129 + layer.closeAll();
  130 + // 删除class为case_g的g元素。
  131 + $("g.case_g").remove();
  132 + // 获取选择框所有的元素.
  133 + var nodes = d3.selectAll('.caseactive')[0];
  134 + // 删除选择框.
  135 + $_GlobalGraph.removeNodes(nodes);
  136 + // 选择框标记清零.
  137 + RelationshipGraph.setFlagIndex(0);
  138 + // 清空标记被选择框选中的元素数组.
  139 + gClassNameArray.splice(0,gClassNameArray.length);
  140 + // 重新绘制发车时刻,并重新统计.
  141 + RelationshipGraph.reDrawDepart();
  142 + // 记录当前操作.
  143 + $_GlobalGraph.addHistory();
  144 + });
  145 +});
  146 +/************************************************************************************************************************************************/
  147 +
  148 +
  149 +/**
  150 + * @description : (TODO) 监听添加班次事件.
  151 + *
  152 + * @status OK.
  153 + ************************************************************************************************************************************************/
  154 +$('.reladplus').on('click',function() {
  155 + // 判断选择框是否存在.
  156 + if(RelationshipGraph.getFlagIndex()>0) {
  157 + // 关闭所有提示弹出层.
  158 + layer.closeAll();
  159 + layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【添加班次】!', {
  160 + btn : [ '确认提示并提交', '取消' ]
  161 + },function () {
  162 + // 关闭所有提示弹出层.
  163 + layer.closeAll();
  164 + // 执行选择框关闭函数.
  165 + RelationshipGraph.gClose();
  166 + // 执行添加班次函数.
  167 + RelationshipGraph.reladplus();
  168 + });
  169 + }else {
  170 + // 执行添加班次函数.
  171 + RelationshipGraph.reladplus();
  172 + }
  173 +});
  174 +/************************************************************************************************************************************************/
  175 +
  176 +/**
  177 + * @description : (TODO) 监听添加路牌事件.
  178 + *
  179 + * @status OK.
  180 + ************************************************************************************************************************************************/
  181 + $('.addlp').on('click',function() {
  182 + // 判断选择框是否存在.
  183 + if(RelationshipGraph.getFlagIndex()>0) {
  184 + // 关闭所有提示弹出层.
  185 + layer.closeAll();
  186 + layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【添加路牌】!', {
  187 + btn : [ '确认提示并提交', '取消' ]
  188 + },function () {
  189 + // 关闭所有提示弹出层.
  190 + layer.closeAll();
  191 + // 执行选择框关闭函数.
  192 + RelationshipGraph.gClose();
  193 + // 执行添加路牌函数.
  194 + RelationshipGraph.addlp();
  195 + });
  196 + }else {
  197 + // 执行添加路牌函数.
  198 + RelationshipGraph.addlp();
  199 + }
  200 + });
  201 +/************************************************************************************************************************************************/
  202 +
  203 +/**
  204 + * @description : (TODO) 均匀发车事件.
  205 + *
  206 + * @stutas : OK.
  207 + *
  208 + ************************************************************************************************************************************************/
  209 +$('.updownread').on('click',function() {
  210 + // 判断选择框是否存在.
  211 + if(RelationshipGraph.getFlagIndex()>0) {
  212 + // 关闭所有提示弹出层.
  213 + layer.closeAll();
  214 + layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【均匀发车间隙】!', {
  215 + btn : [ '确认提示并提交', '取消' ]
  216 + },function () {
  217 + // 关闭所有提示弹出层.
  218 + layer.closeAll();
  219 + // 执行选择框关闭函数.
  220 + RelationshipGraph.gClose();
  221 + // 执行均匀发车间隙函数.
  222 + RelationshipGraph.updownread();
  223 + });
  224 + }else {
  225 + // 执行均匀发车间隙函数
  226 + RelationshipGraph.updownread();
  227 + }
  228 +});
  229 +/************************************************************************************************************************************************/
  230 +
  231 +/**
  232 + * 调整班次点击事件
  233 + *
  234 + ************************************************************************************************************************************************/
  235 +$('.aboutread').on('click',function() {
  236 + // 判断选择框是否存在.
  237 + if(RelationshipGraph.getFlagIndex()>0) {
  238 + // 关闭所有提示弹出层.
  239 + layer.closeAll();
  240 + layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【调整班次】!', {
  241 + btn : [ '确认提示并提交', '取消' ]
  242 + },function () {
  243 + // 关闭所有提示弹出层.
  244 + layer.closeAll();
  245 + // 执行选择框关闭函数.
  246 + RelationshipGraph.gClose();
  247 + // 执行均匀发车间隙函数.
  248 + RelationshipGraph.aboutread();
  249 + });
  250 + }else {
  251 + // 执行均匀发车间隙函数
  252 + RelationshipGraph.aboutread();
  253 + }
  254 +});
  255 +/************************************************************************************************************************************************/
  256 +
  257 +/**
  258 + * @description : (TODO) 保存数据.
  259 + *
  260 + * @status OK.
  261 + ************************************************************************************************************************************************/
  262 + $('.checkAdd').on('click',function() {
  263 + // 判断选择框是否存在.
  264 + if(RelationshipGraph.getFlagIndex()>0) {
  265 + // 关闭所有提示弹出层.
  266 + layer.closeAll();
  267 + layer.confirm('您正处于【批量班次操作】过程中...是否确定退出当前操作进行【保存数据】!', {
  268 + btn : [ '确认提示并提交', '取消' ]
  269 + },function () {
  270 + // 关闭所有提示弹出层.
  271 + layer.closeAll();
  272 + // 执行选择框关闭函数.
  273 + RelationshipGraph.gClose();
  274 + // 执行均匀发车间隙函数.
  275 + RelationshipGraph.checkAdd();
  276 + });
  277 + }else {
  278 + // 执行均匀发车间隙函数
  279 + RelationshipGraph.checkAdd();
  280 + }
  281 + });
  282 +/************************************************************************************************************************************************/
  283 +
  284 +/**
  285 + * @description : (TODO)获取路牌对应的班次数(这里的班次不包括早晚例保班次、吃饭时间)
  286 + *
  287 + * @params : [a1--班次数组;a2--路牌数组]
  288 + *
  289 + * @return : 返回一个数组.这里返回的是一个封装的每个路牌对应的班次数(这里的班次不包括早晚例保班次、吃饭时间、班次时间为0的班次)
  290 + ************************************************************************************************************************************************/
  291 +var getbczs = function (a1,a2) {
  292 + var array = new Array();
  293 + // 1、遍历路牌数组
  294 + for(var i = 0;i<a2.length;i++) {
  295 + var bcs = 0;
  296 + // 2、遍历班次数组
  297 + for(var j =0;j<a1.length;j++) {
  298 + // 3、判断当前班次j是否属于当前路牌i下,除去早晚例保班次、吃饭时间、班次时间为0的班次
  299 + if(a1[j].parent == a2[i].lpA.lpNo && a1[j].bcType!='bd' && a1[j].bcType!='lc' && a1[j].bcType!='cf' && a1[j].bcsj>0)
  300 + bcs++;
  301 + }
  302 + // 4、把每个路牌下的对应班次数一一封装在一起,并添加到返回数组里边
  303 + array.push({lpNo:a2[i].lpA.lpNo,bcs:bcs});
  304 + }
  305 + return array;
  306 +}
  307 +/************************************************************************************************************************************************/
  308 +
  309 +
  310 +/**
  311 + * d3动画过度
  312 + *
  313 + * @param {Object} d3 Element
  314 + *
  315 + * @returns {Function} 动画函数部分
  316 + ************************************************************************************************************************************************/
  317 +var _animation = function(d3Node) {return d3Node.transition().delay(function(d,i){return 0.001;}).duration(300).ease("linear");}
  318 +/************************************************************************************************************************************************/
  319 +
  320 +
  321 +/** 创建提示框内容
  322 + *
  323 + * @param {Object} RelationshipGraph 对象
  324 + *
  325 + * @returns {Object} table.outerHTML
  326 + ************************************************************************************************************************************************/
  327 +var createTooltip = function createTooltip(self) {
  328 + var hiddenKeys = ['_PRIVATE_','fcno' ,'PARENTCOLOR', 'SETNODECOLOR', 'SETNODESTROKECOLOR', /*'INTERVAL',*/'num'],
  329 + showKeys = self.configuration.showKeys;
  330 + return d3.tip().attr('class', 'relationshipGraph-tip').offset([-8, -10]).html(function (obj) {
  331 + var keys = Object.keys(obj),
  332 + table = document.createElement('table'),
  333 + count = keys.length,
  334 + rows = [];
  335 + while (count--) {
  336 + var element = keys[count],
  337 + upperCaseKey = element.toUpperCase();
  338 + if (!RelationshipGraph.contains(hiddenKeys, upperCaseKey) && !upperCaseKey.startsWith('__') && obj[element] !='tjz') {
  339 + var row = document.createElement('tr'),
  340 + key = showKeys ? document.createElement('td') : null,
  341 + value = document.createElement('td');
  342 + if (showKeys) {
  343 + var changeKey = null;
  344 + if(element=='fcsj')
  345 + changeKey = '发车时间:';
  346 + else if(element=='ARRIVALTIME')
  347 + changeKey = '到站时间:';
  348 + else if(element=='bcsj')
  349 + changeKey = '行驶时间:';
  350 + else if(element=='STOPTIME')
  351 + changeKey = '停息时间:';
  352 + else if(element=='xlDir')
  353 + changeKey = '行驶方向:';
  354 + else if(element=='parent')
  355 + changeKey = '当前车辆:';
  356 + else if(element=='bcType')
  357 + changeKey = '班次类型:';
  358 + else if(element=='tjbx')
  359 + changeKey = '推荐班型:';
  360 + else
  361 + changeKey = element;
  362 + key.innerHTML =changeKey;
  363 + row.appendChild(key);
  364 + }
  365 +
  366 + if (upperCaseKey == 'VALUE' && !self.configuration.valueKeyName) {
  367 + continue;
  368 + }
  369 +
  370 + if(obj[element]=='relationshipGraph-up')
  371 + value.innerHTML = '上行';
  372 + else if(obj[element]=='relationshipGraph-down')
  373 + value.innerHTML = '下行';
  374 + else if(obj[element]=='normal')
  375 + value.innerHTML = '正常';
  376 + else if(obj[element]=='region')
  377 + value.innerHTML = '区间';
  378 + else if(obj[element]=='fb')
  379 + value.innerHTML = '分班';
  380 + else if(obj[element]=='in')
  381 + value.innerHTML = '进场';
  382 + else if(obj[element]=='lc')
  383 + value.innerHTML = '保养';
  384 + else if(obj[element]=='out')
  385 + value.innerHTML = '出场';
  386 + else if(obj[element]=='bd')
  387 + value.innerHTML = '保养';
  388 + else
  389 + value.innerHTML = obj[element];
  390 + value.style.fontWeight = 'normal';
  391 + row.appendChild(value);
  392 + rows.push(row);
  393 + }
  394 + }
  395 + var rowCount = rows.length;
  396 + while (rowCount--) {
  397 + table.appendChild(rows[rowCount]);
  398 + }
  399 + return table.outerHTML;
  400 + });
  401 +};
  402 +/************************************************************************************************************************************************/
  403 +
  404 +var _createClass = function () { function defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } } return function (Constructor, protoProps, staticProps) { if (protoProps) defineProperties(Constructor.prototype, protoProps); if (staticProps) defineProperties(Constructor, staticProps); return Constructor; }; }();
  405 +
  406 +var _typeof = typeof Symbol === "function" && typeof Symbol.iterator === "symbol" ? function (obj) { return typeof obj; } : function (obj) { return obj && typeof Symbol === "function" && obj.constructor === Symbol ? "symbol" : typeof obj; };
  407 +
  408 +function _classCallCheck(instance, Constructor) { if (!(instance instanceof Constructor)) { throw new TypeError("不能调用一个类作为函数."); } }
  409 +
  410 +/** 定义图层类
  411 + *
  412 + * @return {Object} 返回图层对象
  413 + *
  414 + **/
  415 +var RelationshipGraph = function () {
  416 +
  417 + /**
  418 + * 创建对象
  419 + *
  420 + * @param {d3.selection} 选择包含图的元素的标识
  421 + *
  422 + * @param {Object} 图层参数配置信息
  423 + *
  424 + **/
  425 + function RelationshipGraph(selection) {
  426 + // 获取配置参数
  427 + var userConfig = arguments.length <= 1 || arguments[1] === undefined ? { showTooltips: true, maxChildCount: 0, thresholds: [] } : arguments[1];
  428 + // 不能把类作为函数调用
  429 + _classCallCheck(this, RelationshipGraph);
  430 + var defaultOnClick = { parent: RelationshipGraph.noop, child: RelationshipGraph.noop };
  431 + // 图层配置参数信息
  432 + this.configuration = {
  433 + multiple: userConfig.multiple || 0,
  434 + hours : userConfig.hours || 24,
  435 + dxHours : userConfig.dxHours,
  436 + width:userConfig.width || 0,// 图层宽
  437 + height:userConfig.height || 0,// 图层高
  438 + offsetX:userConfig.offsetX || 0,// 偏移X值
  439 + offsetY:userConfig.offsetY || 0,// 偏移Y值
  440 + widtMargin:userConfig.widtMargin || 0,// 宽边距
  441 + heightMargin : userConfig.heightMargin ||0,// 高边距
  442 + downDy :userConfig.downDy ||0,// 下行发车时刻Y值差距
  443 + upDy : userConfig.upDy ||0,// 下行发车时刻Y值差值
  444 + timeDomainStart : userConfig.timeDomainStart,// 开始时间
  445 + timeDomainEnd : userConfig.timeDomainEnd,// 结束时间
  446 + startStr:userConfig.startStr,
  447 + endStr: userConfig.endStr,
  448 + taskTypes : userConfig.taskTypes,
  449 + lpNoA : userConfig.lpNoA,
  450 + tickFormat: userConfig.tickFormat,
  451 + stopAraay : userConfig.stopAraay,
  452 + dataMap : userConfig.dataMap,
  453 + selection: selection, // 图形的标识.
  454 + showTooltips: userConfig.showTooltips, // 是否显示工具提示在盘旋
  455 + maxChildCount: userConfig.maxChildCount || 0, // 每行最多显示的儿童数量.
  456 + onClick: userConfig.onClick || defaultOnClick, // 回调函数调用.
  457 + showKeys: userConfig.showKeys, // 是否显示在工具提示中的钥匙.
  458 + transitionTime: userConfig.transitionTime || 1500, // 过渡到开始和完成的时间.
  459 + valueKeyName: userConfig.valueKeyName, // 设置工具提示自定义键
  460 + bxrcgs : userConfig.bxrcgs
  461 + };
  462 + // 是否开启提示框 ,默认开启。
  463 + if (this.configuration.showTooltips === undefined)
  464 + this.configuration.showTooltips = true;
  465 + // 是否显示键 ,默认显示。
  466 + if (this.configuration.showKeys === undefined)
  467 + this.configuration.showKeys = true;
  468 + // 是否显示值,默认显示。
  469 + if (this.configuration.keyValueName === undefined)
  470 + this.configuration.keyValueName = 'value';
  471 +
  472 + this.measurementDiv = document.createElement('div');
  473 +
  474 + this.measurementDiv.className = 'relationshipGraph-measurement';
  475 +
  476 + document.body.appendChild(this.measurementDiv);
  477 +
  478 + this.measuredCache = {};
  479 +
  480 + this.representation = [];
  481 +
  482 + this._spacing = 1;
  483 +
  484 + this._d3V4 = !!this.configuration.selection._groups;
  485 +
  486 + if (this.configuration.showTooltips) {
  487 + this.tooltip = createTooltip(this);
  488 + this.tooltip.direction('n');
  489 + } else {
  490 + this.tooltip = null;
  491 + }
  492 +
  493 + this.svg = this.configuration.selection.select('svg').select('g');
  494 + if (this.svg.empty()) {
  495 + // 创建SVG元素将包含图
  496 + this.svg = this.configuration.selection.append('svg').attr("class", "svg-chart")
  497 + .attr('width',this.configuration.width + this.configuration.widtMargin)
  498 + .attr('height', this.configuration.height + this.configuration.heightMargin)
  499 + .attr('style', 'display: block')
  500 + .append('g').attr("class", "gantt-chart");
  501 +
  502 + // 创建时间线性区域
  503 + var x = d3.time
  504 + .scale()
  505 + .domain([ this.configuration.timeDomainStart, this.configuration.timeDomainEnd ])
  506 + .range([ 0, this.configuration.width])
  507 + .clamp(true),
  508 + // 创建Y线性区域
  509 + y = d3.scale
  510 + .ordinal()
  511 + .domain(this.configuration.lpNoA)
  512 + .rangeRoundBands([ 0, this.configuration.height], .1);
  513 +
  514 + this.configuration.y = y;
  515 + // 创建X轴
  516 + var xAxis = d3.svg
  517 + .axis()
  518 + .scale(x)
  519 + .orient("top")
  520 + .ticks(this.configuration.hours)
  521 + .tickFormat(d3.time.format(this.configuration.tickFormat))
  522 + .tickSubdivide(true)
  523 + .tickSize(8)
  524 + .tickPadding(8)
  525 + .innerTickSize(-(this.configuration.height)),
  526 + // 创建Y轴
  527 + yAxis = d3.svg
  528 + .axis()
  529 + .scale(y)
  530 + .orient("left")
  531 + .tickSize(0),
  532 + // 创建上行发车时间刻度尺轴
  533 + upxAxis = d3.svg
  534 + .axis()
  535 + .scale(x)
  536 + .orient("top")
  537 + .ticks(this.configuration.hours)
  538 + .tickFormat(d3.time.format(this.configuration.tickFormat))
  539 + .tickSubdivide(true)
  540 + .tickSize(30).tickPadding(3),
  541 + // 创建下行发车时间刻度尺轴
  542 + downxAxis = d3.svg
  543 + .axis()
  544 + .scale(x)
  545 + .orient("top")
  546 + .ticks(this.configuration.hours)
  547 + .tickFormat(d3.time.format(this.configuration.tickFormat))
  548 + .tickSubdivide(true)
  549 + .tickSize(30).tickPadding(3);
  550 + // 添加X轴
  551 + this.svg
  552 + .append("g")
  553 + .attr("class", "x axis")
  554 + .attr("transform", "translate(" + this.configuration.offsetX + ", " + this.configuration.offsetY + ")")
  555 + .transition()
  556 + .call(xAxis);
  557 + // 添加Y轴
  558 + this.svg
  559 + .append("g")
  560 + .attr("class", "y axis")
  561 + .attr("transform", "translate(" + this.configuration.offsetX + ", " + this.configuration.offsetY + ")")
  562 + .transition().call(yAxis);
  563 + // 添加上行发车时间刻度尺
  564 + this.svg
  565 + .append("g")
  566 + .attr("class", "up")
  567 + .attr("transform", "translate(" + this.configuration.offsetX + ", " + (this.configuration.offsetY - this.configuration.upDy) + ")")
  568 + .transition().call(upxAxis);
  569 + // 添加下行发车时间刻度尺
  570 + this.svg
  571 + .append("g")
  572 + .attr("class", "down")
  573 + .attr("transform", "translate(" + this.configuration.offsetX + ", " + (this.configuration.offsetY - this.configuration.downDy) + ")")
  574 + .transition().call(downxAxis);
  575 + this.svg
  576 + .append("g")
  577 + .attr("class", "shift");
  578 + var $_UP = d3.select('g.up')
  579 + .append('g')
  580 + .attr('class','tick')
  581 + .attr('transform','translate(0,0)')
  582 + .style('opacity',1),
  583 + $_DOWN = d3.select('g.down')
  584 + .append('g')
  585 + .attr('class','tick')
  586 + .attr('transform','translate(0,0)')
  587 + .style('opacity',1)
  588 + $_UP.append('line').attr('x2',0).attr('y2',0);
  589 + $_UP.append('text').attr('x',-10).attr('dy','.32em').attr('y',0).style('text-anchor','end').text('上行发车时刻');
  590 + $_DOWN.append('line').attr('x2',0).attr('y2',0);
  591 + $_DOWN.append('text').attr('x',-10).attr('dy','.32em').attr('y',0).style('text-anchor','end').text('下行发车时刻');
  592 + this.addListenerMouseEvent();
  593 + this.createStatistics();
  594 + // 清空数组
  595 + if(yAxisYArray.length>0)
  596 + yAxisYArray.splice(0,yAxisYArray.length);
  597 + for(var t = 0;t<this.configuration.taskTypes.length;t++) {
  598 + yAxisYArray.push({
  599 + y:y(this.configuration.taskTypes[t].lpNo)+this.configuration.offsetY,
  600 + carname:this.configuration.taskTypes[t].lpName,
  601 + lpA : this.configuration.taskTypes[t]});
  602 + }
  603 + }
  604 + this.graph = this;
  605 + }
  606 + _createClass(RelationshipGraph, [{
  607 + key: 'data',
  608 + value: function data(json) {
  609 + if (RelationshipGraph.verifyJson(json)) {
  610 + /** 上、下行JSON数组 */
  611 + var upArray = new Array(),downArray = new Array();
  612 + for(var j = 0 ; j< json.length ; j++) {
  613 + if(json[j].bcType=='normal' || json[j].bcType=='region') {
  614 + if(json[j].xlDir == 'relationshipGraph-up')
  615 + upArray.push(json[j]);
  616 + else if(json[j].xlDir == 'relationshipGraph-down')
  617 + downArray.push(json[j])
  618 + }
  619 + }
  620 + this.removeNodes(d3.selectAll('g.up_tick')[0]);
  621 + this.removeNodes(d3.selectAll('g.down_tick')[0]);
  622 + this.removeNodes($('g.shift').children());
  623 + var upNodes = this.configuration.selection.select('svg').select('g.up').selectAll('.up_tick').data(upArray),
  624 + downNodes = this.configuration.selection.select('svg').select('g.down').selectAll('.down_tick').data(downArray),
  625 + nodes = this.configuration.selection.select('svg').select('g.shift').selectAll('.data').data(json);
  626 + // 绘制上行发车时刻
  627 + this.createUpTime(upNodes);
  628 + // 绘制下行发车时刻
  629 + this.createDownTime(downNodes);
  630 + // 绘制班次
  631 + this.createClasses(nodes);
  632 + // 绘制统计值
  633 + this.statistics();
  634 + if (this.configuration.showTooltips) {
  635 + d3.select('.d3-tip').remove();
  636 + this.svg.call(this.tooltip);
  637 + }
  638 + }
  639 + return this;
  640 + }
  641 + }, {
  642 + key : 'createUpTime',
  643 + value : function createUpTime(upNodes) {
  644 + var _this = this;
  645 + var $g_tick = upNodes.enter().append('g').attr('class','up_tick')
  646 + .attr('transform', function (obj) {
  647 + var hourMinue = obj.fcsj.split(":");
  648 + var rectX = (parseInt(hourMinue[0])-_this.configuration.dxHours )*60*_this.configuration.multiple +
  649 + parseInt(hourMinue[1])*_this.configuration.multiple;
  650 + return 'translate(' + rectX + ',0)';
  651 + });
  652 + $g_tick.append('line').attr('y2',-5).attr('x2',0);
  653 + $g_tick.append('text').attr('y',-10).attr('dy','0em').attr('x',0).style('text-anchor','middle')
  654 + .text(function(obj) {
  655 + var hourMinue = obj.fcsj.split(":");
  656 + return hourMinue[1];
  657 + });
  658 + }
  659 + }, {
  660 + key : 'createDownTime',
  661 + value: function createDownTime(downNodes) {
  662 + var _this = this;
  663 + var $g_tick = downNodes.enter().append('g').attr('class','down_tick')
  664 + .attr('transform', function (obj) {
  665 + var hourMinue = obj.fcsj.split(":");
  666 + var rectX = (parseInt(hourMinue[0])-_this.configuration.dxHours )*60*_this.configuration.multiple + parseInt(hourMinue[1])*_this.configuration.multiple;
  667 + return 'translate(' + rectX + ',0)';
  668 + });
  669 + $g_tick.append('line').attr('y2',-5).attr('x2',0);
  670 + $g_tick.append('text').attr('y',-10).attr('dy','0em').attr('x',0).style('text-anchor','middle')
  671 + .text(function(obj) {
  672 + var hourMinue = obj.fcsj.split(":");
  673 + return hourMinue[1];
  674 + });
  675 +
  676 + }
  677 + }, {
  678 + key: 'setBxTagType',
  679 + value : function setBxTagType(node) {
  680 +
  681 + }
  682 +
  683 + }, {
  684 + /**
  685 + * @description : (TODO) 创建rect、text(班次对象、班次属性值)元素对象
  686 + *
  687 + * @param {Object} Elements
  688 + *
  689 + * @status : OK.
  690 + */
  691 + key: 'createClasses',
  692 + value: function createClasses(childrenNodes) {
  693 + // 把当前对象赋值给_this.
  694 + var _this = this;
  695 + // 添加底层rect元素(班次)对象.
  696 + childrenNodes.enter().append('rect').attr('id',RelationshipGraph.setIdValue) // 设值id
  697 + .attr('x',RelationshipGraph.setXValue) // 设值x坐标
  698 + .attr('y',RelationshipGraph.setYValue) // 设值y坐标.
  699 + .attr('class',RelationshipGraph.setRectClassV)// 设值class
  700 + .attr('width',RelationshipGraph.setRectWidthV) // 设值宽度
  701 + .attr('height',RelationshipGraph.setRectHeight)// 设值高度
  702 + .attr('parent-node',RelationshipGraph.setRectParenNodeIdV)// 设值父元素id
  703 + .attr('next-node',RelationshipGraph.setNextNodeIdV)// 设值下个元素的id
  704 + .attr('last-node',RelationshipGraph.setLastNodeIdV)// 设值上个元素的id
  705 + .attr('rect-type',RelationshipGraph.setNodeType('shift')); // 设值元素类型
  706 + // 添加第一行text元素(班次属性值[发车时间~到站时间])对象.
  707 + childrenNodes.enter().append('text').attr('id',RelationshipGraph.setText01IdV) //设值id.
  708 + .attr('x',RelationshipGraph.setXValue) // 设值x坐标.
  709 + .attr('y',RelationshipGraph.setYValue) // 设值y.
  710 + .attr('dx',RelationshipGraph.setTextDxV(5)) // 设值x方向偏移量.
  711 + .attr('dy',RelationshipGraph.setTextDyV(18))// 设值y方向偏移量.
  712 + .attr('class',RelationshipGraph.setTextClassV) //设值class.
  713 + .text(RelationshipGraph.setText01text)// 设值text文本
  714 + .attr('parent-node',RelationshipGraph.setIdValue)// 设置父元素id
  715 + .attr('text-type',RelationshipGraph.setNodeType('timeslot'));// 设值元素类型.
  716 + // 添加第二行text元素(班次属性值[行驶时间])对象.
  717 + childrenNodes.enter().append('text').attr('id',RelationshipGraph.setText02IdV)// 设值id.
  718 + .attr('x',RelationshipGraph.setXValue)// 设值x.
  719 + .attr('y',RelationshipGraph.setYValue)// 设值y.
  720 + .attr('dx',RelationshipGraph.setTextDxV(5))// 设值x方向偏移量.
  721 + .attr('dy',RelationshipGraph.setTextDyV(36))// 设值y方向偏移量.
  722 + .attr('class',RelationshipGraph.setTextClassV) // 设值class.
  723 + .text(RelationshipGraph.setText02text)// 设值text文本.
  724 + .attr('parent-node',RelationshipGraph.setIdValue)// 设值父元素id
  725 + .attr('text-type', RelationshipGraph.setNodeType('travel'));// 设置元素类型.
  726 + // 添加第三行text元素(班次属性值[停息时间])对象.
  727 + childrenNodes.enter().append('text').attr('id',RelationshipGraph.setText03IdV)// 设值id.
  728 + .attr('x',RelationshipGraph.setXValue)// 设值x
  729 + .attr('y',RelationshipGraph.setYValue)// 设值y
  730 + .attr('dx',RelationshipGraph.setTextDxV(5))// 设值x方向偏移量.
  731 + .attr('dy',RelationshipGraph.setTextDyV(54))// 设值y方向偏移量.
  732 + .attr('class',RelationshipGraph.setTextClassV)// 设值class.
  733 + .text(RelationshipGraph.setText03text)// 设值text文本.
  734 + .attr('parent-node',RelationshipGraph.setIdValue)// 设值父元素id.
  735 + .attr('text-type',RelationshipGraph.setNodeType('gap'));// 设值元素类型.
  736 + // 添加底层rect元素上的圆.
  737 + childrenNodes.enter().append('circle').attr('id',RelationshipGraph.setCircleIdV)// 设值id.
  738 + .attr('cx',RelationshipGraph.setCirclecxV)// 设值cx.
  739 + .attr('cy',RelationshipGraph.setCirclecyV)// 设值cy.
  740 + .attr('r',RelationshipGraph.setCircleRV)// 设值半径r.
  741 + .attr('class',RelationshipGraph.setCircleClass)// 设值class.
  742 + .attr('parent-node',RelationshipGraph.setIdValue);// 设值父元素id.
  743 + // 添加圆里的text元素(班次类型值)对象
  744 + childrenNodes.enter().append('text').attr('id',RelationshipGraph.setText04IdV)// 设值id.
  745 + .attr('x',RelationshipGraph.setText04XV)// 设值x.
  746 + .attr('y',RelationshipGraph.setText04YV)// 设值y.
  747 + .attr('class',RelationshipGraph.setText04ClassV)// 设值class
  748 + .text(RelationshipGraph.setText04text)//设值text文本.
  749 + .attr('parent-node', RelationshipGraph.setIdValue)// 设值父元素id.
  750 + .attr('text-type',RelationshipGraph.setNodeType('bcType'));// 设值元素类型.
  751 + // 添加底层rect元素的rect对象(覆盖层). 添加覆盖层是为了对拖拽事件的响应.
  752 + childrenNodes.enter().append('rect').attr('id',RelationshipGraph.setCoverRectIdV)// 设值id.
  753 + .attr('x',RelationshipGraph.setXValue)// 设值x.
  754 + .attr('y',RelationshipGraph.setYValue)// 设值y.
  755 + .attr('class',RelationshipGraph.setCoverRectClassV('rect-cover'))// 设值class.
  756 + .attr('width',RelationshipGraph.setRectWidthV)// 设值宽度.
  757 + .attr('height',RelationshipGraph.setRectHeight)// 设值高度.
  758 + .attr('parent-node',RelationshipGraph.setCoverRectParentV)// 设值父元素id.
  759 + .attr('rect-type',RelationshipGraph.setNodeType('cover'))// 设值元素类型.
  760 + .attr('next-node',RelationshipGraph.setCoverRectLastIdV)// 设值下个元素id.
  761 + .on('mouseover', _this.tooltip ? _this.tooltip.show : RelationshipGraph.noop)// 监听鼠标移入事件.
  762 + .on('mouseout', _this.tooltip ? _this.tooltip.hide : RelationshipGraph.noop)// 监听鼠标移出事件.
  763 + .on('mousedown', function (obj) {
  764 + _this.tooltip.hide();
  765 + _this.configuration.onClick.child(obj);
  766 + // 这里很关键.移除鼠标右击时做拖拽事件.决定了鼠标右击时只做左菜单.
  767 + if(window.event.which==3)
  768 + context.setisContext(true);
  769 + }).call(d3.behavior.drag()
  770 + .on("dragstart", RelationshipGraph.singleElementDrawStart) // 监听单个rect元素拖拽开始事件
  771 + .on("drag",RelationshipGraph.singleElementDrawRuing)// 监听单个rect元素拖拽中事件.
  772 + .on("dragend",RelationshipGraph.singleElementDrawStop));// 监听单个rect元素拖拽结束事件.
  773 + }
  774 + }, {
  775 + key: 'removeNodes',
  776 + value: function removeNodes(nodes) {
  777 + for(var n = 0 ;n<nodes.length;n++) {
  778 + $(nodes[n]).remove();
  779 + }
  780 + }
  781 + }, {
  782 + key : 'getSvgyAxisTransformY',
  783 + value : function getSvgyAxisTransformY() {
  784 + var listChildrNodes = $(".y").children(".tick");
  785 + var len_node = listChildrNodes.length;
  786 + var y_array = new Array();
  787 + for(var n = 0;n<len_node;n++) {
  788 + var transform = $(listChildrNodes[n]).attr("transform");
  789 + var t_value = transform.substring(transform.indexOf("(")+1 ,transform.lastIndexOf(")") ).split(",");
  790 + y_array.push(parseInt(t_value[1]));
  791 + }
  792 + return y_array;
  793 + }
  794 + }, {
  795 + key : 'getDataArray',
  796 + value : function getDataArray() {
  797 + var nodes = d3.selectAll('rect.data')[0],dataArray = new Array();
  798 + for(var i = 0 ; i<nodes.length;i++) {
  799 + dataArray.push(d3.select(nodes[i]).data()[0]);
  800 + }
  801 + return dataArray;
  802 + }
  803 + }, {
  804 + key : 'addHistory' ,
  805 + value : function addHistory() {
  806 + historyArray.push({'data':JSON.stringify(this.getDataArray()),'granph':JSON.stringify(this.configuration)});
  807 + $_keyIndex++;
  808 + }
  809 + }, {
  810 + key : 'statistics',
  811 + value : function statistics() {
  812 + var $_this = this,
  813 + array = $_this.getSvgyAxisTransformY(),
  814 + gdata = d3.selectAll('rect.data')[0],
  815 + arrayTemp = new Array(),
  816 + minValue = 0,timeNum;
  817 + for(var a=0;a<array.length;a++) {
  818 + var tempNum = 0,timeNum = 0,lpNo = '';
  819 + for(var g = 0 ; g <gdata.length;g++) {
  820 + var temp_i = parseInt(d3.select(gdata[g]).attr('y'))-this.configuration.offsetY;
  821 + if(temp_i<array[a] && temp_i>minValue) {
  822 + var parentNodeCName = d3.select(gdata[g]).attr('id'),
  823 + // nodes = d3.selectAll('text[parent-node='+ parentNodeCName +']')[0]
  824 + $_d = d3.select(gdata[g]).data()[0];
  825 + lpNo = $_d.lpNo;
  826 + timeNum = timeNum + parseInt($_d.STOPTIME) + parseInt($_d.bcsj);
  827 + if($_d.bcType!='bd' && $_d.bcType!='lc' && $_d.bcType!='cf' && $_d.bcsj>0)
  828 + tempNum++;
  829 + }
  830 + }
  831 + minValue = array[a];
  832 + var className = 'statis_container_' + array[a];
  833 + var textNodes = $("."+className).children("text");
  834 + /*var hours = parseInt(timeNum/60);
  835 + var mimus = timeNum%60,zgs = hours + (mimus==0? "": "." + mimus);*/
  836 + var zgs = parseFloat((timeNum/60).toFixed(2));
  837 + $(textNodes[0]).text("总工时:" + zgs);
  838 + $(textNodes[1]).text("总班次:"+(tempNum));
  839 + $_this.pptjbx($("."+className).children("rect")[2],zgs*1,lpNo,$_this);
  840 + }
  841 + }
  842 +
  843 + }, {
  844 +
  845 + }, {
  846 + key : 'pptjbx',
  847 + value : function pptjbx(node,gs,lpNo,$_this) {
  848 + if($_this.configuration.bxrcgs!=null) {
  849 + for(var t = 0 ; t<$_this.configuration.bxrcgs.length;t++) {
  850 + if($_this.configuration.bxrcgs[t].lpNo == lpNo)
  851 + d3.select(node).data()[0].tjbx = $_this.configuration.bxrcgs[t].type;
  852 + }
  853 + }else {
  854 + workeType.sort(function(a,b){return b.hourV-a.hourV});
  855 + var zhHoursA = new Array();
  856 + if(gs>(workeType[0].hourV+1)) {
  857 + for(var k = 0 ; k<workeType.length;k++) {
  858 + var kHourV = workeType[k].hourV;
  859 + for(var a = k ; a<workeType.length;a++) {
  860 + var aHourV = workeType[a].hourV;
  861 + var dx = Math.abs(parseInt(kHourV + aHourV - gs));
  862 + zhHoursA.push({'bx1': workeType[k].type,'bx2': '</br></br>' + workeType[a].type,'countGs':dx});
  863 + }
  864 + }
  865 + }else {
  866 + for(var b = 0 ; b<workeType.length;b++) {
  867 + zhHoursA.push({'bx1': workeType[b].type,'bx2':'','countGs':Math.abs(parseInt(workeType[b].hourV - gs))});
  868 + }
  869 + }
  870 + zhHoursA.sort(function(a,b){return a.countGs-b.countGs});
  871 + d3.select(node).data()[0].tjbx = zhHoursA[0].bx1 + zhHoursA[0].bx2;
  872 + }
  873 + /*if(gs>16) {
  874 + d3.select(node).data()[0].tjbx = 'zyxy';
  875 + } else {
  876 + var bclx = 'wz';
  877 + for(var g = 0 ; g<workeType.length;g++) {
  878 + if((gs<workeType[g].value && gs>workeType[g].value-10) || (gs<workeType[g].value*2 && gs>workeType[g].value2* -10)){
  879 + bclx = workeType[g].type;
  880 + break;
  881 + }
  882 + }
  883 + d3.select(node).data()[0].tjbx = bclx;
  884 + }*/
  885 + }
  886 + }, {
  887 + key : 'createStatistics',
  888 + value : function createStatistics() {
  889 + var svg = d3.select('.gantt-chart'),
  890 + _this = this,
  891 + array = _this.getSvgyAxisTransformY();
  892 + var g_statis = svg.selectAll('.g_statis').data([1]).enter().append('g').classed({'g_statis':true}).attr("transform", "translate(" + _this.configuration.offsetX + ", " + _this.configuration.offsetY + ")");
  893 + for(var c = 0 ;c<array.length;c++) {
  894 + var className = 'statis_container_' + array[c];
  895 + var statis_container = g_statis.append('g').attr("class",className).attr("transform", "translate(" + 0 + ", " + array[c] + ")");
  896 + statis_container.append('rect').classed({'rect_shift':true})
  897 + .attr("x",-_this.configuration.offsetX)
  898 + .attr("y",9)
  899 + .attr("rx",5)
  900 + .attr("ry",5)
  901 + .attr("width",_this.configuration.offsetX)
  902 + .attr("height",20);
  903 + statis_container.append('rect').classed({'rect_Whours':true})
  904 + .attr("x",-_this.configuration.offsetX)
  905 + .attr("y",32)
  906 + .attr("rx",5)
  907 + .attr("ry",5)
  908 + .attr("width",_this.configuration.offsetX)
  909 + .attr("height",20);
  910 + statis_container.append("text")
  911 + .attr("class","statis_text")
  912 + .attr("x",-_this.configuration.offsetX)
  913 + .attr("y",9)
  914 + .attr('dx',15)
  915 + .attr('dy',15)
  916 + .text("总工时:");
  917 + statis_container.append("text")
  918 + .attr("class","statis_text")
  919 + .attr("x",-_this.configuration.offsetX)
  920 + .attr("y",32)
  921 + .attr('dx',15)
  922 + .attr('dy',15)
  923 + .text("总班次:");
  924 + statis_container.append('rect').data([{'tjbx':'未知','bcType':'tjz'}]).classed({'rect-cover-statis':true})
  925 + .attr("x",-_this.configuration.offsetX)
  926 + .attr("y",8)
  927 + .attr("rx",5)
  928 + .attr("ry",5)
  929 + .attr("width",_this.configuration.offsetX)
  930 + .attr("height",20)
  931 + .on('mouseover', _this.tooltip ? _this.tooltip.show : RelationshipGraph.noop)
  932 + .on('mouseout', _this.tooltip ? _this.tooltip.hide : RelationshipGraph.noop);
  933 + statis_container.append('rect').data([{'bcType':'tjz'}]).classed({'rect-cover-statis':true})
  934 + .attr("x",-_this.configuration.offsetX)
  935 + .attr("y",32)
  936 + .attr("rx",5)
  937 + .attr("ry",5)
  938 + .attr("width",_this.configuration.offsetX)
  939 + .attr("height",20);
  940 + }
  941 + }
  942 +
  943 + }, {
  944 + /**
  945 + * @description : (TODO) 添加鼠标监听事件.
  946 + *
  947 + * ^^^^^^^^^^^^^^^^^^^^^
  948 + * 此事件做绘制选中班次框.
  949 + *
  950 + **/
  951 + key: 'addListenerMouseEvent',
  952 + value : function addListenerMouseEvent() {
  953 + // 1、 控制鼠标操作从 按下(300ms开始,并且按下时不能移动鼠标,打开开关) ---> 移动(画选择框) ---> 松开(关闭开关) 过程.
  954 + var flag = false,stop;
  955 + // 2、获取DIV ID为 [ganttSvg] svg容器.
  956 + var svg = d3.select("#ganttSvg");
  957 + // 3、给svg容器元素对象 添加鼠标按下事件.
  958 + svg.on('mousedown',function(e){
  959 + // 3.1、如果开关没打开,或者已存在选择框对象,或者从rect元素(班次)对象上按下时,提前结束鼠标操作过程.
  960 + if(flag || RelationshipGraph.getFlagIndex()>0 || d3.event.target.nodeName =='rect')
  961 + return false;
  962 + // 3.2、定义鼠标按下的x、y坐标 .
  963 + var d3MouseDown_x = parseInt(d3.mouse(this)[0]),d3MouseDown_y = parseInt(d3.mouse(this)[1]);
  964 + // 3.3、计时鼠标是否按下已有300ms,并且在300ms中鼠标未曾移动,则打开开关,进入鼠标操作过程.
  965 + stop = setTimeout(function(e) {
  966 + // 3.4、打开鼠标移动和松开事件开关.
  967 + flag = true;
  968 + // 3.5、记录当前选择框数 .
  969 + RelationshipGraph.setFlagIndex(1);
  970 + // 3.6、创建选择框 .
  971 + var container_g = d3.selectAll(".gantt-chart").selectAll('.case_g').data([1]).enter().append('g').classed({'case_g':true});
  972 + // 3.7、给选择框添加class为case_rect caseactive 元素.
  973 + container_g.append('rect').data([{'bcType':'tjz'}]).classed({'case_rect caseactive':true})
  974 + .attr('id', 'case_rectId')
  975 + .attr('x', d3MouseDown_x)
  976 + .attr('y', d3MouseDown_y)
  977 + .attr('rect-type', function (obj) {
  978 + return 'case';
  979 + }).call(d3.behavior.drag()
  980 + .on("dragstart",RelationshipGraph.regionDrawStart) // 3.7.1 给选择框添加沿X轴开始拖拽事件.
  981 + .on("drag",RelationshipGraph.regionDrawRuing) // 3.7.2 给选择框添加沿X轴拖拽中事件.
  982 + .on("dragend",RelationshipGraph.regionDrawStop));// 3.7.3 给选择框添加沿X轴拖拽结束事件.
  983 + // 3.8 打开小tips提示层.
  984 + layer.tips('鼠标绘制工具已打开,从此处位置开始绘制选中框来进行选中班次。', '.case_rect', {
  985 + tips: [1, '#3595CC'],
  986 + time: 4000
  987 + });
  988 + },200);
  989 + // 4、给svg容器元素对象 添加鼠标移动事件 . 这里等同于绘制选择框.
  990 + }).on('mousemove',function(e){
  991 + // 4.1 判断开关是否打开状态.
  992 + if(flag) {
  993 + // 4.1.1、定义鼠标移动的x、y坐标.
  994 + var d3MouseMove_x = parseInt(d3.mouse(this)[0]),d3MouseMove_y = parseInt(d3.mouse(this)[1]);
  995 + // 4.1.2、获取class 为case_rect 的元素起始x、y坐标点.
  996 + var mdX = parseInt($("rect.case_rect").attr("x")),mdY = parseInt($("rect.case_rect").attr("y"));
  997 + // 4.1.3、根据两点之间计算高和宽,并给class为case_rect元素设置高和宽的属性值.
  998 + svg.selectAll('rect.case_rect').attr("width", Math.abs(d3MouseMove_x - mdX)).attr("height", Math.abs(d3MouseMove_y - mdY));
  999 + }else {
  1000 + // 4.2 清楚定时器.
  1001 + clearTimeout(stop);
  1002 + }
  1003 + // 5、 给svg容器元素对象 添加鼠标松开事件.
  1004 + }).on('mouseup',function(e){
  1005 + if(flag) {
  1006 + layer.closeAll();// 关闭弹出层.
  1007 + RelationshipGraph.mouseUpEvent(flag);
  1008 + flag = false;
  1009 + } else {
  1010 + clearTimeout(stop);
  1011 + }
  1012 + // 6、给svg容器元素对象 添加鼠标移出事件.解决鼠标在其他元素上松开而不关闭开关问题.只有在绑定 mouseleave 事件的元素上,将鼠标移出时,才会触发该事件。
  1013 + }).on('mouseleave',function() {
  1014 + if(flag) {
  1015 + layer.closeAll();// 关闭弹出层.
  1016 + RelationshipGraph.mouseUpEvent(flag);
  1017 + flag = false;
  1018 + } else {
  1019 + clearTimeout(stop);
  1020 + }
  1021 + });
  1022 + }
  1023 + }], [{
  1024 + key: 'contains',
  1025 + value: function contains(arr, key) {
  1026 + return arr.indexOf(key) > -1;
  1027 + }
  1028 + }, {
  1029 + /**
  1030 + * @description : (TODO) 获取鼠标绘制的当前选择框标识(这里限制只做一次性选择元素拖拽,在绘制选择框时)
  1031 + *
  1032 + * @return 返回一个数值. 鼠标绘制的当前选择框标识(这里限制只做一次性选择元素拖拽,在绘制选择框时)
  1033 + * */
  1034 + key : 'getFlagIndex',
  1035 + value : function getFlagIndex() {
  1036 + return flagIndex;
  1037 + }
  1038 +
  1039 + }, {
  1040 + /**
  1041 + * @description : (TODO) 设值鼠标绘制的当前选择框标识(这里限制只做一次性选择元素拖拽,在绘制选择框时).
  1042 + *
  1043 + * @param [v--数值]
  1044 + * */
  1045 + key : 'setFlagIndex',
  1046 + value: function setFlagIndex(v) {
  1047 + flagIndex = v;
  1048 + }
  1049 + }, {
  1050 + /**
  1051 + * @description : (TODO) 关闭选择框按钮事件.
  1052 + *
  1053 + * @status OK.
  1054 + * */
  1055 + key : 'gClose',
  1056 + value : function gClose() {
  1057 + $("g.case_g").remove();
  1058 + RelationshipGraph.setFlagIndex(0);
  1059 + gClassNameArray = [];
  1060 + d3.selectAll('.caseactive').classed({'caseactive':false});
  1061 + }
  1062 + }, {
  1063 + /**
  1064 + * @description : (TODO) 添加班次事件.
  1065 + *
  1066 + * @status OK.
  1067 + * */
  1068 + key : 'reladplus',
  1069 + value : function reladplus() {
  1070 + // 弹出层mobal页面
  1071 + $.get('/pages/base/timesmodel/reladplus.html', function(m){
  1072 + $(pjaxContainer).append(m);
  1073 + // 规定被选元素要触发的事件。可以使自定义事件(使用 bind() 函数来附加),或者任何标准事件。
  1074 + $('#reladplus_mobal').trigger('reladplusMobal.show',[$_GlobalGraph,BaseFun,yAxisYArray]);
  1075 + });
  1076 + }
  1077 + }, {
  1078 + /**
  1079 + * @description : (TODO) 添加路牌.
  1080 + *
  1081 + * @status OK.
  1082 + * */
  1083 + key : 'addlp',
  1084 + value : function addlp() {
  1085 + // 获取初始路牌总数.
  1086 + var len = $_GlobalGraph.configuration.taskTypes.length;
  1087 + // 添加路牌.
  1088 + $_GlobalGraph.configuration.taskTypes.push({'lp':null,'lpName':len+1,'lpNo':len+1,'lpType':'普通路牌'});
  1089 + // 添加路牌编码
  1090 + $_GlobalGraph.configuration.lpNoA.push(len+1);
  1091 + // 修改图形高度
  1092 + $_GlobalGraph.configuration.height = $_GlobalGraph.configuration.lpNoA.length*60 + 240;
  1093 + // 修改初始化图形时间轴开始时间
  1094 + $_GlobalGraph.configuration.timeDomainStart=new Date($_GlobalGraph.configuration.startStr);
  1095 + // 修改初始化图形时间轴结束时间
  1096 + $_GlobalGraph.configuration.timeDomainEnd=new Date($_GlobalGraph.configuration.endStr);
  1097 + // 获取数据.
  1098 + var data_ = $_GlobalGraph.getDataArray();
  1099 + // 删除图形.
  1100 + $('svg.svg-chart').remove();
  1101 + // 重新创建图形.
  1102 + var graph_ = d3.select('#ganttSvg').relationshipGraph($_GlobalGraph.configuration);
  1103 + // 根据数据重新渲染图形.
  1104 + graph_.data(data_);
  1105 + $_GlobalGraph = graph_;
  1106 + // 记录当前操作.
  1107 + graph_.addHistory();
  1108 + // 弹出提示消息
  1109 + layer.msg('操作成功!已添路牌【'+ (len+1) +'】!');
  1110 + }
  1111 +
  1112 + }, {
  1113 + key : 'testFcno',
  1114 + value : function testFcno(arr) {
  1115 + for(var r = 0 ; r<arr.length;r++) {
  1116 + console.log(arr[r].fcno);
  1117 + }
  1118 + }
  1119 + }, {
  1120 + key : 'updownread',
  1121 + value : function updownread() {
  1122 + //var index = layer.load(1, {shade: [0.1,'#fff'] });//0.1透明度的白色背景
  1123 + // 1、获取所有班次数.
  1124 + var list = $_GlobalGraph.getDataArray();
  1125 + console.log(list.length);
  1126 + // 2、获取方向代码.
  1127 + var upDir = $_GlobalGraph.configuration.dataMap.dira[0],// 2.1 上行方向.
  1128 + downDir = $_GlobalGraph.configuration.dataMap.dira[1];// 2.2 下行方向.
  1129 + // 3、获取周转时间.
  1130 + var zzsj = $_GlobalGraph.configuration.stopAraay[0].zzsj;
  1131 + // 4、根据方向,归类班次.[上行班次;下行班次;其他班次(早晚例保、进出场、吃饭时间)].
  1132 + var tempa = BaseFun.getDirBc(list,$_GlobalGraph.configuration.dataMap.dira);
  1133 + console.log(tempa);
  1134 + //console.log(tempa.upArr.concat(tempa.downArr).length);
  1135 + // 5、均匀上行班次的发车间距.
  1136 + var sxbc = BaseFun.jhfcjx(tempa.upArr,upDir,zzsj,$_GlobalGraph.configuration.dataMap);
  1137 + console.log('getDirBc---- '+tempa.downArr.length);
  1138 + // 6、均匀下行班次的发车间距.
  1139 + var xxbc = BaseFun.jhfcjx(tempa.downArr,downDir,zzsj,$_GlobalGraph.configuration.dataMap);
  1140 + console.log('jhfcjx---'+ xxbc.length);
  1141 + //console.log(sxbc.concat(xxbc).length);
  1142 + // $_GlobalGraph.data(sxbc);
  1143 + // console.log($_GlobalGraph.configuration);
  1144 + var rsData = BaseFun.tztzsj01(sxbc.concat(xxbc),$_GlobalGraph.configuration.lpNoA,$_GlobalGraph.configuration.dataMap);
  1145 +
  1146 + var jar = BaseFun.tzsmbcsj(BaseFun.setbcsAndfcno(rsData),$_GlobalGraph.configuration.dataMap.smbcsjArr,
  1147 + $_GlobalGraph.configuration.dataMap.ccsjArr,
  1148 + $_GlobalGraph.configuration.dataMap.cclcArr,
  1149 + $_GlobalGraph.configuration.dataMap.qdzArr,
  1150 + $_GlobalGraph.configuration.stopAraay[0].lbsj);
  1151 +
  1152 + // 删除图形.
  1153 + $('svg.svg-chart').remove();
  1154 + // 重新创建图形.
  1155 + var graph_ = d3.select('#ganttSvg').relationshipGraph($_GlobalGraph.configuration);
  1156 + // 根据数据重新渲染图形.
  1157 + graph_.data(jar);
  1158 + $_GlobalGraph = graph_;
  1159 + // $_GlobalGraph.data(rsData);
  1160 + /*BaseFun.tztzsj(jar,$_GlobalGraph.configuration.lpNoA,$_GlobalGraph.configuration.dataMap);*/
  1161 + /*var resultJA = new Array();
  1162 + for(var m = 0 ; m < $_GlobalGraph.configuration.taskTypes.length; m++) {
  1163 + // 获取路牌编号.
  1164 + var lpNo_ = $_GlobalGraph.configuration.taskTypes[m].lpNo;
  1165 + // 定义路牌下的所有班次.
  1166 + var lpbc_ = new Array();
  1167 + // 遍历班次数.
  1168 + for(var j =0 ; j <jar.length; j++) {
  1169 + // 判断当期遍历的班次是否属于当前的路牌.
  1170 + if(jar[j].lpNo == lpNo_)
  1171 + lpbc_.push(jar[j]);
  1172 + }
  1173 + // 按照发车序号顺序排序.
  1174 + lpbc_.sort(function(a,b){return a.fcno-b.fcno});
  1175 + resultJA = resultJA.concat(BaseFun.addjclbbc(lpbc_,
  1176 + $_GlobalGraph.configuration.dataMap,$_GlobalGraph.configuration.stopAraay[0].lbsj,$_GlobalGraph.configuration.dataMap.map));
  1177 + }*/
  1178 +
  1179 + // BaseFun.tztzsj01(xxbc.concat(sxbc),$_GlobalGraph.configuration.lpNoA,$_GlobalGraph.configuration.dataMap)
  1180 + // $_GlobalGraph.data(BaseFun.tztzsj01(jar,$_GlobalGraph.configuration.lpNoA,$_GlobalGraph.configuration.dataMap));
  1181 + // 7、调整停站间隙.
  1182 + // var data = BaseFun.tztzsj(sxbc.concat(xxbc).concat(tempa.qt),$_GlobalGraph.configuration.lpNoA,$_GlobalGraph.configuration.dataMap);
  1183 + // 8、重新给定班次序号和发车序号.再确定首末班车时间.最后渲染数据.
  1184 + /*$_GlobalGraph.data(BaseFun.tzsmbcsj(BaseFun.setbcsAndfcno(data),
  1185 + $_GlobalGraph.configuration.dataMap.smbcsjArr,
  1186 + $_GlobalGraph.configuration.dataMap.ccsjArr,
  1187 + $_GlobalGraph.configuration.dataMap.cclcArr,
  1188 + $_GlobalGraph.configuration.dataMap.qdzArr,
  1189 + $_GlobalGraph.configuration.dataMap.lbsj));*/
  1190 + // 9、记录早操.并保存历史班次数据.
  1191 + // $_GlobalGraph.addHistory();
  1192 + //layer.close(index);
  1193 + }
  1194 + }, {
  1195 + /**
  1196 + * @description : (TODO) 调整班次函数.
  1197 + *
  1198 + * @status OK.
  1199 + * */
  1200 + key : 'aboutread',
  1201 + value : function aboutread() {
  1202 + // 弹出层mobal页面
  1203 + $.get('/pages/base/timesmodel/bctz.html', function(m){
  1204 + $(pjaxContainer).append(m);
  1205 + $('#tzbc_mobal').trigger('tzbcMobal.show',[$_GlobalGraph,getbczs($_GlobalGraph.getDataArray(),yAxisYArray),BaseFun]);
  1206 + });
  1207 + }
  1208 +
  1209 + }, {
  1210 + key : 'checkAdd',
  1211 + value : function checkAdd() {
  1212 + var xl = $_GlobalGraph.configuration.dataMap.map.lineName.split('_');
  1213 + if($_GlobalGraph.configuration.dataMap.map.istidc==1) {
  1214 + layer.confirm('系统已存在-->线路【'+
  1215 + $_GlobalGraph.configuration.dataMap.map.xlmc +'】-->时刻表【'+
  1216 + $_GlobalGraph.configuration.dataMap.map.skbmc +
  1217 + '】明细!是否覆盖!', {
  1218 + btn : [ '确认并提交', '取消' ]
  1219 + },function () {
  1220 + // 关闭所有提示弹出层.
  1221 + layer.closeAll();
  1222 + RelationshipGraph.submit($_GlobalGraph.configuration.dataMap.map.skbName,xl[0]);
  1223 + });
  1224 + }else {
  1225 + RelationshipGraph.submit($_GlobalGraph.configuration.dataMap.map.skbName,xl[0]);
  1226 + }
  1227 + }
  1228 +
  1229 + },{
  1230 + key : 'submit',
  1231 + value : function submit(skb,xl) {
  1232 + // 1、获取所有班次数据.
  1233 + var listA = $_GlobalGraph.getDataArray();
  1234 + // 2、弹出提示层.
  1235 + var index = layer.load(1, {
  1236 + shade: [0.1,'#fff'] // 0.1透明度的白色背景
  1237 + });
  1238 + // 3、post请求保存数据.
  1239 + $post('/tidc/skbDetailMxSave',{'d':JSON.stringify(listA), 'xl':xl, 'skb':skb},function(result) {
  1240 + // 3.1、关闭弹出层.
  1241 + layer.close(index);
  1242 + if(result){
  1243 + if(result.status=='SUCCESS') {
  1244 + layer.msg('保存成功...');// 弹出添加成功提示消息
  1245 + } else if(result.status=='ERROR') {
  1246 + layer.msg('保存失败...');// 弹出添加失败提示消息
  1247 + }
  1248 + }
  1249 + loadPage('index.html');// 返回index.html页面
  1250 + });
  1251 + }
  1252 + }, {
  1253 + /**
  1254 + * @description : (TODO) 撤销函数.
  1255 + *
  1256 + * @status OK.
  1257 + * */
  1258 + key : 'cancel',
  1259 + value : function cancel() {
  1260 + // 关闭弹出层.
  1261 + layer.closeAll();
  1262 + // 判断当对图形操作的步骤.
  1263 + if($_keyIndex==1) {
  1264 + layer.msg('已经是撤回到操作记录的【第一步】了!');
  1265 + return;
  1266 + }
  1267 + // 标记操作下标后退.
  1268 + $_keyIndex--;
  1269 + // 删除图形.
  1270 + $('svg.svg-chart').remove();
  1271 + // 获取撤销到当前操作下标的数据.
  1272 + var _obj = historyArray[$_keyIndex-1];
  1273 + // 创建图形对象.
  1274 + var graph_ = d3.select('#ganttSvg').relationshipGraph(JSON.parse(_obj.granph));
  1275 + // 根据数据重新渲染图形.
  1276 + graph_.data(JSON.parse(_obj.data));
  1277 + // 重新赋值图形对象.
  1278 + $_GlobalGraph = graph_;
  1279 + // 重新赋值图形对象.
  1280 + layer.msg('您已成功从【第 '+ ($_keyIndex+1) +'】撤销到【第 ' + ($_keyIndex) + '步】!');
  1281 + },
  1282 + }, {
  1283 + /**
  1284 + * @description : (TODO) 恢复函数.
  1285 + *
  1286 + * @status OK.
  1287 + * */
  1288 + key : 'regain',
  1289 + value : function regain() {
  1290 + // 关闭弹出层.
  1291 + layer.closeAll();
  1292 + // 判断当前操作是否恢复到最后一步的操纵.
  1293 + if($_keyIndex==historyArray.length) {
  1294 + layer.msg('已经是恢复到操作记录的【最后一步】了!');
  1295 + return;
  1296 + }
  1297 + // 标记操作下标前进.
  1298 + $_keyIndex++;
  1299 + // 删除图形.
  1300 + $('svg.svg-chart').remove();
  1301 + // 获取撤销到当前操作下标的数据.
  1302 + var _obj = historyArray[$_keyIndex-1];
  1303 + // 创建图形对象.
  1304 + var graph_ = d3.select('#ganttSvg').relationshipGraph(JSON.parse(_obj.granph));
  1305 + // 根据数据重新渲染图形.
  1306 + graph_.data(JSON.parse(_obj.data));
  1307 + // 重新赋值图形对象.
  1308 + $_GlobalGraph = graph_;
  1309 + // 弹出提示.
  1310 + layer.msg('您已成功从【第 '+ ($_keyIndex-1) +'】恢复到【第 ' + ($_keyIndex) + '步】!');
  1311 + },
  1312 + }, {
  1313 + /**
  1314 + * @description : (TODO) 获取底层Rect元素Id属性值.
  1315 + *
  1316 + * @param [obj--当前班次对象属性值]
  1317 + *
  1318 + * @return 返回一个底层Rect元素Id属性值.
  1319 + *
  1320 + * @status OK.
  1321 + * */
  1322 + key : 'setIdValue',
  1323 + value : function setIdValue(obj) {
  1324 + // 设置id属性值. 由一个 常量字符串 + 班次数 + 常量字符串 + 发车序号 + 常量字符 + 对应的y轴值.
  1325 + return 'shift-rect-' + obj.bcs + '_' + obj.fcno + '_' + $_GlobalGraph.configuration.y(obj.parent);
  1326 + }
  1327 + }, {
  1328 + /**
  1329 + * @description : (TODO) 获取X坐标属性值.
  1330 + *
  1331 + * @param [obj--当前班次对象属性值]
  1332 + *
  1333 + * @return 返回一个X坐标属性值.
  1334 + *
  1335 + * @status OK.
  1336 + * */
  1337 + key : 'setXValue',
  1338 + value : function setXValue(obj) {
  1339 + // 设置x坐标值.
  1340 + var hourMinue = obj.fcsj.split(":");
  1341 + return (parseInt(hourMinue[0])-$_GlobalGraph.configuration.dxHours )*60*$_GlobalGraph.configuration.multiple +
  1342 + parseInt(hourMinue[1])*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX;
  1343 + }
  1344 + }, {
  1345 + /**
  1346 + * @description : (TODO) 获取Y坐标属性值.
  1347 + *
  1348 + * @param [obj--当前班次对象属性值]
  1349 + *
  1350 + * @return 返回一个Y坐标属性值.
  1351 + *
  1352 + * @status OK.
  1353 + * */
  1354 + key : 'setYValue',
  1355 + value : function setYValue(obj) {
  1356 + return $_GlobalGraph.configuration.y(obj.parent) + $_GlobalGraph.configuration.offsetY;
  1357 + }
  1358 + }, {
  1359 + /**
  1360 + * @description : (TODO) 获取Rect元素class属性值.
  1361 + *
  1362 + * @param [obj--当前班次对象属性值]
  1363 + *
  1364 + * @return 返回一个Rect元素class属性值.
  1365 + *
  1366 + * @status OK.
  1367 + * */
  1368 + key : 'setRectClassV',
  1369 + value : function setRectClassV(obj) {
  1370 + return obj.xlDir+ " data";
  1371 + }
  1372 + }, {
  1373 + /**
  1374 + * @description : (TODO) 获取Rect元素width属性值.
  1375 + *
  1376 + * @param [obj--当前班次对象属性值]
  1377 + *
  1378 + * @return 返回一个Rect元素width属性值.
  1379 + *
  1380 + * @status OK.
  1381 + * */
  1382 + key : 'setRectWidthV',
  1383 + value : function setRectWidthV(obj) {
  1384 + return obj.bcsj * $_GlobalGraph.configuration.multiple;
  1385 + }
  1386 + }, {
  1387 + /**
  1388 + * @description : (TODO) 获取Rect元素高度属性值.
  1389 + *
  1390 + * @param [obj--当前班次对象属性值]
  1391 + *
  1392 + * @return 返回一个Rect元素高度属性值.
  1393 + *
  1394 + * @status OK.
  1395 + * */
  1396 + key : 'setRectHeight',
  1397 + value : function setRectHeight(obj) {
  1398 + return $_GlobalGraph.configuration.y.rangeBand() + 2;
  1399 + }
  1400 + }, {
  1401 + /**
  1402 + * @description : (TODO) 获取底层rect父元素ID属性值.
  1403 + *
  1404 + * @param [obj--当前班次对象属性值]
  1405 + *
  1406 + * @return 返回一个底层rect父元素ID属性值.
  1407 + *
  1408 + * @status OK.
  1409 + * */
  1410 + key : 'setRectParenNodeIdV',
  1411 + value : function setRectParenNodeIdV(obj) {
  1412 + return 'parent_' + $_GlobalGraph.configuration.y(obj.parent) + '_' + obj.bcs + "_node_" + obj.fcno;
  1413 + }
  1414 + }, {
  1415 + /**
  1416 + * @description : (TODO) 获取下一个底层rect元素ID值.
  1417 + *
  1418 + * @param [obj--当前班次对象属性值]
  1419 + *
  1420 + * @return 返回一个下一个底层rect元素ID值.
  1421 + *
  1422 + * @status OK.
  1423 + * */
  1424 + key : 'setNextNodeIdV',
  1425 + value : function setNextNodeIdV(obj) {
  1426 + return "shift-rect-" + (obj.bcs+1) + '_' + (obj.fcno+1) + '_' + $_GlobalGraph.configuration.y(obj.parent);
  1427 + }
  1428 + }, {
  1429 + /**
  1430 + * @description : (TODO) 获取上一个底层rect元素ID值.
  1431 + *
  1432 + * @param [obj--当前班次对象属性值]
  1433 + *
  1434 + * @return 返回一个上一个底层rect元素ID值.
  1435 + *
  1436 + * @status OK.
  1437 + * */
  1438 + key : 'setLastNodeIdV',
  1439 + value : function setLastNodeIdV(obj) {
  1440 + return "shift-rect-" + (obj.bcs-1) + '_' + (obj.fcno-1)+ '_' + $_GlobalGraph.configuration.y(obj.parent);
  1441 + }
  1442 + }, {
  1443 + /**
  1444 + * @description : (TODO) 获取元素类型.
  1445 + *
  1446 + * @param [obj--当前班次对象属性值]
  1447 + *
  1448 + * @return 返回一个元素类型.
  1449 + *
  1450 + * @status OK.
  1451 + * */
  1452 + key : 'setNodeType',
  1453 + value : function setNodeType(type) {
  1454 + return type;
  1455 + }
  1456 + }, {
  1457 + /**
  1458 + * @description : (TODO) 获取text01元素ID属性值.
  1459 + *
  1460 + * @param [obj--当前班次对象属性值]
  1461 + *
  1462 + * @return 返回一个text01元素ID属性值.
  1463 + *
  1464 + * @status OK.
  1465 + * */
  1466 + key : 'setText01IdV',
  1467 + value : function setText01IdV(obj) {
  1468 + return "shift-rect-text01-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1469 + }
  1470 + }, {
  1471 + /**
  1472 + * @description : (TODO) 获取text元素dx属性值.
  1473 + *
  1474 + * @param [obj--当前班次对象属性值]
  1475 + *
  1476 + * @return 返回一个text元素dx属性值.
  1477 + *
  1478 + * @status OK.
  1479 + * */
  1480 + key : 'setTextDxV',
  1481 + value : function setTextDxV(dx) {
  1482 + return dx;
  1483 + }
  1484 + }, {
  1485 + /**
  1486 + * @description : (TODO) 获取text元素dy属性值.
  1487 + *
  1488 + * @param [obj--当前班次对象属性值]
  1489 + *
  1490 + * @return 返回一个text元素dy属性值.
  1491 + *
  1492 + * @status OK.
  1493 + * */
  1494 + key : 'setTextDyV',
  1495 + value : function setTextDyV(dy) {
  1496 + return dy;
  1497 + }
  1498 + }, {
  1499 + /**
  1500 + * @description : (TODO) 获取text元素class属性值.
  1501 + *
  1502 + * @param [obj--当前班次对象属性值]
  1503 + *
  1504 + * @return 返回一个text元素class属性值.
  1505 + *
  1506 + * @status OK.
  1507 + * */
  1508 + key : 'setTextClassV',
  1509 + value : function setTextClassV(obj) {
  1510 + return obj.xlDir+ "-text";
  1511 + }
  1512 + }, {
  1513 + /**
  1514 + * @description : (TODO) 获取text01元素text文本.
  1515 + *
  1516 + * @param [obj--当前班次对象属性值]
  1517 + *
  1518 + * @return 返回一个text01元素text文本.
  1519 + *
  1520 + * @status OK.
  1521 + * */
  1522 + key : 'setText01text',
  1523 + value :function setText01text(obj) {
  1524 + var text = '';
  1525 + // 判断.如果班次时间大于〇 ,并且当前班次类型是 (正常班次、区间班次、直放班次、放站班次)其中的一种.则展示.这里的判断班次时间是为了隐藏那些班次时间为零的班次.
  1526 + if(obj.bcsj > 0 && (obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.normal ||
  1527 + obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.region ||
  1528 + obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.major ||
  1529 + obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.venting)) {
  1530 + var nowDate = new Date($_GlobalGraph.configuration.timeDomainStart);
  1531 + var hourMinuArray = obj.fcsj.split(":");
  1532 + nowDate.setHours(parseInt(hourMinuArray[0]));
  1533 + nowDate.setMinutes(parseInt(hourMinuArray[1])+obj.bcsj);
  1534 + text = obj.fcsj + '~' + (nowDate.getHours()<10? "0" + nowDate.getHours():nowDate.getHours()) +
  1535 + ":" +
  1536 + (nowDate.getMinutes()<10?"0"+nowDate.getMinutes():nowDate.getMinutes());
  1537 + }
  1538 + return text;
  1539 + }
  1540 + }, {
  1541 + /**
  1542 + * @description : (TODO) 获取circle圆元素ID值.
  1543 + *
  1544 + * @param [obj--当前班次对象属性值]
  1545 + *
  1546 + * @return 返回一个circle圆元素ID值.
  1547 + *
  1548 + * @status OK.
  1549 + * */
  1550 + key : 'setCircleIdV',
  1551 + value : function setCircleIdV(obj) {
  1552 + return "shift-rect-circle-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1553 + }
  1554 + }, {
  1555 + /**
  1556 + * @description : (TODO) 获取circle圆元素cx值.
  1557 + *
  1558 + * @param [obj--当前班次对象属性值]
  1559 + *
  1560 + * @return 返回一个circle圆元素cx值.
  1561 + *
  1562 + * @status OK.
  1563 + * */
  1564 + key : 'setCirclecxV',
  1565 + value : function setCirclecxV(obj) {
  1566 + var hourMinue = obj.fcsj.split(":");
  1567 + return (parseInt(hourMinue[0])-$_GlobalGraph.configuration.dxHours )*60*$_GlobalGraph.configuration.multiple +
  1568 + parseInt(hourMinue[1])*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX +
  1569 + obj.bcsj * $_GlobalGraph.configuration.multiple - 12;
  1570 + }
  1571 + }, {
  1572 + /**
  1573 + * @description : (TODO) 获取circle圆元素cy值.
  1574 + *
  1575 + * @param [obj--当前班次对象属性值]
  1576 + *
  1577 + * @return 返回一个circle圆元素cy值.
  1578 + *
  1579 + * @status OK.
  1580 + * */
  1581 + key : 'setCirclecyV',
  1582 + value : function setCirclecyV(obj) {
  1583 + return $_GlobalGraph.configuration.y(obj.parent) + $_GlobalGraph.configuration.offsetY + 12;
  1584 + }
  1585 + }, {
  1586 + /**
  1587 + * @description : (TODO) 获取circle圆元素r半径值.
  1588 + *
  1589 + * @param [obj--当前班次对象属性值]
  1590 + *
  1591 + * @return 返回一个circle圆元素r半径值.
  1592 + *
  1593 + * @status OK.
  1594 + * */
  1595 + key : 'setCircleRV',
  1596 + value : function setCircleRV(obj) {
  1597 + // 设置圆的半径.判断.如果班次时间大于〇则设置圆的半径常量8. 这里的判断是为了隐藏那些班次时间为零的班次.
  1598 + if(obj.bcsj>0)
  1599 + return 8 ;
  1600 + else
  1601 + return 0;
  1602 + }
  1603 + }, {
  1604 + /**
  1605 + * @description : (TODO) 获取circle圆元素class值.
  1606 + *
  1607 + * @param [obj--当前班次对象属性值]
  1608 + *
  1609 + * @return 返回一个circle圆元素class值.
  1610 + *
  1611 + * @status OK.
  1612 + * */
  1613 + key : 'setCircleClass',
  1614 + value : function setCircleClass(obj) {
  1615 + return obj.xlDir+ "-circle";
  1616 + }
  1617 + }, {
  1618 + /**
  1619 + * @description : (TODO) 获取text02元素ID属性值.
  1620 + *
  1621 + * @param [obj--当前班次对象属性值]
  1622 + *
  1623 + * @return 返回一个text02元素ID属性值.
  1624 + *
  1625 + * @status OK.
  1626 + * */
  1627 + key : 'setText02IdV',
  1628 + value : function setText02IdV(obj) {
  1629 + return "shift-rect-text02-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1630 + }
  1631 + }, {
  1632 + /**
  1633 + * @description : (TODO) 获取text02元素text文本值.
  1634 + *
  1635 + * @param [obj--当前班次对象属性值]
  1636 + *
  1637 + * @return 返回一个text02元素text文本值.
  1638 + *
  1639 + * @status OK.
  1640 + * */
  1641 + key : 'setText02text',
  1642 + value : function setText02text(obj) {
  1643 + var text = '';
  1644 + if(obj.bcsj>0) {
  1645 + if(obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.bd ||
  1646 + obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.out||
  1647 + obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.in_||
  1648 + obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.lc)
  1649 + text = obj.fcsj;
  1650 + else if(obj.bcType=='cf')
  1651 + text = '吃:' + obj.bcsj;
  1652 + else
  1653 + text = "行:" + obj.bcsj;
  1654 + }
  1655 + return text;
  1656 + }
  1657 + }, {
  1658 + /**
  1659 + * @description : (TODO) 获取text03元素ID属性值.
  1660 + *
  1661 + * @param [obj--当前班次对象属性值]
  1662 + *
  1663 + * @return 返回一个text03元素ID属性值.
  1664 + *
  1665 + * @status OK.
  1666 + * */
  1667 + key : 'setText03IdV',
  1668 + value : function setText03IdV(obj) {
  1669 + return "shift-rect-text03-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1670 + }
  1671 + }, {
  1672 + /**
  1673 + * @description : (TODO) 获取text03元素text文本值.
  1674 + *
  1675 + * @param [obj--当前班次对象属性值]
  1676 + *
  1677 + * @return 返回一个text03元素text文本值.
  1678 + *
  1679 + * @status OK.
  1680 + * */
  1681 + key : 'setText03text',
  1682 + value : function setText03text(obj) {
  1683 + var text = '';
  1684 + if(obj.bcsj>0) {
  1685 + if(obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.bd ||
  1686 + obj.bcType==$_GlobalGraph.configuration.dataMap.bcTypeArr.lc)
  1687 + text = "保:" + obj.bcsj;
  1688 + else if(obj.bcType=='out' || obj.bcType=='in')
  1689 + text = "行:" + obj.bcsj;
  1690 + else
  1691 + text = "停:" + obj.STOPTIME;
  1692 + }
  1693 + return text;
  1694 + }
  1695 + }, {
  1696 + /**
  1697 + * @description : (TODO) 获取text04元素ID属性值.
  1698 + *
  1699 + * @param [obj--当前班次对象属性值]
  1700 + *
  1701 + * @return 返回一个text04元素ID属性值.
  1702 + *
  1703 + * @status OK.
  1704 + * */
  1705 + key : 'setText04IdV',
  1706 + value : function (obj) {
  1707 + return "shift-rect-text04-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1708 + }
  1709 + }, {
  1710 + /**
  1711 + * @description : (TODO) 获取text04元素x属性值.
  1712 + *
  1713 + * @param [obj--当前班次对象属性值]
  1714 + *
  1715 + * @return 返回一个text04元素x属性值.
  1716 + *
  1717 + * @status OK.
  1718 + * */
  1719 + key : 'setText04XV',
  1720 + value : function (obj) {
  1721 + var hourMinue = obj.fcsj.split(":");
  1722 + return (parseInt(hourMinue[0])-$_GlobalGraph.configuration.dxHours )*60*$_GlobalGraph.configuration.multiple +
  1723 + parseInt(hourMinue[1])*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX +
  1724 + obj.bcsj * $_GlobalGraph.configuration.multiple - 18;
  1725 + }
  1726 + }, {
  1727 + /**
  1728 + * @description : (TODO) 获取text04元素y属性值.
  1729 + *
  1730 + * @param [obj--当前班次对象属性值]
  1731 + *
  1732 + * @return 返回一个text04元素y属性值.
  1733 + *
  1734 + * @status OK.
  1735 + * */
  1736 + key : 'setText04YV',
  1737 + value : function setText04YV(obj) {
  1738 + return $_GlobalGraph.configuration.y(obj.parent) + $_GlobalGraph.configuration.offsetY + 16;
  1739 + }
  1740 + }, {
  1741 + /**
  1742 + * @description : (TODO) 获取text04元素class属性值.
  1743 + *
  1744 + * @param [obj--当前班次对象属性值]
  1745 + *
  1746 + * @return 返回一个text04元素class属性值.
  1747 + *
  1748 + * @status OK.
  1749 + * */
  1750 + key : 'setText04ClassV',
  1751 + value : function setText04ClassV(obj) {
  1752 + return obj.xlDir+ "-circle-text";
  1753 + }
  1754 + }, {
  1755 + /**
  1756 + * @description : (TODO) 获取text04元素text文本值.
  1757 + *
  1758 + * @param [obj--当前班次对象属性值]
  1759 + *
  1760 + * @return 返回一个text04元素text文本值.
  1761 + *
  1762 + * @status OK.
  1763 + * */
  1764 + key : 'setText04text',
  1765 + value : function(obj) {
  1766 + if(obj.bcsj>0) {
  1767 + if(obj.isfb == 1){
  1768 + return '分';
  1769 + }else {
  1770 + if(obj.bcType=='normal')
  1771 + return '正';
  1772 + else if(obj.bcType=='region')
  1773 + return '区';
  1774 + else if(obj.bcType=='major')
  1775 + return '站';
  1776 + else if(obj.bcType=='venting')
  1777 + return '直';
  1778 + else if(obj.bcType=='fb')
  1779 + return '分';
  1780 + else if(obj.bcType=='in')
  1781 + return '进';
  1782 + else if(obj.bcType=='lc')
  1783 + return '离';
  1784 + else if(obj.bcType=='out')
  1785 + return '出';
  1786 + else if(obj.bcType=='bd')
  1787 + return '到';
  1788 + else if(obj.bcType=='cf')
  1789 + return '吃';
  1790 + }
  1791 + }
  1792 + }
  1793 + }, {
  1794 + /**
  1795 + * @description : (TODO) 获取底层Rect元素的覆盖层rect元素Id属性值.
  1796 + *
  1797 + * @param [obj--当前班次对象属性值]
  1798 + *
  1799 + * @return 返回一个底层Rect元素的覆盖层rect元素Id属性值.
  1800 + *
  1801 + * @status OK.
  1802 + * */
  1803 + key : 'setCoverRectIdV',
  1804 + value : function setCoverRectIdV(obj) {
  1805 + return "shift-rect-cover-" + obj.bcs + '_' + obj.fcno + $_GlobalGraph.configuration.y(obj.parent);
  1806 + }
  1807 + }, {
  1808 + /**
  1809 + * @description : (TODO) 获取底层Rect元素的覆盖层rect元素class属性值.
  1810 + *
  1811 + * @param [obj--当前班次对象属性值]
  1812 + *
  1813 + * @return 返回一个底层Rect元素的覆盖层rect元素class属性值.
  1814 + *
  1815 + * @status OK.
  1816 + * */
  1817 + key : 'setCoverRectClassV',
  1818 + value : function setCoverRectClassV(className) {
  1819 + return className;
  1820 + }
  1821 + }, {
  1822 + /**
  1823 + * @description : (TODO) 获取底层Rect元素的覆盖层rect元素paren-node属性值.
  1824 + *
  1825 + * @param [obj--当前班次对象属性值]
  1826 + *
  1827 + * @return 返回一个底层Rect元素的覆盖层rect元素paren-node属性值.
  1828 + *
  1829 + * @status OK.
  1830 + * */
  1831 + key : 'setCoverRectParentV',
  1832 + value : function setCoverRectParentV(obj) {
  1833 + return "shift-rect-" + obj.bcs + '_' + obj.fcno + '_' + $_GlobalGraph.configuration.y(obj.parent) + '-cover';
  1834 + }
  1835 + }, {
  1836 + /**
  1837 + * @description : (TODO) 获取底层Rect元素的覆盖层rect元素next-node属性值.
  1838 + *
  1839 + * @param [obj--当前班次对象属性值]
  1840 + *
  1841 + * @return 返回一个底层Rect元素的覆盖层rect元素next-node属性值.
  1842 + *
  1843 + * @status OK.
  1844 + * */
  1845 + key : 'setCoverRectLastIdV',
  1846 + value : function setCoverRectLastIdV(obj) {
  1847 + return "shift-rect-cover-" + obj.bcs + '_' + (obj.fcno+1) + $_GlobalGraph.configuration.y(obj.parent);
  1848 + }
  1849 + }, {
  1850 + key : 'mouseUpEvent',
  1851 + value : function mouseUpEvent(flag) {
  1852 + // 5.1.2、 获取选择框的最小X、最小Y、最大X、最大Y.
  1853 + var caseRect = RelationshipGraph.getCaseRectAttribute(d3.selectAll('rect.case_rect'));
  1854 + // 5.1.3、获取所有的class为data的rect元素(班次)对象.
  1855 + var rectNodes = $('rect.data');
  1856 + // 5.1.4、定义被选中的上、下行元素(班次)元素对象x、y、parentId值数组 .
  1857 + var arrayUpX = new Array(),arrayUpY = new Array(),arrayDownX = new Array(),arrayDownY = new Array(),parA = new Array();
  1858 + // 5.1.5、遍历所有的元素对象. 获取出被选中的元素(班次)对象.
  1859 + for(var n = 0;n<rectNodes.length;n++) {
  1860 + // 5.1.5.1、定义当前元素最小X
  1861 + var downStartX = parseInt($(rectNodes[n]).attr('x')),
  1862 + downEndX = downStartX + parseInt($(rectNodes[n]).attr('width'));// 5.1.5.2、定义当前元素最大X
  1863 + // 5.1.5.3、定义当前元素最小Y
  1864 + var downStartY = parseInt($(rectNodes[n]).attr('y')),
  1865 + downEndY = downStartY + parseInt($(rectNodes[n]).attr('height'));// 5.1.5.4、定义当前元素最大Y
  1866 + /**
  1867 + * 5.1.5.4、 判断当前班次是否被框选在选中框内
  1868 + *
  1869 + * ✿ 图形理解判断条件 最大框代表选择框,框中的小方块代表选中的班次.
  1870 + *
  1871 + * minX----------------------------- maxY
  1872 + * │ │
  1873 + * │ □ □ □ □ □ □ □ □ □ │
  1874 + * │ │
  1875 + * minY----------------------------- maxX
  1876 + *
  1877 + * 如果当前小方块的最大X > 选择框的minX 并且 当前小方块的最小X < 选择框的maxX
  1878 + * 并且当前小方块的最大Y > 选择框的minY 并且 当前小方块的最小Y < 选择框的maxY
  1879 + * 则代表当前小方块在选择框内.
  1880 + **/
  1881 + if((downEndX > caseRect.caseRectMinX && downStartX < caseRect.caseRectMaxX) &&
  1882 + (downEndY > caseRect.caseRectMinY && downStartY < caseRect.caseRectMaxY)){
  1883 + var node = d3.select(rectNodes[n]);
  1884 + // 5.1.5.4.1、 获取当前元素的data数据.
  1885 + var d = node.data()[0];
  1886 + // 除去首末班车班次、早晚例保、进出场班次、吃饭班次.
  1887 + if(RelationshipGraph.issmbc(d.fcsj) || d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd ||
  1888 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||
  1889 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.cf ||
  1890 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_ ||
  1891 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)
  1892 + continue;
  1893 + if(parA.indexOf(d.lpNo)<0)
  1894 + parA.push(d.lpNo);
  1895 + // 5.1.5.4.4、 把当前选择的最小x添加到arrayUpX数组中.
  1896 + arrayUpX.push(downStartX);
  1897 + // 5.1.5.4.5、 把当前选择的最小y添加到arrayUpY数组中.
  1898 + arrayUpY.push(downStartY);
  1899 + // 5.1.5.4.6、 把当前选择的最大x添加到arrayDownX数组中.
  1900 + arrayDownX.push(downEndX);
  1901 + // 5.1.5.4.7、 把当前选择的最大y添加到arrayDownY数组中.
  1902 + arrayDownY.push(downEndY);
  1903 + // 5.1.5.4.8、 把当前选择的元素的parent-node元素节点属性值添加到gClassNameArray中.
  1904 + gClassNameArray.push(node.attr('parent-node'));
  1905 + }
  1906 + }
  1907 + // 5.1.6、如果没有选择到元素(班次).给出提示,并执行选择框关闭事件.
  1908 + if(gClassNameArray.length==0) {
  1909 + // 5.1.6.1、弹出提示框.
  1910 + layer.msg('您没有框选中班次,请重新框选...');
  1911 + // 5.1.6.2、清除
  1912 + RelationshipGraph.gClose();
  1913 + // 5.1.6.3、结束事件.
  1914 + return false;
  1915 + }
  1916 + gClassNameArray.parA = parA;
  1917 + // 5.1.7、遍历 标记被选择的元素parent-node属性节点值的元素 添加class caseactive选中标记.
  1918 + for(var c =0;c<gClassNameArray.length;c++) {
  1919 + if(typeof(gClassNameArray[c])=='string') {
  1920 + var parentNodeCName = gClassNameArray[c], nodes = d3.selectAll('rect[parent-node='+ parentNodeCName +']')[0];
  1921 + for(var l =0;l<nodes.length;l++) {
  1922 + d3.select(nodes[l]).classed({'caseactive':true});
  1923 + var childrenNodesCName = $(nodes[l]).attr('id'),childrenNodes = $('text[parent-node='+ childrenNodesCName +']');
  1924 + d3.select('rect[parent-node='+ childrenNodesCName +'-cover]').classed({'caseactive':true});
  1925 + d3.select(d3.selectAll('circle[parent-node='+ childrenNodesCName +']')[0][0]).classed({'caseactive':true});
  1926 + for(var t = 0;t<childrenNodes.length;t++) {
  1927 + d3.select(childrenNodes[t]).classed({'caseactive':true});
  1928 + }
  1929 + }
  1930 + }
  1931 + }
  1932 + // 5.1.8、获取选择框元素对象.
  1933 + var d3CaseRectNode = d3.selectAll(".gantt-chart").selectAll('rect.case_rect');
  1934 + // 5.1.9、重新计算选择框的x、y、width、height属性值,并加上钢琴版动画效果.
  1935 + _animation(d3CaseRectNode).attr("x",function(d){
  1936 + return Math.min.apply(null, arrayUpX) -4;
  1937 + }).attr("y",function(d){
  1938 + return Math.min.apply(null, arrayUpY) -4;
  1939 + }).attr("width",function(d){
  1940 + return Math.max.apply(null, arrayDownX) - Math.min.apply(null, arrayUpX) + 8;
  1941 + }).attr("height",function(d){
  1942 + return Math.max.apply(null, arrayDownY) - Math.min.apply(null, arrayDownY) + parseInt(d3.select('rect[parent-node='+ gClassNameArray[0] +']').attr('height')) + 8;
  1943 + });
  1944 + // 5.1.9.10、延迟350毫秒绘制选择框上的关闭、拖动(左、右、中)按钮 .
  1945 + setTimeout(function(){
  1946 + RelationshipGraph._delayExecute();// 绘制选择框上的关闭、拖动(左、右、中)按钮.
  1947 + // 重新绘制g.shift下的选中元素.
  1948 + RelationshipGraph.restCaseNodes(document.querySelector("g.shift"),document.querySelectorAll("g.shift .caseactive"));
  1949 + // 重新绘制g.case_g下的选中元素.
  1950 + RelationshipGraph.restCaseNodes(document.querySelector("g.case_g"),document.querySelectorAll("g.case_g .caseactive"));
  1951 +
  1952 + },350);
  1953 + }
  1954 + }, {
  1955 + key : 'restCaseNodes',
  1956 + value : function(parends , nodes) {
  1957 + for(var n = 0 ; n<nodes.length;n++) {
  1958 + parends.removeChild(nodes[n]);
  1959 + parends.appendChild(nodes[n]);
  1960 + }
  1961 + }
  1962 + }, {
  1963 + key: 'noop',
  1964 + value: function noop() {}
  1965 + }, {
  1966 + key: 'isArray',
  1967 + value: function isArray(arr) {
  1968 + return Object.prototype.toString.call(arr) == '[object Array]';
  1969 + }
  1970 + }, {
  1971 + key : 'getCaseRectAttribute',
  1972 + value : function getCaseRectAttribute(node) {
  1973 + var caseRectMinX = parseInt(node.attr('x')),
  1974 + caseRectMinY = parseInt(node.attr('y'));
  1975 + var caseRectMaxX = caseRectMinX + parseInt(node.attr('width')),
  1976 + caseRectMaxY = caseRectMinY + parseInt(node.attr('height'));
  1977 + return {'caseRectMinX' : caseRectMinX, 'caseRectMinY': caseRectMinY, 'caseRectMaxX': caseRectMaxX,'caseRectMaxY':caseRectMaxY};
  1978 + }
  1979 + }, {
  1980 + /**
  1981 + * @description : (TODO) 绘制选择框上的关闭、拖动(左、右、中)按钮.
  1982 + *
  1983 + * @stauts : OK.
  1984 + *
  1985 + **/
  1986 + key : '_delayExecute',
  1987 + value : function _delayExecute() {
  1988 + // 1、获取选择框元素对象.
  1989 + var gCaseNode = d3.selectAll('g.case_g');
  1990 + // 2、获取选择框的最小X、最小Y、最大X、最大Y.
  1991 + var caseRect = RelationshipGraph.getCaseRectAttribute(d3.selectAll('rect.case_rect'));
  1992 + // 3、计算Y轴方向中间点的Y坐标.
  1993 + var Ds_yToe_d = Math.abs(caseRect.caseRectMaxY - caseRect.caseRectMinY)/2;
  1994 + // 4、计算X轴方向中间点的X坐标.
  1995 + var Ds_xToe_x = Math.abs(caseRect.caseRectMaxX - caseRect.caseRectMinX)/2;
  1996 + // 5、给选择框添加圆.这里画选择框关闭按钮
  1997 + gCaseNode.append('circle').classed({'c_close caseactive':true})
  1998 + .attr('cx', caseRect.caseRectMaxX+5).attr('cy', caseRect.caseRectMinY-5).attr('r', 8)
  1999 + .attr('group-id','c_close')
  2000 + .attr('parent-node','case_rectId');
  2001 + gCaseNode.append('circle').classed({'c_close_so caseactive':true})
  2002 + .attr('cx', caseRect.caseRectMaxX+5).attr('cy', caseRect.caseRectMinY-5).attr('r', 6)
  2003 + .attr('group-id','c_close')
  2004 + .attr('parent-node','case_rectId');
  2005 + gCaseNode.append('line').classed({'c_close_line_r caseactive':true})
  2006 + .attr('x1', caseRect.caseRectMaxX+2)
  2007 + .attr('y1', caseRect.caseRectMinY-8)
  2008 + .attr('x2', caseRect.caseRectMaxX+8)
  2009 + .attr('y2', caseRect.caseRectMinY-2)
  2010 + .attr('parent-node','case_rectId');
  2011 + gCaseNode.append('line').classed({'c_close_line_l caseactive':true})
  2012 + .attr('x1', caseRect.caseRectMaxX+2)
  2013 + .attr('y1', caseRect.caseRectMinY-2)
  2014 + .attr('x2', caseRect.caseRectMaxX+8)
  2015 + .attr('y2',caseRect.caseRectMinY-8)
  2016 + .attr('parent-node','case_rectId');
  2017 + gCaseNode.append('circle').classed({'c_close_cover caseactive':true})
  2018 + .attr('cx', caseRect.caseRectMaxX+5).attr('cy',caseRect.caseRectMinY-5).attr('r', 10)
  2019 + .attr('group-id','c_close')
  2020 + .attr('parent-node','case_rectId')
  2021 + .on('mouseover', function() {
  2022 + $(this).css("cursor","pointer");
  2023 + $("circle.c_close").css("opacity",1)
  2024 + $("line.c_close_line_r").css("opacity",1)
  2025 + $("line.c_close_line_l").css("opacity",1)
  2026 + }).on('mouseout',function() {
  2027 + $(this).css("cursor","default");
  2028 + $("circle.c_close").css("opacity",0.5)
  2029 + $("line.c_close_line_r").css("opacity",0.5)
  2030 + $("line.c_close_line_l").css("opacity",0.5)
  2031 + }).on('click', RelationshipGraph.gClose);
  2032 + // 6、给选择框添加圆.这里画左边拖拽点.
  2033 + gCaseNode.append('circle').classed({'test_r_left caseactive':true})
  2034 + .attr('cx', caseRect.caseRectMinX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 6)
  2035 + .attr('group-id','c_left')
  2036 + .attr('parent-node','case_rectId');
  2037 + gCaseNode.append('circle').classed({'test_r_left_so caseactive':true})
  2038 + .attr('cx', caseRect.caseRectMinX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 4)
  2039 + .attr('group-id','c_left')
  2040 + .attr('parent-node','case_rectId');
  2041 + gCaseNode.append('circle').classed({'test_r_left_solid caseactive':true})
  2042 + .attr('cx', caseRect.caseRectMinX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 2)
  2043 + .attr('group-id','c_left')
  2044 + .attr('parent-node','case_rectId');
  2045 + gCaseNode.append('circle').classed({'r_left_cover caseactive':true})
  2046 + .attr('cx', caseRect.caseRectMinX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 6)
  2047 + .attr('group-id','c_left')
  2048 + .attr('parent-node','case_rectId')
  2049 + .call(d3.behavior.drag()
  2050 + .on("dragstart",RelationshipGraph.dragLeftStart)
  2051 + .on("drag",RelationshipGraph.dragLeftRuing)
  2052 + .on("dragend",RelationshipGraph.dragLeftStop))
  2053 + .on('mouseover', function() {
  2054 + $(this).css("cursor","e-resize");
  2055 + }).on('mouseout',function() {
  2056 + $(this).css("cursor","default");
  2057 + });
  2058 + // 7、给选择框添加圆.这里画右边拖拽点.
  2059 + gCaseNode.append('circle').classed({'test_r_right caseactive':true})
  2060 + .attr('cx', caseRect.caseRectMaxX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 6)
  2061 + .attr('group-id','c_right')
  2062 + .attr('parent-node','case_rectId');
  2063 + gCaseNode.append('circle').classed({'test_r_right_so caseactive':true})
  2064 + .attr('cx', caseRect.caseRectMaxX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 4)
  2065 + .attr('group-id','c_right')
  2066 + .attr('parent-node','case_rectId');
  2067 + gCaseNode.append('circle').classed({'test_r_right_solid caseactive':true})
  2068 + .attr('cx', caseRect.caseRectMaxX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 2)
  2069 + .attr('group-id','c_right')
  2070 + .attr('parent-node','case_rectId');
  2071 + gCaseNode.append('circle').classed({'r_right_cover caseactive':true})
  2072 + .attr('cx', caseRect.caseRectMaxX).attr('cy', Ds_yToe_d + caseRect.caseRectMinY).attr('r', 6)
  2073 + .attr('group-id','c_right')
  2074 + .attr('parent-node','case_rectId')
  2075 + .call(d3.behavior.drag()
  2076 + .on("dragstart",RelationshipGraph.dragRightStart)
  2077 + .on("drag",RelationshipGraph.dragRightRuing)
  2078 + .on("dragend",RelationshipGraph.dragRightStop))
  2079 + .on('mouseover', function() {
  2080 + $(this).css("cursor","e-resize");
  2081 + }).on('mouseout',function() {
  2082 + $(this).css("cursor","default");
  2083 + });
  2084 + // 7、给选择框添加圆.这里画中心拖拽点.
  2085 + gCaseNode.append('circle').classed({'test_r_center caseactive':true})
  2086 + .attr('cx', Ds_xToe_x + caseRect.caseRectMinX).attr('cy', caseRect.caseRectMinY).attr('r', 8)
  2087 + .attr('group-id','c_center')
  2088 + .attr('parent-node','case_rectId');
  2089 + gCaseNode.append('circle').classed({'test_r_center_so caseactive':true})
  2090 + .attr('cx', Ds_xToe_x + caseRect.caseRectMinX).attr('cy', caseRect.caseRectMinY).attr('r', 6)
  2091 + .attr('group-id','c_center')
  2092 + .attr('parent-node','case_rectId');
  2093 + gCaseNode.append('circle').classed({'test_r_center_solid caseactive':true})
  2094 + .attr('cx', Ds_xToe_x + caseRect.caseRectMinX).attr('cy', caseRect.caseRectMinY).attr('r', 4)
  2095 + .attr('group-id','c_center')
  2096 + .attr('parent-node','case_rectId');
  2097 + gCaseNode.append('circle').classed({'r_center_cover caseactive':true})
  2098 + .attr('cx', Ds_xToe_x + caseRect.caseRectMinX).attr('cy', caseRect.caseRectMinY).attr('r', 8)
  2099 + .attr('group-id','c_center')
  2100 + .attr('parent-node','case_rectId')
  2101 + .call(d3.behavior.drag()
  2102 + .on("dragstart",RelationshipGraph.centerMoveSart)
  2103 + .on("drag",RelationshipGraph.centerMoveRuing)
  2104 + .on("dragend",RelationshipGraph.centerMoveStop))
  2105 + .on('mouseover', function() {
  2106 + $(this).css("cursor","move");
  2107 + }).on('mouseout',function() {
  2108 + $(this).css("cursor","default");
  2109 + });
  2110 + }
  2111 + }, {
  2112 + /**
  2113 + * @desription : (TODO) 选择框左边拖拽点沿X轴方向拖拽开始事件.
  2114 + *
  2115 + * @status : OK.
  2116 + **/
  2117 + key : 'dragLeftStart',
  2118 + value : function dragLeftStart(d,i) {
  2119 + // 1、拖拽开始鼠标当前坐标X点.
  2120 + drwaLeftX = d3.mouse(this)[0];
  2121 + }
  2122 + }, {
  2123 + /**
  2124 + * @desription : (TODO) 选择框左边拖拽点沿X轴方向拖拽中事件.
  2125 + *
  2126 + * @status : OK.
  2127 + **/
  2128 + key : 'dragLeftRuing',
  2129 + value : function dragLeftRuing(d,i) {
  2130 + // 1、开启标记鼠标从选择框左边点按下沿X方向进行拖拽状态.
  2131 + drwaLeftXStatus = true;
  2132 + // 2、记录鼠标当前X坐标
  2133 + var RDX = d3.mouse(this)[0];
  2134 + // 3、计算沿X轴方向偏移量. 当前坐标X - 初始起点坐标X.
  2135 + var dx = RDX - drwaLeftX;
  2136 + // 4、更新初始起点坐标X.
  2137 + drwaLeftX = RDX;
  2138 + RelationshipGraph.leftAndRightDraw(dx,'left');
  2139 + }
  2140 + }, {
  2141 + /**
  2142 + * @description : (TODO) 选择框左边拖拽点沿X轴方向停止拖拽事件.
  2143 + *
  2144 + * @status OK.
  2145 + * */
  2146 + key : 'dragLeftStop',
  2147 + value : function dragLeftStop(d,i) {
  2148 + if(drwaLeftXStatus) {
  2149 + // 1、关闭标记鼠标从选择框左边点按下沿X方向进行拖拽状态.
  2150 + drwaLeftXStatus = false;
  2151 + RelationshipGraph.leftAndRightStop('left');
  2152 + }
  2153 + }
  2154 +
  2155 + }, {
  2156 + /**
  2157 + * @description : (TODO) 选择框右边拖拽点沿X轴方向拖拽开始事件.
  2158 + *
  2159 + * @status OK.
  2160 + * */
  2161 + key : 'dragRightStart',
  2162 + value : function dragRightStart(d,i) {
  2163 + // 1、拖拽开始鼠标当前坐标X点.
  2164 + drwaRightX = d3.mouse(this)[0];
  2165 + }
  2166 +
  2167 + }, {
  2168 + /**
  2169 + * @description : (TODO) 选择框右边拖拽点沿X轴方向拖拽中事件.
  2170 + *
  2171 + * @status OK.
  2172 + * */
  2173 + key : 'dragRightRuing',
  2174 + value : function dragRightRuing(d,i) {
  2175 + // 1、开启标记鼠标从选择框右边点按下沿X方向进行拖拽状态.
  2176 + drwaRightXStatus = true;
  2177 + // 2、记录鼠标当前X坐标
  2178 + var RDX = d3.mouse(this)[0];
  2179 + // 3、计算沿X轴方向偏移量. 当前坐标X - 初始起点坐标X.
  2180 + var dx = RDX - drwaRightX;
  2181 + // 4、更新初始起点坐标X.
  2182 + drwaRightX = RDX;
  2183 + RelationshipGraph.leftAndRightDraw(dx,'right');
  2184 + }
  2185 +
  2186 + }, {
  2187 + /**
  2188 + * @description : (TODO) 选择框右边拖拽点沿X轴方向停止拖拽事件.
  2189 + *
  2190 + * @status OK.
  2191 + * */
  2192 + key : 'dragRightStop',
  2193 + value : function dragRightStop(d,i) {
  2194 + if(drwaRightXStatus) {
  2195 + drwaRightXStatus = false;
  2196 + RelationshipGraph.leftAndRightStop('right');
  2197 + }
  2198 + }
  2199 +
  2200 + }, {
  2201 + key : 'leftAndRightDraw',
  2202 + value : function leftAndRightDraw(dx,drawDir) {
  2203 + // 5、获取选中元素对象
  2204 + var rectTypeA = RelationshipGraph.getRectElementsNodes(d3.selectAll('.caseactive')[0],drawDir);
  2205 + RelationshipGraph.updCaseRect(RelationshipGraph.getCaseNodesAttr(rectTypeA.caseRect),dx,drawDir);
  2206 + var shiftRectA = rectTypeA.shiftRect,len = shiftRectA.length;
  2207 + var shiftRectA = rectTypeA.shiftRect,len = shiftRectA.length;
  2208 + for(var s = 0 ; s < len ; s++) {
  2209 + var rectNodesAttr = RelationshipGraph.getContextNodeAndData(d3.select(shiftRectA[s]).attr('id'));
  2210 + rectNodesAttr.qdbcNode.attr('x',parseInt(rectNodesAttr.qdbcNode.attr('x'))+(dx*shiftRectA[s].fcnodx));
  2211 + var tm = RelationshipGraph.zbTosj(parseInt(rectNodesAttr.qdbcNode.attr('x'))-$_GlobalGraph.configuration.offsetX);
  2212 + rectNodesAttr.dqbcData.fcsj = tm.hour + ':' + tm.min;
  2213 + var nowDate = BaseFun.getDateTime(rectNodesAttr.dqbcData.fcsj);
  2214 + nowDate.setMinutes(parseInt(tm.min)+rectNodesAttr.dqbcData.bcsj);
  2215 + rectNodesAttr.dqbcData.ARRIVALTIME = BaseFun.getTimeStr(nowDate);
  2216 + rectNodesAttr.dqbcData.STOPTIME = parseInt((BaseFun.getDateTime(rectNodesAttr.nextData.fcsj)-
  2217 + BaseFun.getDateTime(rectNodesAttr.dqbcData.ARRIVALTIME))/60000);
  2218 + for(var t = 0 ; t<rectNodesAttr.dqbctextNodes.length;t++) {
  2219 + RelationshipGraph.changeNode(rectNodesAttr.dqbctextNodes[t],dx*shiftRectA[s].fcnodx,rectNodesAttr.dqbcData);
  2220 + }
  2221 + rectNodesAttr.dqbcCircleNode.attr('cx',parseInt(rectNodesAttr.dqbcCircleNode.attr('cx'))+(dx*shiftRectA[s].fcnodx));
  2222 + if(rectNodesAttr.dqbcData.STOPTIME<0)
  2223 + d3.selectAll('text[parent-node='+ rectNodesAttr.qdbcNodeId +']').classed({'alert-danger':true});
  2224 + else
  2225 + d3.selectAll('text[parent-node='+ rectNodesAttr.qdbcNodeId +']').classed({'alert-danger':false});
  2226 + }
  2227 + }
  2228 + }, {
  2229 + key : 'leftAndRightStop',
  2230 + value : function leftAndRightStop(drawDir) {
  2231 + var rectTypeA = RelationshipGraph.getRectElementsNodes(d3.selectAll('.caseactive')[0],drawDir);
  2232 + var shiftRectA = rectTypeA.shiftRect,len = shiftRectA.length;
  2233 + for(var s = 0 ; s < len ; s++) {
  2234 + var rectNodesAttr = RelationshipGraph.getContextNodeAndData(d3.select(shiftRectA[s]).attr('id'));
  2235 + if(rectNodesAttr.dqbcData.STOPTIME<0) {
  2236 + var nextTzsjDx = $_GlobalGraph.configuration.dataMap.minztjx - rectNodesAttr.dqbcData.STOPTIME;
  2237 + // 修改遍历的当前元素数据的停站时间为最小停站时间.
  2238 + rectNodesAttr.dqbcData.STOPTIME = $_GlobalGraph.configuration.dataMap.minztjx;
  2239 + // 修改遍历的当前元素数据的文本展示停站时间
  2240 + for(var t = 0 ; t < rectNodesAttr.dqbctextNodes.length ; t++) {
  2241 + if(d3.select(rectNodesAttr.dqbctextNodes[t]).attr('text-type')=='gap')
  2242 + d3.select(rectNodesAttr.dqbctextNodes[t]).text('停:' + rectNodesAttr.dqbcData.STOPTIME);
  2243 + }
  2244 + /**
  2245 + * 修改下个班次的 发车时间、到达时间、停站时间
  2246 + *
  2247 + *
  2248 + * */
  2249 + var $_date = BaseFun.getDateTime(rectNodesAttr.dqbcData.ARRIVALTIME);
  2250 + $_date.setMinutes(parseInt($_date.getMinutes() + rectNodesAttr.dqbcData.STOPTIME));
  2251 + rectNodesAttr.nextData.fcsj = BaseFun.getTimeStr($_date);
  2252 + var $_x = parseInt($_date.getHours()-$_GlobalGraph.configuration.dxHours)*60*$_GlobalGraph.configuration.multiple +
  2253 + parseInt($_date.getMinutes())*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX;
  2254 + $_date.setMinutes(parseInt($_date.getMinutes() + rectNodesAttr.nextData.bcsj));
  2255 + rectNodesAttr.nextData.ARRIVALTIME = BaseFun.getTimeStr($_date);
  2256 + rectNodesAttr.nextData.STOPTIME = rectNodesAttr.nextData.STOPTIME-nextTzsjDx;
  2257 + /**
  2258 + * 修改下个班次的元素坐标属性值
  2259 + *
  2260 + * */
  2261 + rectNodesAttr.nextbcNode.attr('x',$_x);
  2262 + var rectCover = d3.select(d3.selectAll('rect[parent-node='+ rectNodesAttr.nextbcNodeId + '-cover' +']')[0][0]);
  2263 + rectCover.attr('x',$_x);
  2264 + rectNodesAttr.nextbcCircleNode.attr('cx',parseInt(rectNodesAttr.nextbcNode.attr('x')) +
  2265 + (rectNodesAttr.nextData.bcsj) * ($_GlobalGraph.configuration.multiple) - 12);
  2266 + var _text = parseInt(rectNodesAttr.nextbcNode.attr('x')) + (rectNodesAttr.nextData.bcsj) * ($_GlobalGraph.configuration.multiple) - 18;// 1.5.4、计算时刻转text X轴坐标值.
  2267 +
  2268 + for(var n = 0 ; n < rectNodesAttr.nextbctextNodes.length ; n++) {
  2269 + var _textType = d3.select(rectNodesAttr.nextbctextNodes[n]).attr('text-type'); // 1.5.4.1、获取当前text元素的类型.
  2270 + if(_textType =='bcType')
  2271 + d3.select(rectNodesAttr.nextbctextNodes[n]).attr('x',_text);
  2272 + else
  2273 + d3.select(rectNodesAttr.nextbctextNodes[n]).attr('x',$_x);
  2274 + if(_textType=='timeslot')
  2275 + d3.select(rectNodesAttr.nextbctextNodes[n]).text(rectNodesAttr.nextData.fcsj + '~' + rectNodesAttr.nextData.ARRIVALTIME);
  2276 + else if(_textType=='gap')
  2277 + d3.select(rectNodesAttr.nextbctextNodes[n]).text('停:' + rectNodesAttr.nextData.STOPTIME);
  2278 + }
  2279 + d3.selectAll('text[parent-node='+ rectNodesAttr.qdbcNodeId +']').classed({'alert-danger':false});
  2280 + }
  2281 + }
  2282 + }
  2283 + }, {
  2284 + /**
  2285 + * @description : (TODO) 修改选择框以及框边拖拽点的坐标属性值.
  2286 + *
  2287 + * @status OK.
  2288 + * */
  2289 + key : 'updCaseRect',
  2290 + value : function updCaseRect(nodes,dx,drawtype) {
  2291 + // 修改选择框元素的宽度属性值.
  2292 + if(drawtype == 'left') {
  2293 + nodes.caseRectNode.attr('width',parseInt(nodes.caseRectNode.attr('width'))-dx);
  2294 + // 修改选择框元素的X坐标属性值.
  2295 + nodes.caseRectNode.attr('x',parseInt(nodes.caseRectNode.attr('x'))+dx);
  2296 + }else if(drawtype == 'right') {
  2297 + nodes.caseRectNode.attr('width',parseInt(nodes.caseRectNode.attr('width'))+dx);
  2298 + var lineNodes = nodes.attrLine,_lLen = lineNodes.length;
  2299 + for(var l = 0 ; l < _lLen ; l++) {
  2300 + var line = d3.select(lineNodes[l]);
  2301 + line.attr('x1',parseInt(line.attr('x1'))+dx);
  2302 + line.attr('x2',parseInt(line.attr('x2'))+dx);
  2303 + }
  2304 + }
  2305 + var circleNodes = nodes.attrCircle,len = circleNodes.length;
  2306 + for(var c = 0 ; c < len ; c++) {
  2307 + var circle = d3.select(circleNodes[c]);
  2308 + var gourpId = circle.attr('group-id');
  2309 + if(gourpId=='c_left' && drawtype == 'left')
  2310 + circle.attr('cx',parseInt(circle.attr('cx'))+dx);
  2311 + else if(gourpId!='c_left' && gourpId!='c_center' && drawtype == 'right')
  2312 + circle.attr('cx',parseInt(circle.attr('cx'))+dx);
  2313 + else if(gourpId=='c_center')
  2314 + circle.attr('cx',parseInt(nodes.caseRectNode.attr('x')) + parseInt(nodes.caseRectNode.attr('width'))/2);
  2315 + }
  2316 + }
  2317 + }, {
  2318 + key : 'getRectNodesAttr',
  2319 + value : function getRectNodesAttr(rectNode) {
  2320 + var node = d3.select(rectNode);
  2321 + var nodeId = node.attr('id');
  2322 + return {'qdbcNodeId':nodeId,
  2323 + 'qdbcNode':node,
  2324 + 'dqbctextNodes':d3.selectAll('text[parent-node='+ nodeId +']')[0],// 当前班次元素对象的text文本元素.
  2325 + 'dqbcCircleNode':d3.select(d3.selectAll('circle[parent-node='+ nodeId +']')[0][0]),// 当前班次元素对象的circle圆元素
  2326 + 'dqbcData' : node.data()[0]
  2327 + }
  2328 + }
  2329 + }, {
  2330 + key : 'getCaseNodesAttr' ,
  2331 + value : function getCaseNodesAttr(caseRectNode) {
  2332 + var node = d3.select(caseRectNode);
  2333 + var nodeId = node.attr('id');
  2334 + return {'nodeId' : nodeId,
  2335 + 'caseRectNode' : node ,
  2336 + 'attrCircle' : d3.selectAll('circle[parent-node=' + nodeId + ']')[0],
  2337 + 'attrLine' : d3.selectAll('line[parent-node=' + nodeId + ']')[0]};
  2338 + }
  2339 + }, {
  2340 + key : 'getRectElementsNodes',
  2341 + value : function getRectElementsNodes(nodes,drawDir) {
  2342 + // 1、定义rect元素对象集合数组.
  2343 + var _rectNodes = new Array(),caseRect = null, tempAr = new Array();
  2344 + // 2、遍历nodes元素对象集合.
  2345 + for(var n = 0; n<nodes.length;n++) {
  2346 + // 2.1、定义遍历的当前元素对象的元素标签名称与rect-type名称.
  2347 + var tagName = $(nodes[n]).get(0).tagName;
  2348 + // 2.2、如果是rect并且是shift.则添加到rect元素集合数组中.
  2349 + if(tagName=='rect') {
  2350 + var rn = d3.select(nodes[n]);
  2351 + var rdt = rn.data()[0];
  2352 + var rectType = rn.attr('rect-type');
  2353 + if(rectType == 'shift') {
  2354 + _rectNodes.push(nodes[n]);// 2.3、添加到_rectNodes数组中.
  2355 + if(tempAr.indexOf(rdt.lpNo)<0)
  2356 + tempAr.push(rdt.lpNo);
  2357 + }else if(rectType == 'case') {
  2358 + caseRect = nodes[n];
  2359 + }
  2360 + }
  2361 + }
  2362 + var lpfcno = new Array();
  2363 + for(var p = 0 ; p < tempAr.length ; p++) {
  2364 + var fcnoA = new Array();
  2365 + for(var t = 0 ; t < _rectNodes.length ; t++) {
  2366 + var node = d3.select(_rectNodes[t]);
  2367 + var data = node.data()[0];
  2368 + if(data.lpNo == tempAr[p])
  2369 + fcnoA.push(data.fcno);
  2370 +
  2371 + }
  2372 + lpfcno.push({'lpNo':tempAr[p],'fcnoA' : fcnoA});
  2373 + }
  2374 +
  2375 + for(var r = 0;r<_rectNodes.length;r++ ) {
  2376 + var rtn = d3.select(_rectNodes[r]);
  2377 + var ndta = rtn.data()[0];
  2378 + for(var c = 0 ; c< lpfcno.length;c++) {
  2379 + if(ndta.lpNo == lpfcno[c].lpNo){
  2380 + if(drawDir=='right')
  2381 + _rectNodes[r].fcnodx = ndta.fcno - Math.min.apply(null, lpfcno[c].fcnoA);
  2382 + if(drawDir=='left')
  2383 + _rectNodes[r].fcnodx = Math.max.apply(null, lpfcno[c].fcnoA) - ndta.fcno;
  2384 + }
  2385 + }
  2386 + }
  2387 + return {shiftRect:_rectNodes,'caseRect':caseRect};
  2388 + }
  2389 + }, {
  2390 + /**
  2391 + * @desription : (TODO) 获取rect 元素对象.这里表示的是只获取班次元素对象.
  2392 + *
  2393 + * @params : [nodes--元素对象集合;type--移动的方向.]
  2394 + *
  2395 + * @status OK .
  2396 + **/
  2397 + key : 'getFirstRectElements',
  2398 + value : function getFirstRectElements(nodes,type) {
  2399 + // 遍历rect元素集合数组.
  2400 + for(var r =0; r<nodes.length;r++) {
  2401 + /**
  2402 + * 判断 type类型
  2403 + *
  2404 + * ✿ 如果是right.代表的是右拖拽时候.
  2405 + *
  2406 + * ✿ 如果是left.代表的是左拖拽时候.
  2407 + **/
  2408 + // 右拖拽.
  2409 + if(type=='right') {
  2410 + if(d3.select(_rectNodes[r]).attr('id').split('_')[1] != temp) {
  2411 + result.push({id:d3.select(_rectNodes[r]).attr('id')});
  2412 + }
  2413 + temp = d3.select(_rectNodes[r]).attr('id').split('_')[1];
  2414 + // 左拖拽.
  2415 + }else if(type =='left') {
  2416 + // 判断当前遍历是否到了数组下标最后一个.
  2417 + if(r<_rectNodes.length-1) {
  2418 + if(d3.select(_rectNodes[r]).attr('id').split('_')[1] != d3.select(_rectNodes[r+1]).attr('id').split('_')[1]) {
  2419 + result.push({id:d3.select(_rectNodes[r]).attr('id')});
  2420 + }
  2421 + }else {
  2422 + result.push({id:d3.select(_rectNodes[r]).attr('id')});
  2423 + }
  2424 + }
  2425 + }
  2426 + return {'fistnodes':result,'arr':_arr};
  2427 + }
  2428 +
  2429 + }, {
  2430 + /**
  2431 + * @desription : (TODO) 选择框沿Y轴拖拽开始事件.
  2432 + *
  2433 + * @status : OK.
  2434 + **/
  2435 + key : 'regionDrawStart',
  2436 + value : function regionDrawStart(d,i) {
  2437 + drwaStartY = d3.mouse(this)[1];// 给选择框往Y轴拖拽时开始点的Y坐标赋值.
  2438 + }
  2439 + }, {
  2440 + /**
  2441 + * @desription : (TODO) 选择框往Y轴方向拖拽中
  2442 + *
  2443 + * @status : OK.
  2444 + **/
  2445 + key : 'regionDrawRuing',
  2446 + value : function regionDrawRuing(d,i) {
  2447 + drwaStartYStatus = true;// 开启标记选择框沿Y方向进行拖拽状态.
  2448 + // 1、当前鼠标坐标位置.
  2449 + var RDY = d3.mouse(this)[1];
  2450 + // 2、当前鼠标位置的Y坐标 减去 起始点Y坐标 得到 Y轴方向的偏移量.
  2451 + var dy = RDY - drwaStartY;
  2452 + // 3、重新标记起始点.
  2453 + drwaStartY = RDY;
  2454 + // 4、获取选择的元素.
  2455 + var nodes = d3.selectAll('.caseactive')[0];
  2456 + // 5、遍历选中元素,并在拖拽过程中修改选中元素的属性值Y坐标.因为这里只沿Y轴方向进行拖拽,所以值修改Y坐标.
  2457 + for(var n = 0; n<nodes.length;n++) {
  2458 + // 5.1、获取当前元素的元素标签名称.
  2459 + var tagName = $(nodes[n]).get(0).tagName;
  2460 + // 5.2、判断 如果当前元素的元素标签名为rect元素.代表 方块
  2461 + if(tagName=='rect') {
  2462 + d3.select(nodes[n]).attr('y',parseInt(d3.select(nodes[n]).attr('y'))+dy);// 5.2.1、修改当前元素的Y属性值.
  2463 + // 5.3、判断 如果当前元素的元素标签名为text元素. 代表 文本
  2464 + }else if(tagName=='text') {
  2465 + d3.select(nodes[n]).attr('y',parseInt(d3.select(nodes[n]).attr('y'))+dy);// 5.3.1、修改当前元素的Y属性值.
  2466 + // 5.4、判断 如果当前元素的元素标签名为circle元素.代表 圆
  2467 + }else if(tagName == 'circle'){
  2468 + d3.select(nodes[n]).attr('cy',parseInt(d3.select(nodes[n]).attr('cy'))+dy);// 5.4.1、修改当前元素的Y属性值.
  2469 + // 5.5、判断 如果当前元素的元素标签名为circle元素.代表 线
  2470 + }else if(tagName=='line') {
  2471 + d3.select(nodes[n]).attr('y1',parseInt(d3.select(nodes[n]).attr('y1'))+dy);// 5.5.1、修改当前元素的Y属性值.
  2472 + d3.select(nodes[n]).attr('y2',parseInt(d3.select(nodes[n]).attr('y2'))+dy);// 5.5.2、修改当前元素的Y属性值.
  2473 + }
  2474 + }
  2475 + }
  2476 +
  2477 + }, {
  2478 + /**
  2479 + * @desription : (TODO) 选择框往Y轴方向拖拽结束.
  2480 + *
  2481 + * @status : OK.
  2482 + **/
  2483 + key : 'regionDrawStop',
  2484 + value : function regionDrawStop(d,i) {
  2485 + if(drwaStartYStatus) {
  2486 + drwaStartYStatus = false;// // 关闭标记选择框沿Y方向进行拖拽状态.
  2487 + // 1、获取拖拽元素当前的Y坐标点.
  2488 + var dqY = d3.select(this).attr("y");
  2489 + // 2、定义靠近对应路牌对应的Y坐标最近点,与路牌名称.
  2490 + var RDY = 0;//$_carName = '';
  2491 + for(var q = 0 ; q<yAxisYArray.length;q++) {
  2492 + if(dqY<yAxisYArray[q].y) {
  2493 + if(q==0) {
  2494 + RDY = yAxisYArray[q].y;
  2495 + }else {
  2496 + RDY = yAxisYArray[q-1].y;
  2497 + }
  2498 + break;
  2499 + }
  2500 + }
  2501 + // 3、当坐标点不在路牌所对应的坐标点范围内,如果小于最小路牌的Y坐标.则去最小路牌对应的Y坐标,如果大于最大路牌的Y坐标,则取最大路牌对应的Y坐标.
  2502 + var tagb = yAxisYArray[0].y-dqY < yAxisYArray[yAxisYArray.length-1].y-dqY;
  2503 + RDY = (RDY == 0 ? yAxisYArray[yAxisYArray.length-Math.max.apply(null, gClassNameArray.parA)].y : RDY);
  2504 + // 4、得到最终在沿Y拖拽过程中的Y轴偏移量.
  2505 + var dy = RDY - dqY - 4;
  2506 + // 5、获取选择的元素.
  2507 + var nodes = d3.selectAll('.caseactive')[0];
  2508 + // 6、遍历选中元素,并在拖拽过程中修改选中元素的属性值Y坐标.因为这里只沿Y轴方向进行拖拽,所以值修改Y坐标.
  2509 + for(var n = 0; n<nodes.length;n++) {
  2510 + // 6.1、获取当前元素的元素标签名称.
  2511 + var tagName = $(nodes[n]).get(0).tagName;
  2512 + // 6.2、判断 如果当前元素的元素标签名为rect元素.代表 方块
  2513 + if(tagName=='rect') {
  2514 + var y_dx = parseInt(d3.select(nodes[n]).attr('y'))+dy,lpA = '';
  2515 + _animation(d3.select(nodes[n])).attr('y',y_dx);
  2516 + for(var q = 0 ; q<yAxisYArray.length;q++) {
  2517 + if(y_dx<yAxisYArray[q].y) {
  2518 + if(q==0)
  2519 + lpA = yAxisYArray[q].lpA;
  2520 + else
  2521 + lpA = yAxisYArray[q-1].lpA;
  2522 + break;
  2523 + }
  2524 + }
  2525 + var tagb_ = yAxisYArray[0].y-y_dx < yAxisYArray[yAxisYArray.length-1].y-y_dx;
  2526 + lpA = (lpA == '' ? tagb_ ? yAxisYArray[yAxisYArray.length-1].lpA : yAxisYArray[0].lpA : lpA);
  2527 + var dt = d3.select(nodes[n]).data()[0];
  2528 + dt.parent = lpA.lpName;
  2529 + dt.lp = lpA.lp;
  2530 + dt.lpName = lpA.lpName;
  2531 + dt.lpNo = lpA.lpNo;
  2532 + dt.lpType = lpA.lpType;
  2533 + // 6.3、判断 如果当前元素的元素标签名为text元素. 代表 文本
  2534 + }else if(tagName=='text') {
  2535 + _animation(d3.select(nodes[n])).attr('y',parseInt(d3.select(nodes[n]).attr('y'))+dy);
  2536 + // 6.4、判断 如果当前元素的元素标签名为circle元素.代表 圆
  2537 + }else if(tagName == 'circle'){
  2538 + _animation(d3.select(nodes[n])).attr('cy',parseInt(d3.select(nodes[n]).attr('cy'))+dy);
  2539 + // 5.5、判断 如果当前元素的元素标签名为circle元素.代表 线
  2540 + }else if(tagName=='line') {
  2541 + _animation(d3.select(nodes[n])).attr('y1',parseInt(d3.select(nodes[n]).attr('y1'))+dy).attr('y2',parseInt(d3.select(nodes[n]).attr('y2'))+dy);
  2542 + }
  2543 + }
  2544 + setTimeout(function(){
  2545 + $_GlobalGraph.statistics();
  2546 + $_GlobalGraph.addHistory();
  2547 + },310);
  2548 + }
  2549 + }
  2550 + }, {
  2551 + /**
  2552 + * @description : (TODO) 鼠标从选择框中心点按下沿X方向左右拖拽开始事件.
  2553 + *
  2554 + * @status OK .
  2555 + **/
  2556 + key : 'centerMoveSart',
  2557 + value : function centerMoveSart(d,i) {
  2558 + // 1、记录拖拽起始点.
  2559 + drwaStartX = d3.mouse(this)[0];
  2560 + }
  2561 + }, {
  2562 + /**
  2563 + * @description : (TODO) 鼠标从选择框中心点按下沿X方向左右拖拽中事件.
  2564 + *
  2565 + * @status OK.
  2566 + **/
  2567 + key : 'centerMoveRuing',
  2568 + value : function centerMoveRuing(d,i) {
  2569 + // 1、开启标记鼠标从选择框中心点按下沿X方向进行拖拽状态.
  2570 + drwaStartXStatus = true;
  2571 + // 2、获取鼠标当前X坐标点位置.
  2572 + var RDX = d3.mouse(this)[0];
  2573 + // 3、计算起始点到当前点X方向的偏移量.
  2574 + var dx = RDX - drwaStartX;
  2575 + // 4、重新标记起点.
  2576 + drwaStartX = RDX;
  2577 + // 5、获取选中的元素.变量修改其元素属性值与数据.
  2578 + var nodes = d3.selectAll('.caseactive')[0];
  2579 + for(var n = 0; n<nodes.length;n++) {
  2580 + // 5.1、获取遍历的当前元素的元素标签名称.
  2581 + var tagName = $(nodes[n]).get(0).tagName;
  2582 + // 5.2、选择遍历的当前元素对象.
  2583 + var node = d3.select(nodes[n]);
  2584 + // 5.3、获取遍历的当前元素数据.
  2585 + var dt = node.data()[0];
  2586 + /**
  2587 + * 5.4、判断 tagName.
  2588 + *
  2589 + * 5.4.1、 ✿ 如果是rect 则修改X.并修改数据.
  2590 + *
  2591 + * 5.4.2、 ✿ 如果是text 修改文本属性值.
  2592 + *
  2593 + * 5.4.3、 ✿ 如果是circle 修改C.
  2594 + *
  2595 + * 5.4.4、 ✿ 如果是line 修改X1、X2.
  2596 + **/
  2597 + if(tagName=='rect') {
  2598 + // 5.4.1.1、修改遍历的当前元素X坐标属性值.
  2599 + node.attr('x',parseInt(node.attr('x'))+dx);
  2600 + // 5.4.1.2、根据X坐标值转为时刻
  2601 + var tm = RelationshipGraph.zbTosj(parseInt(node.attr('x'))-$_GlobalGraph.configuration.offsetX);
  2602 + // 5.4.1.3、修改遍历的当前元素数据的发车时间.
  2603 + dt.fcsj = tm.hour + ':' + tm.min;
  2604 + // 5.4.1.4、发车时间转时间对象
  2605 + var nowDate = BaseFun.getDateTime(dt.fcsj);
  2606 + // 5.4.1.5、修改时间.
  2607 + nowDate.setMinutes(parseInt(tm.min)+dt.bcsj);
  2608 + // 5.4.1.6、时间对象转字符串时刻.修改到达时间.
  2609 + dt.ARRIVALTIME = BaseFun.getTimeStr(nowDate);
  2610 + }else if(tagName=='text') {
  2611 + // 5.4.2.1、修改遍历的当前文本元素X坐标属性值.
  2612 + node.attr('x',parseInt(node.attr('x'))+dx);
  2613 + if(node.attr('text-type') =='timeslot') {
  2614 + if(dt.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.bd &&
  2615 + dt.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.out &&
  2616 + dt.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.cf &&
  2617 + dt.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.in_ &&
  2618 + dt.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)
  2619 + node.text(dt.fcsj + '~' + dt.ARRIVALTIME);// 5.4.2.2、修改第一行的text文本.发车时间 ~ 到达时间.
  2620 + }
  2621 + }else if(tagName == 'circle'){
  2622 + // 5.4.3.1、修改遍历的当前圆元素CX坐标属性值.
  2623 + node.attr('cx',parseInt(node.attr('cx'))+dx);
  2624 + }else if(tagName=='line') {
  2625 + // 5.4.3.1、修改遍历的当前line线1元素X1坐标属性值.
  2626 + node.attr('x1',parseInt(node.attr('x1'))+dx);
  2627 + // 5.4.3.1、修改遍历的当前line线2元素X1坐标属性值.
  2628 + node.attr('x2',parseInt(node.attr('x2'))+dx);
  2629 + }
  2630 + }
  2631 + // 6、重新统计值.
  2632 + RelationshipGraph.reDrawDepart();
  2633 + }
  2634 + }, {
  2635 + /**
  2636 + * @description : (TODO) 鼠标从选择框中心点按下沿X方向左右拖拽结束事件.
  2637 + *
  2638 + * @status OK.
  2639 + **/
  2640 + key : 'centerMoveStop',
  2641 + value : function centerMoveStop(d,i) {
  2642 + /**
  2643 + * 1、《《《《《《《《判断 是否已经过沿X方向左右拖拽》》》》》》》》
  2644 + *
  2645 + **/
  2646 + if(drwaStartXStatus) {
  2647 + // 1.1、关闭标记鼠标从选择框中心点按下沿X方向进行拖拽状态.
  2648 + drwaStartXStatus = false;
  2649 + // 1.2、保存该操作记录.
  2650 + $_GlobalGraph.addHistory();
  2651 + }
  2652 + }
  2653 + }, {
  2654 + /**
  2655 + * @description : (TODO) 重新绘制发车时刻,并重新统计.
  2656 + *
  2657 + * @status : OK.
  2658 + * */
  2659 + key : 'reDrawDepart',
  2660 + value : function reDrawDepart() {
  2661 + // 1、删除g元素class为up_tick的节点(包括子节点).这里等同与清楚上行的发车时刻.
  2662 + $_GlobalGraph.removeNodes(d3.selectAll('g.up_tick')[0]);
  2663 + // 2、删除g元素class为down_tick的节点(包括子节点).这里等同与清楚下行的发车时刻.
  2664 + $_GlobalGraph.removeNodes(d3.selectAll('g.down_tick')[0]);
  2665 + // 3、获取所有的班次数据.
  2666 + var $_json = $_GlobalGraph.getDataArray();
  2667 + // 4、定义上、下行班次数组.
  2668 + var upArray = new Array(),downArray = new Array();
  2669 + for(var j = 0 ; j< $_json.length ; j++) {
  2670 + // 4.1、判断遍历的当前班次类型是否为normal
  2671 + if($_json[j].bcType== $_GlobalGraph.configuration.dataMap.bcTypeArr.normal) {
  2672 + // 4.2、判断遍历的当前元素方向.
  2673 + if($_json[j].xlDir == $_GlobalGraph.configuration.dataMap.dira[0])
  2674 + upArray.push($_json[j]);
  2675 + else if($_json[j].xlDir == $_GlobalGraph.configuration.dataMap.dira[1])
  2676 + downArray.push($_json[j])
  2677 + }
  2678 + }
  2679 + // 5、定义上、下行发车时刻元素节点集合.
  2680 + var upNodes = $_GlobalGraph.configuration.selection.select('svg').select('g.up').selectAll('.up_tick').data(upArray),
  2681 + downNodes = $_GlobalGraph.configuration.selection.select('svg').select('g.down').selectAll('.down_tick').data(downArray);
  2682 + // 6、绘制上行发车时刻
  2683 + $_GlobalGraph.createUpTime(upNodes);
  2684 + // 7、绘制下行发车时刻
  2685 + $_GlobalGraph.createDownTime(downNodes);
  2686 + // 8、重新统计值.
  2687 + $_GlobalGraph.statistics();
  2688 + }
  2689 + }, {
  2690 + /**
  2691 + * @description : (TODO) 对单个rect元素(班次)做左右拖拽(拖拽开始...).
  2692 + *
  2693 + * @status : OK.
  2694 + **/
  2695 + key : 'singleElementDrawStart',
  2696 + value : function singleElementDrawStart(d,i) {
  2697 + _singElmtDrStartX = d3.mouse(this)[0];// 初始化对单个rect元素进行拖拽时开始点X坐标.
  2698 + }
  2699 + }, {
  2700 + /**
  2701 + * @description : (TODO) 对单个rect元素(班次)做左右拖拽(拖拽中...).
  2702 + *
  2703 + * @status : OK.
  2704 + **/
  2705 + key : 'singleElementDrawRuing',
  2706 + value : function singleElementDrawRuing(d,i) {
  2707 + /**
  2708 + * 1、判断
  2709 + *
  2710 + * ✿ 当前班次是首末班车班次,如果是则不能结束拖拽.(* 根据_singElemtDrStatus状态来判断 除去正在进行拖拽的班次刚好拖拽到首末班次班次的发车时间点.)
  2711 + *
  2712 + * ✿ 当前班次是早晚例保、进出场班次、吃饭班次.如果是则不能结束拖拽.
  2713 + *
  2714 + **/
  2715 + if((RelationshipGraph.issmbc(d.fcsj) ||
  2716 + context.getisContext() ||
  2717 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd ||
  2718 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||
  2719 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.cf ||
  2720 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_ ||
  2721 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.lc) && !_singElemtDrStatus)
  2722 + return;
  2723 + // 2、拖拽过程隐藏提示工具窗口.
  2724 + $_GlobalGraph.tooltip.hide();
  2725 + // 3、开启标记单个rect元素沿X方向进行拖拽状态.
  2726 + _singElemtDrStatus = true;
  2727 + // 4、获取鼠标在拖拽中的当前坐标点.
  2728 + var RDX = d3.mouse(this)[0];
  2729 + // 5、计算当前鼠标坐标X相对初始点坐标X的偏移量.
  2730 + var dx = RDX - _singElmtDrStartX;
  2731 + // 6、重新赋值初始点坐标X.
  2732 + _singElmtDrStartX = RDX;
  2733 + // 7、根据当前被拖拽的元素rect元素的parent-node属性值 , 来获取当前班次的底层rect元素的相邻两个班次元素的相关信息.
  2734 + var nodeContext = RelationshipGraph.getContextNodeAndData(d3.select(this).attr('parent-node').replace('-cover',''));
  2735 + // 8、计算rect元素的被拖拽后的X坐标值.
  2736 + var chageX = parseInt(nodeContext.qdbcNode.attr('x'))+dx;
  2737 +
  2738 + /****************************************** update 当前的班次数据以及相关元素对象属性值. START ************************************/
  2739 +
  2740 + /**
  2741 + * 9.1、修改当期rect(班次)data数据属性值.
  2742 + *
  2743 + * ✿ 因为rect元素是沿X轴移动的.这里修改的值一般是 [fcsj--发车时间;ARRIVALTIME--到达时间;STOPTIME--停站时间].
  2744 + *
  2745 + * ✿ 因为当前班次的到达时间改变,导致与下个班次的发车时间相隔时间段改变.也就是当前班次停站时间被改变.
  2746 + **/
  2747 + // 9.1.1、根据当前元素的X坐标值等到对应的时刻.
  2748 + var tm = RelationshipGraph.zbTosj(chageX-$_GlobalGraph.configuration.offsetX);
  2749 + // 9.1.2、修改当前班次的发车时间.
  2750 + d.fcsj = tm.hour + ':' + tm.min;
  2751 + // 9.1.3 、定义当前班次的到达时间对象.
  2752 + var nowDate = BaseFun.getDateTime(d.fcsj);
  2753 + nowDate.setMinutes(parseInt(tm.min)+d.bcsj);// 10.3.1、设置分钟.
  2754 + // 9.1.4、修改当前班次的到达时间.
  2755 + d.ARRIVALTIME = BaseFun.getTimeStr(nowDate);
  2756 + d.STOPTIME = parseInt((BaseFun.getDateTime(nodeContext.nextData.fcsj) - BaseFun.getDateTime(d.ARRIVALTIME))/ 60000);
  2757 + /**
  2758 + * 9.2、修改元素沿X轴方向的X坐标属性值.
  2759 + *
  2760 + * ✿ 这里的元素包括
  2761 + *
  2762 + * 当前被拖拽的元素(覆盖层)、当前被拖拽的元素的底层元素、text元素(文本元素)、circle元素(圆)
  2763 + **/
  2764 + // 9.2.1、修改当前被拖拽的班次rect元素覆盖层的X坐标值.
  2765 + d3.select(this).attr('x',chageX);
  2766 + // 9.2.2、修改当前被拖拽的班次rect底层元素X坐标值.
  2767 + nodeContext.qdbcNode.attr('x',chageX);
  2768 + // 9.2.3、修改当前被拖拽的rect底层元素上的 圆的元素对象.
  2769 + nodeContext.dqbcCircleNode.attr('cx',parseInt(nodeContext.dqbcCircleNode.attr('cx'))+dx);
  2770 + // 9.2.4、遍历text元素,并修改text属性值.
  2771 + for(var n = 0 ; n < nodeContext.dqbctextNodes.length ; n++) {
  2772 + // 9.2.4.1、修改text属性值.
  2773 + RelationshipGraph.changeNode(nodeContext.dqbctextNodes[n],dx,d);
  2774 + }
  2775 + /****************************************** update 当前的班次数据以及相关元素对象属性值. END ************************************/
  2776 +
  2777 + // 10、计算与上个班次的停站时间.
  2778 + var dxMinues = parseInt((BaseFun.getDateTime(d.fcsj) - BaseFun.getDateTime(nodeContext.lastData.ARRIVALTIME)) / 60000);
  2779 +
  2780 + /****************************************** update 上个的班次数据以及相关元素对象属性值. START ************************************/
  2781 +
  2782 + /**
  2783 + * 11、判断上个班次的类型.
  2784 + *
  2785 + * ✿ 11.1、如果是出场班次、吃饭班次 则停站时间为零,也就是说上个班次的到达时间是下个班次的发车时间.
  2786 + *
  2787 + * ✿ 11.2、如果是正常班次
  2788 + *
  2789 + **/
  2790 + if(nodeContext.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||
  2791 + nodeContext.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.cf) {
  2792 + /**
  2793 + * 11.1.1、 如果是出场班次、吃饭班次.修改上个班次数据属性值.
  2794 + *
  2795 + * ✿ 需要修改的数据属性值有[发车时间,到达时间].
  2796 + **/
  2797 + // 11.1.1.1、修改上个班次的到达时间.
  2798 + nodeContext.lastData.ARRIVALTIME = d.fcsj;
  2799 + var ddsj = BaseFun.getDateTime(nodeContext.lastData.ARRIVALTIME);
  2800 + ddsj.setMinutes(ddsj.getMinutes() - nodeContext.lastData.bcsj);
  2801 + // 11.1.1.2、修改上个班次的发车时间.
  2802 + nodeContext.lastData.fcsj = BaseFun.getTimeStr(ddsj);
  2803 + /**
  2804 + * 11.1.2、修改上个班次元素的属性值.
  2805 + *
  2806 + **/
  2807 + // 11.1.2.1、修改上个元素的rect覆盖层元素X坐标值.
  2808 + var lastRectCover = d3.select(d3.selectAll('rect[parent-node='+ nodeContext.qdbcNode.attr('last-node') + '-cover' +']')[0][0]);
  2809 + lastRectCover.attr('x',parseInt(lastRectCover.attr('x'))+dx);// 12.2.1.3.1、修改圆的cx属性值.
  2810 + // 11.1.2.2、修改上个元素的rect底层元素X坐标值.
  2811 + nodeContext.lastbcNode.attr('x',parseInt(nodeContext.lastbcNode.attr('x'))+dx);
  2812 + // 11.1.4.3、修改上个元素的rect底层元素上的 圆的元素CX坐标值
  2813 + nodeContext.lastbcCircleNode.attr('cx',parseInt(nodeContext.lastbcCircleNode.attr('cx'))+dx);
  2814 + // 11.1.4.4、遍历上个元素的text元素,并修改text属性值.
  2815 + for(var c = 0 ; c < nodeContext.lastTextNodes.length ; c++) {
  2816 + // 11.1.4.4.1、修改text属性值.
  2817 + RelationshipGraph.changeNode(nodeContext.lastTextNodes[c],dx,nodeContext.lastData);
  2818 + }
  2819 + // 11.1.4.5、获取上上个班次的元素对象.
  2820 + var xxgbcNode = d3.select('rect[id='+ nodeContext.lastbcNode.attr('last-node') +']');
  2821 + // 11.1.4.6、获取上上个班次的数据
  2822 + var xxgbc = xxgbcNode.data()[0];
  2823 +
  2824 + /**
  2825 + * 11.1.4.7、判断 上上个班次类型.
  2826 + *
  2827 + * ✿ 11.1.4.7.1、如果是保养班次.则修改这个班次的到达与发车时间以及元素属性值.
  2828 + *
  2829 + * ✿ 11.1.4.7.2、如果是正常班次.则修改这个班次的停站时间以及元素属性值.
  2830 + *
  2831 + **/
  2832 + if(xxgbc.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd) {
  2833 +
  2834 + /**
  2835 + * 11.1.4.7.1.1、修改上上个班次元素的数据属性值.
  2836 + *
  2837 + **/
  2838 + xxgbc.ARRIVALTIME = nodeContext.lastData.fcsj;// 修改到达时间
  2839 + var xxgbcddsj = BaseFun.getDateTime(xxgbc.ARRIVALTIME);
  2840 + xxgbcddsj.setMinutes(xxgbcddsj.getMinutes() - xxgbc.bcsj);
  2841 + xxgbc.fcsj = BaseFun.getTimeStr(xxgbcddsj);// 修改发车时间
  2842 + /**
  2843 + * 11.1.4.7.1.2、修改上上个班次元素的属性值.
  2844 + *
  2845 + **/
  2846 + xxgbcNode.attr('x',parseInt(xxgbcNode.attr('x'))+dx);// 修改底层rectX坐标值.
  2847 + var xxgbcCircle = d3.select(d3.selectAll('circle[parent-node='+ nodeContext.lastbcNode.attr('last-node') +']')[0][0]);
  2848 + xxgbcCircle.attr('cx',parseInt(xxgbcCircle.attr('cx'))+dx);// 修改圆的cx属性值.
  2849 + var xxgbcRectCover = d3.select(d3.selectAll('rect[parent-node='+ nodeContext.lastbcNode.attr('last-node') + '-cover' +']')[0][0]);
  2850 + xxgbcRectCover.attr('x',parseInt(xxgbcRectCover.attr('x'))+dx);// 修改覆盖层rectX坐标值.
  2851 + var xxgbcTextNodes = d3.selectAll('text[parent-node='+ nodeContext.lastbcNode.attr('last-node') +']')[0];
  2852 + for(var x = 0 ; x < xxgbcTextNodes.length ; x++) {
  2853 + RelationshipGraph.changeNode(xxgbcTextNodes[x],dx,xxgbc);// 修改text属性值.
  2854 + }
  2855 + }else if(xxgbc.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.normal) {
  2856 + /**
  2857 + * 11.1.4.7.2、如果是正常班次.
  2858 + *
  2859 + **/
  2860 + // 11.1.4.7.2.1、修改上上个班次元素的数据停站时间属性值.
  2861 + xxgbc.STOPTIME = parseInt((BaseFun.getDateTime(nodeContext.lastData.fcsj) - BaseFun.getDateTime(xxgbc.ARRIVALTIME)) / 60000);
  2862 + // 11.1.4.7.2.2、修改上上个班次text元素属性值.
  2863 + var _normalxxgbc = d3.selectAll('text[parent-node=' + nodeContext.lastbcNode.attr('last-node') +']')[0];
  2864 + for(var i = 0 ;i < _normalxxgbc.length ;i++) {
  2865 + var normalxxgbcNode_ = d3.select(_normalxxgbc[i]);
  2866 + if(normalxxgbcNode_.attr('text-type')=='gap')
  2867 + normalxxgbcNode_.text('停:' + xxgbc.STOPTIME);
  2868 + }
  2869 + }
  2870 + }else {
  2871 + /**
  2872 + * 11.2.1、如果是正常班次
  2873 + *
  2874 + * ✿ 需要修改的数据属性值有[停站时间].
  2875 + **/
  2876 + // 11.2.1.1、修改上个班次的停站时间.
  2877 + nodeContext.lastData.STOPTIME = dxMinues;
  2878 + /**
  2879 + * 11.2.2、修改上个班次元素的属性值.
  2880 + *
  2881 + **/
  2882 + for(var t = 0 ; t < nodeContext.lastTextNodes.length ;t++) {
  2883 + // 11.2.2.1、修改text元素对象.
  2884 + var lastNode_ = d3.select(nodeContext.lastTextNodes[t]);
  2885 + if(lastNode_.attr('text-type')=='gap')
  2886 + lastNode_.text('停:' + nodeContext.lastData.STOPTIME);// 15.4、修改第三行的text文本. 停站时间.
  2887 + }
  2888 + }
  2889 + /****************************************** update 上个的班次数据以及相关元素对象属性值. END ************************************/
  2890 + // 12、判断停站时间是否小于零.
  2891 + if(nodeContext.lastData.STOPTIME <0 || d.STOPTIME<0)
  2892 + d3.selectAll('text[parent-node='+ nodeContext.qdbcNodeId +']').classed({'alert-danger':true});// 12.1、添加停站时间小零的样式.
  2893 + else
  2894 + d3.selectAll('text[parent-node='+ nodeContext.qdbcNodeId +']').classed({'alert-danger':false});// 12.1、删除停站时间小零的样式.
  2895 + // 13、重新绘制发车时刻,并重新统计.
  2896 + RelationshipGraph.reDrawDepart();
  2897 + }
  2898 + }, {
  2899 + /**
  2900 + * @description : (TODO) 对单个rect元素(班次)做左右拖拽(拖拽结束...).
  2901 + *
  2902 + * @status : OK.
  2903 + *
  2904 + * */
  2905 + key : 'singleElementDrawStop',
  2906 + value : function singleElementDrawStop(d,i) {
  2907 + // 1、先判断是否进行过对该班次元素的拖拽行为.
  2908 + if(_singElemtDrStatus) {
  2909 + // 1.1、关闭标记单个rect元素沿X方向进行拖拽状态.
  2910 + _singElemtDrStatus = false;
  2911 + /**
  2912 + * 1.2、根据当前被拖拽的rect元素的parent-node属性值
  2913 + *
  2914 + * ✿ 获取当前班次的底层rect元素id属性值、以及底层的rect元素对象、以及属于该班次元素的属性值元素对象(circle、text)
  2915 + *
  2916 + * ✿ 获取上个班次的底层rect元素对象与数据. 以及属于该班次元素的属性值元素对象(circle、text).
  2917 + *
  2918 + * ✿ 获取下个班次的底层rect元素对象与数据. 以及属于该班次元素的属性值元素对象(circle、text).
  2919 + *
  2920 + **/
  2921 + var _obj = RelationshipGraph.getContextNodeAndData(d3.select(this).attr('parent-node').replace('-cover',''));
  2922 + // 1.3、定义最小停站间隙.
  2923 + var minSoptTime = $_GlobalGraph.configuration.dataMap.minztjx;
  2924 + // 1.4、创建当前时间对象.
  2925 + var $_date = new Date();
  2926 + // 1.5、判断 如果当前班次的停站时间小于零,则修改成最小停站时间.
  2927 + if(d.STOPTIME<0) {
  2928 + if(_obj.nextData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_)
  2929 + minSoptTime= 0;
  2930 + /**
  2931 + * 1.5.1、修改当前班次数据值.
  2932 + *
  2933 + **/
  2934 + $_date = BaseFun.getDateTime(_obj.nextData.fcsj);// 1.5.1.1、时间字符串转时间对象.
  2935 + $_date.setMinutes(parseInt($_date.getMinutes() - minSoptTime));// 1.5.1.2、修改分钟.
  2936 + d.STOPTIME = minSoptTime;// 1.5.1.3、修改当前班次的停站时间.
  2937 + d.ARRIVALTIME = BaseFun.getTimeStr($_date);// 1.5.1.4、修改当前班次的达到时间.
  2938 + $_date.setMinutes($_date.getMinutes()-d.bcsj);// 1.5.1.5、修改分钟.
  2939 + d.fcsj = BaseFun.getTimeStr($_date);// 1.5.1.4、修改当前班次的发车时间.
  2940 + // 1.5.2、计算时刻转rect X轴坐标值.
  2941 + var $_x = parseInt($_date.getHours()-$_GlobalGraph.configuration.dxHours)*60*$_GlobalGraph.configuration.multiple +
  2942 + parseInt($_date.getMinutes())*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX;
  2943 + /**
  2944 + * 1.5.3、修改当前班次元素属性值.
  2945 + *
  2946 + **/
  2947 + d3.select(this).attr('x',$_x);// 1.5.3.1、修改当前被拖拽元素覆盖层rect元素的X坐标属性值.
  2948 + _obj.qdbcNode.attr('x',$_x);// 1.5.3.2、修改底层rect元素的X坐标属性值.
  2949 + _obj.dqbcCircleNode.attr('cx',parseInt(_obj.qdbcNode.attr('x')) +
  2950 + (d.bcsj) * ($_GlobalGraph.configuration.multiple) - 12);// 1.5.3.3、修改属于当前班次元素的circle元素圆的cx值.
  2951 + var _text = parseInt(_obj.qdbcNode.attr('x')) + (d.bcsj) * ($_GlobalGraph.configuration.multiple) - 18;// 1.5.4、计算时刻转text X轴坐标值.
  2952 + /**
  2953 + * 1.5.4、修改当前班次元素下所属的text元素属性值.
  2954 + *
  2955 + **/
  2956 + for(var n = 0 ; n < _obj.dqbctextNodes.length ; n++) {
  2957 + var _textType = d3.select(_obj.dqbctextNodes[n]).attr('text-type'); // 1.5.4.1、获取当前text元素的类型.
  2958 + if(_textType =='bcType')
  2959 + d3.select(_obj.dqbctextNodes[n]).attr('x',_text);
  2960 + else
  2961 + d3.select(_obj.dqbctextNodes[n]).attr('x',$_x);
  2962 + if(_textType=='timeslot')
  2963 + d3.select(_obj.dqbctextNodes[n]).text(d.fcsj + '~' + d.ARRIVALTIME);
  2964 + else if(_textType=='gap')
  2965 + d3.select(_obj.dqbctextNodes[n]).text('停:' + d.STOPTIME);
  2966 + }
  2967 + if(_obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||
  2968 + _obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.cf) {
  2969 + // 11.1.1.1、修改上个班次的到达时间.
  2970 + _obj.lastData.ARRIVALTIME = d.fcsj;
  2971 + var ddsj = BaseFun.getDateTime(_obj.lastData.ARRIVALTIME);
  2972 + ddsj.setMinutes(ddsj.getMinutes() - _obj.lastData.bcsj);
  2973 + // 11.1.1.2、修改上个班次的发车时间.
  2974 + _obj.lastData.fcsj = BaseFun.getTimeStr(ddsj);
  2975 + var last_x = parseInt(ddsj.getHours()-$_GlobalGraph.configuration.dxHours)*60*$_GlobalGraph.configuration.multiple +
  2976 + parseInt(ddsj.getMinutes())*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX;
  2977 + /**
  2978 + * 11.1.2、修改上个班次元素的属性值.
  2979 + *
  2980 + **/
  2981 + // 11.1.2.1、修改上个元素的rect覆盖层元素X坐标值.
  2982 + var lastRectCover = d3.select(d3.selectAll('rect[parent-node='+ _obj.qdbcNode.attr('last-node') + '-cover' +']')[0][0]);
  2983 + lastRectCover.attr('x',last_x);// 12.2.1.3.1、修改圆的cx属性值.
  2984 + // 11.1.2.2、修改上个元素的rect底层元素X坐标值.
  2985 + _obj.lastbcNode.attr('x',last_x);
  2986 + // 11.1.4.3、修改上个元素的rect底层元素上的 圆的元素CX坐标值
  2987 + _obj.lastbcCircleNode.attr('cx',parseInt(_obj.lastbcNode.attr('x')) +
  2988 + (_obj.lastData.bcsj) * ($_GlobalGraph.configuration.multiple) - 12);// 1.5.3.3、修改属于当前班次元素的circle元素圆的cx值.
  2989 + var _text = parseInt(_obj.lastbcNode.attr('x')) + (_obj.lastData.bcsj) * ($_GlobalGraph.configuration.multiple) - 18;// 1.5.4、计算时刻转text X轴坐标值.
  2990 + // 11.1.4.4、遍历上个元素的text元素,并修改text属性值.
  2991 + for(var n = 0 ; n < _obj.lastTextNodes.length ; n++) {
  2992 + // 11.1.4.4.1、修改text属性值.
  2993 + // RelationshipGraph.changeNode(_obj.lastTextNodes[c],dx,_obj.lastData);
  2994 + var textNode = d3.select(_obj.lastTextNodes[n]);
  2995 + var _textType = textNode.attr('text-type'); // 1.5.4.1、获取当前text元素的类型.
  2996 + if(_textType =='bcType')
  2997 + d3.select(_obj.lastTextNodes[n]).attr('x',_text);
  2998 + else
  2999 + d3.select(_obj.lastTextNodes[n]).attr('x',last_x);
  3000 + if(_textType=='travel') {
  3001 + if(_obj.lastData.bcsj>0) {
  3002 + // 4.2 修改第二行的text文本.
  3003 + if(_obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd ||
  3004 + _obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||
  3005 + _obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_ ||
  3006 + _obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)
  3007 + textNode.text(_obj.lastData.fcsj);
  3008 + else if(_obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.cf)
  3009 + textNode.text('吃:' + _obj.lastData.bcsj);
  3010 + else
  3011 + textNode.text("行:" + _obj.lastData.bcsj);
  3012 + }
  3013 + }else if(_textType=='gap') {
  3014 + if(_obj.lastData.bcsj>0) {
  3015 + // 4.3 修改第三行的text文本. 停站时间.
  3016 + if(_obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd||
  3017 + _obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)
  3018 + textNode.text('保:' + d.bcsj);
  3019 + else if(_obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||
  3020 + _obj.lastData.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_)
  3021 + textNode.text('行:' + _obj.lastData.bcsj);
  3022 + else
  3023 + textNode.text('停:' + _obj.lastData.STOPTIME);
  3024 + }
  3025 + }
  3026 + }
  3027 + // 11.1.4.5、获取上上个班次的元素对象.
  3028 + var xxgbcNode = d3.select('rect[id='+ _obj.lastbcNode.attr('last-node') +']');
  3029 + // 11.1.4.6、获取上上个班次的数据
  3030 + var xxgbc = xxgbcNode.data()[0];
  3031 +
  3032 + /**
  3033 + * 11.1.4.7、判断 上上个班次类型.
  3034 + *
  3035 + * ✿ 11.1.4.7.1、如果是保养班次.则修改这个班次的到达与发车时间以及元素属性值.
  3036 + *
  3037 + * ✿ 11.1.4.7.2、如果是正常班次.则修改这个班次的停站时间以及元素属性值.
  3038 + *
  3039 + **/
  3040 + if(xxgbc.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd) {
  3041 +
  3042 + /**
  3043 + * 11.1.4.7.1.1、修改上上个班次元素的数据属性值.
  3044 + *
  3045 + **/
  3046 + xxgbc.ARRIVALTIME = _obj.lastData.fcsj;// 修改到达时间
  3047 + var xxgbcddsj = BaseFun.getDateTime(xxgbc.ARRIVALTIME);
  3048 + xxgbcddsj.setMinutes(xxgbcddsj.getMinutes() - xxgbc.bcsj);
  3049 + xxgbc.fcsj = BaseFun.getTimeStr(xxgbcddsj);// 修改发车时间
  3050 + var xxbgc_x = parseInt(xxgbcddsj.getHours()-$_GlobalGraph.configuration.dxHours)*60*$_GlobalGraph.configuration.multiple +
  3051 + parseInt(xxgbcddsj.getMinutes())*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX;
  3052 + /**
  3053 + * 11.1.4.7.1.2、修改上上个班次元素的属性值.
  3054 + *
  3055 + **/
  3056 + xxgbcNode.attr('x',xxbgc_x);// 修改底层rectX坐标值.
  3057 + var xxgbcCircle = d3.select(d3.selectAll('circle[parent-node='+ _obj.lastbcNode.attr('last-node') +']')[0][0]);
  3058 + xxgbcCircle.attr('cx',parseInt(xxgbcNode.attr('x')) +
  3059 + (xxgbc.bcsj) * ($_GlobalGraph.configuration.multiple) - 12);// 修改圆的cx属性值.
  3060 + var xxgbcRectCover = d3.select(d3.selectAll('rect[parent-node='+ _obj.lastbcNode.attr('last-node') + '-cover' +']')[0][0]);
  3061 + xxgbcRectCover.attr('x',xxbgc_x);// 修改覆盖层rectX坐标值.
  3062 + var xxgbcTextNodes = d3.selectAll('text[parent-node='+ _obj.lastbcNode.attr('last-node') +']')[0];
  3063 + var _text = parseInt(xxgbcNode.attr('x')) + (xxgbc.bcsj) * ($_GlobalGraph.configuration.multiple) - 18;// 1.5.4、计算时刻转text X轴坐标值.
  3064 + for(var x = 0 ; x < xxgbcTextNodes.length ; x++) {
  3065 + // RelationshipGraph.changeNode(xxgbcTextNodes[x],dx,xxgbc);// 修改text属性值.
  3066 + var textNode = d3.select(xxgbcTextNodes[x]);
  3067 + var _textType = textNode.attr('text-type'); // 1.5.4.1、获取当前text元素的类型.
  3068 + if(_textType =='bcType')
  3069 + d3.select(xxgbcTextNodes[x]).attr('x',_text);
  3070 + else
  3071 + d3.select(xxgbcTextNodes[x]).attr('x',xxbgc_x);
  3072 + if(_textType=='travel') {
  3073 + if(xxgbc.bcsj>0)
  3074 + textNode.text(xxgbc.fcsj);
  3075 + }else if(_textType=='gap') {
  3076 + if(xxgbc.bcsj>0)
  3077 + textNode.text('保:' + xxgbc.bcsj);
  3078 + }
  3079 + }
  3080 + }else if(xxgbc.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.normal) {
  3081 + /**
  3082 + * 11.1.4.7.2、如果是正常班次.
  3083 + *
  3084 + **/
  3085 + // 11.1.4.7.2.1、修改上上个班次元素的数据停站时间属性值.
  3086 + xxgbc.STOPTIME = parseInt((BaseFun.getDateTime(_obj.lastData.fcsj) - BaseFun.getDateTime(xxgbc.ARRIVALTIME)) / 60000);
  3087 + // 11.1.4.7.2.2、修改上上个班次text元素属性值.
  3088 + var _normalxxgbc = d3.selectAll('text[parent-node=' + _obj.lastbcNode.attr('last-node') +']')[0];
  3089 + for(var i = 0 ;i < _normalxxgbc.length ;i++) {
  3090 + var normalxxgbcNode_ = d3.select(_normalxxgbc[i]);
  3091 + if(normalxxgbcNode_.attr('text-type')=='gap')
  3092 + normalxxgbcNode_.text('停:' + xxgbc.STOPTIME);
  3093 + }
  3094 + }
  3095 + }else {
  3096 + /**
  3097 + * 1.5.6、修改上个元素班次与当前班次的停站时间和text元素的文本属性值.
  3098 + *
  3099 + **/
  3100 + _obj.lastData.STOPTIME = parseInt((BaseFun.getDateTime(d.fcsj) - BaseFun.getDateTime(_obj.lastData.ARRIVALTIME)) / 60000);
  3101 + for(var t = 0 ; t < _obj.lastTextNodes.length ;t++) {
  3102 + var nowTextNode = d3.select(_obj.lastTextNodes[t]);
  3103 + if(nowTextNode.attr('text-type')=='gap')
  3104 + d3.select(nowTextNode).text('停:' + _obj.lastData.STOPTIME);
  3105 + }
  3106 + }
  3107 + }else if(_obj.lastData.STOPTIME<0) {
  3108 + _obj.lastData.STOPTIME = minSoptTime;
  3109 + $_date = BaseFun.getDateTime(_obj.lastData.ARRIVALTIME);
  3110 + $_date.setMinutes($_date.getMinutes()+minSoptTime);
  3111 + var $_x = parseInt($_date.getHours()-$_GlobalGraph.configuration.dxHours)*60*$_GlobalGraph.configuration.multiple +
  3112 + parseInt($_date.getMinutes())*$_GlobalGraph.configuration.multiple + $_GlobalGraph.configuration.offsetX;
  3113 + d.fcsj = BaseFun.getTimeStr($_date);
  3114 + $_date.setMinutes($_date.getMinutes()+ d.bcsj);
  3115 + d.ARRIVALTIME = BaseFun.getTimeStr($_date);
  3116 + d3.select(this).attr('x',$_x);
  3117 + _obj.qdbcNode.attr('x',$_x);
  3118 + for(var t = 0 ; t < _obj.lastTextNodes.length ;t++) {
  3119 + var nowlastTextNode = d3.select(_obj.lastTextNodes[t]);
  3120 + if(nowlastTextNode.attr('text-type')=='gap')
  3121 + nowlastTextNode.text('停:' + _obj.lastData.STOPTIME);
  3122 + }
  3123 + _obj.dqbcCircleNode.attr('cx',
  3124 + parseInt(_obj.qdbcNode.attr('x')) + (d.bcsj) * ($_GlobalGraph.configuration.multiple) - 12);// 1.5.3.3、修改属于当前班次元素的circle元素圆的cx值.
  3125 + var _text = parseInt(_obj.qdbcNode.attr('x')) +
  3126 + (d.bcsj) * ($_GlobalGraph.configuration.multiple) - 18;
  3127 + var textNodes = _obj.dqbctextNodes;
  3128 + for(var n = 0 ; n < _obj.dqbctextNodes.length ; n++) {
  3129 + var tn = d3.select(_obj.dqbctextNodes[n]);
  3130 + var _textType = tn.attr('text-type');
  3131 + if(_textType =='bcType')
  3132 + d3.select(textNodes[n]).attr('x',_text);
  3133 + else
  3134 + d3.select(textNodes[n]).attr('x',$_x);
  3135 + if(_textType=='timeslot') {
  3136 + d3.select(_obj.dqbctextNodes[n]).text(d.fcsj + '~' + d.ARRIVALTIME);
  3137 + }else if(_textType=='gap') {
  3138 + d.STOPTIME = parseInt((BaseFun.getDateTime(_obj.nextData.fcsj) - BaseFun.getDateTime(d.ARRIVALTIME)) / 60000);
  3139 + d3.select(textNodes[n]).text('停:' + d.STOPTIME);
  3140 + }
  3141 +
  3142 + }
  3143 + }
  3144 + d3.selectAll('text[parent-node='+ _obj.qdbcNodeId +']').classed({'alert-danger':false});
  3145 + RelationshipGraph.reDrawDepart();
  3146 + $_GlobalGraph.addHistory();
  3147 + }
  3148 + }
  3149 + }, {
  3150 + /**
  3151 + * @description : (TODO) 根据一个班次rect元素属性ID值获取上下相邻两个班次的相关信息.
  3152 + *
  3153 + * @params [idValue--某个班次元素对象字符串ID值]
  3154 + *
  3155 + * @returns 返回一个Object
  3156 + *
  3157 + * @status OK.
  3158 + **/
  3159 + key : 'getContextNodeAndData',
  3160 + value : function(idValue) {
  3161 + // 1、定义当前元素班次的底层rect元素.
  3162 + var qdbcNode = d3.select('rect[id='+ idValue +']');
  3163 + // 2、定义当前班次数据.
  3164 + var dqbcData = qdbcNode.data()[0];
  3165 + // 3、定义上个班次、下个班次的ID属性值.
  3166 + var lastbcNodeId = qdbcNode.attr('last-node'),nextbcNodeId = qdbcNode.attr('next-node');
  3167 + // 4、定义上个元素班次的底层rect元素.
  3168 + var lastbcNode = d3.select('rect[id='+ lastbcNodeId +']');
  3169 + // 5、定义上个班次数据.
  3170 + var lastData = lastbcNode.data()[0];
  3171 + // 6、定义下个班次元素对象
  3172 + var nextbcNode = d3.select('rect[id='+ nextbcNodeId +']');
  3173 + // 7、定义下个班次数据.
  3174 + var nextData = nextbcNode.data()[0];
  3175 + return {'qdbcNodeId':idValue,
  3176 + 'qdbcNode':qdbcNode,
  3177 + 'dqbctextNodes':d3.selectAll('text[parent-node='+ idValue +']')[0],// 当前班次元素对象的text文本元素.
  3178 + 'dqbcCircleNode':d3.select(d3.selectAll('circle[parent-node='+ idValue +']')[0][0]),// 当前班次元素对象的circle圆元素
  3179 + 'dqbcData' : dqbcData,
  3180 + 'lastbcNodeId':lastbcNodeId,
  3181 + 'lastbcNode':lastbcNode,
  3182 + 'lastTextNodes': d3.selectAll('text[parent-node='+ lastbcNodeId +']')[0],// 下个班次元素对象的text元素对象
  3183 + 'lastbcCircleNode':d3.select(d3.selectAll('circle[parent-node='+ lastbcNodeId +']')[0][0]),// 下个班次元素对象的circle元素对象
  3184 + 'lastData':lastData,
  3185 + 'nextbcNodeId':nextbcNodeId,
  3186 + 'nextbcNode':nextbcNode,
  3187 + 'nextbctextNodes' : d3.selectAll('text[parent-node='+ nextbcNodeId +']')[0],// 下个班次元素对象的text元素对象
  3188 + 'nextbcCircleNode':d3.select(d3.selectAll('circle[parent-node='+ nextbcNodeId +']')[0][0]),// 下个班次元素对象的circle元素对象
  3189 + 'nextData':nextData
  3190 + };
  3191 + }
  3192 + }, {
  3193 + /**
  3194 + * @description : (TODO) 修改班次属性值.
  3195 + *
  3196 + * @param
  3197 + *
  3198 + * @status OK.
  3199 + *
  3200 + * */
  3201 + key : 'updbcData',
  3202 + value : function updbcData(obj) {
  3203 +
  3204 + }
  3205 + }, {
  3206 + /**
  3207 + * @description : (TODO) 判断是否为首末班车班次.
  3208 + *
  3209 + * @params : [str--时间字符串]
  3210 + *
  3211 + * @return : 返回布尔值.
  3212 + *
  3213 + **/
  3214 + key : 'issmbc',
  3215 + value : function issmbc(str) {
  3216 + var tag = false;
  3217 + var list = $_GlobalGraph.configuration.dataMap.smbcsjArr;// 获取起终点站首末班车时间对成数组
  3218 + var len = list.length;
  3219 + for(var t = 0 ; t<len ; t++) {
  3220 + if(str== list[t].kssj || str == list[t].jssj)
  3221 + tag = true;
  3222 + }
  3223 + return tag;
  3224 + }
  3225 + }, {
  3226 + key : 'zbTosj',
  3227 + value : function zbTosj(_d3x) {
  3228 + var hour = parseInt(_d3x/($_GlobalGraph.configuration.multiple*60)) + $_GlobalGraph.configuration.dxHours;
  3229 + var min = parseInt((_d3x%($_GlobalGraph.configuration.multiple*60))/$_GlobalGraph.configuration.multiple);
  3230 + return {'hour': hour<10? '0' + hour : hour ,'min' : min < 10 ? '0' + min : min};
  3231 +
  3232 + }
  3233 + }, {
  3234 + /**
  3235 + * @description : (TODO) 修改text沿X方向的X坐标属性值和文本内容.
  3236 + *
  3237 + * @status : OK.
  3238 + **/
  3239 + key : 'changeNode',
  3240 + value : function changeNode(node,dx,d) {
  3241 + // 1、获取当前text元素对象.
  3242 + var textNode = d3.select(node);
  3243 + // 2、修改当前text元素的X属性值
  3244 + textNode.attr('x',parseInt(textNode.attr('x'))+dx);
  3245 + // 3、获取当前元素的text-type属性值.
  3246 + var _textType = textNode.attr('text-type');
  3247 + /**
  3248 + * 4、判断当前元素的text-type属性值类型.
  3249 + *
  3250 + * ✿ 如果是timeslot.代表的是第一行的text文本.发车时间 ~ 到达时间
  3251 + *
  3252 + * ✿ 如果是gap.代表的是第三行的text文本. 停站时间.
  3253 + */
  3254 + if(_textType=='timeslot') {
  3255 + // 4.1、修改第一行的text文本.发车时间 ~ 到达时间
  3256 + if(d.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.bd &&
  3257 + d.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.out &&
  3258 + d.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.cf &&
  3259 + d.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.in_ &&
  3260 + d.bcType != $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)
  3261 + textNode.text(d.fcsj + '~' + d.ARRIVALTIME);
  3262 +
  3263 + }else if(_textType=='travel') {
  3264 + if(d.bcsj>0) {
  3265 + // 4.2 修改第二行的text文本.
  3266 + if(d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd ||
  3267 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||
  3268 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_ ||
  3269 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)
  3270 + textNode.text(d.fcsj);
  3271 + else if(d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.cf)
  3272 + textNode.text('吃:' + d.bcsj);
  3273 + else
  3274 + textNode.text("行:" + d.bcsj);
  3275 + }
  3276 + }else if(_textType=='gap') {
  3277 + if(d.bcsj>0) {
  3278 + // 4.3 修改第三行的text文本. 停站时间.
  3279 + if(d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.bd||
  3280 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.lc)
  3281 + textNode.text('保:' + d.bcsj);
  3282 + else if(d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.out ||
  3283 + d.bcType == $_GlobalGraph.configuration.dataMap.bcTypeArr.in_)
  3284 + textNode.text('行:' + d.bcsj);
  3285 + else
  3286 + textNode.text('停:' + d.STOPTIME);
  3287 + }
  3288 + }
  3289 + }
  3290 + }, {
  3291 + key: 'verifyJson',
  3292 + value: function verifyJson(json) {
  3293 + if (!RelationshipGraph.isArray(json) || json.length < 0 || _typeof(json[0]) !== 'object') {
  3294 + throw 'JSON是JavaScript对象,不为空数组.';
  3295 + }
  3296 + var length = json.length;
  3297 + while (length--) {
  3298 + var element = json[length];
  3299 + var keys = Object.keys(element);
  3300 + var keyLength = keys.length;
  3301 + var parentColor = element.parentColor;
  3302 + if (element.parent === undefined) {
  3303 + throw '孩子没有父节点.';
  3304 + } else if (parentColor !== undefined && (parentColor > 4 || parentColor < 0)) {
  3305 + throw '父节点不支持该颜色.';
  3306 + }
  3307 + while (keyLength--) {
  3308 + if (keys[keyLength].toUpperCase() == 'VALUE') {
  3309 + if (keys[keyLength] != 'value') {
  3310 + json[length].value = json[length][keys[keyLength]];
  3311 + delete json[length][keys[keyLength]];
  3312 + }
  3313 + break;
  3314 + }
  3315 + }
  3316 + }
  3317 + return true;
  3318 + }
  3319 + }]);
  3320 + return RelationshipGraph;
  3321 +}();
  3322 +
  3323 +/** 创建关系图层
  3324 + *
  3325 + * @param {Object} 图层参数配置信息
  3326 + *
  3327 + * @return {Object} 返回创建图层对象
  3328 + *
  3329 + **/
  3330 +d3.selection.prototype.relationshipGraph = function (userConfig) {
  3331 + 'use strict';
  3332 + $_GlobalGraph = new RelationshipGraph(this, userConfig);
  3333 + return $_GlobalGraph;
  3334 +};
  3335 +
  3336 +/**
  3337 + * 全局定义,模块,svgelement
  3338 + *
  3339 + *
  3340 + */
  3341 +(function (root, factory) {
  3342 + 'use strict';
  3343 + if (typeof define === 'function' && define.amd) {
  3344 + define(['d3'], factory);
  3345 + } else if ((typeof module === 'undefined' ? 'undefined' : _typeof(module)) === 'object' && module.exports) {
  3346 + module.exports = function (d3) {
  3347 + d3.tip = factory(d3);
  3348 + return d3.tip;
  3349 + };
  3350 + } else {
  3351 + window.d3.tip = factory(d3);
  3352 + }
  3353 +})(undefined, function (d3) {
  3354 + 'use strict';
  3355 + return function () {
  3356 + var d3TipDirection = function d3TipDirection() {
  3357 + return 'n';
  3358 + };
  3359 + var d3TipOffset = function d3TipOffset() {
  3360 + return [0, 0];
  3361 + };
  3362 +
  3363 + var d3TipHtml = function d3TipHtml() {
  3364 + return ' ';
  3365 + };
  3366 + var initNode = function initNode() {
  3367 + var node = d3.select(document.createElement('div'));
  3368 + node.style('position', 'absolute').style('top', 0).style('opacity', 0).style('pointer-events', 'none').style('box-sizing', 'border-box');
  3369 + return node.node();
  3370 + };
  3371 + var getNodeEl = function getNodeEl() {
  3372 + if (node === null) {
  3373 + node = initNode();
  3374 + document.body.appendChild(node);
  3375 + }
  3376 +
  3377 + return d3.select(node);
  3378 + };
  3379 + var getScreenBBox = function getScreenBBox() {
  3380 + var targetel = target || d3.event.target;
  3381 +
  3382 + while ('undefined' === typeof targetel.getScreenCTM && 'undefined' === targetel.parentNode) {
  3383 + targetel = targetel.parentNode;
  3384 + }
  3385 +
  3386 + var bbox = {},
  3387 + matrix = targetel.getScreenCTM(),
  3388 + tbbox = targetel.getBBox(),
  3389 + width = tbbox.width,
  3390 + height = tbbox.height,
  3391 + x = tbbox.x,
  3392 + y = tbbox.y;
  3393 +
  3394 + point.x = x;
  3395 + point.y = y;
  3396 + bbox.nw = point.matrixTransform(matrix);
  3397 + point.x += width;
  3398 + bbox.ne = point.matrixTransform(matrix);
  3399 + point.y += height;
  3400 + bbox.se = point.matrixTransform(matrix);
  3401 + point.x -= width;
  3402 + bbox.sw = point.matrixTransform(matrix);
  3403 + point.y -= height / 2;
  3404 + bbox.w = point.matrixTransform(matrix);
  3405 + point.x += width;
  3406 + bbox.e = point.matrixTransform(matrix);
  3407 + point.x -= width / 2;
  3408 + point.y -= height / 2;
  3409 + bbox.n = point.matrixTransform(matrix);
  3410 + point.y += height;
  3411 + bbox.s = point.matrixTransform(matrix);
  3412 + return bbox;
  3413 + };
  3414 + var direction = d3TipDirection,
  3415 + offset = d3TipOffset,
  3416 + html = d3TipHtml,
  3417 + node = initNode(),
  3418 + svg = null,
  3419 + point = null,
  3420 + target = null;
  3421 + var getPageTopLeft = function getPageTopLeft(el) {
  3422 + var rect = el.getBoundingClientRect(),
  3423 + docEl = document.documentElement;
  3424 + return {
  3425 + top: rect.top + (window.pageYOffset || docEl.scrollTop || 0),
  3426 + right: rect.right + (window.pageXOffset || 0),
  3427 + bottom: rect.bottom + (window.pageYOffset || 0),
  3428 + left: rect.left + (window.pageXOffset || docEl.scrollLeft || 0)
  3429 + };
  3430 + };
  3431 + var functor = function functor(val) {
  3432 + return typeof val === 'function' ? val : function () {
  3433 + return val;
  3434 + };
  3435 + };
  3436 + var directionN = function directionN() {
  3437 + var bbox = getScreenBBox();
  3438 + return {
  3439 + top: bbox.n.y - node.offsetHeight,
  3440 + left: bbox.n.x - node.offsetWidth / 2
  3441 + };
  3442 + };
  3443 + var directionS = function directionS() {
  3444 + var bbox = getScreenBBox();
  3445 + return {
  3446 + top: bbox.s.y,
  3447 + left: bbox.s.x - node.offsetWidth / 2
  3448 + };
  3449 + };
  3450 + var directionE = function directionE() {
  3451 + var bbox = getScreenBBox();
  3452 + return {
  3453 + top: bbox.e.y - node.offsetHeight / 2,
  3454 + left: bbox.e.x
  3455 + };
  3456 + };
  3457 + var directionW = function directionW() {
  3458 + var bbox = getScreenBBox();
  3459 + return {
  3460 + top: bbox.w.y - node.offsetHeight / 2,
  3461 + left: bbox.w.x - node.offsetWidth
  3462 + };
  3463 + };
  3464 +
  3465 + var directionNW = function directionNW() {
  3466 + var bbox = getScreenBBox();
  3467 + return {
  3468 + top: bbox.nw.y - node.offsetHeight,
  3469 + left: bbox.nw.x - node.offsetWidth
  3470 + };
  3471 + };
  3472 + var directionNE = function directionNE() {
  3473 + var bbox = getScreenBBox();
  3474 + return {
  3475 + top: bbox.ne.y - node.offsetHeight,
  3476 + left: bbox.ne.x
  3477 + };
  3478 + };
  3479 + var directionSW = function directionSW() {
  3480 + var bbox = getScreenBBox();
  3481 + return {
  3482 + top: bbox.sw.y,
  3483 + left: bbox.sw.x - node.offsetWidth
  3484 + };
  3485 + };
  3486 +
  3487 + var directionSE = function directionSE() {
  3488 + var bbox = getScreenBBox();
  3489 + return {
  3490 + top: bbox.se.y,
  3491 + left: bbox.e.x
  3492 + };
  3493 + };
  3494 + var direction_callbacks = d3.map({
  3495 + n: directionN,
  3496 + s: directionS,
  3497 + e: directionE,
  3498 + w: directionW,
  3499 + nw: directionNW,
  3500 + ne: directionNE,
  3501 + sw: directionSW,
  3502 + se: directionSE
  3503 + }),
  3504 + directions = direction_callbacks.keys();
  3505 + var getSVGNode = function getSVGNode(el) {
  3506 + el = el.node();
  3507 + if (el.tagName.toLowerCase() === 'svg') {
  3508 + return el;
  3509 + }
  3510 + return el.ownerSVGElement;
  3511 + };
  3512 + var tip = function tip(vis) {
  3513 + svg = getSVGNode(vis);
  3514 + point = svg.createSVGPoint();
  3515 + document.body.appendChild(node);
  3516 + };
  3517 + tip.show = function () {
  3518 + var _this = this;
  3519 + var args = Array.prototype.slice.call(arguments);
  3520 + if (args[args.length - 1] instanceof SVGElement) {
  3521 + target = args.pop();
  3522 + }
  3523 + var content = html.apply(_this, args),
  3524 + poffset = offset.apply(_this, args),
  3525 + nodel = getNodeEl(),
  3526 + scrollTop = document.documentElement.scrollTop || document.body.scrollTop,
  3527 + scrollLeft = document.documentElement.scrollLeft || document.body.scrollLeft;
  3528 + var coords = void 0,
  3529 + dir = direction.apply(_this, args),
  3530 + i = directions.length;
  3531 +
  3532 + tipEventTimer = setTimeout(function(e) {
  3533 + nodel.html(content).style('position', 'absolute').style('opacity', 1).style('pointer-events', 'all');
  3534 + },500);
  3535 +
  3536 + var node = nodel._groups ? nodel._groups[0][0] : nodel[0][0],
  3537 + nodeWidth = node.clientWidth,
  3538 + nodeHeight = node.clientHeight,
  3539 + windowWidth = window.innerWidth,
  3540 + windowHeight = window.innerHeight,
  3541 + elementCoords = getPageTopLeft(_this),
  3542 + breaksTop = elementCoords.top - nodeHeight < 0,
  3543 + breaksLeft = elementCoords.left - nodeWidth < 0,
  3544 + breaksRight = elementCoords.right + nodeHeight > windowWidth,
  3545 + breaksBottom = elementCoords.bottom + nodeHeight > windowHeight;
  3546 + if (breaksTop && !breaksRight && !breaksBottom && breaksLeft) {
  3547 + dir = 'e';
  3548 + } else if (breaksTop && !breaksRight && !breaksBottom && !breaksLeft) {
  3549 + dir = 's';
  3550 + } else if (breaksTop && breaksRight && !breaksBottom && !breaksLeft) {
  3551 + dir = 'w';
  3552 + } else if (!breaksTop && !breaksRight && !breaksBottom && breaksLeft) {
  3553 + dir = 'e';
  3554 + } else if (!breaksTop && !breaksRight && breaksBottom && breaksLeft) {
  3555 + dir = 'e';
  3556 + } else if (!breaksTop && !breaksRight && breaksBottom && !breaksLeft) {
  3557 + dir = 'e';
  3558 + } else if (!breaksTop && breaksRight && breaksBottom && !breaksLeft) {
  3559 + dir = 'n';
  3560 + } else if (!breaksTop && breaksRight && !breaksBottom && !breaksLeft) {
  3561 + dir = 'w';
  3562 + }
  3563 + direction(dir);
  3564 + while (i--) {
  3565 + nodel.classed(directions[i], false);
  3566 + }
  3567 + coords = direction_callbacks.get(dir).apply(_this);
  3568 + nodel.classed(dir, true).style('top', coords.top + poffset[0] + scrollTop + 'px').style('left', coords.left + poffset[1] + scrollLeft + 'px');
  3569 + return tip;
  3570 + };
  3571 + tip.hide = function () {
  3572 + clearTimeout(tipEventTimer);
  3573 + var nodel = getNodeEl();
  3574 + nodel.style('opacity', 0).style('pointer-events', 'none');
  3575 + return tip;
  3576 + };
  3577 + tip.attr = function (n) {
  3578 + if (arguments.length < 2 && typeof n === 'string') {
  3579 + return getNodeEl().attr(n);
  3580 + } else {
  3581 + var args = Array.prototype.slice.call(arguments);
  3582 + d3.selection.prototype.attr.apply(getNodeEl(), args);
  3583 + }
  3584 +
  3585 + return tip;
  3586 + };
  3587 + tip.style = function (n) {
  3588 + if (arguments.length < 2 && typeof n === 'string') {
  3589 + return getNodeEl().style(n);
  3590 + } else {
  3591 + var args = Array.prototype.slice.call(arguments);
  3592 +
  3593 + if (args.length === 1) {
  3594 + var styles = args[0],
  3595 + keys = Object.keys(styles);
  3596 +
  3597 + for (var key = 0; key < keys.length; key++) {
  3598 + d3.selection.prototype.style.apply(getNodeEl(), styles[key]);
  3599 + }
  3600 + }
  3601 + }
  3602 +
  3603 + return tip;
  3604 + };
  3605 + tip.direction = function (v) {
  3606 + if (!arguments.length) {
  3607 + return direction;
  3608 + }
  3609 + direction = v == null ? v : functor(v);
  3610 + return tip;
  3611 + };
  3612 + tip.offset = function (v) {
  3613 + if (!arguments.length) {
  3614 + return offset;
  3615 + }
  3616 + offset = v == null ? v : functor(v);
  3617 + return tip;
  3618 + };
  3619 + tip.html = function (v) {
  3620 + if (!arguments.length) {
  3621 + return html;
  3622 + }
  3623 + html = v == null ? v : functor(v);
  3624 + return tip;
  3625 + };
  3626 + tip.destroy = function () {
  3627 + if (node) {
  3628 + getNodeEl().remove();
  3629 + node = null;
  3630 + }
  3631 + return tip;
  3632 + };
  3633 + return tip;
  3634 + };
3635 }); 3635 });
3636 \ No newline at end of file 3636 \ No newline at end of file
src/main/resources/static/pages/permission/user/controlAllot.html
@@ -35,7 +35,7 @@ @@ -35,7 +35,7 @@
35 <div style="border: 1px solid #cccbcb;height: 190px;position: relative;"> 35 <div style="border: 1px solid #cccbcb;height: 190px;position: relative;">
36 <span style="display: block;margin: 10px;color: grey;">已分配的线路</span> 36 <span style="display: block;margin: 10px;color: grey;">已分配的线路</span>
37 37
38 - <div class="line-list" style="height: 110px;"> 38 + <div class="line-list" style="height: 110px;overflow: auto;padding: 9px;">
39 </div> 39 </div>
40 40
41 <div style="padding-left: 8px;"> 41 <div style="padding-left: 8px;">
src/main/resources/static/real_control_v2/css/main.css
@@ -899,4 +899,28 @@ option.oil_station_opt{ @@ -899,4 +899,28 @@ option.oil_station_opt{
899 899
900 #oil_station-modal .uk-modal .uk-form.fv-form{ 900 #oil_station-modal .uk-modal .uk-form.fv-form{
901 margin-bottom: 0 !important; 901 margin-bottom: 0 !important;
  902 +}
  903 +
  904 +#gb_wait_modal .uk-modal-spinner{
  905 + top: 25px;
  906 + -webkit-transform: translate(-50%,0);
  907 + transform: translate(-50%,0);
  908 +}
  909 +
  910 +#gb_wait_modal .wait-modal-text{
  911 + text-align: center;
  912 + margin-top: 35px;
  913 + font-size: 15px;
  914 + color: #635e5e;
  915 +}
  916 +
  917 +.park-and-station-wrap{
  918 + margin-top: 9px;
  919 + border: 1px solid #3dce69;
  920 + width: 470px;
  921 + padding: 12px;
  922 + border-radius: 5px;
  923 +}
  924 +.park-and-station-wrap select{
  925 + width: auto !important;
902 } 926 }
903 \ No newline at end of file 927 \ No newline at end of file
src/main/resources/static/real_control_v2/css/modal_extend.css
1 -.uk-modal{  
2 - background: rgba(0,0,0,.4) !important;  
3 -}  
4 -  
5 -.uk-modal-dialog{  
6 - border: 1px solid #dd6952;  
7 -  
8 - position: absolute !important;  
9 - margin: 0 !important;  
10 -}  
11 -  
12 -.uk-modal-dialog.uk-modal-dialog-blank{  
13 - border: none !important;  
14 -}  
15 -  
16 -.uk-modal-header{  
17 - cursor: move;  
18 - user-select: none; 1 +.uk-modal{
  2 + background: rgba(0,0,0,.4) !important;
  3 +}
  4 +
  5 +.uk-modal-dialog{
  6 + border: 1px solid #dd6952;
  7 +
  8 + position: absolute !important;
  9 + margin: 0 !important;
  10 +}
  11 +
  12 +.uk-modal-dialog.uk-modal-dialog-blank{
  13 + border: none !important;
  14 +}
  15 +
  16 +.uk-modal-header{
  17 + cursor: move;
  18 + user-select: none;
19 } 19 }
20 \ No newline at end of file 20 \ No newline at end of file
src/main/resources/static/real_control_v2/fragments/north/nav/line_config/buffer_config.html
@@ -34,7 +34,7 @@ @@ -34,7 +34,7 @@
34 <i class="uk-icon-pencil edit-icon"></i> 34 <i class="uk-icon-pencil edit-icon"></i>
35 </div> 35 </div>
36 </form> 36 </form>
37 - <a style="font-size: 80%;">编辑电子围栏</a> 37 + <!--<a style="font-size: 80%;">编辑电子围栏</a>-->
38 </div> 38 </div>
39 </div> 39 </div>
40 40
@@ -43,14 +43,14 @@ @@ -43,14 +43,14 @@
43 <a class="uk-link-reset">应急停靠</a> 43 <a class="uk-link-reset">应急停靠</a>
44 </h2> 44 </h2>
45 <div> 45 <div>
46 - <form class="uk-form"> 46 + <form class="uk-form" name="yjtkForm">
47 <table> 47 <table>
48 <tr> 48 <tr>
49 <td colspan="2" style="padding-left: 30px;"> 49 <td colspan="2" style="padding-left: 30px;">
50 是否启用 50 是否启用
51 <select class="z-depth-input" name="enableYjtk"> 51 <select class="z-depth-input" name="enableYjtk">
52 - <option>禁用</option>  
53 - <option>启用</option> 52 + <option value="0" >禁用</option>
  53 + <option value="1" {{if enableYjtk}}selected{{/if}}>启用</option>
54 </select> 54 </select>
55 </td> 55 </td>
56 </tr> 56 </tr>
@@ -113,12 +113,61 @@ @@ -113,12 +113,61 @@
113 } 113 }
114 }); 114 });
115 115
116 - //应急停靠 116 + //启禁用应急停靠
117 $('[name=enableYjtk]', wrap).on('change', function () { 117 $('[name=enableYjtk]', wrap).on('change', function () {
118 - 118 + if($(this).val() == '1'){
  119 + enableYjtkForm();
  120 + }
  121 + else
  122 + disabledYjtkForm();
  123 + });
  124 + //参数改变
  125 + $('form[name=yjtkForm] input', wrap).on('blur', function () {
  126 + var field = $(this).attr('name');
  127 + var val = $(this).val();
  128 + if (conf[field] != val) {
  129 + var data = $('form[name=yjtkForm]', wrap).serializeJSON();
  130 + data.lineCode = conf.line.lineCode;
  131 + gb_common.$post('/lineConfig/yjtkSet', data, function (rs) {
  132 + conf = rs.conf;
  133 + notify_succ('调整应急停靠参数');
  134 + });
  135 + }
119 }); 136 });
120 }); 137 });
121 138
  139 + function enableYjtkForm() {
  140 + var f = $('form[name=yjtkForm]', wrap);
  141 + $('input', f).removeAttr('disabled');
  142 + //开始时间
  143 + if($('[name=yjtkStart]',f).val() == '')
  144 + $('[name=yjtkStart]',f).val('00:00');
  145 + if($('[name=yjtkEnd]',f).val() == '')
  146 + $('[name=yjtkEnd]',f).val('23:59');
  147 +
  148 + var data = f.serializeJSON();
  149 + data.lineCode = conf.line.lineCode;
  150 + gb_common.$post('/lineConfig/yjtkSet', data, function (rs) {
  151 + conf = rs.conf;
  152 + notify_succ('启用应急停靠');
  153 + });
  154 + }
  155 +
  156 + function disabledYjtkForm() {
  157 + var f = $('form[name=yjtkForm]', wrap);
  158 + $('input', f).attr('disabled', 'disabled');
  159 + //恢复val
  160 + $('[name=yjtkStart]',f).val(conf.yjtkStart);
  161 + $('[name=yjtkEnd]',f).val(conf.yjtkEnd);
  162 + $('[name=upStopMinute]',f).val(conf.upStopMinute);
  163 + $('[name=downStopMinute]',f).val(conf.downStopMinute);
  164 +
  165 + var data = {enableYjtk: 0, lineCode: conf.line.lineCode};
  166 + gb_common.$post('/lineConfig/yjtkSet', data, function (rs) {
  167 + conf = rs.conf;
  168 + notify_succ('禁用应急停靠');
  169 + });
  170 + }
122 })(); 171 })();
123 </script> 172 </script>
124 </div> 173 </div>
125 \ No newline at end of file 174 \ No newline at end of file
src/main/resources/static/real_control_v2/fragments/north/nav/line_config/line_config.html
@@ -11,10 +11,6 @@ @@ -11,10 +11,6 @@
11 <div id="buffer_config_panel"></div> 11 <div id="buffer_config_panel"></div>
12 </div> 12 </div>
13 </div> 13 </div>
14 -  
15 - <div style="position: absolute;top: 10px;left: 40%;padding: 10px;color: #fe4242;background: #f2f2f2;box-shadow: 3px 1px 4px 0 rgba(0, 0, 0, 0.2), 1px 0px 5px 0 rgba(0, 0, 0, 0.19);font-size: 16px;">  
16 - 功能调试中,当前页面暂不可用!!!  
17 - </div>  
18 </div> 14 </div>
19 15
20 16
@@ -26,10 +22,9 @@ @@ -26,10 +22,9 @@
26 <li><a data-href="#schedule_reload_time_panel" >班次更新时间</a></li> 22 <li><a data-href="#schedule_reload_time_panel" >班次更新时间</a></li>
27 <li><a data-href="#out_time_type_panel" >出场时间类型</a></li> 23 <li><a data-href="#out_time_type_panel" >出场时间类型</a></li>
28 <li><a data-href="#in_park_source_panel" >原线路回场</a></li> 24 <li><a data-href="#in_park_source_panel" >原线路回场</a></li>
29 - <li><a>到站缓冲区设置</a></li>  
30 - <li><a>应急停靠</a></li>  
31 - <li><a>社会加油站</a></li>  
32 - <li><a class="disabled">漂移判定</a></li> 25 + <li><a data-href="#buffer_inOut_diff_panel">到站缓冲区设置</a></li>
  26 + <li><a data-href="#emergency_stop_panel">应急停靠</a></li>
  27 + <li><a class="disabled">社会加油站</a></li>
33 <li><a class="disabled">到离站预测</a></li> 28 <li><a class="disabled">到离站预测</a></li>
34 <li><a class="disabled">挂牌时刻表</a></li> 29 <li><a class="disabled">挂牌时刻表</a></li>
35 </ul> 30 </ul>
@@ -42,27 +37,6 @@ @@ -42,27 +37,6 @@
42 var modal = '#nav-line_config-modal', 37 var modal = '#nav-line_config-modal',
43 lineConfig, activeCode; 38 lineConfig, activeCode;
44 39
45 - $(modal).on('init', function (e, data) {  
46 - e.stopPropagation();  
47 - var htmlStr = template('nav-line_config-modal-tree-temp', {array: gb_data_basic.activeLines});  
48 - $('.line-config-tree .uk-accordion', modal).html(htmlStr);  
49 -  
50 - if(data.activeCode){  
51 -  
52 - }  
53 - else{  
54 - //没有指定线路,默认展开第一条  
55 - var $first = $('.uk-accordion-title:eq(0)', modal);  
56 - activeCode = $first.data('id');  
57 - load();  
58 -  
59 - setTimeout(function () {  
60 - //选中第一条线路  
61 - $first.trigger('click');  
62 - }, 400);  
63 - }  
64 - });  
65 -  
66 /** 40 /**
67 * 手风琴拨动 41 * 手风琴拨动
68 */ 42 */
@@ -73,6 +47,31 @@ @@ -73,6 +47,31 @@
73 } 47 }
74 }); 48 });
75 49
  50 + $(modal).on('init', function (e, data) {
  51 + e.stopPropagation();
  52 + var htmlStr = template('nav-line_config-modal-tree-temp', {array: gb_data_basic.activeLines});
  53 + $('.line-config-tree .uk-accordion', modal).html(htmlStr);
  54 +
  55 + if(data.activeCode)
  56 + activeCode = data.activeCode;
  57 + else{
  58 + //展开tab激活的线路
  59 + var $activeTab = $('#main-tab-content>li.line_schedule.uk-active');
  60 + if($activeTab.length > 0)
  61 + activeCode = $activeTab.data('id');
  62 + else{
  63 + //展开第一个
  64 + var $first = $('.uk-accordion-title:eq(0)', modal);
  65 + activeCode = $first.data('id');
  66 + }
  67 + }
  68 +
  69 + setTimeout(function () {
  70 + $('.uk-accordion-title[data-id='+activeCode+']', modal).trigger('click');
  71 + }, 500);
  72 + });
  73 +
  74 +
76 var load = function () { 75 var load = function () {
77 //获取线路配置信息 76 //获取线路配置信息
78 $.get('/lineConfig/getByLineCode', {lineCode: activeCode}, function (conf) { 77 $.get('/lineConfig/getByLineCode', {lineCode: activeCode}, function (conf) {
src/main/resources/static/real_control_v2/fragments/north/nav/line_config/line_config_entity.html
@@ -23,9 +23,9 @@ @@ -23,9 +23,9 @@
23 <small><i class="uk-icon-question-circle"></i> 所有发车时间小于该时间的班次都默认跨过24点,手动调整的实发实达均应用此规则。</small> 23 <small><i class="uk-icon-question-circle"></i> 所有发车时间小于该时间的班次都默认跨过24点,手动调整的实发实达均应用此规则。</small>
24 </li> 24 </li>
25 </ul> 25 </ul>
26 - <a class="uk-button uk-button-mini">删除实际排班</a>  
27 - <a class="uk-button uk-button-mini">重新加载实际排班</a>  
28 - <a class="uk-button uk-button-mini">加载历史GPS恢复到离站</a> 26 + <button class="uk-button uk-button-mini" id="clearRealScheduleBtn">删除实际排班</button>
  27 + <button class="uk-button uk-button-mini" id="reLoadRealScheduleBtn">重新加载实际排班</button>
  28 + <button class="uk-button uk-button-mini" disabled>加载历史GPS恢复到离站</button>
29 </div> 29 </div>
30 </div> 30 </div>
31 <div id="out_time_type_panel"> 31 <div id="out_time_type_panel">
@@ -40,6 +40,8 @@ @@ -40,6 +40,8 @@
40 <option {{if outConfig==2}}selected{{/if}} value=2>出站既出场</option> 40 <option {{if outConfig==2}}selected{{/if}} value=2>出站既出场</option>
41 </select> 41 </select>
42 时间作为进出场班次的实际时间 42 时间作为进出场班次的实际时间
  43 + <div class="park-and-station-wrap">
  44 + </div>
43 <ul class="uk-list"> 45 <ul class="uk-list">
44 <li> 46 <li>
45 <small>1、【GPS出场】 使用GPS信号捕获出场时间</small> 47 <small>1、【GPS出场】 使用GPS信号捕获出场时间</small>
@@ -48,7 +50,7 @@ @@ -48,7 +50,7 @@
48 <small>2、【请求出场】 驾驶员请求出场,调度员同意后,取请求时间作为出场时间。如无请求出场,则捕获GPS时间。</small> 50 <small>2、【请求出场】 驾驶员请求出场,调度员同意后,取请求时间作为出场时间。如无请求出场,则捕获GPS时间。</small>
49 </li> 51 </li>
50 <li> 52 <li>
51 - <small>3、【出站既出场】 忽略出场班次,以头班车的发车时间作为出场时间,场既是站或停车场与起点站距离很近时推荐此项。</small> 53 + <small>3、【出站既出场】 忽略出场班次,以头班车的发车时间作为出场时间。</small>
52 </li> 54 </li>
53 </ul> 55 </ul>
54 </div> 56 </div>
@@ -76,14 +78,79 @@ @@ -76,14 +78,79 @@
76 </div> 78 </div>
77 </div> 79 </div>
78 </script> 80 </script>
  81 +
  82 + <script id="park-and-station-temp" type="text/html">
  83 + 场
  84 + <select class="z-depth-input">
  85 + {{each parks as p i}}
  86 + <option value="{{p.code}}" {{if p.code==conf.twinsPark}}selected{{/if}}>{{p.name}}</option>
  87 + {{/each}}
  88 + </select>
  89 + 既是站
  90 + <select class="z-depth-input">
  91 + {{each routes as r i}}
  92 + <option value="{{r.stationCode}}" {{if r.stationCode==conf.twinsStation}}selected{{/if}}>{{r.stationName}}
  93 + </option>
  94 + {{/each}}
  95 + </select>
  96 + </script>
79 <script> 97 <script>
80 (function () { 98 (function () {
81 99
82 - var wrap = '#line_config_entity_wrap', conf; 100 + var wrap = '#line_config_entity_wrap', conf, parks, upStationRoutes;
  101 +
  102 + /**
  103 + * 删除实际排班
  104 + */
  105 + var clearRealSchedule = function (e) {
  106 + e.stopPropagation();
  107 + var lineCode = conf.line.lineCode;
  108 + var htmlStr = '<h4 style="color: red;">你确定要删除【' + conf.line.name + '】今日的实际排班?</h4><h5 style="margin-top: 15px;">今日的实际排班会被删除</h5><h5 style="margin-top: 15px;">人车、路牌、待发等相关班次调整信息会被删除。</h5><h5 style="margin-top: 15px;">调度指令和期间与设备的通讯记录被保留</h5><h5 style="margin-top: 15px;">后台日志中的人工操作痕迹被保留</h5>';
  109 + alt_confirm(htmlStr, function () {
  110 + show_wait_modal('正在清除数据...');
  111 + gb_common.$post('/realSchedule/deleteRealSchedule', {lineCode: lineCode}, function () {
  112 + //刷新班次表格
  113 + gb_schedule_table.reLoadAndRefresh(lineCode);
  114 + hide_wait_modal();
  115 + notify_succ('删除班次成功!!!');
  116 + });
  117 + }, '确认删除' + conf.line.name + '的实际排班', true);
  118 +
  119 + return false;
  120 + };
  121 +
  122 + /**
  123 + * 重新载入实际排班
  124 + */
  125 + var reLoadRealSchedule = function (e) {
  126 + e.stopPropagation();
  127 + var lineCode = conf.line.lineCode;
  128 + show_wait_modal('正在重载数据...');
  129 + gb_common.$post('/realSchedule/reLoadRealSchedule', {lineCode: lineCode}, function () {
  130 + //刷新班次表格
  131 + gb_schedule_table.reLoadAndRefresh(lineCode);
  132 + hide_wait_modal();
  133 + notify_succ('重新载入班次成功');
  134 + });
  135 + return false;
  136 + };
83 137
84 $(wrap).on('init', function (e, data) { 138 $(wrap).on('init', function (e, data) {
85 e.stopPropagation(); 139 e.stopPropagation();
86 conf = data.lineConfig; 140 conf = data.lineConfig;
  141 + //停车场
  142 + $.get('/basic/parks', function (rs) {
  143 + parks = [];
  144 + for (var code in rs) {
  145 + parks.push({code: code, name: rs[code]});
  146 + }
  147 + renderPSDom();
  148 + });
  149 + //上行站点路由
  150 + upStationRoutes = gb_common.groupBy(gb_data_basic.stationRoutes(conf.line.lineCode).sort(function (a, b) {
  151 + return a.stationRouteCode - b.stationRouteCode;
  152 + }), 'directions')[0];
  153 +
87 var htmlStr = template('line_config_entity_form-temp', conf); 154 var htmlStr = template('line_config_entity_form-temp', conf);
88 $('form', wrap).html(htmlStr); 155 $('form', wrap).html(htmlStr);
89 156
@@ -93,56 +160,82 @@ @@ -93,56 +160,82 @@
93 //出场时间类型 160 //出场时间类型
94 $('select[name=outParkTypeSelect]', wrap).on('change', updateOutParkType); 161 $('select[name=outParkTypeSelect]', wrap).on('change', updateOutParkType);
95 //原线路回场 162 //原线路回场
96 - $('select[name=inParkForSourceSelect]', wrap).on('change', enableInParkForSource) 163 + $('select[name=inParkForSourceSelect]', wrap).on('change', enableInParkForSource);
  164 + //删除班次
  165 + $('#clearRealScheduleBtn', wrap).on('click', clearRealSchedule);
  166 + //重新载入实际排班
  167 + $('#reLoadRealScheduleBtn', wrap).on('click', reLoadRealSchedule);
97 }); 168 });
98 169
99 //更新排班时间 170 //更新排班时间
100 var startOptFlag; 171 var startOptFlag;
  172 +
101 function updateStartTime() { 173 function updateStartTime() {
102 - if (startOptFlag || $(this).val()==conf.startOpt) 174 + if (startOptFlag || $(this).val() == conf.startOpt)
103 return; 175 return;
104 startOptFlag = true; 176 startOptFlag = true;
105 var that = this; 177 var that = this;
106 setTimeout(function () { 178 setTimeout(function () {
107 var timeStr = $(that).val(); 179 var timeStr = $(that).val();
108 - gb_common.$post('/lineConfig/editTime', {lineCode: conf.line.lineCode, time: timeStr}, function (rs) { 180 + gb_common.$post('/lineConfig/editTime', {
  181 + lineCode: conf.line.lineCode,
  182 + time: timeStr
  183 + }, function (rs) {
109 notify_succ('班次更新时间调整为 ' + timeStr); 184 notify_succ('班次更新时间调整为 ' + timeStr);
110 conf.startOpt = rs.time; 185 conf.startOpt = rs.time;
111 }); 186 });
112 startOptFlag = false; 187 startOptFlag = false;
113 - }, 500); 188 + }, 300);
114 } 189 }
115 190
116 - var outParkFlag;  
117 function updateOutParkType() { 191 function updateOutParkType() {
118 - if (outParkFlag)  
119 - return;  
120 - outParkFlag = true;  
121 - var that = this;  
122 - setTimeout(function () {  
123 - var type = $(that).val();  
124 - gb_common.$post('/lineConfig/editOutTimeType', {lineCode: conf.line.lineCode, type: type}, function () {  
125 - notify_succ('调整出场时间类型成功!');  
126 - conf.outConfig = type;  
127 - });  
128 - outParkFlag = false;  
129 - }, 500); 192 + var type = $(this).val();
  193 + var lineCode = conf.line.lineCode;
  194 +
  195 + var data = {lineCode: lineCode, type: type, parkCode: '', stationCode: ''};
  196 + //出站既是出场
  197 + if (type == 2) {
  198 + //默认关联 线路标准停车场
  199 + data.parkCode = gb_data_basic.getLineInformation(lineCode).carPark;
  200 + //和上行起点站
  201 + data.stationCode = upStationRoutes[0].stationCode;
  202 + }
  203 + gb_common.$post('/lineConfig/editOutTimeType', data, function (rs) {
  204 + notify_succ('调整出场时间类型成功!');
  205 + conf = rs.conf;
  206 +
  207 + //渲染场站关联dom
  208 + renderPSDom();
  209 + });
130 } 210 }
131 211
132 - var inParkSourceFlag;  
133 function enableInParkForSource() { 212 function enableInParkForSource() {
134 - if(inParkSourceFlag)  
135 - return;  
136 - inParkSourceFlag = true;  
137 - var that = this;  
138 - setTimeout(function () {  
139 - var enable = $(that).val();  
140 - gb_common.$post('/lineConfig/enableInParkForSource', {lineCode: conf.line.lineCode, enable: enable}, function () {  
141 - notify_succ((enable==1?'启用':'禁用') + '原线路回场');  
142 - conf.inParkForSource = enable; 213 + var enable = $(this).val();
  214 + gb_common.$post('/lineConfig/enableInParkForSource', {
  215 + lineCode: conf.line.lineCode,
  216 + enable: enable
  217 + }, function () {
  218 + notify_succ((enable == 1 ? '启用' : '禁用') + '原线路回场');
  219 + conf.inParkForSource = enable;
  220 + });
  221 + }
  222 +
  223 + /**
  224 + * 渲染场既是站dom
  225 + */
  226 + function renderPSDom() {
  227 + var htmlStr = '',
  228 + $panel = $('.park-and-station-wrap', wrap);
  229 + if (conf['outConfig'] == 2) {
  230 + htmlStr = template('park-and-station-temp', {
  231 + parks: parks,
  232 + conf: conf,
  233 + routes: [upStationRoutes[0], upStationRoutes[upStationRoutes.length - 1]]
143 }); 234 });
144 - inParkSourceFlag = false;  
145 - }, 500); 235 + $panel.html(htmlStr).show();
  236 + }
  237 + else
  238 + $panel.html('').hide();
146 } 239 }
147 })(); 240 })();
148 </script> 241 </script>
src/main/resources/static/real_control_v2/js/common.js
@@ -91,8 +91,11 @@ var gb_common = (function () { @@ -91,8 +91,11 @@ var gb_common = (function () {
91 return; 91 return;
92 } 92 }
93 93
94 - if (status == 'ERROR') 94 + if (status == 'ERROR'){
95 UIkit.modal.alert(errorHead + (json.msg ? json.msg : '未知异常'), {labels: {Ok: '确定'}}); 95 UIkit.modal.alert(errorHead + (json.msg ? json.msg : '未知异常'), {labels: {Ok: '确定'}});
  96 + //关闭wait窗口
  97 + hide_wait_modal();
  98 + }
96 else 99 else
97 handle && handle(json); 100 handle && handle(json);
98 } 101 }
@@ -102,6 +105,8 @@ var gb_common = (function () { @@ -102,6 +105,8 @@ var gb_common = (function () {
102 successHandle(JSON.parse(xhr.responseText), succ); 105 successHandle(JSON.parse(xhr.responseText), succ);
103 } else if (ts == 'error') { 106 } else if (ts == 'error') {
104 UIkit.modal.alert(errorHead + xhr.responseText, {labels: {Ok: '确定'}}); 107 UIkit.modal.alert(errorHead + xhr.responseText, {labels: {Ok: '确定'}});
  108 + //关闭wait窗口
  109 + hide_wait_modal();
105 } 110 }
106 } 111 }
107 112
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
@@ -152,6 +152,8 @@ var gb_schedule_table = (function () { @@ -152,6 +152,8 @@ var gb_schedule_table = (function () {
152 } 152 }
153 153
154 //重新渲染表格 154 //重新渲染表格
  155 + reRenderTable(sch.xlBm);
  156 + /*//重新渲染表格
155 var data = gb_common.get_vals(line2Schedule[sch.xlBm]).sort(schedule_sort), 157 var data = gb_common.get_vals(line2Schedule[sch.xlBm]).sort(schedule_sort),
156 dirData = gb_common.groupBy(data, 'xlDir'), 158 dirData = gb_common.groupBy(data, 'xlDir'),
157 tabCont = $('li.line_schedule[data-id=' + sch.xlBm + ']'); 159 tabCont = $('li.line_schedule[data-id=' + sch.xlBm + ']');
@@ -171,11 +173,72 @@ var gb_schedule_table = (function () { @@ -171,11 +173,72 @@ var gb_schedule_table = (function () {
171 //计算应发未发 173 //计算应发未发
172 calc_yfwf_num(sch.xlBm); 174 calc_yfwf_num(sch.xlBm);
173 //重新固定表头 175 //重新固定表头
174 - gb_ct_table.fixedHead($('.line_schedule .ct_table_wrap')); 176 + gb_ct_table.fixedHead($('.line_schedule .ct_table_wrap'));*/
175 //定位到新添加的班次 177 //定位到新添加的班次
176 scroToDl(sch); 178 scroToDl(sch);
177 }; 179 };
178 180
  181 + /**
  182 + * 重新渲染表格
  183 + */
  184 + var reRenderTable = function (lineCode) {
  185 + var data = gb_common.get_vals(line2Schedule[lineCode]).sort(schedule_sort),
  186 + dirData = gb_common.groupBy(data, 'xlDir'),
  187 + tabCont = $('li.line_schedule[data-id=' + lineCode + ']'),
  188 + htmlStr;
  189 +
  190 + if($.isEmptyObject(dirData)){
  191 + $('.schedule-wrap .card-panel', tabCont).html('');
  192 + }
  193 + else {
  194 + for (var upDown in dirData) {
  195 + htmlStr = temps['line-schedule-table-temp']({
  196 + dir: upDown,
  197 + line: gb_data_basic.codeToLine[lineCode],
  198 + list: dirData[upDown]
  199 + });
  200 + $('.schedule-wrap .card-panel:eq(' + upDown + ')', tabCont).html(htmlStr);
  201 + }
  202 + //图例相关
  203 + gb_sch_legend.init(tabCont);
  204 + //标记末班
  205 + markerLastByLine(lineCode);
  206 + //计算应发未发
  207 + calc_yfwf_num(lineCode);
  208 + //重新固定表头
  209 + gb_ct_table.fixedHead($('.line_schedule .ct_table_wrap'));
  210 + }
  211 + };
  212 +
  213 +
  214 + /**
  215 + * 重新从服务器加载数据,并刷新表格
  216 + * @param lineCode
  217 + */
  218 + var reLoadAndRefresh = function (lineCode) {
  219 + $.get('/realSchedule/lines', {
  220 + lines: lineCode + ','
  221 + }, function (rs) {
  222 + if(!rs || $.isEmptyObject(rs)){
  223 + line2Schedule[lineCode] = {};
  224 + }
  225 + else{
  226 + //排序
  227 + rs[lineCode].sort(schedule_sort);
  228 + line2Schedule[lineCode] = {};
  229 + //calc shift
  230 + $.each(rs[lineCode], function () {
  231 + calc_sch_real_shift(this);
  232 + line2Schedule[lineCode][this.id] = this;
  233 + });
  234 + }
  235 + //计算应发未发
  236 + calc_yfwf_num(lineCode);
  237 + //重新渲染
  238 + reRenderTable(lineCode);
  239 + });
  240 + };
  241 +
179 //删除一个班次 242 //删除一个班次
180 var deheteSchedule = function (sch) { 243 var deheteSchedule = function (sch) {
181 sch = line2Schedule[sch.xlBm][sch.id]; 244 sch = line2Schedule[sch.xlBm][sch.id];
@@ -494,6 +557,7 @@ var gb_schedule_table = (function () { @@ -494,6 +557,7 @@ var gb_schedule_table = (function () {
494 reset_drag_active_all: reset_drag_active_all, 557 reset_drag_active_all: reset_drag_active_all,
495 getDl: getDl, 558 getDl: getDl,
496 getNextSch: getNextSch, 559 getNextSch: getNextSch,
497 - addRemarks: addRemarks 560 + addRemarks: addRemarks,
  561 + reLoadAndRefresh: reLoadAndRefresh
498 }; 562 };
499 })(); 563 })();
src/main/resources/static/real_control_v2/js/main.js
@@ -62,7 +62,6 @@ var gb_main_ep = new EventProxy(), @@ -62,7 +62,6 @@ var gb_main_ep = new EventProxy(),
62 }); 62 });
63 63
64 64
65 -  
66 $(document).on('click', '.ct-bottom-drawer-close', function () { 65 $(document).on('click', '.ct-bottom-drawer-close', function () {
67 $(this).parents('.ct-bottom-drawer').removeClass('open'); 66 $(this).parents('.ct-bottom-drawer').removeClass('open');
68 }); 67 });
@@ -106,7 +105,7 @@ var notify_err = function (t) { @@ -106,7 +105,7 @@ var notify_err = function (t) {
106 }); 105 });
107 }; 106 };
108 107
109 -var alt_confirm = function (content, succ, okBtn) { 108 +var alt_confirm = function (content, succ, okBtn, noCenter) {
110 var modalEl = UIkit.modal.confirm(content, function () { 109 var modalEl = UIkit.modal.confirm(content, function () {
111 succ && succ(); 110 succ && succ();
112 modalEl.hide(); 111 modalEl.hide();
@@ -115,10 +114,31 @@ var alt_confirm = function (content, succ, okBtn) { @@ -115,10 +114,31 @@ var alt_confirm = function (content, succ, okBtn) {
115 Ok: okBtn, 114 Ok: okBtn,
116 Cancel: '取消' 115 Cancel: '取消'
117 } 116 }
118 - , center: true 117 + , center: !noCenter
119 }); 118 });
120 }; 119 };
121 120
  121 +var show_wait_modal = function (text) {
  122 + var modalHtml =
  123 + '<div class="uk-modal" id="gb_wait_modal">' +
  124 + ' <div class="uk-modal-dialog">' +
  125 + ' <div class="uk-modal-spinner"></div>' +
  126 + ' <div class="wait-modal-text">' + text + '</div>' +
  127 + ' </div>' +
  128 + '</div>';
  129 +
  130 + $(document.body).append(modalHtml);
  131 + return UIkit.modal('#gb_wait_modal', {
  132 + bgclose: false,
  133 + modal: false
  134 + }).show();
  135 +};
  136 +
  137 +var hide_wait_modal = function () {
  138 + UIkit.modal('#gb_wait_modal').hide();
  139 +};
  140 +
  141 +
122 var isArray = function (obj) { 142 var isArray = function (obj) {
123 return Object.prototype.toString.call(obj) === '[object Array]'; 143 return Object.prototype.toString.call(obj) === '[object Array]';
124 }; 144 };
src/main/resources/static/real_control_v2/js/modal_extend.js
1 -  
2 -//modal hide remove dom  
3 -$(document).on('hide.uk.modal', '.uk-modal', function () {  
4 - $(this).remove();  
5 -});  
6 -  
7 -$(document).on('show.uk.modal', '.uk-modal', function () {  
8 - if($('.uk-modal-dialog', this).hasClass('uk-modal-dialog-blank'))  
9 - return;  
10 -  
11 - //临时放过g'ji轨迹回放  
12 - if($(this).attr('id')=='map-playback-modal')  
13 - return;  
14 - //计算居中位置  
15 - var win = $('body');  
16 - var Y = (win.width() - $('.uk-modal-dialog', this).width()) / 2 - 10;  
17 - $('.uk-modal-dialog', this).css('top', '50px').css('left', Y + 'px');  
18 -});  
19 -  
20 -var show_modal = function (id, dom) {  
21 - $(document.body).append(dom);  
22 - return UIkit.modal(id, {  
23 - bgclose: false  
24 - }).show();  
25 -};  
26 -  
27 -var open_modal = function (pageUrl, data, opt) {  
28 - $.get(pageUrl, function (dom) {  
29 - if (!$(dom).hasClass('uk-modal')) {  
30 - alert('无效的dom片段!');  
31 - return;  
32 - }  
33 - var id = '#' + $(dom).attr('id');  
34 -  
35 - $(document.body).append(dom);  
36 - UIkit.modal(id, opt).show();  
37 - //move  
38 - modal_move($('.uk-modal-header',id));  
39 -  
40 - if (data)  
41 - $(id).trigger('init', data);  
42 - });  
43 -};  
44 -  
45 -  
46 -var modal_move = function (m_header) {  
47 - var _moveFlag;  
48 - var _moveObj;  
49 - var _offset;  
50 - var dict= {};  
51 - var win = $('body');  
52 -  
53 - $(m_header).on('mousedown', function (e) {  
54 - console.log('mousedown');  
55 - e.preventDefault();  
56 - _moveFlag = true;  
57 - _moveObj = $(this).parent();  
58 - _offset = [  
59 - e.clientX - parseFloat(_moveObj.css('left')) - 1,  
60 - e.clientY - parseFloat(_moveObj.css('top')) - 1  
61 - ];  
62 - });  
63 -  
64 - $(m_header).parents('.uk-modal').mousemove(function (e) {  
65 - e.preventDefault();  
66 - if(!_moveFlag || !_moveObj)  
67 - return;  
68 -  
69 - var X = e.clientX - _offset[0]  
70 - ,Y = e.clientY - _offset[1];  
71 -  
72 - dict.stX = win.scrollLeft();  
73 - dict.stY = win.scrollTop();  
74 -  
75 - //控制元素不被拖出窗口外  
76 - var setRig = win.width() - _moveObj.outerWidth() + dict.stX  
77 - ,setBot = win.height() - _moveObj.outerHeight() + dict.stY;  
78 - X < dict.stX && (X = dict.stX);  
79 - X > setRig && (X = setRig);  
80 - Y < dict.stY && (Y = dict.stY);  
81 - Y > setBot && (Y = setBot);  
82 -  
83 - _moveObj.css({  
84 - left: X  
85 - ,top: Y  
86 - });  
87 - });  
88 - $(window).on('mouseup', function () {  
89 - _moveFlag = false;  
90 - _moveObj = null;  
91 - });  
92 -  
93 -}; 1 +
  2 +//modal hide remove dom
  3 +$(document).on('hide.uk.modal', '.uk-modal', function () {
  4 + $(this).remove();
  5 +});
  6 +
  7 +$(document).on('show.uk.modal', '.uk-modal', function () {
  8 + if($('.uk-modal-dialog', this).hasClass('uk-modal-dialog-blank'))
  9 + return;
  10 +
  11 + //临时放过g'ji轨迹回放
  12 + if($(this).attr('id')=='map-playback-modal')
  13 + return;
  14 + //计算居中位置
  15 + var win = $('body');
  16 + var Y = (win.width() - $('.uk-modal-dialog', this).width()) / 2 - 10;
  17 + $('.uk-modal-dialog', this).css('top', '50px').css('left', Y + 'px');
  18 +});
  19 +
  20 +var show_modal = function (id, dom) {
  21 + $(document.body).append(dom);
  22 + return UIkit.modal(id, {
  23 + bgclose: false
  24 + }).show();
  25 +};
  26 +
  27 +var open_modal = function (pageUrl, data, opt) {
  28 + $.get(pageUrl, function (dom) {
  29 + if (!$(dom).hasClass('uk-modal')) {
  30 + alert('无效的dom片段!');
  31 + return;
  32 + }
  33 + var id = '#' + $(dom).attr('id');
  34 +
  35 + $(document.body).append(dom);
  36 + UIkit.modal(id, opt).show();
  37 + //move
  38 + modal_move($('.uk-modal-header',id));
  39 +
  40 + if (data)
  41 + $(id).trigger('init', data);
  42 + });
  43 +};
  44 +
  45 +
  46 +var modal_move = function (m_header) {
  47 + var _moveFlag;
  48 + var _moveObj;
  49 + var _offset;
  50 + var dict= {};
  51 + var win = $('body');
  52 +
  53 + $(m_header).on('mousedown', function (e) {
  54 + console.log('mousedown');
  55 + e.preventDefault();
  56 + _moveFlag = true;
  57 + _moveObj = $(this).parent();
  58 + _offset = [
  59 + e.clientX - parseFloat(_moveObj.css('left')) - 1,
  60 + e.clientY - parseFloat(_moveObj.css('top')) - 1
  61 + ];
  62 + });
  63 +
  64 + $(m_header).parents('.uk-modal').mousemove(function (e) {
  65 + e.preventDefault();
  66 + if(!_moveFlag || !_moveObj)
  67 + return;
  68 +
  69 + var X = e.clientX - _offset[0]
  70 + ,Y = e.clientY - _offset[1];
  71 +
  72 + dict.stX = win.scrollLeft();
  73 + dict.stY = win.scrollTop();
  74 +
  75 + //控制元素不被拖出窗口外
  76 + var setRig = win.width() - _moveObj.outerWidth() + dict.stX
  77 + ,setBot = win.height() - _moveObj.outerHeight() + dict.stY;
  78 + X < dict.stX && (X = dict.stX);
  79 + X > setRig && (X = setRig);
  80 + Y < dict.stY && (Y = dict.stY);
  81 + Y > setBot && (Y = setBot);
  82 +
  83 + _moveObj.css({
  84 + left: X
  85 + ,top: Y
  86 + });
  87 + });
  88 + $(window).on('mouseup', function () {
  89 + _moveFlag = false;
  90 + _moveObj = null;
  91 + });
  92 +
  93 +};
src/main/resources/static/real_control_v2/mapmonitor/css/real.css
@@ -643,4 +643,10 @@ input[type=checkbox].disabled{ @@ -643,4 +643,10 @@ input[type=checkbox].disabled{
643 .uk-button.play-btn[data-type=pause]{ 643 .uk-button.play-btn[data-type=pause]{
644 color: #ff3c3c; 644 color: #ff3c3c;
645 border: 1px solid #ff3c3c; 645 border: 1px solid #ff3c3c;
  646 +}
  647 +
  648 +#map-playback2-modal .z-depth-viewport{
  649 + padding-top: 15px;
  650 + border-right: 1px solid #d8d7d7;
  651 + box-shadow: 3px 1px 8px 0 rgba(0, 0, 0, 0.12), 1px 0px 8px 0 rgba(0, 0, 0, 0.12);
646 } 652 }
647 \ No newline at end of file 653 \ No newline at end of file
src/main/resources/static/real_control_v2/mapmonitor/fragments/playback_v2/main.html 0 → 100644
  1 +<div class="uk-modal" id="map-playback2-modal">
  2 + <div class="uk-modal-dialog uk-modal-dialog-blank">
  3 + <button class="uk-modal-close uk-close" type="button"></button>
  4 + <div class="uk-grid uk-flex-middle" data-uk-grid-margin>
  5 + <div class="uk-width-medium-1-10 uk-height-viewport z-depth-viewport" >
  6 + </div>
  7 + <div class="uk-width-medium-2-10 uk-height-viewport z-depth-viewport">
  8 + </div>
  9 + <div class="uk-width-medium-7-10 uk-height-viewport">
  10 + </div>
  11 + </div>
  12 + </div>
  13 + <script>
  14 + (function () {
  15 + var modal = '#map-playback2-modal';
  16 + })();
  17 + </script>
  18 +</div>