Commit 7672469ffabc41fc2609e64e42733c91e97c6a0d

Authored by 潘钊
2 parents 85dbc8af 6071b396

Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang

# Conflicts:
#	src/main/resources/static/real_control_v2/js/modal_extend.js
#	src/main/resources/static/real_control_v2/mapmonitor/fragments/playback_v2/main.html
Showing 38 changed files with 7566 additions and 7828 deletions
src/main/java/com/bsth/controller/SectionRouteController.java
... ... @@ -72,4 +72,14 @@ public class SectionRouteController extends BaseController<SectionRoute, Integer
72 72 public List<Map<String, Object>> findUpStationRouteCode(@RequestParam Map<String, Object> map) {
73 73 return routeService.findUpSectionRouteCode(map);
74 74 }
  75 +
  76 + /**
  77 + * @Description :TODO(引用路段)
  78 + *
  79 + * @return List<Map<String, Object>>
  80 + */
  81 + @RequestMapping(value = "/quoteSection" , method = RequestMethod.POST)
  82 + public Map<String, Object> quoteSection(@RequestParam Map<String, Object> map) {
  83 + return routeService.quoteSection(map);
  84 + }
75 85 }
... ...
src/main/java/com/bsth/controller/StationRouteController.java
... ... @@ -127,8 +127,17 @@ public class StationRouteController extends BaseController&lt;StationRoute, Integer
127 127 */
128 128 @RequestMapping(value = "/multiLine", method = RequestMethod.GET)
129 129 public Map<String, Object> findByMultiLine(@RequestParam String lineIds){
130   -
131 130 return service.findByMultiLine(lineIds);
132 131 }
133 132  
  133 + /**
  134 + *
  135 + * @Title: updSwitchDir
  136 + * @Description: TODO(上下行切换)
  137 + */
  138 + @RequestMapping(value = "/updSwitchDir", method = RequestMethod.POST)
  139 + public Map<String, Object> updSwitchDir(@RequestParam String lineIds){
  140 + return service.updSwitchDir(lineIds);
  141 + }
  142 +
134 143 }
... ...
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
... ... @@ -369,9 +369,9 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
369 369 }
370 370  
371 371 @RequestMapping(value="/statisticsDailyTj")
372   - public List<Map<String,Object>> statisticsDailyTj(@RequestParam String line, @RequestParam String date,
  372 + public List<Map<String,Object>> statisticsDailyTj(@RequestParam String gsdm,@RequestParam String fgsdm, @RequestParam String line, @RequestParam String date,
373 373 @RequestParam String date2,@RequestParam String xlName, @RequestParam String type){
374   - return scheduleRealInfoService.statisticsDailyTj(line, date,date2, xlName, type);
  374 + return scheduleRealInfoService.statisticsDailyTj(gsdm,fgsdm,line, date,date2, xlName, type);
375 375 }
376 376  
377 377 @RequestMapping(value="/MapById",method = RequestMethod.GET)
... ...
src/main/java/com/bsth/controller/report/ReportController.java
... ... @@ -21,17 +21,17 @@ public class ReportController {
21 21 @Autowired
22 22 ReportService service;
23 23  
24   - @RequestMapping(value="/queryListBczx" ,method = RequestMethod.POST)
  24 + @RequestMapping(value="/queryListBczx" ,method = RequestMethod.GET)
25 25 public List<ScheduleRealInfo> queryListBczx(@RequestParam String clzbh,@RequestParam String line,@RequestParam String date){
26 26 return service.queryListBczx(line,date,clzbh);
27 27 }
28 28  
29   - @RequestMapping(value="/queryListZdxx" ,method = RequestMethod.POST)
  29 + @RequestMapping(value="/queryListZdxx" ,method = RequestMethod.GET)
30 30 public List<ArrivalInfo> queryListZdxx(@RequestParam String clzbh,@RequestParam String line,
31 31 @RequestParam String date,@RequestParam String fcsj,@RequestParam String ddsj){
32 32 return service.queryListZdxx(line,date,clzbh,fcsj,ddsj);
33 33 }
34   - @RequestMapping(value="/queryListClzd" ,method = RequestMethod.POST)
  34 + @RequestMapping(value="/queryListClzd" ,method = RequestMethod.GET)
35 35 public List<ArrivalInfo> queryListClzd(@RequestParam String zd,@RequestParam String line,
36 36 @RequestParam String zdlx,@RequestParam String fcsj,@RequestParam String ddsj){
37 37 return service.queryListClzd(line,zd,zdlx,fcsj,ddsj);
... ...
src/main/java/com/bsth/repository/SectionRepository.java
... ... @@ -113,5 +113,4 @@ public interface SectionRepository extends BaseRepository&lt;Section, Integer&gt; {
113 113 Double speedLimit,String descriptions,Integer version,Integer createBy,String createDate,
114 114  
115 115 Integer updateBy,String updateDate);
116   -
117 116 }
... ...
src/main/java/com/bsth/repository/SectionRouteRepository.java
... ... @@ -28,6 +28,14 @@ import com.bsth.entity.SectionRoute;
28 28 @Repository
29 29 public interface SectionRouteRepository extends BaseRepository<SectionRoute, Integer> {
30 30  
  31 + // 查询最大ID
  32 + @Query(value = "SELECT IFNULL(num,0) as maxId from (SELECT MAX(id) as num FROM bsth_c_sectionroute) k" , nativeQuery=true)
  33 + public long sectionRouteMaxId();
  34 +
  35 + // 查询最大ID
  36 + @Query(value = "SELECT IFNULL(num,0) as maxId from (SELECT MAX(sectionroute_code) as num FROM bsth_c_sectionroute where line_code = 601010 and directions = 1 and destroy = 0) k" , nativeQuery=true)
  37 + public int sectionRouteCodeMaxId();
  38 +
31 39 /**
32 40 * @Description :TODO(查询路段信息)
33 41 *
... ... @@ -162,4 +170,8 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int
162 170 @Modifying
163 171 @Query(value="UPDATE bsth_c_sectionroute set is_roade_speed = ?1 where line= ?2 and directions=?3 ",nativeQuery = true)
164 172 void isRoadSpeedUpd(Integer isR,Integer line,Integer directions);
  173 +
  174 + @Modifying
  175 + @Query(value="update bsth_c_sectionroute set directions = case directions when 1 then 0 when 0 then 1 end where line_code = ?1 ", nativeQuery=true)
  176 + public void sectionRouteDir(Integer line);
165 177 }
... ...
src/main/java/com/bsth/repository/StationRouteRepository.java
... ... @@ -268,4 +268,8 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
268 268 "ORDER BY " +
269 269 "lineCode,directions,stationRouteCode")
270 270 List<Object[]> findAllLineWithYgc();
  271 +
  272 + @Modifying
  273 + @Query(value="update bsth_c_stationroute set directions = case directions when 1 then 0 when 0 then 1 end where line_code = ?1 ", nativeQuery=true)
  274 + public void stationRouteDir(Integer line);
271 275 }
... ...
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
... ... @@ -151,8 +151,8 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
151 151  
152 152 //按照时间段统计
153 153 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
154   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 and s.bcType not in ('in','out') order by s.xlBm")
155   - List<ScheduleRealInfo> scheduleByDateAndLineTj(String line,String date,String date2);
  154 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 and s.bcType not in ('in','out') and gsBm like %?4% and fgsBm like %?5% order by s.xlBm")
  155 + List<ScheduleRealInfo> scheduleByDateAndLineTj(String line,String date,String date2,String gsdm,String fgsdm);
156 156  
157 157 //按照时间段统计
158 158 @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 and s.bcType not in ('in','out') order by s.xlBm")
... ...
src/main/java/com/bsth/service/SectionRouteService.java
... ... @@ -41,4 +41,6 @@ public interface SectionRouteService extends BaseService&lt;SectionRoute, Integer&gt;
41 41 * @return List<Map<String, Object>>
42 42 */
43 43 List<Map<String, Object>> findUpSectionRouteCode(Map<String, Object> map);
  44 +
  45 + Map<String, Object> quoteSection(Map<String, Object> map);
44 46 }
... ...
src/main/java/com/bsth/service/StationRouteService.java
... ... @@ -79,5 +79,7 @@ public interface StationRouteService extends BaseService&lt;StationRoute, Integer&gt;
79 79 */
80 80 List<Map<String, Object>> findStationRouteInfo(Map<String, Object> map);
81 81  
82   - Map<String, Object> findByMultiLine(String lineIds);
  82 + Map<String, Object> findByMultiLine(String lineIds);
  83 +
  84 + Map<String, Object> updSwitchDir(String lineIds);
83 85 }
... ...
src/main/java/com/bsth/service/impl/SectionRouteServiceImpl.java
... ... @@ -8,7 +8,12 @@ import java.util.Map;
8 8 import org.springframework.beans.factory.annotation.Autowired;
9 9 import org.springframework.stereotype.Service;
10 10  
  11 +import com.bsth.common.ResponseCode;
  12 +import com.bsth.entity.Line;
  13 +import com.bsth.entity.Section;
11 14 import com.bsth.entity.SectionRoute;
  15 +import com.bsth.repository.LineRepository;
  16 +import com.bsth.repository.SectionRepository;
12 17 import com.bsth.repository.SectionRouteRepository;
13 18 import com.bsth.service.SectionRouteService;
14 19  
... ... @@ -34,6 +39,12 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ
34 39 @Autowired
35 40 SectionRouteRepository repository;
36 41  
  42 + @Autowired
  43 + SectionRepository repository2;
  44 +
  45 + @Autowired
  46 + LineRepository lineRepository;
  47 +
37 48 /**
38 49 * @Description :TODO(查询路段信息)
39 50 *
... ... @@ -43,21 +54,13 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ
43 54 */
44 55 @Override
45 56 public List<Map<String, Object>> getSectionRoute(Map<String, Object> map) {
46   -
47 57 int lineId = map.get("line.id_eq").equals("") ? 0 : Integer.parseInt(map.get("line.id_eq").toString());
48   -
49 58 int directions = map.get("directions_eq").equals("") ? 0 : Integer.parseInt(map.get("directions_eq").toString());
50   -
51 59 List<Object[]> listObjArray = repository.getSectionRoute(lineId, directions);
52   -
53 60 List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>();
54   -
55 61 if(listObjArray.size()>0) {
56   -
57 62 for(int i = 0 ; i<listObjArray.size() ; i++){
58   -
59 63 Map<String, Object> tempM = new HashMap<String, Object>();
60   -
61 64 tempM.put("sectionrouteId",listObjArray.get(i)[0]);
62 65 tempM.put("sectionrouteLine",listObjArray.get(i)[1]);
63 66 tempM.put("sectionrouteLineCode",listObjArray.get(i)[2]);
... ... @@ -81,12 +84,12 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ
81 84 tempM.put("sectionTime",listObjArray.get(i)[20]);
82 85 tempM.put("sectiondbType",listObjArray.get(i)[21]);
83 86 tempM.put("sectionSpeedLimet",listObjArray.get(i)[22]);
  87 + tempM.put("destroy",listObjArray.get(i)[23]);
  88 + tempM.put("versions",listObjArray.get(i)[24]);
  89 + tempM.put("descriptions",listObjArray.get(i)[25]);
84 90 resultList.add(tempM);
85   -
86 91 }
87   -
88 92 }
89   -
90 93 return resultList;
91 94 }
92 95  
... ... @@ -228,5 +231,68 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ
228 231  
229 232 return list;
230 233 }
  234 +
  235 + @Override
  236 + public Map<String, Object> quoteSection(Map<String, Object> map) {
  237 + Map<String, Object> resultMap = new HashMap<String, Object>();
  238 + try {
  239 + Integer line = map.get("lineId") ==null ? null : Integer.parseInt(map.get("lineId").toString());
  240 + Integer dir = map.get("dir")==null ? null : Integer.parseInt(map.get("dir").toString());
  241 + Integer toDir = map.get("toDir")==null ? null : Integer.parseInt(map.get("toDir").toString());
  242 + if(line!=null && dir!=null) {
  243 + List<Object[]> list = repository.getSectionRoute(line, dir);
  244 + int src = repository.sectionRouteCodeMaxId();
  245 + for(int i = 0 ; i<list.size() ; i++) {
  246 + int sectionId = Integer.parseInt(String.valueOf(repository2.sectionMaxId())) + 1 ;
  247 + String sectionCode = String.valueOf(sectionId);
  248 + String sectionName = list.get(i)[9] == null ? null : list.get(i)[9].toString();
  249 + String crosesRoad = list.get(i)[10] == null ? null : list.get(i)[10].toString();
  250 + String endNode = list.get(i)[11] == null ? null : list.get(i)[11].toString();
  251 + String startNode = list.get(i)[12] == null ? null : list.get(i)[12].toString();
  252 + String middleNode = list.get(i)[13] == null ? null : list.get(i)[13].toString();
  253 + String sectionType = list.get(i)[14] == null ? null : list.get(i)[14].toString();
  254 + String csectionVector = list.get(i)[15] == null ? null : list.get(i)[15].toString();
  255 + String bsectionVector = list.get(i)[16] == null ? null : list.get(i)[16].toString();
  256 + String gsectionVector = list.get(i)[17] == null ? null : list.get(i)[17].toString();
  257 + String roadCoding = list.get(i)[18] == null ? null : list.get(i)[18].toString();
  258 + Double sectionDistance = list.get(i)[19] == null ? null : Double.parseDouble(list.get(i)[19].toString());
  259 + Double sectionTime = list.get(i)[20] == null ? null : Double.parseDouble(list.get(i)[20].toString());
  260 + String dbType = list.get(i)[21] == null ? null : list.get(i)[21].toString();
  261 + Double speedLimit = list.get(i)[22] == null ? null : Double.parseDouble(list.get(i)[22].toString());
  262 + Integer destroy = list.get(i)[23] == null ? null : Integer.parseInt(list.get(i)[23].toString());
  263 + Integer versions = list.get(i)[24] == null ? null : Integer.parseInt(list.get(i)[24].toString());
  264 + String descriptions = list.get(i)[25] == null ? null : list.get(i)[25].toString();
  265 + repository2.systemSave(sectionCode,
  266 + sectionName, crosesRoad, endNode, startNode, middleNode,
  267 + gsectionVector, bsectionVector,
  268 + sectionType, csectionVector, roadCoding,
  269 + sectionDistance, sectionTime, dbType, speedLimit, descriptions, versions, sectionId);
  270 + int sectionRouteId = Integer.parseInt(String.valueOf(repository.sectionRouteMaxId())) + 1 ;
  271 + SectionRoute sr = new SectionRoute();
  272 + Line lineObject = lineRepository.findOne(line);
  273 + Section section = repository2.findOne(sectionId);
  274 + Integer xh = (src == 0 ? (toDir ==1? (list.size()-i)*10 : (list.size()+i)*10) : toDir==1? (src + (list.size()-i)*10) : (src + (list.size()+i)*10)) ;
  275 + sr.setId(sectionRouteId);
  276 + sr.setSectionrouteCode(xh);
  277 + sr.setLineCode(lineObject.getLineCode());
  278 + sr.setSectionCode(sectionCode);
  279 + sr.setDirections(toDir);
  280 + sr.setVersions(versions);
  281 + sr.setDestroy(destroy);
  282 + sr.setLine(lineObject);
  283 + sr.setSection(section);
  284 + sr.setSectionCode(section.getSectionCode());
  285 + sr.setDescriptions(descriptions);
  286 + sr.setIsRoadeSpeed(1);
  287 + repository.save(sr);
  288 + }
  289 + }
  290 + resultMap.put("status", ResponseCode.SUCCESS);
  291 + } catch (Exception e) {
  292 + resultMap.put("status", ResponseCode.ERROR);
  293 + logger.error("save erro.", e);
  294 + }
  295 + return resultMap;
  296 + }
231 297  
232 298 }
... ...
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
... ... @@ -17,6 +17,7 @@ import com.bsth.util.db.DBUtils_MS;
17 17 import com.google.common.base.Splitter;
18 18 import org.springframework.beans.factory.annotation.Autowired;
19 19 import org.springframework.stereotype.Service;
  20 +import org.springframework.transaction.annotation.Transactional;
