Commit 29e324be9a745992821bd45d6caf1408fe47e21a

Authored by 潘钊
2 parents 398be398 4484a9f1

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

Too many changes to show.

To preserve performance only 22 of 171 files are displayed.

src/main/java/com/bsth/controller/BusinessController.java
1 package com.bsth.controller; 1 package com.bsth.controller;
2 2
  3 +import org.springframework.beans.factory.annotation.Autowired;
3 import org.springframework.web.bind.annotation.RequestMapping; 4 import org.springframework.web.bind.annotation.RequestMapping;
  5 +import org.springframework.web.bind.annotation.RequestMethod;
4 import org.springframework.web.bind.annotation.RestController; 6 import org.springframework.web.bind.annotation.RestController;
5 7
6 import com.bsth.entity.Business; 8 import com.bsth.entity.Business;
  9 +import com.bsth.service.BusinessService;
  10 +import com.bsth.util.GetUIDAndCode;
7 11
8 /** 12 /**
9 * 13 *
@@ -23,5 +27,11 @@ import com.bsth.entity.Business; @@ -23,5 +27,11 @@ import com.bsth.entity.Business;
23 @RestController 27 @RestController
24 @RequestMapping("business") 28 @RequestMapping("business")
25 public class BusinessController extends BaseController<Business, Integer> { 29 public class BusinessController extends BaseController<Business, Integer> {
26 - 30 + @Autowired
  31 + private BusinessService businessService;
  32 +
  33 + @RequestMapping(value = "getCompCode", method = RequestMethod.GET)
  34 + public long getLineCode() {
  35 + return businessService.getCompCode();
  36 + }
27 } 37 }
src/main/java/com/bsth/controller/SectionController.java
@@ -48,13 +48,9 @@ public class SectionController extends BaseController&lt;Section, Integer&gt; { @@ -48,13 +48,9 @@ public class SectionController extends BaseController&lt;Section, Integer&gt; {
48 */ 48 */
49 @RequestMapping(value="sectionSave" , method = RequestMethod.POST) 49 @RequestMapping(value="sectionSave" , method = RequestMethod.POST)
50 public Map<String, Object> sectionSave(@RequestParam Map<String, Object> map) { 50 public Map<String, Object> sectionSave(@RequestParam Map<String, Object> map) {
51 -  
52 map.put("createBy", ""); 51 map.put("createBy", "");
53 -  
54 map.put("updateBy", ""); 52 map.put("updateBy", "");
55 -  
56 return service.sectionSave(map); 53 return service.sectionSave(map);
57 -  
58 } 54 }
59 55
60 /** 56 /**
src/main/java/com/bsth/controller/SectionRouteController.java
@@ -57,7 +57,6 @@ public class SectionRouteController extends BaseController&lt;SectionRoute, Integer @@ -57,7 +57,6 @@ public class SectionRouteController extends BaseController&lt;SectionRoute, Integer
57 */ 57 */
58 @RequestMapping(value = "/findSectionRouteInfoFormId",method = RequestMethod.GET) 58 @RequestMapping(value = "/findSectionRouteInfoFormId",method = RequestMethod.GET)
59 public List<Map<String, Object>> findSectionRouteInfoFormId(@RequestParam Map<String, Object> map) { 59 public List<Map<String, Object>> findSectionRouteInfoFormId(@RequestParam Map<String, Object> map) {
60 -  
61 return routeService.findSectionRouteInfoFormId(map); 60 return routeService.findSectionRouteInfoFormId(map);
62 } 61 }
63 62
src/main/java/com/bsth/controller/StationController.java
@@ -60,16 +60,12 @@ public class StationController extends BaseController&lt;Station, Integer&gt; { @@ -60,16 +60,12 @@ public class StationController extends BaseController&lt;Station, Integer&gt; {
60 */ 60 */
61 @RequestMapping(value="collectionSave" , method = RequestMethod.POST) 61 @RequestMapping(value="collectionSave" , method = RequestMethod.POST)
62 public Map<String, Object> collectionSave(@RequestParam Map<String, Object> map) { 62 public Map<String, Object> collectionSave(@RequestParam Map<String, Object> map) {
63 -  
64 return service.systemSaveStations(map); 63 return service.systemSaveStations(map);
65 -  
66 } 64 }
67 65
68 @RequestMapping(value="manualSave" , method = RequestMethod.POST) 66 @RequestMapping(value="manualSave" , method = RequestMethod.POST)
69 public Map<String, Object> manualSave(@RequestParam Map<String, Object> map) { 67 public Map<String, Object> manualSave(@RequestParam Map<String, Object> map) {
70 -  
71 return service.manualSave(map); 68 return service.manualSave(map);
72 -  
73 } 69 }
74 70
75 /** 71 /**
@@ -89,13 +85,9 @@ public class StationController extends BaseController&lt;Station, Integer&gt; { @@ -89,13 +85,9 @@ public class StationController extends BaseController&lt;Station, Integer&gt; {
89 */ 85 */
90 @RequestMapping(value="stationSave" , method = RequestMethod.POST) 86 @RequestMapping(value="stationSave" , method = RequestMethod.POST)
91 public Map<String, Object> stationSave(@RequestParam Map<String, Object> map) { 87 public Map<String, Object> stationSave(@RequestParam Map<String, Object> map) {
92 -  
93 map.put("createBy", ""); 88 map.put("createBy", "");
94 -  
95 map.put("updateBy", ""); 89 map.put("updateBy", "");
96 -  
97 return service.stationSaveMap(map); 90 return service.stationSaveMap(map);
98 -  
99 } 91 }
100 92
101 /** 93 /**
src/main/java/com/bsth/controller/StationRouteController.java
@@ -36,6 +36,17 @@ public class StationRouteController extends BaseController&lt;StationRoute, Integer @@ -36,6 +36,17 @@ public class StationRouteController extends BaseController&lt;StationRoute, Integer
36 @Autowired 36 @Autowired
37 StationRouteRepository stationRouteRepository; 37 StationRouteRepository stationRouteRepository;
38 38
  39 + /**
  40 + * @param @param map
  41 + * @throws
  42 + * @Title: list
  43 + * @Description: TODO(多条件查询)
  44 + */
  45 + @RequestMapping(value = "/all", method = RequestMethod.GET)
  46 + public Iterable<StationRoute> list(@RequestParam Map<String, Object> map) {
  47 + return service.list(map);
  48 + }
  49 +
39 /** 50 /**
40 * @Description :TODO(查询树站点与路段数据) 51 * @Description :TODO(查询树站点与路段数据)
41 * 52 *
src/main/java/com/bsth/entity/Business.java
1 package com.bsth.entity; 1 package com.bsth.entity;
2 2
  3 +import java.util.Date;
  4 +
  5 +import javax.persistence.Column;
3 import javax.persistence.Entity; 6 import javax.persistence.Entity;
4 import javax.persistence.GeneratedValue; 7 import javax.persistence.GeneratedValue;
5 import javax.persistence.GenerationType; 8 import javax.persistence.GenerationType;
@@ -40,6 +43,29 @@ public class Business { @@ -40,6 +43,29 @@ public class Business {
40 43
41 // 描述 44 // 描述
42 private String descriptions; 45 private String descriptions;
  46 +
  47 + // 创建日期
  48 + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  49 + private Date createDate;
  50 +
  51 + // 修改日期
  52 + @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
  53 + private Date updateDate;
  54 + public Date getCreateDate() {
  55 + return createDate;
  56 + }
  57 +
  58 + public void setCreateDate(Date createDate) {
  59 + this.createDate = createDate;
  60 + }
  61 +
  62 + public Date getUpdateDate() {
  63 + return updateDate;
  64 + }
  65 +
  66 + public void setUpdateDate(Date updateDate) {
  67 + this.updateDate = updateDate;
  68 + }
43 69
44 public Integer getId() { 70 public Integer getId() {
45 return id; 71 return id;
src/main/java/com/bsth/entity/LineInformation.java
@@ -64,6 +64,12 @@ public class LineInformation { @@ -64,6 +64,12 @@ public class LineInformation {
64 // 晚高峰结束时间 00:00 64 // 晚高峰结束时间 00:00
65 private String lateEndTime; 65 private String lateEndTime;
66 66
  67 + // 小夜高峰开始时间 00:00
  68 + private String xygfkssj;
  69 +
  70 + // 小夜高峰结束时间 00:00
  71 + private String xygfjssj;
  72 +
67 // 早高峰上行行驶时间 73 // 早高峰上行行驶时间
68 private Double earlyUpTime; 74 private Double earlyUpTime;
69 75
@@ -91,15 +97,6 @@ public class LineInformation { @@ -91,15 +97,6 @@ public class LineInformation {
91 // 停车场 97 // 停车场
92 private String carPark; 98 private String carPark;
93 99
94 - // 进场时间  
95 - private Double paradeTime;  
96 -  
97 - // 出场时间  
98 - private Double outTime;  
99 -  
100 - // 进场里程  
101 - private Double paradeMileage;  
102 -  
103 // 上行进场时间 100 // 上行进场时间
104 private Double upInTimer; 101 private Double upInTimer;
105 102
@@ -123,7 +120,82 @@ public class LineInformation { @@ -123,7 +120,82 @@ public class LineInformation {
123 120
124 // 下行出场里程 121 // 下行出场里程
125 private Double downOutMileage; 122 private Double downOutMileage;
  123 +
  124 + // 早高峰大间隔(分钟)老调度系统字段,暂时保留
  125 + private Double earlyIntervalLg;
  126 +
  127 + // 晚高峰大间隔(分钟)老调度系统字段,暂时保留
  128 + private Double lateIntervalLg;
  129 +
  130 + // 平时大间隔(分钟)老调度系统字段,暂时保留
  131 + private Double intervalLg;
  132 +
  133 + // 限速(平时)老调度系统字段,暂时保留
  134 + private Double speedLimit;
  135 +
  136 + // 限速(雨天)老调度系统字段,暂时保留
  137 + private Double rainLimit;
  138 +
  139 + // 限速(大雾)老调度系统字段,暂时保留
  140 + private Double fogLimit;
126 141
  142 + // 限速(冰雪)老调度系统字段,暂时保留
  143 + private Double snowLimit;
  144 +
  145 + // 限速(节庆)老调度系统字段,暂时保留
  146 + private Double festivalSpeedLimit;
  147 +
  148 + // 滞站
  149 + private Integer lagStation;
  150 +
  151 + // 越站
  152 + private Integer skip;
  153 +
  154 + // 超速
  155 + private Integer speeding;
  156 +
  157 + // 串线
  158 + private Integer crossedLine;
  159 +
  160 + // 越界
  161 + private Integer overflights;
  162 +
  163 + // 描述
  164 + private String descriptions;
  165 +
  166 + // 创建人
  167 + private Integer createBy;
  168 +
  169 + // 修改人
  170 + private Integer updateBy;
  171 +
  172 + // 创建日期
  173 + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  174 + private Date createDate;
  175 +
  176 + // 修改日期
  177 + @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
  178 + private Date updateDate;
  179 +
  180 + @ManyToOne
  181 + private Line line;
  182 +
  183 + public String getXygfkssj() {
  184 + return xygfkssj;
  185 + }
  186 +
  187 + public void setXygfkssj(String xygfkssj) {
  188 + this.xygfkssj = xygfkssj;
  189 + }
  190 +
  191 + public String getXygfjssj() {
  192 + return xygfjssj;
  193 + }
  194 +
  195 + public void setXygfjssj(String xygfjssj) {
  196 + this.xygfjssj = xygfjssj;
  197 + }
  198 +
127 public Double getUpInTimer() { 199 public Double getUpInTimer() {
128 return upInTimer; 200 return upInTimer;
129 } 201 }
@@ -188,68 +260,6 @@ public class LineInformation { @@ -188,68 +260,6 @@ public class LineInformation {
188 this.downOutMileage = downOutMileage; 260 this.downOutMileage = downOutMileage;
189 } 261 }
190 262
191 - // 出场里程  
192 - private Double outMileage;  
193 -  
194 - // 早高峰大间隔(分钟)  
195 - private Double earlyIntervalLg;  
196 -  
197 - // 晚高峰大间隔(分钟)  
198 - private Double lateIntervalLg;  
199 -  
200 - // 平时大间隔(分钟)  
201 - private Double intervalLg;  
202 -  
203 - // 限速(平时)  
204 - private Double speedLimit;  
205 -  
206 - // 限速(雨天)  
207 - private Double rainLimit;  
208 -  
209 - // 限速(大雾)  
210 - private Double fogLimit;  
211 -  
212 - // 限速(冰雪)  
213 - private Double snowLimit;  
214 -  
215 - // 限速(节庆)  
216 - private Double festivalSpeedLimit;  
217 -  
218 - // 滞站  
219 - private Integer lagStation;  
220 -  
221 - // 越站  
222 - private Integer skip;  
223 -  
224 - // 超速  
225 - private Integer speeding;  
226 -  
227 - // 串线  
228 - private Integer crossedLine;  
229 -  
230 - // 越界  
231 - private Integer overflights;  
232 -  
233 - // 描述  
234 - private String descriptions;  
235 -  
236 - // 创建人  
237 - private Integer createBy;  
238 -  
239 - // 修改人  
240 - private Integer updateBy;  
241 -  
242 - // 创建日期  
243 - @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")  
244 - private Date createDate;  
245 -  
246 - // 修改日期  
247 - @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")  
248 - private Date updateDate;  
249 -  
250 - @ManyToOne  
251 - private Line line;  
252 -  
253 public Integer getId() { 263 public Integer getId() {
254 return id; 264 return id;
255 } 265 }
@@ -416,39 +426,6 @@ public class LineInformation { @@ -416,39 +426,6 @@ public class LineInformation {
416 public void setCarPark(String carPark) { 426 public void setCarPark(String carPark) {
417 this.carPark = carPark; 427 this.carPark = carPark;
418 } 428 }
419 -  
420 - public Double getParadeTime() {  
421 - return paradeTime;  
422 - }  
423 -  
424 - public void setParadeTime(Double paradeTime) {  
425 - this.paradeTime = paradeTime;  
426 - }  
427 -  
428 - public Double getOutTime() {  
429 - return outTime;  
430 - }  
431 -  
432 - public void setOutTime(Double outTime) {  
433 - this.outTime = outTime;  
434 - }  
435 -  
436 - public Double getParadeMileage() {  
437 - return paradeMileage;  
438 - }  
439 -  
440 - public void setParadeMileage(Double paradeMileage) {  
441 - this.paradeMileage = paradeMileage;  
442 - }  
443 -  
444 - public Double getOutMileage() {  
445 - return outMileage;  
446 - }  
447 -  
448 - public void setOutMileage(Double outMileage) {  
449 - this.outMileage = outMileage;  
450 - }  
451 -  
452 public Double getEarlyIntervalLg() { 429 public Double getEarlyIntervalLg() {
453 return earlyIntervalLg; 430 return earlyIntervalLg;
454 } 431 }
src/main/java/com/bsth/entity/SectionRoute.java
@@ -52,7 +52,7 @@ public class SectionRoute { @@ -52,7 +52,7 @@ public class SectionRoute {
52 // 是否撤销 52 // 是否撤销
53 private Integer destroy; 53 private Integer destroy;
54 54
55 - /** 是否有路段限速数据 <0:未分段;1:分段>*/ 55 + /** 是否有路段限速数据 <0:分段;1:未分段>*/
56 private Integer isRoadeSpeed; 56 private Integer isRoadeSpeed;
57 57
58 // 描述 58 // 描述
src/main/java/com/bsth/repository/BusinessRepository.java
1 package com.bsth.repository; 1 package com.bsth.repository;
2 2
  3 +import org.springframework.data.jpa.repository.Query;
3 import org.springframework.stereotype.Repository; 4 import org.springframework.stereotype.Repository;
4 5
5 import com.bsth.entity.Business; 6 import com.bsth.entity.Business;
@@ -28,5 +29,7 @@ public interface BusinessRepository extends BaseRepository&lt;Business, Integer&gt; { @@ -28,5 +29,7 @@ public interface BusinessRepository extends BaseRepository&lt;Business, Integer&gt; {
28 List<Business> findByBusinessCode(String code); 29 List<Business> findByBusinessCode(String code);
29 30
30 List<Business> findByUpCodeAndBusinessCode(String c1, String c2); 31 List<Business> findByUpCodeAndBusinessCode(String c1, String c2);
31 - 32 +
  33 + @Query(value = "SELECT IFNULL(num,0) as maxId from (SELECT MAX(id) as num FROM bsth_c_business) k" , nativeQuery=true)
  34 + long getMaxId();
32 } 35 }
src/main/java/com/bsth/repository/SectionRepository.java
@@ -72,7 +72,6 @@ public interface SectionRepository extends BaseRepository&lt;Section, Integer&gt; { @@ -72,7 +72,6 @@ public interface SectionRepository extends BaseRepository&lt;Section, Integer&gt; {
72 72
73 String descriptions, int versions,int id); 73 String descriptions, int versions,int id);
74 74
75 -  
76 /** 75 /**
77 * @Description :TODO(编辑线路走向) 76 * @Description :TODO(编辑线路走向)
78 * 77 *
src/main/java/com/bsth/repository/SectionRouteRepository.java
@@ -121,7 +121,7 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int @@ -121,7 +121,7 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int
121 "b.create_date AS sectionCreateDate," + 121 "b.create_date AS sectionCreateDate," +
122 "b.update_by AS sectionUpdateBy," + 122 "b.update_by AS sectionUpdateBy," +
123 "b.update_date AS sectionUpdateDate," + 123 "b.update_date AS sectionUpdateDate," +
124 - "b.versions AS sectionVersion FROM (" + 124 + "b.versions AS sectionVersion , a.isRoadeSpeed FROM (" +
125 " SELECT s.id AS sectionRouteId," + 125 " SELECT s.id AS sectionRouteId," +
126 "s.line_code AS sectionRouteLineCode," + 126 "s.line_code AS sectionRouteLineCode," +
127 "s.sectionroute_code AS sectionRouteCode," + 127 "s.sectionroute_code AS sectionRouteCode," +
@@ -134,7 +134,7 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int @@ -134,7 +134,7 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int
134 "s.update_by AS sectionRouteUpdateBy," + 134 "s.update_by AS sectionRouteUpdateBy," +
135 "s.update_date AS sectionRouteUpdateDate," + 135 "s.update_date AS sectionRouteUpdateDate," +
136 "s.versions AS sectionRouteVersions," + 136 "s.versions AS sectionRouteVersions," +
137 - "s.destroy AS sectionRouteDestroy" + 137 + "s.destroy AS sectionRouteDestroy, s.is_roade_speed AS isRoadeSpeed " +
138 " FROM bsth_c_sectionroute s where s.id =?1) a " + 138 " FROM bsth_c_sectionroute s where s.id =?1) a " +
139 " LEFT JOIN bsth_c_section b on a.sectionRouteSection = b.id", nativeQuery=true) 139 " LEFT JOIN bsth_c_section b on a.sectionRouteSection = b.id", nativeQuery=true)
140 List<Object[]> findSectionRouteInfoFormId(int id); 140 List<Object[]> findSectionRouteInfoFormId(int id);
@@ -171,6 +171,10 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int @@ -171,6 +171,10 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int
171 @Query(value="UPDATE bsth_c_sectionroute set is_roade_speed = ?1 where line= ?2 and directions=?3 ",nativeQuery = true) 171 @Query(value="UPDATE bsth_c_sectionroute set is_roade_speed = ?1 where line= ?2 and directions=?3 ",nativeQuery = true)
172 void isRoadSpeedUpd(Integer isR,Integer line,Integer directions); 172 void isRoadSpeedUpd(Integer isR,Integer line,Integer directions);
173 173
  174 + @Modifying
  175 + @Query(value="UPDATE bsth_c_sectionroute set sectionroute_code = (sectionroute_code+10) where line = ?1 and directions = ?2 and sectionroute_code >=?3 and destroy = 0", nativeQuery=true)
  176 + public void sectionUpdSectionRouteCode(Integer line,Integer dir,Integer routeCod);
  177 +
174 @Modifying 178 @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) 179 @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); 180 public void sectionRouteDir(Integer line);
src/main/java/com/bsth/repository/StationRepository.java
@@ -37,7 +37,7 @@ public interface StationRepository extends BaseRepository&lt;Station, Integer&gt; { @@ -37,7 +37,7 @@ public interface StationRepository extends BaseRepository&lt;Station, Integer&gt; {
37 , nativeQuery=true) 37 , nativeQuery=true)
38 long stationMaxId(); 38 long stationMaxId();
39 39
40 - @Query(value = "SELECT * FROM bsth_c_station s where s.station_name = ?1" 40 + @Query(value = "SELECT s.b_jwpoints,s.id FROM bsth_c_station s where s.station_name like ?1"
41 , nativeQuery=true) 41 , nativeQuery=true)
42 List<Object[]> findStationName(String stationName); 42 List<Object[]> findStationName(String stationName);
43 43
src/main/java/com/bsth/service/BusinessService.java
@@ -18,5 +18,5 @@ import com.bsth.entity.Business; @@ -18,5 +18,5 @@ import com.bsth.entity.Business;
18 * 18 *
19 */ 19 */
20 public interface BusinessService extends BaseService<Business, Integer> { 20 public interface BusinessService extends BaseService<Business, Integer> {
21 - 21 + long getCompCode();
22 } 22 }
src/main/java/com/bsth/service/StationRouteService.java
@@ -23,6 +23,14 @@ import com.bsth.entity.StationRoute; @@ -23,6 +23,14 @@ import com.bsth.entity.StationRoute;
23 public interface StationRouteService extends BaseService<StationRoute, Integer> { 23 public interface StationRouteService extends BaseService<StationRoute, Integer> {
24 24
25 /** 25 /**
  26 + *
  27 + * @Title: list
  28 + * @Description: TODO(多条件查询)
  29 + * @throws
  30 + */
  31 + Iterable<StationRoute> list(Map<String, Object> map);
  32 +
  33 + /**
26 * @Description :TODO(查询树站点与路段数据) 34 * @Description :TODO(查询树站点与路段数据)
27 * 35 *
28 * @param map <line.id_eq:线路ID; directions_eq:方向> 36 * @param map <line.id_eq:线路ID; directions_eq:方向>
src/main/java/com/bsth/service/impl/BusinessServiceImpl.java
1 package com.bsth.service.impl; 1 package com.bsth.service.impl;
2 2
  3 +import org.springframework.beans.factory.annotation.Autowired;
3 import org.springframework.stereotype.Service; 4 import org.springframework.stereotype.Service;
4 5
5 import com.bsth.entity.Business; 6 import com.bsth.entity.Business;
  7 +import com.bsth.repository.BusinessRepository;
6 import com.bsth.service.BusinessService; 8 import com.bsth.service.BusinessService;
7 9
8 /** 10 /**
@@ -23,5 +25,12 @@ import com.bsth.service.BusinessService; @@ -23,5 +25,12 @@ import com.bsth.service.BusinessService;
23 25
24 @Service 26 @Service
25 public class BusinessServiceImpl extends BaseServiceImpl<Business, Integer> implements BusinessService{ 27 public class BusinessServiceImpl extends BaseServiceImpl<Business, Integer> implements BusinessService{
  28 + @Autowired
  29 + private BusinessRepository businessRepository;
  30 + @Override
  31 + public long getCompCode() {
  32 + // TODO Auto-generated method stub
  33 + return businessRepository.getMaxId();
  34 + }
26 35
27 } 36 }
src/main/java/com/bsth/service/impl/SectionRouteServiceImpl.java
@@ -16,6 +16,7 @@ import com.bsth.repository.LineRepository; @@ -16,6 +16,7 @@ import com.bsth.repository.LineRepository;
16 import com.bsth.repository.SectionRepository; 16 import com.bsth.repository.SectionRepository;
17 import com.bsth.repository.SectionRouteRepository; 17 import com.bsth.repository.SectionRouteRepository;
18 import com.bsth.service.SectionRouteService; 18 import com.bsth.service.SectionRouteService;
  19 +import com.bsth.util.GetUIDAndCode;
19 20
20 /** 21 /**
21 * 22 *
@@ -185,6 +186,7 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ @@ -185,6 +186,7 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ
185 186
186 tempM.put("sectionVersion", objects.get(i)[33]); 187 tempM.put("sectionVersion", objects.get(i)[33]);
187 188
  189 + tempM.put("isRoadeSpeed", objects.get(i)[34]);
188 resultList.add(tempM); 190 resultList.add(tempM);
189 } 191 }
190 192
@@ -203,32 +205,19 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ @@ -203,32 +205,19 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ
203 */ 205 */
204 @Override 206 @Override
205 public List<Map<String, Object>> findUpSectionRouteCode(Map<String, Object> map) { 207 public List<Map<String, Object>> findUpSectionRouteCode(Map<String, Object> map) {
206 -  
207 Integer lineId = map.get("lineId").equals("") ? null : Integer.parseInt(map.get("lineId").toString()); 208 Integer lineId = map.get("lineId").equals("") ? null : Integer.parseInt(map.get("lineId").toString());
208 -  
209 Integer direction = map.get("direction").equals("") ? null : Integer.parseInt(map.get("direction").toString()); 209 Integer direction = map.get("direction").equals("") ? null : Integer.parseInt(map.get("direction").toString());
210 -  
211 Integer stationRouteCode = map.get("sectionRouteCode").equals("") ? null : Integer.parseInt(map.get("sectionRouteCode").toString()); 210 Integer stationRouteCode = map.get("sectionRouteCode").equals("") ? null : Integer.parseInt(map.get("sectionRouteCode").toString());
212 -  
213 List<Object[]> reslutList = repository.findUpSectionRouteCode(lineId, direction, stationRouteCode); 211 List<Object[]> reslutList = repository.findUpSectionRouteCode(lineId, direction, stationRouteCode);
214 -  
215 List<Map<String, Object>> list = new ArrayList<Map<String,Object>>(); 212 List<Map<String, Object>> list = new ArrayList<Map<String,Object>>();
216 -  
217 if(reslutList.get(0)!=null) { 213 if(reslutList.get(0)!=null) {
218 -  
219 for(int i = 0 ; i <reslutList.size() ;i++){ 214 for(int i = 0 ; i <reslutList.size() ;i++){
220 -  
221 Map<String, Object> tempM = new HashMap<String, Object>(); 215 Map<String, Object> tempM = new HashMap<String, Object>();
222 -  
223 System.out.println(reslutList.get(i)); 216 System.out.println(reslutList.get(i));
224 -  
225 tempM.put("sectionrouteCode", reslutList.get(i)); 217 tempM.put("sectionrouteCode", reslutList.get(i));
226 -  
227 list.add(tempM); 218 list.add(tempM);
228 -  
229 } 219 }
230 } 220 }
231 -  
232 return list; 221 return list;
233 } 222 }
234 223
@@ -243,8 +232,10 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ @@ -243,8 +232,10 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ
243 List<Object[]> list = repository.getSectionRoute(line, dir); 232 List<Object[]> list = repository.getSectionRoute(line, dir);
244 int src = repository.sectionRouteCodeMaxId(); 233 int src = repository.sectionRouteCodeMaxId();
245 for(int i = 0 ; i<list.size() ; i++) { 234 for(int i = 0 ; i<list.size() ; i++) {
246 - int sectionId = Integer.parseInt(String.valueOf(repository2.sectionMaxId())) + 1 ;  
247 - String sectionCode = String.valueOf(sectionId); 235 + /*int sectionId = Integer.parseInt(String.valueOf(repository2.sectionMaxId())) + 1 ;*/
  236 + long sectionMaxId = GetUIDAndCode.getSectionId();
  237 + String sectionCode = String.valueOf(sectionMaxId);
  238 + int sectionId = (int)sectionMaxId;
248 String sectionName = list.get(i)[9] == null ? null : list.get(i)[9].toString(); 239 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(); 240 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(); 241 String endNode = list.get(i)[11] == null ? null : list.get(i)[11].toString();
@@ -267,12 +258,12 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ @@ -267,12 +258,12 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ
267 gsectionVector, bsectionVector, 258 gsectionVector, bsectionVector,
268 sectionType, csectionVector, roadCoding, 259 sectionType, csectionVector, roadCoding,
269 sectionDistance, sectionTime, dbType, speedLimit, descriptions, versions, sectionId); 260 sectionDistance, sectionTime, dbType, speedLimit, descriptions, versions, sectionId);
270 - int sectionRouteId = Integer.parseInt(String.valueOf(repository.sectionRouteMaxId())) + 1 ; 261 + // int sectionRouteId = Integer.parseInt(String.valueOf(repository.sectionRouteMaxId())) + 1 ;
271 SectionRoute sr = new SectionRoute(); 262 SectionRoute sr = new SectionRoute();
272 Line lineObject = lineRepository.findOne(line); 263 Line lineObject = lineRepository.findOne(line);
273 Section section = repository2.findOne(sectionId); 264 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)) ; 265 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); 266 + // sr.setId(sectionRouteId);
276 sr.setSectionrouteCode(xh); 267 sr.setSectionrouteCode(xh);
277 sr.setLineCode(lineObject.getLineCode()); 268 sr.setLineCode(lineObject.getLineCode());
278 sr.setSectionCode(sectionCode); 269 sr.setSectionCode(sectionCode);
@@ -294,5 +285,4 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ @@ -294,5 +285,4 @@ public class SectionRouteServiceImpl extends BaseServiceImpl&lt;SectionRoute, Integ
294 } 285 }
295 return resultMap; 286 return resultMap;
296 } 287 }
297 -  
298 -} 288 +}
299 \ No newline at end of file 289 \ No newline at end of file
src/main/java/com/bsth/service/impl/SectionServiceImpl.java
@@ -7,6 +7,7 @@ import java.util.Map; @@ -7,6 +7,7 @@ import java.util.Map;
7 7
8 import org.springframework.beans.factory.annotation.Autowired; 8 import org.springframework.beans.factory.annotation.Autowired;
9 import org.springframework.stereotype.Service; 9 import org.springframework.stereotype.Service;
  10 +import org.springframework.transaction.annotation.Transactional;
