Commit 8bff9c0ec1e3f156b6f038588f12b2b005f69f72
Merge branch 'minhang' of http://222.66.0.204:8090/panzhaov5/bsth_control into minhang
Showing
32 changed files
with
3284 additions
and
527 deletions
Too many changes to show.
To preserve performance only 32 of 88 files are displayed.
pom.xml
| ... | ... | @@ -24,7 +24,12 @@ |
| 24 | 24 | <artifactId>spring-boot-starter-tomcat</artifactId> |
| 25 | 25 | <scope>provided</scope> |
| 26 | 26 | </dependency> |
| 27 | - | |
| 27 | + <dependency> | |
| 28 | + <groupId>javax.servlet</groupId> | |
| 29 | + <artifactId>javax.servlet-api</artifactId> | |
| 30 | + <version>3.1.0</version> | |
| 31 | + <scope>provided</scope> | |
| 32 | + </dependency> | |
| 28 | 33 | <dependency> |
| 29 | 34 | <groupId>org.springframework.boot</groupId> |
| 30 | 35 | <artifactId>spring-boot-starter-security</artifactId> |
| ... | ... | @@ -229,6 +234,23 @@ |
| 229 | 234 | <version>1.1</version> |
| 230 | 235 | </dependency> |
| 231 | 236 | |
| 237 | + <dependency> | |
| 238 | + <groupId>org.apache.axis2</groupId> | |
| 239 | + <artifactId>axis2-adb</artifactId> | |
| 240 | + <version>1.7.4</version> | |
| 241 | + </dependency> | |
| 242 | + <dependency> | |
| 243 | + <groupId>org.apache.axis2</groupId> | |
| 244 | + <artifactId>axis2-transport-local</artifactId> | |
| 245 | + <version>1.7.4</version> | |
| 246 | + </dependency> | |
| 247 | + <dependency> | |
| 248 | + <groupId>org.apache.axis2</groupId> | |
| 249 | + <artifactId>axis2-transport-http</artifactId> | |
| 250 | + <version>1.7.4</version> | |
| 251 | + </dependency> | |
| 252 | + | |
| 253 | + | |
| 232 | 254 | <!-- <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> |
| 233 | 255 | <optional>true</optional> </dependency> --> |
| 234 | 256 | <dependency> | ... | ... |
src/main/java/com/bsth/controller/oil/YlbController.java
| ... | ... | @@ -209,8 +209,8 @@ public class YlbController extends BaseController<Ylb, Integer>{ |
| 209 | 209 | return maps; |
| 210 | 210 | } |
| 211 | 211 | @RequestMapping(value="/oilListMonth") |
| 212 | - public List<Ylb> oilListMonth(@RequestParam String line,@RequestParam String date){ | |
| 213 | - return yblService.oilListMonth(line, date); | |
| 212 | + public List<Ylb> oilListMonth(@RequestParam String line,@RequestParam String date,@RequestParam String type){ | |
| 213 | + return yblService.oilListMonth(line, date, type); | |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | 216 | @RequestMapping(value = "/checkJsy",method = RequestMethod.GET) |
| ... | ... | @@ -244,8 +244,8 @@ public class YlbController extends BaseController<Ylb, Integer>{ |
| 244 | 244 | m.put("jsy", y.getJsy()); |
| 245 | 245 | m.put("name", y.getName()); |
| 246 | 246 | m.put("jzl", y.getJzl()<=0?"0":y.getJzl()); |
| 247 | - m.put("czlc", y.getCzlc()<=0?"0":y.getCzlc()); | |
| 248 | - m.put("jzlc", y.getJzlc()<=0?"0":y.getJzlc()); | |
| 247 | + m.put("czlc", "0"); | |
| 248 | + m.put("jzlc", "0"); | |
| 249 | 249 | m.put("czyl", y.getCzyl()<=0?"0":y.getCzyl()); |
| 250 | 250 | m.put("jzyl", y.getJzyl()<=0?"0":y.getJzyl()); |
| 251 | 251 | m.put("yh", y.getYh()<=0?"0":y.getYh()); |
| ... | ... | @@ -255,7 +255,7 @@ public class YlbController extends BaseController<Ylb, Integer>{ |
| 255 | 255 | if(y.getRylx().equals("1")){rylx="负10号柴油";} |
| 256 | 256 | } |
| 257 | 257 | m.put("rylx", rylx); |
| 258 | - m.put("ns", y.getNs()); | |
| 258 | + m.put("ns", y.getNs()==null?"0":y.getNs()); | |
| 259 | 259 | String shyy ="无"; |
| 260 | 260 | if(y.getShyy()!=null){ |
| 261 | 261 | shyy=y.getShyy(); | ... | ... |
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| ... | ... | @@ -7,6 +7,7 @@ import com.bsth.controller.realcontrol.dto.ChangePersonCar; |
| 7 | 7 | import com.bsth.controller.realcontrol.dto.DfsjChange; |
| 8 | 8 | import com.bsth.data.BasicData; |
| 9 | 9 | import com.bsth.data.schedule.DayOfSchedule; |
| 10 | +import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto; | |
| 10 | 11 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 11 | 12 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 12 | 13 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| ... | ... | @@ -317,9 +318,9 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, |
| 317 | 318 | } |
| 318 | 319 | |
| 319 | 320 | @RequestMapping(value = "/correctForm") |
| 320 | - public List<ScheduleRealInfo> correctForm(@RequestParam String line, @RequestParam String startDate, | |
| 321 | - @RequestParam String endDate, @RequestParam String lpName, @RequestParam String code, @RequestParam String type) { | |
| 322 | - return scheduleRealInfoService.correctForm(line, startDate, endDate, lpName, code, type); | |
| 321 | + public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date, | |
| 322 | + @RequestParam String lpName, @RequestParam String code, @RequestParam String type) { | |
| 323 | + return scheduleRealInfoService.correctForm(line, date, lpName, code, type); | |
| 323 | 324 | } |
| 324 | 325 | /** |
| 325 | 326 | * @Title queryListWaybill | ... | ... |
src/main/java/com/bsth/controller/schedule/TrafficManageController.java
| ... | ... | @@ -8,6 +8,8 @@ import org.springframework.web.bind.annotation.RequestMethod; |
| 8 | 8 | import org.springframework.web.bind.annotation.RequestParam; |
| 9 | 9 | import org.springframework.web.bind.annotation.RestController; |
| 10 | 10 | |
| 11 | +import java.util.Map; | |
| 12 | + | |
| 11 | 13 | /** |
| 12 | 14 | * |
| 13 | 15 | * @author BSTH |
| ... | ... | @@ -22,9 +24,9 @@ public class TrafficManageController { |
| 22 | 24 | |
| 23 | 25 | |
| 24 | 26 | @RequestMapping(value = "/setXL", method = RequestMethod.GET) |
| 25 | - public String setXL() throws Exception { | |
| 27 | + public String setXL(@RequestParam Map<String, Object> param) throws Exception { | |
| 26 | 28 | try { |
| 27 | - return trManageService.setXL(); | |
| 29 | + return trManageService.setXL(param); | |
| 28 | 30 | } catch (Exception exp) { |
| 29 | 31 | throw new Exception(exp.getCause()); |
| 30 | 32 | } |
| ... | ... | @@ -57,6 +59,15 @@ public class TrafficManageController { |
| 57 | 59 | } |
| 58 | 60 | } |
| 59 | 61 | |
| 62 | + @RequestMapping(value = "/setLDFile", method = RequestMethod.GET) | |
| 63 | + public String setLDFile() throws Exception { | |
| 64 | + try { | |
| 65 | + return trManageService.setLDFile(); | |
| 66 | + } catch (Exception exp) { | |
| 67 | + throw new Exception(exp.getCause()); | |
| 68 | + } | |
| 69 | + } | |
| 70 | + | |
| 60 | 71 | @RequestMapping(value = "/setLCYH", method = RequestMethod.GET) |
| 61 | 72 | public String setLCYH() throws Exception { |
| 62 | 73 | try { | ... | ... |
src/main/java/com/bsth/controller/traffic/SKBUploadLoggerController.java
0 → 100644
| 1 | +package com.bsth.controller.traffic; | |
| 2 | + | |
| 3 | +import com.bsth.controller.BaseController; | |
| 4 | +import com.bsth.entity.traffic.SKBUploadLogger; | |
| 5 | +import com.bsth.service.traffic.SKBUploadLoggerService; | |
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 7 | +import org.springframework.web.bind.annotation.RequestMapping; | |
| 8 | +import org.springframework.web.bind.annotation.RestController; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * | |
| 12 | + * @author BSTH | |
| 13 | + * | |
| 14 | + */ | |
| 15 | +@RestController | |
| 16 | +@RequestMapping("skb_log") | |
| 17 | +public class SKBUploadLoggerController extends BaseController<SKBUploadLogger,Integer> { | |
| 18 | + | |
| 19 | + @Autowired | |
| 20 | + private SKBUploadLoggerService skbUploadLoggerService; | |
| 21 | + | |
| 22 | +} | ... | ... |
src/main/java/com/bsth/data/BasicData.java
| ... | ... | @@ -274,22 +274,23 @@ public class BasicData implements CommandLineRunner { |
| 274 | 274 | * 加载运管处的站点及序号 |
| 275 | 275 | * 上行从1开始,下行顺序续编 |
| 276 | 276 | */ |
| 277 | - List<Object[]> ygcLines = stationRouteRepository.findAllLineWithYgc(); | |
| 277 | + List<Map<String, String>> ygcLines = stationRouteRepository.findAllLineWithYgc(); | |
| 278 | 278 | if(ygcLines != null && ygcLines.size() > 0){ |
| 279 | 279 | int size = ygcLines.size(); |
| 280 | - Object[] tempArray ; | |
| 280 | + Map<String, String> tempMap ; | |
| 281 | 281 | int num = 1; |
| 282 | 282 | String key; |
| 283 | 283 | String lineCode = ""; |
| 284 | 284 | for (int i = 0; i < size; i ++){ |
| 285 | - tempArray = ygcLines.get(i); | |
| 285 | + tempMap = ygcLines.get(i); | |
| 286 | 286 | if(lineCode.equals("")){ |
| 287 | - lineCode = tempArray[0]+""; | |
| 288 | - }else if(!lineCode.equals(tempArray[0]+"")){ | |
| 287 | + lineCode = tempMap.get("lineCode"); | |
| 288 | + }else if(!lineCode.equals(tempMap.get("lineCode"))){ | |
| 289 | 289 | num = 1; |
| 290 | - lineCode = tempArray[0]+""; | |
| 290 | + lineCode = tempMap.get("lineCode"); | |
| 291 | 291 | } |
| 292 | - key = tempArray[0] + "_"+tempArray[1] + "_"+tempArray[3]; | |
| 292 | + key = tempMap.get("lineCode") + "_"+String.valueOf(tempMap.get("directions")) | |
| 293 | + + "_"+tempMap.get("stationCode")+ "_"+tempMap.get("stationMark"); | |
| 293 | 294 | tempStationName2YgcNumber.put(key,num++); |
| 294 | 295 | } |
| 295 | 296 | } | ... | ... |
src/main/java/com/bsth/data/schedule/thread/SubmitToTrafficManage.java
| 1 | 1 | package com.bsth.data.schedule.thread; |
| 2 | 2 | |
| 3 | 3 | import com.bsth.service.TrafficManageService; |
| 4 | +import com.bsth.service.traffic.YgcBasicDataService; | |
| 4 | 5 | import org.slf4j.Logger; |
| 5 | 6 | import org.slf4j.LoggerFactory; |
| 6 | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| ... | ... | @@ -18,6 +19,9 @@ public class SubmitToTrafficManage extends Thread{ |
| 18 | 19 | @Autowired |
| 19 | 20 | TrafficManageService trafficManageService; |
| 20 | 21 | |
| 22 | + @Autowired | |
| 23 | + YgcBasicDataService ygcBasicDataService; | |
| 24 | + | |
| 21 | 25 | @Override |
| 22 | 26 | public void run() { |
| 23 | 27 | logger.info("开始提交数据到运管处..."); |
| ... | ... | @@ -46,6 +50,12 @@ public class SubmitToTrafficManage extends Thread{ |
| 46 | 50 | } catch (Exception e) { |
| 47 | 51 | logger.error("提交线路计划班次表到运管处失败", e); |
| 48 | 52 | } |
| 53 | + try { | |
| 54 | + // 运管处基础数据更新 | |
| 55 | + ygcBasicDataService.updateYgcBasicData(); | |
| 56 | + } catch (Exception e) { | |
| 57 | + logger.error("运管处基础数据更新失败", e); | |
| 58 | + } | |
| 49 | 59 | logger.info("提交数据到运管处结束!"); |
| 50 | 60 | } |
| 51 | 61 | } | ... | ... |
src/main/java/com/bsth/entity/Line.java
| ... | ... | @@ -104,6 +104,9 @@ public class Line implements Serializable { |
| 104 | 104 | /** 开辟日期 date*/ |
| 105 | 105 | @DateTimeFormat(pattern ="yyyy-MM-dd") |
| 106 | 106 | private Date openDate; |
| 107 | + | |
| 108 | + /** 大间隔等级 */ | |
| 109 | + private Integer spacGrade; | |
| 107 | 110 | |
| 108 | 111 | /** 线路沿革 varchar length(50) */ |
| 109 | 112 | private String history; |
| ... | ... | @@ -155,6 +158,14 @@ public class Line implements Serializable { |
| 155 | 158 | /** 是否在使用 <1:是;0:否> bit length(50) */ |
| 156 | 159 | private Integer inUse; |
| 157 | 160 | |
| 161 | + public Integer getSpacGrade() { | |
| 162 | + return spacGrade; | |
| 163 | + } | |
| 164 | + | |
| 165 | + public void setSpacGrade(Integer spacGrade) { | |
| 166 | + this.spacGrade = spacGrade; | |
| 167 | + } | |
| 168 | + | |
| 158 | 169 | public Integer getWarrantCar() { |
| 159 | 170 | return warrantCar; |
| 160 | 171 | } | ... | ... |
src/main/java/com/bsth/entity/traffic/SKBUploadLogger.java
0 → 100644
| 1 | +package com.bsth.entity.traffic; | |
| 2 | + | |
| 3 | +import com.bsth.entity.schedule.TTInfo; | |
| 4 | +import com.bsth.entity.sys.SysUser; | |
| 5 | +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |
| 6 | + | |
| 7 | +import javax.persistence.*; | |
| 8 | +import java.util.Date; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * | |
| 12 | + * @ClassName : SKBUploadLogger(时刻表上传日志实体类) | |
| 13 | + * | |
| 14 | + * @Author : bsth@zq | |
| 15 | + * | |
| 16 | + * @Description : | |
| 17 | + * | |
| 18 | + * @Data : 2016-04-27 | |
| 19 | + * | |
| 20 | + * @Version 公交调度系统BS版 0.1 | |
| 21 | + * | |
| 22 | + */ | |
| 23 | + | |
| 24 | +@Entity | |
| 25 | +@Table(name = "bsth_t_upload_logger") | |
| 26 | +@JsonIgnoreProperties(value={"hibernateLazyInitializer","handler","fieldHandler"}) | |
| 27 | +public class SKBUploadLogger { | |
| 28 | + | |
| 29 | + // ID | |
| 30 | + @Id | |
| 31 | + @GeneratedValue(strategy = GenerationType.IDENTITY) | |
| 32 | + private Integer id; | |
| 33 | + | |
| 34 | + /** 时刻表信息 */ | |
| 35 | + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY) | |
| 36 | + private TTInfo ttInfo; | |
| 37 | + | |
| 38 | + /** 用户 关联 */ | |
| 39 | + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY) | |
| 40 | + private SysUser user; | |
| 41 | + | |
| 42 | + // 创建日期 | |
| 43 | + @Column(updatable = false, name = "create_date", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP") | |
| 44 | + private Date createDate; | |
| 45 | + | |
| 46 | + public Integer getId() { | |
| 47 | + return id; | |
| 48 | + } | |
| 49 | + | |
| 50 | + public void setId(Integer id) { | |
| 51 | + this.id = id; | |
| 52 | + } | |
| 53 | + | |
| 54 | + public TTInfo getTtInfo() { | |
| 55 | + return ttInfo; | |
| 56 | + } | |
| 57 | + | |
| 58 | + public void setTtInfo(TTInfo ttInfo) { | |
| 59 | + this.ttInfo = ttInfo; | |
| 60 | + } | |
| 61 | + | |
| 62 | + public SysUser getUser() { | |
| 63 | + return user; | |
| 64 | + } | |
| 65 | + | |
| 66 | + public void setUser(SysUser user) { | |
| 67 | + this.user = user; | |
| 68 | + } | |
| 69 | + | |
| 70 | + public Date getCreateDate() { | |
| 71 | + return createDate; | |
| 72 | + } | |
| 73 | + | |
| 74 | + public void setCreateDate(Date createDate) { | |
| 75 | + this.createDate = createDate; | |
| 76 | + } | |
| 77 | +} | ... | ... |
src/main/java/com/bsth/repository/SectionRouteRepository.java
| ... | ... | @@ -159,11 +159,11 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int |
| 159 | 159 | */ |
| 160 | 160 | @Query(value = "SELECT " + |
| 161 | 161 | "c.directions," + |
| 162 | - "ST_AsText(s.bsection_vector) as bsection_vector," + | |
| 162 | + "ST_AsText(s.gsection_vector) as gsection_vector," + | |
| 163 | 163 | "s.speed_limit," + |
| 164 | 164 | "s.section_name " + |
| 165 | 165 | " FROM bsth_c_sectionroute c " + |
| 166 | - " LEFT JOIN bsth_c_section s on c.section = s.id where c.line = ?1 and c.directions = ?2", nativeQuery=true) | |
| 166 | + " LEFT JOIN bsth_c_section s on c.section = s.id where c.line = ?1 and c.directions = ?2 and c.destroy = 0", nativeQuery=true) | |
| 167 | 167 | List<Object[]> sectionRouteVector(Integer lineId,Integer directions); |
| 168 | 168 | |
| 169 | 169 | @Transactional | ... | ... |
src/main/java/com/bsth/repository/StationRouteRepository.java
| ... | ... | @@ -153,7 +153,7 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int |
| 153 | 153 | "s.station_route_code," + |
| 154 | 154 | "s.directions," + |
| 155 | 155 | "s.distances,"+ |
| 156 | - "s.station FROM bsth_c_stationroute s where s.line = ?1) a " + | |
| 156 | + "s.station FROM bsth_c_stationroute s where s.line = ?1 and s.destroy=0) a " + | |
| 157 | 157 | "LEFT JOIN bsth_c_station b " + |
| 158 | 158 | " on a.station = b.id ORDER BY a.directions ASC ) k ORDER BY k.directions,k.station_route_code ASC", nativeQuery=true) |
| 159 | 159 | List<Object[]> usingSingle(Integer lineId); |
| ... | ... | @@ -259,8 +259,9 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int |
| 259 | 259 | @Query("select s from StationRoute s where s.destroy=0 and s.lineCode=?1") |
| 260 | 260 | List<StationRoute> findByLineCode(String lineCode); |
| 261 | 261 | |
| 262 | - @Query("SELECT " + | |
| 263 | - "lineCode,directions,stationName,stationCode " + | |
| 262 | + @Query("SELECT new map(" + | |
| 263 | + "lineCode as lineCode,directions as directions,stationName as stationName,stationCode as stationCode," + | |
| 264 | + "line.linePlayType as linePlayType,s.stationMark as stationMark) " + | |
| 264 | 265 | "FROM " + |
| 265 | 266 | "StationRoute s " + |
| 266 | 267 | "WHERE " + |
| ... | ... | @@ -268,7 +269,7 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int |
| 268 | 269 | "and s.lineCode in(select lineCode from Line where inUse = 1) " + |
| 269 | 270 | "ORDER BY " + |
| 270 | 271 | "lineCode,directions,stationRouteCode") |
| 271 | - List<Object[]> findAllLineWithYgc(); | |
| 272 | + List<Map<String, String>> findAllLineWithYgc(); | |
| 272 | 273 | |
| 273 | 274 | @Modifying |
| 274 | 275 | @Query(value="update bsth_c_stationroute set directions = case directions when 1 then 0 when 0 then 1 end where line_code = ?1 ", nativeQuery=true) | ... | ... |
src/main/java/com/bsth/repository/traffic/SKBUploadLoggerRepository.java
0 → 100644
src/main/java/com/bsth/service/TrafficManageService.java
| 1 | 1 | package com.bsth.service; |
| 2 | 2 | |
| 3 | +import java.util.Map; | |
| 4 | + | |
| 3 | 5 | /** |
| 4 | 6 | * |
| 5 | 7 | * @Interface: LineService(线路service业务层实现接口) |
| ... | ... | @@ -22,7 +24,7 @@ public interface TrafficManageService { |
| 22 | 24 | * |
| 23 | 25 | * @return 调用接口返回信息 |
| 24 | 26 | */ |
| 25 | - String setXL(); | |
| 27 | + String setXL(Map<String, Object> param); | |
| 26 | 28 | |
| 27 | 29 | /** |
| 28 | 30 | * 上传车辆信息 |
| ... | ... | @@ -65,6 +67,8 @@ public interface TrafficManageService { |
| 65 | 67 | |
| 66 | 68 | String setLD(); |
| 67 | 69 | |
| 70 | + String setLDFile(); | |
| 71 | + | |
| 68 | 72 | String setLCYH(); |
| 69 | 73 | |
| 70 | 74 | String setDDRB(); | ... | ... |
src/main/java/com/bsth/service/excep/impl/OutboundServiceImpl.java
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| 1 | 1 | package com.bsth.service.forms.impl; |
| 2 | 2 | |
| 3 | +import java.math.BigDecimal; | |
| 3 | 4 | import java.sql.ResultSet; |
| 4 | 5 | import java.sql.SQLException; |
| 5 | 6 | import java.text.DecimalFormat; |
| ... | ... | @@ -151,6 +152,40 @@ public class FormsServiceImpl implements FormsService { |
| 151 | 152 | w.setSh(String.valueOf(sh)); |
| 152 | 153 | |
| 153 | 154 | } |
| 155 | + | |
| 156 | + Waybillday way = new Waybillday(); | |
| 157 | + way.setNbbm("汇总合计"); | |
| 158 | + BigDecimal ksgl = new BigDecimal("0.0"); | |
| 159 | + BigDecimal jzl_ = new BigDecimal("0.0"); | |
| 160 | + BigDecimal sh_ = new BigDecimal("0.0"); | |
| 161 | + BigDecimal lc_ = new BigDecimal("0.0"); | |
| 162 | + BigDecimal yh_ = new BigDecimal("0.0"); | |
| 163 | + for(Waybillday w : list){ | |
| 164 | + if(w.getJzl1() != null && w.getJzl1().trim().length() != 0){ | |
| 165 | + ksgl = ksgl.add(new BigDecimal(w.getJzl1().trim())); | |
| 166 | + } | |
| 167 | + if(w.getJzl() != null && w.getJzl().trim().length() != 0){ | |
| 168 | + jzl_ = jzl_.add(new BigDecimal(w.getJzl().trim())); | |
| 169 | + } | |
| 170 | + if(w.getSh() != null && w.getSh().trim().length() != 0){ | |
| 171 | + sh_ = sh_.add(new BigDecimal(w.getSh().trim())); | |
| 172 | + } | |
| 173 | + if(w.getZlc() != null && w.getZlc().trim().length() != 0){ | |
| 174 | + lc_ = lc_.add(new BigDecimal(w.getZlc().trim())); | |
| 175 | + } | |
| 176 | + if(w.getYh() != null && w.getYh().trim().length() != 0){ | |
| 177 | + yh_ = yh_.add(new BigDecimal(w.getYh().trim())); | |
| 178 | + } | |
| 179 | + } | |
| 180 | + way.setJzl1(ksgl.toString()); | |
| 181 | + way.setJzl(jzl_.toString()); | |
| 182 | + way.setjName(""); | |
| 183 | + way.setSh(sh_.toString()); | |
| 184 | + way.setZlc(lc_.toString()); | |
| 185 | + way.setYh(yh_.toString()); | |
| 186 | + if(list.size() > 0) | |
| 187 | + list.add(way); | |
| 188 | + | |
| 154 | 189 | return list; |
| 155 | 190 | } |
| 156 | 191 | |
| ... | ... | @@ -205,12 +240,15 @@ public class FormsServiceImpl implements FormsService { |
| 205 | 240 | if(map.containsKey("fgsdmManth")){ |
| 206 | 241 | fgsdmManth=map.get("fgsdmManth").toString(); |
| 207 | 242 | } |
| 208 | - String sql = "select" | |
| 209 | - + " r.j_name, r.cl_zbh,r.j_gh,r.s_gh,r.s_name " | |
| 210 | -// + "r.gs_bm,r.gs_name," | |
| 211 | -// + " r.fgs_bm,r.fgs_name,r.bc_type,r.lp_name " | |
| 212 | - + " from bsth_c_s_sp_info_real r " | |
| 213 | - + " where 1=1 "; | |
| 243 | + String sql ="select "; | |
| 244 | + if(empnames.equals("驾驶员")){ | |
| 245 | + sql += " r.j_name,r.j_gh "; | |
| 246 | + }else if(empnames.equals("售票员")){ | |
| 247 | + sql += " r.s_gh,r.s_name"; | |
| 248 | + }else{ | |
| 249 | + sql += " r.cl_zbh"; | |
| 250 | + } | |
| 251 | + sql += " from bsth_c_s_sp_info_real r where 1=1 "; | |
| 214 | 252 | if(map.get("startDate")!=null&&!map.get("startDate").equals("")){ |
| 215 | 253 | sql+=" and to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') "; |
| 216 | 254 | } |
| ... | ... | @@ -227,12 +265,16 @@ public class FormsServiceImpl implements FormsService { |
| 227 | 265 | // } |
| 228 | 266 | if(map.get("fgsdmManth")!=null&&!map.get("fgsdmManth").equals("")){ |
| 229 | 267 | sql+=" and r.fgs_bm like'%"+fgsdmManth+"%' "; |
| 230 | - } | |
| 231 | - if(empnames.equals("售票员")){ | |
| 232 | - sql+="and r.s_name is not null AND r.s_name !=''"; | |
| 233 | 268 | } |
| 269 | + if(empnames.equals("驾驶员")){ | |
| 234 | 270 | sql += " GROUP BY " |
| 235 | - + "r.j_name, r.cl_zbh,r.j_gh,r.s_gh,r.s_name "; | |
| 271 | + + "r.j_name,r.j_gh"; | |
| 272 | + }else if(empnames.equals("售票员")){ | |
| 273 | + sql+="and r.s_name is not null AND r.s_name !='' GROUP BY r.s_gh,r.s_name"; | |
| 274 | + }else{ | |
| 275 | + sql += " GROUP BY r.cl_zbh"; | |
| 276 | + } | |
| 277 | + | |
| 236 | 278 | // + ",r.gs_bm,r.gs_name," |
| 237 | 279 | // + "r.fgs_bm,r.fgs_name,r.bc_type "; |
| 238 | 280 | |
| ... | ... | @@ -244,15 +286,16 @@ public class FormsServiceImpl implements FormsService { |
| 244 | 286 | public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 245 | 287 | Shiftuehiclemanth shif = new Shiftuehiclemanth(); |
| 246 | 288 | if(empnames.equals("驾驶员")){ |
| 247 | - shif.setjName(arg0.getString("j_name")); | |
| 289 | + shif.setjName(arg0.getString("j_name")+"/"+arg0.getString("j_gh")); | |
| 290 | + shif.setJgh(arg0.getString("j_gh")); | |
| 248 | 291 | }else if(empnames.equals("售票员")){ |
| 249 | - shif.setjName(arg0.getString("s_name")==null ? "":arg0.getString("s_name")); | |
| 292 | + shif.setjName(arg0.getString("s_name")+"/"+arg0.getString("s_gh")); | |
| 250 | 293 | shif.setSgh(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh")); |
| 251 | 294 | }else if(empnames.equals("车辆自编号")){ |
| 252 | 295 | shif.setjName(arg0.getString("cl_zbh")); |
| 253 | 296 | } |
| 254 | - shif.setJgh(arg0.getString("j_gh")); | |
| 255 | - shif.setZbh(arg0.getString("cl_zbh")); | |
| 297 | +// shif.setJgh(arg0.getString("j_gh")); | |
| 298 | +// shif.setZbh(arg0.getString("cl_zbh")); | |
| 256 | 299 | // shif.setjName(arg0.getString("s_gh")==null ? "":arg0.getString("s_gh")); |
| 257 | 300 | return shif; |
| 258 | 301 | } |
| ... | ... | @@ -274,11 +317,11 @@ public class FormsServiceImpl implements FormsService { |
| 274 | 317 | } |
| 275 | 318 | }else if(empnames.equals("售票员")){ |
| 276 | 319 | String sgh=s.getsGh()==null?"":s.getsGh(); |
| 277 | - if(d.getSgh().equals(sgh) && d.getZbh().equals(s.getClZbh())){ | |
| 320 | + if(d.getSgh().equals(sgh)){ | |
| 278 | 321 | sList.add(s); |
| 279 | 322 | } |
| 280 | 323 | }else if(empnames.equals("车辆自编号")){ |
| 281 | - if(d.getZbh().equals(s.getClZbh())){ | |
| 324 | + if(d.getjName().equals(s.getClZbh())){ | |
| 282 | 325 | sList.add(s); |
| 283 | 326 | } |
| 284 | 327 | } |
| ... | ... | @@ -307,6 +350,34 @@ public class FormsServiceImpl implements FormsService { |
| 307 | 350 | |
| 308 | 351 | } |
| 309 | 352 | |
| 353 | + Shiftuehiclemanth shif = new Shiftuehiclemanth(); | |
| 354 | + shif.setjName("汇总合计"); | |
| 355 | + BigDecimal yylc = new BigDecimal("0.0"); | |
| 356 | + BigDecimal kslc = new BigDecimal("0.0"); | |
| 357 | + BigDecimal cjlc = new BigDecimal("0.0"); | |
| 358 | + BigDecimal zjlc = new BigDecimal("0.0"); | |
| 359 | + BigDecimal zlc = new BigDecimal("0.0"); | |
| 360 | + int cjbc = 0, zjbc = 0, sjbc = 0; | |
| 361 | + for(Shiftuehiclemanth s : list){ | |
| 362 | + yylc = yylc.add(new BigDecimal(s.getJhlc())); | |
| 363 | + kslc = kslc.add(new BigDecimal(s.getEmptMileage())); | |
| 364 | + cjlc = cjlc.add(new BigDecimal(s.getRemMileage())); | |
| 365 | + zjlc = zjlc.add(new BigDecimal(s.getAddMileage())); | |
| 366 | + zlc = zlc.add(new BigDecimal(s.getTotalm())); | |
| 367 | + cjbc += Integer.valueOf(s.getCjbc()); | |
| 368 | + zjbc += Integer.valueOf(s.getLjbc()); | |
| 369 | + sjbc += Integer.valueOf(s.getSjbc()); | |
| 370 | + } | |
| 371 | + shif.setJhlc(yylc.toString()); | |
| 372 | + shif.setEmptMileage(kslc.toString()); | |
| 373 | + shif.setRemMileage(cjlc.toString()); | |
| 374 | + shif.setAddMileage(zjlc.toString()); | |
| 375 | + shif.setTotalm(zlc.toString()); | |
| 376 | + shif.setCjbc("" + cjbc); | |
| 377 | + shif.setLjbc("" + zjbc); | |
| 378 | + shif.setSjbc("" + sjbc); | |
| 379 | + if(list.size() > 0) | |
| 380 | + list.add(shif); | |
| 310 | 381 | |
| 311 | 382 | return list; |
| 312 | 383 | } |
| ... | ... | @@ -395,7 +466,47 @@ public class FormsServiceImpl implements FormsService { |
| 395 | 466 | d.setLjbc(String.valueOf(ljbc));//增加班次 |
| 396 | 467 | d.setAddMileage(String.valueOf(zjgl));//增加公里 |
| 397 | 468 | d.setSjjhbc(String.valueOf(sjbc));//实际计划班次 |
| 398 | - } | |
| 469 | + } | |
| 470 | + | |
| 471 | + Shifday shif = new Shifday(); | |
| 472 | + shif.setjName("汇总合计"); | |
| 473 | + BigDecimal jhlc = new BigDecimal("0.0"); | |
| 474 | + BigDecimal sjlc = new BigDecimal("0.0"); | |
| 475 | + BigDecimal yylc = new BigDecimal("0.0"); | |
| 476 | + BigDecimal kslc = new BigDecimal("0.0"); | |
| 477 | + BigDecimal cjlc = new BigDecimal("0.0"); | |
| 478 | + BigDecimal zjlc = new BigDecimal("0.0"); | |
| 479 | + BigDecimal zlc = new BigDecimal("0.0"); | |
| 480 | + int jhbc = 0, sjjhbc = 0, cjbc = 0, zjbc = 0, sjbc = 0; | |
| 481 | + for(Shifday s : list){ | |
| 482 | + jhlc = jhlc.add(new BigDecimal(s.getJhlc())); | |
| 483 | + sjlc = sjlc.add(new BigDecimal(s.getSjjhlc())); | |
| 484 | + yylc = yylc.add(new BigDecimal(s.getYygl())); | |
| 485 | + kslc = kslc.add(new BigDecimal(s.getEmptMileage())); | |
| 486 | + cjlc = cjlc.add(new BigDecimal(s.getRemMileage())); | |
| 487 | + zjlc = zjlc.add(new BigDecimal(s.getAddMileage())); | |
| 488 | + zlc = zlc.add(new BigDecimal(s.getTotalm())); | |
| 489 | + jhbc += Integer.valueOf(s.getJhbc()); | |
| 490 | + sjjhbc += Integer.valueOf(s.getSjjhbc()); | |
| 491 | + cjbc += Integer.valueOf(s.getCjbc()); | |
| 492 | + zjbc += Integer.valueOf(s.getLjbc()); | |
| 493 | + sjbc += Integer.valueOf(s.getSjbc()); | |
| 494 | + } | |
| 495 | + shif.setJhlc(jhlc.toString()); | |
| 496 | + shif.setSjjhlc(sjlc.toString()); | |
| 497 | + shif.setYygl(yylc.toString()); | |
| 498 | + shif.setEmptMileage(kslc.toString()); | |
| 499 | + shif.setRemMileage(cjlc.toString()); | |
| 500 | + shif.setAddMileage(zjlc.toString()); | |
| 501 | + shif.setTotalm(zlc.toString()); | |
| 502 | + shif.setJhbc("" + jhbc); | |
| 503 | + shif.setSjjhbc("" + sjjhbc); | |
| 504 | + shif.setCjbc("" + cjbc); | |
| 505 | + shif.setLjbc("" + zjbc); | |
| 506 | + shif.setSjbc("" + sjbc); | |
| 507 | + if(list.size() > 0) | |
| 508 | + list.add(shif); | |
| 509 | + | |
| 399 | 510 | return list; |
| 400 | 511 | } |
| 401 | 512 | |
| ... | ... | @@ -866,9 +977,11 @@ public class FormsServiceImpl implements FormsService { |
| 866 | 977 | |
| 867 | 978 | List<ScheduleRealInfo> list = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, startDate, endDate, company, subCompany); |
| 868 | 979 | List<Line> lineList = lineRepository.findLineBygsBm(company, subCompany, line.length()==0?"%"+line+"%":line); |
| 869 | - | |
| 870 | - String sql = "select * from bsth_c_s_sp_info where gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"' " | |
| 871 | - + "and DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"+startDate+"' and '"+endDate+"' "; | |
| 980 | + | |
| 981 | + String sql = "select gs_name, fgs_name, cl_zbh, fcsj, bc_type, xl_bm, xl_name, schedule_date" | |
| 982 | + + " from bsth_c_s_sp_info where gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"' " | |
| 983 | + + "and DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"' " | |
| 984 | + + "and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"' "; | |
| 872 | 985 | if(line.trim().length() != 0){ |
| 873 | 986 | sql += "and xl_bm = '"+line+"' "; |
| 874 | 987 | } |
| ... | ... | @@ -957,12 +1070,10 @@ public class FormsServiceImpl implements FormsService { |
| 957 | 1070 | } |
| 958 | 1071 | } |
| 959 | 1072 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 960 | - int jhcc = 0; | |
| 961 | - int sjcc = 0; | |
| 962 | - int jhbc = 0; | |
| 963 | - int sjbc = 0; | |
| 1073 | + int jhcc = 0, sjcc = 0; | |
| 1074 | + int jhbc = 0, sjbc = 0; | |
| 964 | 1075 | int qz = 0; |
| 965 | - for(Map<String, Object> m : tempList){ | |
| 1076 | + for(Map<String, Object> m : resList){ | |
| 966 | 1077 | jhcc += Integer.valueOf(m.get("jhcc").toString()); |
| 967 | 1078 | sjcc += Integer.valueOf(m.get("sjcc").toString()); |
| 968 | 1079 | jhbc += Integer.valueOf(m.get("jhbc").toString()); |
| ... | ... | @@ -970,7 +1081,7 @@ public class FormsServiceImpl implements FormsService { |
| 970 | 1081 | qz += Integer.valueOf(m.get("qz").toString()); |
| 971 | 1082 | } |
| 972 | 1083 | tempMap.put("rq", "分类汇总"); |
| 973 | - tempMap.put("line", "共" + tempList.size() + "条线路"); | |
| 1084 | + tempMap.put("line", "共" + resList.size() + "条线路"); | |
| 974 | 1085 | tempMap.put("jhcc", jhcc); |
| 975 | 1086 | tempMap.put("sjcc", sjcc); |
| 976 | 1087 | tempMap.put("jhbc", jhbc); | ... | ... |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| ... | ... | @@ -421,10 +421,10 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 421 | 421 | long fcsj1 = fcsjs.get(i - 1); |
| 422 | 422 | long fcsj2 = fcsjs.get(i); |
| 423 | 423 | Long time = fcsj1/60; |
| 424 | - if(!timeMap0.containsKey(time) && !timeMap1.containsKey(time)){ | |
| 424 | + if(!timeMap0.containsKey(time)){ | |
| 425 | 425 | timeMap0.put(time, new ArrayList<Long>()); |
| 426 | - timeMap1.put(time, new ArrayList<Long>()); | |
| 427 | - timeList.add(time); | |
| 426 | + if(!timeList.contains(time)) | |
| 427 | + timeList.add(time); | |
| 428 | 428 | } |
| 429 | 429 | timeMap0.get(time).add(fcsj2 - fcsj1); |
| 430 | 430 | } |
| ... | ... | @@ -432,6 +432,11 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 432 | 432 | long fcsj1 = fcsjAs.get(i - 1); |
| 433 | 433 | long fcsj2 = fcsjAs.get(i); |
| 434 | 434 | Long time = fcsj1/60; |
| 435 | + if(!timeMap1.containsKey(time)){ | |
| 436 | + timeMap1.put(time, new ArrayList<Long>()); | |
| 437 | + if(!timeList.contains(time)) | |
| 438 | + timeList.add(time); | |
| 439 | + } | |
| 435 | 440 | if(timeMap1.containsKey(time)){ |
| 436 | 441 | timeMap1.get(time).add(fcsj2 - fcsj1); |
| 437 | 442 | } |
| ... | ... | @@ -440,9 +445,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 440 | 445 | for(int i = 1; i < fcsjs.size(); i++){ |
| 441 | 446 | long fcsj1 = fcsjs.get(i - 1); |
| 442 | 447 | long fcsj2 = fcsjs.get(i); |
| 443 | - if(!temp0.containsKey(key) && !temp1.containsKey(key)){ | |
| 448 | + if(!temp0.containsKey(key)){ | |
| 444 | 449 | temp0.put(key, new ArrayList<Long>()); |
| 445 | - temp1.put(key, new ArrayList<Long>()); | |
| 446 | 450 | if(!keyList.contains(key)) |
| 447 | 451 | keyList.add(key); |
| 448 | 452 | } |
| ... | ... | @@ -451,6 +455,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 451 | 455 | for(int i = 1; i < fcsjAs.size(); i++){ |
| 452 | 456 | long fcsj1 = fcsjAs.get(i - 1); |
| 453 | 457 | long fcsj2 = fcsjAs.get(i); |
| 458 | + if(!temp1.containsKey(key)){ | |
| 459 | + temp1.put(key, new ArrayList<Long>()); | |
| 460 | + if(!keyList.contains(key)) | |
| 461 | + keyList.add(key); | |
| 462 | + } | |
| 463 | + System.out.println("key:"+key+" fcsj2:"+fcsj2+" fcsj1:"+fcsj2+" temp1:"+temp1.get(key)+" tem0:"+temp0.get(key)); | |
| 454 | 464 | temp1.get(key).add(fcsj2 - fcsj1); |
| 455 | 465 | } |
| 456 | 466 | } |
| ... | ... | @@ -461,14 +471,16 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 461 | 471 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 462 | 472 | List<Long> fcsjs = new ArrayList<Long>(); |
| 463 | 473 | List<Long> fcsjAs = new ArrayList<Long>(); |
| 464 | - for(Long l : timeMap0.get(time)){ | |
| 465 | - if(l < 90) | |
| 466 | - fcsjs.add(l); | |
| 467 | - } | |
| 468 | - for(Long l : timeMap1.get(time)){ | |
| 469 | - if(l < 90) | |
| 470 | - fcsjAs.add(l); | |
| 471 | - } | |
| 474 | + if(timeMap0.containsKey(time)) | |
| 475 | + for(Long l : timeMap0.get(time)){ | |
| 476 | + if(l < 90) | |
| 477 | + fcsjs.add(l); | |
| 478 | + } | |
| 479 | + if(timeMap1.containsKey(time)) | |
| 480 | + for(Long l : timeMap1.get(time)){ | |
| 481 | + if(l < 90) | |
| 482 | + fcsjAs.add(l); | |
| 483 | + } | |
| 472 | 484 | Collections.sort(fcsjs); |
| 473 | 485 | Collections.sort(fcsjAs); |
| 474 | 486 | String[] split = key.split("/"); |
| ... | ... | @@ -495,7 +507,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 495 | 507 | tempMap.put("deviation", df.format(Double.valueOf(tempMap.get("sjInterval").toString()) |
| 496 | 508 | - Double.valueOf(tempMap.get("jhInterval").toString()))); |
| 497 | 509 | } |
| 498 | - tempList.add(tempMap); | |
| 510 | + if(fcsjs.size() != 0 || fcsjAs.size() != 0) | |
| 511 | + tempList.add(tempMap); | |
| 499 | 512 | } |
| 500 | 513 | } |
| 501 | 514 | } |
| ... | ... | @@ -504,11 +517,24 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 504 | 517 | List<Long> sortList = new ArrayList<Long>(); |
| 505 | 518 | Map<Long, List<Map<String, Object>>> sortMap = new HashMap<Long, List<Map<String, Object>>>(); |
| 506 | 519 | for(Map<String, Object> m : tempList){ |
| 507 | - Long sort = Long.valueOf(m.get("times").toString().substring(0, 2)); | |
| 520 | + String times = m.get("times").toString(); | |
| 521 | + Long sort = Long.valueOf(times.substring(0, 2)); | |
| 508 | 522 | if(!sortMap.containsKey(sort)){ |
| 509 | 523 | sortMap.put(sort, new ArrayList<Map<String, Object>>()); |
| 510 | 524 | sortList.add(sort); |
| 511 | 525 | } |
| 526 | + String[] split = times.split("-"); | |
| 527 | + String[] split0 = split[0].split(":"); | |
| 528 | + String[] split1 = split[1].split(":"); | |
| 529 | + int t0 = Integer.valueOf(split0[0]); | |
| 530 | + int t1 = Integer.valueOf(split1[0]); | |
| 531 | + if(t0 >= 24){ | |
| 532 | + t0 = t0 - 24; | |
| 533 | + } | |
| 534 | + if(t1 >= 24){ | |
| 535 | + t1 = t1 - 24; | |
| 536 | + } | |
| 537 | + m.put("times", (t0>9?t0:("0"+t0))+":"+split0[1]+"-"+(t1>9?t1:("0"+t1))+":"+split1[1]); | |
| 512 | 538 | sortMap.get(sort).add(m); |
| 513 | 539 | } |
| 514 | 540 | Collections.sort(sortList); |
| ... | ... | @@ -531,14 +557,16 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 531 | 557 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 532 | 558 | List<Long> fcsjs = new ArrayList<Long>(); |
| 533 | 559 | List<Long> fcsjAs = new ArrayList<Long>(); |
| 534 | - for(Long l : temp0.get(key)){ | |
| 535 | - if(l < 90) | |
| 536 | - fcsjs.add(l); | |
| 537 | - } | |
| 538 | - for(Long l : temp1.get(key)){ | |
| 539 | - if(l < 90) | |
| 540 | - fcsjAs.add(l); | |
| 541 | - } | |
| 560 | + if(temp0.containsKey(key)) | |
| 561 | + for(Long l : temp0.get(key)){ | |
| 562 | + if(l < 90) | |
| 563 | + fcsjs.add(l); | |
| 564 | + } | |
| 565 | + if(temp0.containsKey(key)) | |
| 566 | + for(Long l : temp1.get(key)){ | |
| 567 | + if(l < 90) | |
| 568 | + fcsjAs.add(l); | |
| 569 | + } | |
| 542 | 570 | Collections.sort(fcsjs); |
| 543 | 571 | Collections.sort(fcsjAs); |
| 544 | 572 | long fcsj = 0l; |
| ... | ... | @@ -563,7 +591,8 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 563 | 591 | tempMap.put("deviation", df.format(Double.valueOf(tempMap.get("sjInterval").toString()) |
| 564 | 592 | - Double.valueOf(tempMap.get("jhInterval").toString()))); |
| 565 | 593 | } |
| 566 | - resList.add(tempMap); | |
| 594 | + if(fcsjs.size() != 0 || fcsjAs.size() != 0) | |
| 595 | + resList.add(tempMap); | |
| 567 | 596 | } |
| 568 | 597 | } |
| 569 | 598 | } |
| ... | ... | @@ -601,6 +630,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 601 | 630 | Map<String, List<ChildTaskPlan>> cMap = new HashMap<String, List<ChildTaskPlan>>(); |
| 602 | 631 | Map<String, Object> modelMap = new HashMap<String, Object>(); |
| 603 | 632 | Set<Long> tsSet = new HashSet<Long>(); |
| 633 | + Set<Long> ttSet = new HashSet<Long>(); | |
| 604 | 634 | |
| 605 | 635 | String company = map.get("company").toString(); |
| 606 | 636 | String subCompany = map.get("subCompany").toString(); |
| ... | ... | @@ -639,7 +669,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 639 | 669 | } |
| 640 | 670 | where += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; |
| 641 | 671 | |
| 642 | - String sql = "select * from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"'" | |
| 672 | + String sql = "select id, schedule_date_Str, real_exec_date, xl_name, lp_name, bcs, bcsj, jhlc," | |
| 673 | + + " fcsj, fcsj_actual, zdsj, zdsj_actual, qdz_name, zdz_name, xl_dir, status, remarks, gs_name, fgs_name, sp_id" | |
| 674 | + + " from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"'" | |
| 643 | 675 | + " and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'"+where+""; |
| 644 | 676 | |
| 645 | 677 | list = jdbcTemplate.query(sql, |
| ... | ... | @@ -652,11 +684,9 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 652 | 684 | schedule.setRealExecDate(rs.getString("real_exec_date")); |
| 653 | 685 | schedule.setXlName(rs.getString("xl_name")); |
| 654 | 686 | schedule.setLpName(rs.getString("lp_name")); |
| 655 | - schedule.setBcType(rs.getString("bc_type")); | |
| 656 | 687 | schedule.setBcs(rs.getInt("bcs")); |
| 657 | 688 | schedule.setBcsj(rs.getInt("bcsj")); |
| 658 | 689 | schedule.setJhlc(rs.getDouble("jhlc")); |
| 659 | - schedule.setDfsj(rs.getString("dfsj")); | |
| 660 | 690 | schedule.setFcsj(rs.getString("fcsj")); |
| 661 | 691 | schedule.setFcsjActual(rs.getString("fcsj_actual")); |
| 662 | 692 | schedule.setZdsj(rs.getString("zdsj")); |
| ... | ... | @@ -668,12 +698,6 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 668 | 698 | schedule.setRemarks(rs.getString("remarks")); |
| 669 | 699 | schedule.setGsName(rs.getString("gs_name")); |
| 670 | 700 | schedule.setFgsName(rs.getString("fgs_name")); |
| 671 | - schedule.setDfAuto(rs.getBoolean("df_auto")); | |
| 672 | - schedule.setOnline(rs.getBoolean("online")); | |
| 673 | - schedule.setClZbh(rs.getString("cl_zbh")); | |
| 674 | - schedule.setjGh(rs.getString("j_gh")); | |
| 675 | - schedule.setjName(rs.getString("j_name")); | |
| 676 | - schedule.setStatus(rs.getInt("status")); | |
| 677 | 701 | schedule.setSpId(rs.getLong("sp_id")); |
| 678 | 702 | |
| 679 | 703 | if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){ |
| ... | ... | @@ -726,7 +750,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 726 | 750 | { |
| 727 | 751 | List<Map<String, String>> temp1 = new ArrayList<Map<String, String>>(); |
| 728 | 752 | List<Map<String, String>> temp2 = new ArrayList<Map<String, String>>(); |
| 729 | - sql = "select * from bsth_c_s_sp_info where bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 753 | + sql = "select id, lp, fcsj, xl_bm, tt_info from bsth_c_s_sp_info where bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 730 | 754 | |
| 731 | 755 | if(startDate.equals(endDate)){ |
| 732 | 756 | sql += " and schedule_date = '"+startDate+"'"; |
| ... | ... | @@ -782,7 +806,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 782 | 806 | } |
| 783 | 807 | } |
| 784 | 808 | |
| 785 | - sql = "select * from bsth_c_s_child_task order by start_date"; | |
| 809 | + sql = "select destroy, start_date, end_date, mileage, mileage_type, schedule from bsth_c_s_child_task order by start_date"; | |
| 786 | 810 | |
| 787 | 811 | cList = jdbcTemplate.query(sql, |
| 788 | 812 | new RowMapper<ChildTaskPlan>(){ |
| ... | ... | @@ -798,10 +822,12 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 798 | 822 | return cTask; |
| 799 | 823 | } |
| 800 | 824 | }); |
| 801 | - | |
| 825 | + | |
| 802 | 826 | if(model.length() != 0){ |
| 803 | - sql = "select sp.id from bsth_c_s_sp_info sp left join bsth_c_s_ttinfo_detail tt on sp.tt_info = tt.ttinfo and sp.xl_bm = tt.xl and sp.lp = tt.lp and sp.fcsj = tt.fcsj " | |
| 804 | - + "where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 827 | + sql = "select sp.id from " | |
| 828 | + + "(select id, tt_info, xl_bm, lp, fcsj from bsth_c_s_sp_info where schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'" | |
| 829 | + + " and tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks') sp" | |
| 830 | + + " left join bsth_c_s_ttinfo_detail tt on sp.tt_info = tt.ttinfo and sp.xl_bm = tt.xl and sp.lp = tt.lp and sp.fcsj = tt.fcsj"; | |
| 805 | 831 | |
| 806 | 832 | ttList = jdbcTemplate.query(sql, |
| 807 | 833 | new RowMapper<Map<String, Object>>(){ |
| ... | ... | @@ -809,10 +835,14 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 809 | 835 | public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { |
| 810 | 836 | Map<String, Object> m = new HashMap<String, Object>(); |
| 811 | 837 | m.put("id", rs.getString("id")); |
| 812 | - m.put("ists", rs.getString("ists")!=null?rs.getString("ists"):"0"); | |
| 838 | +// m.put("ists", rs.getString("ists")!=null?rs.getString("ists"):"0"); | |
| 813 | 839 | return m; |
| 814 | 840 | } |
| 815 | 841 | }); |
| 842 | + | |
| 843 | + for(Map<String, Object> m : ttList){ | |
| 844 | + ttSet.add(Long.valueOf(m.get("id").toString())); | |
| 845 | + } | |
| 816 | 846 | } |
| 817 | 847 | |
| 818 | 848 | } catch (Exception e) { |
| ... | ... | @@ -852,15 +882,21 @@ public class BusIntervalServiceImpl implements BusIntervalService { |
| 852 | 882 | if(schedule.getXlName()==null || schedule.getXlName().trim().length()==0) |
| 853 | 883 | continue; |
| 854 | 884 | if(model.length() != 0){ |
| 855 | - for(Map<String, Object> tt : ttList){ | |
| 856 | - long id = Long.valueOf(tt.get("id").toString()); | |
| 857 | - if(id == (long)schedule.getSpId()){ | |
| 858 | - String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName(); | |
| 859 | - if(!keyMap.containsKey(key)) | |
| 860 | - keyMap.put(key, new ArrayList<ScheduleRealInfo>()); | |
| 861 | - keyMap.get(key).add(schedule); | |
| 862 | - } | |
| 885 | + if(ttSet.contains(schedule.getSpId())){ | |
| 886 | + String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName(); | |
| 887 | + if(!keyMap.containsKey(key)) | |
| 888 | + keyMap.put(key, new ArrayList<ScheduleRealInfo>()); | |
| 889 | + keyMap.get(key).add(schedule); | |
| 863 | 890 | } |
| 891 | +// for(Map<String, Object> tt : ttList){ | |
| 892 | +// long id = Long.valueOf(tt.get("id").toString()); | |
| 893 | +// if(id == (long)schedule.getSpId()){ | |
| 894 | +// String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName(); | |
| 895 | +// if(!keyMap.containsKey(key)) | |
| 896 | +// keyMap.put(key, new ArrayList<ScheduleRealInfo>()); | |
| 897 | +// keyMap.get(key).add(schedule); | |
| 898 | +// } | |
| 899 | +// } | |
| 864 | 900 | }else{ |
| 865 | 901 | String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName(); |
| 866 | 902 | if(!keyMap.containsKey(key)) | ... | ... |
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
| ... | ... | @@ -24,6 +24,7 @@ import org.springframework.transaction.annotation.Transactional; |
| 24 | 24 | |
| 25 | 25 | import java.io.ByteArrayInputStream; |
| 26 | 26 | import java.io.File; |
| 27 | +import java.io.FileOutputStream; | |
| 27 | 28 | import java.io.InputStream; |
| 28 | 29 | import java.text.DecimalFormat; |
| 29 | 30 | import java.util.*; |
| ... | ... | @@ -511,57 +512,38 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 511 | 512 | */ |
| 512 | 513 | @Override |
| 513 | 514 | public Map<String, Object> usingSingle(Map<String, Object> map) { |
| 514 | - | |
| 515 | 515 | // 返回值map |
| 516 | 516 | Map<String, Object> resultMap = new HashMap<String,Object>(); |
| 517 | - | |
| 518 | 517 | try { |
| 519 | - | |
| 520 | 518 | // 获取线路ID |
| 521 | 519 | Integer lineId = map.get("lineId").equals("") ? 0 : Integer.parseInt(map.get("lineId").toString()); |
| 522 | - | |
| 523 | 520 | /** 查询线路信息 @param:<lineId:线路ID> */ |
| 524 | 521 | Line line = lineRepository.findOne(lineId); |
| 525 | - | |
| 526 | 522 | /** 查询线路信息下的站点路由信息 @param:<lineId:线路ID> */ |
| 527 | 523 | List<Object[]> objects = repository.usingSingle(lineId); |
| 528 | - | |
| 529 | 524 | if (objects.size()>0) { |
| 530 | - | |
| 531 | 525 | /** 获取配置文件里的ftp登录参数 */ |
| 532 | 526 | Map<String, Object> FTPParamMap = readPropertiesGetFTPParam(); |
| 533 | - | |
| 534 | 527 | // 压缩文件名 |
| 535 | 528 | String odlGzFileName = line.getLineCode() + ".txt.gz"; |
| 536 | - | |
| 537 | 529 | // txt文件名 |
| 538 | 530 | String textFileName = line.getLineCode() + ".txt"; |
| 539 | - | |
| 540 | 531 | // 创建一个ftp上传实例 |
| 541 | 532 | FTPClientUtils clientUtils = new FTPClientUtils(); |
| 542 | - | |
| 543 | 533 | // IP |
| 544 | 534 | String url = FTPParamMap.get("url").toString(); |
| 545 | - | |
| 546 | 535 | // 端口 |
| 547 | 536 | int port = Integer.valueOf(FTPParamMap.get("port").toString()); |
| 548 | - | |
| 549 | 537 | // 用户名 |
| 550 | 538 | String username = FTPParamMap.get("username").toString(); |
| 551 | - | |
| 552 | 539 | // 密码 |
| 553 | 540 | String password = FTPParamMap.get("password").toString(); |
| 554 | - | |
| 555 | 541 | // 相对路径 |
| 556 | 542 | String remotePath = FTPParamMap.get("remotePath").toString(); |
| 557 | - | |
| 558 | 543 | /** 如果已存在相同行单文件名则先删除 */ |
| 559 | 544 | clientUtils.deleteFtpFile(url, port, username, password, remotePath, odlGzFileName); |
| 560 | - | |
| 561 | 545 | clientUtils.deleteFtpFile(url, port, username, password, remotePath, textFileName); |
| 562 | - | |
| 563 | 546 | String textStr = ""; |
| 564 | - | |
| 565 | 547 | boolean tempTag = ishxType(objects); |
| 566 | 548 | |
| 567 | 549 | if(tempTag) |
| ... | ... | @@ -575,6 +557,12 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 575 | 557 | |
| 576 | 558 | InputStream input = new ByteArrayInputStream(textStr.getBytes("gbk")); |
| 577 | 559 | |
| 560 | + // FileOutputStream fos = new FileOutputStream("test.txt"); | |
| 561 | + /*int len = 0 ; | |
| 562 | + byte[] cbuf = new byte[1024]; | |
| 563 | + while((len = input.read(cbuf)) != -1) { | |
| 564 | + fos.write(cbuf, 0, len); | |
| 565 | + }*/ | |
| 578 | 566 | /** 生成txt文件,上传ftp */ |
| 579 | 567 | clientUtils.uploadFile(url, port, username, password, remotePath, textFileName, input); |
| 580 | 568 | |
| ... | ... | @@ -645,25 +633,23 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 645 | 633 | * @return String |
| 646 | 634 | */ |
| 647 | 635 | public String newTextFileToFTP(List<Object[]> objects,Integer lineId) { |
| 648 | - | |
| 649 | 636 | // 返回值String |
| 650 | 637 | String stationRStr = ""; |
| 651 | - | |
| 652 | 638 | // windows下的文本文件换行符 |
| 653 | 639 | //String enterStr = "\r\n"; |
| 654 | - | |
| 655 | 640 | // linux/unix下的文本文件换行符 |
| 656 | 641 | String enterStr = "\r"; |
| 657 | - | |
| 642 | + int defaultZdxh = 0; | |
| 658 | 643 | if(objects.size()>0) { |
| 659 | - | |
| 660 | 644 | for(int i = 0; i<objects.size();i++) { |
| 661 | - | |
| 645 | + defaultZdxh ++ ; | |
| 662 | 646 | // 经度 |
| 663 | - String lng = objects.get(i)[0].equals("") ? "" : objects.get(i)[0].toString(); | |
| 647 | + String lng = objects.get(i)[0].equals("") ? "0" : objects.get(i)[0].toString(); | |
| 664 | 648 | |
| 665 | 649 | // 纬度 |
| 666 | - String lat = objects.get(i)[1].equals("") ? "" : objects.get(i)[1].toString(); | |
| 650 | + String lat = objects.get(i)[1].equals("") ? "0" : objects.get(i)[1].toString(); | |
| 651 | + | |
| 652 | + Point point = new Point(Double.valueOf(lng), Double.valueOf(lat)); | |
| 667 | 653 | |
| 668 | 654 | lat = "\t" + lat; |
| 669 | 655 | |
| ... | ... | @@ -673,23 +659,32 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 673 | 659 | String stationMake = ""; |
| 674 | 660 | |
| 675 | 661 | if(stationMakeStr.equals("E")) { |
| 676 | - | |
| 677 | 662 | stationMake = "\t2"; |
| 678 | - | |
| 679 | 663 | }else { |
| 680 | - | |
| 681 | 664 | stationMake ="\t1"; |
| 682 | - | |
| 683 | 665 | } |
| 684 | 666 | |
| 685 | 667 | // 站点序号 |
| 686 | - String stationNo = objects.get(i)[4].equals("") ? "" : objects.get(i)[4].toString(); | |
| 668 | + // String stationNo = objects.get(i)[4].equals("") ? "" : objects.get(i)[4].toString(); | |
| 669 | + String stationNo = String.valueOf(defaultZdxh); | |
| 687 | 670 | |
| 688 | 671 | stationNo = "\t" + stationNo; |
| 689 | 672 | |
| 690 | 673 | // 站点编码 |
| 691 | 674 | String stationCode = objects.get(i)[5].equals("") ? "" : objects.get(i)[5].toString(); |
| 692 | 675 | |
| 676 | + int len = stationCode.length(); | |
| 677 | + if(len<8) { | |
| 678 | + int dx = 8 - len; | |
| 679 | + String addStr = ""; | |
| 680 | + for(int p =0;p<dx;p++) { | |
| 681 | + addStr = addStr + "0"; | |
| 682 | + } | |
| 683 | + stationCode = addStr + stationCode; | |
| 684 | + }else if(len>8){ | |
| 685 | + stationCode = stationCode.substring(8); | |
| 686 | + } | |
| 687 | + | |
| 693 | 688 | stationCode = "\t" +stationCode; |
| 694 | 689 | |
| 695 | 690 | double dis = objects.get(i)[6]==null ? 0.0 : Double.parseDouble(objects.get(i)[6].toString())*1000; |
| ... | ... | @@ -709,41 +704,33 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 709 | 704 | |
| 710 | 705 | // 限速 |
| 711 | 706 | String sleepStr = ""; |
| 712 | - | |
| 713 | 707 | // 方向 |
| 714 | 708 | int directions = objects.get(i)[8]==null ? null : Integer.valueOf(objects.get(i)[8].toString()); |
| 715 | - | |
| 716 | 709 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ |
| 717 | 710 | List<Object[]> sobje = routeRepository.sectionRouteVector(lineId,directions); |
| 718 | - | |
| 719 | 711 | if(sobje.size()==1) { |
| 720 | - | |
| 721 | - double dsleepStr = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(0)[2].toString()); | |
| 722 | - | |
| 723 | - sleepStr = "\t" + new DecimalFormat("0").format(dsleepStr); | |
| 724 | - | |
| 712 | + int dsleepStr = sobje.get(0)[2] == null || sobje.get(0)[2].equals("") ? 60 : Integer.valueOf(sobje.get(0)[2].toString()); | |
| 713 | + sleepStr = "\t" + String.valueOf(dsleepStr); | |
| 725 | 714 | }else if(sobje.size()>1){ |
| 726 | - | |
| 727 | - /** 这里暂时只根据站点名称去匹配所在路段的限速值 ,如果路段名称"至"之前的地名与站点名称等同,就认为站点在路段上。 */ | |
| 728 | 715 | for(int j =0;j<sobje.size();j++) { |
| 729 | - | |
| 730 | - String sectionName = sobje.get(j)[3].toString(); | |
| 731 | - | |
| 732 | - String sectionNameA[] = sectionName.split("至"); | |
| 733 | - | |
| 734 | - if(stationName.equals(sectionNameA[0])){ | |
| 735 | - | |
| 736 | - /*sleepStr = sobje.get(j)[2].toString();*/ | |
| 737 | - | |
| 738 | - double dsleepStrt = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(j)[2].toString()); | |
| 739 | - | |
| 740 | - sleepStr = "\t" + new DecimalFormat("0").format(dsleepStrt); | |
| 741 | - | |
| 716 | + double dsleepStrt = sobje.get(j)[2] == null || sobje.get(j)[2].equals("") ? 60d : Double.valueOf(sobje.get(j)[2].toString()); | |
| 717 | + String pointsStr = sobje.get(j)[1]==null || sobje.get(j)[1].equals("") ? null : sobje.get(j)[1].toString(); | |
| 718 | + pointsStr = pointsStr.substring(11, pointsStr.length()-1); | |
| 719 | + List<Point> ps = new ArrayList<>(); | |
| 720 | + String[] pArray = pointsStr.split(","); | |
| 721 | + for(int a = 0; a <pArray.length; a++) { | |
| 722 | + String[] tmepA = pArray[a].split(" "); | |
| 723 | + Point temp = new Point(Double.valueOf(tmepA[0]), Double.valueOf(tmepA[1])); | |
| 724 | + ps.add(temp); | |
| 725 | + } | |
| 726 | + if(GeoUtils.isInSection(ps, point)) { | |
| 727 | + sleepStr = "\t" + String.valueOf((int)dsleepStrt); | |
| 728 | + break; | |
| 742 | 729 | } |
| 743 | - | |
| 744 | 730 | } |
| 745 | 731 | } |
| 746 | - | |
| 732 | + if(sleepStr.equals("")) | |
| 733 | + sleepStr = "\t" + "60"; | |
| 747 | 734 | stationRStr = stationRStr + lng + lat + stationMake + stationNo + stationCode + staitondistance + sleepStr + stationName + enterStr; |
| 748 | 735 | } |
| 749 | 736 | |
| ... | ... | @@ -762,9 +749,12 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 762 | 749 | for(int i = 0; i<objects.size();i++) { |
| 763 | 750 | if(Integer.valueOf(objects.get(i)[8].toString())==0) { |
| 764 | 751 | // 经度 |
| 765 | - String lng = objects.get(i)[0].equals("") ? "" : objects.get(i)[0].toString(); | |
| 752 | + String lng = objects.get(i)[0].equals("") ? "0" : objects.get(i)[0].toString(); | |
| 753 | + | |
| 766 | 754 | // 纬度 |
| 767 | - String lat = objects.get(i)[1].equals("") ? "" : objects.get(i)[1].toString(); | |
| 755 | + String lat = objects.get(i)[1].equals("") ? "0" : objects.get(i)[1].toString(); | |
| 756 | + | |
| 757 | + Point point = new Point(Double.valueOf(lng), Double.valueOf(lat)); | |
| 768 | 758 | lat = "\t" + lat; |
| 769 | 759 | // 站点类型 |
| 770 | 760 | String stationMakeStr = objects.get(i)[3].equals("") ? "" : objects.get(i)[3].toString(); |
| ... | ... | @@ -779,6 +769,17 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 779 | 769 | String stationNo = "\t" + xh; |
| 780 | 770 | // 站点编码 |
| 781 | 771 | String stationCode = objects.get(i)[5].equals("") ? "" : objects.get(i)[5].toString(); |
| 772 | + int len = stationCode.length(); | |
| 773 | + if(len<8) { | |
| 774 | + int dx = 8 - len; | |
| 775 | + String addStr = ""; | |
| 776 | + for(int p =0;p<dx;p++) { | |
| 777 | + addStr = addStr + "0"; | |
| 778 | + } | |
| 779 | + stationCode = addStr + stationCode; | |
| 780 | + }else if(len>8){ | |
| 781 | + stationCode = stationCode.substring(8); | |
| 782 | + } | |
| 782 | 783 | stationCode = "\t" +stationCode; |
| 783 | 784 | double dis = objects.get(i)[6]==null ? 0.0 : Double.parseDouble(objects.get(i)[6].toString())*1000; |
| 784 | 785 | String tempDistc = String.valueOf((int) dis); |
| ... | ... | @@ -794,20 +795,28 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ |
| 794 | 795 | /** 获取路段路由信息 @pararm:<lineId:线路ID;directions:方向> */ |
| 795 | 796 | List<Object[]> sobje = routeRepository.sectionRouteVector(lineId,directions); |
| 796 | 797 | if(sobje.size()==1) { |
| 797 | - double dsleepStr = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(0)[2].toString()); | |
| 798 | - sleepStr = "\t" + new DecimalFormat("0").format(dsleepStr); | |
| 798 | + int dsleepStr = sobje.get(0)[2] == null || sobje.get(0)[2].equals("") ? 60 : Integer.valueOf(sobje.get(0)[2].toString()); | |
| 799 | + sleepStr = "\t" + String.valueOf(dsleepStr); | |
| 799 | 800 | }else if(sobje.size()>1){ |
| 800 | - /** 这里暂时只根据站点名称去匹配所在路段的限速值 ,如果路段名称"至"之前的地名与站点名称等同,就认为站点在路段上。 */ | |
| 801 | 801 | for(int j =0;j<sobje.size();j++) { |
| 802 | - String sectionName = sobje.get(j)[3].toString(); | |
| 803 | - String sectionNameA[] = sectionName.split("至"); | |
| 804 | - if(stationName.equals(sectionNameA[0])){ | |
| 805 | - /*sleepStr = sobje.get(j)[2].toString();*/ | |
| 806 | - double dsleepStrt = sobje.get(0)[2] == null ? 60d : Double.valueOf(sobje.get(j)[2].toString()); | |
| 807 | - sleepStr = "\t" + new DecimalFormat("0").format(dsleepStrt); | |
| 802 | + double dsleepStrt = sobje.get(j)[2] == null || sobje.get(j)[2].equals("") ? 60d : Double.valueOf(sobje.get(j)[2].toString()); | |
| 803 | + String pointsStr = sobje.get(j)[1]==null || sobje.get(j)[1].equals("") ? null : sobje.get(j)[1].toString(); | |
| 804 | + pointsStr = pointsStr.substring(11, pointsStr.length()-1); | |
| 805 | + List<Point> ps = new ArrayList<>(); | |
| 806 | + String[] pArray = pointsStr.split(","); | |
| 807 | + for(int a = 0; a <pArray.length; a++) { | |
| 808 | + String[] tmepA = pArray[a].split(" "); | |
| 809 | + Point temp = new Point(Double.valueOf(tmepA[0]), Double.valueOf(tmepA[1])); | |
| 810 | + ps.add(temp); | |
| 811 | + } | |
| 812 | + if(GeoUtils.isInSection(ps, point)) { | |
| 813 | + sleepStr = "\t" + String.valueOf((int)dsleepStrt); | |
| 814 | + break; | |
| 808 | 815 | } |
| 809 | 816 | } |
| 810 | 817 | } |
| 818 | + if(sleepStr.equals("")) | |
| 819 | + sleepStr = "\t" + "60"; | |
| 811 | 820 | xh++; |
| 812 | 821 | restStr = restStr + lng + lat + stationMake + stationNo + stationCode + staitondistance + sleepStr + stationName + enterStr; |
| 813 | 822 | } | ... | ... |
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
| ... | ... | @@ -8,9 +8,13 @@ import com.bsth.entity.schedule.SchedulePlanInfo; |
| 8 | 8 | import com.bsth.entity.schedule.TTInfo; |
| 9 | 9 | import com.bsth.entity.schedule.TTInfoDetail; |
| 10 | 10 | import com.bsth.entity.search.CustomerSpecs; |
| 11 | +import com.bsth.entity.sys.SysUser; | |
| 12 | +import com.bsth.entity.traffic.SKBUploadLogger; | |
| 11 | 13 | import com.bsth.repository.*; |
| 12 | 14 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 13 | 15 | import com.bsth.repository.schedule.*; |
| 16 | +import com.bsth.repository.traffic.SKBUploadLoggerRepository; | |
| 17 | +import com.bsth.security.util.SecurityUtils; | |
| 14 | 18 | import com.bsth.service.TrafficManageService; |
| 15 | 19 | import com.bsth.util.TimeUtils; |
| 16 | 20 | import com.bsth.util.db.DBUtils_MS; |
| ... | ... | @@ -101,6 +105,10 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 101 | 105 | @Autowired |
| 102 | 106 | private ScheduleRealInfoRepository scheduleRealInfoRepository; |
| 103 | 107 | |
| 108 | + // 时刻表上传记录repository | |
| 109 | + @Autowired | |
| 110 | + private SKBUploadLoggerRepository skbUploadLoggerRepository; | |
| 111 | + | |
| 104 | 112 | |
| 105 | 113 | // 运管处接口 |
| 106 | 114 | private InternalPortType portType = null;//new Internal().getInternalHttpSoap11Endpoint(); |
| ... | ... | @@ -134,12 +142,19 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 134 | 142 | * 上传线路信息 |
| 135 | 143 | */ |
| 136 | 144 | @Override |
| 137 | - public String setXL() { | |
| 145 | + public String setXL(Map<String, Object> param) { | |
| 138 | 146 | String result = "failure"; |
| 139 | 147 | StringBuffer sBuffer = new StringBuffer(); |
| 140 | 148 | try { |
| 141 | - Iterator<Line> lineIterator = lineRepository.findAll().iterator(); | |
| 149 | + Map<String,Object> map = new HashMap<String,Object>(); | |
| 150 | + map.put("lineCode_eq", param.get("xl.lineCode_like")+""); | |
| 151 | + Iterator<Line> lineIterator; | |
| 142 | 152 | Line line = null; |
| 153 | + if(param.get("xl.lineCode_like").equals("")){ | |
| 154 | + lineIterator = lineRepository.findAll().iterator(); | |
| 155 | + }else { | |
| 156 | + line = lineRepository.findOne(new CustomerSpecs<Line>(map)); | |
| 157 | + } | |
| 143 | 158 | List<StationRoute> upStationsList = null;// 上行站点路由集 |
| 144 | 159 | List<StationRoute> downStationsList = null;// 下行站点路由集 |
| 145 | 160 | List<LineInformation> lineInformationsList = null; |
| ... | ... | @@ -147,14 +162,15 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 147 | 162 | sBuffer.append("<Data>"); |
| 148 | 163 | sBuffer.append("<RequestOrg>上海巴士拓华科技发展有限公司</RequestOrg>"); |
| 149 | 164 | sBuffer.append("<DataList>"); |
| 150 | - while(lineIterator.hasNext()){ | |
| 151 | - line = lineIterator.next(); | |
| 152 | - if(!line.getName().equals("浦江4路")){ | |
| 153 | - continue; | |
| 154 | - } | |
| 155 | - if(BasicData.lineId2ShangHaiCodeMap.get(line.getId()) == null | |
| 165 | +// while(lineIterator.hasNext()){ | |
| 166 | +// line = lineIterator.next(); | |
| 167 | +// if(BasicData.lineId2ShangHaiCodeMap.get(line.getId()) == null | |
| 168 | +// || line.getInUse() == 0){ | |
| 169 | +// continue; | |
| 170 | +// } | |
| 171 | + if(BasicData.lineId2ShangHaiCodeMap.get(line.getId()) == null | |
| 156 | 172 | || line.getInUse() == 0){ |
| 157 | - continue; | |
| 173 | + return result; | |
| 158 | 174 | } |
| 159 | 175 | sBuffer.append("<LINE_ID>").append(line.getId()).append("</LINE_ID>"); |
| 160 | 176 | sBuffer.append("<LINE_CODE>").append(BasicData.lineId2ShangHaiCodeMap.get(line.getId())).append("</LINE_CODE>"); |
| ... | ... | @@ -165,18 +181,24 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 165 | 181 | upStationsList = stationRouteRepository.findByLine(line.getLineCode(), 0); |
| 166 | 182 | int startId = 1; |
| 167 | 183 | startId = packagStationXml(upStationsList, sBuffer, startId); |
| 168 | - // 再查下行 | |
| 169 | - downStationsList = stationRouteRepository.findByLine(line.getLineCode(), 1); | |
| 170 | - packagStationXml(downStationsList, sBuffer, startId); | |
| 184 | + // 环线不查下行 | |
| 185 | + if(line.getLinePlayType() != 1){ | |
| 186 | + // 再查下行 | |
| 187 | + downStationsList = stationRouteRepository.findByLine(line.getLineCode(), 1); | |
| 188 | + packagStationXml(downStationsList, sBuffer, startId); | |
| 189 | + } | |
| 171 | 190 | sBuffer.append("</LineStationList>"); |
| 172 | 191 | |
| 173 | 192 | // 循环添加站点点位信息 |
| 174 | 193 | sBuffer.append("<LinePointList>"); |
| 175 | 194 | startId = 1; |
| 176 | 195 | startId = packagStationPointXml(upStationsList, sBuffer, startId); |
| 177 | - packagStationPointXml(downStationsList, sBuffer, startId); | |
| 196 | + // 环线不查下行 | |
| 197 | + if(line.getLinePlayType() != 1){ | |
| 198 | + packagStationPointXml(downStationsList, sBuffer, startId); | |
| 199 | + } | |
| 178 | 200 | sBuffer.append("</LinePointList>"); |
| 179 | - } | |
| 201 | +// } | |
| 180 | 202 | sBuffer.append("</DataList>"); |
| 181 | 203 | sBuffer.append("</Data>"); |
| 182 | 204 | System.out.println(sBuffer.toString()); |
| ... | ... | @@ -301,6 +323,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 301 | 323 | List<ScheduleRealInfo> list = scheduleRealInfoRepository.setLD(date); |
| 302 | 324 | List<Map<String,Object>> listGroup = scheduleRealInfoRepository.setLDGroup(date); |
| 303 | 325 | Map<String,Object> map = new HashMap<String,Object>(); |
| 326 | + HashMap<String,String> paramMap; | |
| 327 | + HashMap<String,String> otherMap = new HashMap<String, String>(); | |
| 304 | 328 | for(Map<String,Object> schRealInfo:listGroup){ |
| 305 | 329 | if(schRealInfo != null){ |
| 306 | 330 | //根据车辆自编号查询车牌号 |
| ... | ... | @@ -347,16 +371,20 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 347 | 371 | sf.append("<SJGH>"+scheduleRealInfo.getjGh()+"</SJGH>"); |
| 348 | 372 | sf.append("<SXX>"+scheduleRealInfo.getXlDir()+"</SXX>"); |
| 349 | 373 | sf.append("<FCZDMC>"+scheduleRealInfo.getQdzName()+"</FCZDMC>"); |
| 350 | - sf.append("<FCZDXH>" + getYgcStationNumByLineCodeAndDirectionAndStationName( | |
| 351 | - scheduleRealInfo.getXlBm(), scheduleRealInfo.getXlDir(), scheduleRealInfo.getQdzCode()) + "</FCZDXH>"); | |
| 374 | + // 起点站的参数 | |
| 375 | + otherMap.put("stationMark","B"); | |
| 376 | + paramMap = packageYgcStationNumParam(scheduleRealInfo,otherMap); | |
| 377 | + sf.append("<FCZDXH>" + getYgcStationNumByLineCodeAndDirectionAndStationName(paramMap) + "</FCZDXH>"); | |
| 352 | 378 | sf.append("<FCZDBM>"+scheduleRealInfo.getQdzCode()+"</FCZDBM>"); |
| 353 | 379 | sf.append("<JHFCSJ>"+scheduleRealInfo.getFcsj()+"</JHFCSJ>"); |
| 354 | 380 | sf.append("<DFSJ>"+scheduleRealInfo.getDfsj()+"</DFSJ>"); |
| 355 | 381 | sf.append("<SJFCSJ>"+scheduleRealInfo.getFcsjActual()+"</SJFCSJ>"); |
| 356 | 382 | sf.append("<FCZDLX>"+""+"</FCZDLX>"); |
| 357 | 383 | sf.append("<DDZDMC>"+scheduleRealInfo.getZdzName()+"</DDZDMC>"); |
| 358 | - sf.append("<DDZDXH>"+ getYgcStationNumByLineCodeAndDirectionAndStationName( | |
| 359 | - scheduleRealInfo.getXlBm(), scheduleRealInfo.getXlDir(), scheduleRealInfo.getZdzCode()) +"</DDZDXH>"); | |
| 384 | + // 终点站的参数 | |
| 385 | + otherMap.put("stationMark","E"); | |
| 386 | + paramMap = packageYgcStationNumParam(scheduleRealInfo,otherMap); | |
| 387 | + sf.append("<DDZDXH>"+ getYgcStationNumByLineCodeAndDirectionAndStationName(paramMap) +"</DDZDXH>"); | |
| 360 | 388 | sf.append("<DDZDBM>"+scheduleRealInfo.getZdzCode()+"</DDZDBM>"); |
| 361 | 389 | sf.append("<JHDDSJ>"+scheduleRealInfo.getZdsj()+"</JHDDSJ>"); |
| 362 | 390 | sf.append("<SJDDSJ>"+scheduleRealInfo.getZdsjActual()+"</SJDDSJ>"); |
| ... | ... | @@ -650,6 +678,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 650 | 678 | List<SchedulePlanInfo> schedulePlanList = schedulePlanInfoRepository.findLineScheduleBc(tomorrow); |
| 651 | 679 | int j = 0; // 初始化标识 |
| 652 | 680 | if(schedulePlanList != null ){ |
| 681 | + HashMap<String,String> paramMap; | |
| 682 | + HashMap<String,String> otherMap = new HashMap<String, String>(); | |
| 653 | 683 | int size = schedulePlanList.size(); |
| 654 | 684 | for (int i = 0; i < size; i++) { |
| 655 | 685 | schedulePlanInfo = schedulePlanList.get(i); |
| ... | ... | @@ -676,12 +706,16 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 676 | 706 | sBuffer.append("<SJGH>").append(schedulePlanInfo.getjGh()).append("</SJGH>"); |
| 677 | 707 | sBuffer.append("<SXX>").append(schedulePlanInfo.getXlDir()).append("</SXX>"); |
| 678 | 708 | sBuffer.append("<FCZDMC>").append(schedulePlanInfo.getQdzName()).append("</FCZDMC>"); |
| 679 | - sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName( | |
| 680 | - schedulePlanInfo.getXlBm(), schedulePlanInfo.getXlDir(), schedulePlanInfo.getQdzCode())).append("</ZDXH>"); | |
| 709 | + // 起点站的参数 | |
| 710 | + otherMap.put("stationMark","B"); | |
| 711 | + paramMap = packageYgcStationNumParam(schedulePlanInfo,otherMap); | |
| 712 | + sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(paramMap)).append("</ZDXH>"); | |
| 681 | 713 | sBuffer.append("<JHFCSJ>").append(schedulePlanInfo.getFcsj()).append("</JHFCSJ>"); |
| 682 | 714 | sBuffer.append("<DDZDMC>").append(schedulePlanInfo.getZdzName()).append("</DDZDMC>"); |
| 683 | - sBuffer.append("<DDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName( | |
| 684 | - schedulePlanInfo.getXlBm(), schedulePlanInfo.getXlDir(), schedulePlanInfo.getZdzCode())).append("</DDXH>"); | |
| 715 | + // 起点站的参数 | |
| 716 | + otherMap.put("stationMark","E"); | |
| 717 | + paramMap = packageYgcStationNumParam(schedulePlanInfo,otherMap); | |
| 718 | + sBuffer.append("<DDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(paramMap)).append("</DDXH>"); | |
| 685 | 719 | sBuffer.append("<JHDDSJ>").append(calcDdsj(schedulePlanInfo.getFcsj(),schedulePlanInfo.getBcsj())) |
| 686 | 720 | .append("</JHDDSJ>"); |
| 687 | 721 | sBuffer.append("</BC>"); |
| ... | ... | @@ -737,16 +771,20 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 737 | 771 | String[] idArray = ids.split(","); |
| 738 | 772 | StringBuffer sBufferA; |
| 739 | 773 | StringBuffer sBufferB; |
| 774 | + // 上传的时刻表集合 | |
| 775 | + List<TTInfo> ttinfoList = new ArrayList<>(); | |
| 740 | 776 | TTInfo ttInfo; |
| 741 | 777 | TTInfoDetail ttInfoDetail; |
| 742 | 778 | Iterator<TTInfoDetail> ttInfoDetailIterator; |
| 743 | 779 | HashMap<String,Object> param = new HashMap<String, Object>(); |
| 744 | - String lineCode ; | |
| 745 | 780 | sBuffer.append("<SKBs>"); |
| 781 | + HashMap<String,String> paramMap; | |
| 782 | + HashMap<String,String> otherMap = new HashMap<String, String>(); | |
| 746 | 783 | for (int i = 0; i < idArray.length; i++) { |
| 747 | 784 | ttInfo = ttInfoRepository.findOne(Long.valueOf(idArray[i])); |
| 748 | 785 | if(ttInfo == null) |
| 749 | 786 | continue; |
| 787 | + ttinfoList.add(ttInfo); // 保存时刻表 | |
| 750 | 788 | param.put("ttinfo.id_eq", ttInfo.getId()); |
| 751 | 789 | ttInfoDetailIterator = ttInfoDetailRepository.findAll(new CustomerSpecs<TTInfoDetail>(param), |
| 752 | 790 | new Sort(Direction.ASC, "xlDir")).iterator(); |
| ... | ... | @@ -774,7 +812,6 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 774 | 812 | sBufferA.append("<JHYYLC>").append(ttInfoDetail.getJhlc()).append("</JHYYLC>"); |
| 775 | 813 | sBuffer.append(sBufferA).append(sBufferB); |
| 776 | 814 | } |
| 777 | - lineCode = ttInfoDetail.getXl().getLineCode(); | |
| 778 | 815 | // 如果发车时间格式错误,忽略此条 |
| 779 | 816 | if(changeTimeFormat(ttInfoDetail) == null){ |
| 780 | 817 | continue; |
| ... | ... | @@ -783,12 +820,16 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 783 | 820 | sBuffer.append("<LPBH>").append(ttInfoDetail.getLp().getLpNo()).append("</LPBH>"); |
| 784 | 821 | sBuffer.append("<SXX>").append(ttInfoDetail.getXlDir()).append("</SXX>"); |
| 785 | 822 | sBuffer.append("<FCZDMC>").append(ttInfoDetail.getQdz().getStationName()).append("</FCZDMC>"); |
| 786 | - sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName( | |
| 787 | - lineCode, ttInfoDetail.getXlDir(), ttInfoDetail.getQdz().getStationCod())).append("</ZDXH>"); | |
| 823 | + // 起点站的参数 | |
| 824 | + otherMap.put("stationMark","B"); | |
| 825 | + paramMap = packageYgcStationNumParam(ttInfoDetail,otherMap); | |
| 826 | + sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(paramMap)).append("</ZDXH>"); | |
| 788 | 827 | sBuffer.append("<JHFCSJ>").append(changeTimeFormat(ttInfoDetail)).append("</JHFCSJ>"); |
| 789 | 828 | sBuffer.append("<DDZDMC>").append(ttInfoDetail.getZdz().getStationName()).append("</DDZDMC>"); |
| 790 | - sBuffer.append("<DDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName( | |
| 791 | - lineCode, ttInfoDetail.getXlDir(), ttInfoDetail.getZdz().getStationCod())).append("</DDXH>"); | |
| 829 | + // 起点站的参数 | |
| 830 | + otherMap.put("stationMark","E"); | |
| 831 | + paramMap = packageYgcStationNumParam(ttInfoDetail,otherMap); | |
| 832 | + sBuffer.append("<DDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(paramMap)).append("</DDXH>"); | |
| 792 | 833 | sBuffer.append("<JHDDSJ>").append(calcDdsj(ttInfoDetail.getFcsj(),ttInfoDetail.getBcsj())).append("</JHDDSJ>"); |
| 793 | 834 | sBuffer.append("</BC>"); |
| 794 | 835 | } |
| ... | ... | @@ -799,6 +840,15 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 799 | 840 | sBuffer.append("</SKBs>"); |
| 800 | 841 | if(ssop.setSKB(userNameOther, passwordOther, sBuffer.toString()).isSuccess()){ |
| 801 | 842 | result = "success"; |
| 843 | + SKBUploadLogger skbUploadLogger ; | |
| 844 | + SysUser user = SecurityUtils.getCurrentUser(); | |
| 845 | + // 保存时刻表上传记录 | |
| 846 | + for(TTInfo ttInfo1 : ttinfoList){ | |
| 847 | + skbUploadLogger = new SKBUploadLogger(); | |
| 848 | + skbUploadLogger.setTtInfo(ttInfo1); | |
| 849 | + skbUploadLogger.setUser(user); | |
| 850 | + skbUploadLoggerRepository.save(skbUploadLogger); | |
| 851 | + } | |
| 802 | 852 | } |
| 803 | 853 | } catch (Exception e) { |
| 804 | 854 | logger.error("setSKB:", e); |
| ... | ... | @@ -1136,6 +1186,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 1136 | 1186 | private int packagStationXml(List<StationRoute> stationsList,StringBuffer sBuffer,int startId){ |
| 1137 | 1187 | int size = stationsList.size(); |
| 1138 | 1188 | StationRoute srRoute; |
| 1189 | + HashMap<String,String> paraMap; | |
| 1139 | 1190 | String zdlx ;// 站点类型:0:起点站、1:终点站、2:中途站 |
| 1140 | 1191 | for (int i = 0; i < size; i++) { |
| 1141 | 1192 | srRoute = stationsList.get(i); |
| ... | ... | @@ -1147,10 +1198,11 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 1147 | 1198 | }else{ |
| 1148 | 1199 | zdlx = "2"; |
| 1149 | 1200 | } |
| 1201 | + paraMap = packageYgcStationNumParam(srRoute,null); | |
| 1150 | 1202 | sBuffer.append("<Station>"); |
| 1151 | - sBuffer.append("<STATION_ID>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(srRoute.getLineCode(),srRoute.getDirections()+"",srRoute.getStationCode())).append("</STATION_ID>"); | |
| 1203 | + sBuffer.append("<STATION_ID>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(paraMap)).append("</STATION_ID>"); | |
| 1152 | 1204 | sBuffer.append("<UPDDOWN>").append(srRoute.getDirections()).append("</UPDDOWN>"); |
| 1153 | - sBuffer.append("<STATION_NO>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(srRoute.getLineCode(),srRoute.getDirections()+"",srRoute.getStationCode())).append("</STATION_NO>"); | |
| 1205 | + sBuffer.append("<STATION_NO>").append(i).append("</STATION_NO>"); | |
| 1154 | 1206 | sBuffer.append("<STATION_CODE>").append(srRoute.getStationCode()).append("</STATION_CODE>"); |
| 1155 | 1207 | sBuffer.append("<STATION_NAME>").append(srRoute.getStationName()).append("</STATION_NAME>"); |
| 1156 | 1208 | sBuffer.append("<STATION_LON>").append(srRoute.getStation().getgLonx()).append("</STATION_LON>"); |
| ... | ... | @@ -1173,6 +1225,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 1173 | 1225 | private int packagStationPointXml(List<StationRoute> stationsList,StringBuffer sBuffer,int startId){ |
| 1174 | 1226 | int size = stationsList.size(); |
| 1175 | 1227 | StationRoute srRoute; |
| 1228 | + HashMap<String,String> paraMap; | |
| 1176 | 1229 | String zdlx ;// 站点类型:0:起点站、1:终点站、2:中途站 |
| 1177 | 1230 | for (int i = 0; i < size; i++) { |
| 1178 | 1231 | srRoute = stationsList.get(i); |
| ... | ... | @@ -1184,8 +1237,9 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 1184 | 1237 | }else{ |
| 1185 | 1238 | zdlx = "2"; |
| 1186 | 1239 | } |
| 1240 | + paraMap = packageYgcStationNumParam(srRoute,null); | |
| 1187 | 1241 | sBuffer.append("<Point>"); |
| 1188 | - sBuffer.append("<POINT_ID>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(srRoute.getLineCode(),srRoute.getDirections()+"",srRoute.getStationCode())).append("</POINT_ID>"); | |
| 1242 | + sBuffer.append("<POINT_ID>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(paraMap)).append("</POINT_ID>"); | |
| 1189 | 1243 | sBuffer.append("<UPDDOWN>").append(srRoute.getDirections()).append("</UPDDOWN>"); |
| 1190 | 1244 | sBuffer.append("<POINTLON>").append(srRoute.getStation().getgLonx()).append("</POINTLON>"); |
| 1191 | 1245 | sBuffer.append("<POINTLAT>").append(srRoute.getStation().getgLaty()).append("</POINTLAT>"); |
| ... | ... | @@ -1196,15 +1250,94 @@ public class TrafficManageServiceImpl implements TrafficManageService{ |
| 1196 | 1250 | } |
| 1197 | 1251 | |
| 1198 | 1252 | /** |
| 1199 | - * | |
| 1200 | - * @param lineCode 线路编码 | |
| 1201 | - * @param direction 线路方向 | |
| 1202 | - * @param stationCode 让点名称 | |
| 1253 | + * 获取运管处站点序号 | |
| 1254 | + * @param map | |
| 1203 | 1255 | * @return 运管处站点序号 |
| 1204 | 1256 | */ |
| 1205 | - private Integer getYgcStationNumByLineCodeAndDirectionAndStationName(String lineCode,String direction,String stationCode){ | |
| 1206 | - Integer number = 0; | |
| 1207 | - number = BasicData.stationName2YgcNumber.get(lineCode+"_"+direction+"_"+stationCode); | |
| 1257 | + private Integer getYgcStationNumByLineCodeAndDirectionAndStationName(HashMap<String,String> map){ | |
| 1258 | + // 线路编码 | |
| 1259 | + String lineCode = map.get("lineCode"); | |
| 1260 | + // 线路走向 0:上行 1:下行 | |
| 1261 | + String direction = map.get("direction"); | |
| 1262 | + // 站点编码 | |
| 1263 | + String stationCode = map.get("stationCode"); | |
| 1264 | + // 站点类型:B:起点站 Z:中途站 E:终点站 T:停车场 | |
| 1265 | + String stationMark = map.get("stationMark"); | |
| 1266 | + String[] marks = null; | |
| 1267 | + // 起点站,先从起点找,找不到再从中途站找,最后从终点找 | |
| 1268 | + if(stationMark.equals("B")){ | |
| 1269 | + marks= new String[]{"B","Z","E"}; | |
| 1270 | + }else if(stationMark.equals("E")){// 终点站相反 | |
| 1271 | + marks= new String[]{"E","Z","B"}; | |
| 1272 | + }else if(stationMark.equals("Z")){ | |
| 1273 | + marks= new String[]{"Z"}; | |
| 1274 | + } | |
| 1275 | + Integer number = null; | |
| 1276 | + for (int i = 0 ;i < marks.length ; i ++){ | |
| 1277 | + number = BasicData.stationName2YgcNumber.get(lineCode+"_"+direction+"_"+stationCode+"_"+marks[i]); | |
| 1278 | + if(number != null){ | |
| 1279 | + break; | |
| 1280 | + } | |
| 1281 | + } | |
| 1208 | 1282 | return number == null ? 0 : number; |
| 1209 | 1283 | } |
| 1284 | + | |
| 1285 | + /** | |
| 1286 | + * 封装查询站序条件 | |
| 1287 | + * @param obj | |
| 1288 | + * @return | |
| 1289 | + */ | |
| 1290 | + private HashMap packageYgcStationNumParam(Object obj,HashMap<String,String> otherParam){ | |
| 1291 | + HashMap<String,String> map = new HashMap<String,String>(); | |
| 1292 | + String lineCode = "",direction = "",stationCode = "",stationMark = ""; | |
| 1293 | + // 站点路由 | |
| 1294 | + if(obj instanceof StationRoute){ | |
| 1295 | + StationRoute sr = (StationRoute)obj; | |
| 1296 | + lineCode = sr.getLineCode(); | |
| 1297 | + direction = String.valueOf(sr.getDirections()); | |
| 1298 | + stationCode = sr.getStationCode(); | |
| 1299 | + stationMark = sr.getStationMark(); | |
| 1300 | + }else if(obj instanceof ScheduleRealInfo){ //实际排班计划明细。 | |
| 1301 | + ScheduleRealInfo sri = (ScheduleRealInfo)obj; | |
| 1302 | + lineCode = sri.getXlBm(); | |
| 1303 | + direction = sri.getXlDir(); | |
| 1304 | + if(otherParam != null && otherParam.get("stationMark") != null){ | |
| 1305 | + stationMark = otherParam.get("stationMark"); | |
| 1306 | + if(stationMark.equals("B")){ // 起点站 | |
| 1307 | + stationCode = sri.getQdzCode(); | |
| 1308 | + }else if(stationMark.equals("E")){ // 终点站 | |
| 1309 | + stationCode = sri.getZdzCode(); | |
| 1310 | + } | |
| 1311 | + } | |
| 1312 | + }else if(obj instanceof SchedulePlanInfo){ //排班计划明细 | |
| 1313 | + SchedulePlanInfo spi = (SchedulePlanInfo)obj; | |
| 1314 | + lineCode = spi.getXlBm(); | |
| 1315 | + direction = spi.getXlDir(); | |
| 1316 | + if(otherParam != null && otherParam.get("stationMark") != null){ | |
| 1317 | + stationMark = otherParam.get("stationMark"); | |
| 1318 | + if(stationMark.equals("B")){ // 起点站 | |
| 1319 | + stationCode = spi.getQdzCode(); | |
| 1320 | + }else if(stationMark.equals("E")){ // 终点站 | |
| 1321 | + stationCode = spi.getZdzCode(); | |
| 1322 | + } | |
| 1323 | + } | |
| 1324 | + }else if(obj instanceof TTInfoDetail){ //时刻表明细 | |
| 1325 | + TTInfoDetail ttid = (TTInfoDetail)obj; | |
| 1326 | + lineCode = ttid.getXl().getLineCode(); | |
| 1327 | + direction = ttid.getXlDir(); | |
| 1328 | + if(otherParam != null && otherParam.get("stationMark") != null){ | |
| 1329 | + stationMark = otherParam.get("stationMark"); | |
| 1330 | + if(stationMark.equals("B")){ // 起点站 | |
| 1331 | + stationCode = ttid.getQdz().getStationCod(); | |
| 1332 | + }else if(stationMark.equals("E")){ // 终点站 | |
| 1333 | + stationCode = ttid.getZdz().getStationCod(); | |
| 1334 | + } | |
| 1335 | + } | |
| 1336 | + } | |
| 1337 | + map.put("lineCode",lineCode);// 站点编码 | |
| 1338 | + map.put("direction",direction); // 上下行 | |
| 1339 | + map.put("stationCode",stationCode); // 站点编号 | |
| 1340 | + map.put("stationMark",stationMark); // 站点类型 | |
| 1341 | + return map; | |
| 1342 | + } | |
| 1210 | 1343 | } | ... | ... |
src/main/java/com/bsth/service/oil/YlbService.java
| ... | ... | @@ -19,7 +19,7 @@ public interface YlbService extends BaseService<Ylb, Integer>{ |
| 19 | 19 | |
| 20 | 20 | Map<String, Object> sumYlb(Map<String, Object> map); |
| 21 | 21 | String checkJsy(Map<String, Object> map); |
| 22 | - List<Ylb> oilListMonth(String line,String date); | |
| 22 | + List<Ylb> oilListMonth(String line,String date,String type); | |
| 23 | 23 | List<Ylb> listYlb(Map<String, Object> map); |
| 24 | 24 | StringBuffer checkNbmmNum(String rq, String gsbm,String fgsbm,String xlbm,String nbbm,int lx); |
| 25 | 25 | ... | ... |
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
| ... | ... | @@ -315,7 +315,7 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw |
| 315 | 315 | return t; |
| 316 | 316 | } |
| 317 | 317 | }); |
| 318 | - List<Ylxxb> list= ylxxbRepository.checkYlxx(rq, gsdm); | |
| 318 | + /*List<Ylxxb> list= ylxxbRepository.checkYlxx(rq, gsdm); | |
| 319 | 319 | for (int i = 0; i < yList.size(); i++) { |
| 320 | 320 | Ylxxb t=yList.get(i); |
| 321 | 321 | Double zjzl=0.0; |
| ... | ... | @@ -327,7 +327,7 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw |
| 327 | 327 | |
| 328 | 328 | } |
| 329 | 329 | t.setZjzl(zjzl); |
| 330 | - } | |
| 330 | + }*/ | |
| 331 | 331 | return yList; |
| 332 | 332 | } |
| 333 | 333 | ... | ... |
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
| ... | ... | @@ -31,6 +31,7 @@ import com.bsth.common.ResponseCode; |
| 31 | 31 | import com.bsth.data.BasicData; |
| 32 | 32 | import com.bsth.entity.Cars; |
| 33 | 33 | import com.bsth.entity.Line; |
| 34 | +import com.bsth.entity.mcy_forms.Daily; | |
| 34 | 35 | import com.bsth.entity.oil.Cyl; |
| 35 | 36 | import com.bsth.entity.oil.Ylb; |
| 36 | 37 | import com.bsth.entity.oil.Ylxxb; |
| ... | ... | @@ -44,6 +45,7 @@ import com.bsth.service.oil.YlbService; |
| 44 | 45 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 45 | 46 | import com.bsth.util.Arith; |
| 46 | 47 | import com.bsth.util.BatchSaveUtils; |
| 48 | +import com.bsth.util.ReportUtils; | |
| 47 | 49 | import com.github.abel533.echarts.code.Y; |
| 48 | 50 | |
| 49 | 51 | @Service |
| ... | ... | @@ -100,7 +102,8 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 100 | 102 | // TODO Auto-generated method stub |
| 101 | 103 | Map<String, Object> newMap=new HashMap<String,Object>(); |
| 102 | 104 | //当天YLB信息 |
| 103 | - List<Ylb> ylList=repository.obtainYl(rq,"","","","","nbbm"); | |
| 105 | +// List<Ylb> ylList=repository.obtainYl(rq,"","","","","nbbm"); | |
| 106 | + List<Ylb> ylList=this.listOrderBy(rq,"","","","","nbbm"); | |
| 104 | 107 | //当天YLXXB信息 |
| 105 | 108 | // List<Ylxxb> ylxxList=ylxxbRepository.obtainYlxx(rq); |
| 106 | 109 | //前一天所有车辆最后进场班次信息 |
| ... | ... | @@ -258,7 +261,8 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 258 | 261 | DecimalFormat df = new DecimalFormat("#.00"); |
| 259 | 262 | // TODO Auto-generated method stub |
| 260 | 263 | // 当天YLB信息 |
| 261 | - List<Ylb> ylList = repository.obtainYl(rq,gsbm,fgsbm,line,nbbm,"nbbm"); | |
| 264 | + List<Ylb> ylList = this.listOrderBy(rq,gsbm,fgsbm,line,nbbm,"nbbm"); | |
| 265 | +// repository.obtainYl(rq,gsbm,fgsbm,line,nbbm,"nbbm"); | |
| 262 | 266 | // 当天YLXXB信息 |
| 263 | 267 | List<Ylxxb> ylxxList = ylxxbRepository.obtainYlxx(rq, 0,gsbm); |
| 264 | 268 | // 前一天所有车辆最后进场班次信息 |
| ... | ... | @@ -376,18 +380,42 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 376 | 380 | if(ylMap.get(map.get("clZbh").toString()+"_"+ map.get("jGh").toString())!=null){ |
| 377 | 381 | |
| 378 | 382 | }else{ |
| 379 | - // 把当天的YLXXB的加注量设置为当天YLB的加注量(根据车号,驾驶员判断) | |
| 380 | - for (int j = 0; j < ylxxList.size(); j++) { | |
| 381 | - Ylxxb ylxxb = ylxxList.get(j); | |
| 383 | + boolean fage2=false; | |
| 384 | + for (int i = 0; i < ylxxList.size(); i++) { | |
| 385 | + Ylxxb ylxxb = ylxxList.get(i); | |
| 382 | 386 | if (map.get("clZbh").toString().equals(ylxxb.getNbbm()) |
| 383 | - && map.get("jGh").toString().equals(ylxxb.getJsy())) { | |
| 384 | - jzl =Arith.add(jzl, ylxxb.getJzl()); | |
| 387 | + && ylxxb.getJylx()==1) { | |
| 388 | + if(ylxxb.getJzl()>0){ | |
| 389 | + fage2=true; | |
| 390 | + } | |
| 391 | + | |
| 385 | 392 | } |
| 386 | 393 | } |
| 387 | - ylMap.put(map.get("clZbh").toString()+"_"+ map.get("jGh").toString(),map.get("xlBm") == null ? "" : map.get("xlBm").toString()); | |
| 394 | + //车辆的加注量如果有任工干预,略接口过来 数据 | |
| 395 | + if(fage2){ | |
| 396 | + // 把当天手工输入的的YLXXB的加注量设置为当天YLB的加注量(根据车号,驾驶员判断,加油类型为1) | |
| 397 | + for (int j = 0; j < ylxxList.size(); j++) { | |
| 398 | + Ylxxb ylxxb = ylxxList.get(j); | |
| 399 | + if (map.get("clZbh").toString().equals(ylxxb.getNbbm()) | |
| 400 | + && map.get("jGh").toString().equals(ylxxb.getJsy()) | |
| 401 | + && ylxxb.getJylx()==1) { | |
| 402 | + jzl =Arith.add(jzl, ylxxb.getJzl()); | |
| 403 | + } | |
| 404 | + } | |
| 405 | + ylMap.put(map.get("clZbh").toString()+"_"+ map.get("jGh").toString(),map.get("xlBm") == null ? "" : map.get("xlBm").toString()); | |
| 406 | + }else{ | |
| 407 | + // 把当天的YLXXB的加注量设置为当天YLB的加注量(根据车号,驾驶员判断) | |
| 408 | + for (int j = 0; j < ylxxList.size(); j++) { | |
| 409 | + Ylxxb ylxxb = ylxxList.get(j); | |
| 410 | + if (map.get("clZbh").toString().equals(ylxxb.getNbbm()) | |
| 411 | + && map.get("jGh").toString().equals(ylxxb.getJsy())) { | |
| 412 | + jzl =Arith.add(jzl, ylxxb.getJzl()); | |
| 413 | + } | |
| 414 | + } | |
| 415 | + ylMap.put(map.get("clZbh").toString()+"_"+ map.get("jGh").toString(),map.get("xlBm") == null ? "" : map.get("xlBm").toString()); | |
| 416 | + } | |
| 417 | + | |
| 388 | 418 | } |
| 389 | - | |
| 390 | - | |
| 391 | 419 | t.setJzl(jzl); |
| 392 | 420 | t.setNbbm(map.get("clZbh").toString()); |
| 393 | 421 | t.setJsy(map.get("jGh") == null ? "" : map.get("jGh").toString()); |
| ... | ... | @@ -482,13 +510,15 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 482 | 510 | List<Ylb> ylbList =new ArrayList<Ylb>(); |
| 483 | 511 | List<Ylb> ylbLists =new ArrayList<Ylb>(); |
| 484 | 512 | List<Ylb> iterator2=new ArrayList<Ylb>(); |
| 485 | - if(xlbm.equals("")){ | |
| 486 | - ylbLists=repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"jcsx"); | |
| 487 | - iterator2=repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm,jcsx"); | |
| 488 | - }else{ | |
| 489 | - ylbLists=repository.obtainYl_eq(rq,gsbm,fgsbm,xlbm,nbbm,"jcsx"); | |
| 490 | - iterator2=repository.obtainYl_eq(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm,jcsx"); | |
| 491 | - } | |
| 513 | +// if(xlbm.equals("")){ | |
| 514 | + ylbLists=this.listOrderBy(rq,gsbm,fgsbm,xlbm,nbbm,"jcsx"); | |
| 515 | +// repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"jcsx"); | |
| 516 | + iterator2=this.listOrderBy(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm,jcsx"); | |
| 517 | +// repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm,jcsx"); | |
| 518 | +// }else{ | |
| 519 | +// ylbLists=repository.obtainYl_eq(rq,gsbm,fgsbm,xlbm,nbbm,"jcsx"); | |
| 520 | +// iterator2=repository.obtainYl_eq(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm,jcsx"); | |
| 521 | +// } | |
| 492 | 522 | |
| 493 | 523 | // 从排班表中计算出行驶的总里程 |
| 494 | 524 | |
| ... | ... | @@ -602,8 +632,14 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 602 | 632 | if(j==iterator2.size()-1){ |
| 603 | 633 | ylxs=czyl; |
| 604 | 634 | }else{ |
| 605 | - l=Math.round(nextJzyl); | |
| 606 | - ylxs=l*100/100; | |
| 635 | +// l=Math.round(nextJzyl); | |
| 636 | +// ylxs=l*100/100; | |
| 637 | + if(iterator2.get(j+1).getNbbm().equals(t.getNbbm())){ | |
| 638 | + l=Math.round(nextJzyl); | |
| 639 | + ylxs=l*100/100; | |
| 640 | + }else{ | |
| 641 | + ylxs=czyl; | |
| 642 | + } | |
| 607 | 643 | |
| 608 | 644 | } |
| 609 | 645 | yh=Arith.add(yh, Arith.sub(nextJzyl,ylxs)); |
| ... | ... | @@ -833,7 +869,8 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 833 | 869 | } |
| 834 | 870 | // List<Ylb> ylListBe=repository.obtainYlbefore(rq, gsbm, "", xlbm, nbbm); |
| 835 | 871 | List<Ylb> ylListBe=repository.listMaxRqJcsx(rq, gsbm, fgsbm, xlbm, nbbm); |
| 836 | - List<Ylb> ylbList=repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm"); | |
| 872 | + List<Ylb> ylbList=this.listOrderBy(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm"); | |
| 873 | +// repository.obtainYl(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm"); | |
| 837 | 874 | List<Ylxxb> ylxxbList=ylxxbRepository.obtainYlxx(rq,0,gsbm); |
| 838 | 875 | for (int i = 0; i < ylxxbList.size(); i++) { |
| 839 | 876 | Boolean fage=true; |
| ... | ... | @@ -913,7 +950,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 913 | 950 | |
| 914 | 951 | |
| 915 | 952 | @Override |
| 916 | - public List<Ylb> oilListMonth(String line, String date) { | |
| 953 | + public List<Ylb> oilListMonth(String line, String date, String type) { | |
| 917 | 954 | String date2=date.substring(0, 8)+"01"; |
| 918 | 955 | String lineStr=""; |
| 919 | 956 | if(line !=null && !line.equals("")){ |
| ... | ... | @@ -943,6 +980,34 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 943 | 980 | return s; |
| 944 | 981 | } |
| 945 | 982 | }); |
| 983 | + | |
| 984 | + if(type != null && type.equals("export")){ | |
| 985 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | |
| 986 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | |
| 987 | + | |
| 988 | + List<Map<String, Object>> mapList = new ArrayList<Map<String, Object>>(); | |
| 989 | + for(Ylb ylb : list){ | |
| 990 | + Map<String, Object> m = new HashMap<String, Object>(); | |
| 991 | + m.put("nbbm", ylb.getNbbm()!=null?ylb.getNbbm():""); | |
| 992 | + m.put("rq", ylb.getRq()!=null?sdfMonth.format(ylb.getRq()):""); | |
| 993 | + m.put("jzyl", ylb.getJzyl()!=null?ylb.getJzyl():""); | |
| 994 | + mapList.add(m); | |
| 995 | + } | |
| 996 | + | |
| 997 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | |
| 998 | + Map<String, Object> m = new HashMap<String, Object>(); | |
| 999 | + ReportUtils ee = new ReportUtils(); | |
| 1000 | + try { | |
| 1001 | + listI.add(mapList.iterator()); | |
| 1002 | + String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; | |
| 1003 | + ee.excelReplace(listI, new Object[] { m }, path+"mould/oilListMonth.xls", | |
| 1004 | + path+"export/月存油报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | |
| 1005 | + } catch (Exception e) { | |
| 1006 | + // TODO: handle exception | |
| 1007 | + e.printStackTrace(); | |
| 1008 | + } | |
| 1009 | + } | |
| 1010 | + | |
| 946 | 1011 | return list; |
| 947 | 1012 | } |
| 948 | 1013 | |
| ... | ... | @@ -1278,8 +1343,10 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 1278 | 1343 | map.put("nbbm_eq", nbbm_eq); |
| 1279 | 1344 | map.put("rq_eq", rq_eq); |
| 1280 | 1345 | |
| 1281 | - List<Ylb> iterator2=repository.obtainYl(sdf.format(rq_eq),ylb.getSsgsdm(),ylb.getFgsdm(),"", | |
| 1346 | + List<Ylb> iterator2=this.listOrderBy(sdf.format(rq_eq),ylb.getSsgsdm(),ylb.getFgsdm(),"", | |
| 1282 | 1347 | ylb.getNbbm(),"jcsx"); |
| 1348 | +// repository.obtainYl(sdf.format(rq_eq),ylb.getSsgsdm(),ylb.getFgsdm(),"", | |
| 1349 | +// ylb.getNbbm(),"jcsx"); | |
| 1283 | 1350 | DecimalFormat df = new DecimalFormat("#.00"); |
| 1284 | 1351 | Double zyl = 0.0; |
| 1285 | 1352 | Double nextJzyl = 0.0; |
| ... | ... | @@ -1395,7 +1462,8 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 1395 | 1462 | t.setCreatetime(new Date()); |
| 1396 | 1463 | String[] jhsjStr = jhsj.split(":"); |
| 1397 | 1464 | long fcsjL= Long.parseLong(jhsjStr[0])*60+Long.parseLong(jhsjStr[1]); |
| 1398 | - List<Ylb> list=repository.obtainYl(rq, gsdm, fgsdm, xlbm, nbbm, "jhsj"); | |
| 1465 | + List<Ylb> list=this.listOrderBy(rq, gsdm, fgsdm, xlbm, nbbm, "jhsj"); | |
| 1466 | +// repository.obtainYl(rq, gsdm, fgsdm, xlbm, nbbm, "jhsj"); | |
| 1399 | 1467 | int jcsx=1; |
| 1400 | 1468 | if(list.size()>0){ |
| 1401 | 1469 | for (int i = 0; i < list.size(); i++) { |
| ... | ... | @@ -1439,4 +1507,43 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS |
| 1439 | 1507 | } |
| 1440 | 1508 | return maps; |
| 1441 | 1509 | } |
| 1510 | + | |
| 1511 | + public List<Ylb> listOrderBy(String rq,String gsdm, | |
| 1512 | + String fgsdm,String xlbm,String nbbm, | |
| 1513 | + String px) { | |
| 1514 | + // TODO Auto-generated method stub | |
| 1515 | + String sql="SELECT * FROM bsth_c_ylb " | |
| 1516 | + + " where to_days('"+rq+"')=to_days(rq) and ssgsdm like '%"+gsdm+"%' " | |
| 1517 | + + " and fgsdm like '%"+fgsdm+"%'"; | |
| 1518 | + if(xlbm.equals("")){ | |
| 1519 | + sql+= " and xlbm like '%"+xlbm+"%' "; | |
| 1520 | + }else{ | |
| 1521 | + sql+= " and xlbm = '"+xlbm+"' "; | |
| 1522 | + } | |
| 1523 | + | |
| 1524 | + sql += "and nbbm like '%"+nbbm+"%' order by "+px+" asc "; | |
| 1525 | + | |
| 1526 | + List<Ylb> list = jdbcTemplate.query(sql, new RowMapper<Ylb>() { | |
| 1527 | + @Override | |
| 1528 | + public Ylb mapRow(ResultSet arg0, int arg1) throws SQLException { | |
| 1529 | + Ylb y = new Ylb(); | |
| 1530 | + y.setId(arg0.getInt("id")); | |
| 1531 | + return y; | |
| 1532 | + } | |
| 1533 | + }); | |
| 1534 | + List<Ylb> lists=new ArrayList<Ylb>(); | |
| 1535 | + List<Ylb> ylbLists=repository.obtainYl(rq,gsdm,fgsdm,xlbm,nbbm,"jcsx"); | |
| 1536 | + for (int i = 0; i < list.size(); i++) { | |
| 1537 | + Ylb t=list.get(i); | |
| 1538 | + for (int j = 0; j < ylbLists.size(); j++) { | |
| 1539 | + Ylb t2=ylbLists.get(j); | |
| 1540 | + if(t.getId().intValue()==t2.getId().intValue()){ | |
| 1541 | + lists.add(t2); | |
| 1542 | + break; | |
| 1543 | + } | |
| 1544 | + } | |
| 1545 | + } | |
| 1546 | + | |
| 1547 | + return lists; | |
| 1548 | + } | |
| 1442 | 1549 | } | ... | ... |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| ... | ... | @@ -2,6 +2,7 @@ package com.bsth.service.realcontrol; |
| 2 | 2 | |
| 3 | 3 | import com.bsth.controller.realcontrol.dto.ChangePersonCar; |
| 4 | 4 | import com.bsth.controller.realcontrol.dto.DfsjChange; |
| 5 | +import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto; | |
| 5 | 6 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 6 | 7 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 7 | 8 | import com.bsth.service.BaseService; |
| ... | ... | @@ -104,7 +105,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L |
| 104 | 105 | List<Map<String,Object>> accountPx(String line,String date,String code,String xlName, String px); |
| 105 | 106 | |
| 106 | 107 | |
| 107 | - List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code, String type); | |
| 108 | + List<SchEditInfoDto> correctForm(String line,String date,String lpName,String code, String type); | |
| 108 | 109 | |
| 109 | 110 | List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String line); |
| 110 | 111 | ... | ... |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| ... | ... | @@ -16,6 +16,7 @@ import com.bsth.data.schedule.ScheduleComparator; |
| 16 | 16 | import com.bsth.data.schedule.edit_logs.FormLogger; |
| 17 | 17 | import com.bsth.data.schedule.edit_logs.ScheduleModifyLogger; |
| 18 | 18 | import com.bsth.data.schedule.edit_logs.loggers.FcxxwtLogger; |
| 19 | +import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto; | |
| 19 | 20 | import com.bsth.data.schedule.late_adjust.LateAdjustHandle; |
| 20 | 21 | import com.bsth.entity.Cars; |
| 21 | 22 | import com.bsth.entity.Line; |
| ... | ... | @@ -58,9 +59,11 @@ import org.apache.commons.lang3.StringEscapeUtils; |
| 58 | 59 | import org.apache.commons.lang3.StringUtils; |
| 59 | 60 | import org.joda.time.format.DateTimeFormat; |
| 60 | 61 | import org.joda.time.format.DateTimeFormatter; |
| 62 | +import org.mvel2.optimizers.impl.refl.nodes.ArrayLength; | |
| 61 | 63 | import org.slf4j.Logger; |
| 62 | 64 | import org.slf4j.LoggerFactory; |
| 63 | 65 | import org.springframework.beans.factory.annotation.Autowired; |
| 66 | +import org.springframework.jdbc.core.BeanPropertyRowMapper; | |
| 64 | 67 | import org.springframework.jdbc.core.JdbcTemplate; |
| 65 | 68 | import org.springframework.jdbc.core.RowMapper; |
| 66 | 69 | import org.springframework.stereotype.Service; |
| ... | ... | @@ -1904,7 +1907,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1904 | 1907 | return listMap; |
| 1905 | 1908 | } |
| 1906 | 1909 | |
| 1907 | - @Override | |
| 1910 | + /* @Override | |
| 1908 | 1911 | public List<ScheduleRealInfo> correctForm(String line, String startDate, |
| 1909 | 1912 | String endDate, String lpName, String code, String type) { |
| 1910 | 1913 | List<ScheduleRealInfo> list = scheduleRealInfoRepository.correctForm(line, startDate, endDate, lpName, code); |
| ... | ... | @@ -1959,8 +1962,93 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 1959 | 1962 | } |
| 1960 | 1963 | |
| 1961 | 1964 | return list; |
| 1965 | + }*/ | |
| 1966 | + | |
| 1967 | + @Override | |
| 1968 | + public List<SchEditInfoDto> correctForm(String line,String date, | |
| 1969 | + String lpName,String code, String type) { | |
| 1970 | + | |
| 1971 | +// var types = {'DFTZ': '待发调整', 'FCXXWT':'发车信息微调', 'JHLB': '计划烂班', 'CXLB': '撤销烂班', | |
| 1972 | +// 'CXZX': '撤销执行', 'CXSF': '撤销实发', 'SFTZ': '实发调整', 'TZRC': '调整人车'}; | |
| 1973 | + Map<String, Object> map=new HashMap<String,Object>(); | |
| 1974 | + map.put("DFTZ", "待发调整"); | |
| 1975 | + map.put("FCXXWT", "发车信息微调"); | |
| 1976 | + map.put("JHLB", "计划烂班"); | |
| 1977 | + map.put("CXLB", "撤销烂班"); | |
| 1978 | + map.put("CXZX","撤销执行"); | |
| 1979 | + map.put("CXSF", "撤销实发"); | |
| 1980 | + map.put("SFTZ", "实发调整"); | |
| 1981 | + map.put("TZRC", "调整人车"); | |
| 1982 | + | |
| 1983 | + String cont = ""; | |
| 1984 | + cont = " and xl_bm ='"+line +"'"; | |
| 1985 | + if(!lpName.equals("")){ | |
| 1986 | + cont +=" and lp_name = '"+lpName+"'"; | |
| 1987 | + } | |
| 1988 | + if(!code.equals("")){ | |
| 1989 | + cont +=" and cl_zbh ='"+code+"'"; | |
| 1990 | + } | |
| 1991 | + String sql = "select t1.*, " | |
| 1992 | + + "t2.fcsj,t2.lp_name,t2.cl_zbh,t2.j_gh,t2.j_name," | |
| 1993 | + + "t2.xl_dir,t2.real_exec_date from (select * from " | |
| 1994 | + + "logger_sch_modify where rq=? and line_code=? )" | |
| 1995 | + + " t1 INNER JOIN bsth_c_s_sp_info_real t2 on " | |
| 1996 | + + "t1.sch_id=t2.id where 1=1 " + cont; | |
| 1997 | + | |
| 1998 | + List<SchEditInfoDto> list = jdbcTemplate.query(sql, | |
| 1999 | + new BeanPropertyRowMapper(SchEditInfoDto.class),date, line); | |
| 2000 | + List<SchEditInfoDto> lists=new ArrayList<SchEditInfoDto>(); | |
| 2001 | + for (int i = 0; i < list.size(); i++) { | |
| 2002 | + SchEditInfoDto t=list.get(i); | |
| 2003 | + if(map.get(t.getType())!=null){ | |
| 2004 | + t.setType2(t.getTimeStr()+":"+map.get(t.getType()).toString()); | |
| 2005 | + }else{ | |
| 2006 | + t.setType2(""); | |
| 2007 | + } | |
| 2008 | + boolean fage=true; | |
| 2009 | + for (int j = 0; j < lists.size(); j++) { | |
| 2010 | + SchEditInfoDto s=lists.get(j); | |
| 2011 | + if(s.getSchId()==t.getSchId()){ | |
| 2012 | + s.setType2(s.getType2()+" "+t.getType2()); | |
| 2013 | + fage=false; | |
| 2014 | + } | |
| 2015 | + } | |
| 2016 | + if(fage){ | |
| 2017 | + lists.add(t); | |
| 2018 | + } | |
| 2019 | + } | |
| 2020 | + | |
| 2021 | + if (type != null && type.length() != 0 && type.equals("export")) { | |
| 2022 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | |
| 2023 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | |
| 2024 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | |
| 2025 | + Map<String, Object> m = new HashMap<String, Object>(); | |
| 2026 | + m.put("dates",date); | |
| 2027 | + ReportUtils ee = new ReportUtils(); | |
| 2028 | + List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>(); | |
| 2029 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | |
| 2030 | + for (SchEditInfoDto d : lists) { | |
| 2031 | + Map<String, Object> tempMap = new HashMap<String, Object>(); | |
| 2032 | + tempMap.put("lpName", d.getLpName()); | |
| 2033 | + tempMap.put("clZbh", d.getClZbh()); | |
| 2034 | + tempMap.put("jName", d.getjName()+"/"+d.getjGh()); | |
| 2035 | + tempMap.put("fcsj", d.getFcsj()); | |
| 2036 | + tempMap.put("type", d.getType2()); | |
| 2037 | + tempList.add(tempMap); | |
| 2038 | + } | |
| 2039 | + try { | |
| 2040 | + listI.add(tempList.iterator()); | |
| 2041 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | |
| 2042 | + ee.excelReplace(listI, new Object[]{m}, path + "mould/correctForm.xls", | |
| 2043 | + path + "export/修正报表" + date+ ".xls"); | |
| 2044 | + } catch (Exception e) { | |
| 2045 | + // TODO: handle exception | |
| 2046 | + e.printStackTrace(); | |
| 2047 | + } | |
| 2048 | +// Map<String, Object> maps = tempList.get(tempList.size() - 1); | |
| 2049 | + } | |
| 2050 | + return lists; | |
| 1962 | 2051 | } |
| 1963 | - | |
| 1964 | 2052 | @Override |
| 1965 | 2053 | public List<ScheduleRealInfo> queryListWaybill(String jName, String clZbh, |
| 1966 | 2054 | String lpName, String date, String line) { |
| ... | ... | @@ -3267,26 +3355,28 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf |
| 3267 | 3355 | yesterdayDataList.get(x).put("totalKilometers", zlc); |
| 3268 | 3356 | |
| 3269 | 3357 | } |
| 3358 | + List<Map<String, Object>> yesterdayDataLists = new ArrayList<Map<String, Object>>(); | |
| 3359 | + | |
| 3270 | 3360 | for (int i = 0; i < yesterdayDataList.size(); i++) { |
| 3271 | 3361 | Map<String, Object> map=yesterdayDataList.get(i); |
| 3272 | 3362 | Double zlc=map.get("totalKilometers")==null?0.0:Double.parseDouble(map.get("totalKilometers").toString()); |
| 3273 | - if(zlc<=0){ | |
| 3274 | - yesterdayDataList.remove(map); | |
| 3363 | + if(zlc>0){ | |
| 3364 | + yesterdayDataLists.add(map); | |
| 3275 | 3365 | } |
| 3276 | 3366 | } |
| 3277 | 3367 | //增加顺序号 |
| 3278 | - for (int i = 0; i < yesterdayDataList.size(); i++) { | |
| 3368 | + for (int i = 0; i < yesterdayDataLists.size(); i++) { | |
| 3279 | 3369 | if (i == 0) { |
| 3280 | - yesterdayDataList.get(i).put("seqNumber", 1); | |
| 3370 | + yesterdayDataLists.get(i).put("seqNumber", 1); | |
| 3281 | 3371 | } else { |
| 3282 | - if (yesterdayDataList.get(i - 1).get("clZbh").equals(yesterdayDataList.get(i).get("clZbh"))) { | |
| 3283 | - yesterdayDataList.get(i).put("seqNumber", 1 + (int) yesterdayDataList.get(i - 1).get("seqNumber")); | |
| 3372 | + if (yesterdayDataLists.get(i - 1).get("clZbh").equals(yesterdayDataLists.get(i).get("clZbh"))) { | |
| 3373 | + yesterdayDataLists.get(i).put("seqNumber", 1 + (int) yesterdayDataLists.get(i - 1).get("seqNumber")); | |
| 3284 | 3374 | } else { |
| 3285 | - yesterdayDataList.get(i).put("seqNumber", 1); | |
| 3375 | + yesterdayDataLists.get(i).put("seqNumber", 1); | |
| 3286 | 3376 | } |
| 3287 | 3377 | } |
| 3288 | 3378 | } |
| 3289 | - return yesterdayDataList; | |
| 3379 | + return yesterdayDataLists; | |
| 3290 | 3380 | } |
| 3291 | 3381 | |
| 3292 | 3382 | /** | ... | ... |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| ... | ... | @@ -239,7 +239,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ |
| 239 | 239 | } |
| 240 | 240 | }else{ |
| 241 | 241 | Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); |
| 242 | - if(!childTaskPlans.isEmpty()){ | |
| 242 | + if(childTaskPlans.isEmpty()){ | |
| 243 | 243 | double jhlc=scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc(); |
| 244 | 244 | double jhlcOrig=scheduleRealInfo.getJhlcOrig()==null?0:scheduleRealInfo.getJhlcOrig(); |
| 245 | 245 | double zjlc=Arith.sub(jhlc, jhlcOrig); | ... | ... |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| ... | ... | @@ -720,36 +720,40 @@ public class ReportServiceImpl implements ReportService{ |
| 720 | 720 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 721 | 721 | List<Map<String, Object>> list2 = keyMap.get(key); |
| 722 | 722 | List<Integer> cjs = new ArrayList<Integer>(); |
| 723 | - int sxsj = 0, xxsj = 0, zcj = 0, tssj = 0; | |
| 724 | - int sxbc = 0, xxbc = 0; | |
| 725 | - int temp = 24*60+1; | |
| 723 | + int sxsj = 0, xxsj = 0, sxtssj = 0, xxtssj = 0; | |
| 724 | + int sxbc = 0, xxbc = 0, sxtsbc = 0, xxtsbc = 0; | |
| 725 | + int temp = 24*60+1, zcj = 0; | |
| 726 | 726 | boolean ists = false; |
| 727 | 727 | for(Map<String, Object> m : list2){ |
| 728 | 728 | String[] split = m.get("fcsj").toString().split(":"); |
| 729 | 729 | int fcsj = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); |
| 730 | 730 | int xlDir = Integer.valueOf(m.get("dir").toString()); |
| 731 | 731 | int bcsj = Integer.valueOf(m.get("bcsj").toString()); |
| 732 | + if(temp >= fcsj){ | |
| 733 | + temp = fcsj; | |
| 734 | + ists = false; | |
| 735 | + } | |
| 732 | 736 | if(xlDir == 0){ |
| 733 | 737 | sxsj += bcsj; |
| 734 | 738 | sxbc ++; |
| 739 | + if(ists){ | |
| 740 | + sxtssj += fcsj - temp; | |
| 741 | + sxtsbc++; | |
| 742 | + } | |
| 735 | 743 | } else { |
| 736 | 744 | xxsj += bcsj; |
| 737 | 745 | xxbc ++; |
| 738 | - } | |
| 739 | - if(temp >= fcsj){ | |
| 740 | - temp = fcsj; | |
| 741 | - ists = false; | |
| 742 | - } else { | |
| 743 | 746 | if(ists){ |
| 744 | - tssj += fcsj - temp; | |
| 745 | - ists = false; | |
| 746 | - } else { | |
| 747 | - cjs.add(fcsj - temp); | |
| 747 | + xxtssj += fcsj - temp; | |
| 748 | + xxtsbc++; | |
| 748 | 749 | } |
| 750 | + } | |
| 751 | + if(temp < fcsj){ | |
| 752 | + cjs.add(fcsj - temp); | |
| 749 | 753 | temp = fcsj; |
| 750 | - if(m.get("ists").equals("1")){ | |
| 751 | - ists = true; | |
| 752 | - } | |
| 754 | + } | |
| 755 | + if(m.get("ists").toString().trim().equals("1")){ | |
| 756 | + ists = true; | |
| 753 | 757 | } |
| 754 | 758 | } |
| 755 | 759 | Collections.sort(cjs); |
| ... | ... | @@ -757,12 +761,14 @@ public class ReportServiceImpl implements ReportService{ |
| 757 | 761 | zcj += i; |
| 758 | 762 | } |
| 759 | 763 | tempMap.put("sjd", key); |
| 760 | - tempMap.put("sxsj", sxsj / sxbc); | |
| 761 | - tempMap.put("xxsj", xxsj / xxbc); | |
| 762 | - tempMap.put("fqsj", (sxsj + xxsj) / list2.size()); | |
| 764 | + tempMap.put("sxsj", sxbc != 0 ? sxsj / sxbc : "0"); | |
| 765 | + tempMap.put("xxsj", xxbc != 0 ? xxsj / xxbc : "0"); | |
| 766 | + tempMap.put("sxtssj", sxtsbc != 0 ? sxtssj / sxtsbc : "0"); | |
| 767 | + tempMap.put("xxtssj", xxtsbc != 0 ? xxtssj / xxtsbc : "0"); | |
| 768 | + tempMap.put("fqsj", Integer.valueOf(tempMap.get("sxsj").toString()) + Integer.valueOf(tempMap.get("xxsj").toString()) | |
| 769 | + + Integer.valueOf(tempMap.get("sxtssj").toString()) + Integer.valueOf(tempMap.get("xxtssj").toString())); | |
| 763 | 770 | tempMap.put("cjqj", cjs.size()>0?cjs.get(0)+"——"+cjs.get(cjs.size()-1):"——"); |
| 764 | 771 | tempMap.put("pjcj", cjs.size()>0?zcj/cjs.size():"/"); |
| 765 | - tempMap.put("tssj", tssj); | |
| 766 | 772 | maps.put(key, tempMap); |
| 767 | 773 | } |
| 768 | 774 | newList.add(maps.get("(首)——6:30")); |
| ... | ... | @@ -920,7 +926,7 @@ public class ReportServiceImpl implements ReportService{ |
| 920 | 926 | |
| 921 | 927 | } else { |
| 922 | 928 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); |
| 923 | - if (scheduleRealInfo.getStatus() == -1) { | |
| 929 | + /*if (scheduleRealInfo.getStatus() == -1) { | |
| 924 | 930 | while (it.hasNext()) { |
| 925 | 931 | ChildTaskPlan childTaskPlan = it.next(); |
| 926 | 932 | if (childTaskPlan.isDestroy()) { |
| ... | ... | @@ -947,7 +953,7 @@ public class ReportServiceImpl implements ReportService{ |
| 947 | 953 | |
| 948 | 954 | } |
| 949 | 955 | } |
| 950 | - }else{ | |
| 956 | + }else{*/ | |
| 951 | 957 | while (it.hasNext()) { |
| 952 | 958 | ChildTaskPlan childTaskPlan = it.next(); |
| 953 | 959 | if (childTaskPlan.isDestroy()) { |
| ... | ... | @@ -974,7 +980,7 @@ public class ReportServiceImpl implements ReportService{ |
| 974 | 980 | |
| 975 | 981 | } |
| 976 | 982 | } |
| 977 | - } | |
| 983 | +// } | |
| 978 | 984 | |
| 979 | 985 | } |
| 980 | 986 | } | ... | ... |
src/main/java/com/bsth/service/schedule/impl/BServiceImpl.java
| ... | ... | @@ -4,11 +4,9 @@ import com.bsth.entity.search.CustomerSpecs; |
| 4 | 4 | import com.bsth.repository.BaseRepository; |
| 5 | 5 | import com.bsth.service.schedule.BService; |
| 6 | 6 | import com.bsth.service.schedule.exception.ScheduleException; |
| 7 | -import com.bsth.service.schedule.utils.DataToolsService; | |
| 8 | 7 | import org.slf4j.Logger; |
| 9 | 8 | import org.slf4j.LoggerFactory; |
| 10 | 9 | import org.springframework.beans.factory.annotation.Autowired; |
| 11 | -import org.springframework.beans.factory.annotation.Qualifier; | |
| 12 | 10 | import org.springframework.beans.factory.annotation.Value; |
| 13 | 11 | import org.springframework.data.domain.Page; |
| 14 | 12 | import org.springframework.data.domain.Pageable; |
| ... | ... | @@ -32,10 +30,6 @@ public class BServiceImpl<T, ID extends Serializable> implements BService<T, ID> |
| 32 | 30 | @Value("${hibernate.jdbc.batch_size}") |
| 33 | 31 | private int batchSize; |
| 34 | 32 | |
| 35 | - @Autowired | |
| 36 | - @Qualifier(value = "dataToolsServiceImpl") | |
| 37 | - private DataToolsService dataToolsService; | |
| 38 | - | |
| 39 | 33 | /** 日志记录器 */ |
| 40 | 34 | protected Logger logger = LoggerFactory.getLogger(this.getClass()); |
| 41 | 35 | ... | ... |
src/main/java/com/bsth/service/schedule/impl/PeopleCarPlanServiceImpl.java
| ... | ... | @@ -516,6 +516,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 516 | 516 | String endDate = map.get("endDate").toString(); |
| 517 | 517 | String model = map.get("model").toString(); |
| 518 | 518 | String type = map.get("type").toString(); |
| 519 | + String bcType = map.get("bcType").toString(); | |
| 519 | 520 | |
| 520 | 521 | if(startDate.length() == 0){ |
| 521 | 522 | startDate = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); |
| ... | ... | @@ -533,7 +534,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 533 | 534 | sql += " and gs_bm like '%"+company+"%' and fgs_bm like '%"+subCompany+"%'"; |
| 534 | 535 | // } |
| 535 | 536 | sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; |
| 536 | - | |
| 537 | + if(Integer.valueOf(bcType) == 1){ | |
| 538 | + sql += " and bc_type != 'region'"; | |
| 539 | + } else if(Integer.valueOf(bcType) == 2){ | |
| 540 | + sql += " and bc_type = 'region'"; | |
| 541 | + } | |
| 537 | 542 | list = jdbcTemplate.query(sql, |
| 538 | 543 | new RowMapper<ScheduleRealInfo>(){ |
| 539 | 544 | @Override |
| ... | ... | @@ -798,6 +803,7 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 798 | 803 | String line = map.get("line").toString(); |
| 799 | 804 | String startDate = map.get("startDate").toString(); |
| 800 | 805 | String endDate = map.get("endDate").toString(); |
| 806 | + String bcType = map.get("bcType").toString(); | |
| 801 | 807 | String nbbm = map.get("nbbm").toString(); |
| 802 | 808 | String type = map.get("type").toString(); |
| 803 | 809 | |
| ... | ... | @@ -824,6 +830,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 824 | 830 | sql += " and gs_bm like '%"+company+"%' and fgs_bm like '%"+subCompany+"%'"; |
| 825 | 831 | // } |
| 826 | 832 | sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; |
| 833 | + if(bcType.trim().equals("1")){ | |
| 834 | + sql += " and bc_type != 'region'"; | |
| 835 | + } else if(bcType.trim().equals("2")){ | |
| 836 | + sql += " and bc_type = 'region'"; | |
| 837 | + } | |
| 827 | 838 | |
| 828 | 839 | list = jdbcTemplate.query(sql, |
| 829 | 840 | new RowMapper<ScheduleRealInfo>(){ |
| ... | ... | @@ -1180,8 +1191,11 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1180 | 1191 | |
| 1181 | 1192 | @Override |
| 1182 | 1193 | public List<Map<String, Object>> firstAndLastBus(Map<String, Object> map) { |
| 1194 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
| 1195 | + NumberFormat nf = NumberFormat.getNumberInstance(); | |
| 1196 | + nf.setMinimumFractionDigits(2); | |
| 1197 | + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | |
| 1183 | 1198 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 1184 | - Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | |
| 1185 | 1199 | |
| 1186 | 1200 | String company = map.get("company").toString(); |
| 1187 | 1201 | String subCompany = map.get("subCompany").toString(); |
| ... | ... | @@ -1190,151 +1204,173 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1190 | 1204 | String type = map.get("type").toString(); |
| 1191 | 1205 | |
| 1192 | 1206 | if(date.length() == 0) |
| 1193 | - date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | |
| 1207 | + date = sdf.format(new Date()); | |
| 1194 | 1208 | |
| 1195 | - List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date); | |
| 1209 | + try { | |
| 1210 | + String sql = "select a.schedule_date_Str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name," | |
| 1211 | + + " b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line" | |
| 1212 | + + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') = '"+date+"'" | |
| 1213 | + + " and fcsj_actual is not null and fcsj_actual != '' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 1214 | + if(line.length() != 0) | |
| 1215 | + sql += " and xl_bm = '"+line+"'"; | |
| 1216 | + if(company.length() != 0) | |
| 1217 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | |
| 1218 | + | |
| 1219 | + list = jdbcTemplate.query(sql, | |
| 1220 | + new RowMapper<ScheduleRealInfo>(){ | |
| 1221 | + @Override | |
| 1222 | + public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { | |
| 1223 | + ScheduleRealInfo schedule = new ScheduleRealInfo(); | |
| 1224 | + schedule.setScheduleDateStr(rs.getString("schedule_date_Str")); | |
| 1225 | + schedule.setRealExecDate(rs.getString("real_exec_date")); | |
| 1226 | + schedule.setXlName(rs.getString("xl_name")); | |
| 1227 | + schedule.setFcsj(rs.getString("fcsj")); | |
| 1228 | + schedule.setFcsjActual(rs.getString("fcsj_actual")); | |
| 1229 | + schedule.setZdsj(rs.getString("zdsj")); | |
| 1230 | + schedule.setZdsjActual(rs.getString("zdsj_actual")); | |
| 1231 | + schedule.setQdzName(rs.getString("qdz_name")); | |
| 1232 | + schedule.setZdzName(rs.getString("zdz_name")); | |
| 1233 | + schedule.setXlDir(rs.getString("xl_dir")); | |
| 1234 | + schedule.setStatus(rs.getInt("status")); | |
| 1235 | + schedule.setGsName(rs.getString("gs_name")); | |
| 1236 | + schedule.setFgsName(rs.getString("fgs_name")); | |
| 1237 | + | |
| 1238 | + int startOpt = 0; | |
| 1239 | + if(rs.getString("start_opt") != null && rs.getString("start_opt").trim().length() != 0){ | |
| 1240 | + String[] split = rs.getString("start_opt").split(":"); | |
| 1241 | + startOpt = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | |
| 1242 | + } | |
| 1243 | + | |
| 1244 | + if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){ | |
| 1245 | + schedule.setFcsjActual(null); | |
| 1246 | + } | |
| 1247 | + if(schedule.getZdsjActual() != null && schedule.getZdsjActual().trim().length() == 0){ | |
| 1248 | + schedule.setZdsjActual(null); | |
| 1249 | + } | |
| 1250 | + if(schedule.getFcsj() != null){ | |
| 1251 | + String[] split = schedule.getFcsj().split(":"); | |
| 1252 | + int fcsj = Integer.valueOf(split[0]) * 60 + Integer.valueOf(split[1]); | |
| 1253 | + if(fcsj < startOpt) | |
| 1254 | + fcsj += 1440; | |
| 1255 | + schedule.setFcsjT((long)fcsj); | |
| 1256 | + } | |
| 1257 | + if(schedule.getFcsjActual() != null){ | |
| 1258 | + String[] split = schedule.getFcsjActual().split(":"); | |
| 1259 | + int fcsjA = Integer.valueOf(split[0]) * 60 + Integer.valueOf(split[1]); | |
| 1260 | + if(fcsjA < startOpt || !schedule.getRealExecDate().equals(schedule.getScheduleDateStr())) | |
| 1261 | + fcsjA += 1440; | |
| 1262 | + schedule.setFcsjActualTime((long)fcsjA); | |
| 1263 | + } | |
| 1264 | + | |
| 1265 | + return schedule; | |
| 1266 | + } | |
| 1267 | + }); | |
| 1268 | + | |
| 1269 | + } catch (Exception e) { | |
| 1270 | + // TODO: handle exception | |
| 1271 | + e.printStackTrace(); | |
| 1272 | + } | |
| 1196 | 1273 | |
| 1197 | - for(ScheduleRealInfo schedule : list){ | |
| 1198 | - if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out") || schedule.getBcType().equals("ldks")) | |
| 1199 | - continue; | |
| 1200 | - if(schedule.getStatus() == -1){ | |
| 1201 | - continue; | |
| 1202 | - } | |
| 1203 | - String key = schedule.getXlName(); | |
| 1204 | - if(key == null || key.trim().length() == 0) | |
| 1205 | - continue; | |
| 1206 | - if(!keyMap.containsKey(key)) | |
| 1207 | - keyMap.put(key, new ArrayList<ScheduleRealInfo>()); | |
| 1208 | - keyMap.get(key).add(schedule); | |
| 1274 | + Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | |
| 1275 | + String companyName = "", subCompanyName = ""; | |
| 1276 | + | |
| 1277 | + for(ScheduleRealInfo s : list){ | |
| 1278 | + String xlName = s.getXlName(); | |
| 1279 | + if(!keyMap.containsKey(xlName)) | |
| 1280 | + keyMap.put(xlName, new ArrayList<ScheduleRealInfo>()); | |
| 1281 | + keyMap.get(xlName).add(s); | |
| 1282 | + if(companyName.length()==0&&s.getGsName()!=null&&s.getGsName().trim().length()!=0) | |
| 1283 | + companyName = s.getGsName(); | |
| 1284 | + if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0) | |
| 1285 | + subCompanyName = s.getFgsName(); | |
| 1209 | 1286 | } |
| 1210 | - for(String key : keyMap.keySet()){ | |
| 1287 | + | |
| 1288 | + for(String xlName : keyMap.keySet()){ | |
| 1211 | 1289 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 1212 | - Map<Long, ScheduleRealInfo> temp0 = new HashMap<Long, ScheduleRealInfo>(); | |
| 1213 | - List<Long> longList0 = new ArrayList<Long>(); | |
| 1214 | - Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>(); | |
| 1215 | - List<Long> longList1 = new ArrayList<Long>(); | |
| 1216 | - String companyName = "", subCompanyName = ""; | |
| 1217 | - for(ScheduleRealInfo schedule : keyMap.get(key)){ | |
| 1218 | - if(schedule.getFcsjActual() == null || schedule.getFcsjActual().trim().length() == 0){ | |
| 1219 | - continue; | |
| 1220 | - } | |
| 1221 | - if(schedule.getGsName() != null && companyName.length() == 0) | |
| 1222 | - companyName = schedule.getGsName(); | |
| 1223 | - if(schedule.getFgsName() != null && subCompanyName.length() == 0) | |
| 1224 | - subCompanyName = schedule.getFgsName(); | |
| 1225 | - String[] split = schedule.getFcsj().split(":"); | |
| 1226 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | |
| 1227 | - schedule.setFcsjT(min); | |
| 1228 | - if(schedule.getXlDir().equals("0")){ | |
| 1229 | - temp0.put(min, schedule); | |
| 1230 | - longList0.add(min); | |
| 1231 | - } else { | |
| 1232 | - temp1.put(min, schedule); | |
| 1233 | - longList1.add(min); | |
| 1290 | + tempMap.put("date", date.substring(5)); | |
| 1291 | + tempMap.put("line", xlName); | |
| 1292 | + List<Long> up1 = new ArrayList<Long>(); | |
| 1293 | + List<Long> up2 = new ArrayList<Long>();; | |
| 1294 | + List<Long> dn1 = new ArrayList<Long>(); | |
| 1295 | + List<Long> dn2 = new ArrayList<Long>(); | |
| 1296 | + Map<Long, ScheduleRealInfo> up1Map = new HashMap<Long, ScheduleRealInfo>(); | |
| 1297 | + Map<Long, ScheduleRealInfo> up2Map = new HashMap<Long, ScheduleRealInfo>(); | |
| 1298 | + Map<Long, ScheduleRealInfo> dn1Map = new HashMap<Long, ScheduleRealInfo>(); | |
| 1299 | + Map<Long, ScheduleRealInfo> dn2Map = new HashMap<Long, ScheduleRealInfo>(); | |
| 1300 | + for(ScheduleRealInfo s : keyMap.get(xlName)){ | |
| 1301 | + if(s.getXlDir().equals("0")){ | |
| 1302 | + up1.add(s.getFcsjT()); | |
| 1303 | + up2.add(s.getFcsjActualTime()); | |
| 1304 | + up1Map.put(s.getFcsjT(), s); | |
| 1305 | + up2Map.put(s.getFcsjActualTime(), s); | |
| 1306 | + } else if(s.getXlDir().equals("1")){ | |
| 1307 | + dn1.add(s.getFcsjT()); | |
| 1308 | + dn2.add(s.getFcsjActualTime()); | |
| 1309 | + dn1Map.put(s.getFcsjT(), s); | |
| 1310 | + dn2Map.put(s.getFcsjActualTime(), s); | |
| 1234 | 1311 | } |
| 1235 | 1312 | } |
| 1236 | - | |
| 1237 | - if(longList0.size() == 0 && longList1.size() == 0){ | |
| 1238 | - continue; | |
| 1239 | - } | |
| 1240 | - | |
| 1241 | - if(longList0.size() != 0){ | |
| 1242 | - Collections.sort(longList0); | |
| 1243 | - ScheduleRealInfo shouban0 = temp0.get(longList0.get(0)); | |
| 1244 | - ScheduleRealInfo moban0 = temp0.get(longList0.get(longList0.size() - 1)); | |
| 1245 | - tempMap.put("qdzFirst0", shouban0.getQdzName()); | |
| 1246 | - tempMap.put("jhfcFirst0", shouban0.getFcsj()); | |
| 1247 | - tempMap.put("qdzLast0", moban0.getQdzName()); | |
| 1248 | - tempMap.put("jhfcLast0", moban0.getFcsj()); | |
| 1249 | - if(shouban0.getFcsjActual() != null){ | |
| 1250 | - String[] split = shouban0.getFcsjActual().split(":"); | |
| 1251 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | |
| 1252 | - long delay = shouban0.getFcsjT() - min; | |
| 1253 | - tempMap.put("sjfcFirst0", shouban0.getFcsjActual()); | |
| 1254 | - if(delay > 0) | |
| 1255 | - tempMap.put("delayFirst0", "+" + delay); | |
| 1256 | - else | |
| 1257 | - tempMap.put("delayFirst0", delay); | |
| 1258 | - } else { | |
| 1259 | - tempMap.put("sjfcFirst0", "/"); | |
| 1260 | - tempMap.put("delayFirst0", "/"); | |
| 1261 | - } | |
| 1262 | - if(moban0.getFcsjActual() != null){ | |
| 1263 | - String[] split = moban0.getFcsjActual().split(":"); | |
| 1264 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | |
| 1265 | - long delay = moban0.getFcsjT() - min; | |
| 1266 | - tempMap.put("sjfcLast0", moban0.getFcsjActual()); | |
| 1267 | - if(delay > 0) | |
| 1268 | - tempMap.put("delayLast0", "+" + delay); | |
| 1269 | - else | |
| 1270 | - tempMap.put("delayLast0", delay); | |
| 1271 | - } else { | |
| 1272 | - tempMap.put("sjfcLast0", "/"); | |
| 1273 | - tempMap.put("delayLast0", "/"); | |
| 1274 | - } | |
| 1275 | - }else{ | |
| 1313 | + if(up1.size() > 0 && up2.size() > 0){ | |
| 1314 | + Collections.sort(up1); | |
| 1315 | + Collections.sort(up2); | |
| 1316 | + ScheduleRealInfo s1 = up1Map.get(up1.get(0)); | |
| 1317 | + ScheduleRealInfo s2 = up2Map.get(up2.get(0)); | |
| 1318 | + ScheduleRealInfo s3 = up1Map.get(up1.get(up1.size()-1)); | |
| 1319 | + ScheduleRealInfo s4 = up2Map.get(up2.get(up2.size()-1)); | |
| 1320 | + long delayFirst0 = up1.get(0) - up2.get(0); | |
| 1321 | + long delayLast0 = up1.get(up1.size()-1) - up2.get(up2.size()-1); | |
| 1322 | + tempMap.put("qdzFirst0", s1.getQdzName()); | |
| 1323 | + tempMap.put("jhfcFirst0", s1.getFcsj()); | |
| 1324 | + tempMap.put("sjfcFirst0", s2.getFcsjActual()); | |
| 1325 | + tempMap.put("delayFirst0", delayFirst0>0?"+"+delayFirst0:delayFirst0); | |
| 1326 | + tempMap.put("qdzLast0", s3.getQdzName()); | |
| 1327 | + tempMap.put("jhfcLast0", s3.getFcsj()); | |
| 1328 | + tempMap.put("sjfcLast0", s4.getFcsjActual()); | |
| 1329 | + tempMap.put("delayLast0", delayLast0>0?"+"+delayLast0:delayLast0); | |
| 1330 | + } else { | |
| 1276 | 1331 | tempMap.put("qdzFirst0", "--"); |
| 1277 | 1332 | tempMap.put("jhfcFirst0", "/"); |
| 1278 | - tempMap.put("qdzLast0", "--"); | |
| 1279 | - tempMap.put("jhfcLast0", "/"); | |
| 1280 | 1333 | tempMap.put("sjfcFirst0", "/"); |
| 1281 | 1334 | tempMap.put("delayFirst0", "/"); |
| 1335 | + tempMap.put("qdzLast0", "--"); | |
| 1336 | + tempMap.put("jhfcLast0", "/"); | |
| 1282 | 1337 | tempMap.put("sjfcLast0", "/"); |
| 1283 | 1338 | tempMap.put("delayLast0", "/"); |
| 1284 | 1339 | } |
| 1285 | - | |
| 1286 | - if(longList1.size() != 0){ | |
| 1287 | - Collections.sort(longList1); | |
| 1288 | - ScheduleRealInfo shouban1 = temp1.get(longList1.get(0)); | |
| 1289 | - ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1)); | |
| 1290 | - tempMap.put("qdzFirst1", shouban1.getQdzName()); | |
| 1291 | - tempMap.put("jhfcFirst1", shouban1.getFcsj()); | |
| 1292 | - tempMap.put("qdzLast1", moban1.getQdzName()); | |
| 1293 | - tempMap.put("jhfcLast1", moban1.getFcsj()); | |
| 1294 | - if(shouban1.getFcsjActual() != null){ | |
| 1295 | - String[] split = shouban1.getFcsjActual().split(":"); | |
| 1296 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | |
| 1297 | - long delay = shouban1.getFcsjT() - min; | |
| 1298 | - tempMap.put("sjfcFirst1", shouban1.getFcsjActual()); | |
| 1299 | - if(delay > 0) | |
| 1300 | - tempMap.put("delayFirst1", "+" + delay); | |
| 1301 | - else | |
| 1302 | - tempMap.put("delayFirst1", delay); | |
| 1303 | - } else { | |
| 1304 | - tempMap.put("sjfcFirst1", "/"); | |
| 1305 | - tempMap.put("delayFirst1", "/"); | |
| 1306 | - } | |
| 1307 | - if(moban1.getFcsjActual() != null){ | |
| 1308 | - String[] split = moban1.getFcsjActual().split(":"); | |
| 1309 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | |
| 1310 | - long delay = moban1.getFcsjT() - min; | |
| 1311 | - tempMap.put("sjfcLast1", moban1.getFcsjActual()); | |
| 1312 | - if(delay > 0) | |
| 1313 | - tempMap.put("delayLast1", "+" + delay); | |
| 1314 | - else | |
| 1315 | - tempMap.put("delayLast1", delay); | |
| 1316 | - } else { | |
| 1317 | - tempMap.put("sjfcLast1", "/"); | |
| 1318 | - tempMap.put("delayLast1", "/"); | |
| 1319 | - } | |
| 1320 | - }else{ | |
| 1340 | + if(dn1.size() > 0 && dn2.size() > 0){ | |
| 1341 | + Collections.sort(dn1); | |
| 1342 | + Collections.sort(dn2); | |
| 1343 | + ScheduleRealInfo s1 = dn1Map.get(dn1.get(0)); | |
| 1344 | + ScheduleRealInfo s2 = dn2Map.get(dn2.get(0)); | |
| 1345 | + ScheduleRealInfo s3 = dn1Map.get(dn1.get(dn1.size()-1)); | |
| 1346 | + ScheduleRealInfo s4 = dn2Map.get(dn2.get(dn2.size()-1)); | |
| 1347 | + long delayFirst1 = dn1.get(0) - dn2.get(0); | |
| 1348 | + long delayLast1 = dn1.get(dn1.size()-1) - dn2.get(dn2.size()-1); | |
| 1349 | + tempMap.put("qdzFirst1", s1.getQdzName()); | |
| 1350 | + tempMap.put("jhfcFirst1", s1.getFcsj()); | |
| 1351 | + tempMap.put("sjfcFirst1", s2.getFcsjActual()); | |
| 1352 | + tempMap.put("delayFirst1", delayFirst1>0?"+"+delayFirst1:delayFirst1); | |
| 1353 | + tempMap.put("qdzLast1", s3.getQdzName()); | |
| 1354 | + tempMap.put("jhfcLast1", s3.getFcsj()); | |
| 1355 | + tempMap.put("sjfcLast1", s4.getFcsjActual()); | |
| 1356 | + tempMap.put("delayLast1", delayLast1>0?"+"+delayLast1:delayLast1); | |
| 1357 | + } else { | |
| 1321 | 1358 | tempMap.put("qdzFirst1", "--"); |
| 1322 | 1359 | tempMap.put("jhfcFirst1", "/"); |
| 1323 | - tempMap.put("qdzLast1", "--"); | |
| 1324 | - tempMap.put("jhfcLast1", "/"); | |
| 1325 | 1360 | tempMap.put("sjfcFirst1", "/"); |
| 1326 | 1361 | tempMap.put("delayFirst1", "/"); |
| 1362 | + tempMap.put("qdzLast1", "--"); | |
| 1363 | + tempMap.put("jhfcLast1", "/"); | |
| 1327 | 1364 | tempMap.put("sjfcLast1", "/"); |
| 1328 | 1365 | tempMap.put("delayLast1", "/"); |
| 1329 | 1366 | } |
| 1330 | - | |
| 1331 | - tempMap.put("date", date); | |
| 1332 | 1367 | tempMap.put("company", companyName); |
| 1333 | 1368 | tempMap.put("subCompany", subCompanyName); |
| 1334 | - tempMap.put("line", key); | |
| 1369 | + tempMap.put("date", date); | |
| 1370 | + tempMap.put("line", xlName); | |
| 1335 | 1371 | resList.add(tempMap); |
| 1336 | 1372 | } |
| 1337 | - | |
| 1373 | + | |
| 1338 | 1374 | if(type.equals("export")){ |
| 1339 | 1375 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| 1340 | 1376 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| ... | ... | @@ -1357,164 +1393,248 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1357 | 1393 | |
| 1358 | 1394 | @Override |
| 1359 | 1395 | public List<Map<String, Object>> firstAndLastBus_sum(Map<String, Object> map) { |
| 1396 | + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | |
| 1360 | 1397 | NumberFormat nf = NumberFormat.getNumberInstance(); |
| 1361 | 1398 | nf.setMinimumFractionDigits(2); |
| 1399 | + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | |
| 1362 | 1400 | List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); |
| 1363 | - Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>(); | |
| 1364 | 1401 | |
| 1365 | 1402 | String company = map.get("company").toString(); |
| 1366 | 1403 | String subCompany = map.get("subCompany").toString(); |
| 1367 | 1404 | String line = map.get("line").toString(); |
| 1368 | - String date = map.get("date").toString(); | |
| 1405 | +// String date = map.get("date").toString(); | |
| 1406 | + String startDate = map.get("startDate").toString(); | |
| 1407 | + String endDate = map.get("endDate").toString(); | |
| 1369 | 1408 | String type = map.get("type").toString(); |
| 1370 | 1409 | |
| 1371 | - if(date.length() == 0) | |
| 1372 | - date = new SimpleDateFormat("yyyy-MM-dd").format(new Date()); | |
| 1373 | - | |
| 1374 | - List<ScheduleRealInfo> list = this.getSchedule(company, subCompany, line, date); | |
| 1410 | + if(startDate.length() == 0) | |
| 1411 | + startDate = sdf.format(new Date()); | |
| 1412 | + if(endDate.length() == 0) | |
| 1413 | + endDate = sdf.format(new Date()); | |
| 1375 | 1414 | |
| 1376 | - for(ScheduleRealInfo schedule : list){ | |
| 1377 | - if(schedule.getBcType().equals("in") || schedule.getBcType().equals("out") || schedule.getBcType().equals("ldks")) | |
| 1378 | - continue; | |
| 1379 | - if(schedule.getStatus() == -1){ | |
| 1380 | - continue; | |
| 1381 | - } | |
| 1382 | - String key = schedule.getXlName(); | |
| 1383 | - if(key == null || key.trim().length() == 0) | |
| 1384 | - continue; | |
| 1385 | - if(!keyMap.containsKey(key)) | |
| 1386 | - keyMap.put(key, new ArrayList<ScheduleRealInfo>()); | |
| 1387 | - keyMap.get(key).add(schedule); | |
| 1415 | + String dates = ""; | |
| 1416 | + if(startDate.equals(endDate)){ | |
| 1417 | + String[] split = startDate.split("-"); | |
| 1418 | + dates = split[0]+"年"+split[1]+"月"+split[2]+"日"; | |
| 1419 | + } else { | |
| 1420 | + String[] split1 = startDate.split("-"); | |
| 1421 | + String[] split2 = endDate.split("-"); | |
| 1422 | + dates = split1[0]+"年"+split1[1]+"月"+split1[2]+"日--" | |
| 1423 | + +split2[0]+"年"+split2[1]+"月"+split2[2]+"日"; | |
| 1388 | 1424 | } |
| 1389 | - for(String key : keyMap.keySet()){ | |
| 1390 | - Map<String, Object> tempMap = new HashMap<String, Object>(); | |
| 1391 | - Map<String, Object> m = new HashMap<String, Object>(); | |
| 1392 | - Map<Long, ScheduleRealInfo> temp0 = new HashMap<Long, ScheduleRealInfo>(); | |
| 1393 | - List<Long> longList0 = new ArrayList<Long>(); | |
| 1394 | - Map<Long, ScheduleRealInfo> temp1 = new HashMap<Long, ScheduleRealInfo>(); | |
| 1395 | - List<Long> longList1 = new ArrayList<Long>(); | |
| 1396 | - String companyName = "", subCompanyName = ""; | |
| 1397 | - for(ScheduleRealInfo schedule : keyMap.get(key)){ | |
| 1398 | - if(schedule.getFcsjActual() == null || schedule.getFcsjActual().trim().length() == 0){ | |
| 1399 | - continue; | |
| 1400 | - } | |
| 1401 | - if(schedule.getGsName() != null && companyName.length() == 0) | |
| 1402 | - companyName = schedule.getGsName(); | |
| 1403 | - if(schedule.getFgsName() != null && subCompanyName.length() == 0) | |
| 1404 | - subCompanyName = schedule.getFgsName(); | |
| 1405 | - String[] split = schedule.getFcsj().split(":"); | |
| 1406 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | |
| 1407 | - schedule.setFcsjT(min); | |
| 1408 | - if(schedule.getXlDir().equals("0")){ | |
| 1409 | - temp0.put(min, schedule); | |
| 1410 | - longList0.add(min); | |
| 1411 | - } else { | |
| 1412 | - temp1.put(min, schedule); | |
| 1413 | - longList1.add(min); | |
| 1425 | + | |
| 1426 | + try { | |
| 1427 | + String sql = "select a.schedule_date_Str, a.real_exec_date, a.xl_name, a.fcsj, a.fcsj_actual, a.zdsj, a.zdsj_actual, a.qdz_name, a.zdz_name, a.xl_dir, a.status, a.gs_name, a.fgs_name," | |
| 1428 | + + " b.start_opt from bsth_c_s_sp_info_real a left join (select line, start_opt from bsth_c_line_config order by id desc) b on a.xl_bm = b.line" | |
| 1429 | + + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"' and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'" | |
| 1430 | + + " and fcsj_actual is not null and fcsj_actual != '' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'"; | |
| 1431 | + if(line.length() != 0) | |
| 1432 | + sql += " and xl_bm = '"+line+"'"; | |
| 1433 | + if(company.length() != 0) | |
| 1434 | + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'"; | |
| 1435 | + | |
| 1436 | + list = jdbcTemplate.query(sql, | |
| 1437 | + new RowMapper<ScheduleRealInfo>(){ | |
| 1438 | + @Override | |
| 1439 | + public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { | |
| 1440 | + ScheduleRealInfo schedule = new ScheduleRealInfo(); | |
| 1441 | + schedule.setScheduleDateStr(rs.getString("schedule_date_Str")); | |
| 1442 | + schedule.setRealExecDate(rs.getString("real_exec_date")); | |
| 1443 | + schedule.setXlName(rs.getString("xl_name")); | |
| 1444 | + schedule.setFcsj(rs.getString("fcsj")); | |
| 1445 | + schedule.setFcsjActual(rs.getString("fcsj_actual")); | |
| 1446 | + schedule.setZdsj(rs.getString("zdsj")); | |
| 1447 | + schedule.setZdsjActual(rs.getString("zdsj_actual")); | |
| 1448 | + schedule.setQdzName(rs.getString("qdz_name")); | |
| 1449 | + schedule.setZdzName(rs.getString("zdz_name")); | |
| 1450 | + schedule.setXlDir(rs.getString("xl_dir")); | |
| 1451 | + schedule.setStatus(rs.getInt("status")); | |
| 1452 | + schedule.setGsName(rs.getString("gs_name")); | |
| 1453 | + schedule.setFgsName(rs.getString("fgs_name")); | |
| 1454 | + | |
| 1455 | + int startOpt = 0; | |
| 1456 | + if(rs.getString("start_opt") != null && rs.getString("start_opt").trim().length() != 0){ | |
| 1457 | + String[] split = rs.getString("start_opt").split(":"); | |
| 1458 | + startOpt = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | |
| 1459 | + } | |
| 1460 | + | |
| 1461 | + if(schedule.getFcsjActual() != null && schedule.getFcsjActual().trim().length() == 0){ | |
| 1462 | + schedule.setFcsjActual(null); | |
| 1463 | + } | |
| 1464 | + if(schedule.getZdsjActual() != null && schedule.getZdsjActual().trim().length() == 0){ | |
| 1465 | + schedule.setZdsjActual(null); | |
| 1466 | + } | |
| 1467 | + if(schedule.getFcsj() != null){ | |
| 1468 | + String[] split = schedule.getFcsj().split(":"); | |
| 1469 | + int fcsj = Integer.valueOf(split[0]) * 60 + Integer.valueOf(split[1]); | |
| 1470 | + if(fcsj < startOpt) | |
| 1471 | + fcsj += 1440; | |
| 1472 | + schedule.setFcsjT((long)fcsj); | |
| 1473 | + } | |
| 1474 | + if(schedule.getFcsjActual() != null){ | |
| 1475 | + String[] split = schedule.getFcsjActual().split(":"); | |
| 1476 | + int fcsjA = Integer.valueOf(split[0]) * 60 + Integer.valueOf(split[1]); | |
| 1477 | + if(fcsjA < startOpt || !schedule.getRealExecDate().equals(schedule.getScheduleDateStr())) | |
| 1478 | + fcsjA += 1440; | |
| 1479 | + schedule.setFcsjActualTime((long)fcsjA); | |
| 1480 | + } | |
| 1481 | + | |
| 1482 | + return schedule; | |
| 1414 | 1483 | } |
| 1415 | - } | |
| 1484 | + }); | |
| 1416 | 1485 | |
| 1417 | - if(longList0.size() == 0 && longList1.size() == 0){ | |
| 1418 | - continue; | |
| 1486 | + } catch (Exception e) { | |
| 1487 | + // TODO: handle exception | |
| 1488 | + e.printStackTrace(); | |
| 1489 | + } | |
| 1490 | + | |
| 1491 | + Map<String, Map<String, List<ScheduleRealInfo>>> keyMap = new HashMap<String, Map<String,List<ScheduleRealInfo>>>(); | |
| 1492 | + String companyName = "", subCompanyName = ""; | |
| 1493 | + | |
| 1494 | + for(ScheduleRealInfo s : list){ | |
| 1495 | + String xlName = s.getXlName(); | |
| 1496 | + String date = s.getScheduleDateStr(); | |
| 1497 | + if(!keyMap.containsKey(xlName)) | |
| 1498 | + keyMap.put(xlName, new HashMap<String, List<ScheduleRealInfo>>()); | |
| 1499 | + if(!keyMap.get(xlName).containsKey(date)) | |
| 1500 | + keyMap.get(xlName).put(date, new ArrayList<ScheduleRealInfo>()); | |
| 1501 | + keyMap.get(xlName).get(date).add(s); | |
| 1502 | + if(companyName.length()==0&&s.getGsName()!=null&&s.getGsName().trim().length()!=0) | |
| 1503 | + companyName = s.getGsName(); | |
| 1504 | + if(subCompanyName.length()==0&&s.getFgsName()!=null&&s.getFgsName().trim().length()!=0) | |
| 1505 | + subCompanyName = s.getFgsName(); | |
| 1506 | + } | |
| 1507 | + | |
| 1508 | + for(String xlName : keyMap.keySet()){ | |
| 1509 | + List<Map<String, Object>> tempList = new ArrayList<Map<String,Object>>(); | |
| 1510 | + Map<String, Object> tempMap = new HashMap<String, Object>(); | |
| 1511 | + Map<Long, String> dateMap = new HashMap<Long, String>(); | |
| 1512 | + List<Long> Longs = new ArrayList<Long>(); | |
| 1513 | + int jhbc = 0, sjbc = 0; | |
| 1514 | + for(String date : keyMap.get(xlName).keySet()){ | |
| 1515 | + String[] split = date.split("-"); | |
| 1516 | + long l = Long.valueOf(split[0])*10000 + Long.valueOf(split[1])*100 + Long.valueOf(split[2]); | |
| 1517 | + dateMap.put(l, date); | |
| 1518 | + Longs.add(l); | |
| 1419 | 1519 | } |
| 1420 | - int jhbc = 0; | |
| 1421 | - int sjbc = 0; | |
| 1422 | - | |
| 1423 | - if(longList0.size() != 0){ | |
| 1424 | - Collections.sort(longList0); | |
| 1425 | - ScheduleRealInfo shouban0 = temp0.get(longList0.get(0)); | |
| 1426 | - ScheduleRealInfo moban0 = temp0.get(longList0.get(longList0.size() - 1)); | |
| 1427 | - if(shouban0.getFcsjActual() != null){ | |
| 1428 | - jhbc++; | |
| 1429 | - String[] split = shouban0.getFcsjActual().split(":"); | |
| 1430 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | |
| 1431 | - long delay = shouban0.getFcsjT() - min; | |
| 1432 | - if(delay >= -3 && delay <= 1){ | |
| 1433 | - sjbc++; | |
| 1520 | + Collections.sort(Longs); | |
| 1521 | + for(long l : Longs){ | |
| 1522 | + String date = dateMap.get(l); | |
| 1523 | + Map<String, Object> temp = new HashMap<String, Object>(); | |
| 1524 | + temp.put("date", date.substring(5)); | |
| 1525 | + temp.put("line", xlName); | |
| 1526 | + List<Long> up1 = new ArrayList<Long>(); | |
| 1527 | + List<Long> up2 = new ArrayList<Long>();; | |
| 1528 | + List<Long> dn1 = new ArrayList<Long>(); | |
| 1529 | + List<Long> dn2 = new ArrayList<Long>(); | |
| 1530 | + Map<Long, ScheduleRealInfo> up1Map = new HashMap<Long, ScheduleRealInfo>(); | |
| 1531 | + Map<Long, ScheduleRealInfo> up2Map = new HashMap<Long, ScheduleRealInfo>(); | |
| 1532 | + Map<Long, ScheduleRealInfo> dn1Map = new HashMap<Long, ScheduleRealInfo>(); | |
| 1533 | + Map<Long, ScheduleRealInfo> dn2Map = new HashMap<Long, ScheduleRealInfo>(); | |
| 1534 | + for(ScheduleRealInfo s : keyMap.get(xlName).get(date)){ | |
| 1535 | + if(s.getXlDir().equals("0")){ | |
| 1536 | + up1.add(s.getFcsjT()); | |
| 1537 | + up2.add(s.getFcsjActualTime()); | |
| 1538 | + up1Map.put(s.getFcsjT(), s); | |
| 1539 | + up2Map.put(s.getFcsjActualTime(), s); | |
| 1540 | + } else if(s.getXlDir().equals("1")){ | |
| 1541 | + dn1.add(s.getFcsjT()); | |
| 1542 | + dn2.add(s.getFcsjActualTime()); | |
| 1543 | + dn1Map.put(s.getFcsjT(), s); | |
| 1544 | + dn2Map.put(s.getFcsjActualTime(), s); | |
| 1434 | 1545 | } |
| 1435 | - m.put("qdzFirst0", shouban0.getQdzName()); | |
| 1436 | - m.put("jhfcFirst0", shouban0.getFcsj()); | |
| 1437 | - m.put("sjfcFirst0", shouban0.getFcsjActual()); | |
| 1438 | - m.put("delayFirst0", delay>0?"+"+delay:delay); | |
| 1439 | 1546 | } |
| 1440 | - | |
| 1441 | - if(moban0.getFcsjActual() != null){ | |
| 1442 | - jhbc++; | |
| 1443 | - String[] split = moban0.getFcsjActual().split(":"); | |
| 1444 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | |
| 1445 | - long delay = moban0.getFcsjT() - min; | |
| 1446 | - if(delay >= -3 && delay <= 1){ | |
| 1547 | + if(up1.size() > 0 && up2.size() > 0){ | |
| 1548 | + Collections.sort(up1); | |
| 1549 | + Collections.sort(up2); | |
| 1550 | + ScheduleRealInfo s1 = up1Map.get(up1.get(0)); | |
| 1551 | + ScheduleRealInfo s2 = up2Map.get(up2.get(0)); | |
| 1552 | + ScheduleRealInfo s3 = up1Map.get(up1.get(up1.size()-1)); | |
| 1553 | + ScheduleRealInfo s4 = up2Map.get(up2.get(up2.size()-1)); | |
| 1554 | + long delayFirst0 = up1.get(0) - up2.get(0); | |
| 1555 | + long delayLast0 = up1.get(up1.size()-1) - up2.get(up2.size()-1); | |
| 1556 | + temp.put("qdzFirst0", s1.getQdzName()); | |
| 1557 | + temp.put("jhfcFirst0", s1.getFcsj()); | |
| 1558 | + temp.put("sjfcFirst0", s2.getFcsjActual()); | |
| 1559 | + temp.put("delayFirst0", delayFirst0>0?"+"+delayFirst0:delayFirst0); | |
| 1560 | + temp.put("qdzLast0", s3.getQdzName()); | |
| 1561 | + temp.put("jhfcLast0", s3.getFcsj()); | |
| 1562 | + temp.put("sjfcLast0", s4.getFcsjActual()); | |
| 1563 | + temp.put("delayLast0", delayLast0>0?"+"+delayLast0:delayLast0); | |
| 1564 | + jhbc += 2; | |
| 1565 | + if(delayFirst0 <= 1l && delayFirst0 >= -3l) | |
| 1447 | 1566 | sjbc++; |
| 1448 | - } | |
| 1449 | - m.put("qdzLast0", moban0.getQdzName()); | |
| 1450 | - m.put("jhfcLast0", moban0.getFcsj()); | |
| 1451 | - m.put("sjfcLast0", moban0.getFcsjActual()); | |
| 1452 | - m.put("delayLast0", delay>0?"+"+delay:delay); | |
| 1453 | - } | |
| 1454 | - } else { | |
| 1455 | - m.put("qdzFirst0", "--"); | |
| 1456 | - m.put("jhfcFirst0", "/"); | |
| 1457 | - m.put("sjfcFirst0", "/"); | |
| 1458 | - m.put("delayFirst0", "/"); | |
| 1459 | - m.put("qdzLast0", "--"); | |
| 1460 | - m.put("jhfcLast0", "/"); | |
| 1461 | - m.put("sjfcLast0", "/"); | |
| 1462 | - m.put("delayLast0", "/"); | |
| 1463 | - } | |
| 1464 | - | |
| 1465 | - if(longList1.size() != 0){ | |
| 1466 | - Collections.sort(longList1); | |
| 1467 | - ScheduleRealInfo shouban1 = temp1.get(longList1.get(0)); | |
| 1468 | - ScheduleRealInfo moban1 = temp1.get(longList1.get(longList1.size() - 1)); | |
| 1469 | - if(shouban1.getFcsjActual() != null){ | |
| 1470 | - jhbc++; | |
| 1471 | - String[] split = shouban1.getFcsjActual().split(":"); | |
| 1472 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | |
| 1473 | - long delay = shouban1.getFcsjT() - min; | |
| 1474 | - if(delay >= -3 && delay <= 1){ | |
| 1567 | + if(delayLast0 <= 1l && delayLast0 >= -3l) | |
| 1475 | 1568 | sjbc++; |
| 1476 | - } | |
| 1477 | - m.put("qdzFirst1", shouban1.getQdzName()); | |
| 1478 | - m.put("jhfcFirst1", shouban1.getFcsj()); | |
| 1479 | - m.put("sjfcFirst1", shouban1.getFcsjActual()); | |
| 1480 | - m.put("delayFirst1", delay>0?"+"+delay:delay); | |
| 1569 | + } else { | |
| 1570 | + temp.put("qdzFirst0", "--"); | |
| 1571 | + temp.put("jhfcFirst0", "/"); | |
| 1572 | + temp.put("sjfcFirst0", "/"); | |
| 1573 | + temp.put("delayFirst0", "/"); | |
| 1574 | + temp.put("qdzLast0", "--"); | |
| 1575 | + temp.put("jhfcLast0", "/"); | |
| 1576 | + temp.put("sjfcLast0", "/"); | |
| 1577 | + temp.put("delayLast0", "/"); | |
| 1481 | 1578 | } |
| 1482 | - | |
| 1483 | - if(moban1.getFcsjActual() != null){ | |
| 1484 | - jhbc++; | |
| 1485 | - String[] split = moban1.getFcsjActual().split(":"); | |
| 1486 | - long min = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); | |
| 1487 | - long delay = moban1.getFcsjT() - min; | |
| 1488 | - if(delay >= -3 && delay <= 1){ | |
| 1579 | + if(dn1.size() > 0 && dn2.size() > 0){ | |
| 1580 | + Collections.sort(dn1); | |
| 1581 | + Collections.sort(dn2); | |
| 1582 | + ScheduleRealInfo s1 = dn1Map.get(dn1.get(0)); | |
| 1583 | + ScheduleRealInfo s2 = dn2Map.get(dn2.get(0)); | |
| 1584 | + ScheduleRealInfo s3 = dn1Map.get(dn1.get(dn1.size()-1)); | |
| 1585 | + ScheduleRealInfo s4 = dn2Map.get(dn2.get(dn2.size()-1)); | |
| 1586 | + long delayFirst1 = dn1.get(0) - dn2.get(0); | |
| 1587 | + long delayLast1 = dn1.get(dn1.size()-1) - dn2.get(dn2.size()-1); | |
| 1588 | + temp.put("qdzFirst1", s1.getQdzName()); | |
| 1589 | + temp.put("jhfcFirst1", s1.getFcsj()); | |
| 1590 | + temp.put("sjfcFirst1", s2.getFcsjActual()); | |
| 1591 | + temp.put("delayFirst1", delayFirst1>0?"+"+delayFirst1:delayFirst1); | |
| 1592 | + temp.put("qdzLast1", s3.getQdzName()); | |
| 1593 | + temp.put("jhfcLast1", s3.getFcsj()); | |
| 1594 | + temp.put("sjfcLast1", s4.getFcsjActual()); | |
| 1595 | + temp.put("delayLast1", delayLast1>0?"+"+delayLast1:delayLast1); | |
| 1596 | + jhbc += 2; | |
| 1597 | + if(delayFirst1 <= 1l && delayFirst1 >= -3l) | |
| 1489 | 1598 | sjbc++; |
| 1490 | - } | |
| 1491 | - m.put("qdzLast1", moban1.getQdzName()); | |
| 1492 | - m.put("jhfcLast1", moban1.getFcsj()); | |
| 1493 | - m.put("sjfcLast1", moban1.getFcsjActual()); | |
| 1494 | - m.put("delayLast1", delay>0?"+"+delay:delay); | |
| 1599 | + if(delayLast1 <= 1l && delayLast1 >= -3l) | |
| 1600 | + sjbc++; | |
| 1601 | + } else { | |
| 1602 | + temp.put("qdzFirst1", "--"); | |
| 1603 | + temp.put("jhfcFirst1", "/"); | |
| 1604 | + temp.put("sjfcFirst1", "/"); | |
| 1605 | + temp.put("delayFirst1", "/"); | |
| 1606 | + temp.put("qdzLast1", "--"); | |
| 1607 | + temp.put("jhfcLast1", "/"); | |
| 1608 | + temp.put("sjfcLast1", "/"); | |
| 1609 | + temp.put("delayLast1", "/"); | |
| 1495 | 1610 | } |
| 1496 | - } else { | |
| 1497 | - m.put("qdzFirst1", "--"); | |
| 1498 | - m.put("jhfcFirst1", "/"); | |
| 1499 | - m.put("sjfcFirst1", "/"); | |
| 1500 | - m.put("delayFirst1", "/"); | |
| 1501 | - m.put("qdzLast1", "--"); | |
| 1502 | - m.put("jhfcLast1", "/"); | |
| 1503 | - m.put("sjfcLast1", "/"); | |
| 1504 | - m.put("delayLast1", "/"); | |
| 1611 | + tempList.add(temp); | |
| 1505 | 1612 | } |
| 1506 | - | |
| 1507 | - m.put("line", key); | |
| 1508 | - tempMap.put("map", m); | |
| 1613 | + tempMap.put("map", tempList); | |
| 1614 | + tempMap.put("company", companyName); | |
| 1615 | + tempMap.put("subCompany", subCompanyName); | |
| 1616 | + tempMap.put("date", dates); | |
| 1617 | + tempMap.put("line", xlName); | |
| 1509 | 1618 | tempMap.put("jhbc", jhbc); |
| 1510 | 1619 | tempMap.put("sjbc", sjbc); |
| 1511 | 1620 | tempMap.put("zdl", nf.format((float) sjbc / jhbc *100) + "%"); |
| 1512 | - tempMap.put("date", date); | |
| 1513 | - tempMap.put("company", companyName); | |
| 1514 | - tempMap.put("subCompany", subCompanyName); | |
| 1515 | - tempMap.put("line", key); | |
| 1516 | 1621 | resList.add(tempMap); |
| 1517 | 1622 | } |
| 1623 | + | |
| 1624 | + Map<String, Object> tempMap = new HashMap<String, Object>(); | |
| 1625 | + if(resList.size() > 0){ | |
| 1626 | + tempMap.put("date", "合计汇总"); | |
| 1627 | + int jhbc = 0, sjbc = 0; | |
| 1628 | + for(Map<String, Object> m : resList){ | |
| 1629 | + jhbc += Integer.valueOf(m.get("jhbc").toString()); | |
| 1630 | + sjbc += Integer.valueOf(m.get("sjbc").toString()); | |
| 1631 | + } | |
| 1632 | + tempMap.put("jhbc", jhbc); | |
| 1633 | + tempMap.put("sjbc", sjbc); | |
| 1634 | + tempMap.put("zdl", nf.format((float) sjbc / jhbc *100) + "%"); | |
| 1635 | + if(!type.equals("export")) | |
| 1636 | + resList.add(tempMap); | |
| 1637 | + } | |
| 1518 | 1638 | |
| 1519 | 1639 | if(type.equals("export")){ |
| 1520 | 1640 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| ... | ... | @@ -1525,8 +1645,9 @@ public class PeopleCarPlanServiceImpl implements PeopleCarPlanService { |
| 1525 | 1645 | try { |
| 1526 | 1646 | listI.add(resList.iterator()); |
| 1527 | 1647 | String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; |
| 1528 | - ee.excelReplace(listI, new Object[] { m }, path+"mould/firstAndLastBus_sum.xls", | |
| 1529 | - path+"export/线路首末班准点率" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | |
| 1648 | + ee.excelReplace(listI, new Object[] { tempMap }, path+"mould/firstAndLastBus_sum.xls", | |
| 1649 | + path+"export/线路首末班准点率" + sdfSimple.format(sdfMonth.parse(startDate)) + | |
| 1650 | + (startDate.equals(endDate)?"":"-"+sdfSimple.format(sdfMonth.parse(endDate))) + ".xls"); | |
| 1530 | 1651 | } catch (Exception e) { |
| 1531 | 1652 | // TODO: handle exception |
| 1532 | 1653 | e.printStackTrace(); | ... | ... |
src/main/java/com/bsth/service/traffic/SKBUploadLoggerService.java
0 → 100644
src/main/java/com/bsth/service/traffic/YgcBasicDataService.java
0 → 100644
src/main/java/com/bsth/service/traffic/impl/SKBUploadLoggerServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.traffic.impl; | |
| 2 | + | |
| 3 | +import com.bsth.entity.traffic.SKBUploadLogger; | |
| 4 | +import com.bsth.service.impl.BaseServiceImpl; | |
| 5 | +import com.bsth.service.traffic.SKBUploadLoggerService; | |
| 6 | +import org.slf4j.Logger; | |
| 7 | +import org.slf4j.LoggerFactory; | |
| 8 | +import org.springframework.stereotype.Service; | |
| 9 | + | |
| 10 | +/** | |
| 11 | + * | |
| 12 | + * @ClassName: TrafficManageServiceImpl(运管处接口service业务层实现类) | |
| 13 | + * | |
| 14 | + * @Extends : BaseService | |
| 15 | + * | |
| 16 | + * @Description: | |
| 17 | + * | |
| 18 | + * @Author bsth@zq | |
| 19 | + * | |
| 20 | + * @Date 2016年10月28日 上午9:21:17 | |
| 21 | + * | |
| 22 | + * @Version 公交调度系统BS版 0.1 | |
| 23 | + * | |
| 24 | + */ | |
| 25 | + | |
| 26 | +@Service | |
| 27 | +public class SKBUploadLoggerServiceImpl extends BaseServiceImpl<SKBUploadLogger,Integer> implements SKBUploadLoggerService{ | |
| 28 | + | |
| 29 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | |
| 30 | + | |
| 31 | +} | ... | ... |
src/main/java/com/bsth/service/traffic/impl/YgcBasicDataServiceImpl.java
0 → 100644
| 1 | +package com.bsth.service.traffic.impl; | |
| 2 | + | |
| 3 | +import com.bsth.service.impl.TrafficManageServiceImpl; | |
| 4 | +import com.bsth.service.traffic.YgcBasicDataService; | |
| 5 | +import com.bsth.util.db.DBUtils_oldSystem; | |
| 6 | +import org.apache.axiom.om.*; | |
| 7 | +import org.apache.axis2.addressing.EndpointReference; | |
| 8 | +import org.apache.axis2.client.Options; | |
| 9 | +import org.apache.axis2.client.ServiceClient; | |
| 10 | +import org.apache.commons.codec.digest.DigestUtils; | |
| 11 | +import org.slf4j.Logger; | |
| 12 | +import org.slf4j.LoggerFactory; | |
| 13 | +import org.springframework.beans.factory.annotation.Autowired; | |
| 14 | +import org.springframework.jdbc.core.BatchPreparedStatementSetter; | |
| 15 | +import org.springframework.jdbc.core.JdbcTemplate; | |
| 16 | +import org.springframework.stereotype.Service; | |
| 17 | +import org.w3c.dom.Document; | |
| 18 | +import org.w3c.dom.NodeList; | |
| 19 | + | |
| 20 | +import javax.activation.DataHandler; | |
| 21 | +import javax.xml.parsers.DocumentBuilder; | |
| 22 | +import javax.xml.parsers.DocumentBuilderFactory; | |
| 23 | +import java.io.*; | |
| 24 | +import java.sql.PreparedStatement; | |
| 25 | +import java.sql.SQLException; | |
| 26 | +import java.util.ArrayList; | |
| 27 | +import java.util.HashMap; | |
| 28 | +import java.util.List; | |
| 29 | +import java.util.zip.ZipEntry; | |
| 30 | +import java.util.zip.ZipFile; | |
| 31 | +import java.util.zip.ZipInputStream; | |
| 32 | + | |
| 33 | +/** | |
| 34 | + * 运管处基础数据操作类 | |
| 35 | + * Created by zq on 2017/6/15. | |
| 36 | + */ | |
| 37 | +@Service | |
| 38 | +public class YgcBasicDataServiceImpl implements YgcBasicDataService{ | |
| 39 | + Logger logger = LoggerFactory.getLogger(TrafficManageServiceImpl.class); | |
| 40 | + | |
| 41 | + @Autowired | |
| 42 | + JdbcTemplate jdbcTemplate; | |
| 43 | + | |
| 44 | + private static String IP = "218.242.195.76:9091"; | |
| 45 | + private static String targetEndpoint = "http://" + IP +"/ygc.TransManager.Basicdown?wsdl"; | |
| 46 | + private static String namespace = "http://service.shygc.com"; | |
| 47 | + private static String userName = "admin"; | |
| 48 | + private static String passWord = "000000"; | |
| 49 | + private static EndpointReference targetEPR; | |
| 50 | + { | |
| 51 | + try { | |
| 52 | + targetEPR = new EndpointReference(targetEndpoint); | |
| 53 | + } catch (Exception e) { | |
| 54 | + e.printStackTrace(); | |
| 55 | + } | |
| 56 | + } | |
| 57 | + | |
| 58 | + /** | |
| 59 | + * 更新运管处基础数据 | |
| 60 | + */ | |
| 61 | + public void updateYgcBasicData(){ | |
| 62 | + String saveFile = "ygcBasicData.zip"; | |
| 63 | + String flag = "failure"; | |
| 64 | + try { | |
| 65 | + // 调用接口下载基础数据 | |
| 66 | + if(download(userName, DigestUtils.md5Hex(passWord), saveFile)){ | |
| 67 | + // 读取基础数据zip | |
| 68 | + StringBuffer sb = readZipFile(saveFile); | |
| 69 | + // 解析xml | |
| 70 | + List<HashMap<String,String>> result = parseXml(sb); | |
| 71 | + // 插入数据库 | |
| 72 | + if(result != null && result.size() > 0){ | |
| 73 | + insertRecord(result); | |
| 74 | + } | |
| 75 | + } | |
| 76 | + flag = "success"; | |
| 77 | + }catch (Exception e){ | |
| 78 | + e.printStackTrace(); | |
| 79 | + } | |
| 80 | + finally { | |
| 81 | + // 删除文件 | |
| 82 | + File fill = new File(saveFile); | |
| 83 | + logger.info("updateYgcBasicData:"+fill.getAbsolutePath()); | |
| 84 | + logger.info("updateYgcBasicData:"+flag); | |
| 85 | + if(fill.exists()){ | |
| 86 | + fill.delete(); | |
| 87 | + } | |
| 88 | + } | |
| 89 | + } | |
| 90 | + /** | |
| 91 | + * 下载基础数据,并生成rar文件 | |
| 92 | + * @param userName | |
| 93 | + * @param password | |
| 94 | + * @param saveFile | |
| 95 | + * @return | |
| 96 | + */ | |
| 97 | + private boolean download(String userName, String password, String saveFile) | |
| 98 | + { | |
| 99 | + try | |
| 100 | + { | |
| 101 | + OMElement data = buildDownloadEnvelope(userName, password); | |
| 102 | + ServiceClient sender = new ServiceClient(); | |
| 103 | + Options options = sender.getOptions(); | |
| 104 | + options.setProperty("SO_TIMEOUT", Integer.valueOf(1800000)); | |
| 105 | + options.setTo(targetEPR); | |
| 106 | + sender.setOptions(options); | |
| 107 | + System.out.println("The data in method download: " + data); | |
| 108 | + data.build(); | |
| 109 | + OMElement ome = sender.sendReceive(data); | |
| 110 | + | |
| 111 | + OMText binaryNode = (OMText)ome.getFirstOMChild(); | |
| 112 | + binaryNode.setOptimize(true); | |
| 113 | + DataHandler actualDH = (DataHandler)binaryNode.getDataHandler(); | |
| 114 | + FileOutputStream imageOutStream = new FileOutputStream(saveFile); | |
| 115 | + InputStream is = actualDH.getInputStream(); | |
| 116 | + int read ; | |
| 117 | + byte[] buffer = new byte[1024]; | |
| 118 | + while ((read = is.read(buffer)) != -1) { | |
| 119 | + imageOutStream.write(buffer, 0, read); | |
| 120 | + } | |
| 121 | + return true; | |
| 122 | + } catch (Exception e) { | |
| 123 | + e.printStackTrace(); | |
| 124 | + }return false; | |
| 125 | + } | |
| 126 | + | |
| 127 | + /** | |
| 128 | + * 构建webservice接口参数 | |
| 129 | + * @param userName | |
| 130 | + * @param password | |
| 131 | + * @return | |
| 132 | + */ | |
| 133 | + private OMElement buildDownloadEnvelope(String userName, String password) | |
| 134 | + { | |
| 135 | + OMFactory fac = OMAbstractFactory.getOMFactory(); | |
| 136 | + OMNamespace omNs = fac.createOMNamespace(namespace, | |
| 137 | + "ser"); | |
| 138 | + OMElement data = fac.createOMElement("downloadAllDataFile", omNs); | |
| 139 | + OMElement _userName = fac.createOMElement("userName", omNs); | |
| 140 | + _userName.setText(userName); | |
| 141 | + OMElement _passWord = fac.createOMElement("passWord", omNs); | |
| 142 | + _passWord.setText(String.valueOf(password)); | |
| 143 | + | |
| 144 | + data.addChild(_userName); | |
| 145 | + data.addChild(_passWord); | |
| 146 | + | |
| 147 | + OMElement soap = fac.createOMElement("downloadAllDataFile", omNs); | |
| 148 | + soap.addChild(data); | |
| 149 | + return soap; | |
| 150 | + } | |
| 151 | + | |
| 152 | + /** | |
| 153 | + * 读取zip文件的内容 | |
| 154 | + * @param file | |
| 155 | + * @return | |
| 156 | + * @throws Exception | |
| 157 | + */ | |
| 158 | + public StringBuffer readZipFile(String file) throws Exception { | |
| 159 | + ZipFile zf = new ZipFile(file); | |
| 160 | + InputStream in = new BufferedInputStream(new FileInputStream(file)); | |
| 161 | + ZipInputStream zin = new ZipInputStream(in); | |
| 162 | + ZipEntry ze; | |
| 163 | + StringBuffer sb = new StringBuffer(); | |
| 164 | + while ((ze = zin.getNextEntry()) != null) { | |
| 165 | + System.out.print(ze); | |
| 166 | + if (ze.isDirectory()) { | |
| 167 | + } else { | |
| 168 | + System.err.println("file - " + ze.getName() + " : " | |
| 169 | + + ze.getSize() + " bytes"); | |
| 170 | + long size = ze.getSize(); | |
| 171 | + if (size > 0) { | |
| 172 | + BufferedReader br = new BufferedReader( | |
| 173 | + new InputStreamReader(zf.getInputStream(ze),"GBK")); | |
| 174 | + String line; | |
| 175 | + boolean addFlag = false; | |
| 176 | + while ((line = br.readLine()) != null) { | |
| 177 | + if(line.indexOf("BusLineList") != -1){ | |
| 178 | + addFlag = true; | |
| 179 | + } | |
| 180 | + if(addFlag){ | |
| 181 | + sb.append(line); | |
| 182 | + } | |
| 183 | + | |
| 184 | + if(line.indexOf("/BusLineList") != -1){ | |
| 185 | + break; | |
| 186 | + } | |
| 187 | + } | |
| 188 | + br.close(); | |
| 189 | + } | |
| 190 | + } | |
| 191 | + } | |
| 192 | + zin.closeEntry(); | |
| 193 | + return sb; | |
| 194 | + } | |
| 195 | + | |
| 196 | + /** | |
| 197 | + * 解析xml | |
| 198 | + * @param sb | |
| 199 | + */ | |
| 200 | + private List<HashMap<String,String>> parseXml(StringBuffer sb){ | |
| 201 | + List<HashMap<String,String>> list = new ArrayList<>(); | |
| 202 | + HashMap<String,String> map; | |
| 203 | + try { | |
| 204 | + DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance(); | |
| 205 | + DocumentBuilder builder = factory.newDocumentBuilder(); | |
| 206 | + Document doc = builder.parse(new ByteArrayInputStream(sb.toString().getBytes())); | |
| 207 | + NodeList nl = doc.getElementsByTagName("BusLine"); | |
| 208 | + String lineName; //线路名称 | |
| 209 | + String lineId; // 线路ID | |
| 210 | + String abbreviation ; // 公司名称 | |
| 211 | + String ddfs ; // 调度方式 | |
| 212 | + String lineStandardCode; // 上海市线路编码 | |
| 213 | + String parentUnitName ; // 总公司 | |
| 214 | + for (int i = 0; i < nl.getLength(); i++) { | |
| 215 | + parentUnitName = doc.getElementsByTagName("ParentUnitName").item(i).getFirstChild() == null ?"": | |
| 216 | + doc.getElementsByTagName("ParentUnitName").item(i).getFirstChild().getNodeValue(); | |
| 217 | + if(parentUnitName.indexOf("浦东") != -1){// 只查找浦东的数据 | |
| 218 | + lineName = doc.getElementsByTagName("LineName").item(i).getFirstChild() == null ?"": | |
| 219 | + doc.getElementsByTagName("LineName").item(i).getFirstChild().getNodeValue(); | |
| 220 | + lineId = doc.getElementsByTagName("LineId").item(i).getFirstChild() == null ?"": | |
| 221 | + doc.getElementsByTagName("LineId").item(i).getFirstChild().getNodeValue(); | |
| 222 | + abbreviation = doc.getElementsByTagName("Abbreviation").item(i).getFirstChild() == null ?"": | |
| 223 | + doc.getElementsByTagName("Abbreviation").item(i).getFirstChild().getNodeValue(); | |
| 224 | + ddfs = doc.getElementsByTagName("DDFS").item(i).getFirstChild() == null ?"": | |
| 225 | + doc.getElementsByTagName("DDFS").item(i).getFirstChild().getNodeValue(); | |
| 226 | + lineStandardCode = doc.getElementsByTagName("LineStandardCode").item(i).getFirstChild() == null ?"": | |
| 227 | + doc.getElementsByTagName("LineStandardCode").item(i).getFirstChild().getNodeValue(); | |
| 228 | + map = new HashMap<>(); | |
| 229 | + map.put("lineName",lineName); | |
| 230 | + map.put("lineId",lineId); | |
| 231 | + map.put("abbreviation",abbreviation); | |
| 232 | + map.put("ddfs",ddfs); | |
| 233 | + map.put("lineStandardCode",lineStandardCode); | |
| 234 | + list.add(map); | |
| 235 | + } | |
| 236 | + } | |
| 237 | + }catch (Exception e){ | |
| 238 | + e.printStackTrace();; | |
| 239 | + } | |
| 240 | + return list; | |
| 241 | + } | |
| 242 | + | |
| 243 | + /** | |
| 244 | + * 批量插入用法 | |
| 245 | + * @param list | |
| 246 | + */ | |
| 247 | + public boolean insertRecord(List<HashMap<String,String>> list) | |
| 248 | + { | |
| 249 | + boolean flag = false; | |
| 250 | + final List<HashMap<String,String>> tempList=list; | |
| 251 | + String sql="INSERT INTO JJWGPS_T_SHSXLFILE(XLID,SHSXLBM,XLMC,GSMC,DDFS,CREATETIME,XLMC_ALL) VALUES (?,?,?,?,?,SYSDATE,?)"; | |
| 252 | + jdbcTemplate = new JdbcTemplate(DBUtils_oldSystem.getDataSource()); | |
| 253 | + jdbcTemplate.batchUpdate(sql, new BatchPreparedStatementSetter() | |
| 254 | + { | |
| 255 | + public void setValues(PreparedStatement ps, int i)throws SQLException | |
| 256 | + { | |
| 257 | + String lineId =tempList.get(i).get("lineId"); | |
| 258 | + String lineStandardCode =tempList.get(i).get("lineStandardCode"); | |
| 259 | + String lineName =tempList.get(i).get("lineName"); | |
| 260 | + String abbreviation =tempList.get(i).get("abbreviation"); | |
| 261 | + String ddfs =tempList.get(i).get("ddfs"); | |
| 262 | + String lineNameAll = lineName; | |
| 263 | + if(ddfs.equals("2")){ | |
| 264 | + lineNameAll = lineName+"区间(走向部分在全程线路之外)"; | |
| 265 | + }else if(ddfs.equals("7")){ | |
| 266 | + lineNameAll = lineName+"区间(走向在全程线路之内)"; | |
| 267 | + } | |
| 268 | + ps.setString(1, lineId); | |
| 269 | + ps.setString(2, lineStandardCode); | |
| 270 | + ps.setString(3, lineName); | |
| 271 | + ps.setString(4, abbreviation); | |
| 272 | + ps.setString(5, ddfs); | |
| 273 | + ps.setString(6, lineNameAll); | |
| 274 | + } | |
| 275 | + public int getBatchSize() | |
| 276 | + { | |
| 277 | + return tempList.size(); | |
| 278 | + } | |
| 279 | + }); | |
| 280 | + flag = true; | |
| 281 | + return flag; | |
| 282 | + } | |
| 283 | +} | ... | ... |
src/main/resources/datatools/ktrs/legecy/scheduleRuleDataInput_insertupdate.ktr
0 → 100644
| 1 | +<?xml version="1.0" encoding="UTF-8"?> | |
| 2 | +<transformation> | |
| 3 | + <info> | |
| 4 | + <name>排班规则信息导入</name> | |
| 5 | + <description/> | |
| 6 | + <extended_description/> | |
| 7 | + <trans_version/> | |
| 8 | + <trans_type>Normal</trans_type> | |
| 9 | + <trans_status>0</trans_status> | |
| 10 | + <directory>/</directory> | |
| 11 | + <parameters> | |
| 12 | + <parameter> | |
| 13 | + <name>erroroutputdir</name> | |
| 14 | + <default_value>/Users/xu/resource/project_code/bsth_project/bsth_control_etl/导入导出1</default_value> | |
| 15 | + <description>ktr step配置的错误输出目录</description> | |
| 16 | + </parameter> | |
| 17 | + <parameter> | |
| 18 | + <name>filepath</name> | |
| 19 | + <default_value>/Users/xu/resource/project_code/bsth_project/bsth_control_etl/导入导出1/排版规则信息.xls</default_value> | |
| 20 | + <description>待处理导入的excel文件</description> | |
| 21 | + </parameter> | |
| 22 | + </parameters> | |
| 23 | + <log> | |
| 24 | +<trans-log-table><connection/> | |
| 25 | +<schema/> | |
| 26 | +<table/> | |
| 27 | +<size_limit_lines/> | |
| 28 | +<interval/> | |
| 29 | +<timeout_days/> | |
| 30 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table> | |
| 31 | +<perf-log-table><connection/> | |
| 32 | +<schema/> | |
| 33 | +<table/> | |
| 34 | +<interval/> | |
| 35 | +<timeout_days/> | |
| 36 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table> | |
| 37 | +<channel-log-table><connection/> | |
| 38 | +<schema/> | |
| 39 | +<table/> | |
| 40 | +<timeout_days/> | |
| 41 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table> | |
| 42 | +<step-log-table><connection/> | |
| 43 | +<schema/> | |
| 44 | +<table/> | |
| 45 | +<timeout_days/> | |
| 46 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table> | |
| 47 | +<metrics-log-table><connection/> | |
| 48 | +<schema/> | |
| 49 | +<table/> | |
| 50 | +<timeout_days/> | |
| 51 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table> | |
| 52 | + </log> | |
| 53 | + <maxdate> | |
| 54 | + <connection/> | |
| 55 | + <table/> | |
| 56 | + <field/> | |
| 57 | + <offset>0.0</offset> | |
| 58 | + <maxdiff>0.0</maxdiff> | |
| 59 | + </maxdate> | |
| 60 | + <size_rowset>10000</size_rowset> | |
| 61 | + <sleep_time_empty>50</sleep_time_empty> | |
| 62 | + <sleep_time_full>50</sleep_time_full> | |
| 63 | + <unique_connections>N</unique_connections> | |
| 64 | + <feedback_shown>Y</feedback_shown> | |
| 65 | + <feedback_size>50000</feedback_size> | |
| 66 | + <using_thread_priorities>Y</using_thread_priorities> | |
| 67 | + <shared_objects_file/> | |
| 68 | + <capture_step_performance>N</capture_step_performance> | |
| 69 | + <step_performance_capturing_delay>1000</step_performance_capturing_delay> | |
| 70 | + <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit> | |
| 71 | + <dependencies> | |
| 72 | + </dependencies> | |
| 73 | + <partitionschemas> | |
| 74 | + </partitionschemas> | |
| 75 | + <slaveservers> | |
| 76 | + </slaveservers> | |
| 77 | + <clusterschemas> | |
| 78 | + </clusterschemas> | |
| 79 | + <created_user>-</created_user> | |
| 80 | + <created_date>2017/01/09 10:10:36.915</created_date> | |
| 81 | + <modified_user>-</modified_user> | |
| 82 | + <modified_date>2017/01/09 10:10:36.915</modified_date> | |
| 83 | + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</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>${v_db_ip}</server> | |
| 115 | + <type>MYSQL</type> | |
| 116 | + <access>Native</access> | |
| 117 | + <database>${v_db_dname}</database> | |
| 118 | + <port>3306</port> | |
| 119 | + <username>${v_db_uname}</username> | |
| 120 | + <password>${v_db_pwd}</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_公司_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_本机</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(本机)</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>获取变量</from><to>原始系统导出的Excel输入</to><enabled>Y</enabled> </hop> | |
| 275 | + <hop> <from>原始系统导出的Excel输入</from><to>启用被数据flag</to><enabled>Y</enabled> </hop> | |
| 276 | + <hop> <from>拆分路牌范围</from><to>路牌id查询</to><enabled>Y</enabled> </hop> | |
| 277 | + <hop> <from>排序记录</from><to>分组合并路牌id</to><enabled>Y</enabled> </hop> | |
| 278 | + <hop> <from>分组合并路牌id</from><to>拆分人员范围</to><enabled>Y</enabled> </hop> | |
| 279 | + <hop> <from>拆分人员范围</from><to>拆分分班搭班编码字段</to><enabled>Y</enabled> </hop> | |
| 280 | + <hop> <from>拆分分班搭班编码字段</from><to>人员配置id查询</to><enabled>Y</enabled> </hop> | |
| 281 | + <hop> <from>人员配置id查询</from><to>人员配置id查询 2</to><enabled>Y</enabled> </hop> | |
| 282 | + <hop> <from>启用被数据flag</from><to>线路id查询</to><enabled>Y</enabled> </hop> | |
| 283 | + <hop> <from>线路id查询</from><to>过滤线路id为空记录</to><enabled>Y</enabled> </hop> | |
| 284 | + <hop> <from>过滤线路id为空记录</from><to>车辆配置id查询</to><enabled>Y</enabled> </hop> | |
| 285 | + <hop> <from>车辆配置id查询</from><to>过滤车辆配置id为空记录</to><enabled>Y</enabled> </hop> | |
| 286 | + <hop> <from>过滤车辆配置id为空记录</from><to>拆分路牌范围</to><enabled>Y</enabled> </hop> | |
| 287 | + <hop> <from>路牌id查询</from><to>过滤路牌id为空记录</to><enabled>Y</enabled> </hop> | |
| 288 | + <hop> <from>过滤路牌id为空记录</from><to>排序记录</to><enabled>Y</enabled> </hop> | |
| 289 | + <hop> <from>人员配置id查询 2</from><to>过滤人员配置id为空记录</to><enabled>Y</enabled> </hop> | |
| 290 | + <hop> <from>过滤人员配置id为空记录</from><to>合并分班人员配置id</to><enabled>Y</enabled> </hop> | |
| 291 | + <hop> <from>合并分班人员配置id</from><to>排序记录 2</to><enabled>Y</enabled> </hop> | |
| 292 | + <hop> <from>排序记录 2</from><to>分组合并人员配置id</to><enabled>Y</enabled> </hop> | |
| 293 | + <hop> <from>插入 / 更新bsth_c_s_sr1_flat</from><to>错误输出 2</to><enabled>Y</enabled> </hop> | |
| 294 | + <hop> <from>分组合并人员配置id</from><to>启用日期转换</to><enabled>Y</enabled> </hop> | |
| 295 | + <hop> <from>启用日期转换</from><to>插入 / 更新bsth_c_s_sr1_flat</to><enabled>Y</enabled> </hop> | |
| 296 | + </order> | |
| 297 | + <step> | |
| 298 | + <name>人员配置id查询</name> | |
| 299 | + <type>DBLookup</type> | |
| 300 | + <description/> | |
| 301 | + <distribute>Y</distribute> | |
| 302 | + <custom_distribution/> | |
| 303 | + <copies>1</copies> | |
| 304 | + <partitioning> | |
| 305 | + <method>none</method> | |
| 306 | + <schema_name/> | |
| 307 | + </partitioning> | |
| 308 | + <connection>bus_control_variable</connection> | |
| 309 | + <cache>N</cache> | |
| 310 | + <cache_load_all>Y</cache_load_all> | |
| 311 | + <cache_size>0</cache_size> | |
| 312 | + <lookup> | |
| 313 | + <schema/> | |
| 314 | + <table>bsth_c_s_ecinfo</table> | |
| 315 | + <orderby/> | |
| 316 | + <fail_on_multiple>N</fail_on_multiple> | |
| 317 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 318 | + <key> | |
| 319 | + <name>xlid</name> | |
| 320 | + <field>xl</field> | |
| 321 | + <condition>=</condition> | |
| 322 | + <name2/> | |
| 323 | + </key> | |
| 324 | + <key> | |
| 325 | + <name>dbbm1</name> | |
| 326 | + <field>dbbm</field> | |
| 327 | + <condition>=</condition> | |
| 328 | + <name2/> | |
| 329 | + </key> | |
| 330 | + <key> | |
| 331 | + <name>isCancel</name> | |
| 332 | + <field>is_cancel</field> | |
| 333 | + <condition>=</condition> | |
| 334 | + <name2/> | |
| 335 | + </key> | |
| 336 | + <value> | |
| 337 | + <name>id</name> | |
| 338 | + <rename>rycid1</rename> | |
| 339 | + <default/> | |
| 340 | + <type>Integer</type> | |
| 341 | + </value> | |
| 342 | + </lookup> | |
| 343 | + <cluster_schema/> | |
| 344 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 345 | + <xloc>904</xloc> | |
| 346 | + <yloc>101</yloc> | |
| 347 | + <draw>Y</draw> | |
| 348 | + </GUI> | |
| 349 | + </step> | |
| 350 | + | |
| 351 | + <step> | |
| 352 | + <name>人员配置id查询 2</name> | |
| 353 | + <type>DBLookup</type> | |
| 354 | + <description/> | |
| 355 | + <distribute>Y</distribute> | |
| 356 | + <custom_distribution/> | |
| 357 | + <copies>1</copies> | |
| 358 | + <partitioning> | |
| 359 | + <method>none</method> | |
| 360 | + <schema_name/> | |
| 361 | + </partitioning> | |
| 362 | + <connection>bus_control_variable</connection> | |
| 363 | + <cache>N</cache> | |
| 364 | + <cache_load_all>Y</cache_load_all> | |
| 365 | + <cache_size>0</cache_size> | |
| 366 | + <lookup> | |
| 367 | + <schema/> | |
| 368 | + <table>bsth_c_s_ecinfo</table> | |
| 369 | + <orderby/> | |
| 370 | + <fail_on_multiple>N</fail_on_multiple> | |
| 371 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 372 | + <key> | |
| 373 | + <name>xlid</name> | |
| 374 | + <field>xl</field> | |
| 375 | + <condition>=</condition> | |
| 376 | + <name2/> | |
| 377 | + </key> | |
| 378 | + <key> | |
| 379 | + <name>dbbm2</name> | |
| 380 | + <field>dbbm</field> | |
| 381 | + <condition>=</condition> | |
| 382 | + <name2/> | |
| 383 | + </key> | |
| 384 | + <key> | |
| 385 | + <name>isCancel</name> | |
| 386 | + <field>is_cancel</field> | |
| 387 | + <condition>=</condition> | |
| 388 | + <name2/> | |
| 389 | + </key> | |
| 390 | + <value> | |
| 391 | + <name>id</name> | |
| 392 | + <rename>rycid2</rename> | |
| 393 | + <default/> | |
| 394 | + <type>Integer</type> | |
| 395 | + </value> | |
| 396 | + </lookup> | |
| 397 | + <cluster_schema/> | |
| 398 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 399 | + <xloc>778</xloc> | |
| 400 | + <yloc>103</yloc> | |
| 401 | + <draw>Y</draw> | |
| 402 | + </GUI> | |
| 403 | + </step> | |
| 404 | + | |
| 405 | + <step> | |
| 406 | + <name>分组合并人员配置id</name> | |
| 407 | + <type>GroupBy</type> | |
| 408 | + <description/> | |
| 409 | + <distribute>Y</distribute> | |
| 410 | + <custom_distribution/> | |
| 411 | + <copies>1</copies> | |
| 412 | + <partitioning> | |
| 413 | + <method>none</method> | |
| 414 | + <schema_name/> | |
| 415 | + </partitioning> | |
| 416 | + <all_rows>N</all_rows> | |
| 417 | + <ignore_aggregate>N</ignore_aggregate> | |
| 418 | + <field_ignore/> | |
| 419 | + <directory>%%java.io.tmpdir%%</directory> | |
| 420 | + <prefix>grp</prefix> | |
| 421 | + <add_linenr>N</add_linenr> | |
| 422 | + <linenr_fieldname/> | |
| 423 | + <give_back_row>N</give_back_row> | |
| 424 | + <group> | |
| 425 | + <field> | |
| 426 | + <name>xlid</name> | |
| 427 | + </field> | |
| 428 | + <field> | |
| 429 | + <name>cid</name> | |
| 430 | + </field> | |
| 431 | + <field> | |
| 432 | + <name>lpnames</name> | |
| 433 | + </field> | |
| 434 | + <field> | |
| 435 | + <name>lpids</name> | |
| 436 | + </field> | |
| 437 | + <field> | |
| 438 | + <name>起始路牌</name> | |
| 439 | + </field> | |
| 440 | + <field> | |
| 441 | + <name>起始人员</name> | |
| 442 | + </field> | |
| 443 | + <field> | |
| 444 | + <name>人员范围</name> | |
| 445 | + </field> | |
| 446 | + <field> | |
| 447 | + <name>启用日期</name> | |
| 448 | + </field> | |
| 449 | + <field> | |
| 450 | + <name>翻班格式</name> | |
| 451 | + </field> | |
| 452 | + <field> | |
| 453 | + <name>isCancel</name> | |
| 454 | + </field> | |
| 455 | + </group> | |
| 456 | + <fields> | |
| 457 | + <field> | |
| 458 | + <aggregate>rycids</aggregate> | |
| 459 | + <subject>rycid</subject> | |
| 460 | + <type>CONCAT_STRING</type> | |
| 461 | + <valuefield>,</valuefield> | |
| 462 | + </field> | |
| 463 | + <field> | |
| 464 | + <aggregate>rybms</aggregate> | |
| 465 | + <subject>rybm</subject> | |
| 466 | + <type>CONCAT_STRING</type> | |
| 467 | + <valuefield>,</valuefield> | |
| 468 | + </field> | |
| 469 | + </fields> | |
| 470 | + <cluster_schema/> | |
| 471 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 472 | + <xloc>780</xloc> | |
| 473 | + <yloc>291</yloc> | |
| 474 | + <draw>Y</draw> | |
| 475 | + </GUI> | |
| 476 | + </step> | |
| 477 | + | |
| 478 | + <step> | |
| 479 | + <name>分组合并路牌id</name> | |
| 480 | + <type>GroupBy</type> | |
| 481 | + <description/> | |
| 482 | + <distribute>Y</distribute> | |
| 483 | + <custom_distribution/> | |
| 484 | + <copies>1</copies> | |
| 485 | + <partitioning> | |
| 486 | + <method>none</method> | |
| 487 | + <schema_name/> | |
| 488 | + </partitioning> | |
| 489 | + <all_rows>N</all_rows> | |
| 490 | + <ignore_aggregate>N</ignore_aggregate> | |
| 491 | + <field_ignore/> | |
| 492 | + <directory>%%java.io.tmpdir%%</directory> | |
| 493 | + <prefix>grp</prefix> | |
| 494 | + <add_linenr>N</add_linenr> | |
| 495 | + <linenr_fieldname/> | |
| 496 | + <give_back_row>N</give_back_row> | |
| 497 | + <group> | |
| 498 | + <field> | |
| 499 | + <name>xlid</name> | |
| 500 | + </field> | |
| 501 | + <field> | |
| 502 | + <name>cid</name> | |
| 503 | + </field> | |
| 504 | + <field> | |
| 505 | + <name>起始路牌</name> | |
| 506 | + </field> | |
| 507 | + <field> | |
| 508 | + <name>起始人员</name> | |
| 509 | + </field> | |
| 510 | + <field> | |
| 511 | + <name>人员范围</name> | |
| 512 | + </field> | |
| 513 | + <field> | |
| 514 | + <name>启用日期</name> | |
| 515 | + </field> | |
| 516 | + <field> | |
| 517 | + <name>翻班格式</name> | |
| 518 | + </field> | |
| 519 | + <field> | |
| 520 | + <name>isCancel</name> | |
| 521 | + </field> | |
| 522 | + </group> | |
| 523 | + <fields> | |
| 524 | + <field> | |
| 525 | + <aggregate>lpids</aggregate> | |
| 526 | + <subject>lpid</subject> | |
| 527 | + <type>CONCAT_STRING</type> | |
| 528 | + <valuefield>,</valuefield> | |
| 529 | + </field> | |
| 530 | + <field> | |
| 531 | + <aggregate>lpnames</aggregate> | |
| 532 | + <subject>lpname</subject> | |
| 533 | + <type>CONCAT_STRING</type> | |
| 534 | + <valuefield>,</valuefield> | |
| 535 | + </field> | |
| 536 | + </fields> | |
| 537 | + <cluster_schema/> | |
| 538 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 539 | + <xloc>653</xloc> | |
| 540 | + <yloc>119</yloc> | |
| 541 | + <draw>Y</draw> | |
| 542 | + </GUI> | |
| 543 | + </step> | |
| 544 | + | |
| 545 | + <step> | |
| 546 | + <name>原始系统导出的Excel输入</name> | |
| 547 | + <type>ExcelInput</type> | |
| 548 | + <description/> | |
| 549 | + <distribute>Y</distribute> | |
| 550 | + <custom_distribution/> | |
| 551 | + <copies>1</copies> | |
| 552 | + <partitioning> | |
| 553 | + <method>none</method> | |
| 554 | + <schema_name/> | |
| 555 | + </partitioning> | |
| 556 | + <header>Y</header> | |
| 557 | + <noempty>Y</noempty> | |
| 558 | + <stoponempty>N</stoponempty> | |
| 559 | + <filefield/> | |
| 560 | + <sheetfield/> | |
| 561 | + <sheetrownumfield/> | |
| 562 | + <rownumfield/> | |
| 563 | + <sheetfield/> | |
| 564 | + <filefield/> | |
| 565 | + <limit>0</limit> | |
| 566 | + <encoding/> | |
| 567 | + <add_to_result_filenames>Y</add_to_result_filenames> | |
| 568 | + <accept_filenames>Y</accept_filenames> | |
| 569 | + <accept_field>filepath_</accept_field> | |
| 570 | + <accept_stepname>获取变量</accept_stepname> | |
| 571 | + <file> | |
| 572 | + <name/> | |
| 573 | + <filemask/> | |
| 574 | + <exclude_filemask/> | |
| 575 | + <file_required>N</file_required> | |
| 576 | + <include_subfolders>N</include_subfolders> | |
| 577 | + </file> | |
| 578 | + <fields> | |
| 579 | + <field> | |
| 580 | + <name>线路</name> | |
| 581 | + <type>String</type> | |
| 582 | + <length>-1</length> | |
| 583 | + <precision>-1</precision> | |
| 584 | + <trim_type>none</trim_type> | |
| 585 | + <repeat>N</repeat> | |
| 586 | + <format/> | |
| 587 | + <currency/> | |
| 588 | + <decimal/> | |
| 589 | + <group/> | |
| 590 | + </field> | |
| 591 | + <field> | |
| 592 | + <name>内部编码</name> | |
| 593 | + <type>String</type> | |
| 594 | + <length>-1</length> | |
| 595 | + <precision>-1</precision> | |
| 596 | + <trim_type>none</trim_type> | |
| 597 | + <repeat>N</repeat> | |
| 598 | + <format/> | |
| 599 | + <currency/> | |
| 600 | + <decimal/> | |
| 601 | + <group/> | |
| 602 | + </field> | |
| 603 | + <field> | |
| 604 | + <name>启用日期</name> | |
| 605 | + <type>String</type> | |
| 606 | + <length>-1</length> | |
| 607 | + <precision>-1</precision> | |
| 608 | + <trim_type>none</trim_type> | |
| 609 | + <repeat>N</repeat> | |
| 610 | + <format/> | |
| 611 | + <currency/> | |
| 612 | + <decimal/> | |
| 613 | + <group/> | |
| 614 | + </field> | |
| 615 | + <field> | |
| 616 | + <name>起始路牌</name> | |
| 617 | + <type>String</type> | |
| 618 | + <length>-1</length> | |
| 619 | + <precision>-1</precision> | |
| 620 | + <trim_type>none</trim_type> | |
| 621 | + <repeat>N</repeat> | |
| 622 | + <format>#</format> | |
| 623 | + <currency/> | |
| 624 | + <decimal/> | |
| 625 | + <group/> | |
| 626 | + </field> | |
| 627 | + <field> | |
| 628 | + <name>路牌范围</name> | |
| 629 | + <type>String</type> | |
| 630 | + <length>-1</length> | |
| 631 | + <precision>-1</precision> | |
| 632 | + <trim_type>none</trim_type> | |
| 633 | + <repeat>N</repeat> | |
| 634 | + <format>#</format> | |
| 635 | + <currency/> | |
| 636 | + <decimal/> | |
| 637 | + <group/> | |
| 638 | + </field> | |
| 639 | + <field> | |
| 640 | + <name>起始人员</name> | |
| 641 | + <type>String</type> | |
| 642 | + <length>-1</length> | |
| 643 | + <precision>-1</precision> | |
| 644 | + <trim_type>none</trim_type> | |
| 645 | + <repeat>N</repeat> | |
| 646 | + <format>#</format> | |
| 647 | + <currency/> | |
| 648 | + <decimal/> | |
| 649 | + <group/> | |
| 650 | + </field> | |
| 651 | + <field> | |
| 652 | + <name>人员范围</name> | |
| 653 | + <type>String</type> | |
| 654 | + <length>-1</length> | |
| 655 | + <precision>-1</precision> | |
| 656 | + <trim_type>none</trim_type> | |
| 657 | + <repeat>N</repeat> | |
| 658 | + <format>#</format> | |
| 659 | + <currency/> | |
| 660 | + <decimal/> | |
| 661 | + <group/> | |
| 662 | + </field> | |
| 663 | + <field> | |
| 664 | + <name>翻班格式</name> | |
| 665 | + <type>String</type> | |
| 666 | + <length>-1</length> | |
| 667 | + <precision>-1</precision> | |
| 668 | + <trim_type>none</trim_type> | |
| 669 | + <repeat>N</repeat> | |
| 670 | + <format>#</format> | |
| 671 | + <currency/> | |
| 672 | + <decimal/> | |
| 673 | + <group/> | |
| 674 | + </field> | |
| 675 | + </fields> | |
| 676 | + <sheets> | |
| 677 | + <sheet> | |
| 678 | + <name>工作表1</name> | |
| 679 | + <startrow>0</startrow> | |
| 680 | + <startcol>0</startcol> | |
| 681 | + </sheet> | |
| 682 | + </sheets> | |
| 683 | + <strict_types>N</strict_types> | |
| 684 | + <error_ignored>N</error_ignored> | |
| 685 | + <error_line_skipped>N</error_line_skipped> | |
| 686 | + <bad_line_files_destination_directory/> | |
| 687 | + <bad_line_files_extension>warning</bad_line_files_extension> | |
| 688 | + <error_line_files_destination_directory/> | |
| 689 | + <error_line_files_extension>error</error_line_files_extension> | |
| 690 | + <line_number_files_destination_directory/> | |
| 691 | + <line_number_files_extension>line</line_number_files_extension> | |
| 692 | + <shortFileFieldName/> | |
| 693 | + <pathFieldName/> | |
| 694 | + <hiddenFieldName/> | |
| 695 | + <lastModificationTimeFieldName/> | |
| 696 | + <uriNameFieldName/> | |
| 697 | + <rootUriNameFieldName/> | |
| 698 | + <extensionFieldName/> | |
| 699 | + <sizeFieldName/> | |
| 700 | + <spreadsheet_type>JXL</spreadsheet_type> | |
| 701 | + <cluster_schema/> | |
| 702 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 703 | + <xloc>208</xloc> | |
| 704 | + <yloc>21</yloc> | |
| 705 | + <draw>Y</draw> | |
| 706 | + </GUI> | |
| 707 | + </step> | |
| 708 | + | |
| 709 | + <step> | |
| 710 | + <name>合并分班人员配置id</name> | |
| 711 | + <type>ScriptValueMod</type> | |
| 712 | + <description/> | |
| 713 | + <distribute>Y</distribute> | |
| 714 | + <custom_distribution/> | |
| 715 | + <copies>1</copies> | |
| 716 | + <partitioning> | |
| 717 | + <method>none</method> | |
| 718 | + <schema_name/> | |
| 719 | + </partitioning> | |
| 720 | + <compatible>N</compatible> | |
| 721 | + <optimizationLevel>9</optimizationLevel> | |
| 722 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | |
| 723 | + <jsScript_name>Script 1</jsScript_name> | |
| 724 | + <jsScript_script>//Script here

var rycid;
var rybm;

if (rycid2 == null) {
 rycid = rycid1;
 rybm = dbbm1;
} else {
 rycid = rycid1 + "-" + rycid2;
 rybm = dbbm1 + "-" + dbbm2;
}</jsScript_script> | |
| 725 | + </jsScript> </jsScripts> <fields> <field> <name>rycid</name> | |
| 726 | + <rename>rycid</rename> | |
| 727 | + <type>String</type> | |
| 728 | + <length>-1</length> | |
| 729 | + <precision>-1</precision> | |
| 730 | + <replace>N</replace> | |
| 731 | + </field> <field> <name>rybm</name> | |
| 732 | + <rename>rybm</rename> | |
| 733 | + <type>String</type> | |
| 734 | + <length>-1</length> | |
| 735 | + <precision>-1</precision> | |
| 736 | + <replace>N</replace> | |
| 737 | + </field> </fields> <cluster_schema/> | |
| 738 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 739 | + <xloc>917</xloc> | |
| 740 | + <yloc>201</yloc> | |
| 741 | + <draw>Y</draw> | |
| 742 | + </GUI> | |
| 743 | + </step> | |
| 744 | + | |
| 745 | + <step> | |
| 746 | + <name>启用日期转换</name> | |
| 747 | + <type>SelectValues</type> | |
| 748 | + <description/> | |
| 749 | + <distribute>Y</distribute> | |
| 750 | + <custom_distribution/> | |
| 751 | + <copies>1</copies> | |
| 752 | + <partitioning> | |
| 753 | + <method>none</method> | |
| 754 | + <schema_name/> | |
| 755 | + </partitioning> | |
| 756 | + <fields> <select_unspecified>N</select_unspecified> | |
| 757 | + <meta> <name>启用日期</name> | |
| 758 | + <rename>启用日期</rename> | |
| 759 | + <type>Timestamp</type> | |
| 760 | + <length>-2</length> | |
| 761 | + <precision>-2</precision> | |
| 762 | + <conversion_mask>yyyy-MM-dd</conversion_mask> | |
| 763 | + <date_format_lenient>false</date_format_lenient> | |
| 764 | + <date_format_locale/> | |
| 765 | + <date_format_timezone/> | |
| 766 | + <lenient_string_to_number>false</lenient_string_to_number> | |
| 767 | + <encoding/> | |
| 768 | + <decimal_symbol/> | |
| 769 | + <grouping_symbol/> | |
| 770 | + <currency_symbol/> | |
| 771 | + <storage_type/> | |
| 772 | + </meta> </fields> <cluster_schema/> | |
| 773 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 774 | + <xloc>777</xloc> | |
| 775 | + <yloc>368</yloc> | |
| 776 | + <draw>Y</draw> | |
| 777 | + </GUI> | |
| 778 | + </step> | |
| 779 | + | |
| 780 | + <step> | |
| 781 | + <name>启用被数据flag</name> | |
| 782 | + <type>Constant</type> | |
| 783 | + <description/> | |
| 784 | + <distribute>Y</distribute> | |
| 785 | + <custom_distribution/> | |
| 786 | + <copies>1</copies> | |
| 787 | + <partitioning> | |
| 788 | + <method>none</method> | |
| 789 | + <schema_name/> | |
| 790 | + </partitioning> | |
| 791 | + <fields> | |
| 792 | + <field> | |
| 793 | + <name>isCancel</name> | |
| 794 | + <type>Integer</type> | |
| 795 | + <format/> | |
| 796 | + <currency/> | |
| 797 | + <decimal/> | |
| 798 | + <group/> | |
| 799 | + <nullif>0</nullif> | |
| 800 | + <length>-1</length> | |
| 801 | + <precision>-1</precision> | |
| 802 | + <set_empty_string>N</set_empty_string> | |
| 803 | + </field> | |
| 804 | + </fields> | |
| 805 | + <cluster_schema/> | |
| 806 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 807 | + <xloc>361</xloc> | |
| 808 | + <yloc>22</yloc> | |
| 809 | + <draw>Y</draw> | |
| 810 | + </GUI> | |
| 811 | + </step> | |
| 812 | + | |
| 813 | + <step> | |
| 814 | + <name>拆分人员范围</name> | |
| 815 | + <type>SplitFieldToRows3</type> | |
| 816 | + <description/> | |
| 817 | + <distribute>Y</distribute> | |
| 818 | + <custom_distribution/> | |
| 819 | + <copies>1</copies> | |
| 820 | + <partitioning> | |
| 821 | + <method>none</method> | |
| 822 | + <schema_name/> | |
| 823 | + </partitioning> | |
| 824 | + <splitfield>人员范围</splitfield> | |
| 825 | + <delimiter>,</delimiter> | |
| 826 | + <newfield>dbbm</newfield> | |
| 827 | + <rownum>N</rownum> | |
| 828 | + <rownum_field/> | |
| 829 | + <resetrownumber>Y</resetrownumber> | |
| 830 | + <delimiter_is_regex>N</delimiter_is_regex> | |
| 831 | + <cluster_schema/> | |
| 832 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 833 | + <xloc>777</xloc> | |
| 834 | + <yloc>22</yloc> | |
| 835 | + <draw>Y</draw> | |
| 836 | + </GUI> | |
| 837 | + </step> | |
| 838 | + | |
| 839 | + <step> | |
| 840 | + <name>拆分分班搭班编码字段</name> | |
| 841 | + <type>FieldSplitter</type> | |
| 842 | + <description/> | |
| 843 | + <distribute>Y</distribute> | |
| 844 | + <custom_distribution/> | |
| 845 | + <copies>1</copies> | |
| 846 | + <partitioning> | |
| 847 | + <method>none</method> | |
| 848 | + <schema_name/> | |
| 849 | + </partitioning> | |
| 850 | + <splitfield>dbbm</splitfield> | |
| 851 | + <delimiter>-</delimiter> | |
| 852 | + <enclosure/> | |
| 853 | + <fields> <field> <name>dbbm1</name> | |
| 854 | + <id/> | |
| 855 | + <idrem>N</idrem> | |
| 856 | + <type>String</type> | |
| 857 | + <format/> | |
| 858 | + <group/> | |
| 859 | + <decimal/> | |
| 860 | + <currency/> | |
| 861 | + <length>-1</length> | |
| 862 | + <precision>-1</precision> | |
| 863 | + <nullif/> | |
| 864 | + <ifnull/> | |
| 865 | + <trimtype>none</trimtype> | |
| 866 | + </field> <field> <name>dbbm2</name> | |
| 867 | + <id/> | |
| 868 | + <idrem>N</idrem> | |
| 869 | + <type>String</type> | |
| 870 | + <format/> | |
| 871 | + <group/> | |
| 872 | + <decimal/> | |
| 873 | + <currency/> | |
| 874 | + <length>-1</length> | |
| 875 | + <precision>-1</precision> | |
| 876 | + <nullif/> | |
| 877 | + <ifnull/> | |
| 878 | + <trimtype>none</trimtype> | |
| 879 | + </field> </fields> <cluster_schema/> | |
| 880 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 881 | + <xloc>901</xloc> | |
| 882 | + <yloc>22</yloc> | |
| 883 | + <draw>Y</draw> | |
| 884 | + </GUI> | |
| 885 | + </step> | |
| 886 | + | |
| 887 | + <step> | |
| 888 | + <name>拆分路牌范围</name> | |
| 889 | + <type>SplitFieldToRows3</type> | |
| 890 | + <description/> | |
| 891 | + <distribute>Y</distribute> | |
| 892 | + <custom_distribution/> | |
| 893 | + <copies>1</copies> | |
| 894 | + <partitioning> | |
| 895 | + <method>none</method> | |
| 896 | + <schema_name/> | |
| 897 | + </partitioning> | |
| 898 | + <splitfield>路牌范围</splitfield> | |
| 899 | + <delimiter>,</delimiter> | |
| 900 | + <newfield>lpname</newfield> | |
| 901 | + <rownum>N</rownum> | |
| 902 | + <rownum_field/> | |
| 903 | + <resetrownumber>Y</resetrownumber> | |
| 904 | + <delimiter_is_regex>N</delimiter_is_regex> | |
| 905 | + <cluster_schema/> | |
| 906 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 907 | + <xloc>364</xloc> | |
| 908 | + <yloc>259</yloc> | |
| 909 | + <draw>Y</draw> | |
| 910 | + </GUI> | |
| 911 | + </step> | |
| 912 | + | |
| 913 | + <step> | |
| 914 | + <name>排序记录</name> | |
| 915 | + <type>SortRows</type> | |
| 916 | + <description/> | |
| 917 | + <distribute>Y</distribute> | |
| 918 | + <custom_distribution/> | |
| 919 | + <copies>1</copies> | |
| 920 | + <partitioning> | |
| 921 | + <method>none</method> | |
| 922 | + <schema_name/> | |
| 923 | + </partitioning> | |
| 924 | + <directory>%%java.io.tmpdir%%</directory> | |
| 925 | + <prefix>out</prefix> | |
| 926 | + <sort_size>1000000</sort_size> | |
| 927 | + <free_memory/> | |
| 928 | + <compress>N</compress> | |
| 929 | + <compress_variable/> | |
| 930 | + <unique_rows>N</unique_rows> | |
| 931 | + <fields> | |
| 932 | + <field> | |
| 933 | + <name>xlid</name> | |
| 934 | + <ascending>Y</ascending> | |
| 935 | + <case_sensitive>N</case_sensitive> | |
| 936 | + <presorted>N</presorted> | |
| 937 | + </field> | |
| 938 | + <field> | |
| 939 | + <name>cid</name> | |
| 940 | + <ascending>Y</ascending> | |
| 941 | + <case_sensitive>N</case_sensitive> | |
| 942 | + <presorted>N</presorted> | |
| 943 | + </field> | |
| 944 | + <field> | |
| 945 | + <name>起始路牌</name> | |
| 946 | + <ascending>Y</ascending> | |
| 947 | + <case_sensitive>N</case_sensitive> | |
| 948 | + <presorted>N</presorted> | |
| 949 | + </field> | |
| 950 | + <field> | |
| 951 | + <name>起始人员</name> | |
| 952 | + <ascending>Y</ascending> | |
| 953 | + <case_sensitive>N</case_sensitive> | |
| 954 | + <presorted>N</presorted> | |
| 955 | + </field> | |
| 956 | + <field> | |
| 957 | + <name>人员范围</name> | |
| 958 | + <ascending>Y</ascending> | |
| 959 | + <case_sensitive>N</case_sensitive> | |
| 960 | + <presorted>N</presorted> | |
| 961 | + </field> | |
| 962 | + <field> | |
| 963 | + <name>启用日期</name> | |
| 964 | + <ascending>Y</ascending> | |
| 965 | + <case_sensitive>N</case_sensitive> | |
| 966 | + <presorted>N</presorted> | |
| 967 | + </field> | |
| 968 | + <field> | |
| 969 | + <name>翻班格式</name> | |
| 970 | + <ascending>Y</ascending> | |
| 971 | + <case_sensitive>N</case_sensitive> | |
| 972 | + <presorted>N</presorted> | |
| 973 | + </field> | |
| 974 | + <field> | |
| 975 | + <name>isCancel</name> | |
| 976 | + <ascending>Y</ascending> | |
| 977 | + <case_sensitive>N</case_sensitive> | |
| 978 | + <presorted>N</presorted> | |
| 979 | + </field> | |
| 980 | + </fields> | |
| 981 | + <cluster_schema/> | |
| 982 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 983 | + <xloc>516</xloc> | |
| 984 | + <yloc>119</yloc> | |
| 985 | + <draw>Y</draw> | |
| 986 | + </GUI> | |
| 987 | + </step> | |
| 988 | + | |
| 989 | + <step> | |
| 990 | + <name>排序记录 2</name> | |
| 991 | + <type>SortRows</type> | |
| 992 | + <description/> | |
| 993 | + <distribute>Y</distribute> | |
| 994 | + <custom_distribution/> | |
| 995 | + <copies>1</copies> | |
| 996 | + <partitioning> | |
| 997 | + <method>none</method> | |
| 998 | + <schema_name/> | |
| 999 | + </partitioning> | |
| 1000 | + <directory>%%java.io.tmpdir%%</directory> | |
| 1001 | + <prefix>out</prefix> | |
| 1002 | + <sort_size>1000000</sort_size> | |
| 1003 | + <free_memory/> | |
| 1004 | + <compress>N</compress> | |
| 1005 | + <compress_variable/> | |
| 1006 | + <unique_rows>N</unique_rows> | |
| 1007 | + <fields> | |
| 1008 | + <field> | |
| 1009 | + <name>xlid</name> | |
| 1010 | + <ascending>Y</ascending> | |
| 1011 | + <case_sensitive>N</case_sensitive> | |
| 1012 | + <presorted>N</presorted> | |
| 1013 | + </field> | |
| 1014 | + <field> | |
| 1015 | + <name>cid</name> | |
| 1016 | + <ascending>Y</ascending> | |
| 1017 | + <case_sensitive>N</case_sensitive> | |
| 1018 | + <presorted>N</presorted> | |
| 1019 | + </field> | |
| 1020 | + <field> | |
| 1021 | + <name>lpnames</name> | |
| 1022 | + <ascending>Y</ascending> | |
| 1023 | + <case_sensitive>N</case_sensitive> | |
| 1024 | + <presorted>N</presorted> | |
| 1025 | + </field> | |
| 1026 | + <field> | |
| 1027 | + <name>lpids</name> | |
| 1028 | + <ascending>Y</ascending> | |
| 1029 | + <case_sensitive>N</case_sensitive> | |
| 1030 | + <presorted>N</presorted> | |
| 1031 | + </field> | |
| 1032 | + <field> | |
| 1033 | + <name>起始路牌</name> | |
| 1034 | + <ascending>Y</ascending> | |
| 1035 | + <case_sensitive>N</case_sensitive> | |
| 1036 | + <presorted>N</presorted> | |
| 1037 | + </field> | |
| 1038 | + <field> | |
| 1039 | + <name>起始人员</name> | |
| 1040 | + <ascending>Y</ascending> | |
| 1041 | + <case_sensitive>N</case_sensitive> | |
| 1042 | + <presorted>N</presorted> | |
| 1043 | + </field> | |
| 1044 | + <field> | |
| 1045 | + <name>人员范围</name> | |
| 1046 | + <ascending>Y</ascending> | |
| 1047 | + <case_sensitive>N</case_sensitive> | |
| 1048 | + <presorted>N</presorted> | |
| 1049 | + </field> | |
| 1050 | + <field> | |
| 1051 | + <name>启用日期</name> | |
| 1052 | + <ascending>Y</ascending> | |
| 1053 | + <case_sensitive>N</case_sensitive> | |
| 1054 | + <presorted>N</presorted> | |
| 1055 | + </field> | |
| 1056 | + <field> | |
| 1057 | + <name>翻班格式</name> | |
| 1058 | + <ascending>Y</ascending> | |
| 1059 | + <case_sensitive>N</case_sensitive> | |
| 1060 | + <presorted>N</presorted> | |
| 1061 | + </field> | |
| 1062 | + <field> | |
| 1063 | + <name>isCancel</name> | |
| 1064 | + <ascending>Y</ascending> | |
| 1065 | + <case_sensitive>N</case_sensitive> | |
| 1066 | + <presorted>N</presorted> | |
| 1067 | + </field> | |
| 1068 | + </fields> | |
| 1069 | + <cluster_schema/> | |
| 1070 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1071 | + <xloc>919</xloc> | |
| 1072 | + <yloc>289</yloc> | |
| 1073 | + <draw>Y</draw> | |
| 1074 | + </GUI> | |
| 1075 | + </step> | |
| 1076 | + | |
| 1077 | + <step> | |
| 1078 | + <name>插入 / 更新bsth_c_s_sr1_flat</name> | |
| 1079 | + <type>InsertUpdate</type> | |
| 1080 | + <description/> | |
| 1081 | + <distribute>Y</distribute> | |
| 1082 | + <custom_distribution/> | |
| 1083 | + <copies>1</copies> | |
| 1084 | + <partitioning> | |
| 1085 | + <method>none</method> | |
| 1086 | + <schema_name/> | |
| 1087 | + </partitioning> | |
| 1088 | + <connection>bus_control_variable</connection> | |
| 1089 | + <commit>100</commit> | |
| 1090 | + <update_bypassed>N</update_bypassed> | |
| 1091 | + <lookup> | |
| 1092 | + <schema/> | |
| 1093 | + <table>bsth_c_s_sr1_flat</table> | |
| 1094 | + <key> | |
| 1095 | + <name>xlid</name> | |
| 1096 | + <field>xl</field> | |
| 1097 | + <condition>=</condition> | |
| 1098 | + <name2/> | |
| 1099 | + </key> | |
| 1100 | + <key> | |
| 1101 | + <name>cid</name> | |
| 1102 | + <field>car_config_info</field> | |
| 1103 | + <condition>=</condition> | |
| 1104 | + <name2/> | |
| 1105 | + </key> | |
| 1106 | + <value> | |
| 1107 | + <name>xl</name> | |
| 1108 | + <rename>xlid</rename> | |
| 1109 | + <update>Y</update> | |
| 1110 | + </value> | |
| 1111 | + <value> | |
| 1112 | + <name>car_config_info</name> | |
| 1113 | + <rename>cid</rename> | |
| 1114 | + <update>Y</update> | |
| 1115 | + </value> | |
| 1116 | + <value> | |
| 1117 | + <name>lp_names</name> | |
| 1118 | + <rename>lpnames</rename> | |
| 1119 | + <update>Y</update> | |
| 1120 | + </value> | |
| 1121 | + <value> | |
| 1122 | + <name>lp_ids</name> | |
| 1123 | + <rename>lpids</rename> | |
| 1124 | + <update>Y</update> | |
| 1125 | + </value> | |
| 1126 | + <value> | |
| 1127 | + <name>lp_start</name> | |
| 1128 | + <rename>起始路牌</rename> | |
| 1129 | + <update>Y</update> | |
| 1130 | + </value> | |
| 1131 | + <value> | |
| 1132 | + <name>ry_start</name> | |
| 1133 | + <rename>起始人员</rename> | |
| 1134 | + <update>Y</update> | |
| 1135 | + </value> | |
| 1136 | + <value> | |
| 1137 | + <name>ry_dbbms</name> | |
| 1138 | + <rename>rybms</rename> | |
| 1139 | + <update>Y</update> | |
| 1140 | + </value> | |
| 1141 | + <value> | |
| 1142 | + <name>qyrq</name> | |
| 1143 | + <rename>启用日期</rename> | |
| 1144 | + <update>Y</update> | |
| 1145 | + </value> | |
| 1146 | + <value> | |
| 1147 | + <name>ry_config_ids</name> | |
| 1148 | + <rename>rycids</rename> | |
| 1149 | + <update>Y</update> | |
| 1150 | + </value> | |
| 1151 | + <value> | |
| 1152 | + <name>fbgs</name> | |
| 1153 | + <rename>翻班格式</rename> | |
| 1154 | + <update>Y</update> | |
| 1155 | + </value> | |
| 1156 | + </lookup> | |
| 1157 | + <cluster_schema/> | |
| 1158 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1159 | + <xloc>532</xloc> | |
| 1160 | + <yloc>297</yloc> | |
| 1161 | + <draw>Y</draw> | |
| 1162 | + </GUI> | |
| 1163 | + </step> | |
| 1164 | + | |
| 1165 | + <step> | |
| 1166 | + <name>线路id查询</name> | |
| 1167 | + <type>DBLookup</type> | |
| 1168 | + <description/> | |
| 1169 | + <distribute>Y</distribute> | |
| 1170 | + <custom_distribution/> | |
| 1171 | + <copies>1</copies> | |
| 1172 | + <partitioning> | |
| 1173 | + <method>none</method> | |
| 1174 | + <schema_name/> | |
| 1175 | + </partitioning> | |
| 1176 | + <connection>bus_control_variable</connection> | |
| 1177 | + <cache>N</cache> | |
| 1178 | + <cache_load_all>Y</cache_load_all> | |
| 1179 | + <cache_size>0</cache_size> | |
| 1180 | + <lookup> | |
| 1181 | + <schema/> | |
| 1182 | + <table>bsth_c_line</table> | |
| 1183 | + <orderby/> | |
| 1184 | + <fail_on_multiple>N</fail_on_multiple> | |
| 1185 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 1186 | + <key> | |
| 1187 | + <name>线路</name> | |
| 1188 | + <field>name</field> | |
| 1189 | + <condition>=</condition> | |
| 1190 | + <name2/> | |
| 1191 | + </key> | |
| 1192 | + <key> | |
| 1193 | + <name>isCancel</name> | |
| 1194 | + <field>destroy</field> | |
| 1195 | + <condition>=</condition> | |
| 1196 | + <name2/> | |
| 1197 | + </key> | |
| 1198 | + <value> | |
| 1199 | + <name>id</name> | |
| 1200 | + <rename>xlid</rename> | |
| 1201 | + <default/> | |
| 1202 | + <type>Integer</type> | |
| 1203 | + </value> | |
| 1204 | + </lookup> | |
| 1205 | + <cluster_schema/> | |
| 1206 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1207 | + <xloc>359</xloc> | |
| 1208 | + <yloc>110</yloc> | |
| 1209 | + <draw>Y</draw> | |
| 1210 | + </GUI> | |
| 1211 | + </step> | |
| 1212 | + | |
| 1213 | + <step> | |
| 1214 | + <name>获取变量</name> | |
| 1215 | + <type>GetVariable</type> | |
| 1216 | + <description/> | |
| 1217 | + <distribute>Y</distribute> | |
| 1218 | + <custom_distribution/> | |
| 1219 | + <copies>1</copies> | |
| 1220 | + <partitioning> | |
| 1221 | + <method>none</method> | |
| 1222 | + <schema_name/> | |
| 1223 | + </partitioning> | |
| 1224 | + <fields> | |
| 1225 | + <field> | |
| 1226 | + <name>filepath_</name> | |
| 1227 | + <variable>${filepath}</variable> | |
| 1228 | + <type>String</type> | |
| 1229 | + <format/> | |
| 1230 | + <currency/> | |
| 1231 | + <decimal/> | |
| 1232 | + <group/> | |
| 1233 | + <length>-1</length> | |
| 1234 | + <precision>-1</precision> | |
| 1235 | + <trim_type>none</trim_type> | |
| 1236 | + </field> | |
| 1237 | + <field> | |
| 1238 | + <name>erroroutputdir_</name> | |
| 1239 | + <variable>${erroroutputdir}</variable> | |
| 1240 | + <type>String</type> | |
| 1241 | + <format/> | |
| 1242 | + <currency/> | |
| 1243 | + <decimal/> | |
| 1244 | + <group/> | |
| 1245 | + <length>-1</length> | |
| 1246 | + <precision>-1</precision> | |
| 1247 | + <trim_type>none</trim_type> | |
| 1248 | + </field> | |
| 1249 | + </fields> | |
| 1250 | + <cluster_schema/> | |
| 1251 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1252 | + <xloc>53</xloc> | |
| 1253 | + <yloc>23</yloc> | |
| 1254 | + <draw>Y</draw> | |
| 1255 | + </GUI> | |
| 1256 | + </step> | |
| 1257 | + | |
| 1258 | + <step> | |
| 1259 | + <name>路牌id查询</name> | |
| 1260 | + <type>DBLookup</type> | |
| 1261 | + <description/> | |
| 1262 | + <distribute>Y</distribute> | |
| 1263 | + <custom_distribution/> | |
| 1264 | + <copies>1</copies> | |
| 1265 | + <partitioning> | |
| 1266 | + <method>none</method> | |
| 1267 | + <schema_name/> | |
| 1268 | + </partitioning> | |
| 1269 | + <connection>bus_control_variable</connection> | |
| 1270 | + <cache>N</cache> | |
| 1271 | + <cache_load_all>Y</cache_load_all> | |
| 1272 | + <cache_size>0</cache_size> | |
| 1273 | + <lookup> | |
| 1274 | + <schema/> | |
| 1275 | + <table>bsth_c_s_gbi</table> | |
| 1276 | + <orderby/> | |
| 1277 | + <fail_on_multiple>N</fail_on_multiple> | |
| 1278 | + <eat_row_on_failure>N</eat_row_on_failure> | |
| 1279 | + <key> | |
| 1280 | + <name>xlid</name> | |
| 1281 | + <field>xl</field> | |
| 1282 | + <condition>=</condition> | |
| 1283 | + <name2/> | |
| 1284 | + </key> | |
| 1285 | + <key> | |
| 1286 | + <name>lpname</name> | |
| 1287 | + <field>lp_name</field> | |
| 1288 | + <condition>=</condition> | |
| 1289 | + <name2/> | |
| 1290 | + </key> | |
| 1291 | + <key> | |
| 1292 | + <name>isCancel</name> | |
| 1293 | + <field>is_cancel</field> | |
| 1294 | + <condition>=</condition> | |
| 1295 | + <name2/> | |
| 1296 | + </key> | |
| 1297 | + <value> | |
| 1298 | + <name>id</name> | |
| 1299 | + <rename>lpid</rename> | |
| 1300 | + <default/> | |
| 1301 | + <type>Integer</type> | |
| 1302 | + </value> | |
| 1303 | + </lookup> | |
| 1304 | + <cluster_schema/> | |
| 1305 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1306 | + <xloc>516</xloc> | |
| 1307 | + <yloc>21</yloc> | |
| 1308 | + <draw>Y</draw> | |
| 1309 | + </GUI> | |
| 1310 | + </step> | |
| 1311 | + | |
| 1312 | + <step> | |
| 1313 | + <name>车辆配置id查询</name> | |
| 1314 | + <type>DBJoin</type> | |
| 1315 | + <description/> | |
| 1316 | + <distribute>Y</distribute> | |
| 1317 | + <custom_distribution/> | |
| 1318 | + <copies>1</copies> | |
| 1319 | + <partitioning> | |
| 1320 | + <method>none</method> | |
| 1321 | + <schema_name/> | |
| 1322 | + </partitioning> | |
| 1323 | + <connection>bus_control_variable</connection> | |
| 1324 | + <rowlimit>1</rowlimit> | |
| 1325 | + <sql>select t1.id as cid from bsth_c_s_ccinfo t1 left join bsth_c_cars t2 on t1.cl = t2.id
where t1.xl = ? and t2.inside_code = ? and t1.is_cancel = ?</sql> | |
| 1326 | + <outer_join>Y</outer_join> | |
| 1327 | + <replace_vars>N</replace_vars> | |
| 1328 | + <parameter> | |
| 1329 | + <field> | |
| 1330 | + <name>xlid</name> | |
| 1331 | + <type>Integer</type> | |
| 1332 | + </field> | |
| 1333 | + <field> | |
| 1334 | + <name>内部编码</name> | |
| 1335 | + <type>String</type> | |
| 1336 | + </field> | |
| 1337 | + <field> | |
| 1338 | + <name>isCancel</name> | |
| 1339 | + <type>Integer</type> | |
| 1340 | + </field> | |
| 1341 | + </parameter> | |
| 1342 | + <cluster_schema/> | |
| 1343 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1344 | + <xloc>360</xloc> | |
| 1345 | + <yloc>184</yloc> | |
| 1346 | + <draw>Y</draw> | |
| 1347 | + </GUI> | |
| 1348 | + </step> | |
| 1349 | + | |
| 1350 | + <step> | |
| 1351 | + <name>过滤人员配置id为空记录</name> | |
| 1352 | + <type>FilterRows</type> | |
| 1353 | + <description/> | |
| 1354 | + <distribute>Y</distribute> | |
| 1355 | + <custom_distribution/> | |
| 1356 | + <copies>1</copies> | |
| 1357 | + <partitioning> | |
| 1358 | + <method>none</method> | |
| 1359 | + <schema_name/> | |
| 1360 | + </partitioning> | |
| 1361 | +<send_true_to/> | |
| 1362 | +<send_false_to/> | |
| 1363 | + <compare> | |
| 1364 | +<condition> | |
| 1365 | + <negated>N</negated> | |
| 1366 | + <conditions> | |
| 1367 | + <condition> | |
| 1368 | + <negated>N</negated> | |
| 1369 | + <leftvalue>rycid1</leftvalue> | |
| 1370 | + <function>IS NOT NULL</function> | |
| 1371 | + <rightvalue/> | |
| 1372 | + </condition> | |
| 1373 | + <condition> | |
| 1374 | + <negated>N</negated> | |
| 1375 | + <operator>OR</operator> | |
| 1376 | + <leftvalue>rycid2</leftvalue> | |
| 1377 | + <function>IS NOT NULL</function> | |
| 1378 | + <rightvalue/> | |
| 1379 | + </condition> | |
| 1380 | + </conditions> | |
| 1381 | + </condition> | |
| 1382 | + </compare> | |
| 1383 | + <cluster_schema/> | |
| 1384 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1385 | + <xloc>776</xloc> | |
| 1386 | + <yloc>204</yloc> | |
| 1387 | + <draw>Y</draw> | |
| 1388 | + </GUI> | |
| 1389 | + </step> | |
| 1390 | + | |
| 1391 | + <step> | |
| 1392 | + <name>过滤线路id为空记录</name> | |
| 1393 | + <type>FilterRows</type> | |
| 1394 | + <description/> | |
| 1395 | + <distribute>Y</distribute> | |
| 1396 | + <custom_distribution/> | |
| 1397 | + <copies>1</copies> | |
| 1398 | + <partitioning> | |
| 1399 | + <method>none</method> | |
| 1400 | + <schema_name/> | |
| 1401 | + </partitioning> | |
| 1402 | +<send_true_to>车辆配置id查询</send_true_to> | |
| 1403 | +<send_false_to/> | |
| 1404 | + <compare> | |
| 1405 | +<condition> | |
| 1406 | + <negated>N</negated> | |
| 1407 | + <leftvalue>xlid</leftvalue> | |
| 1408 | + <function>IS NOT NULL</function> | |
| 1409 | + <rightvalue/> | |
| 1410 | + </condition> | |
| 1411 | + </compare> | |
| 1412 | + <cluster_schema/> | |
| 1413 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1414 | + <xloc>203</xloc> | |
| 1415 | + <yloc>110</yloc> | |
| 1416 | + <draw>Y</draw> | |
| 1417 | + </GUI> | |
| 1418 | + </step> | |
| 1419 | + | |
| 1420 | + <step> | |
| 1421 | + <name>过滤路牌id为空记录</name> | |
| 1422 | + <type>FilterRows</type> | |
| 1423 | + <description/> | |
| 1424 | + <distribute>Y</distribute> | |
| 1425 | + <custom_distribution/> | |
| 1426 | + <copies>1</copies> | |
| 1427 | + <partitioning> | |
| 1428 | + <method>none</method> | |
| 1429 | + <schema_name/> | |
| 1430 | + </partitioning> | |
| 1431 | +<send_true_to>排序记录</send_true_to> | |
| 1432 | +<send_false_to/> | |
| 1433 | + <compare> | |
| 1434 | +<condition> | |
| 1435 | + <negated>N</negated> | |
| 1436 | + <leftvalue>lpid</leftvalue> | |
| 1437 | + <function>IS NOT NULL</function> | |
| 1438 | + <rightvalue/> | |
| 1439 | + </condition> | |
| 1440 | + </compare> | |
| 1441 | + <cluster_schema/> | |
| 1442 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1443 | + <xloc>653</xloc> | |
| 1444 | + <yloc>23</yloc> | |
| 1445 | + <draw>Y</draw> | |
| 1446 | + </GUI> | |
| 1447 | + </step> | |
| 1448 | + | |
| 1449 | + <step> | |
| 1450 | + <name>过滤车辆配置id为空记录</name> | |
| 1451 | + <type>FilterRows</type> | |
| 1452 | + <description/> | |
| 1453 | + <distribute>Y</distribute> | |
| 1454 | + <custom_distribution/> | |
| 1455 | + <copies>1</copies> | |
| 1456 | + <partitioning> | |
| 1457 | + <method>none</method> | |
| 1458 | + <schema_name/> | |
| 1459 | + </partitioning> | |
| 1460 | +<send_true_to>拆分路牌范围</send_true_to> | |
| 1461 | +<send_false_to/> | |
| 1462 | + <compare> | |
| 1463 | +<condition> | |
| 1464 | + <negated>N</negated> | |
| 1465 | + <leftvalue>cid</leftvalue> | |
| 1466 | + <function>IS NOT NULL</function> | |
| 1467 | + <rightvalue/> | |
| 1468 | + </condition> | |
| 1469 | + </compare> | |
| 1470 | + <cluster_schema/> | |
| 1471 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1472 | + <xloc>208</xloc> | |
| 1473 | + <yloc>182</yloc> | |
| 1474 | + <draw>Y</draw> | |
| 1475 | + </GUI> | |
| 1476 | + </step> | |
| 1477 | + | |
| 1478 | + <step> | |
| 1479 | + <name>错误输出 2</name> | |
| 1480 | + <type>ExcelOutput</type> | |
| 1481 | + <description/> | |
| 1482 | + <distribute>Y</distribute> | |
| 1483 | + <custom_distribution/> | |
| 1484 | + <copies>1</copies> | |
| 1485 | + <partitioning> | |
| 1486 | + <method>none</method> | |
| 1487 | + <schema_name/> | |
| 1488 | + </partitioning> | |
| 1489 | + <header>Y</header> | |
| 1490 | + <footer>N</footer> | |
| 1491 | + <encoding>UTF-8</encoding> | |
| 1492 | + <append>N</append> | |
| 1493 | + <add_to_result_filenames>Y</add_to_result_filenames> | |
| 1494 | + <file> | |
| 1495 | + <name>${erroroutputdir}/排版规则信息导入_错误</name> | |
| 1496 | + <extention>xls</extention> | |
| 1497 | + <do_not_open_newfile_init>N</do_not_open_newfile_init> | |
| 1498 | + <create_parent_folder>N</create_parent_folder> | |
| 1499 | + <split>N</split> | |
| 1500 | + <add_date>N</add_date> | |
| 1501 | + <add_time>N</add_time> | |
| 1502 | + <SpecifyFormat>N</SpecifyFormat> | |
| 1503 | + <date_time_format/> | |
| 1504 | + <sheetname>Sheet1</sheetname> | |
| 1505 | + <autosizecolums>N</autosizecolums> | |
| 1506 | + <nullisblank>N</nullisblank> | |
| 1507 | + <protect_sheet>N</protect_sheet> | |
| 1508 | + <password>Encrypted </password> | |
| 1509 | + <splitevery>0</splitevery> | |
| 1510 | + <usetempfiles>N</usetempfiles> | |
| 1511 | + <tempdirectory/> | |
| 1512 | + </file> | |
| 1513 | + <template> | |
| 1514 | + <enabled>N</enabled> | |
| 1515 | + <append>N</append> | |
| 1516 | + <filename>template.xls</filename> | |
| 1517 | + </template> | |
| 1518 | + <fields> | |
| 1519 | + <field> | |
| 1520 | + <name>xlid</name> | |
| 1521 | + <type>Integer</type> | |
| 1522 | + <format/> | |
| 1523 | + </field> | |
| 1524 | + <field> | |
| 1525 | + <name>cid</name> | |
| 1526 | + <type>Integer</type> | |
| 1527 | + <format/> | |
| 1528 | + </field> | |
| 1529 | + <field> | |
| 1530 | + <name>lpnames</name> | |
| 1531 | + <type>String</type> | |
| 1532 | + <format/> | |
| 1533 | + </field> | |
| 1534 | + <field> | |
| 1535 | + <name>lpids</name> | |
| 1536 | + <type>String</type> | |
| 1537 | + <format/> | |
| 1538 | + </field> | |
| 1539 | + <field> | |
| 1540 | + <name>起始路牌</name> | |
| 1541 | + <type>String</type> | |
| 1542 | + <format/> | |
| 1543 | + </field> | |
| 1544 | + <field> | |
| 1545 | + <name>起始人员</name> | |
| 1546 | + <type>String</type> | |
| 1547 | + <format/> | |
| 1548 | + </field> | |
| 1549 | + <field> | |
| 1550 | + <name>人员范围</name> | |
| 1551 | + <type>String</type> | |
| 1552 | + <format/> | |
| 1553 | + </field> | |
| 1554 | + <field> | |
| 1555 | + <name>启用日期</name> | |
| 1556 | + <type>Timestamp</type> | |
| 1557 | + <format/> | |
| 1558 | + </field> | |
| 1559 | + <field> | |
| 1560 | + <name>翻班格式</name> | |
| 1561 | + <type>String</type> | |
| 1562 | + <format/> | |
| 1563 | + </field> | |
| 1564 | + <field> | |
| 1565 | + <name>isCancel</name> | |
| 1566 | + <type>Integer</type> | |
| 1567 | + <format/> | |
| 1568 | + </field> | |
| 1569 | + <field> | |
| 1570 | + <name>rycids</name> | |
| 1571 | + <type>String</type> | |
| 1572 | + <format/> | |
| 1573 | + </field> | |
| 1574 | + <field> | |
| 1575 | + <name>rybms</name> | |
| 1576 | + <type>String</type> | |
| 1577 | + <format/> | |
| 1578 | + </field> | |
| 1579 | + <field> | |
| 1580 | + <name>error_count</name> | |
| 1581 | + <type>Integer</type> | |
| 1582 | + <format/> | |
| 1583 | + </field> | |
| 1584 | + <field> | |
| 1585 | + <name>error_desc</name> | |
| 1586 | + <type>String</type> | |
| 1587 | + <format/> | |
| 1588 | + </field> | |
| 1589 | + <field> | |
| 1590 | + <name>error_column1</name> | |
| 1591 | + <type>String</type> | |
| 1592 | + <format/> | |
| 1593 | + </field> | |
| 1594 | + <field> | |
| 1595 | + <name>error_column2</name> | |
| 1596 | + <type>String</type> | |
| 1597 | + <format/> | |
| 1598 | + </field> | |
| 1599 | + </fields> | |
| 1600 | + <custom> | |
| 1601 | + <header_font_name>arial</header_font_name> | |
| 1602 | + <header_font_size>10</header_font_size> | |
| 1603 | + <header_font_bold>N</header_font_bold> | |
| 1604 | + <header_font_italic>N</header_font_italic> | |
| 1605 | + <header_font_underline>no</header_font_underline> | |
| 1606 | + <header_font_orientation>horizontal</header_font_orientation> | |
| 1607 | + <header_font_color>black</header_font_color> | |
| 1608 | + <header_background_color>none</header_background_color> | |
| 1609 | + <header_row_height>255</header_row_height> | |
| 1610 | + <header_alignment>left</header_alignment> | |
| 1611 | + <header_image/> | |
| 1612 | + <row_font_name>arial</row_font_name> | |
| 1613 | + <row_font_size>10</row_font_size> | |
| 1614 | + <row_font_color>black</row_font_color> | |
| 1615 | + <row_background_color>none</row_background_color> | |
| 1616 | + </custom> | |
| 1617 | + <cluster_schema/> | |
| 1618 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | |
| 1619 | + <xloc>534</xloc> | |
| 1620 | + <yloc>392</yloc> | |
| 1621 | + <draw>Y</draw> | |
| 1622 | + </GUI> | |
| 1623 | + </step> | |
| 1624 | + | |
| 1625 | + <step_error_handling> | |
| 1626 | + <error> | |
| 1627 | + <source_step>插入 / 更新bsth_c_s_sr1_flat</source_step> | |
| 1628 | + <target_step>错误输出 2</target_step> | |
| 1629 | + <is_enabled>Y</is_enabled> | |
| 1630 | + <nr_valuename>error_count</nr_valuename> | |
| 1631 | + <descriptions_valuename>error_desc</descriptions_valuename> | |
| 1632 | + <fields_valuename>error_column1</fields_valuename> | |
| 1633 | + <codes_valuename>error_column2</codes_valuename> | |
| 1634 | + <max_errors/> | |
| 1635 | + <max_pct_errors/> | |
| 1636 | + <min_pct_rows/> | |
| 1637 | + </error> | |
| 1638 | + </step_error_handling> | |
| 1639 | + <slave-step-copy-partition-distribution> | |
| 1640 | +</slave-step-copy-partition-distribution> | |
| 1641 | + <slave_transformation>N</slave_transformation> | |
| 1642 | + | |
| 1643 | +</transformation> | ... | ... |