20 21  
21 22 import java.io.ByteArrayInputStream;
22 23 import java.io.File;
... ... @@ -1080,4 +1081,23 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
1080 1081  
1081 1082 return rs;
1082 1083 }
  1084 +
  1085 + @Override
  1086 + @Transactional
  1087 + public Map<String, Object> updSwitchDir(String lineIds) {
  1088 + Map<String, Object> rs = new HashMap<>();
  1089 + try{
  1090 + if(lineIds!=null && lineIds !="") {
  1091 + Integer lineId = Integer.parseInt(lineIds);
  1092 + // 上行站点切换到下行.
  1093 + repository.stationRouteDir(lineId);
  1094 + routeRepository.sectionRouteDir(lineId);
  1095 + }
  1096 + rs.put("status", ResponseCode.SUCCESS);
  1097 + }catch(Exception e){
  1098 + logger.error("", e);
  1099 + rs.put("status", ResponseCode.ERROR);
  1100 + }
  1101 + return rs;
  1102 + }
1083 1103 }
... ...
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
... ... @@ -327,7 +327,6 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
327 327 }else{
328 328 t.setXlbm("");
329 329 }
330   - t.setJcsx(1);
331 330 boolean status=true;
332 331 for (int j = 0; j < ylListBe.size(); j++) {
333 332 Dlb b=ylListBe.get(j);
... ...
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
... ... @@ -112,7 +112,7 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
112 112  
113 113 List<Map<String,Object>> statisticsDaily(String line, String date, String xlName, String type);
114 114  
115   - List<Map<String,Object>> statisticsDailyTj(String line, String date,String date2, String xlName, String type);
  115 + List<Map<String,Object>> statisticsDailyTj(String gsdm,String fgsdm,String line, String date,String date2, String xlName, String type);
116 116  
117 117 //List<Object> scheduleDaily(String line,String date);
118 118  
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -1576,6 +1576,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1576 1576 remarks += "(烂班)";
1577 1577 s.setRemarks(remarks);
1578 1578 }
  1579 +