10 11
11 import com.alibaba.fastjson.JSONArray; 12 import com.alibaba.fastjson.JSONArray;
12 import com.bsth.common.ResponseCode; 13 import com.bsth.common.ResponseCode;
@@ -57,210 +58,122 @@ public class SectionServiceImpl extends BaseServiceImpl&lt;Section, Integer&gt; implem @@ -57,210 +58,122 @@ public class SectionServiceImpl extends BaseServiceImpl&lt;Section, Integer&gt; implem
57 */ 58 */
58 @Override 59 @Override
59 public Map<String, Object> sectionUpdate(Map<String, Object> map) { 60 public Map<String, Object> sectionUpdate(Map<String, Object> map) {
60 -  
61 Map<String, Object> resultMap = new HashMap<String, Object>(); 61 Map<String, Object> resultMap = new HashMap<String, Object>();
62 -  
63 try { 62 try {
64 -  
65 String bsectionVector = map.get("bsectionVector").equals("") ? "" :map.get("bsectionVector").toString(); 63 String bsectionVector = map.get("bsectionVector").equals("") ? "" :map.get("bsectionVector").toString();
66 -  
67 // 原始线状图形坐标集合 64 // 原始线状图形坐标集合
68 String sectionsBpoints = ""; 65 String sectionsBpoints = "";
69 -  
70 // WGS线状图形坐标集合 66 // WGS线状图形坐标集合
71 String sectionsWJPpoints = ""; 67 String sectionsWJPpoints = "";
72 -  
73 if(!bsectionVector.equals("")) { 68 if(!bsectionVector.equals("")) {
74 -  
75 // 转换成JSON数组 69 // 转换成JSON数组
76 JSONArray sectionsArray = JSONArray.parseArray(bsectionVector); 70 JSONArray sectionsArray = JSONArray.parseArray(bsectionVector);
77 -  
78 // 遍历 71 // 遍历
79 for(int s = 0 ;s<sectionsArray.size();s++) { 72 for(int s = 0 ;s<sectionsArray.size();s++) {
80 -  
81 String pointsLngStr = sectionsArray.getJSONObject(s).get("lng").toString(); 73 String pointsLngStr = sectionsArray.getJSONObject(s).get("lng").toString();
82 -  
83 String pointsLatStr = sectionsArray.getJSONObject(s).get("lat").toString(); 74 String pointsLatStr = sectionsArray.getJSONObject(s).get("lat").toString();
84 -  
85 /** to WGS坐标 */ 75 /** to WGS坐标 */
86 Location resultPoint = FromBDPointToWGSPoint(pointsLngStr,pointsLatStr); 76 Location resultPoint = FromBDPointToWGSPoint(pointsLngStr,pointsLatStr);
87 -  
88 String WGSLngStr = String.valueOf(resultPoint.getLng()); 77 String WGSLngStr = String.valueOf(resultPoint.getLng());
89 -  
90 String WGSLatStr = String.valueOf(resultPoint.getLat()); 78 String WGSLatStr = String.valueOf(resultPoint.getLat());
91 -  
92 if(s==0) { 79 if(s==0) {
93 -  
94 sectionsBpoints = pointsLngStr + " " + pointsLatStr; 80 sectionsBpoints = pointsLngStr + " " + pointsLatStr;
95 -  
96 sectionsWJPpoints = WGSLngStr + " " + WGSLatStr; 81 sectionsWJPpoints = WGSLngStr + " " + WGSLatStr;
97 -  
98 }else { 82 }else {
99 -  
100 sectionsBpoints = sectionsBpoints + "," + pointsLngStr + " " + pointsLatStr; 83 sectionsBpoints = sectionsBpoints + "," + pointsLngStr + " " + pointsLatStr;
101 -  
102 sectionsWJPpoints = sectionsWJPpoints + "," + WGSLngStr + " " + WGSLatStr; 84 sectionsWJPpoints = sectionsWJPpoints + "," + WGSLngStr + " " + WGSLatStr;
103 -  
104 } 85 }
105 -  
106 -  
107 } 86 }
108 -  
109 } 87 }
110 -  
111 // 原坐标类型 88 // 原坐标类型
112 String dbType = map.get("dbType").equals("") ? "" : map.get("dbType").toString(); 89 String dbType = map.get("dbType").equals("") ? "" : map.get("dbType").toString();
113 -  
114 // 说明 90 // 说明
115 String descriptions = map.get("descriptions").equals("") ? "" : map.get("descriptions").toString(); 91 String descriptions = map.get("descriptions").equals("") ? "" : map.get("descriptions").toString();
116 -  
117 // 是否撤销 92 // 是否撤销
118 Integer destroy = map.get("destroy").equals("") ? null : Integer.parseInt(map.get("destroy").toString()); 93 Integer destroy = map.get("destroy").equals("") ? null : Integer.parseInt(map.get("destroy").toString());
119 -  
120 // 方向 94 // 方向
121 Integer directions = map.get("directions").equals("") ? null : Integer.parseInt(map.get("directions").toString()); 95 Integer directions = map.get("directions").equals("") ? null : Integer.parseInt(map.get("directions").toString());
122 -  
123 // 线路ID 96 // 线路ID
124 Integer sectionRouteLine = map.get("sectionRouteLine").equals("") ? null : Integer.parseInt(map.get("sectionRouteLine").toString()); 97 Integer sectionRouteLine = map.get("sectionRouteLine").equals("") ? null : Integer.parseInt(map.get("sectionRouteLine").toString());
125 -  
126 // 道路编码 98 // 道路编码
127 String roadCoding = map.get("roadCoding").equals("") ? "" : map.get("roadCoding").toString(); 99 String roadCoding = map.get("roadCoding").equals("") ? "" : map.get("roadCoding").toString();
128 -  
129 // 路段编码 100 // 路段编码
130 String sectionCode = map.get("sectionCode").equals("") ? "" : map.get("sectionCode").toString(); 101 String sectionCode = map.get("sectionCode").equals("") ? "" : map.get("sectionCode").toString();
131 -  
132 // 路段长度 102 // 路段长度
133 Double sectionDistance = map.get("sectionDistance").equals("") ? null : Double.valueOf(map.get("sectionDistance").toString()); 103 Double sectionDistance = map.get("sectionDistance").equals("") ? null : Double.valueOf(map.get("sectionDistance").toString());
134 -  
135 // 路段ID 104 // 路段ID
136 Integer sectionId = map.get("sectionId").equals("") ? 0 : Integer.parseInt(map.get("sectionId").toString()); 105 Integer sectionId = map.get("sectionId").equals("") ? 0 : Integer.parseInt(map.get("sectionId").toString());
137 -  
138 // 路段名称 106 // 路段名称
139 String sectionName = map.get("sectionName").equals("") ? "" : map.get("sectionName").toString(); 107 String sectionName = map.get("sectionName").equals("") ? "" : map.get("sectionName").toString();
140 -  
141 // 路段路由Id 108 // 路段路由Id
142 Integer sectionRouteId = map.get("sectionRouteId").equals("") ? null : Integer.valueOf(map.get("sectionRouteId").toString()); 109 Integer sectionRouteId = map.get("sectionRouteId").equals("") ? null : Integer.valueOf(map.get("sectionRouteId").toString());
143 -  
144 // 线路编码 110 // 线路编码
145 String lineCode =map.get("lineCode").equals("") ? "" : map.get("lineCode").toString(); 111 String lineCode =map.get("lineCode").equals("") ? "" : map.get("lineCode").toString();
146 -  
147 // 路段时长 112 // 路段时长
148 Double sectionTime = map.get("sectionTime").equals("") ? null : Double.valueOf(map.get("sectionTime").toString()); 113 Double sectionTime = map.get("sectionTime").equals("") ? null : Double.valueOf(map.get("sectionTime").toString());
149 -  
150 // 路段路由 114 // 路段路由
151 Integer sectionrouteCode = map.get("sectionrouteCode").equals("") ? null : Integer.valueOf(map.get("sectionrouteCode").toString()); 115 Integer sectionrouteCode = map.get("sectionrouteCode").equals("") ? null : Integer.valueOf(map.get("sectionrouteCode").toString());
152 -  
153 SectionRoute resultS = routeRepository.findOne(sectionRouteId); 116 SectionRoute resultS = routeRepository.findOne(sectionRouteId);
154 -  
155 int old_code = resultS.getSectionrouteCode(); 117 int old_code = resultS.getSectionrouteCode();
156 -  
157 if(sectionrouteCode!=null) { 118 if(sectionrouteCode!=null) {
158 -  
159 int new_code = sectionrouteCode+100; 119 int new_code = sectionrouteCode+100;
160 -  
161 if(new_code==old_code){ 120 if(new_code==old_code){
162 -  
163 sectionrouteCode = new_code; 121 sectionrouteCode = new_code;
164 -  
165 }else { 122 }else {
166 -  
167 sectionrouteCode = new_code-100+1; 123 sectionrouteCode = new_code-100+1;
168 -  
169 } 124 }
170 -  
171 }else { 125 }else {
172 -  
173 sectionrouteCode = old_code; 126 sectionrouteCode = old_code;
174 -  
175 } 127 }
176 -  
177 // 限速 128 // 限速
178 Double speedLimit = map.get("speedLimit").equals("") ? null : Double.valueOf(map.get("speedLimit").toString()); 129 Double speedLimit = map.get("speedLimit").equals("") ? null : Double.valueOf(map.get("speedLimit").toString());
179 -  
180 // 版本 130 // 版本
181 Integer version = map.get("versions").equals("") ? null : Integer.valueOf(map.get("versions").toString()); 131 Integer version = map.get("versions").equals("") ? null : Integer.valueOf(map.get("versions").toString());
182 -  
183 // WGS坐标点集合 132 // WGS坐标点集合
184 String gsectionVector = null; 133 String gsectionVector = null;
185 if(!sectionsWJPpoints.equals("")) 134 if(!sectionsWJPpoints.equals(""))
186 gsectionVector = "LINESTRING(" + sectionsWJPpoints +")"; 135 gsectionVector = "LINESTRING(" + sectionsWJPpoints +")";
187 -  
188 // 原坐标点集合 136 // 原坐标点集合
189 String bsectionVectorS = null; 137 String bsectionVectorS = null;
190 if(!sectionsBpoints.equals("")) 138 if(!sectionsBpoints.equals(""))
191 bsectionVectorS = "LINESTRING(" + sectionsBpoints + ")"; 139 bsectionVectorS = "LINESTRING(" + sectionsBpoints + ")";
192 -  
193 Integer createBy = map.get("createBy").equals("") ? null : Integer.valueOf(map.get("createBy").toString()); 140 Integer createBy = map.get("createBy").equals("") ? null : Integer.valueOf(map.get("createBy").toString());
194 -  
195 String createDate = map.get("createDate").equals("") ? null : map.get("createDate").toString(); 141 String createDate = map.get("createDate").equals("") ? null : map.get("createDate").toString();
196 -  
197 Integer updateBy = map.get("updateBy").equals("") ?null : Integer.valueOf(map.get("updateBy").toString()); 142 Integer updateBy = map.get("updateBy").equals("") ?null : Integer.valueOf(map.get("updateBy").toString());
198 - 143 + Integer isRoadeSpeed = map.get("isRoadeSpeed").equals("") ? null : Integer.valueOf(map.get("isRoadeSpeed").toString());
199 SimpleDateFormat formatter = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss"); 144 SimpleDateFormat formatter = new SimpleDateFormat ("yyyy-MM-dd HH:mm:ss");
200 -  
201 Date date = new Date(); 145 Date date = new Date();
202 -  
203 // 修改日期 146 // 修改日期
204 String updateDate = formatter.format(date); 147 String updateDate = formatter.format(date);
205 -  
206 String crosesRoad=""; 148 String crosesRoad="";
207 -  
208 String endNode=""; 149 String endNode="";
209 -  
210 String startNode=""; 150 String startNode="";
211 -  
212 String middleNode=""; 151 String middleNode="";
213 -  
214 String sectionType=""; 152 String sectionType="";
215 -  
216 - // String csectionVector="";  
217 -  
218 // 更新 153 // 更新
219 - /*repository.sectionUpdate(sectionId, gsectionVector, bsectionVectorS, sectionCode, sectionName, crosesRoad, endNode, startNode, middleNode, sectionType, csectionVector, roadCoding, sectionDistance, sectionTime, dbType, speedLimit, descriptions, version, createBy, createDate, updateBy, updateDate);*/  
220 repository.sectionUpdate(sectionId, gsectionVector, bsectionVectorS, sectionCode, sectionName, crosesRoad, endNode, startNode, middleNode, sectionType, roadCoding, sectionDistance, sectionTime, dbType, speedLimit, descriptions, version, createBy, createDate, updateBy, updateDate); 154 repository.sectionUpdate(sectionId, gsectionVector, bsectionVectorS, sectionCode, sectionName, crosesRoad, endNode, startNode, middleNode, sectionType, roadCoding, sectionDistance, sectionTime, dbType, speedLimit, descriptions, version, createBy, createDate, updateBy, updateDate);
221 -  
222 SectionRoute route = new SectionRoute(); 155 SectionRoute route = new SectionRoute();
223 -  
224 Line line = lineRepository.findOne(sectionRouteLine); 156 Line line = lineRepository.findOne(sectionRouteLine);
225 -  
226 Section section = repository.findOne(sectionId); 157 Section section = repository.findOne(sectionId);
227 -  
228 route.setId(sectionRouteId); 158 route.setId(sectionRouteId);
229 -  
230 route.setSectionrouteCode(sectionrouteCode); 159 route.setSectionrouteCode(sectionrouteCode);
231 -  
232 route.setLineCode(lineCode); 160 route.setLineCode(lineCode);
233 -  
234 route.setSectionCode(sectionCode); 161 route.setSectionCode(sectionCode);
235 -  
236 route.setDirections(directions); 162 route.setDirections(directions);
237 -  
238 route.setVersions(version); 163 route.setVersions(version);
239 -  
240 route.setDestroy(destroy); 164 route.setDestroy(destroy);
241 -  
242 route.setDescriptions(descriptions); 165 route.setDescriptions(descriptions);
243 -  
244 route.setCreateBy(createBy); 166 route.setCreateBy(createBy);
245 -  
246 route.setUpdateBy(updateBy); 167 route.setUpdateBy(updateBy);
247 -  
248 route.setLine(line); 168 route.setLine(line);
249 -  
250 route.setSection(section); 169 route.setSection(section);
251 - 170 + route.setIsRoadeSpeed(isRoadeSpeed);
252 routeRepository.save(route); 171 routeRepository.save(route);
253 -  
254 resultMap.put("status", ResponseCode.SUCCESS); 172 resultMap.put("status", ResponseCode.SUCCESS);
255 -  
256 } catch (Exception e) { 173 } catch (Exception e) {
257 -  
258 resultMap.put("status", ResponseCode.ERROR); 174 resultMap.put("status", ResponseCode.ERROR);
259 -  
260 logger.error("save erro.", e); 175 logger.error("save erro.", e);
261 -  
262 } 176 }
263 -  
264 return resultMap; 177 return resultMap;
265 } 178 }
266 179
@@ -294,164 +207,105 @@ public class SectionServiceImpl extends BaseServiceImpl&lt;Section, Integer&gt; implem @@ -294,164 +207,105 @@ public class SectionServiceImpl extends BaseServiceImpl&lt;Section, Integer&gt; implem
294 * @return map<SUCCESS:成功;ERROR:异常> 207 * @return map<SUCCESS:成功;ERROR:异常>
295 */ 208 */
296 @Override 209 @Override
  210 + @Transactional