1579 1580 listSchedule.add(s);
1580 1581 //计算营运里程,空驶里程
1581 1582 if (!childTaskPlans.isEmpty()) {
... ... @@ -1600,657 +1601,110 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1600 1601 t.setAdjustExps("子");
1601 1602 listSchedule.add(t);
1602 1603 }
1603   - /* String sqlPc = "select * from bsth_c_s_child_task where schedule=" + s.getId() + " order by start_date ";
1604   - List<ScheduleRealInfo> lists = jdbcTemplate.query(sqlPc,
1605   - new RowMapper<ScheduleRealInfo>() {
1606   - @Override
1607   - public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
1608   - ScheduleRealInfo t = new ScheduleRealInfo();
1609   - if (rs.getInt("destroy") == 0) {
1610   - t.setFcsjActual(rs.getString("start_date"));
1611   - t.setZdsjActual(rs.getString("end_date"));
1612   - t.setJhlc(rs.getDouble("mileage"));
1613   - } else {
1614   - t.setFcsjActual("");
1615   - t.setZdsjActual("");
1616   - t.setJhlc(0.0);
1617   - }
1618   - t.setQdzName(rs.getString("start_station_name"));
1619   - t.setZdzName(rs.getString("end_station_name"));
1620   - t.setRemarks(rs.getString("remarks"));
1621   - t.setAdjustExps("子");
1622   - return t;
1623   - }
1624   - });
1625   - for (int j = 0; j < lists.size(); j++) {
1626   - ScheduleRealInfo t = lists.get(j);
1627   - listSchedule.add(t);
1628   - }*/
1629   - }
1630   - }
1631   -
1632   - return listSchedule;
1633   - }
1634   -
1635   - @Override
1636   - public Map<String, Object> removeChildTask(Long taskId) {
1637   - Map<String, Object> rs = new HashMap<>();
1638   - ChildTaskPlan chTask = cTaskPlanRepository.findOne(taskId);
1639   -
1640   - ScheduleRealInfo sch = dayOfSchedule.get(chTask.getSchedule().getId());
1641   - try {
1642   -
1643   - sch.getcTasks().remove(chTask);
1644   - scheduleRealInfoRepository.save(sch);
1645   - rs.put("status", ResponseCode.SUCCESS);
1646   - } catch (Exception e) {
1647   - logger.error("", e);
1648   - rs.put("status", ResponseCode.ERROR);
1649   - }
1650   - return rs;
1651   - }
1652   - @Override
1653   - public List<Map<String, Object>> statisticsDaily(String line, String date,
1654   - String xlName, String type) {
1655   - List<Map<String, Object>> lMap= new ArrayList<Map<String, Object>>();
1656   - List<ScheduleRealInfo> lists = scheduleRealInfoRepository.scheduleByDateAndLine2(line, date);
1657   - Map<String, Object> map = new HashMap<String, Object>();
1658   - map.put("xlName", xlName);
1659   - map.put("jhlc", culateService.culateJhgl(lists));
1660   - map.put("sjgl", Arith.add(culateService.culateSjgl(lists),culateService.culateLjgl(lists)));
1661   - map.put("ssgl", culateService.culateLbgl(lists));
1662   - map.put("ssgl_lz", culateService.culateCJLC(lists, "路阻"));
1663   - map.put("ssgl_dm", culateService.culateCJLC(lists, "吊慢"));
1664   - map.put("ssgl_gz", culateService.culateCJLC(lists, "故障"));
1665   - map.put("ssgl_jf", culateService.culateCJLC(lists, "纠纷"));
1666   - map.put("ssgl_zs", culateService.culateCJLC(lists, "肇事"));
1667   - map.put("ssgl_qr", culateService.culateCJLC(lists, "缺人"));
1668   - map.put("ssgl_qc", culateService.culateCJLC(lists, "缺车"));
1669   - map.put("ssgl_kx", culateService.culateCJLC(lists, "客稀"));
1670   - map.put("ssgl_qh", culateService.culateCJLC(lists, "气候"));
1671   - map.put("ssgl_yw", culateService.culateCJLC(lists, "援外"));
1672   - map.put("ssgl_other", culateService.culateCJLC(lists, "其他"));
1673   - map.put("ssbc", culateService.culateLbbc(lists));
1674   - map.put("ljgl", culateService.culateLjgl(lists));
1675   - map.put("jhbc", culateService.culateJhbc(lists,""));
1676   - map.put("jhbc_m", culateService.culateJhbc(lists, "zgf"));
1677   - map.put("jhbc_a", culateService.culateJhbc(lists, "wgf"));
1678   - map.put("sjbc", culateService.culateSjbc(lists,""));
1679   - map.put("sjbc_m", culateService.culateSjbc(lists,"zgf"));
1680   - map.put("sjbc_a", culateService.culateSjbc(lists,"wgf"));
1681   - map.put("ljbc", culateService.culateLjbc(lists,""));
1682   - map.put("ljbc_m", culateService.culateLjbc(lists,"zgf"));
1683   - map.put("ljbc_a", culateService.culateLjbc(lists,"wgf"));
1684   - map.put("fzbc", culateService.culateFzbc(lists, ""));
1685   - map.put("fzbc_m", culateService.culateFzbc(lists, "zgf"));
1686   - map.put("fzbc_a", culateService.culateFzbc(lists, "wgf"));
1687   - map.put("dtbc", 0);
1688   - map.put("dtbc_m", 0);
1689   - map.put("dtbc_a", 0);
1690   - map.put("djg", 0);
1691   - map.put("djg_m", 0);
1692   - map.put("djg_a", 0);
1693   - map.put("djg_time", 0);
1694   - lMap.add(map);
1695   - return lMap;
1696   - }
1697   -
1698   - /* @Override
1699   - public List<Map<String, Object>> statisticsDaily(String line, String date,
1700   - String xlName, String type) {
1701   - List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
1702   - if (date.length() == 10)
1703   - list = scheduleRealInfoRepository.scheduleByDateAndLine2(line, date);
1704   - else if (date.length() == 7)
1705   - list = scheduleRealInfoRepository.scheduleByDateAndLine3(line, date);
1706   -
1707   -
1708   - List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>();
1709   - DecimalFormat format = new DecimalFormat("0.00");
1710   - double jhlc = 0, tempJhlc = 0, childMileage = 0,jhlcOrig=0;
1711   - float sjgl = 0f, ssgl = 0f, ssgl_lz = 0f, ssgl_dm = 0f, ssgl_gz = 0f, ssgl_jf = 0f, ssgl_zs = 0f, ssgl_qr = 0f, ssgl_qc = 0f, ssgl_kx = 0f, ssgl_qh = 0f, ssgl_yw = 0f, ssgl_other = 0f, ljgl = 0f;
1712   - //班次
1713   - int ssbc = 0, ssbc_lz = 0, ssbc_dm = 0, ssbc_gz = 0, ssbc_jf = 0, ssbc_zs = 0, ssbc_qr = 0, ssbc_qc = 0, ssbc_kx = 0, ssbc_qh = 0, ssbc_yw = 0, ssbc_other = 0;
1714   - int sj_0 = 6 * 60 + 31, sj_1 = 8 * 60 + 30, sj_2 = 16 * 60 + 1, sj_3 = 18 * 60;
1715   - int jhbc = 0, jhbc_m = 0, jhbc_a = 0;
1716   - int sjbc = 0, sjbc_m = 0, sjbc_a = 0;
1717   - int ljbc = 0, ljbc_m = 0, ljbc_a = 0;
1718   - int fzbc = 0, fzbc_m = 0, fzbc_a = 0;
1719   - int dtbc = 0, dtbc_m = 0, dtbc_a = 0;
1720   - int djg = 0, djg_m = 0, djg_a = 0, djg_time = 0;
1721   -
1722   - double jhlcZ = 0, tempJhlcZ = 0, childMileageZ = 0;
1723   - float sjglZ = 0f, ssglZ = 0f, ssgl_lzZ = 0f, ssgl_dmZ = 0f,
1724   - ssgl_gzZ = 0f, ssgl_jfZ = 0f, ssgl_zsZ = 0f, ssgl_qrZ = 0f, ssgl_qcZ = 0f,
1725   - ssgl_kxZ = 0f, ssgl_qhZ = 0f, ssgl_ywZ = 0f, ssgl_otherZ = 0f, ljglZ = 0f;
1726   - //班次
1727   - int ssbcZ = 0, ssbc_lzZ = 0, ssbc_dmZ = 0, ssbc_gzZ = 0, ssbc_jfZ = 0, ssbc_zsZ = 0, ssbc_qrZ = 0, ssbc_qcZ = 0, ssbc_kxZ = 0, ssbc_qhZ = 0, ssbc_ywZ = 0, ssbc_otherZ = 0;
1728   - int jhbcZ = 0, jhbc_mZ = 0, jhbc_aZ = 0;
1729   - int sjbcZ = 0, sjbc_mZ = 0, sjbc_aZ = 0;
1730   - int ljbcZ = 0, ljbc_mZ = 0, ljbc_aZ = 0;
1731   - int fzbcZ = 0, fzbc_mZ = 0, fzbc_aZ = 0;
1732   - int dtbcZ = 0, dtbc_mZ = 0, dtbc_aZ = 0;
1733   - int djgZ = 0, djg_mZ = 0, djg_aZ = 0, djg_timeZ = 0;
1734   - Map<String, Object> map = null;
1735   -
1736   - double xgssgl=0,xgljgl=0,lj=0,cj=0;
1737   - for (int i = 0; i < list.size(); i++) {
1738   - ScheduleRealInfo scheduleRealInfo = list.get(i);
1739   -
1740   - if (scheduleRealInfo != null) {
1741   - Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
1742   - //计算实际里程,少驶里程,计划里程=实际里程+少驶里程
1743   - if(!scheduleRealInfo.isSflj()){
1744   - jhlc += tempJhlc;
1745   - jhlcZ += tempJhlc;
1746   - }
1747   - if (childTaskPlans.isEmpty()) {
1748   - tempJhlc = scheduleRealInfo.getJhlc() == null ? 0 : scheduleRealInfo.getJhlc();
1749   - jhlcOrig = scheduleRealInfo.getJhlcOrig() == null ? 0 : scheduleRealInfo.getJhlcOrig();
1750   -
1751   - if(jhlcOrig-tempJhlc>0){
1752   - xgssgl +=jhlcOrig-tempJhlc;
1753   - cj += jhlcOrig-tempJhlc;
1754   - }else{
1755   - xgljgl +=tempJhlc-jhlcOrig;
1756   - lj +=tempJhlc-jhlcOrig;
1757   - }
1758   - //临加公里
1759   - if (scheduleRealInfo.isSflj()) {
1760   - ljgl += tempJhlc;
1761   - ljglZ += tempJhlc;
1762   - }
1763   -
1764   - if (scheduleRealInfo.getStatus() == -1) {
1765   - ssgl += tempJhlc;
1766   - ssglZ += tempJhlc;
1767   - ssbc++;
1768   - ssbcZ++;
1769   - if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("路阻") != -1) {
1770   - ssgl_lz += tempJhlc;
1771   - ssgl_lzZ += tempJhlc;
1772   - ssbc_lz++;
1773   - ssbc_lzZ++;
1774   - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("吊慢") != -1) {
1775   - ssgl_dm += tempJhlc;
1776   - ssgl_dmZ += tempJhlc;
1777   - ssbc_dm++;
1778   - ssbc_dmZ++;
1779   - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("故障") != -1) {
1780   - ssgl_gz += tempJhlc;
1781   - ssgl_gzZ += tempJhlc;
1782   - ssbc_gz++;
1783   - ssbc_gzZ++;
1784   - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("纠纷") != -1) {
1785   - ssgl_jf += tempJhlc;
1786   - ssgl_jfZ += tempJhlc;
1787   - ssbc_jf++;
1788   - ssbc_jfZ++;
1789   - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("肇事") != -1) {
1790   - ssgl_zs += tempJhlc;
1791   - ssgl_zsZ += tempJhlc;
1792   - ssbc_zs++;
1793   - ssbc_zsZ++;
1794   - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("缺人") != -1) {
1795   - ssgl_qr += tempJhlc;
1796   - ssgl_qrZ += tempJhlc;
1797   - ssbc_qr++;
1798   - ssbc_qrZ++;
1799   - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("缺车") != -1) {
1800   - ssgl_qc += tempJhlc;
1801   - ssgl_qcZ += tempJhlc;
1802   - ssbc_qc++;
1803   - ssbc_qcZ++;
1804   - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("客稀") != -1) {
1805   - ssgl_kx += tempJhlc;
1806   - ssgl_kxZ += tempJhlc;
1807   - ssbc_kx++;
1808   - ssbc_kxZ++;
1809   - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("气候") != -1) {
1810   - ssgl_qh += tempJhlc;
1811   - ssgl_qhZ += tempJhlc;
1812   - ssbc_qh++;
1813   - ssbc_qhZ++;
1814   - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("援外") != -1) {
1815   - ssgl_yw += tempJhlc;
1816   - ssgl_ywZ += tempJhlc;
1817   - ssbc_yw++;
1818   - ssbc_ywZ++;
1819   - } else {
1820   - ssgl_other += tempJhlc;
1821   - ssgl_otherZ += tempJhlc;
1822   - ssbc_other++;
1823   - ssbc_otherZ++;
1824   - }
1825   - } else {
1826   - sjgl += tempJhlc;
1827   - sjglZ += tempJhlc;
1828   - }
1829   - } else {
1830   - Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
1831   - while (it.hasNext()) {
1832   - ChildTaskPlan childTaskPlan = it.next();
1833   - childMileage = childTaskPlan.getMileage() == null ? 0 : childTaskPlan.getMileage();
1834   - if (childTaskPlan.isDestroy()) {
1835   - ssgl += childMileage;
1836   - ssglZ += childMileage;
1837   - ssbc++;
1838   - ssbcZ++;
1839   - if (childTaskPlan.getDestroyReason().equals("路阻")) {
1840   - ssgl_lz += childTaskPlan.getMileage();
1841   - ssgl_lzZ += childTaskPlan.getMileage();
1842   - ssbc_lzZ++;
1843   - ssbc_lzZ++;
1844   - } else if (childTaskPlan.getDestroyReason().equals("吊慢")) {
1845   - ssgl_dm += childTaskPlan.getMileage();
1846   - ssgl_dmZ += childTaskPlan.getMileage();
1847   - ssbc_dm++;
1848   - ssbc_dmZ++;
1849   - } else if (childTaskPlan.getDestroyReason().equals("故障")) {
1850   - ssgl_gz += childTaskPlan.getMileage();
1851   - ssgl_gzZ += childTaskPlan.getMileage();
1852   - ssbc_gz++;
1853   - ssbc_gzZ++;
1854   - } else if (childTaskPlan.getDestroyReason().equals("纠纷")) {
1855   - ssgl_jf += childTaskPlan.getMileage();
1856   - ssgl_jfZ += childTaskPlan.getMileage();
1857   - ssbc_jf++;
1858   - ssbc_jfZ++;
1859   - } else if (childTaskPlan.getDestroyReason().equals("肇事")) {
1860   - ssgl_zs += childTaskPlan.getMileage();
1861   - ssgl_zsZ += childTaskPlan.getMileage();
1862   - ssbc_zs++;
1863   - ssbc_zsZ++;
1864   - } else if (childTaskPlan.getDestroyReason().equals("缺人")) {
1865   - ssgl_qr += childTaskPlan.getMileage();
1866   - ssgl_qrZ += childTaskPlan.getMileage();
1867   - ssbc_qr++;
1868   - ssbc_qrZ++;
1869   - } else if (childTaskPlan.getDestroyReason().equals("缺车")) {
1870   - ssgl_qc += childTaskPlan.getMileage();
1871   - ssgl_qcZ += childTaskPlan.getMileage();
1872   - ssbc_qc++;
1873   - ssbc_qcZ++;
1874   - } else if (childTaskPlan.getDestroyReason().equals("客稀")) {
1875   - ssgl_kx += childTaskPlan.getMileage();
1876   - ssgl_kxZ += childTaskPlan.getMileage();
1877   - ssbc_kx++;
1878   - ssbc_kxZ++;
1879   - } else if (childTaskPlan.getDestroyReason().equals("气候")) {
1880   - ssgl_qh += childTaskPlan.getMileage();
1881   - ssgl_qhZ += childTaskPlan.getMileage();
1882   - ssbc_qh++;
1883   - ssbc_qhZ++;
1884   - } else if (childTaskPlan.getDestroyReason().equals("援外")) {
1885   - ssgl_yw += childTaskPlan.getMileage();
1886   - ssgl_ywZ += childTaskPlan.getMileage();
1887   - ssbc_yw++;
1888   - ssbc_ywZ++;
1889   - } else {
1890   - ssgl_other += childTaskPlan.getMileage();
1891   - ssgl_otherZ += childTaskPlan.getMileage();
1892   - ssbc_other++;
1893   - ssbc_otherZ++;
1894   - }
1895   - } else {
1896   - if (scheduleRealInfo.isSflj()) {
1897   - ljgl += tempJhlc;
1898   - ljglZ += tempJhlc;
1899   - } else{
1900   - sjgl += childMileage;
1901   - sjglZ += childMileage;
1902   - }
1903   - }
1904   - }
1905   - }
1906   -
1907   - //班次
1908   - jhbc++;
1909   - jhbcZ++;
1910   - String[] fcsj = scheduleRealInfo.getFcsj().split(":");
1911   - String[] fcsjActual = (scheduleRealInfo.getFcsjActual() == null ? "0:00" : scheduleRealInfo.getFcsjActual()).split(":");
1912   - if ((Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) > sj_0 && (Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) < sj_1) {
1913   - jhbc_m++;
1914   - jhbc_mZ++;
1915   - } else if ((Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) > sj_2 && (Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) < sj_3) {
1916   - jhbc_a++;
1917   - jhbc_aZ++;
1918   - }
1919   - if (scheduleRealInfo.getStatus() != -1) {
1920   - sjbc++;
1921   - sjbcZ++;
1922   - if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_1) {
1923   - sjbc_m++;
1924   - sjbc_mZ++;
1925   - } else if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_3) {
1926   - sjbc_a++;
1927   - sjbc_aZ++;
1928   - }
1929   - }
1930   - if (scheduleRealInfo.isSflj()) {
1931   - ljbc++;
1932   - ljbcZ++;
1933   - if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_1) {
1934   - ljbc_m++;
1935   - ljbc_mZ++;
1936   - } else if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_3) {
1937   - ljbc_a++;
1938   - ljbc_aZ++;
1939   - }
1940   - }
1941   - if (scheduleRealInfo.getBcType().equals("venting")) {
1942   - fzbc++;
1943   - fzbcZ++;
1944   - if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_1) {
1945   - fzbc_m++;
1946   - fzbc_mZ++;
1947   - } else if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_3) {
1948   - fzbc_a++;
1949   - fzbc_aZ++;
1950   - }
1951   - }
1952   -
1953   - if (i < list.size() - 1) {
1954   - if (!scheduleRealInfo.getXlBm().equals(list.get(i + 1).getXlBm())) {
1955   - map = new HashMap<String, Object>();
1956   - map.put("xlName", scheduleRealInfo.getXlName());
1957   - map.put("jhlc", format.format(jhlc));
1958   - map.put("sjgl", format.format(sjgl));
1959   - map.put("ssgl", format.format(ssgl+cj));
1960   - map.put("ssgl_lz", ssgl_lz == 0 ? 0 : format.format(ssgl_lz));
1961   - map.put("ssgl_dm", ssgl_dm == 0 ? 0 : format.format(ssgl_dm));
1962   - map.put("ssgl_gz", ssgl_gz == 0 ? 0 : format.format(ssgl_gz));
1963   - map.put("ssgl_jf", ssgl_jf == 0 ? 0 : format.format(ssgl_jf));
1964   - map.put("ssgl_zs", ssgl_zs == 0 ? 0 : format.format(ssgl_zs));
1965   - map.put("ssgl_qr", ssgl_qr == 0 ? 0 : format.format(ssgl_qr));
1966   - map.put("ssgl_qc", ssgl_qc == 0 ? 0 : format.format(ssgl_qc));
1967   - map.put("ssgl_kx", ssgl_kx == 0 ? 0 : format.format(ssgl_kx));
1968   - map.put("ssgl_qh", ssgl_qh == 0 ? 0 : format.format(ssgl_qh));
1969   - map.put("ssgl_yw", ssgl_yw == 0 ? 0 : format.format(ssgl_yw));
1970   - map.put("ssgl_other", ssgl_other == 0 ? 0 : format.format(ssgl_other));
1971   - map.put("ssbc", ssbc);
1972   - map.put("ssbc_lz", ssbc_lz);
1973   - map.put("ssbc_dm", ssbc_dm);
1974   - map.put("ssbc_gz", ssbc_gz);
1975   - map.put("ssbc_jf", ssbc_jf);
1976   - map.put("ssbc_zs", ssbc_zs);
1977   - map.put("ssbc_qr", ssbc_qr);
1978   - map.put("ssbc_qc", ssbc_qc);
1979   - map.put("ssbc_kx", ssbc_kx);
1980   - map.put("ssbc_qh", ssbc_qh);
1981   - map.put("ssbc_yw", ssbc_yw);
1982   - map.put("ssbc_other", ssbc_other);
1983   - map.put("ljgl", format.format(ljgl+lj));
1984   - map.put("jhbc", jhbc);
1985   - map.put("jhbc_m", jhbc_m);
1986   - map.put("jhbc_a", jhbc_a);
1987   - map.put("sjbc", sjbc);
1988   - map.put("sjbc_m", sjbc_m);
1989   - map.put("sjbc_a", sjbc_a);
1990   - map.put("ljbc", ljbc);
1991   - map.put("ljbc_m", ljbc_m);
1992   - map.put("ljbc_a", ljbc_a);
1993   - map.put("fzbc", fzbc);
1994   - map.put("fzbc_m", fzbc_m);
1995   - map.put("fzbc_a", fzbc_a);
1996   - map.put("dtbc", dtbc);
1997   - map.put("dtbc_m", dtbc_m);
1998   - map.put("dtbc_a", dtbc_a);
1999   - map.put("djg", djg);
2000   - map.put("djg_m", djg_m);
2001   - map.put("djg_a", djg_a);
2002   - map.put("djg_time", djg_time);
2003   - lMap.add(map);
2004   - jhlc = 0;
2005   - tempJhlc = 0;
2006   - childMileage = 0;
2007   - sjgl = 0f;
2008   - ssgl = 0f;
2009   - ssgl_lz = 0f;
2010   - ssgl_dm = 0f;
2011   - ssgl_gz = 0f;
2012   - ssgl_jf = 0f;
2013   - ssgl_zs = 0f;
2014   - ssgl_qr = 0f;
2015   - ssgl_qc = 0f;
2016   - ssgl_kx = 0f;
2017   - ssgl_qh = 0f;
2018   - ssgl_yw = 0f;
2019   - ssgl_other = 0f;
2020   - ljgl = 0f;
2021   - //班次
2022   - jhbc = 0;
2023   - jhbc_m = 0;
2024   - jhbc_a = 0;
2025   - sjbc = 0;
2026   - sjbc_m = 0;
2027   - sjbc_a = 0;
2028   - ljbc = 0;
2029   - ljbc_m = 0;
2030   - ljbc_a = 0;
2031   - fzbc = 0;
2032   - fzbc_m = 0;
2033   - fzbc_a = 0;
2034   - dtbc = 0;
2035   - dtbc_m = 0;
2036   - dtbc_a = 0;
2037   - djg = 0;
2038   - djg_m = 0;
2039   - djg_a = 0;
2040   - djg_time = 0;
2041   - lj=0;
2042   - cj=0;
2043   - }
2044   - } else {
2045   - map = new HashMap<String, Object>();
2046   - map.put("xlName", scheduleRealInfo.getXlName());
2047   - map.put("jhlc", format.format(jhlc));
2048   - map.put("sjgl", format.format(sjgl));
2049   - map.put("ssgl", format.format(ssgl+cj));
2050   - map.put("ssgl_lz", ssgl_lz == 0 ? 0 : format.format(ssgl_lz));
2051   - map.put("ssgl_dm", ssgl_dm == 0 ? 0 : format.format(ssgl_dm));
2052   - map.put("ssgl_gz", ssgl_gz == 0 ? 0 : format.format(ssgl_gz));
2053   - map.put("ssgl_jf", ssgl_jf == 0 ? 0 : format.format(ssgl_jf));
2054   - map.put("ssgl_zs", ssgl_zs == 0 ? 0 : format.format(ssgl_zs));
2055   - map.put("ssgl_qr", ssgl_qr == 0 ? 0 : format.format(ssgl_qr));
2056   - map.put("ssgl_qc", ssgl_qc == 0 ? 0 : format.format(ssgl_qc));
2057   - map.put("ssgl_kx", ssgl_kx == 0 ? 0 : format.format(ssgl_kx));
2058   - map.put("ssgl_qh", ssgl_qh == 0 ? 0 : format.format(ssgl_qh));
2059   - map.put("ssgl_yw", ssgl_yw == 0 ? 0 : format.format(ssgl_yw));
2060   - map.put("ssgl_other", ssgl_other == 0 ? 0 : format.format(ssgl_other));
2061   - map.put("ssbc", ssbc);
2062   - map.put("ssbc_lz", ssbc_lz);
2063   - map.put("ssbc_dm", ssbc_dm);
2064   - map.put("ssbc_gz", ssbc_gz);
2065   - map.put("ssbc_jf", ssbc_jf);
2066   - map.put("ssbc_zs", ssbc_zs);
2067   - map.put("ssbc_qr", ssbc_qr);
2068   - map.put("ssbc_qc", ssbc_qc);
2069   - map.put("ssbc_kx", ssbc_kx);
2070   - map.put("ssbc_qh", ssbc_qh);
2071   - map.put("ssbc_yw", ssbc_yw);
2072   - map.put("ssbc_other", ssbc_other);
2073   - map.put("ljgl", format.format(ljgl+lj));
2074   - map.put("jhbc", jhbc);
2075   - map.put("jhbc_m", jhbc_m);
2076   - map.put("jhbc_a", jhbc_a);
2077   - map.put("sjbc", sjbc);
2078   - map.put("sjbc_m", sjbc_m);
2079   - map.put("sjbc_a", sjbc_a);
2080   - map.put("ljbc", ljbc);
2081   - map.put("ljbc_m", ljbc_m);
2082   - map.put("ljbc_a", ljbc_a);
2083   - map.put("fzbc", fzbc);
2084   - map.put("fzbc_m", fzbc_m);
2085   - map.put("fzbc_a", fzbc_a);
2086   - map.put("dtbc", dtbc);
2087   - map.put("dtbc_m", dtbc_m);
2088   - map.put("dtbc_a", dtbc_a);
2089   - map.put("djg", djg);
2090   - map.put("djg_m", djg_m);
2091   - map.put("djg_a", djg_a);
2092   - map.put("djg_time", djg_time);
2093   - lMap.add(map);
2094   - jhlc = 0;
2095   - tempJhlc = 0;
2096   - childMileage = 0;
2097   - sjgl = 0f;
2098   - ssgl = 0f;
2099   - ssgl_lz = 0f;
2100   - ssgl_dm = 0f;
2101   - ssgl_gz = 0f;
2102   - ssgl_jf = 0f;
2103   - ssgl_zs = 0f;
2104   - ssgl_qr = 0f;
2105   - ssgl_qc = 0f;
2106   - ssgl_kx = 0f;
2107   - ssgl_qh = 0f;
2108   - ssgl_yw = 0f;
2109   - ssgl_other = 0f;
2110   - ljgl = 0f;
2111   - //班次
2112   - jhbc = 0;
2113   - jhbc_m = 0;
2114   - jhbc_a = 0;
2115   - sjbc = 0;
2116   - sjbc_m = 0;
2117   - sjbc_a = 0;
2118   - ljbc = 0;
2119   - ljbc_m = 0;
2120   - ljbc_a = 0;
2121   - fzbc = 0;
2122   - fzbc_m = 0;
2123   - fzbc_a = 0;
2124   - dtbc = 0;
2125   - dtbc_m = 0;
2126   - dtbc_a = 0;
2127   - djg = 0;
2128   - djg_m = 0;
2129   - djg_a = 0;
2130   - djg_time = 0;
2131   - lj=0;
2132   - cj=0;
2133   - }
  1604 + /* String sqlPc = "select * from bsth_c_s_child_task where schedule=" + s.getId() + " order by start_date ";
  1605 + List<ScheduleRealInfo> lists = jdbcTemplate.query(sqlPc,
  1606 + new RowMapper<ScheduleRealInfo>() {
  1607 + @Override
  1608 + public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException {
  1609 + ScheduleRealInfo t = new ScheduleRealInfo();
  1610 + if (rs.getInt("destroy") == 0) {
  1611 + t.setFcsjActual(rs.getString("start_date"));
  1612 + t.setZdsjActual(rs.getString("end_date"));
  1613 + t.setJhlc(rs.getDouble("mileage"));
  1614 + } else {
  1615 + t.setFcsjActual("");
  1616 + t.setZdsjActual("");
  1617 + t.setJhlc(0.0);
  1618 + }
  1619 + t.setQdzName(rs.getString("start_station_name"));
  1620 + t.setZdzName(rs.getString("end_station_name"));
  1621 + t.setRemarks(rs.getString("remarks"));
  1622 + t.setAdjustExps("子");
  1623 + return t;
  1624 + }
  1625 + });
  1626 + for (int j = 0; j < lists.size(); j++) {
  1627 + ScheduleRealInfo t = lists.get(j);
  1628 + listSchedule.add(t);
  1629 + }*/
2134 1630 }
2135 1631 }
2136   - map = new HashMap<String, Object>();
2137   - map.put("xlName", "合计");
2138   - map.put("jhlc", format.format(jhlcZ));
2139   - map.put("sjgl", format.format(sjglZ));
2140   - map.put("ssgl", format.format(ssglZ+xgssgl));
2141   - map.put("ssgl_lz", ssgl_lzZ == 0 ? 0 : format.format(ssgl_lzZ));
2142   - map.put("ssgl_dm", ssgl_dmZ == 0 ? 0 : format.format(ssgl_dmZ));
2143   - map.put("ssgl_gz", ssgl_gzZ == 0 ? 0 : format.format(ssgl_gzZ));
2144   - map.put("ssgl_jf", ssgl_jfZ == 0 ? 0 : format.format(ssgl_jfZ));
2145   - map.put("ssgl_zs", ssgl_zsZ == 0 ? 0 : format.format(ssgl_zsZ));
2146   - map.put("ssgl_qr", ssgl_qrZ == 0 ? 0 : format.format(ssgl_qrZ));
2147   - map.put("ssgl_qc", ssgl_qcZ == 0 ? 0 : format.format(ssgl_qcZ));
2148   - map.put("ssgl_kx", ssgl_kxZ == 0 ? 0 : format.format(ssgl_kxZ));
2149   - map.put("ssgl_qh", ssgl_qhZ == 0 ? 0 : format.format(ssgl_qhZ));
2150   - map.put("ssgl_yw", ssgl_ywZ == 0 ? 0 : format.format(ssgl_ywZ));
2151   - map.put("ssgl_other", ssgl_otherZ == 0 ? 0 : format.format(ssgl_otherZ));
2152   - map.put("ssbc", ssbcZ);
2153   - map.put("ssbc_lz", ssbc_lzZ);
2154   - map.put("ssbc_dm", ssbc_lzZ);
2155   - map.put("ssbc_gz", ssbc_gzZ);
2156   - map.put("ssbc_jf", ssbc_jfZ);
2157   - map.put("ssbc_zs", ssbc_zsZ);
2158   - map.put("ssbc_qr", ssbc_qrZ);
2159   - map.put("ssbc_qc", ssbc_qcZ);
2160   - map.put("ssbc_kx", ssbc_qcZ);
2161   - map.put("ssbc_qh", ssbc_qhZ);
2162   - map.put("ssbc_yw", ssbc_ywZ);
2163   - map.put("ssbc_other", ssbc_otherZ);
2164   - map.put("ljgl", format.format(ljglZ+xgljgl));
2165   - map.put("jhbc", jhbcZ);
2166   - map.put("jhbc_m", jhbc_mZ);
2167   - map.put("jhbc_a", jhbc_aZ);
2168   - map.put("sjbc", sjbcZ);
2169   - map.put("sjbc_m", sjbc_mZ);
2170   - map.put("sjbc_a", sjbc_aZ);
2171   - map.put("ljbc", ljbcZ);
2172   - map.put("ljbc_m", ljbc_mZ);
2173   - map.put("ljbc_a", ljbc_aZ);
2174   - map.put("fzbc", fzbcZ);
2175   - map.put("fzbc_m", fzbc_mZ);
2176   - map.put("fzbc_a", fzbc_aZ);
2177   - map.put("dtbc", dtbcZ);
2178   - map.put("dtbc_m", dtbc_mZ);
2179   - map.put("dtbc_a", dtbc_aZ);
2180   - map.put("djg", djgZ);
2181   - map.put("djg_m", djg_mZ);
2182   - map.put("djg_a", djg_aZ);
2183   - map.put("djg_time", djg_timeZ);
2184   - lMap.add(map);
2185   - for (int i = 0; i < lMap.size(); i++) {
2186   - Map<String, Object> m=lMap.get(i);
2187   -// m.get(""))
2188   - jhlc += Double.parseDouble(m.get("jhlc").toString());
2189   - sjgl += Double.parseDouble(m.get("sjgl").toString());
2190   - ssgl += Double.parseDouble( m.get("ssgl").toString());
2191   - ssgl_lz += Double.parseDouble( m.get("ssgl_lz").toString());
2192   - ssgl_dm += Double.parseDouble(m.get("ssgl_dm").toString());
2193   - ssgl_gz += Double.parseDouble( m.get("ssgl_gz").toString());
2194   - ssgl_jf += m.get("ssgl_jf", ssgl_jf == 0 ? 0 : format.format(ssgl_jf));
2195   - m.get("ssgl_zs", ssgl_zs == 0 ? 0 : format.format(ssgl_zs));
2196   - m.get("ssgl_qr", ssgl_qr == 0 ? 0 : format.format(ssgl_qr));
2197   - m.get("ssgl_qc", ssgl_qc == 0 ? 0 : format.format(ssgl_qc));
2198   - m.get("ssgl_kx", ssgl_kx == 0 ? 0 : format.format(ssgl_kx));
2199   - m.get("ssgl_qh", ssgl_qh == 0 ? 0 : format.format(ssgl_qh));
2200   - m.get("ssgl_yw", ssgl_yw == 0 ? 0 : format.format(ssgl_yw));
2201   - m.get("ssgl_other", ssgl_other == 0 ? 0 : format.format(ssgl_other));
2202   - m.get("ljgl", ljgl == 0 ? 0 : format.format(ljgl));
2203   - m.get("jhbc", jhbc);
2204   - m.get("jhbc_m", jhbc_m);
2205   - m.get("jhbc_a", jhbc_a);
2206   - m.get("sjbc", sjbc);
2207   - m.get("sjbc_m", sjbc_m);
2208   - m.get("sjbc_a", sjbc_a);
2209   - m.get("ljbc", ljbc);
2210   - m.get("ljbc_m", ljbc_m);
2211   - m.get("ljbc_a", ljbc_a);
2212   - m.get("fzbc", fzbc);
2213   - m.get("fzbc_m", fzbc_m);
2214   - m.get("fzbc_a", fzbc_a);
2215   - m.get("dtbc", dtbc);
2216   - m.get("dtbc_m", dtbc_m);
2217   - m.get("dtbc_a", dtbc_a);
2218   - m.get("djg", djg);
2219   - m.get("djg_m", djg_m);
2220   - m.get("djg_a", djg_a);
2221   - m.get("djg_time", djg_time);
2222   - }
2223 1632  
2224   - if (type != null && type.length() != 0 && type.equals("export")) {
2225   - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
2226   - sdfSimple = new SimpleDateFormat("yyyyMMdd");
2227   - List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
2228   - Map<String, Object> m = new HashMap<String, Object>();
2229   - ReportUtils ee = new ReportUtils();
2230   - try {
2231   - listI.add(lMap.iterator());
2232   - String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
2233   - ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_.xls",
2234   - path + "export/统计日报" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
2235   - } catch (Exception e) {
2236   - // TODO: handle exception
2237   - e.printStackTrace();
2238   - }
2239   - }
  1633 + return listSchedule;
  1634 + }
2240 1635  
2241   - return lMap;
2242   - }*/
2243   -
2244 1636 @Override
2245   - public List<Map<String, Object>> statisticsDailyTj(String line, String date,String date2,
  1637 + public Map<String, Object> removeChildTask(Long taskId) {
  1638 + Map<String, Object> rs = new HashMap<>();
  1639 + ChildTaskPlan chTask = cTaskPlanRepository.findOne(taskId);
  1640 +
  1641 + ScheduleRealInfo sch = dayOfSchedule.get(chTask.getSchedule().getId());
  1642 + try {
  1643 +
  1644 + sch.getcTasks().remove(chTask);
  1645 + scheduleRealInfoRepository.save(sch);
  1646 + rs.put("status", ResponseCode.SUCCESS);
  1647 + } catch (Exception e) {
  1648 + logger.error("", e);
  1649 + rs.put("status", ResponseCode.ERROR);
  1650 + }
  1651 + return rs;
  1652 + }
  1653 + @Override
  1654 + public List<Map<String, Object>> statisticsDaily(String line, String date,
  1655 + String xlName, String type) {
  1656 + List<Map<String, Object>> lMap= new ArrayList<Map<String, Object>>();
  1657 + List<ScheduleRealInfo> lists = scheduleRealInfoRepository.scheduleByDateAndLine2(line, date);
  1658 + Map<String, Object> map = new HashMap<String, Object>();
  1659 + map.put("xlName", xlName);
  1660 + map.put("jhlc", culateService.culateJhgl(lists));
  1661 + map.put("sjgl", Arith.add(culateService.culateSjgl(lists),culateService.culateLjgl(lists)));
  1662 + map.put("ssgl", culateService.culateLbgl(lists));
  1663 + map.put("ssgl_lz", culateService.culateCJLC(lists, "路阻"));
  1664 + map.put("ssgl_dm", culateService.culateCJLC(lists, "吊慢"));
  1665 + map.put("ssgl_gz", culateService.culateCJLC(lists, "故障"));
  1666 + map.put("ssgl_jf", culateService.culateCJLC(lists, "纠纷"));
  1667 + map.put("ssgl_zs", culateService.culateCJLC(lists, "肇事"));
  1668 + map.put("ssgl_qr", culateService.culateCJLC(lists, "缺人"));
  1669 + map.put("ssgl_qc", culateService.culateCJLC(lists, "缺车"));
  1670 + map.put("ssgl_kx", culateService.culateCJLC(lists, "客稀"));
  1671 + map.put("ssgl_qh", culateService.culateCJLC(lists, "气候"));
  1672 + map.put("ssgl_yw", culateService.culateCJLC(lists, "援外"));
  1673 + map.put("ssgl_other", culateService.culateCJLC(lists, "其他"));
  1674 + map.put("ssbc", culateService.culateLbbc(lists));
  1675 + map.put("ljgl", culateService.culateLjgl(lists));
  1676 + map.put("jhbc", culateService.culateJhbc(lists,""));
  1677 + map.put("jhbc_m", culateService.culateJhbc(lists, "zgf"));
  1678 + map.put("jhbc_a", culateService.culateJhbc(lists, "wgf"));
  1679 + map.put("sjbc", culateService.culateSjbc(lists,""));
  1680 + map.put("sjbc_m", culateService.culateSjbc(lists,"zgf"));
  1681 + map.put("sjbc_a", culateService.culateSjbc(lists,"wgf"));
  1682 + map.put("ljbc", culateService.culateLjbc(lists,""));
  1683 + map.put("ljbc_m", culateService.culateLjbc(lists,"zgf"));
  1684 + map.put("ljbc_a", culateService.culateLjbc(lists,"wgf"));
  1685 + map.put("fzbc", culateService.culateFzbc(lists, ""));
  1686 + map.put("fzbc_m", culateService.culateFzbc(lists, "zgf"));
  1687 + map.put("fzbc_a", culateService.culateFzbc(lists, "wgf"));
  1688 + map.put("dtbc", 0);
  1689 + map.put("dtbc_m", 0);
  1690 + map.put("dtbc_a", 0);
  1691 + map.put("djg", 0);
  1692 + map.put("djg_m", 0);
  1693 + map.put("djg_a", 0);
  1694 + map.put("djg_time", 0);
  1695 + lMap.add(map);
  1696 + return lMap;
  1697 + }
  1698 +
  1699 + /* @Override
  1700 + public List<Map<String, Object>> statisticsDaily(String line, String date,
2246 1701 String xlName, String type) {
2247 1702 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
2248   - if(line!=null){
2249   - list = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date,date2);
2250   - }else{
2251   - list = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date,date2);
2252   - }
2253   -
  1703 + if (date.length() == 10)
  1704 + list = scheduleRealInfoRepository.scheduleByDateAndLine2(line, date);
  1705 + else if (date.length() == 7)
  1706 + list = scheduleRealInfoRepository.scheduleByDateAndLine3(line, date);
  1707 +
2254 1708  
2255 1709 List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>();
2256 1710 DecimalFormat format = new DecimalFormat("0.00");
... ... @@ -2378,8 +1832,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2378 1832 while (it.hasNext()) {
2379 1833 ChildTaskPlan childTaskPlan = it.next();
2380 1834 childMileage = childTaskPlan.getMileage() == null ? 0 : childTaskPlan.getMileage();
2381   - jhlc += childMileage;
2382   - jhlcZ += childMileage;
2383 1835 if (childTaskPlan.isDestroy()) {
2384 1836 ssgl += childMileage;
2385 1837 ssglZ += childMileage;
... ... @@ -2529,7 +1981,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2529 1981 map.put("ssbc_qh", ssbc_qh);
2530 1982 map.put("ssbc_yw", ssbc_yw);
2531 1983 map.put("ssbc_other", ssbc_other);
2532   - map.put("ljgl", (ljgl+lj) == 0 ? 0 : format.format(ljgl+lj));
  1984 + map.put("ljgl", format.format(ljgl+lj));
2533 1985 map.put("jhbc", jhbc);
2534 1986 map.put("jhbc_m", jhbc_m);
2535 1987 map.put("jhbc_a", jhbc_a);
... ... @@ -2594,8 +2046,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2594 2046 map = new HashMap<String, Object>();
2595 2047 map.put("xlName", scheduleRealInfo.getXlName());
2596 2048 map.put("jhlc", format.format(jhlc));
2597   - map.put("sjgl", format.format(sjgl+cj));
2598   - map.put("ssgl", format.format(ssgl));
  2049 + map.put("sjgl", format.format(sjgl));
  2050 + map.put("ssgl", format.format(ssgl+cj));
2599 2051 map.put("ssgl_lz", ssgl_lz == 0 ? 0 : format.format(ssgl_lz));
2600 2052 map.put("ssgl_dm", ssgl_dm == 0 ? 0 : format.format(ssgl_dm));
2601 2053 map.put("ssgl_gz", ssgl_gz == 0 ? 0 : format.format(ssgl_gz));
... ... @@ -2731,7 +2183,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2731 2183 map.put("djg_a", djg_aZ);
2732 2184 map.put("djg_time", djg_timeZ);
2733 2185 lMap.add(map);
2734   - /* for (int i = 0; i < lMap.size(); i++) {
  2186 + for (int i = 0; i < lMap.size(); i++) {
2735 2187 Map<String, Object> m=lMap.get(i);
2736 2188 // m.get(""))
2737 2189 jhlc += Double.parseDouble(m.get("jhlc").toString());
... ... @@ -2768,8 +2220,145 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2768 2220 m.get("djg_m", djg_m);
2769 2221 m.get("djg_a", djg_a);
2770 2222 m.get("djg_time", djg_time);
2771   - }*/
  2223 + }
  2224 +
  2225 + if (type != null && type.length() != 0 && type.equals("export")) {
  2226 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  2227 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  2228 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  2229 + Map<String, Object> m = new HashMap<String, Object>();
  2230 + ReportUtils ee = new ReportUtils();
  2231 + try {
  2232 + listI.add(lMap.iterator());
  2233 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  2234 + ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_.xls",
  2235 + path + "export/统计日报" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
  2236 + } catch (Exception e) {
  2237 + // TODO: handle exception
  2238 + e.printStackTrace();
  2239 + }
  2240 + }