297 public Map<String, Object> sectionSave(Map<String, Object> map) { 211 public Map<String, Object> sectionSave(Map<String, Object> map) {
298 -  
299 Map<String, Object> resultMap = new HashMap<String, Object>(); 212 Map<String, Object> resultMap = new HashMap<String, Object>();
300 -  
301 try { 213 try {
302 -  
303 - /** 线路ID */ 214 + // 线路ID.
304 Integer lineId = map.get("lineId").equals("") ? null : Integer.valueOf(map.get("lineId").toString()); 215 Integer lineId = map.get("lineId").equals("") ? null : Integer.valueOf(map.get("lineId").toString());
305 -  
306 - /** 线路编码 */ 216 + // 线路编码.
307 String lineCode = map.get("lineCode").equals("") ? "" : map.get("lineCode").toString(); 217 String lineCode = map.get("lineCode").equals("") ? "" : map.get("lineCode").toString();
308 - 218 + // 路段名称.
309 String sectionName = map.get("sectionName").equals("") ? "" : map.get("sectionName").toString(); 219 String sectionName = map.get("sectionName").equals("") ? "" : map.get("sectionName").toString();
310 - 220 + // 路段编码.
311 String sectionCode = map.get("sectionCode").equals("") ? "" : map.get("sectionCode").toString(); 221 String sectionCode = map.get("sectionCode").equals("") ? "" : map.get("sectionCode").toString();
312 - 222 + // 道路编码.
313 String roadCoding = map.get("roadCoding").equals("") ? "" : map.get("roadCoding").toString(); 223 String roadCoding = map.get("roadCoding").equals("") ? "" : map.get("roadCoding").toString();
314 - 224 + // 原始坐标类型.
315 String dbType = map.get("dbType").equals("") ? "" :map.get("dbType").toString(); 225 String dbType = map.get("dbType").equals("") ? "" :map.get("dbType").toString();
316 - 226 + // 路段几何图形坐标.
317 String sectionJSON = map.get("bsectionVector").equals("") ? "" : map.get("bsectionVector").toString(); 227 String sectionJSON = map.get("bsectionVector").equals("") ? "" : map.get("bsectionVector").toString();
318 - 228 + // 路段序号
319 String sectionrouteCode = map.get("sectionrouteCode").equals("") ? "" : map.get("sectionrouteCode").toString(); 229 String sectionrouteCode = map.get("sectionrouteCode").equals("") ? "" : map.get("sectionrouteCode").toString();
320 -  
321 - Double sectionTime = map.get("sectionTime").equals("") ? null : Double.valueOf(map.get("sectionTime").toString());  
322 -  
323 - Double sectionDistance = map.get("sectionDistance").equals("") ? null : Double.valueOf(map.get("sectionDistance").toString());  
324 -  
325 - Double speedLimit = map.get("speedLimit").equals("") ? null : Double.valueOf(map.get("speedLimit").toString());  
326 -  
327 - Integer versions = map.get("versions").equals("") ? null : Integer.valueOf(map.get("versions").toString());  
328 -  
329 - Integer destroy = map.get("destroy").equals("") ? null : Integer.valueOf(map.get("destroy").toString());  
330 -  
331 - Integer directions = map.get("directions").equals("") ? null : Integer.valueOf(map.get("directions").toString());  
332 - 230 + // 路段时长.
  231 + Double sectionTime = map.get("sectionTime").equals("") ? 0.0d : Double.valueOf(map.get("sectionTime").toString());
  232 + // 路段距离.
  233 + Double sectionDistance = map.get("sectionDistance").equals("") ? 0.0d : Double.valueOf(map.get("sectionDistance").toString());
  234 + // 路段限速.
  235 + Double speedLimit = map.get("speedLimit").equals("") ? 0.0d : Double.valueOf(map.get("speedLimit").toString());
  236 + // 版本.
  237 + Integer versions = map.get("versions").equals("") ? 1 : Integer.valueOf(map.get("versions").toString());
  238 + // 是否撤销.
  239 + Integer destroy = map.get("destroy").equals("") ? 0 : Integer.valueOf(map.get("destroy").toString());
  240 + // 路段方向.
  241 + Integer directions = map.get("directions").equals("") ? 0 : Integer.valueOf(map.get("directions").toString());
  242 + // 描述与说明.
333 String descriptions = map.get("descriptions").equals("")? "" : map.get("descriptions").toString(); 243 String descriptions = map.get("descriptions").equals("")? "" : map.get("descriptions").toString();
334 -  
335 // 原始线状图形坐标集合 244 // 原始线状图形坐标集合
336 String sectionsBpoints = ""; 245 String sectionsBpoints = "";
337 -  
338 // WGS线状图形坐标集合 246 // WGS线状图形坐标集合
339 String sectionsWJPpoints = ""; 247 String sectionsWJPpoints = "";
340 -  
341 if(!sectionJSON.equals("")) { 248 if(!sectionJSON.equals("")) {
342 -  
343 // 转换成JSON数组 249 // 转换成JSON数组
344 JSONArray sectionsArray = JSONArray.parseArray(sectionJSON); 250 JSONArray sectionsArray = JSONArray.parseArray(sectionJSON);
345 -  
346 // 遍历 251 // 遍历
347 for(int s = 0 ;s<sectionsArray.size();s++) { 252 for(int s = 0 ;s<sectionsArray.size();s++) {
348 -  
349 String pointsLngStr = sectionsArray.getJSONObject(s).get("lng").toString(); 253 String pointsLngStr = sectionsArray.getJSONObject(s).get("lng").toString();
350 -  
351 String pointsLatStr = sectionsArray.getJSONObject(s).get("lat").toString(); 254 String pointsLatStr = sectionsArray.getJSONObject(s).get("lat").toString();
352 -  
353 String WGSLngStr = ""; 255 String WGSLngStr = "";
354 -  
355 String WGSLatStr = ""; 256 String WGSLatStr = "";
356 -  
357 Location resultPoint = FromBDPointToWGSPoint(pointsLngStr,pointsLatStr); 257 Location resultPoint = FromBDPointToWGSPoint(pointsLngStr,pointsLatStr);
358 -  
359 WGSLngStr = String.valueOf(resultPoint.getLng()); 258 WGSLngStr = String.valueOf(resultPoint.getLng());
360 -  
361 WGSLatStr = String.valueOf(resultPoint.getLat()); 259 WGSLatStr = String.valueOf(resultPoint.getLat());
362 -  
363 if(s==0) { 260 if(s==0) {
364 -  
365 sectionsBpoints = pointsLngStr + " " + pointsLatStr; 261 sectionsBpoints = pointsLngStr + " " + pointsLatStr;
366 -  
367 sectionsWJPpoints = WGSLngStr + " " + WGSLatStr; 262 sectionsWJPpoints = WGSLngStr + " " + WGSLatStr;
368 -  
369 }else { 263 }else {
370 -  
371 sectionsBpoints = sectionsBpoints + "," + pointsLngStr + " " + pointsLatStr; 264 sectionsBpoints = sectionsBpoints + "," + pointsLngStr + " " + pointsLatStr;
372 -  
373 sectionsWJPpoints = sectionsWJPpoints + "," + WGSLngStr + " " + WGSLatStr; 265 sectionsWJPpoints = sectionsWJPpoints + "," + WGSLngStr + " " + WGSLatStr;
374 -  
375 } 266 }
376 -  
377 } 267 }
378 -  
379 } 268 }
380 -  
381 // WGS坐标点集合 269 // WGS坐标点集合
382 String gsectionVector = "LINESTRING(" + sectionsWJPpoints +")"; 270 String gsectionVector = "LINESTRING(" + sectionsWJPpoints +")";
383 -  
384 // 原坐标点集合 271 // 原坐标点集合
385 String bsectionVector = "LINESTRING(" + sectionsBpoints + ")"; 272 String bsectionVector = "LINESTRING(" + sectionsBpoints + ")";
386 -  
387 String crosesRoad=""; 273 String crosesRoad="";
388 -  
389 String endNode =""; 274 String endNode ="";
390 -  
391 String startNode=""; 275 String startNode="";
392 -  
393 String middleNode=""; 276 String middleNode="";
394 -  
395 String sectionType=""; 277 String sectionType="";
396 -  
397 String csectionVector=null; 278 String csectionVector=null;
398 -  
399 Integer id = Integer.valueOf(sectionCode); 279 Integer id = Integer.valueOf(sectionCode);
400 -  
401 repository.systemSave(sectionCode, sectionName, crosesRoad, endNode, startNode, middleNode, gsectionVector, bsectionVector, sectionType, csectionVector, roadCoding, sectionDistance, sectionTime, dbType, speedLimit, descriptions, versions, id); 280 repository.systemSave(sectionCode, sectionName, crosesRoad, endNode, startNode, middleNode, gsectionVector, bsectionVector, sectionType, csectionVector, roadCoding, sectionDistance, sectionTime, dbType, speedLimit, descriptions, versions, id);
402 -  
403 Section section = repository.findOne(id); 281 Section section = repository.findOne(id);
404 -  
405 Line line = lineRepository.findOne(lineId); 282 Line line = lineRepository.findOne(lineId);
406 -  
407 // 路段路由 283 // 路段路由
408 SectionRoute sectionRoute = new SectionRoute(); 284 SectionRoute sectionRoute = new SectionRoute();
409 -  
410 Integer routeCode = null; 285 Integer routeCode = null;
411 -  
412 if(!sectionrouteCode.equals("")){ 286 if(!sectionrouteCode.equals("")){
413 -  
414 String sectionrouteCodeArray[] = sectionrouteCode.split("_"); 287 String sectionrouteCodeArray[] = sectionrouteCode.split("_");
415 -  
416 routeCode = Integer.valueOf(sectionrouteCodeArray[0])+1; 288 routeCode = Integer.valueOf(sectionrouteCodeArray[0])+1;
417 -  
418 }else { 289 }else {
419 -  
420 routeCode = 100; 290 routeCode = 100;
421 -  
422 } 291 }
423 - 292 + routeRepository.sectionUpdSectionRouteCode(lineId, directions,routeCode);
424 sectionRoute.setSectionrouteCode(routeCode); 293 sectionRoute.setSectionrouteCode(routeCode);
425 -  
426 sectionRoute.setLineCode(lineCode); 294 sectionRoute.setLineCode(lineCode);
427 -  
428 sectionRoute.setSection(section); 295 sectionRoute.setSection(section);
429 -  
430 sectionRoute.setSectionCode(sectionCode); 296 sectionRoute.setSectionCode(sectionCode);
431 -  
432 sectionRoute.setDirections(directions); 297 sectionRoute.setDirections(directions);
433 -  
434 sectionRoute.setDescriptions(descriptions); 298 sectionRoute.setDescriptions(descriptions);
435 -  
436 sectionRoute.setDestroy(destroy); 299 sectionRoute.setDestroy(destroy);
437 -  
438 sectionRoute.setVersions(versions); 300 sectionRoute.setVersions(versions);
439 -  
440 sectionRoute.setLine(line); 301 sectionRoute.setLine(line);
441 - 302 + sectionRoute.setIsRoadeSpeed(0);
442 routeRepository.save(sectionRoute); 303 routeRepository.save(sectionRoute);
443 -  
444 resultMap.put("status", ResponseCode.SUCCESS); 304 resultMap.put("status", ResponseCode.SUCCESS);
445 -  
446 } catch (Exception e) { 305 } catch (Exception e) {
447 -  
448 resultMap.put("status", ResponseCode.ERROR); 306 resultMap.put("status", ResponseCode.ERROR);
449 -  
450 logger.error("save erro.", e); 307 logger.error("save erro.", e);
451 -  
452 } 308 }
453 -  
454 return resultMap; 309 return resultMap;
455 } 310 }
456 -  
457 -} 311 +}
458 \ No newline at end of file 312 \ No newline at end of file
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
@@ -4,6 +4,7 @@ import com.bsth.common.ResponseCode; @@ -4,6 +4,7 @@ import com.bsth.common.ResponseCode;
4 import com.bsth.entity.Line; 4 import com.bsth.entity.Line;
5 import com.bsth.entity.Station; 5 import com.bsth.entity.Station;
6 import com.bsth.entity.StationRoute; 6 import com.bsth.entity.StationRoute;
  7 +import com.bsth.entity.search.CustomerSpecs;
7 import com.bsth.repository.LineRepository; 8 import com.bsth.repository.LineRepository;
8 import com.bsth.repository.SectionRouteRepository; 9 import com.bsth.repository.SectionRouteRepository;
9 import com.bsth.repository.StationRepository; 10 import com.bsth.repository.StationRepository;
@@ -16,6 +17,8 @@ import com.bsth.util.Geo.Point; @@ -16,6 +17,8 @@ import com.bsth.util.Geo.Point;
16 import com.bsth.util.db.DBUtils_MS; 17 import com.bsth.util.db.DBUtils_MS;
17 import com.google.common.base.Splitter; 18 import com.google.common.base.Splitter;
18 import org.springframework.beans.factory.annotation.Autowired; 19 import org.springframework.beans.factory.annotation.Autowired;
  20 +import org.springframework.data.domain.Sort;
  21 +import org.springframework.data.domain.Sort.Direction;
19 import org.springframework.stereotype.Service; 22 import org.springframework.stereotype.Service;
20 import org.springframework.transaction.annotation.Transactional; 23 import org.springframework.transaction.annotation.Transactional;
21 24
@@ -56,6 +59,14 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ @@ -56,6 +59,14 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
56 @Autowired 59 @Autowired
57 private StationRepository stationRepository; 60 private StationRepository stationRepository;
58 61
  62 + @Override
  63 + public Iterable<StationRoute> list(Map<String, Object> map) {
  64 + List<Sort.Order> orderList = new ArrayList<>();
  65 + orderList.add(new Sort.Order(Direction.ASC, "directions"));
  66 + orderList.add(new Sort.Order(Direction.ASC, "stationRouteCode"));
  67 + return repository.findAll(new CustomerSpecs<StationRoute>(map), new Sort(orderList));
  68 + }
  69 +
59 /** 70 /**
60 * @Description :TODO(查询树站点与路段数据) 71 * @Description :TODO(查询树站点与路段数据)
61 * 72 *
src/main/java/com/bsth/service/impl/StationServiceImpl.java
@@ -31,6 +31,8 @@ import com.bsth.service.StationService; @@ -31,6 +31,8 @@ import com.bsth.service.StationService;
31 import com.bsth.util.GetUIDAndCode; 31 import com.bsth.util.GetUIDAndCode;
32 import com.bsth.util.TransGPS; 32 import com.bsth.util.TransGPS;
33 import com.bsth.util.TransGPS.Location; 33 import com.bsth.util.TransGPS.Location;
  34 +import com.bsth.util.Geo.GeoUtils;
  35 +import com.bsth.util.Geo.Point;
34 36
35 /** 37 /**
36 * 38 *
@@ -82,62 +84,41 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem @@ -82,62 +84,41 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
82 */ 84 */
83 @Override 85 @Override
84 public Map<String, Object> systemSaveStations(Map<String, Object> map) { 86 public Map<String, Object> systemSaveStations(Map<String, Object> map) {
85 -  
86 Map<String, Object> resultMap = new HashMap<String,Object>(); 87 Map<String, Object> resultMap = new HashMap<String,Object>();
87 -  
88 try { 88 try {
89 -  
90 // 站点信息字符传 89 // 站点信息字符传
91 String stationJSON = map.get("stationJSON").toString().equals("") ? "" : map.get("stationJSON").toString(); 90 String stationJSON = map.get("stationJSON").toString().equals("") ? "" : map.get("stationJSON").toString();
92 -  
93 // 路段信息字符串 91 // 路段信息字符串
94 String sectionJSON = map.get("sectionJSON").toString().equals("") ? "" : map.get("sectionJSON").toString(); 92 String sectionJSON = map.get("sectionJSON").toString().equals("") ? "" : map.get("sectionJSON").toString();
95 -  
96 // 方向 93 // 方向
97 int directions = Integer.parseInt(map.get("directions").toString()); 94 int directions = Integer.parseInt(map.get("directions").toString());
98 -  
99 // 是否撤销 95 // 是否撤销
100 int destroy = map.get("destroy").equals("") ? 0 : Integer.parseInt(map.get("destroy").toString()); 96 int destroy = map.get("destroy").equals("") ? 0 : Integer.parseInt(map.get("destroy").toString());
101 -  
102 // 版本 97 // 版本
103 int versions = map.get("versions").equals("") ? 0 : Integer.parseInt(map.get("versions").toString()); 98 int versions = map.get("versions").equals("") ? 0 : Integer.parseInt(map.get("versions").toString());
104 -  
105 // 坐标类型 99 // 坐标类型
106 String dbType = map.get("dbType").equals("") ? "" : map.get("dbType").toString(); 100 String dbType = map.get("dbType").equals("") ? "" : map.get("dbType").toString();
107 -  
108 // 限速 101 // 限速
109 String speedLimitStr = map.get("speedLimit").equals("") ? "" : map.get("speedLimit").toString(); 102 String speedLimitStr = map.get("speedLimit").equals("") ? "" : map.get("speedLimit").toString();
110 -  
111 // 线路ID 103 // 线路ID
112 int lineId = map.get("lineId").toString().equals("") ? 0 : Integer.parseInt(map.get("lineId").toString()); 104 int lineId = map.get("lineId").toString().equals("") ? 0 : Integer.parseInt(map.get("lineId").toString());
113 -  
114 // 半径 105 // 半径
115 int radius = map.get("radius").equals("") ? 0 : Integer.parseInt(map.get("radius").toString()); 106 int radius = map.get("radius").equals("") ? 0 : Integer.parseInt(map.get("radius").toString());
116 -  
117 // 图形类型 107 // 图形类型
118 String shapesType = map.get("shapesType").equals("") ? "" : map.get("shapesType").toString(); 108 String shapesType = map.get("shapesType").equals("") ? "" : map.get("shapesType").toString();
119 -  
120 // 路段距离 109 // 路段距离
121 Double sectionDistance = 0.0d; 110 Double sectionDistance = 0.0d;
122 -  
123 // 路段时长 111 // 路段时长
124 Double sectionDuration = 0.0d; 112 Double sectionDuration = 0.0d;
125 -  
126 // 里程(上或者下) 113 // 里程(上或者下)
127 double sumUpOrDownMileage = 0.0d; 114 double sumUpOrDownMileage = 0.0d;
128 -  
129 // 线路信息 115 // 线路信息
130 Line resultLine = lineRepository.findOne(lineId); 116 Line resultLine = lineRepository.findOne(lineId);
131 -  
132 Map<String, Object> resultSaveMapm = new HashMap<String,Object>(); 117 Map<String, Object> resultSaveMapm = new HashMap<String,Object>();
133 -  
134 String baseRes = map.get("baseRes").equals("") ? "" : map.get("baseRes").toString(); 118 String baseRes = map.get("baseRes").equals("") ? "" : map.get("baseRes").toString();
135 -  
136 if(!stationJSON.equals("")) { 119 if(!stationJSON.equals("")) {
137 -  
138 // 保存站点与站点路由信息 120 // 保存站点与站点路由信息
139 resultSaveMapm = savaStationAndStationRouteInfo( stationJSON, sectionDistance, sectionDuration, dbType,radius, shapesType, destroy, versions, sumUpOrDownMileage, directions, resultLine,baseRes); 121 resultSaveMapm = savaStationAndStationRouteInfo( stationJSON, sectionDistance, sectionDuration, dbType,radius, shapesType, destroy, versions, sumUpOrDownMileage, directions, resultLine,baseRes);
140 -  
141 } 122 }
142 123
143 // 路段长度 124 // 路段长度
@@ -259,275 +240,148 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem @@ -259,275 +240,148 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
259 * @throws Exception 240 * @throws Exception
260 */ 241 */
261 public Map<String, Object> savaStationAndStationRouteInfo(String stationJSON,double sectionDistance,double sectionDuration,String dbType, 242 public Map<String, Object> savaStationAndStationRouteInfo(String stationJSON,double sectionDistance,double sectionDuration,String dbType,
262 -  
263 int radius,String shapesType,int destroy,int versions,double sumUpOrDownMileage,int directions,Line resultLine,String baseRes) throws Exception{ 243 int radius,String shapesType,int destroy,int versions,double sumUpOrDownMileage,int directions,Line resultLine,String baseRes) throws Exception{
264 -  
265 Map<String, Object> paramsMeleageAndDistncDura = new HashMap<String,Object>(); 244 Map<String, Object> paramsMeleageAndDistncDura = new HashMap<String,Object>();
266 -  
267 JSONArray stationsArray = JSONArray.parseArray(stationJSON); 245 JSONArray stationsArray = JSONArray.parseArray(stationJSON);
268 -  
269 if(stationsArray.size()>0) { 246 if(stationsArray.size()>0) {
270 -  
271 for(int i = 0;i <stationsArray.size();i++) { 247 for(int i = 0;i <stationsArray.size();i++) {
272 -  
273 // 站点名称 248 // 站点名称
274 String stationName = stationsArray.getJSONObject(i).equals("") ? "" : stationsArray.getJSONObject(i).get("name").toString(); 249 String stationName = stationsArray.getJSONObject(i).equals("") ? "" : stationsArray.getJSONObject(i).get("name").toString();
275 -  
276 Double distance = stationsArray.getJSONObject(i).get("distance").equals("") ? 0 : Double.parseDouble(stationsArray.getJSONObject(i).get("distance").toString()); 250 Double distance = stationsArray.getJSONObject(i).get("distance").equals("") ? 0 : Double.parseDouble(stationsArray.getJSONObject(i).get("distance").toString());
277 -  
278 // 转成公里 251 // 转成公里
279 distance = distance/1000; 252 distance = distance/1000;
280 -  
281 BigDecimal d = new BigDecimal(distance); 253 BigDecimal d = new BigDecimal(distance);
282 -  
283 distance = d.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); 254 distance = d.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
284 -  
285 sectionDistance= distance + sectionDistance; 255 sectionDistance= distance + sectionDistance;
286 -  
287 Double duration = stationsArray.getJSONObject(i).get("duration").equals("") ? 0 : Double.parseDouble(stationsArray.getJSONObject(i).get("duration").toString()); 256 Double duration = stationsArray.getJSONObject(i).get("duration").equals("") ? 0 : Double.parseDouble(stationsArray.getJSONObject(i).get("duration").toString());
288 -  
289 // 转成分钟 257 // 转成分钟
290 duration = duration/60; 258 duration = duration/60;
291 -  
292 BigDecimal t = new BigDecimal(duration); 259 BigDecimal t = new BigDecimal(duration);
293 -  
294 duration = t.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); 260 duration = t.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
295 -  
296 sectionDuration = duration + sectionDuration; 261 sectionDuration = duration + sectionDuration;
297 -  
298 // 百度经纬度坐标 262 // 百度经纬度坐标
299 String bJwpoints = ""; 263 String bJwpoints = "";
300 -  
301 // 百度坐标经度 264 // 百度坐标经度
302 String bLonx = JSONObject.parseObject(stationsArray.getJSONObject(i).get("potion").toString()).get("lng").toString(); 265 String bLonx = JSONObject.parseObject(stationsArray.getJSONObject(i).get("potion").toString()).get("lng").toString();
303 - 266 + bLonx = bLonx==null || bLonx.equals("") ? "0" : bLonx;
304 // 百度坐标纬度 267 // 百度坐标纬度
305 String bLatx = JSONObject.parseObject(stationsArray.getJSONObject(i).get("potion").toString()).get("lat").toString(); 268 String bLatx = JSONObject.parseObject(stationsArray.getJSONObject(i).get("potion").toString()).get("lat").toString();
306 - 269 + bLatx = bLatx==null || bLatx.equals("") ? "0" : bLatx;
307 List<Object[]> stationNameList = repository.findStationName(stationName); 270 List<Object[]> stationNameList = repository.findStationName(stationName);
308 -  
309 - boolean isHave = isHaveStationname(bJwpoints,stationNameList);  
310 - 271 + Map<String, Object> isHaveMap = isHaveStationname(bLonx,bLatx,stationNameList);
311 // 初始化站点对象 272 // 初始化站点对象
312 Station arg0 = new Station(); 273 Station arg0 = new Station();
313 -  
314 - // 站点编码  
315 - long stationCode = 0L;  
316 -  
317 - if(isHave) {  
318 -  
319 - Integer stationId = Integer.parseInt(stationNameList.get(0)[1].toString());  
320 - 274 + if(Boolean.parseBoolean(isHaveMap.get("isHave").toString())) {
  275 + /*Integer stationId = Integer.parseInt(stationNameList.get(0)[1].toString());*/
  276 + Integer stationId = Integer.parseInt(isHaveMap.get("id").toString());
321 arg0 = repository.findOne(stationId); 277 arg0 = repository.findOne(stationId);
322 -  
323 }else { 278 }else {
324 -  
325 - stationCode = GetUIDAndCode.getStationId();  
326 - 279 + // 站点编码
  280 + long stationCode = GetUIDAndCode.getStationId();
327 arg0.setStationCod(String.valueOf(stationCode)); 281 arg0.setStationCod(String.valueOf(stationCode));
328 -  
329 arg0.setId((int)stationCode); 282 arg0.setId((int)stationCode);
330 -  
331 arg0.setStationName(stationName); 283 arg0.setStationName(stationName);
332 -  
333 // 原坐标类型 284 // 原坐标类型
334 arg0.setDbType(dbType); 285 arg0.setDbType(dbType);
335 -  
336 -  
337 String gLonxStr = JSONObject.parseObject(stationsArray.getJSONObject(i).get("wgs").toString()).get("x").equals("") ? null : JSONObject.parseObject(stationsArray.getJSONObject(i).get("wgs").toString()).get("x").toString(); 286 String gLonxStr = JSONObject.parseObject(stationsArray.getJSONObject(i).get("wgs").toString()).get("x").equals("") ? null : JSONObject.parseObject(stationsArray.getJSONObject(i).get("wgs").toString()).get("x").toString();
338 -  
339 String gLatyStr = JSONObject.parseObject(stationsArray.getJSONObject(i).get("wgs").toString()).get("y").equals("") ? null : JSONObject.parseObject(stationsArray.getJSONObject(i).get("wgs").toString()).get("y").toString(); 287 String gLatyStr = JSONObject.parseObject(stationsArray.getJSONObject(i).get("wgs").toString()).get("y").equals("") ? null : JSONObject.parseObject(stationsArray.getJSONObject(i).get("wgs").toString()).get("y").toString();
340 -  
341 float gLonx = 0.0f; 288 float gLonx = 0.0f;
342 -  
343 float gLaty = 0.0f; 289 float gLaty = 0.0f;
344 -  
345 Location resultPoint = null; 290 Location resultPoint = null;
346 -  
347 if(baseRes.equals("No")){ 291 if(baseRes.equals("No")){
348 -  
349 /** BD to WGS坐标 */ 292 /** BD to WGS坐标 */
350 resultPoint = FromBDPointToWGSPoint(bLonx,bLatx); 293 resultPoint = FromBDPointToWGSPoint(bLonx,bLatx);
351 -  
352 if(gLonxStr==null) 294 if(gLonxStr==null)
353 gLonx = (float)resultPoint.getLng(); 295 gLonx = (float)resultPoint.getLng();
354 else 296 else
355 gLonx = Float.valueOf(gLonxStr); 297 gLonx = Float.valueOf(gLonxStr);
356 -  
357 if(gLatyStr==null) 298 if(gLatyStr==null)
358 gLaty = (float)resultPoint.getLat(); 299 gLaty = (float)resultPoint.getLat();
359 else 300 else
360 gLaty = Float.valueOf(gLatyStr); 301 gLaty = Float.valueOf(gLatyStr);
361 -  
362 arg0.setgLonx(gLonx); 302 arg0.setgLonx(gLonx);
363 -  
364 arg0.setgLaty(gLaty); 303 arg0.setgLaty(gLaty);
365 -  
366 // 百度经纬度 304 // 百度经纬度
367 bJwpoints = bLonx + " " + bLatx; 305 bJwpoints = bLonx + " " + bLatx;
368 -  
369 arg0.setbJwpoints(bJwpoints); 306 arg0.setbJwpoints(bJwpoints);
370 -  
371 }else if(baseRes.equals("GCJ02")){ 307 }else if(baseRes.equals("GCJ02")){
372 -  
373 Location bdLoc = TransGPS.LocationMake(Double.valueOf(gLonxStr), Double.valueOf(gLatyStr)); 308 Location bdLoc = TransGPS.LocationMake(Double.valueOf(gLonxStr), Double.valueOf(gLatyStr));
374 -  
375 Location location = TransGPS.bd_encrypt(bdLoc); 309 Location location = TransGPS.bd_encrypt(bdLoc);
376 -  
377 String GCJLng = String.valueOf(location.getLng()); 310 String GCJLng = String.valueOf(location.getLng());
378 -  
379 String GCJLat = String.valueOf(location.getLat()); 311 String GCJLat = String.valueOf(location.getLat());
380 -  
381 resultPoint = FromBDPointToWGSPoint(GCJLng,GCJLat); 312 resultPoint = FromBDPointToWGSPoint(GCJLng,GCJLat);
382 -  
383 bJwpoints = GCJLng + " " +GCJLat; 313 bJwpoints = GCJLng + " " +GCJLat;
384 -  
385 arg0.setgLonx((float)location.getLng()); 314 arg0.setgLonx((float)location.getLng());
386 -  
387 arg0.setgLaty((float)location.getLat()); 315 arg0.setgLaty((float)location.getLat());
388 -  
389 arg0.setbJwpoints(bJwpoints); 316 arg0.setbJwpoints(bJwpoints);
390 -  
391 -  
392 }else if(baseRes.equals("BD09")){ 317 }else if(baseRes.equals("BD09")){
393 -  
394 resultPoint = FromBDPointToWGSPoint(gLonxStr, gLatyStr); 318 resultPoint = FromBDPointToWGSPoint(gLonxStr, gLatyStr);
395 -  
396 bJwpoints = gLonxStr+ " " + gLatyStr; 319 bJwpoints = gLonxStr+ " " + gLatyStr;
397 -  
398 arg0.setgLonx((float)resultPoint.getLng()); 320 arg0.setgLonx((float)resultPoint.getLng());
399 -  
400 arg0.setgLaty((float)resultPoint.getLat()); 321 arg0.setgLaty((float)resultPoint.getLat());
401 -  
402 }else if(baseRes.equals("WGS84")){ 322 }else if(baseRes.equals("WGS84")){
403 -  
404 Location bdLoc = TransGPS.LocationMake(Double.valueOf(gLonxStr), Double.valueOf(gLatyStr)); 323 Location bdLoc = TransGPS.LocationMake(Double.valueOf(gLonxStr), Double.valueOf(gLatyStr));
405 -  
406 Location gcjLoc = TransGPS.transformFromWGSToGCJ(bdLoc); 324 Location gcjLoc = TransGPS.transformFromWGSToGCJ(bdLoc);
407 -  
408 Location bdEn = TransGPS.bd_encrypt(gcjLoc); 325 Location bdEn = TransGPS.bd_encrypt(gcjLoc);
409 -  
410 bJwpoints = String.valueOf(bdEn.getLng()) + " " + String.valueOf(bdEn.getLat()); 326 bJwpoints = String.valueOf(bdEn.getLng()) + " " + String.valueOf(bdEn.getLat());
411 -  
412 arg0.setbJwpoints(bJwpoints); 327 arg0.setbJwpoints(bJwpoints);
413 -  
414 arg0.setgLonx(Float.valueOf(gLonxStr)); 328 arg0.setgLonx(Float.valueOf(gLonxStr));
415 -  
416 arg0.setgLaty(Float.valueOf(gLatyStr)); 329 arg0.setgLaty(Float.valueOf(gLatyStr));
417 -  
418 } 330 }
419 -  
420 -  
421 -  
422 - /* if(gLonxStr==null)  
423 - gLonx = (float)resultPoint.getLng();  
424 - else  
425 - gLonx = Float.valueOf(gLonxStr);  
426 -  
427 - if(gLatyStr==null)  
428 - gLaty = (float)resultPoint.getLat();  
429 - else  
430 - gLaty = Float.valueOf(gLatyStr);  
431 -  
432 - arg0.setgLonx(gLonx);  
433 -  
434 - arg0.setgLaty(gLaty);*/  
435 -  
436 - // 站点地理位置WGS坐标经度  
437 - // String gLonx = JSONObject.parseObject(stationsArray.getJSONObject(i).get("WGSpotion").toString()).get("Lng").toString();  
438 - // arg0.setgLonx(Float.parseFloat(gLonx));  
439 -  
440 - // 站点地理位置WGS坐标纬度  
441 - // String gLaty = JSONObject.parseObject(stationsArray.getJSONObject(i).get("WGSpotion").toString()).get("Lat").toString();  
442 - // arg0.setgLaty(Float.parseFloat(gLaty));  
443 -  
444 arg0.setRadius(radius); 331 arg0.setRadius(radius);
445 -  
446 -  
447 arg0.setShapesType(shapesType); 332 arg0.setShapesType(shapesType);
448 -  
449 // 是否想撤销 333 // 是否想撤销
450 arg0.setDestroy(destroy); 334 arg0.setDestroy(destroy);
451 -  
452 // 版本号 335 // 版本号
453 arg0.setVersions(versions); 336 arg0.setVersions(versions);
454 -  
455 /*arg0.setbJwpoints(bJwpoints);*/ 337 /*arg0.setbJwpoints(bJwpoints);*/
456 -  
457 // 插入站点信息 338 // 插入站点信息
458 repository.save(arg0); 339 repository.save(arg0);
459 340
460 } 341 }
461 -  
462 // 站点路由对象 342 // 站点路由对象
463 StationRoute route = new StationRoute(); 343 StationRoute route = new StationRoute();
464 -  
465 // 站点名称 344 // 站点名称
466 route.setStationName(stationName); 345 route.setStationName(stationName);
467 -  
468 route.setDistances(distance); 346 route.setDistances(distance);
469 -  
470 sumUpOrDownMileage = sumUpOrDownMileage + distance; 347 sumUpOrDownMileage = sumUpOrDownMileage + distance;
471 -  
472 route.setToTime(duration); 348 route.setToTime(duration);
473 -  
474 -  
475 // 站点编码 349 // 站点编码
476 route.setStationCode(arg0.getStationCod()); 350 route.setStationCode(arg0.getStationCod());
477 -  
478 // 站点序号 351 // 站点序号
479 route.setStationRouteCode((i+1)*100); 352 route.setStationRouteCode((i+1)*100);
480 -  
481 // 站点类型 353 // 站点类型
482 if(i==0) { 354 if(i==0) {
483 -  
484 // 起始站 355 // 起始站
485 route.setStationMark("B"); 356 route.setStationMark("B");
486 -  
487 }else if(i==stationsArray.size()-1) { 357 }else if(i==stationsArray.size()-1) {
488 -  
489 // 终点站 358 // 终点站
490 route.setStationMark("E"); 359 route.setStationMark("E");
491 -  
492 }else { 360 }else {
493 -  
494 // 中途站 361 // 中途站
495 route.setStationMark("Z"); 362 route.setStationMark("Z");
496 -  
497 } 363 }
498 -  
499 // 版本号 364 // 版本号
500 route.setVersions(versions); 365 route.setVersions(versions);
501 -  
502 // 站点ID 366 // 站点ID
503 route.setStation(arg0); 367 route.setStation(arg0);
504 -  
505 // 方向 368 // 方向
506 route.setDirections(directions); 369 route.setDirections(directions);
507 -  
508 // 线路ID 370 // 线路ID
509 route.setLine(resultLine); 371 route.setLine(resultLine);
510 -  
511 // 线路编码 372 // 线路编码
512 route.setLineCode(resultLine.getLineCode()); 373 route.setLineCode(resultLine.getLineCode());
513 -  
514 route.setDestroy(destroy); 374 route.setDestroy(destroy);
515 -  
516 // 插入站点路由信息 375 // 插入站点路由信息
517 routeRepository.save(route); 376 routeRepository.save(route);
518 377
519 } 378 }
520 -  
521 paramsMeleageAndDistncDura.put("sumUpOrDownMileage", sumUpOrDownMileage); 379 paramsMeleageAndDistncDura.put("sumUpOrDownMileage", sumUpOrDownMileage);
522 -  
523 paramsMeleageAndDistncDura.put("sectionDistance", sectionDistance); 380 paramsMeleageAndDistncDura.put("sectionDistance", sectionDistance);
524 -  
525 paramsMeleageAndDistncDura.put("sectionDuration", sectionDuration); 381 paramsMeleageAndDistncDura.put("sectionDuration", sectionDuration);
526 - 382 + paramsMeleageAndDistncDura.put("stationdata",stationsArray);
527 } 383 }
528 -  
529 return paramsMeleageAndDistncDura; 384 return paramsMeleageAndDistncDura;
530 -  
531 } 385 }
532 386
533 /** 387 /**
@@ -784,68 +638,52 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem @@ -784,68 +638,52 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
784 638
785 639
786 Section section = sectionRepository.findOne(sectionid); 640 Section section = sectionRepository.findOne(sectionid);
787 -  
788 // 路段路由 641 // 路段路由
789 SectionRoute sectionRoute = new SectionRoute(); 642 SectionRoute sectionRoute = new SectionRoute();
790 -  
791 // 路段序号 643 // 路段序号
792 sectionRoute.setSectionrouteCode(100); 644 sectionRoute.setSectionrouteCode(100);
793 -  
794 // 线路编码 645 // 线路编码
795 sectionRoute.setLineCode(resultLine.getLineCode()); 646 sectionRoute.setLineCode(resultLine.getLineCode());
796 -  
797 // 路段ID 647 // 路段ID
798 sectionRoute.setSection(section); 648 sectionRoute.setSection(section);
799 -  
800 sectionRoute.setDestroy(destroy); 649 sectionRoute.setDestroy(destroy);
801 -  
802 // 线路ID 650 // 线路ID
803 sectionRoute.setLine(resultLine); 651 sectionRoute.setLine(resultLine);
804 -  
805 // 路段编码 652 // 路段编码
806 sectionRoute.setSectionCode(sectionCode); 653 sectionRoute.setSectionCode(sectionCode);
807 -  
808 // 版本 654 // 版本
809 sectionRoute.setVersions(versions); 655 sectionRoute.setVersions(versions);
810 -  
811 // 方向 656 // 方向
812 sectionRoute.setDirections(directions); 657 sectionRoute.setDirections(directions);
813 -  
814 // 路段路由保存 658 // 路段路由保存
815 sectionRouteRepository.save(sectionRoute); 659 sectionRouteRepository.save(sectionRoute);
816 660
817 } 661 }
818 -  
819 - public boolean isHaveStationname(String bJwpoints,List<Object[]> stationNameList) {  
820 -  
821 - boolean temp = true;  
822 - 662 + public Map<String, Object> isHaveStationname(String jd,String wd,List<Object[]> stationNameList) {
  663 + Map<String, Object> rsM = new HashMap<String ,Object>();
  664 + boolean temp = false;
823 if(stationNameList.size()>0) { 665 if(stationNameList.size()>0) {
824 -  
825 - for(int k = 0 ; k <stationNameList.size();k++) {  
826 -  
827 - if(bJwpoints.equals(stationNameList.get(k)[0])){  
828 -  
829 - return temp;  
830 -  
831 - }else {  
832 -  
833 - temp = false;  
834 - 666 + if(jd.equals("0") || wd.equals("0")) {
  667 + rsM.put("id", stationNameList.get(0)[1]);
  668 + temp = true;
  669 + }else{
  670 + Point p1 = new Point(Double.parseDouble(jd),Double.parseDouble(wd));
  671 + for(int k = 0 ; k <stationNameList.size();k++) {
  672 + String bJwpoints[] = stationNameList.get(k)[0].toString().split(" ");
  673 + Point p2 = new Point(Double.parseDouble(bJwpoints[0]),Double.parseDouble(bJwpoints[1]));
  674 + double jl = GeoUtils.getDistance(p1, p2);
  675 + if(jl<=120d) {
  676 + rsM.put("id", stationNameList.get(k)[1]);
  677 + temp = true;
  678 + break;
  679 + }
835 } 680 }
836 -  
837 } 681 }
838 -  
839 - }else {  
840 -  
841 - temp = false;  
842 - }  
843 -  
844 - return temp; 682 + }
  683 + rsM.put("isHave", temp);
  684 + return rsM;
845 } 685 }
846 686
847 -  
848 -  
849 /** 687 /**
850 * @Description :TODO(新增站点保存) 688 * @Description :TODO(新增站点保存)
851 * 689 *
@@ -863,246 +701,134 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem @@ -863,246 +701,134 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
863 */ 701 */
864 @Override 702 @Override
865 public Map<String, Object> stationSaveMap(Map<String, Object> map) { 703 public Map<String, Object> stationSaveMap(Map<String, Object> map) {
866 -  
867 Map<String, Object> resultMap = new HashMap<String, Object>(); 704 Map<String, Object> resultMap = new HashMap<String, Object>();
868 -  
869 try { 705 try {
870 -  
871 // 站点编码 706 // 站点编码
872 String stationCod = map.get("stationCod").equals("") ? "" : map.get("stationCod").toString(); 707 String stationCod = map.get("stationCod").equals("") ? "" : map.get("stationCod").toString();
873 -  
874 // 站点ID 708 // 站点ID
875 int stationId = Integer.valueOf(stationCod); 709 int stationId = Integer.valueOf(stationCod);
876 -  
877 // 站点名称 710 // 站点名称
878 String stationName = map.get("stationName").equals("") ? "" : map.get("stationName").toString(); 711 String stationName = map.get("stationName").equals("") ? "" : map.get("stationName").toString();
879 -  
880 // 道路编码 712 // 道路编码
881 String roadCoding = map.get("roadCoding").equals("") ? "" : map.get("roadCoding").toString(); 713 String roadCoding = map.get("roadCoding").equals("") ? "" : map.get("roadCoding").toString();
882 -  
883 // 原坐标类型 714 // 原坐标类型
884 String dbType = map.get("dbType").equals("") ? "" : map.get("dbType").toString(); 715 String dbType = map.get("dbType").equals("") ? "" : map.get("dbType").toString();
885 -  
886 // 原坐标点 716 // 原坐标点
887 String bJwpoints = map.get("bJwpoints").equals("") ? "" : map.get("bJwpoints").toString(); 717 String bJwpoints = map.get("bJwpoints").equals("") ? "" : map.get("bJwpoints").toString();
888 -  
889 String bJwpointsArray[] = null; 718 String bJwpointsArray[] = null;
890 -  
891 if(bJwpoints!=null) { 719 if(bJwpoints!=null) {
892 -  
893 bJwpointsArray = bJwpoints.split(" "); 720 bJwpointsArray = bJwpoints.split(" ");
894 -  
895 } 721 }
896 -  
897 // WGS经纬度 722 // WGS经纬度
898 Float gLonx = null; 723 Float gLonx = null;
899 -  
900 // WGS纬度 724 // WGS纬度
901 Float gLaty = null; 725 Float gLaty = null;
902 -  
903 if(bJwpointsArray.length>0) { 726 if(bJwpointsArray.length>0) {
904 -  
905 Location resultPoint = FromBDPointToWGSPoint(bJwpointsArray[0],bJwpointsArray[1]); 727 Location resultPoint = FromBDPointToWGSPoint(bJwpointsArray[0],bJwpointsArray[1]);
906 -  
907 gLonx = (float)resultPoint.getLng(); 728 gLonx = (float)resultPoint.getLng();
908 -  
909 gLaty = (float)resultPoint.getLat(); 729 gLaty = (float)resultPoint.getLat();
910 -  
911 } 730 }
912 -  
913 - /*// WGS经纬度  
914 - String gJwpoints = map.get("gJwpoints").equals("") ? null : map.get("gJwpoints").toString();  
915 -  
916 - String gJwpointsArray []= null;  
917 -  
918 - if(gJwpoints!=null) {  
919 -  
920 - gJwpointsArray = gJwpoints.split(" ");  
921 -  
922 - }*/  
923 -  
924 // 方向 731 // 方向
925 Integer directions = map.get("directions").equals("") ? null : Integer.parseInt(map.get("directions").toString()); 732 Integer directions = map.get("directions").equals("") ? null : Integer.parseInt(map.get("directions").toString());
926 -  
927 // 距离 733 // 距离
928 Double distances = map.get("distances").equals("") ? null : Double.parseDouble(map.get("distances").toString()); 734 Double distances = map.get("distances").equals("") ? null : Double.parseDouble(map.get("distances").toString());
929 -  
930 // 时间 735 // 时间
931 Double toTime = map.get("toTime").equals("") ? null : Double.parseDouble(map.get("toTime").toString()); 736 Double toTime = map.get("toTime").equals("") ? null : Double.parseDouble(map.get("toTime").toString());
932 -  
933 - /*// WGS经纬度  
934 - Float gLonx = Float.parseFloat(gJwpointsArray[0]);  
935 -  
936 - // WGS纬度  
937 - Float gLaty = Float.parseFloat(gJwpointsArray[1]);*/  
938 -  
939 // 城建坐标经度 737 // 城建坐标经度
940 Float x = map.get("x").equals("") ? null : Float.parseFloat(map.get("x").toString()); 738 Float x = map.get("x").equals("") ? null : Float.parseFloat(map.get("x").toString());
941 -  
942 // 城建坐标纬度 739 // 城建坐标纬度
943 Float y = map.get("y").equals("") ? null : Float.parseFloat(map.get("y").toString()); 740 Float y = map.get("y").equals("") ? null : Float.parseFloat(map.get("y").toString());
944 -  
945 - // 多边形WGS坐标点集合  
946 - // String gPloygonGrid = map.get("gPolygonGrid").equals("") ? "" : map.get("gPolygonGrid").toString();  
947 -  
948 // 多边形原坐标点集合 741 // 多边形原坐标点集合
949 String bPloygonGrid = map.get("bPolygonGrid").equals("") ? "" : map.get("bPolygonGrid").toString(); 742 String bPloygonGrid = map.get("bPolygonGrid").equals("") ? "" : map.get("bPolygonGrid").toString();
950 -  
951 // 多边形WGS坐标点集合 743 // 多边形WGS坐标点集合
952 String gPloygonGrid =""; 744 String gPloygonGrid ="";
953 -  
954 if(!bPloygonGrid.equals("")) { 745 if(!bPloygonGrid.equals("")) {
955 -  
956 String bPloygonGridArray[] = bPloygonGrid.split(","); 746 String bPloygonGridArray[] = bPloygonGrid.split(",");
957 -  
958 int bLen_ = bPloygonGridArray.length; 747 int bLen_ = bPloygonGridArray.length;
959 -  
960 for(int b = 0 ;b<bLen_;b++) { 748 for(int b = 0 ;b<bLen_;b++) {
961 -  
962 String tempArray[]= bPloygonGridArray[b].split(" "); 749 String tempArray[]= bPloygonGridArray[b].split(" ");
963 -  
964 Location resultPoint = FromBDPointToWGSPoint(tempArray[0],tempArray[1]); 750 Location resultPoint = FromBDPointToWGSPoint(tempArray[0],tempArray[1]);
965 -  
966 if(b==0) { 751 if(b==0) {
967 -  
968 gPloygonGrid = String.valueOf(resultPoint.getLng()) + " " + String.valueOf(resultPoint.getLat()); 752 gPloygonGrid = String.valueOf(resultPoint.getLng()) + " " + String.valueOf(resultPoint.getLat());
969 -  
970 }else { 753 }else {
971 -  
972 gPloygonGrid = gPloygonGrid + ',' + String.valueOf(resultPoint.getLng()) + " " + String.valueOf(resultPoint.getLat()); 754 gPloygonGrid = gPloygonGrid + ',' + String.valueOf(resultPoint.getLng()) + " " + String.valueOf(resultPoint.getLat());
973 -  
974 } 755 }
975 -  
976 } 756 }
977 -  
978 } 757 }
979 -  
980 - /* bPloygonGrid = "POLYGON((" + bPloygonGrid +"))";  
981 -  
982 - gPloygonGrid = "POLYGON((" + gPloygonGrid +"))";*/  
983 -  
984 // 是否撤销 758 // 是否撤销
985 Integer destroy = map.get("destroy").equals("") ? null : Integer.parseInt(map.get("destroy").toString()); 759 Integer destroy = map.get("destroy").equals("") ? null : Integer.parseInt(map.get("destroy").toString());
986 -  
987 // 圆半径 760 // 圆半径
988 Integer radius = map.get("radius").equals("") ? null : Integer.parseInt(map.get("radius").toString()); 761 Integer radius = map.get("radius").equals("") ? null : Integer.parseInt(map.get("radius").toString());
989 -  
990 // 图形类型 762 // 图形类型
991 String shapesType = map.get("shapesType").equals("") ? "" : map.get("shapesType").toString(); 763 String shapesType = map.get("shapesType").equals("") ? "" : map.get("shapesType").toString();
992 -  
993 // 版本 764 // 版本
994 Integer versions = map.get("versions").equals("") ? null : Integer.parseInt(map.get("versions").toString()); 765 Integer versions = map.get("versions").equals("") ? null : Integer.parseInt(map.get("versions").toString());
995 -  
996 // 说明 766 // 说明
997 String descriptions = map.get("descriptions").equals("") ? "" : map.get("descriptions").toString(); 767 String descriptions = map.get("descriptions").equals("") ? "" : map.get("descriptions").toString();
998 -  
999 // 创建人 768 // 创建人
1000 Integer createBy = map.get("createBy").equals("") ? null : Integer.parseInt(map.get("createBy").toString()); 769 Integer createBy = map.get("createBy").equals("") ? null : Integer.parseInt(map.get("createBy").toString());
1001 -  
1002 // 修改人 770 // 修改人
1003 Integer updateBy = map.get("updateBy").equals("") ? null : Integer.parseInt(map.get("updateBy").toString()); 771 Integer updateBy = map.get("updateBy").equals("") ? null : Integer.parseInt(map.get("updateBy").toString());
1004 -  
1005 // 线路ID 772 // 线路ID
1006 int line = map.get("lineId").equals("") ? 0 : Integer.parseInt(map.get("lineId").toString()); 773 int line = map.get("lineId").equals("") ? 0 : Integer.parseInt(map.get("lineId").toString());
1007 -  
1008 // 线路信息 774 // 线路信息
1009 Line resultLine = lineRepository.findOne(line); 775 Line resultLine = lineRepository.findOne(line);
1010 -  
1011 // 站点路由序号 776 // 站点路由序号
1012 String stationRouteCodeStr = map.get("stationRouteCode").equals("") ? "" : map.get("stationRouteCode").toString(); 777 String stationRouteCodeStr = map.get("stationRouteCode").equals("") ? "" : map.get("stationRouteCode").toString();
1013 -  
1014 // 站点类型 778 // 站点类型
1015 String stationMark = map.get("stationMark").equals("") ? "" : map.get("stationMark").toString(); 779 String stationMark = map.get("stationMark").equals("") ? "" : map.get("stationMark").toString();
1016 -  
1017 Integer stationRouteCode = null; 780 Integer stationRouteCode = null;
1018 -  
1019 if(stationRouteCodeStr!="") { 781 if(stationRouteCodeStr!="") {
1020 -  
1021 String stationRouteCodeArray [] = stationRouteCodeStr.split("_"); 782 String stationRouteCodeArray [] = stationRouteCodeStr.split("_");
1022 -  
1023 stationRouteCode = Integer.parseInt(stationRouteCodeArray[0].toString())+1; 783 stationRouteCode = Integer.parseInt(stationRouteCodeArray[0].toString())+1;
1024 -  
1025 -  
1026 }else { 784 }else {
1027 -  
1028 stationRouteCode = 100; 785 stationRouteCode = 100;
1029 -  
1030 } 786 }
1031 -  
1032 if(bPloygonGrid.equals("")) 787 if(bPloygonGrid.equals(""))
1033 bPloygonGrid = null; 788 bPloygonGrid = null;
1034 else 789 else
1035 bPloygonGrid = "POLYGON((" + bPloygonGrid +"))"; 790 bPloygonGrid = "POLYGON((" + bPloygonGrid +"))";
1036 -  
1037 if(gPloygonGrid.equals("")) 791 if(gPloygonGrid.equals(""))
1038 gPloygonGrid = null; 792 gPloygonGrid = null;
1039 else 793 else
1040 gPloygonGrid = "POLYGON((" + gPloygonGrid +"))"; 794 gPloygonGrid = "POLYGON((" + gPloygonGrid +"))";
1041 -  
1042 // 保存站点 795 // 保存站点
1043 repository.stationSave(stationCod, stationName, roadCoding, dbType, bJwpoints, 796 repository.stationSave(stationCod, stationName, roadCoding, dbType, bJwpoints,
1044 -  
1045 gLonx, gLaty, x, y, gPloygonGrid,bPloygonGrid, destroy, radius, 797 gLonx, gLaty, x, y, gPloygonGrid,bPloygonGrid, destroy, radius,
1046 -  
1047 shapesType, versions, descriptions, createBy, updateBy,stationId); 798 shapesType, versions, descriptions, createBy, updateBy,stationId);
1048 -  
1049 -  
1050 -  
1051 -  
1052 Station station = repository.findOne(stationId); 799 Station station = repository.findOne(stationId);
1053 -  
1054 StationRoute arg0 = new StationRoute(); 800 StationRoute arg0 = new StationRoute();
1055 -  
1056 // 线路 801 // 线路
1057 arg0.setLine(resultLine); 802 arg0.setLine(resultLine);
1058 -  
1059 arg0.setLineCode(resultLine.getLineCode()); 803 arg0.setLineCode(resultLine.getLineCode());
1060 -  
1061 // 站点 804 // 站点
1062 arg0.setStation(station); 805 arg0.setStation(station);
1063 -  
1064 // 站点路由名称 806 // 站点路由名称
1065 arg0.setStationName(stationName); 807 arg0.setStationName(stationName);
1066 -  
1067 // 站点路由编码 808 // 站点路由编码
1068 arg0.setStationCode(stationCod); 809 arg0.setStationCode(stationCod);
1069 -  
1070 // 站点路由序号 810 // 站点路由序号
1071 arg0.setStationRouteCode(stationRouteCode); 811 arg0.setStationRouteCode(stationRouteCode);
1072 -  
1073 // 站点路由类型 812 // 站点路由类型
1074 arg0.setStationMark(stationMark); 813 arg0.setStationMark(stationMark);
1075 -  
1076 // 站点路由站点方向 814 // 站点路由站点方向
1077 arg0.setDirections(directions); 815 arg0.setDirections(directions);
1078 -  
1079 // 站点路由到站距离 816 // 站点路由到站距离
1080 arg0.setDistances(distances); 817 arg0.setDistances(distances);
1081 -  
1082 // 站点路由到站时间 818 // 站点路由到站时间
1083 arg0.setToTime(toTime); 819 arg0.setToTime(toTime);
1084 -  
1085 // 站点版本号 820 // 站点版本号
1086 arg0.setVersions(versions); 821 arg0.setVersions(versions);
1087 -  
1088 // 是否撤销 822 // 是否撤销
1089 arg0.setDestroy(destroy); 823 arg0.setDestroy(destroy);
1090 -  
1091 // 站点路由说明 824 // 站点路由说明
1092 arg0.setDescriptions(descriptions); 825 arg0.setDescriptions(descriptions);
1093 -  
1094 routeRepository.save(arg0); 826 routeRepository.save(arg0);
1095 -  
1096 resultMap.put("status", ResponseCode.SUCCESS); 827 resultMap.put("status", ResponseCode.SUCCESS);
1097 -  
1098 } catch (Exception e) { 828 } catch (Exception e) {
1099 -  
1100 resultMap.put("status", ResponseCode.ERROR); 829 resultMap.put("status", ResponseCode.ERROR);
1101 -  
1102 logger.error("save erro.", e); 830 logger.error("save erro.", e);
1103 -  
1104 } 831 }
1105 -  
1106 return resultMap; 832 return resultMap;
1107 } 833 }
1108 834
@@ -1373,101 +1099,64 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem @@ -1373,101 +1099,64 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
1373 1099
1374 @Override 1100 @Override
1375 public Map<String, Object> manualSave(Map<String, Object> map) { 1101 public Map<String, Object> manualSave(Map<String, Object> map) {
1376 -  
1377 Map<String, Object> resultMap = new HashMap<String,Object>(); 1102 Map<String, Object> resultMap = new HashMap<String,Object>();
1378 -  
1379 try { 1103 try {
1380 -  
1381 // 站点信息字符传 1104 // 站点信息字符传
1382 String stationJSON = map.get("stationJSON").equals("") ? "" : map.get("stationJSON").toString(); 1105 String stationJSON = map.get("stationJSON").equals("") ? "" : map.get("stationJSON").toString();
1383 -  
1384 // 路段信息字符串 1106 // 路段信息字符串
1385 String sectionJSON = map.get("sectionJSON").equals("") ? "" : map.get("sectionJSON").toString(); 1107 String sectionJSON = map.get("sectionJSON").equals("") ? "" : map.get("sectionJSON").toString();
1386 -  
1387 // 方向 1108 // 方向
1388 int directions = Integer.parseInt(map.get("directions").toString()); 1109 int directions = Integer.parseInt(map.get("directions").toString());
1389 -  
1390 // 是否撤销 1110 // 是否撤销
1391 int destroy = map.get("destroy").equals("") ? 0 : Integer.parseInt(map.get("destroy").toString()); 1111 int destroy = map.get("destroy").equals("") ? 0 : Integer.parseInt(map.get("destroy").toString());
1392 -  
1393 // 版本 1112 // 版本
1394 int versions = map.get("versions").equals("") ? 0 : Integer.parseInt(map.get("versions").toString()); 1113 int versions = map.get("versions").equals("") ? 0 : Integer.parseInt(map.get("versions").toString());
1395 -  
1396 // 坐标类型 1114 // 坐标类型
1397 String dbType = map.get("dbType").equals("") ? "" : map.get("dbType").toString(); 1115 String dbType = map.get("dbType").equals("") ? "" : map.get("dbType").toString();
1398 -  
1399 // 限速 1116 // 限速
1400 String speedLimitStr = map.get("speedLimit").equals("") ? "" : map.get("speedLimit").toString(); 1117 String speedLimitStr = map.get("speedLimit").equals("") ? "" : map.get("speedLimit").toString();
1401 -  
1402 // 线路ID 1118 // 线路ID
1403 int lineId = map.get("lineId").equals("") ? 0 : Integer.parseInt(map.get("lineId").toString()); 1119 int lineId = map.get("lineId").equals("") ? 0 : Integer.parseInt(map.get("lineId").toString());
1404 -  
1405 // 半径 1120 // 半径
1406 int radius = map.get("radius").equals("") ? 0 : Integer.parseInt(map.get("radius").toString()); 1121 int radius = map.get("radius").equals("") ? 0 : Integer.parseInt(map.get("radius").toString());
1407 -  
1408 // 图形类型 1122 // 图形类型
1409 String shapesType = map.get("shapesType").equals("") ? "" : map.get("shapesType").toString(); 1123 String shapesType = map.get("shapesType").equals("") ? "" : map.get("shapesType").toString();
1410 -  
1411 // 线路信息 1124 // 线路信息
1412 Line resultLine = lineRepository.findOne(lineId); 1125 Line resultLine = lineRepository.findOne(lineId);
1413 -  
1414 // 路段距离 1126 // 路段距离
1415 Double sectionDistance = 0.0d; 1127 Double sectionDistance = 0.0d;
1416 -  
1417 // 路段时长 1128 // 路段时长
1418 Double sectionDuration = 0.0d; 1129 Double sectionDuration = 0.0d;
1419 -  
1420 // 里程(上或者下) 1130 // 里程(上或者下)
1421 double sumUpOrDownMileage = 0.0d; 1131 double sumUpOrDownMileage = 0.0d;
1422 -  
1423 Map<String, Object> resultSaveMapm = new HashMap<String,Object>(); 1132 Map<String, Object> resultSaveMapm = new HashMap<String,Object>();
1424 -  
1425 String baseRes = map.get("baseRes").equals("") ? "" : map.get("baseRes").toString(); 1133 String baseRes = map.get("baseRes").equals("") ? "" : map.get("baseRes").toString();
1426 -  
1427 if(!stationJSON.equals("")) { 1134 if(!stationJSON.equals("")) {
1428 -  
1429 // 保存站点与站点路由信息 1135 // 保存站点与站点路由信息
1430 resultSaveMapm = savaStationAndStationRouteInfo( stationJSON, sectionDistance, sectionDuration, dbType,radius, shapesType, destroy, versions, sumUpOrDownMileage, directions, resultLine,baseRes); 1136 resultSaveMapm = savaStationAndStationRouteInfo( stationJSON, sectionDistance, sectionDuration, dbType,radius, shapesType, destroy, versions, sumUpOrDownMileage, directions, resultLine,baseRes);
1431 -  
1432 } 1137 }
1433 -  
1434 // 路段长度 1138 // 路段长度
1435 sectionDistance = Double.valueOf(resultSaveMapm.get("sectionDistance").toString()); 1139 sectionDistance = Double.valueOf(resultSaveMapm.get("sectionDistance").toString());
1436 -  
1437 // 路段时长 1140 // 路段时长
1438 sectionDuration = Double.valueOf(resultSaveMapm.get("sectionDuration").toString()); 1141 sectionDuration = Double.valueOf(resultSaveMapm.get("sectionDuration").toString());
1439 -  
1440 // 如果路段信息JSON字符串不为空 1142 // 如果路段信息JSON字符串不为空
1441 if(!sectionJSON.equals("")) { 1143 if(!sectionJSON.equals("")) {
1442 -  
1443 manualSaveSectionAndSectionRoute(sectionJSON, speedLimitStr, sectionDistance, sectionDuration, dbType, versions, resultLine, destroy, directions); 1144 manualSaveSectionAndSectionRoute(sectionJSON, speedLimitStr, sectionDistance, sectionDuration, dbType, versions, resultLine, destroy, directions);
1444 -  
1445 } 1145 }
1446 -  
1447 // 里程 1146 // 里程
1448 sumUpOrDownMileage = Double.valueOf(resultSaveMapm.get("sumUpOrDownMileage").toString()); 1147 sumUpOrDownMileage = Double.valueOf(resultSaveMapm.get("sumUpOrDownMileage").toString());
1449 -  
1450 BigDecimal s = new BigDecimal(sumUpOrDownMileage); 1148 BigDecimal s = new BigDecimal(sumUpOrDownMileage);
1451 -  
1452 sumUpOrDownMileage = s.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue(); 1149 sumUpOrDownMileage = s.setScale(2, BigDecimal.ROUND_HALF_UP).doubleValue();
1453 -  
1454 // 更新里程 1150 // 更新里程
1455 // updateLineInfoUpOrDownMileage( resultLine , directions, sumUpOrDownMileage); 1151 // updateLineInfoUpOrDownMileage( resultLine , directions, sumUpOrDownMileage);
1456 -  
1457 if(directions==0) { 1152 if(directions==0) {
1458 -  
1459 // lineUpdateStationName(resultLine); 1153 // lineUpdateStationName(resultLine);
1460 -  
1461 } 1154 }
1462 -  
1463 resultMap.put("status", ResponseCode.SUCCESS); 1155 resultMap.put("status", ResponseCode.SUCCESS);
1464 - 1156 + resultMap.put("stationData", resultSaveMapm.get("stationdata"));
1465 } catch (Exception e) { 1157 } catch (Exception e) {
1466 -  
1467 resultMap.put("status", ResponseCode.ERROR); 1158 resultMap.put("status", ResponseCode.ERROR);
1468 -  
1469 logger.error("save erro.", e); 1159 logger.error("save erro.", e);
1470 -  
1471 } 1160 }
1472 1161
1473 return resultMap; 1162 return resultMap;
@@ -1478,103 +1167,61 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem @@ -1478,103 +1167,61 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
1478 double sectionTime,String dbType,Integer versions,Line resultLine, 1167 double sectionTime,String dbType,Integer versions,Line resultLine,
1479 1168
1480 Integer destroy,Integer directions) { 1169 Integer destroy,Integer directions) {
1481 -  
1482 // 转换成JSON数组 1170 // 转换成JSON数组
1483 JSONArray sectionsArray = JSONArray.parseArray(sectionJSON); 1171 JSONArray sectionsArray = JSONArray.parseArray(sectionJSON);
1484 -  
1485 // 遍历 1172 // 遍历
1486 for(int s = 0 ;s<sectionsArray.size();s++) { 1173 for(int s = 0 ;s<sectionsArray.size();s++) {
1487 -  
1488 // 站点名称 1174 // 站点名称
1489 String sectionName = sectionsArray.getJSONObject(s).equals("") ? "" : sectionsArray.getJSONObject(s).get("sectionName").toString(); 1175 String sectionName = sectionsArray.getJSONObject(s).equals("") ? "" : sectionsArray.getJSONObject(s).get("sectionName").toString();
1490 -  
1491 String pointsStr = sectionsArray.getJSONObject(s).equals("") ? "" : sectionsArray.getJSONObject(s).get("points").toString(); 1176 String pointsStr = sectionsArray.getJSONObject(s).equals("") ? "" : sectionsArray.getJSONObject(s).get("points").toString();
1492 -  
1493 // 原始线状图形坐标集合 1177 // 原始线状图形坐标集合
1494 String sectionsBpoints = ""; 1178 String sectionsBpoints = "";
1495 -  
1496 // WGS线状图形坐标集合 1179 // WGS线状图形坐标集合
1497 String sectionsWJPpoints = ""; 1180 String sectionsWJPpoints = "";
1498 -  
1499 if(!pointsStr.equals("")){ 1181 if(!pointsStr.equals("")){
1500 -  
1501 JSONArray pointsArray = JSONArray.parseArray(pointsStr); 1182 JSONArray pointsArray = JSONArray.parseArray(pointsStr);
1502 -  
1503 for(int p =0;p<pointsArray.size();p++){ 1183 for(int p =0;p<pointsArray.size();p++){
1504 -  
1505 String pointsLngStr = pointsArray.getJSONObject(p).get("lng").toString(); 1184 String pointsLngStr = pointsArray.getJSONObject(p).get("lng").toString();
1506 -  
1507 String pointsLatStr = pointsArray.getJSONObject(p).get("lat").toString(); 1185 String pointsLatStr = pointsArray.getJSONObject(p).get("lat").toString();
1508 -  
1509 Location resultPoint = FromBDPointToWGSPoint(pointsLngStr,pointsLatStr); 1186 Location resultPoint = FromBDPointToWGSPoint(pointsLngStr,pointsLatStr);
1510 -  
1511 String WGSLngStr = String.valueOf(resultPoint.getLng()); 1187 String WGSLngStr = String.valueOf(resultPoint.getLng());
1512 -  
1513 String WGSLatStr = String.valueOf(resultPoint.getLat()); 1188 String WGSLatStr = String.valueOf(resultPoint.getLat());
1514 -  
1515 if(p==pointsArray.size()-1){ 1189 if(p==pointsArray.size()-1){
1516 -  
1517 sectionsBpoints = sectionsBpoints + pointsLngStr + " " + pointsLatStr; 1190 sectionsBpoints = sectionsBpoints + pointsLngStr + " " + pointsLatStr;
1518 -  
1519 sectionsWJPpoints = sectionsWJPpoints + WGSLngStr + " " + WGSLatStr; 1191 sectionsWJPpoints = sectionsWJPpoints + WGSLngStr + " " + WGSLatStr;
1520 -  
1521 // sectionsWJPpoints = sectionsWJPpoints + pointsArray.getJSONObject(p).getJSONObject("WGSpotion").get("Lng") + " " +pointsArray.getJSONObject(p).getJSONObject("WGSpotion").get("Lat"); 1192 // sectionsWJPpoints = sectionsWJPpoints + pointsArray.getJSONObject(p).getJSONObject("WGSpotion").get("Lng") + " " +pointsArray.getJSONObject(p).getJSONObject("WGSpotion").get("Lat");
1522 -  
1523 }else { 1193 }else {
1524 -  
1525 sectionsBpoints = sectionsBpoints + pointsArray.getJSONObject(p).get("lng").toString() + " " +pointsArray.getJSONObject(p).get("lat").toString()+","; 1194 sectionsBpoints = sectionsBpoints + pointsArray.getJSONObject(p).get("lng").toString() + " " +pointsArray.getJSONObject(p).get("lat").toString()+",";
1526 -  
1527 sectionsWJPpoints = sectionsWJPpoints + WGSLngStr + " " + WGSLatStr + ","; 1195 sectionsWJPpoints = sectionsWJPpoints + WGSLngStr + " " + WGSLatStr + ",";
1528 -  
1529 // sectionsWJPpoints = sectionsWJPpoints + pointsArray.getJSONObject(p).getJSONObject("WGSpotion").get("Lng") + " " +pointsArray.getJSONObject(p).getJSONObject("WGSpotion").get("Lat") +","; 1196 // sectionsWJPpoints = sectionsWJPpoints + pointsArray.getJSONObject(p).getJSONObject("WGSpotion").get("Lng") + " " +pointsArray.getJSONObject(p).getJSONObject("WGSpotion").get("Lat") +",";
1530 -  
1531 -  
1532 } 1197 }
1533 -  
1534 } 1198 }
1535 -  
1536 } 1199 }
1537 -  
1538 long sectionMaxId = GetUIDAndCode.getSectionId(); 1200 long sectionMaxId = GetUIDAndCode.getSectionId();
1539 -  
1540 String sectionCode = String.valueOf(sectionMaxId); 1201 String sectionCode = String.valueOf(sectionMaxId);
1541 -  
1542 int sectionId = (int) (sectionMaxId); 1202 int sectionId = (int) (sectionMaxId);
1543 -  
1544 // 交出路 1203 // 交出路
1545 String crosesRoad = ""; 1204 String crosesRoad = "";
1546 -  
1547 // 终止节点 1205 // 终止节点
1548 String endNode = ""; 1206 String endNode = "";
1549 -  
1550 // 开始节点 1207 // 开始节点
1551 String startNode = ""; 1208 String startNode = "";
1552 -  
1553 // 中间节点 1209 // 中间节点
1554 String middleNode = ""; 1210 String middleNode = "";
1555 -  
1556 // WGS坐标点集合 1211 // WGS坐标点集合
1557 String gsectionVector = "LINESTRING(" + sectionsWJPpoints +")"; 1212 String gsectionVector = "LINESTRING(" + sectionsWJPpoints +")";
1558 -  
1559 // 原坐标点集合 1213 // 原坐标点集合
1560 String bsectionVector = "LINESTRING(" + sectionsBpoints + ")"; 1214 String bsectionVector = "LINESTRING(" + sectionsBpoints + ")";
1561 -  
1562 // 城建坐标点集合 1215 // 城建坐标点集合
1563 String csectionVector = ""; 1216 String csectionVector = "";
1564 -  
1565 // 路段类型 1217 // 路段类型
1566 String sectionType = ""; 1218 String sectionType = "";
1567 -  
1568 // 道路编码 1219 // 道路编码
1569 String roadCoding = ""; 1220 String roadCoding = "";
1570 -  
1571 // 限速 1221 // 限速
1572 double speedLimit = Double.parseDouble(speedLimitStr); 1222 double speedLimit = Double.parseDouble(speedLimitStr);
1573 -  
1574 // 说明 1223 // 说明
1575 String descriptions = ""; 1224 String descriptions = "";
1576 -  
1577 -  
1578 sectionRepository.systemSave(sectionCode, sectionName, crosesRoad, endNode, startNode, 1225 sectionRepository.systemSave(sectionCode, sectionName, crosesRoad, endNode, startNode,
1579 1226
1580 middleNode, gsectionVector, bsectionVector, sectionType, csectionVector, 1227 middleNode, gsectionVector, bsectionVector, sectionType, csectionVector,
@@ -1582,37 +1229,24 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem @@ -1582,37 +1229,24 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
1582 roadCoding, sectionDistance, sectionTime, dbType, speedLimit, 1229 roadCoding, sectionDistance, sectionTime, dbType, speedLimit,
1583 1230
1584 descriptions, versions,sectionId); 1231 descriptions, versions,sectionId);
1585 -  
1586 -  
1587 -  
1588 Section section = sectionRepository.findOne(Integer.parseInt(sectionCode)); 1232 Section section = sectionRepository.findOne(Integer.parseInt(sectionCode));
1589 -  
1590 // 路段路由 1233 // 路段路由
1591 SectionRoute sectionRoute = new SectionRoute(); 1234 SectionRoute sectionRoute = new SectionRoute();
1592 -  
1593 // 路段序号 1235 // 路段序号
1594 sectionRoute.setSectionrouteCode((s+1)*100); 1236 sectionRoute.setSectionrouteCode((s+1)*100);
1595 -  
1596 // 线路编码 1237 // 线路编码
1597 sectionRoute.setLineCode(resultLine.getLineCode()); 1238 sectionRoute.setLineCode(resultLine.getLineCode());
1598 -  
1599 // 路段ID 1239 // 路段ID
1600 sectionRoute.setSection(section); 1240 sectionRoute.setSection(section);
1601 -  
1602 // 线路ID 1241 // 线路ID
1603 sectionRoute.setLine(resultLine); 1242 sectionRoute.setLine(resultLine);
1604 -  
1605 // 路段编码 1243 // 路段编码
1606 sectionRoute.setSectionCode(sectionCode); 1244 sectionRoute.setSectionCode(sectionCode);
1607 -  
1608 // 版本 1245 // 版本
1609 sectionRoute.setVersions(versions); 1246 sectionRoute.setVersions(versions);
1610 -  
1611 sectionRoute.setDestroy(destroy); 1247 sectionRoute.setDestroy(destroy);
1612 -  
1613 // 方向 1248 // 方向
1614 sectionRoute.setDirections(directions); 1249 sectionRoute.setDirections(directions);
1615 -  
1616 sectionRouteRepository.save(sectionRoute); 1250 sectionRouteRepository.save(sectionRoute);
1617 } 1251 }
1618 1252
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -642,7 +642,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -642,7 +642,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
642 642
643 //计算里程和班次数,并放入Map里 643 //计算里程和班次数,并放入Map里
644 map = new HashMap<String, Object>(); 644 map = new HashMap<String, Object>();
645 - map.put("jhlc", culateMieageService.culateJhgl(scheduleRealInfos)); 645 + map.put("jhlc",Arith.add(culateMieageService.culateJhgl(scheduleRealInfos),culateMieageService.culateJhJccgl(scheduleRealInfos)));
646 map.put("remMileage",culateMieageService.culateLbgl(lists)); 646 map.put("remMileage",culateMieageService.culateLbgl(lists));
647 map.put("addMileage", culateMieageService.culateLjgl(lists)); 647 map.put("addMileage", culateMieageService.culateLjgl(lists));
648 double yygl=Arith.add(culateMieageService.culateSjgl(lists),culateMieageService.culateLjgl(lists)); 648 double yygl=Arith.add(culateMieageService.culateSjgl(lists),culateMieageService.culateLjgl(lists));
@@ -1433,7 +1433,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1433,7 +1433,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1433 double jccgl=culateService.culateJccgl(lists); 1433 double jccgl=culateService.culateJccgl(lists);
1434 double ljgl=culateService.culateLjgl(lists); 1434 double ljgl=culateService.culateLjgl(lists);
1435 1435
1436 - map.put("jhlc", culateService.culateJhgl(list)); //计划里程 1436 + map.put("jhlc", Arith.add(culateService.culateJhgl(list),culateService.culateJhJccgl(list))); //计划里程
1437 map.put("remMileage", culateService.culateLbgl(list)); //烂班公里 1437 map.put("remMileage", culateService.culateLbgl(list)); //烂班公里
1438 map.put("addMileage", ljgl); //临加公里 1438 map.put("addMileage", ljgl); //临加公里
1439 map.put("yygl",Arith.add(sjgl,ljgl)); //实际公里 1439 map.put("yygl",Arith.add(sjgl,ljgl)); //实际公里
@@ -3906,7 +3906,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3906,7 +3906,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3906 3906
3907 //计算里程和班次数,并放入Map里 3907 //计算里程和班次数,并放入Map里
3908 map = new HashMap<String, Object>(); 3908 map = new HashMap<String, Object>();
3909 - map.put("jhlc", culateMieageService.culateJhgl(scheduleRealInfos)); 3909 + map.put("jhlc", Arith.add(culateMieageService.culateJhgl(scheduleRealInfos),culateMieageService.culateJhJccgl(scheduleRealInfos)));
3910 map.put("remMileage",culateMieageService.culateLbgl(lists)); 3910 map.put("remMileage",culateMieageService.culateLbgl(lists));
3911 map.put("addMileage", culateMieageService.culateLjgl(lists)); 3911 map.put("addMileage", culateMieageService.culateLjgl(lists));
3912 double yygl=Arith.add(culateMieageService.culateSjgl(lists),culateMieageService.culateLjgl(lists)); 3912 double yygl=Arith.add(culateMieageService.culateSjgl(lists),culateMieageService.culateLjgl(lists));
src/main/java/com/bsth/util/GetUIDAndCode.java
@@ -26,80 +26,47 @@ import com.bsth.repository.StationRepository; @@ -26,80 +26,47 @@ import com.bsth.repository.StationRepository;
26 */ 26 */
27 @Component 27 @Component
28 public class GetUIDAndCode { 28 public class GetUIDAndCode {
29 -  
30 @Autowired 29 @Autowired
31 private LineRepository lineRepository; 30 private LineRepository lineRepository;
32 -  
33 @Autowired 31 @Autowired
34 private StationRepository stationRepository; 32 private StationRepository stationRepository;
35 -  
36 @Autowired 33 @Autowired
37 private SectionRepository sectionRepository; 34 private SectionRepository sectionRepository;
38 -  
39 @Autowired 35 @Autowired
40 private CarParkRepository carParkRepository; 36 private CarParkRepository carParkRepository;
41 -  
42 /** 线路ID */ 37 /** 线路ID */
43 private static long lineId = 0L; 38 private static long lineId = 0L;
44 -  
45 /** 站点ID */ 39 /** 站点ID */
46 private static long stationId = 0L; 40 private static long stationId = 0L;
47 -  
48 /** 路段ID */ 41 /** 路段ID */
49 private static long sectionId = 0L; 42 private static long sectionId = 0L;
50 -  
51 /** 停车长ID*/ 43 /** 停车长ID*/
52 private static long carParkId = 0L; 44 private static long carParkId = 0L;
53 -  
54 public GetUIDAndCode() { 45 public GetUIDAndCode() {
55 -  
56 new Timer().schedule(new TimerTask() { 46 new Timer().schedule(new TimerTask() {
57 -  
58 @Override 47 @Override
59 public void run() { 48 public void run() {
60 -  
61 lineId = lineRepository.selectMaxIdToLineCode(); 49 lineId = lineRepository.selectMaxIdToLineCode();
62 -  
63 stationId = stationRepository.stationMaxId(); 50 stationId = stationRepository.stationMaxId();
64 -  
65 sectionId = sectionRepository.sectionMaxId(); 51 sectionId = sectionRepository.sectionMaxId();
66 -  
67 carParkId = carParkRepository.carParkMaxId(); 52 carParkId = carParkRepository.carParkMaxId();
68 -  
69 } 53 }
70 }, 1000 * 30); 54 }, 1000 * 30);
71 -  
72 } 55 }
73 -  
74 public static synchronized long getLineId() { 56 public static synchronized long getLineId() {
75 -  
76 ++lineId; 57 ++lineId;
77 -  
78 return lineId; 58 return lineId;
79 -  
80 } 59 }
81 -  
82 public static synchronized long getStationId() { 60 public static synchronized long getStationId() {
83 -  
84 ++stationId; 61 ++stationId;
85 -  
86 return stationId; 62 return stationId;
87 } 63 }
88 -  
89 public static synchronized long getSectionId() { 64 public static synchronized long getSectionId() {
90 -  
91 ++sectionId; 65 ++sectionId;
92 -  
93 return sectionId; 66 return sectionId;
94 -  
95 } 67 }
96 -  
97 public static synchronized long getCarParkId() { 68 public static synchronized long getCarParkId() {
98 -  
99 ++carParkId; 69 ++carParkId;
100 -  
101 return carParkId; 70 return carParkId;
102 -  
103 } 71 }
104 -  
105 -} 72 +}
106 \ No newline at end of file 73 \ No newline at end of file
src/main/resources/datatools/ktrs/employeesDataInput.ktr
1 -<?xml version="1.0" encoding="UTF-8"?>  
2 -<transformation>  
3 - <info>  
4 - <name>&#x4eba;&#x5458;&#x4fe1;&#x606f;&#x5bfc;&#x5165;</name>  
5 - <description>&#x4eba;&#x5458;&#x57fa;&#x7840;&#x4fe1;&#x606f;&#x5bfc;&#x5165;</description>  
6 - <extended_description>&#x4eba;&#x5458;&#x57fa;&#x7840;&#x4fe1;&#x606f;</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>erroroutputdir</name>  
14 - <default_value/>  
15 - <description>ktr step&#x914d;&#x7f6e;&#x7684;&#x9519;&#x8bef;&#x8f93;&#x51fa;&#x76ee;&#x5f55;</description>  
16 - </parameter>  
17 - <parameter>  
18 - <name>filepath</name>  
19 - <default_value/>  
20 - <description>&#x5f85;&#x5904;&#x7406;&#x5bfc;&#x5165;&#x7684;excel&#x6587;&#x4ef6;</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>2016&#x2f;06&#x2f;29 10&#x3a;18&#x3a;56.974</created_date>  
81 - <modified_user>-</modified_user>  
82 - <modified_date>2016&#x2f;06&#x2f;29 10&#x3a;18&#x3a;56.974</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>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_personnel</from><to>&#x9519;&#x8bef;&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>  
251 - <hop> <from>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</from><to>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</to><enabled>Y</enabled> </hop>  
252 - <hop> <from>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</from><to>&#x8fc7;&#x6ee4;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>  
253 - <hop> <from>&#x8fc7;&#x6ee4;&#x8bb0;&#x5f55;</from><to>JavaScript&#x4ee3;&#x7801;</to><enabled>Y</enabled> </hop>  
254 - <hop> <from>JavaScript&#x4ee3;&#x7801;</from><to>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_personnel</to><enabled>Y</enabled> </hop>  
255 - </order>  
256 - <step>  
257 - <name>JavaScript&#x4ee3;&#x7801;</name>  
258 - <type>ScriptValueMod</type>  
259 - <description/>  
260 - <distribute>Y</distribute>  
261 - <custom_distribution/>  
262 - <copies>1</copies>  
263 - <partitioning>  
264 - <method>none</method>  
265 - <schema_name/>  
266 - </partitioning>  
267 - <compatible>N</compatible>  
268 - <optimizationLevel>9</optimizationLevel>  
269 - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>  
270 - <jsScript_name>Script 1</jsScript_name>  
271 - <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var gh_calcu &#x3d; &#x6240;&#x5c5e;&#x516c;&#x53f8;&#x4ee3;&#x7801; &#x2b; &#x22;-&#x22; &#x2b; &#x5de5;&#x53f7;&#x3b;</jsScript_script>  
272 - </jsScript> </jsScripts> <fields> <field> <name>gh_calcu</name>  
273 - <rename>gh_calcu</rename>  
274 - <type>String</type>  
275 - <length>-1</length>  
276 - <precision>-1</precision>  
277 - <replace>N</replace>  
278 - </field> </fields> <cluster_schema/>  
279 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
280 - <xloc>362</xloc>  
281 - <yloc>190</yloc>  
282 - <draw>Y</draw>  
283 - </GUI>  
284 - </step>  
285 -  
286 - <step>  
287 - <name>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</name>  
288 - <type>ExcelInput</type>  
289 - <description/>  
290 - <distribute>Y</distribute>  
291 - <custom_distribution/>  
292 - <copies>1</copies>  
293 - <partitioning>  
294 - <method>none</method>  
295 - <schema_name/>  
296 - </partitioning>  
297 - <header>Y</header>  
298 - <noempty>Y</noempty>  
299 - <stoponempty>N</stoponempty>  
300 - <filefield/>  
301 - <sheetfield/>  
302 - <sheetrownumfield/>  
303 - <rownumfield/>  
304 - <sheetfield/>  
305 - <filefield/>  
306 - <limit>0</limit>  
307 - <encoding/>  
308 - <add_to_result_filenames>Y</add_to_result_filenames>  
309 - <accept_filenames>Y</accept_filenames>  
310 - <accept_field>filepath_</accept_field>  
311 - <accept_stepname>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</accept_stepname>  
312 - <file>  
313 - <name/>  
314 - <filemask/>  
315 - <exclude_filemask/>  
316 - <file_required>N</file_required>  
317 - <include_subfolders>N</include_subfolders>  
318 - </file>  
319 - <fields>  
320 - <field>  
321 - <name>&#x59d3;&#x540d;</name>  
322 - <type>String</type>  
323 - <length>-1</length>  
324 - <precision>-1</precision>  
325 - <trim_type>none</trim_type>  
326 - <repeat>N</repeat>  
327 - <format/>  
328 - <currency/>  
329 - <decimal/>  
330 - <group/>  
331 - </field>  
332 - <field>  
333 - <name>&#x5de5;&#x53f7;</name>  
334 - <type>String</type>  
335 - <length>-1</length>  
336 - <precision>-1</precision>  
337 - <trim_type>none</trim_type>  
338 - <repeat>N</repeat>  
339 - <format>&#x23;</format>  
340 - <currency/>  
341 - <decimal/>  
342 - <group/>  
343 - </field>  
344 - <field>  
345 - <name>&#x6240;&#x5c5e;&#x516c;&#x53f8;</name>  
346 - <type>String</type>  
347 - <length>-1</length>  
348 - <precision>-1</precision>  
349 - <trim_type>none</trim_type>  
350 - <repeat>N</repeat>  
351 - <format/>  
352 - <currency/>  
353 - <decimal/>  
354 - <group/>  
355 - </field>  
356 - <field>  
357 - <name>&#x6240;&#x5c5e;&#x516c;&#x53f8;&#x4ee3;&#x7801;</name>  
358 - <type>String</type>  
359 - <length>-1</length>  
360 - <precision>-1</precision>  
361 - <trim_type>none</trim_type>  
362 - <repeat>N</repeat>  
363 - <format/>  
364 - <currency/>  
365 - <decimal/>  
366 - <group/>  
367 - </field>  
368 - <field>  
369 - <name>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;</name>  
370 - <type>String</type>  
371 - <length>-1</length>  
372 - <precision>-1</precision>  
373 - <trim_type>none</trim_type>  
374 - <repeat>N</repeat>  
375 - <format/>  
376 - <currency/>  
377 - <decimal/>  
378 - <group/>  
379 - </field>  
380 - <field>  
381 - <name>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;&#x4ee3;&#x7801;</name>  
382 - <type>String</type>  
383 - <length>-1</length>  
384 - <precision>-1</precision>  
385 - <trim_type>none</trim_type>  
386 - <repeat>N</repeat>  
387 - <format/>  
388 - <currency/>  
389 - <decimal/>  
390 - <group/>  
391 - </field>  
392 - </fields>  
393 - <sheets>  
394 - <sheet>  
395 - <name>&#x5de5;&#x4f5c;&#x8868;1</name>  
396 - <startrow>0</startrow>  
397 - <startcol>0</startcol>  
398 - </sheet>  
399 - </sheets>  
400 - <strict_types>N</strict_types>  
401 - <error_ignored>N</error_ignored>  
402 - <error_line_skipped>N</error_line_skipped>  
403 - <bad_line_files_destination_directory/>  
404 - <bad_line_files_extension>warning</bad_line_files_extension>  
405 - <error_line_files_destination_directory/>  
406 - <error_line_files_extension>error</error_line_files_extension>  
407 - <line_number_files_destination_directory/>  
408 - <line_number_files_extension>line</line_number_files_extension>  
409 - <shortFileFieldName/>  
410 - <pathFieldName/>  
411 - <hiddenFieldName/>  
412 - <lastModificationTimeFieldName/>  
413 - <uriNameFieldName/>  
414 - <rootUriNameFieldName/>  
415 - <extensionFieldName/>  
416 - <sizeFieldName/>  
417 - <spreadsheet_type>JXL</spreadsheet_type>  
418 - <cluster_schema/>  
419 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
420 - <xloc>158</xloc>  
421 - <yloc>57</yloc>  
422 - <draw>Y</draw>  
423 - </GUI>  
424 - </step>  
425 -  
426 - <step>  
427 - <name>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_personnel</name>  
428 - <type>InsertUpdate</type>  
429 - <description/>  
430 - <distribute>Y</distribute>  
431 - <custom_distribution/>  
432 - <copies>1</copies>  
433 - <partitioning>  
434 - <method>none</method>  
435 - <schema_name/>  
436 - </partitioning>  
437 - <connection>bus_control_variable</connection>  
438 - <commit>5000</commit>  
439 - <update_bypassed>N</update_bypassed>  
440 - <lookup>  
441 - <schema/>  
442 - <table>bsth_c_personnel</table>  
443 - <key>  
444 - <name>gh_calcu</name>  
445 - <field>job_code</field>  
446 - <condition>&#x3d;</condition>  
447 - <name2/>  
448 - </key>  
449 - <value>  
450 - <name>personnel_name</name>  
451 - <rename>&#x59d3;&#x540d;</rename>  
452 - <update>Y</update>  
453 - </value>  
454 - <value>  
455 - <name>company</name>  
456 - <rename>&#x6240;&#x5c5e;&#x516c;&#x53f8;</rename>  
457 - <update>Y</update>  
458 - </value>  
459 - <value>  
460 - <name>company_code</name>  
461 - <rename>&#x6240;&#x5c5e;&#x516c;&#x53f8;&#x4ee3;&#x7801;</rename>  
462 - <update>Y</update>  
463 - </value>  
464 - <value>  
465 - <name>branche_company</name>  
466 - <rename>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;</rename>  
467 - <update>Y</update>  
468 - </value>  
469 - <value>  
470 - <name>branche_company_code</name>  
471 - <rename>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;&#x4ee3;&#x7801;</rename>  
472 - <update>Y</update>  
473 - </value>  
474 - <value>  
475 - <name>job_code</name>  
476 - <rename>gh_calcu</rename>  
477 - <update>Y</update>  
478 - </value>  
479 - </lookup>  
480 - <cluster_schema/>  
481 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
482 - <xloc>576</xloc>  
483 - <yloc>56</yloc>  
484 - <draw>Y</draw>  
485 - </GUI>  
486 - </step>  
487 -  
488 - <step>  
489 - <name>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</name>  
490 - <type>GetVariable</type>  
491 - <description/>  
492 - <distribute>Y</distribute>  
493 - <custom_distribution/>  
494 - <copies>1</copies>  
495 - <partitioning>  
496 - <method>none</method>  
497 - <schema_name/>  
498 - </partitioning>  
499 - <fields>  
500 - <field>  
501 - <name>filepath_</name>  
502 - <variable>&#x24;&#x7b;filepath&#x7d;</variable>  
503 - <type>String</type>  
504 - <format/>  
505 - <currency/>  
506 - <decimal/>  
507 - <group/>  
508 - <length>-1</length>  
509 - <precision>-1</precision>  
510 - <trim_type>none</trim_type>  
511 - </field>  
512 - <field>  
513 - <name>erroroutputdir_</name>  
514 - <variable>&#x24;&#x7b;erroroutputdir&#x7d;</variable>  
515 - <type>String</type>  
516 - <format/>  
517 - <currency/>  
518 - <decimal/>  
519 - <group/>  
520 - <length>-1</length>  
521 - <precision>-1</precision>  
522 - <trim_type>none</trim_type>  
523 - </field>  
524 - </fields>  
525 - <cluster_schema/>  
526 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
527 - <xloc>90</xloc>  
528 - <yloc>148</yloc>  
529 - <draw>Y</draw>  
530 - </GUI>  
531 - </step>  
532 -  
533 - <step>  
534 - <name>&#x8fc7;&#x6ee4;&#x8bb0;&#x5f55;</name>  
535 - <type>FilterRows</type>  
536 - <description/>  
537 - <distribute>Y</distribute>  
538 - <custom_distribution/>  
539 - <copies>1</copies>  
540 - <partitioning>  
541 - <method>none</method>  
542 - <schema_name/>  
543 - </partitioning>  
544 -<send_true_to/>  
545 -<send_false_to/>  
546 - <compare>  
547 -<condition>  
548 - <negated>N</negated>  
549 - <conditions>  
550 - <condition>  
551 - <negated>N</negated>  
552 - <leftvalue>&#x5de5;&#x53f7;</leftvalue>  
553 - <function>IS NOT NULL</function>  
554 - <rightvalue/>  
555 - </condition>  
556 - <condition>  
557 - <negated>N</negated>  
558 - <operator>AND</operator>  
559 - <leftvalue>&#x6240;&#x5c5e;&#x516c;&#x53f8;&#x4ee3;&#x7801;</leftvalue>  
560 - <function>IS NOT NULL</function>  
561 - <rightvalue/>  
562 - </condition>  
563 - </conditions>  
564 - </condition>  
565 - </compare>  
566 - <cluster_schema/>  
567 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
568 - <xloc>358</xloc>  
569 - <yloc>57</yloc>  
570 - <draw>Y</draw>  
571 - </GUI>  
572 - </step>  
573 -  
574 - <step>  
575 - <name>&#x9519;&#x8bef;&#x8f93;&#x51fa;</name>  
576 - <type>ExcelOutput</type>  
577 - <description/>  
578 - <distribute>Y</distribute>  
579 - <custom_distribution/>  
580 - <copies>1</copies>  
581 - <partitioning>  
582 - <method>none</method>  
583 - <schema_name/>  
584 - </partitioning>  
585 - <header>Y</header>  
586 - <footer>N</footer>  
587 - <encoding>UTF-8</encoding>  
588 - <append>N</append>  
589 - <add_to_result_filenames>Y</add_to_result_filenames>  
590 - <file>  
591 - <name>&#x24;&#x7b;erroroutputdir&#x7d;&#x2f;&#x4eba;&#x5458;&#x57fa;&#x7840;&#x4fe1;&#x606f;_&#x9519;&#x8bef;</name>  
592 - <extention>xls</extention>  
593 - <do_not_open_newfile_init>N</do_not_open_newfile_init>  
594 - <create_parent_folder>N</create_parent_folder>  
595 - <split>N</split>  
596 - <add_date>N</add_date>  
597 - <add_time>N</add_time>  
598 - <SpecifyFormat>N</SpecifyFormat>  
599 - <date_time_format/>  
600 - <sheetname>Sheet1</sheetname>  
601 - <autosizecolums>N</autosizecolums>  
602 - <nullisblank>N</nullisblank>  
603 - <protect_sheet>N</protect_sheet>  
604 - <password>Encrypted </password>  
605 - <splitevery>0</splitevery>  
606 - <usetempfiles>N</usetempfiles>  
607 - <tempdirectory/>  
608 - </file>  
609 - <template>  
610 - <enabled>N</enabled>  
611 - <append>N</append>  
612 - <filename>template.xls</filename>  
613 - </template>  
614 - <fields>  
615 - <field>  
616 - <name>&#x59d3;&#x540d;</name>  
617 - <type>String</type>  
618 - <format/>  
619 - </field>  
620 - <field>  
621 - <name>&#x5de5;&#x53f7;</name>  
622 - <type>String</type>  
623 - <format/>  
624 - </field>  
625 - <field>  
626 - <name>&#x6240;&#x5c5e;&#x516c;&#x53f8;</name>  
627 - <type>String</type>  
628 - <format/>  
629 - </field>  
630 - <field>  
631 - <name>&#x6240;&#x5c5e;&#x516c;&#x53f8;&#x4ee3;&#x7801;</name>  
632 - <type>String</type>  
633 - <format/>  
634 - </field>  
635 - <field>  
636 - <name>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;</name>  
637 - <type>String</type>  
638 - <format/>  
639 - </field>  
640 - <field>  
641 - <name>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;&#x4ee3;&#x7801;</name>  
642 - <type>String</type>  
643 - <format/>  
644 - </field>  
645 - <field>  
646 - <name>gh_calcu</name>  
647 - <type>String</type>  
648 - <format/>  
649 - </field>  
650 - <field>  
651 - <name>error_count</name>  
652 - <type>Integer</type>  
653 - <format/>  
654 - </field>  
655 - <field>  
656 - <name>error_desc</name>  
657 - <type>String</type>  
658 - <format/>  
659 - </field>  
660 - <field>  
661 - <name>error_column1</name>  
662 - <type>String</type>  
663 - <format/>  
664 - </field>  
665 - <field>  
666 - <name>error_column2</name>  
667 - <type>String</type>  
668 - <format/>  
669 - </field>  
670 - </fields>  
671 - <custom>  
672 - <header_font_name>arial</header_font_name>  
673 - <header_font_size>10</header_font_size>  
674 - <header_font_bold>N</header_font_bold>  
675 - <header_font_italic>N</header_font_italic>  
676 - <header_font_underline>no</header_font_underline>  
677 - <header_font_orientation>horizontal</header_font_orientation>  
678 - <header_font_color>black</header_font_color>  
679 - <header_background_color>none</header_background_color>  
680 - <header_row_height>255</header_row_height>  
681 - <header_alignment>left</header_alignment>  
682 - <header_image/>  
683 - <row_font_name>arial</row_font_name>  
684 - <row_font_size>10</row_font_size>  
685 - <row_font_color>black</row_font_color>  
686 - <row_background_color>none</row_background_color>  
687 - </custom>  
688 - <cluster_schema/>  
689 - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>  
690 - <xloc>578</xloc>  
691 - <yloc>223</yloc>  
692 - <draw>Y</draw>  
693 - </GUI>  
694 - </step>  
695 -  
696 - <step_error_handling>  
697 - <error>  
698 - <source_step>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_personnel</source_step>  
699 - <target_step>&#x9519;&#x8bef;&#x8f93;&#x51fa;</target_step>  
700 - <is_enabled>Y</is_enabled>  
701 - <nr_valuename>error_count</nr_valuename>  
702 - <descriptions_valuename>error_desc</descriptions_valuename>  
703 - <fields_valuename>error_column1</fields_valuename>  
704 - <codes_valuename>error_column2</codes_valuename>  
705 - <max_errors/>  
706 - <max_pct_errors/>  
707 - <min_pct_rows/>  
708 - </error>  
709 - </step_error_handling>  
710 - <slave-step-copy-partition-distribution>  
711 -</slave-step-copy-partition-distribution>  
712 - <slave_transformation>N</slave_transformation>  
713 -  
714 -</transformation>  
715 - 1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<transformation>
  3 + <info>
  4 + <name>&#x4eba;&#x5458;&#x4fe1;&#x606f;&#x5bfc;&#x5165;</name>
  5 + <description>&#x4eba;&#x5458;&#x57fa;&#x7840;&#x4fe1;&#x606f;&#x5bfc;&#x5165;</description>
  6 + <extended_description>&#x4eba;&#x5458;&#x57fa;&#x7840;&#x4fe1;&#x606f;</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>erroroutputdir</name>
  14 + <default_value/>
  15 + <description>ktr step&#x914d;&#x7f6e;&#x7684;&#x9519;&#x8bef;&#x8f93;&#x51fa;&#x76ee;&#x5f55;</description>
  16 + </parameter>
  17 + <parameter>
  18 + <name>filepath</name>
  19 + <default_value/>
  20 + <description>&#x5f85;&#x5904;&#x7406;&#x5bfc;&#x5165;&#x7684;excel&#x6587;&#x4ef6;</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>2016&#x2f;06&#x2f;29 10&#x3a;18&#x3a;56.974</created_date>
  81 + <modified_user>-</modified_user>
  82 + <modified_date>2016&#x2f;06&#x2f;29 10&#x3a;18&#x3a;56.974</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>192.168.168.1_jwgl_dw</name>
  90 + <server>192.168.168.1</server>
  91 + <type>ORACLE</type>
  92 + <access>Native</access>
  93 + <database>orcl</database>
  94 + <port>1521</port>
  95 + <username>jwgl_dw</username>
  96 + <password>Encrypted 2be98afc86aa7f2e4cb13b977d2adabcd</password>
  97 + <servername/>
  98 + <data_tablespace/>
  99 + <index_tablespace/>
  100 + <attributes>
  101 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  102 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  103 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  104 + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
  105 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  106 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  107 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  108 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  109 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  110 + </attributes>
  111 + </connection>
  112 + <connection>
  113 + <name>bus_control_variable</name>
  114 + <server>&#x24;&#x7b;v_db_ip&#x7d;</server>
  115 + <type>MYSQL</type>
  116 + <access>Native</access>
  117 + <database>&#x24;&#x7b;v_db_dname&#x7d;</database>
  118 + <port>3306</port>
  119 + <username>&#x24;&#x7b;v_db_uname&#x7d;</username>
  120 + <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>
  121 + <servername/>
  122 + <data_tablespace/>
  123 + <index_tablespace/>
  124 + <attributes>
  125 + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute>
  126 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  127 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  128 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  129 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  130 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  131 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  132 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  133 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  134 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  135 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  136 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  137 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  138 + </attributes>
  139 + </connection>
  140 + <connection>
  141 + <name>bus_control_&#x516c;&#x53f8;_201</name>
  142 + <server>localhost</server>
  143 + <type>MYSQL</type>
  144 + <access>Native</access>
  145 + <database>control</database>
  146 + <port>3306</port>
  147 + <username>root</username>
  148 + <password>Encrypted </password>
  149 + <servername/>
  150 + <data_tablespace/>
  151 + <index_tablespace/>
  152 + <attributes>
  153 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  154 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  155 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  156 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  157 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  158 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  159 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  160 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  161 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  162 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  163 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  164 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  165 + </attributes>
  166 + </connection>
  167 + <connection>
  168 + <name>bus_control_&#x672c;&#x673a;</name>
  169 + <server>localhost</server>
  170 + <type>MYSQL</type>
  171 + <access>Native</access>
  172 + <database>control</database>
  173 + <port>3306</port>
  174 + <username>root</username>
  175 + <password>Encrypted </password>
  176 + <servername/>
  177 + <data_tablespace/>
  178 + <index_tablespace/>
  179 + <attributes>
  180 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  181 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  182 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  183 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  184 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  185 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  186 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  187 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  188 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  189 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  190 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  191 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  192 + </attributes>
  193 + </connection>
  194 + <connection>
  195 + <name>xlab_mysql_youle</name>
  196 + <server>101.231.124.8</server>
  197 + <type>MYSQL</type>
  198 + <access>Native</access>
  199 + <database>xlab_youle</database>
  200 + <port>45687</port>
  201 + <username>xlab-youle</username>
  202 + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>
  203 + <servername/>
  204 + <data_tablespace/>
  205 + <index_tablespace/>
  206 + <attributes>
  207 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  208 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  209 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  210 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  211 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  212 + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>
  213 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  214 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  215 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  216 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  217 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  218 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  219 + </attributes>
  220 + </connection>
  221 + <connection>
  222 + <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>
  223 + <server>localhost</server>
  224 + <type>MYSQL</type>
  225 + <access>Native</access>
  226 + <database>xlab_youle</database>
  227 + <port>3306</port>
  228 + <username>root</username>
  229 + <password>Encrypted </password>
  230 + <servername/>
  231 + <data_tablespace/>
  232 + <index_tablespace/>
  233 + <attributes>
  234 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  235 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  236 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  237 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  238 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  239 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  240 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  241 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  242 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  243 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  244 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  245 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  246 + </attributes>
  247 + </connection>
  248 + <connection>
  249 + <name>xlab_youle</name>
  250 + <server/>
  251 + <type>MYSQL</type>
  252 + <access>JNDI</access>
  253 + <database>xlab_youle</database>
  254 + <port>1521</port>
  255 + <username/>
  256 + <password>Encrypted </password>
  257 + <servername/>
  258 + <data_tablespace/>
  259 + <index_tablespace/>
  260 + <attributes>
  261 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  262 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  263 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  264 + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
  265 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  266 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  267 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  268 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  269 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  270 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  271 + </attributes>
  272 + </connection>
  273 + <order>
  274 + <hop> <from>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_personnel</from><to>&#x9519;&#x8bef;&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
  275 + <hop> <from>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</from><to>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</to><enabled>Y</enabled> </hop>
  276 + <hop> <from>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</from><to>&#x8fc7;&#x6ee4;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  277 + <hop> <from>&#x8fc7;&#x6ee4;&#x8bb0;&#x5f55;</from><to>JavaScript&#x4ee3;&#x7801;</to><enabled>Y</enabled> </hop>
  278 + <hop> <from>JavaScript&#x4ee3;&#x7801;</from><to>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_personnel</to><enabled>Y</enabled> </hop>
  279 + </order>
  280 + <step>
  281 + <name>JavaScript&#x4ee3;&#x7801;</name>
  282 + <type>ScriptValueMod</type>
  283 + <description/>
  284 + <distribute>Y</distribute>
  285 + <custom_distribution/>
  286 + <copies>1</copies>
  287 + <partitioning>
  288 + <method>none</method>
  289 + <schema_name/>
  290 + </partitioning>
  291 + <compatible>N</compatible>
  292 + <optimizationLevel>9</optimizationLevel>
  293 + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
  294 + <jsScript_name>Script 1</jsScript_name>
  295 + <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var gh_calcu &#x3d; &#x5de5;&#x53f7;&#x3b;&#xa;&#xa;if &#x28;&#x5de5;&#x53f7;.indexOf&#x28;&#x6240;&#x5c5e;&#x516c;&#x53f8;&#x4ee3;&#x7801; &#x2b; &#x22;-&#x22;&#x29; &#x3c; 0&#x29; &#x7b;&#xa; gh_calcu &#x3d; &#x6240;&#x5c5e;&#x516c;&#x53f8;&#x4ee3;&#x7801; &#x2b; &#x22;-&#x22; &#x2b; &#x5de5;&#x53f7;&#x3b;&#xa;&#x7d; </jsScript_script>
  296 + </jsScript> </jsScripts> <fields> <field> <name>gh_calcu</name>
  297 + <rename>gh_calcu</rename>
  298 + <type>String</type>
  299 + <length>-1</length>
  300 + <precision>-1</precision>
  301 + <replace>N</replace>
  302 + </field> </fields> <cluster_schema/>
  303 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  304 + <xloc>362</xloc>
  305 + <yloc>190</yloc>
  306 + <draw>Y</draw>
  307 + </GUI>
  308 + </step>
  309 +
  310 + <step>
  311 + <name>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</name>
  312 + <type>ExcelInput</type>
  313 + <description/>
  314 + <distribute>Y</distribute>
  315 + <custom_distribution/>
  316 + <copies>1</copies>
  317 + <partitioning>
  318 + <method>none</method>
  319 + <schema_name/>
  320 + </partitioning>
  321 + <header>Y</header>
  322 + <noempty>Y</noempty>
  323 + <stoponempty>N</stoponempty>
  324 + <filefield/>
  325 + <sheetfield/>
  326 + <sheetrownumfield/>
  327 + <rownumfield/>
  328 + <sheetfield/>
  329 + <filefield/>
  330 + <limit>0</limit>
  331 + <encoding/>
  332 + <add_to_result_filenames>Y</add_to_result_filenames>
  333 + <accept_filenames>Y</accept_filenames>
  334 + <accept_field>filepath_</accept_field>
  335 + <accept_stepname>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</accept_stepname>
  336 + <file>
  337 + <name/>
  338 + <filemask/>
  339 + <exclude_filemask/>
  340 + <file_required>N</file_required>
  341 + <include_subfolders>N</include_subfolders>
  342 + </file>
  343 + <fields>
  344 + <field>
  345 + <name>&#x59d3;&#x540d;</name>
  346 + <type>String</type>
  347 + <length>-1</length>
  348 + <precision>-1</precision>
  349 + <trim_type>none</trim_type>
  350 + <repeat>N</repeat>
  351 + <format/>
  352 + <currency/>
  353 + <decimal/>
  354 + <group/>
  355 + </field>
  356 + <field>
  357 + <name>&#x5de5;&#x53f7;</name>
  358 + <type>String</type>
  359 + <length>-1</length>
  360 + <precision>-1</precision>
  361 + <trim_type>none</trim_type>
  362 + <repeat>N</repeat>
  363 + <format>&#x23;</format>
  364 + <currency/>
  365 + <decimal/>
  366 + <group/>
  367 + </field>
  368 + <field>
  369 + <name>&#x6240;&#x5c5e;&#x516c;&#x53f8;</name>
  370 + <type>String</type>
  371 + <length>-1</length>
  372 + <precision>-1</precision>
  373 + <trim_type>none</trim_type>
  374 + <repeat>N</repeat>
  375 + <format/>
  376 + <currency/>
  377 + <decimal/>
  378 + <group/>
  379 + </field>
  380 + <field>
  381 + <name>&#x6240;&#x5c5e;&#x516c;&#x53f8;&#x4ee3;&#x7801;</name>
  382 + <type>String</type>
  383 + <length>-1</length>
  384 + <precision>-1</precision>
  385 + <trim_type>none</trim_type>
  386 + <repeat>N</repeat>
  387 + <format/>
  388 + <currency/>
  389 + <decimal/>
  390 + <group/>
  391 + </field>
  392 + <field>
  393 + <name>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;</name>
  394 + <type>String</type>
  395 + <length>-1</length>
  396 + <precision>-1</precision>
  397 + <trim_type>none</trim_type>
  398 + <repeat>N</repeat>
  399 + <format/>
  400 + <currency/>
  401 + <decimal/>
  402 + <group/>
  403 + </field>
  404 + <field>
  405 + <name>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;&#x4ee3;&#x7801;</name>
  406 + <type>String</type>
  407 + <length>-1</length>
  408 + <precision>-1</precision>
  409 + <trim_type>none</trim_type>
  410 + <repeat>N</repeat>
  411 + <format/>
  412 + <currency/>
  413 + <decimal/>
  414 + <group/>
  415 + </field>
  416 + </fields>
  417 + <sheets>
  418 + <sheet>
  419 + <name>&#x5de5;&#x4f5c;&#x8868;1</name>
  420 + <startrow>0</startrow>
  421 + <startcol>0</startcol>
  422 + </sheet>
  423 + </sheets>
  424 + <strict_types>N</strict_types>
  425 + <error_ignored>N</error_ignored>
  426 + <error_line_skipped>N</error_line_skipped>
  427 + <bad_line_files_destination_directory/>
  428 + <bad_line_files_extension>warning</bad_line_files_extension>
  429 + <error_line_files_destination_directory/>
  430 + <error_line_files_extension>error</error_line_files_extension>
  431 + <line_number_files_destination_directory/>
  432 + <line_number_files_extension>line</line_number_files_extension>
  433 + <shortFileFieldName/>
  434 + <pathFieldName/>
  435 + <hiddenFieldName/>
  436 + <lastModificationTimeFieldName/>
  437 + <uriNameFieldName/>
  438 + <rootUriNameFieldName/>
  439 + <extensionFieldName/>
  440 + <sizeFieldName/>
  441 + <spreadsheet_type>JXL</spreadsheet_type>
  442 + <cluster_schema/>
  443 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  444 + <xloc>158</xloc>
  445 + <yloc>57</yloc>
  446 + <draw>Y</draw>
  447 + </GUI>
  448 + </step>
  449 +
  450 + <step>
  451 + <name>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_personnel</name>
  452 + <type>InsertUpdate</type>
  453 + <description/>
  454 + <distribute>Y</distribute>
  455 + <custom_distribution/>
  456 + <copies>1</copies>
  457 + <partitioning>
  458 + <method>none</method>
  459 + <schema_name/>
  460 + </partitioning>
  461 + <connection>bus_control_variable</connection>
  462 + <commit>5000</commit>
  463 + <update_bypassed>N</update_bypassed>
  464 + <lookup>
  465 + <schema/>
  466 + <table>bsth_c_personnel</table>
  467 + <key>
  468 + <name>gh_calcu</name>
  469 + <field>job_code</field>
  470 + <condition>&#x3d;</condition>
  471 + <name2/>
  472 + </key>
  473 + <value>
  474 + <name>personnel_name</name>
  475 + <rename>&#x59d3;&#x540d;</rename>
  476 + <update>Y</update>
  477 + </value>
  478 + <value>
  479 + <name>company</name>
  480 + <rename>&#x6240;&#x5c5e;&#x516c;&#x53f8;</rename>
  481 + <update>Y</update>
  482 + </value>
  483 + <value>
  484 + <name>company_code</name>
  485 + <rename>&#x6240;&#x5c5e;&#x516c;&#x53f8;&#x4ee3;&#x7801;</rename>
  486 + <update>Y</update>
  487 + </value>
  488 + <value>
  489 + <name>branche_company</name>
  490 + <rename>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;</rename>
  491 + <update>Y</update>
  492 + </value>
  493 + <value>
  494 + <name>branche_company_code</name>
  495 + <rename>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;&#x4ee3;&#x7801;</rename>
  496 + <update>Y</update>
  497 + </value>
  498 + <value>
  499 + <name>job_code</name>
  500 + <rename>gh_calcu</rename>
  501 + <update>Y</update>
  502 + </value>
  503 + </lookup>
  504 + <cluster_schema/>
  505 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  506 + <xloc>576</xloc>
  507 + <yloc>56</yloc>
  508 + <draw>Y</draw>
  509 + </GUI>
  510 + </step>
  511 +
  512 + <step>
  513 + <name>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</name>
  514 + <type>GetVariable</type>
  515 + <description/>
  516 + <distribute>Y</distribute>
  517 + <custom_distribution/>
  518 + <copies>1</copies>
  519 + <partitioning>
  520 + <method>none</method>
  521 + <schema_name/>
  522 + </partitioning>
  523 + <fields>
  524 + <field>
  525 + <name>filepath_</name>
  526 + <variable>&#x24;&#x7b;filepath&#x7d;</variable>
  527 + <type>String</type>
  528 + <format/>
  529 + <currency/>
  530 + <decimal/>
  531 + <group/>
  532 + <length>-1</length>
  533 + <precision>-1</precision>
  534 + <trim_type>none</trim_type>
  535 + </field>
  536 + <field>
  537 + <name>erroroutputdir_</name>
  538 + <variable>&#x24;&#x7b;erroroutputdir&#x7d;</variable>
  539 + <type>String</type>
  540 + <format/>
  541 + <currency/>
  542 + <decimal/>
  543 + <group/>
  544 + <length>-1</length>
  545 + <precision>-1</precision>
  546 + <trim_type>none</trim_type>
  547 + </field>
  548 + </fields>
  549 + <cluster_schema/>
  550 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  551 + <xloc>90</xloc>
  552 + <yloc>148</yloc>
  553 + <draw>Y</draw>
  554 + </GUI>
  555 + </step>
  556 +
  557 + <step>
  558 + <name>&#x8fc7;&#x6ee4;&#x8bb0;&#x5f55;</name>
  559 + <type>FilterRows</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 +<send_true_to/>
  569 +<send_false_to/>
  570 + <compare>
  571 +<condition>
  572 + <negated>N</negated>
  573 + <conditions>
  574 + <condition>
  575 + <negated>N</negated>
  576 + <leftvalue>&#x5de5;&#x53f7;</leftvalue>
  577 + <function>IS NOT NULL</function>
  578 + <rightvalue/>
  579 + </condition>
  580 + <condition>
  581 + <negated>N</negated>
  582 + <operator>AND</operator>
  583 + <leftvalue>&#x6240;&#x5c5e;&#x516c;&#x53f8;&#x4ee3;&#x7801;</leftvalue>
  584 + <function>IS NOT NULL</function>
  585 + <rightvalue/>
  586 + </condition>
  587 + </conditions>
  588 + </condition>
  589 + </compare>
  590 + <cluster_schema/>
  591 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  592 + <xloc>358</xloc>
  593 + <yloc>57</yloc>
  594 + <draw>Y</draw>
  595 + </GUI>
  596 + </step>
  597 +
  598 + <step>
  599 + <name>&#x9519;&#x8bef;&#x8f93;&#x51fa;</name>
  600 + <type>ExcelOutput</type>
  601 + <description/>
  602 + <distribute>Y</distribute>
  603 + <custom_distribution/>
  604 + <copies>1</copies>
  605 + <partitioning>
  606 + <method>none</method>
  607 + <schema_name/>
  608 + </partitioning>
  609 + <header>Y</header>
  610 + <footer>N</footer>
  611 + <encoding>UTF-8</encoding>
  612 + <append>N</append>
  613 + <add_to_result_filenames>Y</add_to_result_filenames>
  614 + <file>
  615 + <name>&#x24;&#x7b;erroroutputdir&#x7d;&#x2f;&#x4eba;&#x5458;&#x57fa;&#x7840;&#x4fe1;&#x606f;_&#x9519;&#x8bef;</name>
  616 + <extention>xls</extention>
  617 + <do_not_open_newfile_init>N</do_not_open_newfile_init>
  618 + <create_parent_folder>N</create_parent_folder>
  619 + <split>N</split>
  620 + <add_date>N</add_date>
  621 + <add_time>N</add_time>
  622 + <SpecifyFormat>N</SpecifyFormat>
  623 + <date_time_format/>
  624 + <sheetname>Sheet1</sheetname>
  625 + <autosizecolums>N</autosizecolums>
  626 + <nullisblank>N</nullisblank>
  627 + <protect_sheet>N</protect_sheet>
  628 + <password>Encrypted </password>
  629 + <splitevery>0</splitevery>
  630 + <usetempfiles>N</usetempfiles>
  631 + <tempdirectory/>
  632 + </file>
  633 + <template>
  634 + <enabled>N</enabled>
  635 + <append>N</append>
  636 + <filename>template.xls</filename>
  637 + </template>
  638 + <fields>
  639 + <field>
  640 + <name>&#x59d3;&#x540d;</name>
  641 + <type>String</type>
  642 + <format/>
  643 + </field>
  644 + <field>
  645 + <name>&#x5de5;&#x53f7;</name>
  646 + <type>String</type>
  647 + <format/>
  648 + </field>
  649 + <field>
  650 + <name>&#x6240;&#x5c5e;&#x516c;&#x53f8;</name>
  651 + <type>String</type>
  652 + <format/>
  653 + </field>
  654 + <field>
  655 + <name>&#x6240;&#x5c5e;&#x516c;&#x53f8;&#x4ee3;&#x7801;</name>
  656 + <type>String</type>
  657 + <format/>
  658 + </field>
  659 + <field>
  660 + <name>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;</name>
  661 + <type>String</type>
  662 + <format/>
  663 + </field>
  664 + <field>
  665 + <name>&#x6240;&#x5c5e;&#x5206;&#x516c;&#x53f8;&#x4ee3;&#x7801;</name>
  666 + <type>String</type>
  667 + <format/>
  668 + </field>
  669 + <field>
  670 + <name>gh_calcu</name>
  671 + <type>String</type>
  672 + <format/>
  673 + </field>
  674 + <field>
  675 + <name>error_count</name>
  676 + <type>Integer</type>
  677 + <format/>
  678 + </field>
  679 + <field>
  680 + <name>error_desc</name>
  681 + <type>String</type>
  682 + <format/>
  683 + </field>
  684 + <field>
  685 + <name>error_column1</name>
  686 + <type>String</type>
  687 + <format/>
  688 + </field>
  689 + <field>
  690 + <name>error_column2</name>
  691 + <type>String</type>
  692 + <format/>
  693 + </field>
  694 + </fields>
  695 + <custom>
  696 + <header_font_name>arial</header_font_name>
  697 + <header_font_size>10</header_font_size>
  698 + <header_font_bold>N</header_font_bold>
  699 + <header_font_italic>N</header_font_italic>
  700 + <header_font_underline>no</header_font_underline>
  701 + <header_font_orientation>horizontal</header_font_orientation>
  702 + <header_font_color>black</header_font_color>
  703 + <header_background_color>none</header_background_color>
  704 + <header_row_height>255</header_row_height>
  705 + <header_alignment>left</header_alignment>
  706 + <header_image/>
  707 + <row_font_name>arial</row_font_name>
  708 + <row_font_size>10</row_font_size>
  709 + <row_font_color>black</row_font_color>
  710 + <row_background_color>none</row_background_color>
  711 + </custom>
  712 + <cluster_schema/>
  713 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  714 + <xloc>578</xloc>
  715 + <yloc>223</yloc>
  716 + <draw>Y</draw>
  717 + </GUI>
  718 + </step>
  719 +
  720 + <step_error_handling>
  721 + <error>
  722 + <source_step>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_personnel</source_step>
  723 + <target_step>&#x9519;&#x8bef;&#x8f93;&#x51fa;</target_step>
  724 + <is_enabled>Y</is_enabled>
  725 + <nr_valuename>error_count</nr_valuename>
  726 + <descriptions_valuename>error_desc</descriptions_valuename>
  727 + <fields_valuename>error_column1</fields_valuename>
  728 + <codes_valuename>error_column2</codes_valuename>
  729 + <max_errors/>
  730 + <max_pct_errors/>
  731 + <min_pct_rows/>
  732 + </error>
  733 + </step_error_handling>
  734 + <slave-step-copy-partition-distribution>
  735 +</slave-step-copy-partition-distribution>
  736 + <slave_transformation>N</slave_transformation>
  737 +
  738 +</transformation>