2772 2241  
  2242 + return lMap;
  2243 + }*/
  2244 +
  2245 + public final Map<String, Object> staticTj(List<ScheduleRealInfo> lists){
  2246 + Map<String, Object> map = new HashMap<String, Object>();
  2247 + map.put("xlName", lists.get(0).getXlName());
  2248 + map.put("jhlc", culateService.culateJhgl(lists));
  2249 + map.put("sjgl", Arith.add(culateService.culateSjgl(lists),culateService.culateLjgl(lists)));
  2250 + map.put("ssgl", culateService.culateLbgl(lists));
  2251 + map.put("ssgl_lz", culateService.culateCJLC(lists, "路阻"));
  2252 + map.put("ssgl_dm", culateService.culateCJLC(lists, "吊慢"));
  2253 + map.put("ssgl_gz", culateService.culateCJLC(lists, "故障"));
  2254 + map.put("ssgl_jf", culateService.culateCJLC(lists, "纠纷"));
  2255 + map.put("ssgl_zs", culateService.culateCJLC(lists, "肇事"));
  2256 + map.put("ssgl_qr", culateService.culateCJLC(lists, "缺人"));
  2257 + map.put("ssgl_qc", culateService.culateCJLC(lists, "缺车"));
  2258 + map.put("ssgl_kx", culateService.culateCJLC(lists, "客稀"));
  2259 + map.put("ssgl_qh", culateService.culateCJLC(lists, "气候"));
  2260 + map.put("ssgl_yw", culateService.culateCJLC(lists, "援外"));
  2261 + map.put("ssgl_other", culateService.culateCJLC(lists, "其他"));
  2262 + map.put("ssbc", culateService.culateLbbc(lists));
  2263 + map.put("ljgl", culateService.culateLjgl(lists));
  2264 + map.put("jhbc", culateService.culateJhbc(lists,""));
  2265 + map.put("jhbc_m", culateService.culateJhbc(lists, "zgf"));
  2266 + map.put("jhbc_a", culateService.culateJhbc(lists, "wgf"));
  2267 + map.put("sjbc", culateService.culateSjbc(lists,""));
  2268 + map.put("sjbc_m", culateService.culateSjbc(lists,"zgf"));
  2269 + map.put("sjbc_a", culateService.culateSjbc(lists,"wgf"));
  2270 + map.put("ljbc", culateService.culateLjbc(lists,""));
  2271 + map.put("ljbc_m", culateService.culateLjbc(lists,"zgf"));
  2272 + map.put("ljbc_a", culateService.culateLjbc(lists,"wgf"));
  2273 + map.put("fzbc", culateService.culateFzbc(lists, ""));
  2274 + map.put("fzbc_m", culateService.culateFzbc(lists, "zgf"));
  2275 + map.put("fzbc_a", culateService.culateFzbc(lists, "wgf"));
  2276 + map.put("dtbc", 0);
  2277 + map.put("dtbc_m", 0);
  2278 + map.put("dtbc_a", 0);
  2279 + map.put("djg", 0);
  2280 + map.put("djg_m", 0);
  2281 + map.put("djg_a", 0);
  2282 + map.put("djg_time", 0);
  2283 + return map;
  2284 + }
  2285 +
  2286 + @Override
  2287 + public List<Map<String, Object>> statisticsDailyTj(String gsdm,String fgsdm,String line, String date,String date2,
  2288 + String xlName, String type) {
  2289 + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
  2290 + List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>();
  2291 + line =line.trim();
  2292 + if(line.equals("")){
  2293 + //查询所有线路
  2294 + list = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date,date2,gsdm,fgsdm);
  2295 + }else{
  2296 + //查询单条线路
  2297 + list = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date,date2);
  2298 + }
  2299 + List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>();
  2300 + for (int i = 0; i < list.size(); i++) {
  2301 + if(i<list.size()-1){
  2302 + if(list.get(i+1).getXlBm().equals(list.get(i).getXlBm())){
  2303 + lists.add(list.get(i));
  2304 + }else{
  2305 + lists.add(list.get(i));
  2306 + Map<String, Object> map=staticTj(lists);
  2307 + lMap.add(map);
  2308 + lists=new ArrayList<ScheduleRealInfo>();
  2309 + }
  2310 + }else{
  2311 + if(list.get(i).getXlBm().equals(list.get(i-1).getXlBm())){
  2312 + lists.add(list.get(i));
  2313 + Map<String, Object> map=staticTj(lists);
  2314 + lMap.add(map);
  2315 + }else{
  2316 + lists=new ArrayList<ScheduleRealInfo>();
  2317 + lists.add(list.get(i));
  2318 + Map<String, Object> map=staticTj(lists);
  2319 + lMap.add(map);
  2320 + }
  2321 + }
  2322 + }
  2323 +
  2324 + Map<String, Object> map = new HashMap<String, Object>();
  2325 + map.put("xlName", "合计");
  2326 + map.put("jhlc", culateService.culateJhgl(list));
  2327 + map.put("sjgl", Arith.add(culateService.culateSjgl(list),culateService.culateLjgl(list)));
  2328 + map.put("ssgl", culateService.culateLbgl(list));
  2329 + map.put("ssgl_lz", culateService.culateCJLC(list, "路阻"));
  2330 + map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢"));
  2331 + map.put("ssgl_gz", culateService.culateCJLC(list, "故障"));
  2332 + map.put("ssgl_jf", culateService.culateCJLC(list, "纠纷"));
  2333 + map.put("ssgl_zs", culateService.culateCJLC(list, "肇事"));
  2334 + map.put("ssgl_qr", culateService.culateCJLC(list, "缺人"));
  2335 + map.put("ssgl_qc", culateService.culateCJLC(list, "缺车"));
  2336 + map.put("ssgl_kx", culateService.culateCJLC(list, "客稀"));
  2337 + map.put("ssgl_qh", culateService.culateCJLC(list, "气候"));
  2338 + map.put("ssgl_yw", culateService.culateCJLC(list, "援外"));
  2339 + map.put("ssgl_other", culateService.culateCJLC(list, "其他"));
  2340 + map.put("ssbc", culateService.culateLbbc(list));
  2341 + map.put("ljgl", culateService.culateLjgl(list));
  2342 + map.put("jhbc", culateService.culateJhbc(list,""));
  2343 + map.put("jhbc_m", culateService.culateJhbc(list, "zgf"));
  2344 + map.put("jhbc_a", culateService.culateJhbc(list, "wgf"));
  2345 + map.put("sjbc", culateService.culateSjbc(list,""));
  2346 + map.put("sjbc_m", culateService.culateSjbc(list,"zgf"));
  2347 + map.put("sjbc_a", culateService.culateSjbc(list,"wgf"));
  2348 + map.put("ljbc", culateService.culateLjbc(list,""));
  2349 + map.put("ljbc_m", culateService.culateLjbc(list,"zgf"));
  2350 + map.put("ljbc_a", culateService.culateLjbc(list,"wgf"));
  2351 + map.put("fzbc", culateService.culateFzbc(list, ""));
  2352 + map.put("fzbc_m", culateService.culateFzbc(list, "zgf"));
  2353 + map.put("fzbc_a", culateService.culateFzbc(list, "wgf"));
  2354 + map.put("dtbc", 0);
  2355 + map.put("dtbc_m", 0);
  2356 + map.put("dtbc_a", 0);
  2357 + map.put("djg", 0);
  2358 + map.put("djg_m", 0);
  2359 + map.put("djg_a", 0);
  2360 + map.put("djg_time", 0);
  2361 + lMap.add(map);
2773 2362 if (type != null && type.length() != 0 && type.equals("export")) {
2774 2363 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
2775 2364 sdfSimple = new SimpleDateFormat("yyyyMMdd");
... ... @@ -3860,13 +3449,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3860 3449 ScheduleRealInfo s = scheduleRealInfoRepository.findOne(id);
3861 3450 String xlbm = s.getXlBm();
3862 3451 String fcrq = s.getScheduleDateStr();
3863   - //保留两位小数
3864   - DecimalFormat df = new DecimalFormat("#.00");
3865 3452 List<Ylxxb> listYlxxb = ylxxbRepository.queryListYlxxb(s.getClZbh(), fcrq);
3866 3453 Double jzl = 0.0;
3867 3454 for (int t = 0; t < listYlxxb.size(); t++) {
3868 3455 Ylxxb y = listYlxxb.get(t);
3869   - jzl += y.getJzl();
  3456 + jzl = Arith.add(jzl, y.getJzl());
3870 3457 }
3871 3458  
3872 3459 List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh());
... ... @@ -3875,12 +3462,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3875 3462 Double yh = 0.0;
3876 3463 for (int i = 0; i < listYlb.size(); i++) {
3877 3464 Ylb y = listYlb.get(i);
3878   - ccyl += y.getCzyl();
3879   - jcyl += y.getJzyl();
3880   - yh += y.getYh();
3881   -
  3465 + ccyl=Arith.add(ccyl, y.getCzyl());
  3466 + jcyl=Arith.add(jcyl, y.getJzyl());
  3467 + yh =Arith.add(yh ,y.getYh());
3882 3468 }
3883   - map.put("jzl", df.format(jzl));
  3469 + map.put("jzl", jzl);
3884 3470 map.put("yh", yh);
3885 3471 map.put("ccyl", ccyl);
3886 3472 map.put("jcyl", jcyl);
... ... @@ -3981,18 +3567,20 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3981 3567  
3982 3568 if (scheduleRealInfo.getsGh() != null) {
3983 3569 if (!scheduleRealInfo.getsGh().equals(sgh)) {
3984   - sgh = scheduleRealInfo.getsGh();
3985   - if (map.get("sjb1") != null) {
3986   - if (map.get("sjb2") != null) {
3987   - map.put("sjb3", scheduleRealInfo.getsGh() + "/" +
3988   - scheduleRealInfo.getFcsjActual());
3989   - } else {
3990   - map.put("sjb2", scheduleRealInfo.getsGh() + "/" +
3991   - scheduleRealInfo.getFcsjActual());
3992   - }
3993   - } else {
3994   - map.put("sjb1", scheduleRealInfo.getsGh() + "/" +
3995   - scheduleRealInfo.getFcsjActual());
  3570 + sgh = scheduleRealInfo.getsGh()==null?"":scheduleRealInfo.getsGh();
  3571 + if(!sgh.equals("")){
  3572 + if (map.get("sjb1") != null) {
  3573 + if (map.get("sjb2") != null) {
  3574 + map.put("sjb3", scheduleRealInfo.getsGh() + "/" +
  3575 + scheduleRealInfo.getFcsjActual());
  3576 + } else {
  3577 + map.put("sjb2", scheduleRealInfo.getsGh() + "/" +
  3578 + scheduleRealInfo.getFcsjActual());
  3579 + }
  3580 + } else {
  3581 + map.put("sjb1", scheduleRealInfo.getsGh() + "/" +
  3582 + scheduleRealInfo.getFcsjActual());
  3583 + }
3996 3584 }
3997 3585 }
3998 3586 }
... ...
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -162,7 +162,7 @@ public class ReportServiceImpl implements ReportService{
162 162 arr.setLineCode(rs.getString("line_id"));
163 163 arr.setUpDown(rs.getInt("up_down"));
164 164 arr.setStopNo(rs.getString("stop_no"));
165   - arr.setStopName(BasicData.stationCode2NameMap.get(arr.getStopNo()));
  165 + arr.setStopName(BasicData.stationCode2NameMap.get(rs.getString("line_id")+"_"+rs.getInt("up_down")+"_"+rs.getString("stop_no")));
166 166 arr.setInOut(rs.getInt("in_out"));
167 167 arr.setCreateDate(rs.getLong("create_timestamp"));
168 168 arr.setWeeksYear(rs.getInt("weeks_year"));
... ...
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/stationroute/editsection.html
1 1 <!-- 编辑路段 -->
2 2 <div class="modal fade" id="edit_section_mobal" tabindex="-1" role="basic" aria-hidden="true">
3   -
4 3 <div class="modal-dialog">
5   -
6 4 <div class="modal-content">
7   -
8 5 <div class="modal-header">
9 6 <button type="button" class="close" data-dismiss="modal" aria-hidden="true"></button>
10 7 <h4 class="modal-title">路段路段</h4>
11 8 </div>
12   -
13 9 <div class="modal-body">
14   -
15 10 <form class="form-horizontal" role="form" id="edit_section__form" action="/module" method="post">
16   -
17 11 <div class="alert alert-danger display-hide"> <button class="close" data-close="alert"></button>
18 12 您的输入有误,请检查下面的输入项
19 13 </div>
20   -
21 14 <!-- 线路ID -->
22   -
23 15 <input type="hidden" name="sectionId" id="sectionIdInput">
24   -
25 16 <input type="hidden" name="sectionRouteId" id="sectionRouteIdInput">
26   -
27 17 <input type="hidden" name="sectionRouteLine" id="sectionRouteLineInput">
28   -
29 18 <input type="hidden" name="lineCode" id="lineCodeInput">
30   -
31 19 <input type="hidden" name="bsectionVector" id="bsectionVectorInput" />
32   -
33 20 <input type="hidden" name="csectionVector" id="csectionVectorInput" value=""/>
34   -
35 21 <input type="hidden" name="dbType" id="dbTypeInput" value="b"/>
36   -
37 22 <!-- 路段名称 -->
38 23 <div class="form-body">
39 24 <div class="form-group">
... ... @@ -45,7 +30,6 @@
45 30 </div>
46 31 </div>
47 32 </div>
48   -
49 33 <!-- 路段编码 -->
50 34 <div class="form-body">
51 35 <div class="form-group">
... ... @@ -57,7 +41,6 @@
57 41 </div>
58 42 </div>
59 43 </div>
60   -
61 44 <!-- 路段序号 -->
62 45 <div class="form-body">
63 46 <div class="form-group">
... ... @@ -70,24 +53,6 @@
70 53 </div>
71 54 </div>
72 55 </div>
73   -
74   - <!-- 路段类型 -->
75   - <!-- <div class="form-body">
76   - <div class="form-group">
77   - <label class="control-label col-md-3">
78   - <span class="required"> * </span>路段类型:
79   - </label>
80   - <div class="col-md-6">
81   - <select name="sectionType" class="form-control" id="sectionTypeSelect">
82   - <option value="">-- 请选择路段类型 --</option>
83   - <option value="B">起点站</option>
84   - <option value="Z">中途站</option>
85   - <option value="E">终点站</option>
86   - </select>
87   - </div>
88   - </div>
89   - </div> -->
90   -
91 56 <!-- 路段方向 -->
92 57 <div class="form-body">
93 58 <div class="form-group">
... ... @@ -103,7 +68,6 @@
103 68 </div>
104 69 </div>
105 70 </div>
106   -
107 71 <!-- 道路编码-->
108 72 <div class="form-body">
109 73 <div class="form-group">
... ... @@ -113,7 +77,6 @@
113 77 </div>
114 78 </div>
115 79 </div>
116   -
117 80 <!-- 路段限速 -->
118 81 <div class="form-body">
119 82 <div class="form-group">
... ... @@ -125,7 +88,6 @@
125 88 </div>
126 89 </div>
127 90 </div>
128   -
129 91 <!-- 路段时长 -->
130 92 <div class="form-body">
131 93 <div class="form-group">
... ... @@ -136,7 +98,6 @@
136 98 </div>
137 99 </div>
138 100 </div>
139   -
140 101 <!-- 路段长度 -->
141 102 <div class="form-body">
142 103 <div class="form-group">
... ... @@ -147,7 +108,6 @@
147 108 </div>
148 109 </div>
149 110 </div>
150   -
151 111 <!-- 版本号 -->
152 112 <div class="form-body">
153 113 <div class="form-group">
... ... @@ -157,7 +117,6 @@
157 117 </div>
158 118 </div>
159 119 </div>
160   -
161 120 <!-- 范围图形类型 -->
162 121 <div class="form-body">
163 122 <div class="form-group">
... ... @@ -171,7 +130,6 @@
171 130 </div>
172 131 </div>
173 132 </div>
174   -
175 133 <!-- 描述/说明 -->
176 134 <div class="form-group">
177 135 <label class="control-label col-md-3"> 描述/说明: </label>
... ... @@ -191,99 +149,56 @@
191 149 <script type="text/javascript">
192 150  
193 151 $('#edit_section_mobal').on('editSectionMobal_show', function(e, map_,ajaxd,section,fun){
194   -
195 152 var Section = section.getEitdSection();
196   -
197 153 fun.setSectionFormValue(Section);
198   -
199 154 // 方向
200 155 var dir = Section.sectionrouteDirections;
201   -
202 156 var lineId = Section.sectionrouteLine;
203   -
204 157 // 获取路段号元素,并添加下拉属性值
205 158 ajaxd.getStation(lineId,dir,function(treeData) {
206   -
207 159 var options = '<option value="">请选择...</option>';
208   -
209 160 var dArray = treeData[0].children[1].children;
210   -
211 161 var eq_stationRouteCode = Section.sectionrouteCode;
212   -
213 162 for(var i = 0 ; i<dArray.length; i++){
214   -
215 163 var ptions_v = dArray[i].sectionrouteCode;
216   -
217 164 // 排除本站
218   - if(eq_stationRouteCode == ptions_v){
219   -
  165 + if(eq_stationRouteCode == ptions_v)
220 166 continue;
221   -
222   - }
223   -
224 167 options += '<option value="'+ ptions_v +'">'+dArray[i].sectionName+'</option>'
225   -
226 168 }
227   -
228 169 $('#sectionrouteCodeSelect').html(options);
229   -
230 170 ajaxd.findUpSectionRouteCode(lineId,dir,eq_stationRouteCode,function(str) {
231   -
232 171 if(str.length>0){
233   -
234 172 var upStationRouteCode = str[0].sectionrouteCode
235   -
236 173 $('#sectionrouteCodeSelect').val(upStationRouteCode);
237   -
238 174 }
239   -
240 175 });
241   -
242 176 });
243   -
244 177 // 显示mobal
245 178 $('#edit_section_mobal').modal({show : true,backdrop: 'static',keyboard: false});
246   -
247 179 // 当调用 hide 实例方法时触发
248 180 $('#edit_section_mobal').on('hide.bs.modal', function () {
249   -
250 181 closeMobleSetClean();
251   -
252 182 });
253   -
254 183 function closeMobleSetClean() {
255   -
256 184 // 清除地图覆盖物
257 185 map_.clearMarkAndOverlays();
258   -
259 186 /** 设置修改路段集合对象为空 */
260 187 section.setEitdSection({});
261   -
262 188 fun.resjtreeDate(lineId,dir);
263   -
264 189 fun.editAChangeCssRemoveDisabled();
265   -
266 190 ajaxd.getSectionRouteInfo(lineId,dir,function(data) {
267   -
268 191 fun.linePanlThree(lineId,data,dir);
269   -
270 192 });
271   -
272 193 }
273   -
274 194 // 编辑表单元素
275 195 var form = $('#edit_section__form');
276   -
277 196 // 获取错误提示元素
278 197 var error = $('.alert-danger', form);
279   -
280 198 // 提交数据按钮事件
281 199 $('#editSectionButton').on('click', function() {
282   -
283   -
284 200 // 表单提交
285 201 form.submit();
286   -
287 202 });
288 203  
289 204 // 表单验证
... ... @@ -392,42 +307,23 @@ $(&#39;#edit_section_mobal&#39;).on(&#39;editSectionMobal_show&#39;, function(e, map_,ajaxd,sect
392 307 },
393 308  
394 309 submitHandler : function(f) {
395   -
396 310 var params = form.serializeJSON();
397   -
398 311 error.hide();
399   -
400   - console.log(params);
401   -
402 312 ajaxd.sectionUpdate(params,function(resuntDate) {
403   -
404 313 if(resuntDate.status=='SUCCESS') {
405   -
406 314 // 弹出添加成功提示消息
407 315 layer.msg('修改成功...');
408   -
409   -
410 316 }else {
411   -
412 317 // 弹出添加失败提示消息
413 318 layer.msg('修改失败...');
414   -
415 319 }
416   -
417 320 $('#edit_section_mobal').modal('hide');
418   -
419 321 var dir = params.directions
420   -
421 322 // 刷行左边树
422 323 fun.resjtreeDate(lineId,dir);
423   -
424 324 closeMobleSetClean();
425   -
426 325 });
427   -
428 326 }
429 327 });
430   -
431   -
432 328 });
433 329 </script>
434 330 \ No newline at end of file
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-ajax-getdata.js
... ... @@ -169,13 +169,9 @@ var GetAjaxData = function(){
169 169  
170 170 // 查询路段信息
171 171 getSectionRouteInfo : function(lineId,direction,callback) {
172   -
173 172 $get('/sectionroute/findSection',{'line.id_eq' : lineId , 'directions_eq' : direction},function(resultdata) {
174   -
175 173 callback && callback(resultdata);
176   -
177 174 });
178   -
179 175 },
180 176  
181 177 // 手动规划线路保存
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-events.js
... ... @@ -22,199 +22,222 @@ $(function(){
22 22  
23 23 // 上行站点其它规划点击事件
24 24 $('.upManual').on('click',function() {
25   -
26 25 // 加载其它规划选择弹出层mobal页面
27 26 $.get('add_manual_select.html', function(m){
28   -
29 27 $(pjaxContainer).append(m);
30   -
31 28 $('#add_manual_mobal').trigger('AddManualMobal.show', [WorldsBMap,GetAjaxData,directionUpValue,LineObj,PublicFunctions]);
32   -
33 29 });
34 30  
35 31 });
36 32  
37 33 // 上行站点新增事件
38 34 $('.module_tools #addUpStation').on('click', function() {
39   -
40 35 /** 设置新增站点对象方向属性值 @param:<directionUpValue:方向(0:上行;1:下行)> */
41 36 AddStationObj.setAddStationDiraction(directionUpValue);
42   -
43 37 // 加载选择新增方式mobal
44 38 $.get('add_select.html', function(m){
45   -
46 39 $(pjaxContainer).append(m);
47   -
48 40 $('#add_select_mobal').trigger('AddSelectMobal.show', [WorldsBMap,DrawingManagerObj,GetAjaxData,AddStationObj,LineObj,PublicFunctions]);
49   -
50 41 });
51   -
52 42 });
53 43  
54 44 // 修改上行站点mobal页面
55 45 $('.module_tools #editUpStation').on('click', function(){
56   -
57 46 var sel = PublicFunctions.getCurrSelNode(directionUpValue);
58   -
59 47 if(sel.length==0 || sel[0].original.chaildredType !='station'){
60   -
61 48 layer.msg('请先选择要编辑的上行站点!');
62   -
63 49 return;
64 50 }
65   -
66 51 $.get('edit_select.html', function(m){
67   -
68 52 $(pjaxContainer).append(m);
69   -
70 53 $('#edit_select_mobal').trigger('editSelectMobal_show', [WorldsBMap,DrawingManagerObj,GetAjaxData,EditStationObj,LineObj,PublicFunctions,directionUpValue]);
71 54 });
72   -
73 55 });
74 56  
75 57 // 撤销上行站点
76 58 $('.module_tools #deleteUpStation').on('click', function() {
77   -
78 59 PublicFunctions.stationRevoke(directionUpValue);
79   -
80 60 });
81 61  
82   - // 编辑线路上行走向
83   - $('.module_tools #editUplineTrend').on('click', function() {
84   -
85   - PublicFunctions.editLinePlan(directionUpValue);
86   -
  62 + // 切换上下行.
  63 + $('.retweet').on('click',function() {
  64 + layer.confirm('您是否确定将【上、下】行站点和路段进行对换!', {
  65 + btn : [ '确认提示并提交', '取消' ]
  66 + },function () {
  67 + // 关闭所有提示弹出层.
  68 + layer.closeAll();
  69 + // 弹出提示层.
  70 + var index = layer.load(1, {
  71 + shade: [0.1,'#fff'] // 透明度的白色背景
  72 + });
  73 + var Line = LineObj.getLineObj();
  74 + $post('/stationroute/updSwitchDir?lineIds='+ Line.id,null,function(data) {
  75 + layer.close(index);
  76 + if(data.status=='SUCCESS') {
  77 + // 弹出添加成功提示消息
  78 + layer.msg('操作成功...');
  79 + }else {
  80 + // 弹出添加失败提示消息
  81 + layer.msg('操作成功...');
  82 + }
  83 + WorldsBMap.clearMarkAndOverlays();
  84 + // 刷新左边树
  85 + PublicFunctions.resjtreeDate(Line.id,0);
  86 + PublicFunctions.resjtreeDate(Line.id,1);
  87 + /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:路段数据 */
  88 + GetAjaxData.getSectionRouteInfo(Line.id,0,function(data) {
  89 + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
  90 + PublicFunctions.linePanlThree(Line.id,data,0);
  91 + });
  92 + });
  93 + });
87 94 });
88 95  
  96 + $('#quoteUp').on('click',function() {
  97 + // 弹出提示层.
  98 + var index = layer.load(1, {
  99 + shade: [0.1,'#fff'] // 透明度的白色背景
  100 + });
  101 + var Line = LineObj.getLineObj();
  102 + var params = {'lineId':Line.id ,'dir':0,'toDir':1};
  103 + quote(params,index);
  104 + /*$post('/sectionroute/quoteSection',{'lineId':Line.id ,'dir':0,'toDir':1} ,function(data) {
  105 + layer.close(index);
  106 + if(data.status=='SUCCESS') {
  107 + // 弹出添加成功提示消息
  108 + layer.msg('操作成功...');
  109 + }else {
  110 + // 弹出添加失败提示消息
  111 + layer.msg('操作成功...');
  112 + }
  113 + WorldsBMap.clearMarkAndOverlays();
  114 + // 刷新左边树
  115 + PublicFunctions.resjtreeDate(Line.id,0);
  116 + PublicFunctions.resjtreeDate(Line.id,1);
  117 + *//** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:路段数据 *//*
  118 + GetAjaxData.getSectionRouteInfo(Line.id,0,function(data) {
  119 + *//** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> *//*
  120 + PublicFunctions.linePanlThree(Line.id,data,0);
  121 + });
  122 + });*/
  123 + });
  124 +
  125 +
  126 + $('#quoteDown').on('click',function() {
  127 + // 弹出提示层.
  128 + var index = layer.load(1, {
  129 + shade: [0.1,'#fff'] // 透明度的白色背景
  130 + });
  131 + var Line = LineObj.getLineObj();
  132 + var params = {'lineId':Line.id ,'dir':1,'toDir':0} ;
  133 + quote(params,index);
  134 + });
  135 +
  136 + function quote(params,index) {
  137 + $post('/sectionroute/quoteSection',params,function(data) {
  138 + layer.close(index);
  139 + if(data.status=='SUCCESS') {
  140 + // 弹出添加成功提示消息
  141 + layer.msg('操作成功...');
  142 + }else {
  143 + // 弹出添加失败提示消息
  144 + layer.msg('操作成功...');
  145 + }
  146 + WorldsBMap.clearMarkAndOverlays();
  147 + // 刷新左边树
  148 + PublicFunctions.resjtreeDate(Line.id,0);
  149 + PublicFunctions.resjtreeDate(Line.id,1);
  150 + /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:路段数据 */
  151 + GetAjaxData.getSectionRouteInfo(Line.id,0,function(data) {
  152 + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
  153 + PublicFunctions.linePanlThree(Line.id,data,0);
  154 + });
  155 + });
  156 + }
  157 + // 编辑线路上行走向
  158 + $('.module_tools #editUplineTrend').on('click', function() {PublicFunctions.editLinePlan(directionUpValue);});
  159 +
89 160 // 线路上行
90 161 $('#leftUpOrDown #upLine').on('click', function(){
91   -
92 162 var lineIdEvents = LineObj.getLineObj();
93   -
94 163 GetAjaxData.getSectionRouteInfo(lineIdEvents.id,directionUpValue,function(data) {
95   -
96 164 PublicFunctions.linePanlThree(lineIdEvents.id,data,directionUpValue);
97   -
98 165 });
99   -
100 166 });
101 167  
102 168 // 系统规划下行站点
103 169 $('.downSystem').on('click',function() {
104   -
105 170 // 隐藏下行规划
106 171 $('#downToolsMobal').hide();
107   -
108 172 // 弹出正在加载层
109 173 var i = layer.load(0,{offset:['200px', '280px']});
110   -
111 174 /** 修正线路名称 @param:<directionUpValue:方向(上行)> */
112 175 PublicFunctions.lineNameIsHaveInterval(directionDownValue);
113   -
114 176 });
115 177  
116 178 // 下行站点其它规划点击事件
117 179 $('.downManual').on('click',function() {
118   -
119 180 // 加载其它规划选择弹出层mobal页面
120 181 $.get('add_manual_select.html', function(m){
121   -
122 182 $(pjaxContainer).append(m);
123   -
124 183 $('#add_manual_mobal').trigger('AddManualMobal.show', [WorldsBMap,GetAjaxData,directionDownValue,LineObj,PublicFunctions]);
125   -
126 184 });
127   -
128 185 });
129 186  
130 187 // 下行站点新增事件
131 188 $('.module_tools #addDownStation').on('click', function() {
132   -
133 189 /** 设置新增站点对象方向属性值 @param:<directionUpValue:方向(0:上行;1:下行)> */
134 190 AddStationObj.setAddStationDiraction(directionDownValue);
135   -
136 191 // 加载选择新增方式mobal
137 192 $.get('add_select.html', function(m){
138   -
139 193 $(pjaxContainer).append(m);
140   -
141 194 $('#add_select_mobal').trigger('AddSelectMobal.show', [WorldsBMap,DrawingManagerObj,GetAjaxData,AddStationObj,LineObj,PublicFunctions]);
142   -
143 195 });
144   -
145 196 });
146 197  
147 198 // 修改下行站点mobal页面
148 199 $('.module_tools #editDownStation').on('click', function(){
149   -
150 200 var sel = PublicFunctions.getCurrSelNode(directionDownValue);
151   -
152 201 if(sel.length==0 || sel[0].original.chaildredType !='station'){
153   -
154 202 layer.msg('请先选择要编辑的下行站点!');
155   -
156 203 return;
157 204 }
158   -
159 205 $.get('edit_select.html', function(m){
160   -
161 206 $(pjaxContainer).append(m);
162   -
163 207 $('#edit_select_mobal').trigger('editSelectMobal_show', [WorldsBMap,DrawingManagerObj,GetAjaxData,EditStationObj,LineObj,PublicFunctions,directionDownValue]);
164 208 });
165   -
166 209 });
167 210  
168 211 // 撤销下行站点
169 212 $('.module_tools #deleteDownStation').on('click', function() {
170   -
171 213 PublicFunctions.stationRevoke(directionDownValue);
172   -
173 214 });
174 215  
175 216 // 编辑线路下行走向
176 217 $('.module_tools #editDownlineTrend').on('click', function() {
177   -
178 218 PublicFunctions.editLinePlan(directionDownValue);
179   -
180 219 });
181 220  
182 221 // 线路下行
183 222 $('#leftUpOrDown #downLine').on('click', function(){
184   -
185 223 var lineIdEvents = LineObj.getLineObj();
186   -
187 224 GetAjaxData.getSectionRouteInfo(lineIdEvents.id,directionDownValue,function(data) {
188   -
189 225 PublicFunctions.linePanlThree(lineIdEvents.id,data,directionDownValue);
190   -
191 226 });
192   -
193 227 });
194 228  
195 229 // 生成行单
196 230 $('.module_tools #createUsingSingle').on('click', function() {
197   -
198 231 var lineIdEvents = LineObj.getLineObj();
199   -
200 232 var params = {lineId:lineIdEvents.id};
201   -
202 233 GetAjaxData.createUsingSingle(params,function(data) {
203   -
204 234 if(data.status=='SUCCESS') {
205   -
206 235 // 弹出添加成功提示消息
207 236 layer.msg('生成成功...');
208   -
209 237 }else {
210   -
211 238 // 弹出添加失败提示消息
212 239 layer.msg('生成失败...');
213   -
214 240 }
215   -
216 241 });
217   -
218 242 });
219   -
220 243 });
221 244 \ No newline at end of file
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
... ... @@ -478,7 +478,6 @@ var PublicFunctions = function () {
478 478 $('#upLine').addClass('btn disabled');
479 479  
480 480 var editSectionV = sel[0].original;
481   -
482 481 EditSectionObj.setEitdSection(editSectionV);
483 482  
484 483 // 弹出添加失败提示消息,2秒关闭(如果不配置,默认是3秒)
... ... @@ -634,80 +633,53 @@ var PublicFunctions = function () {
634 633  
635 634 /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
636 635 linePanlThree : function(lineId,data,direction) {
637   -
638 636 /** 获取站点路由信息 @param:<Line.id:线路Id;0:上行> @return:<resultdata:站点路由数据> */
639 637 GetAjaxData.getStationRoutePoint(lineId,direction,function(resultdata) {
640   -
641 638 WorldsBMap.clearMarkAndOverlays();
642   -
643 639 var polyline_center;
644   -
645 640 // 如果站点路由数据不为空
646 641 if(resultdata.length>0) {
647   -
648 642 var ceter_index = Math.round(resultdata.length / 2);
649   -
650 643 var ceterPointsStr = resultdata[ceter_index].bJwpoints;
651   -
652 644 var ceterPointsArray = ceterPointsStr.split(' ');
653   -
654 645 polyline_center = new BMap.Point(ceterPointsArray[0],ceterPointsArray[1]);
655   -
656 646 // 遍历站点路由数据
657 647 for(var s = 0 ; s<resultdata.length;s++) {
658   -
659 648 // 中心点坐标字符串
660 649 var bJwpointsStr = resultdata[s].bJwpoints;
661   -
662 650 var stationName = resultdata[s].stationName;
663   -
664 651 // 起个中心点坐标字符串
665 652 var bJwpointsArray = bJwpointsStr.split(' ');
666   -
667 653 // 设置中心点
668 654 var point_center = new BMap.Point(bJwpointsArray[0],bJwpointsArray[1]);
669   -
670 655 /** 在地图上画点 @param:<point_center:中心坐标点> */
671 656 WorldsBMap.drawingUpStationPoint(point_center,stationName,s+1);
672   -
673 657 }
674 658  
675 659 }
676   -
677 660 // 路段数据长度
678 661 var dataLen = data.length;
679 662 //debugger;
680 663 // 如果大于零
681 664 if(dataLen>0) {
682   -
683 665 // 编辑路段数据
684 666 for(var d= 0; d<dataLen;d++){
685   -
686 667 // 地图折线坐标点集合
687 668 var polylineArray = [];
688   -
689 669 // 获取路段折线坐标字符串
690 670 var sectionBsectionVectorStr = data[d].sectionBsectionVector;
691   -
692   - if(sectionBsectionVectorStr==null) {
693   -
  671 + if(sectionBsectionVectorStr==null)
694 672 continue;
695   -
696   - }
697   -
698 673 // 切割段折线坐标字符串
699 674 var tempStr = sectionBsectionVectorStr.substring(11,sectionBsectionVectorStr.length-1);
700   -
701 675 // 分割折线坐标字符串
702 676 var lineArray = tempStr.split(',');
703   -
704 677 for(var i = 0;i<lineArray.length;i++) {
705   -
706 678 polylineArray.push(new BMap.Point(lineArray[i].split(' ')[0],lineArray[i].split(' ')[1]));
707   -
708 679 }
709 680 /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */
710   - WorldsBMap.drawingUpline(polylineArray,polyline_center);
  681 + /*WorldsBMap.drawingUpline(polylineArray,polyline_center,data[d]);*/
  682 + WorldsBMap.drawingUpline01(polylineArray,polyline_center,data[d]);
711 683  
712 684 }
713 685 }
... ... @@ -748,48 +720,27 @@ var PublicFunctions = function () {
748 720  
749 721 // 下行
750 722 }else if(diraction ==1) {
751   -
752 723 /** 出事画下行树 @param:<treeDateJson:树数据结构> */
753 724 StationTreeData.downInit(treeDateJson);
754   -
755 725 if(len>0) {
756   -
757 726 $('#downToolsMobal').hide();
758   -
759 727 $('#DowntreeMobal').show();
760   -
761 728 }else {
762   -
763 729 $('#downToolsMobal').show();
764   -
765 730 $('#DowntreeMobal').hide();
766   -
767 731 }
768   -
769 732 }
770   -
771 733 });
772   -
773 734 },
774   -
775 735 isHaveStationName : function(data) {
776   -
777 736 if(data.length>0) {
778   -
779 737 layer.confirm('系统已存在【'+ data[0].stationName +'】该站点位置名称,请选择【系统引用】或者更改站点名称进行新增!', {btn : [ '返回' ],icon: 3, title:'提示' }, function(index){
780   -
781 738 layer.close(index);
782   -
783 739 });
784   -
785 740 return false;
786   -
787 741 }else {
788   -
789 742 return true;
790   -
791 743 }
792   -
793 744 },
794 745  
795 746 editAChangeCssRemoveDisabled : function() {
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
... ... @@ -25,7 +25,7 @@
25 25 var WorldsBMap = function () {
26 26  
27 27 /** WorldsBMap 全局变量定义 mapBValue:地图对象;polygon:多边形;polyUpline:走向折线;circle:圆 */
28   - var mapBValue = '';polygon='',polyUpline='',circle='';
  28 + var mapBValue = '';polygon='',polyUpline='',circle='',iseditStatus = false;
29 29  
30 30 var Bmap = {
31 31  
... ... @@ -80,6 +80,14 @@ var WorldsBMap = function () {
80 80 return circle;
81 81 },
82 82  
  83 + getIsEditStatus : function() {
  84 + return iseditStatus;
  85 + },
  86 +
  87 + setIsEditStatus : function(v) {
  88 + iseditStatus = v ;
  89 + },
  90 +
83 91 initDrawingManager: function(map,styleOptions) {
84 92  
85 93 },
... ... @@ -339,40 +347,26 @@ var WorldsBMap = function () {
339 347 },
340 348  
341 349 editPolyUpline : function() {
342   -
343 350 // 禁止覆盖物在map.clearOverlays方法中被清除。(自 1.1 新增)
344 351 polyUpline.disableMassClear();
345   -
346 352 WorldsBMap.clearMarkAndOverlays();
347   -
348 353 // 允许覆盖物在map.clearOverlays方法中被清除。(自 1.1 新增)
349 354 polyUpline.enableMassClear();
350   -
351 355 // 开启线路编辑
352 356 polyUpline.enableEditing();
353   -
354 357 // 添加双击折线保存事件
355 358 polyUpline.addEventListener('dblclick',function(e) {
356   -
357 359 // 关闭
358 360 layer.closeAll();
359   -
360 361 polyUpline.disableEditing();
361   -
362 362 // 获取折线坐标集合
363 363 var editPloyLineArray = polyUpline.getPath();
364   -
365 364 EditSectionObj.setEitdBsectionVector(JSON.stringify(editPloyLineArray));
366   -
367 365 polyUpline= '';
368   -
369 366 // 加载修改路段弹出层mobal页面
370 367 $.get('editsection.html', function(m){
371   -
372 368 $(pjaxContainer).append(m);
373   -
374 369 $('#edit_section_mobal').trigger('editSectionMobal_show', [WorldsBMap,GetAjaxData,EditSectionObj,PublicFunctions]);
375   -
376 370 });
377 371 });
378 372 },
... ... @@ -651,17 +645,14 @@ var WorldsBMap = function () {
651 645 },
652 646  
653 647 // 在地图上画出上行线路走向
654   - drawingUpline : function (polylineArray,polyline_center) {
655   -
  648 + drawingUpline : function (polylineArray,polyline_center,data) {
656 649 /*WorldsBMap.clearMarkAndOverlays();*/
657 650 polyUpline = '';
658   -
659 651 // 创建线路走向
660 652 polyUpline = new BMap.Polyline(polylineArray, {strokeColor : "blue",strokeWeight : 6,strokeOpacity : 0.5});
661   -
  653 + // polyUpline.data = data;
662 654 // 把折线添加到地图上
663 655 mapBValue.addOverlay(polyUpline);
664   -
665 656 /*var ceter_index = Math.round(resultdata.length / 2);
666 657  
667 658 var ceterPointsStr = resultdata[ceter_index].bJwpoints;
... ... @@ -669,17 +660,52 @@ var WorldsBMap = function () {
669 660 var ceterPointsArray = ceterPointsStr.split(' ');
670 661  
671 662 var polyline_center = new BMap.Point(ceterPointsArray[0],ceterPointsArray[1]);*/
672   -
673 663 var PanOptions_ ={noAnimation :true};
674   -
675 664 mapBValue.reset();
676   -
677 665 mapBValue.panTo(polyline_center,PanOptions_);
678   -
679 666 mapBValue.panBy(500,-510,PanOptions_);
680   -
681 667 mapBValue.setZoom(14);
682   -
  668 + },
  669 +
  670 +
  671 + // 在地图上画出上行线路走向
  672 + drawingUpline01 : function (polylineArray,polyline_center,data) {
  673 + var polyUpline01 = 'polyline' + '_' + data.sectionrouteId;
  674 + // 创建线路走向
  675 + polyUpline01 = new BMap.Polyline(polylineArray, {strokeColor : "blue",strokeWeight : 6,strokeOpacity : 0.5});
  676 + polyUpline01.data = data;
  677 + // 把折线添加到地图上
  678 + mapBValue.addOverlay(polyUpline01);
  679 + polyUpline01.addEventListener('click',function(e) {
  680 + if(WorldsBMap.getIsEditStatus()) {
  681 + layer.msg('请先保存正在编辑的路段信息...');
  682 + return false;
  683 + }
  684 + polyUpline01.enableEditing();
  685 + WorldsBMap.setIsEditStatus(true);
  686 + });
  687 + // 添加双击折线保存事件
  688 + polyUpline01.addEventListener('dblclick',function(e) {
  689 + WorldsBMap.setIsEditStatus(false);
  690 + // 关闭
  691 + layer.closeAll();
  692 + polyUpline01.disableEditing();
  693 + EditSectionObj.setEitdSection(polyUpline01.data);
  694 + // 获取折线坐标集合
  695 + var editPloyLineArray = polyUpline01.getPath();
  696 + EditSectionObj.setEitdBsectionVector(JSON.stringify(editPloyLineArray));
  697 + // polyUpline= '';
  698 + // 加载修改路段弹出层mobal页面
  699 + $.get('editsection.html', function(m){
  700 + $(pjaxContainer).append(m);
  701 + $('#edit_section_mobal').trigger('editSectionMobal_show', [WorldsBMap,GetAjaxData,EditSectionObj,PublicFunctions]);
  702 + });
  703 + });
  704 + var PanOptions_ ={noAnimation :true};
  705 + mapBValue.reset();
  706 + mapBValue.panTo(polyline_center,PanOptions_);
  707 + mapBValue.panBy(500,-510,PanOptions_);
  708 + mapBValue.setZoom(14);
683 709 },
684 710  
685 711 /** 在地图上画点 @param:<point_center:中心坐标点> */
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-reload.js
... ... @@ -7,38 +7,18 @@
7 7 $(function(){
8 8  
9 9 // 关闭左侧栏
10   - if (!$('body').hasClass('page-sidebar-closed')) {
11   -
12   - $('.menu-toggler.sidebar-toggler').click();
13   -
14   - }
15   -
  10 + if (!$('body').hasClass('page-sidebar-closed')) {$('.menu-toggler.sidebar-toggler').click();}
16 11 // 获取参数线路ID
17 12 var id = $.url().param('no');
18   -
19 13 // 如果线路ID不为空
20 14 if(id) {
21   -
22 15 var styleOptions = {
23   -
24   - //边线颜色。
25   - strokeColor : "blue",
26   -
27   - //填充颜色。当参数为空时,圆形将没有填充效果。
28   - fillColor : "blue",
29   -
30   - //边线的宽度,以像素为单位。
31   - strokeWeight : 3,
32   -
33   - //边线透明度,取值范围0 - 1。
34   - strokeOpacity : 0.8,
35   -
36   - //填充的透明度,取值范围0 - 1。
37   - fillOpacity : 0.6,
38   -
39   - //边线的样式,solid或dashed。
40   - strokeStyle : 'solid'
41   -
  16 + strokeColor : "blue",//边线颜色。
  17 + fillColor : "blue",//填充颜色。当参数为空时,圆形将没有填充效果。
  18 + strokeWeight : 3,//边线的宽度,以像素为单位。
  19 + strokeOpacity : 0.8,//边线透明度,取值范围0 - 1。
  20 + fillOpacity : 0.6,//填充的透明度,取值范围0 - 1。
  21 + strokeStyle : 'solid' //边线的样式,solid或dashed。
42 22 };
43 23  
44 24 // 等候500毫秒执行
... ...
src/main/resources/static/pages/base/stationroute/list.html
1 1 <link href="/pages/base/stationroute/css/bmap_base.css" rel="stylesheet" type="text/css" />
2   -
3 2 <div class="portlet-body">
4   -
5 3 <!-- 地图 -->
6 4 <div id="bmap_basic" class="bmaps"></div>
7   -
8   -
9 5 <div class="portlet box protlet-box" style="top:20px">
10   -
11 6 <!-- 左边标题栏 -->
12 7 <div class="portlet-title" style="background-color:#3B3F51">
13 8 <div class="caption">
... ... @@ -17,13 +12,9 @@
17 12 <a href="javascript:;" class="collapse" data-original-title="" title=""> </a>
18 13 </div>
19 14 </div>
20   -
21   -
22 15 <!-- 左边栏 -->
23 16 <div class="portlet-body" style="border: 1px solid rgb(255, 255, 255); display: block;min-height: 200px;">
24   -
25 17 <div class="row">
26   -
27 18 <!-- 上下行栏 -->
28 19 <div class="col-md-3 col-sm-3 col-xs-3">
29 20 <ul class="nav nav-tabs tabs-left" id="leftUpOrDown">
... ... @@ -35,13 +26,10 @@
35 26 </li>
36 27 </ul>
37 28 </div>
38   -
39 29 <div class="col-md-9 col-sm-9 col-xs-9">
40 30 <div class="tab-content">
41   -
42 31 <!-- 左边栏上行 -->
43 32 <div class="tab-pane active in" id="stationUp" data-direction="0">
44   -
45 33 <div class="portlet-body" id="uptreeMobal" style="display: none">
46 34 <div class="table-toolbar">
47 35 <div class="row">
... ... @@ -71,8 +59,15 @@
71 59 </li>
72 60 <li class="divider"> </li>
73 61 <li>
74   - <a href="javascript:;" id="editUplineTrend"><i class="fa fa-edit"></i> 编辑走向</a>
  62 + <a href="javascript:;" class="retweet"><i class="fa fa-retweet"></i> 切换上下行</a>
  63 + </li>
  64 + <li class="divider"> </li>
  65 + <li>
  66 + <a href="javascript:;" id="quoteDown"><i class="fa fa-long-arrow-down"></i> 引用下行路段</a>
75 67 </li>
  68 + <!-- <li>
  69 + <a href="javascript:;" id="editUplineTrend"><i class="fa fa-edit"></i> 编辑走向</a>
  70 + </li> -->
76 71 <!-- <li>
77 72 <a href="javascript:;" id="createUsingSingle"><i class="fa fa-edit"></i> 生成行单</a>
78 73 </li> -->
... ... @@ -88,7 +83,6 @@
88 83 <div id="station_Up_tree" style="height: auto;max-height: 500px;overflow-y: auto;"></div>
89 84 </div>
90 85 </div>
91   -
92 86 <!-- 无上行站点添加方式 -->
93 87 <div id="upToolsMobal" class="portlet-body" style="display:none">
94 88 <div class="row">
... ... @@ -156,8 +150,15 @@
156 150 </li>
157 151 <li class="divider"> </li>
158 152 <li>
159   - <a href="javascript:;" id="editDownlineTrend"><i class="fa fa-close"></i> 编辑走向</a>
  153 + <a href="javascript:;" class="retweet"><i class="fa fa-retweet"></i> 切换上下行</a>
  154 + </li>
  155 + <li class="divider"> </li>
  156 + <li>
  157 + <a href="javascript:;" id="quoteUp"><i class="fa fa-long-arrow-up"></i> 引用上行路段</a>
160 158 </li>
  159 + <!-- <li>
  160 + <a href="javascript:;" id="editDownlineTrend"><i class="fa fa-close"></i> 编辑走向</a>
  161 + </li> -->
161 162 </ul>
162 163 </div>
163 164 </div>
... ... @@ -170,7 +171,6 @@
170 171 <div id="station_Down_tree" style="height: auto;max-height: 500px;overflow-y: auto;"></div>
171 172 </div>
172 173 </div>
173   -
174 174 <!-- 无上行站点添加方式 -->
175 175 <div id="downToolsMobal" class="portlet-body" style="display:none">
176 176 <div class="row">
... ... @@ -213,33 +213,23 @@
213 213 </div>
214 214 <!-- 线路类 -->
215 215 <script src="/pages/base/stationroute/js/line.js"></script>
216   -
217 216 <!-- 新增站点对象类 -->
218 217 <script src="/pages/base/stationroute/js/addstationobj.js"></script>
219   -
220 218 <!-- 修改站点对象类 -->
221 219 <script src="/pages/base/stationroute/js/editstationobj.js"></script>
222   -
223 220 <!-- 修改路段对象类 -->
224 221 <script src="/pages/base/stationroute/js/editsection.js"></script>
225   -
226 222 <!-- 绘图类 -->
227 223 <script src="/pages/base/stationroute/js/drawingManager.js"></script>
228   -
229 224 <!-- 地图类 -->
230 225 <script src="/pages/base/stationroute/js/stationroute-list-map.js"></script>
231   -
232 226 <!-- 函数与方法 -->
233 227 <script src="/pages/base/stationroute/js/stationroute-list-function.js"></script>
234   -
235 228 <!-- ajax请求类 -->
236 229 <script src="/pages/base/stationroute/js/stationroute-ajax-getdata.js"></script>
237   -
238 230 <!-- 树对类 -->
239 231 <script src="/pages/base/stationroute/js/stationroute-list-treedata.js"></script>
240   -
241 232 <!-- reload事件 -->
242 233 <script src="/pages/base/stationroute/js/stationroute-list-reload.js"></script>
243   -
244 234 <!-- 事件监听 -->
245 235 <script src="/pages/base/stationroute/js/stationroute-list-events.js"></script>
246 236 \ No newline at end of file
... ...
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 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 3636 \ No newline at end of file
... ...
src/main/resources/static/pages/forms/statement/scheduleDaily.html
... ... @@ -263,7 +263,6 @@
263 263  
264 264 <script>
265 265 $(function(){
266   - var fage=false;
267 266 // 关闭左侧栏
268 267 if (!$('body').hasClass('page-sidebar-closed'))
269 268 $('.menu-toggler.sidebar-toggler').click();
... ... @@ -292,7 +291,9 @@
292 291 initPinYinSelect2('#line',data,'');
293 292  
294 293 }) */
295   -
  294 + var fage=false;
  295 + var obj = [];
  296 + var xlList;
296 297 $.get('/report/lineList',function(result){
297 298 xlList=result;
298 299 $.get('/user/companyData', function(result){
... ...
src/main/resources/static/pages/forms/statement/statisticsDaily.html
... ... @@ -27,6 +27,15 @@
27 27 <div class="portlet light porttlet-fit bordered">
28 28 <div class="portlet-title">
29 29 <form class="form-inline" action="">
  30 + <div style="display: inline-block; " id="gsdmDiv">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select>
  37 + </div>
  38 + <div style="margin-top: 2px"></div>
30 39 <div style="display: inline-block;">
31 40 <span class="item-label" style="width: 80px;">线路: </span>
32 41 <select class="form-control" name="line" id="line" style="width: 180px;"></select>
... ... @@ -144,7 +153,7 @@
144 153 $("#date").val(year + "-" + month + "-" + day);
145 154  
146 155 $("#date2").val(year + "-" + month + "-" + day);
147   - $.get('/basic/lineCode2Name',function(result){
  156 + /* $.get('/basic/lineCode2Name',function(result){
148 157 var data=[];
149 158  
150 159 data.push({id: "", text:"请选择"});
... ... @@ -153,25 +162,93 @@
153 162 }
154 163 initPinYinSelect2('#line',data,'');
155 164  
156   - })
  165 + }) */
157 166  
158 167  
  168 + var fage=false;
  169 + var obj = [];
  170 + var xlList;
  171 + $.get('/report/lineList',function(result){
  172 + xlList=result;
  173 + $.get('/user/companyData', function(result){
  174 + obj = result;
  175 + var options = '';
  176 + for(var i = 0; i < obj.length; i++){
  177 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  178 + }
  179 +
  180 + if(obj.length ==0){
  181 + $("#gsdmDiv").css('display','none');
  182 + }else if(obj.length ==1){
  183 + $("#gsdmDiv").css('display','none');
  184 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  185 + $('#fgsdmDiv').css('display','none');
  186 + }
  187 + $('#gsdm').html(options);
  188 + updateCompany();
  189 + });
  190 + })
  191 + $("#gsdm").on("change",updateCompany);
  192 + function updateCompany(){
  193 + var company = $('#gsdm').val();
  194 + var options = '';
  195 + for(var i = 0; i < obj.length; i++){
  196 + if(obj[i].companyCode == company){
  197 + var children = obj[i].children;
  198 + for(var j = 0; j < children.length; j++){
  199 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  200 + }
  201 + }
  202 + }
  203 + $('#fgsdm').html(options);
  204 + initXl();
  205 + }
  206 + $("#fgsdm").on("change",initXl);
  207 + function initXl(){
  208 + var data=[];
  209 + data.push({id: " ", text: "请选择"});
  210 + if(fage){
  211 + $("#line").select2("destroy").html('');
  212 + }
  213 + var fgs=$('#fgsdm').val();
  214 + var gs=$('#gsdm').val();
  215 + for(var i=0;i<xlList.length;i++){
  216 + if(gs!=""){
  217 + if(fgs!=""){
  218 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  219 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  220 + }
  221 + }else{
  222 + if(xlList[i]["gsbm"]==gs){
  223 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  224 + }
  225 + }
  226 + }
  227 + }
  228 + initPinYinSelect2('#line',data,'');
  229 + fage=true;
  230 + }
159 231 var line ="";
160 232 var xlName ="";
161 233 var date = "";
162 234 var date2 ="";
  235 + var gsdm="";
  236 + var fgsdm="";
163 237 $("#query").on("click",function(){
164 238 line = $("#line").val();
165 239 xlName = $("#select2-line-container").html();
166 240 date = $("#date").val();
167 241 date2 =$("#date2").val();
  242 + gsdm =$("#gsdm").val();
  243 + fgsdm=$("#fgsdm").val();
168 244 if(line=="请选择"){
169 245 line="";
170 246 }
171 247 if(date==null || date =="" ||date2==null || date2 ==""){
172 248 layer.msg('请选择时间段.');
173 249 }else{
174   - $get('/realSchedule/statisticsDailyTj',{line:line,date:date,date2:date2,xlName:xlName,type:"query"},function(result){
  250 +
  251 + $get('/realSchedule/statisticsDailyTj',{gsdm:gsdm,fgsdm:fgsdm,line:line,date:date,date2:date2,xlName:xlName,type:"query"},function(result){
175 252 // 把数据填充到模版中
176 253 var tbodyHtml = template('statisticsDaily',{list:result});
177 254 // 把渲染好的模版html文本追加到表格中
... ... @@ -187,7 +264,7 @@
187 264 });
188 265  
189 266 $("#export").on("click",function(){
190   - $get('/realSchedule/statisticsDaily',{line:line,date:date,xlName:xlName,type:"export"},function(result){
  267 + $get('/realSchedule/statisticsDailyTj',{gsdm:gsdm,fgsdm:fgsdm,line:line,date:date,date2:date2,xlName:xlName,type:"export"},function(result){
191 268 window.open("/downloadFile/download?fileName=统计日报"+moment(date).format("YYYYMMDD"));
192 269 });
193 270 });
... ...
src/main/resources/static/pages/forms/statement/waybill.html
... ... @@ -434,7 +434,11 @@
434 434 <td>{{obj.zdsjActual}}</td>
435 435 <td>{{obj.fast}}</td>
436 436 <td>{{obj.slow}}</td>
437   - <td>{{obj.jhlc}}</td>
  437 + <td>
  438 + {{if obj.fcsjActual !=null || obj.zdsjActual!=null}}
  439 + {{obj.jhlc}}
  440 + {{/if}}
  441 + </td>
438 442 <td >
439 443 {{obj.remarks}}
440 444 </td>
... ...
src/main/resources/static/pages/report/inoutstation.html
... ... @@ -34,6 +34,14 @@
34 34 <input class="item-label" type="radio" name="typeLX" value="2" />
35 35 车辆/站点
36 36 </div>
  37 + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv">
  38 + <span class="item-label" style="width: 80px;">公司: </span>
  39 + <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>
  40 + </div>
  41 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv">
  42 + <span class="item-label" style="width: 80px;">分公司: </span>
  43 + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select>
  44 + </div>
37 45 <div style="display: inline-block;margin-left: 15px;">
38 46 <span class="item-label" style="width: 80px;">线路: </span>
39 47 <select class="form-control sreach-zd" name="line" id="line" style="width: 180px;"></select>
... ... @@ -170,7 +178,7 @@
170 178 });
171 179  
172 180  
173   - $.get('/basic/lineCode2Name',function(result){
  181 + /* $.get('/basic/lineCode2Name',function(result){
174 182 var data=[];
175 183  
176 184 for(var code in result){
... ... @@ -178,7 +186,78 @@
178 186 }
179 187 initPinYinSelect2('#line',data,'');
180 188  
181   - })
  189 + }) */
  190 + var fage=false;
  191 + var obj = [];
  192 + var xlList;
  193 + $.get('/report/lineList',function(result){
  194 + xlList=result;
  195 +
  196 + $.get('/user/companyData', function(result){
  197 + obj = result;
  198 + console.log(obj);
  199 + var options = '';
  200 + for(var i = 0; i < obj.length; i++){
  201 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  202 + }
  203 +
  204 + if(obj.length ==0){
  205 + $("#gsdmDiv").css('display','none');
  206 + }else if(obj.length ==1){
  207 + $("#gsdmDiv").css('display','none');
  208 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  209 + $('#fgsdmDiv').css('display','none');
  210 + }
  211 + $('#gsdm').html(options);
  212 +
  213 + updateCompany();
  214 + });
  215 + });
  216 +
  217 + $("#gsdm").on("change",updateCompany);
  218 + function updateCompany(){
  219 + var company = $('#gsdm').val();
  220 + var options = '';
  221 + for(var i = 0; i < obj.length; i++){
  222 + if(obj[i].companyCode == company){
  223 + var children = obj[i].children;
  224 + for(var j = 0; j < children.length; j++){
  225 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  226 + }
  227 + }
  228 + }
  229 + $('#fgsdm').html(options);
  230 + initXl();
  231 + initCl();
  232 + }
  233 +
  234 +
  235 +
  236 +
  237 + $("#fgsdm").on("change",initXl);
  238 + function initXl(){
  239 + var data=[];
  240 + if(fage){
  241 + $("#line").select2("destroy").html('');
  242 + }
  243 + var fgs=$('#fgsdm').val();
  244 + var gs=$('#gsdm').val();
  245 + for(var i=0;i<xlList.length;i++){
  246 + if(gs!=""){
  247 + if(fgs!=""){
  248 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  249 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  250 + }
  251 + }else{
  252 + if(xlList[i]["gsbm"]==gs){
  253 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  254 + }
  255 + }
  256 + }
  257 + }
  258 + initPinYinSelect2('#line',data,'');
  259 + fage=true;
  260 + }
182 261  
183 262  
184 263 $("#query").on("click",function(){
... ... @@ -192,7 +271,7 @@
192 271 }else if(clzbh=="" || clzbh==null){
193 272 layer.msg("请选择车辆");
194 273 }else{
195   - $post('/report/queryListBczx',{clzbh:clzbh,date:date,line:line},function(result){
  274 + $get('/report/queryListBczx',{clzbh:clzbh,date:date,line:line},function(result){
196 275 getTime(result);
197 276 var ludan_ll_2 = template('ludan_ll_2',{list:result});
198 277 // 把渲染好的模版html文本追加到表格中
... ... @@ -204,25 +283,25 @@
204 283 var params = new Array();
205 284 var jName = '';
206 285  
207   - $("#export").on("click",function(){
208   - if(params.length < 1){
209   - return;
210   - }
211   - $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
212   - window.open("/downloadFile/download?fileName="+jName);
213   - });
214   - });
  286 +// $("#export").on("click",function(){
  287 +// if(params.length < 1){
  288 +// return;
  289 +// }
  290 +// $post('/realSchedule/exportWaybill',{jName:jName,clZbh:params[1],lpName:params[2],date:date},function(result){
  291 +// window.open("/downloadFile/download?fileName="+jName);
  292 +// });
  293 +// });
215 294  
216   - $("#print").click(function(){
217   - $("#printArea").printArea();
218   - });
  295 +// $("#print").click(function(){
  296 +// $("#printArea").printArea();
  297 +// });
219 298  
220   - $("#exportMore").on("click",function(){
221   - return;
222   - $post('/realSchedule/exportWaybillMore',{date:date},function(result){
223   - window.open("/downloadFile/download?fileName="+jName);
224   - });
225   - });
  299 +// $("#exportMore").on("click",function(){
  300 +// return;
  301 +// $post('/realSchedule/exportWaybillMore',{date:date},function(result){
  302 +// window.open("/downloadFile/download?fileName="+jName);
  303 +// });
  304 +// });
226 305  
227 306 function getTime(list){
228 307 $.each(list, function(i, obj) {
... ... @@ -239,46 +318,51 @@
239 318 });
240 319 }
241 320  
242   - $('#nbbm').select2({
243   - placeholder: '搜索车辆...',
244   - ajax: {
245   - url: '/realSchedule/sreachVehic',
246   - dataType: 'json',
247   - delay: 150,
248   - data: function(params){
249   - return{nbbm: params.term};
  321 + $("#line").on("change",initCl);
  322 + function initCl(){
  323 + $('#nbbm').select2({
  324 + placeholder: '搜索车辆...',
  325 + ajax: {
  326 + url: '/report/carList',
  327 + dataType: 'json',
  328 + delay: 150,
  329 + data: function(params){
  330 + return{nbbm: params.term,
  331 + gsbm:$('#gsdm').val(),
  332 + fgsbm:$('#fgsdm').val(),
  333 + xlbm:$('#line').val()};
  334 + },
  335 + processResults: function (data) {
  336 + return {
  337 + results: data
  338 + };
  339 + },
  340 + cache: true
250 341 },
251   - processResults: function (data) {
252   - return {
253   - results: data
254   - };
255   - },
256   - cache: true
257   - },
258   - templateResult: function(repo){
259   - if (repo.loading) return repo.text;
260   - var h = '<span>'+repo.text+'</span>';
261   - h += (repo.lineName?'&nbsp;<span class="select2-desc">'+repo.lineName+'</span>':'');
262   - return h;
263   - },
264   - escapeMarkup: function (markup) { return markup; },
265   - minimumInputLength: 1,
266   - templateSelection: function(repo){
267   - return repo.text;
268   - },
269   - language: {
270   - noResults: function(){
271   - return '<span style="color:red;font-size: 12px;">没有搜索到车辆!</span>';
272   - },
273   - inputTooShort : function(e) {
274   - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入自编号搜索车辆</span>';
275   - },
276   - searching : function() {
277   - return '<span style="color:gray;font-size: 12px;"> 正在搜索车辆...</span>';
278   - }
279   - }
280   - });
281   -
  342 + templateResult: function(repo){
  343 + if (repo.loading) return repo.text;
  344 + var h = '<span>'+repo.text+'</span>';
  345 + h += (repo.lineName?'&nbsp;<span class="select2-desc">'+repo.lineName+'</span>':'');
  346 + return h;
  347 + },
  348 + escapeMarkup: function (markup) { return markup; },
  349 + minimumInputLength: 1,
  350 + templateSelection: function(repo){
  351 + return repo.text;
  352 + },
  353 + language: {
  354 + noResults: function(){
  355 + return '<span style="color:red;font-size: 12px;">没有搜索到车辆!</span>';
  356 + },
  357 + inputTooShort : function(e) {
  358 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入自编号搜索车辆</span>';
  359 + },
  360 + searching : function() {
  361 + return '<span style="color:gray;font-size: 12px;"> 正在搜索车辆...</span>';
  362 + }
  363 + }
  364 + });
  365 + };
282 366 $("#forms tbody").on("click","tr",function(){
283 367 var rq=$("#date").val();
284 368 var line=$("#line").val();
... ... @@ -295,7 +379,7 @@
295 379 var fcsj = $('.in_carpark_fcsj[data-id='+id+']', '#forms').html();
296 380 var ddsj= $('.in_carpark_zdsj[data-id='+id+']', '#forms').html();
297 381 if(!(typeof(fcsj)=='undefined'|| typeof(ddsj)=='undefined')){
298   - $post('/report/queryListZdxx',{clzbh:nbbm,date:rq,line:line,fcsj:fcsj,ddsj:ddsj},function(result){
  382 + $get('/report/queryListZdxx',{clzbh:nbbm,date:rq,line:line,fcsj:fcsj,ddsj:ddsj},function(result){
299 383 var xlmc="线路: "+$("#select2-line-container").html();
300 384 var clmc="车辆: "+nbbm;
301 385 var rqmc="日期: "+rq;
... ... @@ -333,7 +417,7 @@
333 417 zdmc="站点: "+$("#select2-zd-container").html();
334 418 }
335 419 $("#dlzmx").html("到离站详细 "+xlmc+" "+rqmc+" "+sxmc+" "+zdmc);
336   - $post('/report/queryListClzd',{zd:zd,zdlx:zdlx,line:line,fcsj:date1,ddsj:date2},function(result){
  420 + $get('/report/queryListClzd',{zd:zd,zdlx:zdlx,line:line,fcsj:date1,ddsj:date2},function(result){
337 421 var ludan_ll_1 = template('ludan_ll_1',{list:result});
338 422 // 把渲染好的模版html文本追加到表格中
339 423 $('#forms1 .ludan_ll_1').html(ludan_ll_1);
... ... @@ -436,7 +520,7 @@
436 520 <a >
437 521 ({{obj.fcsjActual}}
438 522 {{if obj.fast>0}}
439   - 早点 {{obj.fast}}分钟
  523 + 早点{{obj.fast}}分钟
440 524 {{else if obj.slow>0}}
441 525 晚点{{obj.slow}}分钟
442 526 {{else}}
... ... @@ -447,8 +531,6 @@
447 531 <span class="in_carpark_zdsj" data-id="{{i+1}}" style="display:none">{{obj.zdsjActual}}</span>
448 532 </a>
449 533 {{/if}}
450   -
451   -
452 534 </td>
453 535 <td>{{obj.clZbh}}</td>
454 536 <td>
... ...
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 20 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/js/modal_extend.js
1   -
2 1 //modal hide remove dom
3 2 $(document).on('hide.uk.modal', '.uk-modal', function () {
4 3 $(this).remove();
... ... @@ -93,4 +92,4 @@ var modal_move = function (m_header) {
93 92 _moveObj = null;
94 93 });
95 94  
96 95 -};
  96 +};
97 97 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/mapmonitor/fragments/playback_v2/main.html
... ... @@ -422,11 +422,11 @@
422 422  
423 423 <script id="gps_road_info_cont_temp" type="text/html">
424 424 {{each array as gps i}}
425   - <dl data-code="{{gps.road.road_CODE}}">
426   - <dd>{{gps.timeStr}}</dd>
427   - <dd>{{gps.speed}}</dd>
428   - <dd>{{gps.road.road_NAME}}</dd>
429   - </dl>
  425 + <dl data-code="{{gps.road.road_CODE}}">
  426 + <dd>{{gps.timeStr}}</dd>
  427 + <dd>{{gps.speed}}</dd>
  428 + <dd>{{gps.road.road_NAME}}</dd>
  429 + </dl>
430 430 {{/each}}
431 431 </script>
432 432 <script>
... ... @@ -591,4 +591,4 @@
591 591 })();
592 592 })();
593 593 </script>
594 594 -</div>
  595 +</div>
595 596 \ No newline at end of file
... ...