Commit a0469a02c30f55f8e94704b61965bf8210f3db39
Merge branch 'minhang' of http://222.66.0.204:8090//panzhaov5/bsth_control into minhang
Showing
35 changed files
with
1957 additions
and
1542 deletions
Too many changes to show.
To preserve performance only 35 of 71 files are displayed.
src/main/java/com/bsth/Application.java
| @@ -2,10 +2,6 @@ package com.bsth; | @@ -2,10 +2,6 @@ package com.bsth; | ||
| 2 | 2 | ||
| 3 | import com.fasterxml.jackson.databind.ObjectMapper; | 3 | import com.fasterxml.jackson.databind.ObjectMapper; |
| 4 | import com.fasterxml.jackson.databind.SerializationFeature; | 4 | import com.fasterxml.jackson.databind.SerializationFeature; |
| 5 | - | ||
| 6 | -import java.util.concurrent.Executors; | ||
| 7 | -import java.util.concurrent.ScheduledExecutorService; | ||
| 8 | - | ||
| 9 | import org.springframework.boot.SpringApplication; | 5 | import org.springframework.boot.SpringApplication; |
| 10 | import org.springframework.boot.autoconfigure.SpringBootApplication; | 6 | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| 11 | import org.springframework.boot.builder.SpringApplicationBuilder; | 7 | import org.springframework.boot.builder.SpringApplicationBuilder; |
| @@ -13,10 +9,13 @@ import org.springframework.boot.context.web.SpringBootServletInitializer; | @@ -13,10 +9,13 @@ import org.springframework.boot.context.web.SpringBootServletInitializer; | ||
| 13 | import org.springframework.context.annotation.Bean; | 9 | import org.springframework.context.annotation.Bean; |
| 14 | import org.springframework.context.annotation.Primary; | 10 | import org.springframework.context.annotation.Primary; |
| 15 | 11 | ||
| 12 | +import java.util.concurrent.Executors; | ||
| 13 | +import java.util.concurrent.ScheduledExecutorService; | ||
| 14 | + | ||
| 16 | @SpringBootApplication | 15 | @SpringBootApplication |
| 17 | public class Application extends SpringBootServletInitializer { | 16 | public class Application extends SpringBootServletInitializer { |
| 18 | 17 | ||
| 19 | - public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(12); | 18 | + public static ScheduledExecutorService mainServices = Executors.newScheduledThreadPool(13); |
| 20 | 19 | ||
| 21 | @Override | 20 | @Override |
| 22 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { | 21 | protected SpringApplicationBuilder configure(SpringApplicationBuilder application) { |
src/main/java/com/bsth/controller/SectionRouteController.java
| @@ -72,4 +72,14 @@ public class SectionRouteController extends BaseController<SectionRoute, Integer | @@ -72,4 +72,14 @@ public class SectionRouteController extends BaseController<SectionRoute, Integer | ||
| 72 | public List<Map<String, Object>> findUpStationRouteCode(@RequestParam Map<String, Object> map) { | 72 | public List<Map<String, Object>> findUpStationRouteCode(@RequestParam Map<String, Object> map) { |
| 73 | return routeService.findUpSectionRouteCode(map); | 73 | return routeService.findUpSectionRouteCode(map); |
| 74 | } | 74 | } |
| 75 | + | ||
| 76 | + /** | ||
| 77 | + * @Description :TODO(引用路段) | ||
| 78 | + * | ||
| 79 | + * @return List<Map<String, Object>> | ||
| 80 | + */ | ||
| 81 | + @RequestMapping(value = "/quoteSection" , method = RequestMethod.POST) | ||
| 82 | + public Map<String, Object> quoteSection(@RequestParam Map<String, Object> map) { | ||
| 83 | + return routeService.quoteSection(map); | ||
| 84 | + } | ||
| 75 | } | 85 | } |
src/main/java/com/bsth/controller/StationRouteController.java
| @@ -127,8 +127,17 @@ public class StationRouteController extends BaseController<StationRoute, Integer | @@ -127,8 +127,17 @@ public class StationRouteController extends BaseController<StationRoute, Integer | ||
| 127 | */ | 127 | */ |
| 128 | @RequestMapping(value = "/multiLine", method = RequestMethod.GET) | 128 | @RequestMapping(value = "/multiLine", method = RequestMethod.GET) |
| 129 | public Map<String, Object> findByMultiLine(@RequestParam String lineIds){ | 129 | public Map<String, Object> findByMultiLine(@RequestParam String lineIds){ |
| 130 | - | ||
| 131 | return service.findByMultiLine(lineIds); | 130 | return service.findByMultiLine(lineIds); |
| 132 | } | 131 | } |
| 133 | 132 | ||
| 133 | + /** | ||
| 134 | + * | ||
| 135 | + * @Title: updSwitchDir | ||
| 136 | + * @Description: TODO(上下行切换) | ||
| 137 | + */ | ||
| 138 | + @RequestMapping(value = "/updSwitchDir", method = RequestMethod.POST) | ||
| 139 | + public Map<String, Object> updSwitchDir(@RequestParam String lineIds){ | ||
| 140 | + return service.updSwitchDir(lineIds); | ||
| 141 | + } | ||
| 142 | + | ||
| 134 | } | 143 | } |
src/main/java/com/bsth/controller/gps/GpsController.java
| @@ -96,4 +96,16 @@ public class GpsController { | @@ -96,4 +96,16 @@ public class GpsController { | ||
| 96 | public Map<String, Object> gpsCompletion(@RequestParam long schId) { | 96 | public Map<String, Object> gpsCompletion(@RequestParam long schId) { |
| 97 | return gpsService.gpsCompletion(schId); | 97 | return gpsService.gpsCompletion(schId); |
| 98 | } | 98 | } |
| 99 | + | ||
| 100 | + /** | ||
| 101 | + * 历史GPS查询 ,第二版轨迹回放用 | ||
| 102 | + * @param nbbm | ||
| 103 | + * @param st | ||
| 104 | + * @param et | ||
| 105 | + * @return | ||
| 106 | + */ | ||
| 107 | + @RequestMapping(value = "/history_v2/{nbbm}") | ||
| 108 | + public Map<String, Object> history_v2(@PathVariable("nbbm") String nbbm, @RequestParam long st, @RequestParam long et){ | ||
| 109 | + return gpsService.history_v2(nbbm, st, et); | ||
| 110 | + } | ||
| 99 | } | 111 | } |
src/main/java/com/bsth/controller/oil/DlbController.java
| 1 | package com.bsth.controller.oil; | 1 | package com.bsth.controller.oil; |
| 2 | 2 | ||
| 3 | +import java.text.SimpleDateFormat; | ||
| 4 | +import java.util.ArrayList; | ||
| 3 | import java.util.HashMap; | 5 | import java.util.HashMap; |
| 6 | +import java.util.Iterator; | ||
| 4 | import java.util.List; | 7 | import java.util.List; |
| 5 | import java.util.Map; | 8 | import java.util.Map; |
| 6 | 9 | ||
| @@ -17,6 +20,7 @@ import com.bsth.controller.BaseController; | @@ -17,6 +20,7 @@ import com.bsth.controller.BaseController; | ||
| 17 | import com.bsth.entity.oil.Dlb; | 20 | import com.bsth.entity.oil.Dlb; |
| 18 | import com.bsth.entity.oil.Ylb; | 21 | import com.bsth.entity.oil.Ylb; |
| 19 | import com.bsth.service.oil.DlbService; | 22 | import com.bsth.service.oil.DlbService; |
| 23 | +import com.bsth.util.ReportUtils; | ||
| 20 | import com.google.common.base.Splitter; | 24 | import com.google.common.base.Splitter; |
| 21 | 25 | ||
| 22 | @RestController | 26 | @RestController |
| @@ -124,4 +128,57 @@ public class DlbController extends BaseController<Dlb, Integer>{ | @@ -124,4 +128,57 @@ public class DlbController extends BaseController<Dlb, Integer>{ | ||
| 124 | } | 128 | } |
| 125 | return list; | 129 | return list; |
| 126 | } | 130 | } |
| 131 | + | ||
| 132 | + | ||
| 133 | + @RequestMapping(value = "/listExport",method = RequestMethod.POST) | ||
| 134 | + public List<Map<String, Object>> listExport(@RequestParam Map<String, Object> map){ | ||
| 135 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 136 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 137 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 138 | + ReportUtils ee = new ReportUtils(); | ||
| 139 | + List<Dlb> dlb= service.listDlb(map); | ||
| 140 | +// (new CustomerSpecs<Ylb>(map)).iterator(); | ||
| 141 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 142 | + for (Dlb y : dlb) { | ||
| 143 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 144 | + m.put("rq", y.getRq()); | ||
| 145 | + m.put("gsname",y.getGsname() ); | ||
| 146 | + m.put("xlname", y.getXlname()); | ||
| 147 | + m.put("nbbm", y.getNbbm()); | ||
| 148 | + m.put("jsy", y.getJsy()); | ||
| 149 | + m.put("cdl", y.getCdl()); | ||
| 150 | + m.put("czcd", y.getCzcd()+"%"); | ||
| 151 | + m.put("jzcd", y.getJzcd()+"%"); | ||
| 152 | + m.put("hd", y.getHd()); | ||
| 153 | + String shyy ="无"; | ||
| 154 | + if(y.getShyy()!=null){ | ||
| 155 | + if(shyy.equals("1")){shyy="票务用油";} | ||
| 156 | + else if(shyy.equals("2")){shyy="保养用油";} | ||
| 157 | + else if(shyy.equals("3")){shyy="报废车用油";} | ||
| 158 | + else if(shyy.equals("4")){shyy="其它用油";} | ||
| 159 | + else if(shyy.equals("5")){shyy="人保部";} | ||
| 160 | + else if(shyy.equals("6")){shyy="车队";} | ||
| 161 | + else if(shyy.equals("7")){shyy="车间(高保)";} | ||
| 162 | + else if(shyy.equals("8")){shyy="车间(小修)";} | ||
| 163 | + else{shyy ="无";} | ||
| 164 | + } | ||
| 165 | + m.put("shyy", shyy); | ||
| 166 | + m.put("sh", y.getSh()); | ||
| 167 | + m.put("zlc", y.getZlc()); | ||
| 168 | + m.put("bglyh", y.getBglyh()); | ||
| 169 | + resList.add(m); | ||
| 170 | + } | ||
| 171 | + try { | ||
| 172 | + listI.add(resList.iterator()); | ||
| 173 | + String path = this.getClass().getResource("/").getPath()+"static/pages/forms/"; | ||
| 174 | + ee.excelReplace(listI, new Object[] { map }, path+"mould/listDl.xls", | ||
| 175 | + path+"export/"+map.get("rq").toString()+ "进出场存电量.xls"); | ||
| 176 | + } catch (Exception e) { | ||
| 177 | + e.printStackTrace(); | ||
| 178 | + } | ||
| 179 | + | ||
| 180 | + return resList; | ||
| 181 | + | ||
| 182 | + } | ||
| 183 | + | ||
| 127 | } | 184 | } |
src/main/java/com/bsth/controller/realcontrol/BasicDataController.java
| @@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSON; | @@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSON; | ||
| 4 | import com.alibaba.fastjson.serializer.PropertyFilter; | 4 | import com.alibaba.fastjson.serializer.PropertyFilter; |
| 5 | import com.bsth.common.ResponseCode; | 5 | import com.bsth.common.ResponseCode; |
| 6 | import com.bsth.data.BasicData; | 6 | import com.bsth.data.BasicData; |
| 7 | +import com.bsth.entity.Line; | ||
| 8 | +import com.google.common.collect.ArrayListMultimap; | ||
| 7 | import org.slf4j.Logger; | 9 | import org.slf4j.Logger; |
| 8 | import org.slf4j.LoggerFactory; | 10 | import org.slf4j.LoggerFactory; |
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 11 | import org.springframework.beans.factory.annotation.Autowired; |
| @@ -11,9 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping; | @@ -11,9 +13,7 @@ import org.springframework.web.bind.annotation.RequestMapping; | ||
| 11 | import org.springframework.web.bind.annotation.RequestMethod; | 13 | import org.springframework.web.bind.annotation.RequestMethod; |
| 12 | import org.springframework.web.bind.annotation.RestController; | 14 | import org.springframework.web.bind.annotation.RestController; |
| 13 | 15 | ||
| 14 | -import java.util.HashMap; | ||
| 15 | -import java.util.List; | ||
| 16 | -import java.util.Map; | 16 | +import java.util.*; |
| 17 | 17 | ||
| 18 | @RestController | 18 | @RestController |
| 19 | @RequestMapping("/basic") | 19 | @RequestMapping("/basic") |
| @@ -126,4 +126,23 @@ public class BasicDataController { | @@ -126,4 +126,23 @@ public class BasicDataController { | ||
| 126 | public Map<String, String> nbbm2PlateNo(){ | 126 | public Map<String, String> nbbm2PlateNo(){ |
| 127 | return basicData.getNbbm2PlateNo(); | 127 | return basicData.getNbbm2PlateNo(); |
| 128 | } | 128 | } |
| 129 | + | ||
| 130 | + | ||
| 131 | + /** | ||
| 132 | + * 获取线路配车信息 | ||
| 133 | + * @return | ||
| 134 | + */ | ||
| 135 | + @RequestMapping("/ccInfo") | ||
| 136 | + public Map<String, Collection<String>> ccInfo(){ | ||
| 137 | + | ||
| 138 | + ArrayListMultimap<String, String> listMultimap = ArrayListMultimap.create(); | ||
| 139 | + Set<String> ks = BasicData.nbbm2LineMap.keySet(); | ||
| 140 | + | ||
| 141 | + Line line; | ||
| 142 | + for(String nbbm : ks){ | ||
| 143 | + line = BasicData.nbbm2LineMap.get(nbbm); | ||
| 144 | + listMultimap.put(line.getLineCode(), nbbm); | ||
| 145 | + } | ||
| 146 | + return listMultimap.asMap(); | ||
| 147 | + } | ||
| 129 | } | 148 | } |
src/main/java/com/bsth/controller/realcontrol/LineConfigController.java
| @@ -14,39 +14,91 @@ public class LineConfigController extends BaseController<LineConfig, Integer>{ | @@ -14,39 +14,91 @@ public class LineConfigController extends BaseController<LineConfig, Integer>{ | ||
| 14 | 14 | ||
| 15 | @Autowired | 15 | @Autowired |
| 16 | LineConfigService lineConfigService; | 16 | LineConfigService lineConfigService; |
| 17 | - | 17 | + |
| 18 | + /** | ||
| 19 | + * 检查是否有线路配置信息 | ||
| 20 | + * @param codeArray | ||
| 21 | + * @return | ||
| 22 | + */ | ||
| 18 | @RequestMapping("/check") | 23 | @RequestMapping("/check") |
| 19 | public Map<String, Object> check(@RequestParam String[] codeArray){ | 24 | public Map<String, Object> check(@RequestParam String[] codeArray){ |
| 20 | return lineConfigService.check(codeArray); | 25 | return lineConfigService.check(codeArray); |
| 21 | } | 26 | } |
| 22 | - | 27 | + |
| 28 | + /** | ||
| 29 | + * 初始化线路配置 | ||
| 30 | + * @param lineCode | ||
| 31 | + * @return | ||
| 32 | + * @throws Exception | ||
| 33 | + */ | ||
| 23 | @RequestMapping("/init/{lineCode}") | 34 | @RequestMapping("/init/{lineCode}") |
| 24 | public Integer init(@PathVariable("lineCode") String lineCode) throws Exception{ | 35 | public Integer init(@PathVariable("lineCode") String lineCode) throws Exception{ |
| 25 | return lineConfigService.init(lineCode); | 36 | return lineConfigService.init(lineCode); |
| 26 | } | 37 | } |
| 27 | - | 38 | + |
| 39 | + /** | ||
| 40 | + * 修改班次刷新时间 | ||
| 41 | + * @param time | ||
| 42 | + * @param lineCode | ||
| 43 | + * @return | ||
| 44 | + */ | ||
| 28 | @RequestMapping(value = "/editTime", method = RequestMethod.POST) | 45 | @RequestMapping(value = "/editTime", method = RequestMethod.POST) |
| 29 | public Map<String, Object> editStartOptTime(@RequestParam String time,@RequestParam String lineCode){ | 46 | public Map<String, Object> editStartOptTime(@RequestParam String time,@RequestParam String lineCode){ |
| 30 | return lineConfigService.editStartOptTime(time, lineCode); | 47 | return lineConfigService.editStartOptTime(time, lineCode); |
| 31 | } | 48 | } |
| 32 | - | 49 | + |
| 50 | + /** | ||
| 51 | + * 修改出场时间类型 | ||
| 52 | + * @param lineCode | ||
| 53 | + * @param type | ||
| 54 | + * @return | ||
| 55 | + */ | ||
| 33 | @RequestMapping(value = "/editOutTimeType", method = RequestMethod.POST) | 56 | @RequestMapping(value = "/editOutTimeType", method = RequestMethod.POST) |
| 34 | - public Map<String, Object> editOutTimeType(@RequestParam String lineCode, @RequestParam int type){ | ||
| 35 | - return lineConfigService.editOutTimeType(lineCode, type); | 57 | + public Map<String, Object> editOutTimeType(@RequestParam String lineCode, @RequestParam int type,@RequestParam String parkCode,@RequestParam String stationCode){ |
| 58 | + return lineConfigService.editOutTimeType(lineCode, type, parkCode, stationCode); | ||
| 36 | } | 59 | } |
| 37 | 60 | ||
| 61 | + /** | ||
| 62 | + * 启用原线路回场 | ||
| 63 | + * @param lineCode | ||
| 64 | + * @param enable | ||
| 65 | + * @return | ||
| 66 | + */ | ||
| 38 | @RequestMapping(value = "/enableInParkForSource", method = RequestMethod.POST) | 67 | @RequestMapping(value = "/enableInParkForSource", method = RequestMethod.POST) |
| 39 | public Map<String, Object> enableInParkForSource(@RequestParam String lineCode, @RequestParam int enable){ | 68 | public Map<String, Object> enableInParkForSource(@RequestParam String lineCode, @RequestParam int enable){ |
| 40 | return lineConfigService.enableInParkForSource(lineCode, enable); | 69 | return lineConfigService.enableInParkForSource(lineCode, enable); |
| 41 | } | 70 | } |
| 42 | 71 | ||
| 72 | + /** | ||
| 73 | + * 根据线路编码获取配置信息 | ||
| 74 | + * @param lineCode | ||
| 75 | + * @return | ||
| 76 | + */ | ||
| 43 | @RequestMapping(value = "/getByLineCode") | 77 | @RequestMapping(value = "/getByLineCode") |
| 44 | public LineConfig getByLineCode(@RequestParam String lineCode){ | 78 | public LineConfig getByLineCode(@RequestParam String lineCode){ |
| 45 | return lineConfigService.getByLineCode(lineCode); | 79 | return lineConfigService.getByLineCode(lineCode); |
| 46 | } | 80 | } |
| 47 | 81 | ||
| 82 | + /** | ||
| 83 | + * 到站缓冲区设置 | ||
| 84 | + * @param lineCode | ||
| 85 | + * @param field | ||
| 86 | + * @param value | ||
| 87 | + * @return | ||
| 88 | + */ | ||
| 48 | @RequestMapping(value = "/bufferTimeDiff", method = RequestMethod.POST) | 89 | @RequestMapping(value = "/bufferTimeDiff", method = RequestMethod.POST) |
| 49 | public Map<String, Object> bufferTimeDiff(@RequestParam String lineCode, @RequestParam String field,@RequestParam String value){ | 90 | public Map<String, Object> bufferTimeDiff(@RequestParam String lineCode, @RequestParam String field,@RequestParam String value){ |
| 50 | return lineConfigService.bufferTimeDiff(lineCode, field, value); | 91 | return lineConfigService.bufferTimeDiff(lineCode, field, value); |
| 51 | } | 92 | } |
| 93 | + | ||
| 94 | + /** | ||
| 95 | + * 应急停靠设置 | ||
| 96 | + * @param map | ||
| 97 | + * @return | ||
| 98 | + */ | ||
| 99 | + @RequestMapping(value = "/yjtkSet", method = RequestMethod.POST) | ||
| 100 | + public Map<String, Object> yjtkSet(@RequestParam Map<String, String> map){ | ||
| 101 | + //System.out.println(map); | ||
| 102 | + return lineConfigService.yjtkSet(map); | ||
| 103 | + } | ||
| 52 | } | 104 | } |
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| 1 | package com.bsth.controller.realcontrol; | 1 | package com.bsth.controller.realcontrol; |
| 2 | 2 | ||
| 3 | import com.alibaba.fastjson.JSONArray; | 3 | import com.alibaba.fastjson.JSONArray; |
| 4 | +import com.bsth.common.ResponseCode; | ||
| 4 | import com.bsth.controller.BaseController; | 5 | import com.bsth.controller.BaseController; |
| 5 | import com.bsth.controller.realcontrol.dto.ChangePersonCar; | 6 | import com.bsth.controller.realcontrol.dto.ChangePersonCar; |
| 6 | import com.bsth.controller.realcontrol.dto.DfsjChange; | 7 | import com.bsth.controller.realcontrol.dto.DfsjChange; |
| @@ -368,9 +369,9 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -368,9 +369,9 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 368 | } | 369 | } |
| 369 | 370 | ||
| 370 | @RequestMapping(value="/statisticsDailyTj") | 371 | @RequestMapping(value="/statisticsDailyTj") |
| 371 | - public List<Map<String,Object>> statisticsDailyTj(@RequestParam String line, @RequestParam String date, | 372 | + public List<Map<String,Object>> statisticsDailyTj(@RequestParam String gsdm,@RequestParam String fgsdm, @RequestParam String line, @RequestParam String date, |
| 372 | @RequestParam String date2,@RequestParam String xlName, @RequestParam String type){ | 373 | @RequestParam String date2,@RequestParam String xlName, @RequestParam String type){ |
| 373 | - return scheduleRealInfoService.statisticsDailyTj(line, date,date2, xlName, type); | 374 | + return scheduleRealInfoService.statisticsDailyTj(gsdm,fgsdm,line, date,date2, xlName, type); |
| 374 | } | 375 | } |
| 375 | 376 | ||
| 376 | @RequestMapping(value="/MapById",method = RequestMethod.GET) | 377 | @RequestMapping(value="/MapById",method = RequestMethod.GET) |
| @@ -486,4 +487,33 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -486,4 +487,33 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 486 | public Map<String, Object> lpChangeMulti(@RequestParam String leftIdx, @RequestParam String rightIdx,@RequestParam int type){ | 487 | public Map<String, Object> lpChangeMulti(@RequestParam String leftIdx, @RequestParam String rightIdx,@RequestParam int type){ |
| 487 | return scheduleRealInfoService.lpChangeMulti(leftIdx, rightIdx, type); | 488 | return scheduleRealInfoService.lpChangeMulti(leftIdx, rightIdx, type); |
| 488 | } | 489 | } |
| 490 | + | ||
| 491 | + /** | ||
| 492 | + * 删除当日实际排班 | ||
| 493 | + * @return | ||
| 494 | + */ | ||
| 495 | + @RequestMapping(value = "deleteRealSchedule", method = RequestMethod.POST) | ||
| 496 | + public Map<String, Object> deleteRealSchedule(@RequestParam String lineCode){ | ||
| 497 | + return dayOfSchedule.deleteRealSchedule(lineCode); | ||
| 498 | + } | ||
| 499 | + | ||
| 500 | + /** | ||
| 501 | + * 从计划表重新加载当日排班 | ||
| 502 | + * @param lineCode | ||
| 503 | + * @return | ||
| 504 | + */ | ||
| 505 | + @RequestMapping(value = "reLoadRealSchedule", method = RequestMethod.POST) | ||
| 506 | + public Map<String, Object> reLoadRealSchedule(@RequestParam String lineCode){ | ||
| 507 | + Map<String, Object> rs = new HashMap<>(); | ||
| 508 | + List<ScheduleRealInfo> list = dayOfSchedule.findByLineCode(lineCode); | ||
| 509 | + if(list != null && list.size() > 0){ | ||
| 510 | + rs.put("status", ResponseCode.ERROR); | ||
| 511 | + rs.put("msg", "失败," + list.get(0).getXlName() + "当日存在实际排班,无法重新加载。"); | ||
| 512 | + return rs; | ||
| 513 | + } | ||
| 514 | + | ||
| 515 | + int code = dayOfSchedule.reloadSch(lineCode); | ||
| 516 | + rs.put("status", code==0? ResponseCode.SUCCESS: ResponseCode.ERROR); | ||
| 517 | + return rs; | ||
| 518 | + } | ||
| 489 | } | 519 | } |
src/main/java/com/bsth/controller/report/ReportController.java
| @@ -21,17 +21,17 @@ public class ReportController { | @@ -21,17 +21,17 @@ public class ReportController { | ||
| 21 | @Autowired | 21 | @Autowired |
| 22 | ReportService service; | 22 | ReportService service; |
| 23 | 23 | ||
| 24 | - @RequestMapping(value="/queryListBczx" ,method = RequestMethod.POST) | 24 | + @RequestMapping(value="/queryListBczx" ,method = RequestMethod.GET) |
| 25 | public List<ScheduleRealInfo> queryListBczx(@RequestParam String clzbh,@RequestParam String line,@RequestParam String date){ | 25 | public List<ScheduleRealInfo> queryListBczx(@RequestParam String clzbh,@RequestParam String line,@RequestParam String date){ |
| 26 | return service.queryListBczx(line,date,clzbh); | 26 | return service.queryListBczx(line,date,clzbh); |
| 27 | } | 27 | } |
| 28 | 28 | ||
| 29 | - @RequestMapping(value="/queryListZdxx" ,method = RequestMethod.POST) | 29 | + @RequestMapping(value="/queryListZdxx" ,method = RequestMethod.GET) |
| 30 | public List<ArrivalInfo> queryListZdxx(@RequestParam String clzbh,@RequestParam String line, | 30 | public List<ArrivalInfo> queryListZdxx(@RequestParam String clzbh,@RequestParam String line, |
| 31 | @RequestParam String date,@RequestParam String fcsj,@RequestParam String ddsj){ | 31 | @RequestParam String date,@RequestParam String fcsj,@RequestParam String ddsj){ |
| 32 | return service.queryListZdxx(line,date,clzbh,fcsj,ddsj); | 32 | return service.queryListZdxx(line,date,clzbh,fcsj,ddsj); |
| 33 | } | 33 | } |
| 34 | - @RequestMapping(value="/queryListClzd" ,method = RequestMethod.POST) | 34 | + @RequestMapping(value="/queryListClzd" ,method = RequestMethod.GET) |
| 35 | public List<ArrivalInfo> queryListClzd(@RequestParam String zd,@RequestParam String line, | 35 | public List<ArrivalInfo> queryListClzd(@RequestParam String zd,@RequestParam String line, |
| 36 | @RequestParam String zdlx,@RequestParam String fcsj,@RequestParam String ddsj){ | 36 | @RequestParam String zdlx,@RequestParam String fcsj,@RequestParam String ddsj){ |
| 37 | return service.queryListClzd(line,zd,zdlx,fcsj,ddsj); | 37 | return service.queryListClzd(line,zd,zdlx,fcsj,ddsj); |
src/main/java/com/bsth/data/LineConfigData.java
| 1 | package com.bsth.data; | 1 | package com.bsth.data; |
| 2 | 2 | ||
| 3 | +import com.bsth.Application; | ||
| 3 | import com.bsth.entity.Line; | 4 | import com.bsth.entity.Line; |
| 4 | import com.bsth.entity.realcontrol.D80ReplyTemp; | 5 | import com.bsth.entity.realcontrol.D80ReplyTemp; |
| 5 | import com.bsth.entity.realcontrol.LineConfig; | 6 | import com.bsth.entity.realcontrol.LineConfig; |
| 6 | -import com.bsth.oplog.normal.OpLogger; | 7 | +import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 7 | import com.bsth.service.LineService; | 8 | import com.bsth.service.LineService; |
| 8 | import com.bsth.service.realcontrol.LineConfigService; | 9 | import com.bsth.service.realcontrol.LineConfigService; |
| 9 | import org.slf4j.Logger; | 10 | import org.slf4j.Logger; |
| @@ -14,101 +15,151 @@ import org.springframework.core.annotation.Order; | @@ -14,101 +15,151 @@ import org.springframework.core.annotation.Order; | ||
| 14 | import org.springframework.stereotype.Component; | 15 | import org.springframework.stereotype.Component; |
| 15 | 16 | ||
| 16 | import java.util.*; | 17 | import java.util.*; |
| 18 | +import java.util.concurrent.TimeUnit; | ||
| 17 | 19 | ||
| 18 | /** | 20 | /** |
| 19 | - * | 21 | + * @author PanZhao |
| 20 | * @ClassName: LineConfigData | 22 | * @ClassName: LineConfigData |
| 21 | * @Description: TODO(线路配置数据管理) | 23 | * @Description: TODO(线路配置数据管理) |
| 22 | - * @author PanZhao | ||
| 23 | * @date 2016年8月15日 下午2:50:19 | 24 | * @date 2016年8月15日 下午2:50:19 |
| 24 | - * | ||
| 25 | */ | 25 | */ |
| 26 | @Component | 26 | @Component |
| 27 | @Order(value = 2) | 27 | @Order(value = 2) |
| 28 | public class LineConfigData implements CommandLineRunner { | 28 | public class LineConfigData implements CommandLineRunner { |
| 29 | - | ||
| 30 | - Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 31 | - | ||
| 32 | - // 线路编码和配置 | ||
| 33 | - private Map<String, LineConfig> lineConfMap; | ||
| 34 | - | ||
| 35 | - @Autowired | ||
| 36 | - LineConfigService lineConfigService; | ||
| 37 | - | ||
| 38 | - @Autowired | ||
| 39 | - LineService lineService; | ||
| 40 | - | ||
| 41 | - @Autowired | ||
| 42 | - OpLogger opLog; | ||
| 43 | - | ||
| 44 | - @Override | ||
| 45 | - public void run(String... arg0) throws Exception { | ||
| 46 | - lineConfMap = new HashMap<>(); | ||
| 47 | - | ||
| 48 | - Iterator<LineConfig> itr = lineConfigService.findAll().iterator(); | ||
| 49 | - while (itr.hasNext()) | ||
| 50 | - setBuffer(itr.next()); | ||
| 51 | - | ||
| 52 | - opLog.info("Line_config_data"); | ||
| 53 | - } | ||
| 54 | - | ||
| 55 | - public LineConfig get(String lineCode){ | ||
| 56 | - return lineConfMap.get(lineCode); | ||
| 57 | - } | ||
| 58 | - | ||
| 59 | - public Collection<LineConfig> getAll(){ | ||
| 60 | - return lineConfMap.values(); | ||
| 61 | - } | ||
| 62 | - | ||
| 63 | - public void set(LineConfig conf){ | ||
| 64 | - lineConfigService.save(conf); | ||
| 65 | - setBuffer(conf); | ||
| 66 | - } | ||
| 67 | - | ||
| 68 | - public void setBuffer(LineConfig conf){ | ||
| 69 | - lineConfMap.put(conf.getLine().getLineCode(), conf); | ||
| 70 | - } | ||
| 71 | - | ||
| 72 | - /** | ||
| 73 | - * | ||
| 74 | - * @Title: init | ||
| 75 | - * @Description: TODO(初始化配置信息) | ||
| 76 | - */ | ||
| 77 | - public void init(String lineCode) throws Exception{ | ||
| 78 | - LineConfig conf = new LineConfig(); | ||
| 79 | - //线路 | ||
| 80 | - Line line = lineService.findByLineCode(lineCode); | ||
| 81 | - if(null == line) | ||
| 82 | - throw new NullPointerException("异常的lineCode"); | ||
| 83 | - | ||
| 84 | - conf.setLine(line); | ||
| 85 | - //开始运营时间 | ||
| 86 | - conf.setStartOpt("02:00"); | ||
| 87 | - //托管状态 | ||
| 88 | - conf.setTrust(true); | ||
| 89 | - //出场时间类型 | ||
| 90 | - conf.setOutConfig(0); | ||
| 91 | - //进场时间类型 | ||
| 92 | - //conf.setInConfig(1); | ||
| 93 | - //短语模板 | ||
| 94 | - conf.setPhraseTemps(""); | ||
| 95 | - //调度指令模板 | ||
| 96 | - conf.setSchDirectiveTemp(""); | ||
| 97 | - | ||
| 98 | - //80指令回复 | ||
| 99 | - D80ReplyTemp t50 = new D80ReplyTemp(conf, (short)0x50, "同意,回电详谈", "不同意,请回电") | ||
| 100 | - ,t60 = new D80ReplyTemp(conf, (short)0x60, "同意,回电详谈", "不同意,请回电") | ||
| 101 | - ,tA2 = new D80ReplyTemp(conf, (short)0xA2, "同意,回电详谈", "不同意,请回电") | ||
| 102 | - ,t70 = new D80ReplyTemp(conf, (short)0x70, "同意,回电详谈", "不同意,请回电") | ||
| 103 | - ,t11 = new D80ReplyTemp(conf, (short)0x11, "同意,回电详谈", "不同意,请回电"); | ||
| 104 | - | ||
| 105 | - Set<D80ReplyTemp> temps = conf.getD80Temps(); | ||
| 106 | - temps.add(t50); | ||
| 107 | - temps.add(t60); | ||
| 108 | - temps.add(tA2); | ||
| 109 | - temps.add(t70); | ||
| 110 | - temps.add(t11); | ||
| 111 | - | ||
| 112 | - set(conf); | ||
| 113 | - } | 29 | + |
| 30 | + static Logger logger = LoggerFactory.getLogger(LineConfigData.class); | ||
| 31 | + | ||
| 32 | + // 线路编码和配置 | ||
| 33 | + private Map<String, LineConfig> lineConfMap; | ||
| 34 | + | ||
| 35 | + @Autowired | ||
| 36 | + LineConfigService lineConfigService; | ||
| 37 | + | ||
| 38 | + @Autowired | ||
| 39 | + LineService lineService; | ||
| 40 | + | ||
| 41 | + //入库缓冲 | ||
| 42 | + static LinkedList<LineConfig> saveBuffers = new LinkedList<>(); | ||
| 43 | + | ||
| 44 | + @Autowired | ||
| 45 | + LineConfigPersistThread configPersistThread; | ||
| 46 | + | ||
| 47 | + @Override | ||
| 48 | + public void run(String... arg0) throws Exception { | ||
| 49 | + lineConfMap = new HashMap<>(); | ||
| 50 | + | ||
| 51 | + Iterator<LineConfig> itr = lineConfigService.findAll().iterator(); | ||
| 52 | + while (itr.hasNext()) | ||
| 53 | + setBuffer(itr.next()); | ||
| 54 | + | ||
| 55 | + //异步入库 | ||
| 56 | + Application.mainServices.scheduleWithFixedDelay(configPersistThread, 60, 60, TimeUnit.SECONDS); | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + /** | ||
| 60 | + * 起点发出,应用缓冲区设置参数 | ||
| 61 | + * @param sch | ||
| 62 | + * @param timestamp | ||
| 63 | + * @return | ||
| 64 | + */ | ||
| 65 | + public long applyOut(ScheduleRealInfo sch, Long timestamp) { | ||
| 66 | + LineConfig config = lineConfMap.get(sch.getXlBm()); | ||
| 67 | + int diff = sch.getXlDir()=="0"?config.getUpOutDiff():config.getDownOutDiff(); | ||
| 68 | + return timestamp - (diff * 1000); | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + /** | ||
| 72 | + * 终点到达,应用缓冲区设置参数 | ||
| 73 | + * @param sch | ||
| 74 | + * @param timestamp | ||
| 75 | + * @return | ||
| 76 | + */ | ||
| 77 | + public long applyIn(ScheduleRealInfo sch, Long timestamp){ | ||
| 78 | + LineConfig config = lineConfMap.get(sch.getXlBm()); | ||
| 79 | + int diff = sch.getXlDir()=="0"?config.getUpInDiff():config.getDownInDiff(); | ||
| 80 | + return timestamp - (diff * 1000); | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + @Component | ||
| 84 | + private static class LineConfigPersistThread extends Thread { | ||
| 85 | + | ||
| 86 | + @Autowired | ||
| 87 | + LineConfigService lineConfigService; | ||
| 88 | + | ||
| 89 | + @Override | ||
| 90 | + public void run() { | ||
| 91 | + LineConfig config; | ||
| 92 | + for (int i = 0; i < 800; i++) { | ||
| 93 | + config = saveBuffers.poll(); | ||
| 94 | + if (config == null) | ||
| 95 | + break; | ||
| 96 | + | ||
| 97 | + try { | ||
| 98 | + lineConfigService.save(config); | ||
| 99 | + }catch (Exception e){ | ||
| 100 | + logger.error("", e); | ||
| 101 | + } | ||
| 102 | + } | ||
| 103 | + } | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + public LineConfig get(String lineCode) { | ||
| 107 | + return lineConfMap.get(lineCode); | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + public Collection<LineConfig> getAll() { | ||
| 111 | + return lineConfMap.values(); | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + public void set(LineConfig conf) { | ||
| 115 | + //lineConfigService.save(conf); | ||
| 116 | + saveBuffers.add(conf); | ||
| 117 | + setBuffer(conf); | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public void setBuffer(LineConfig conf) { | ||
| 121 | + lineConfMap.put(conf.getLine().getLineCode(), conf); | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + /** | ||
| 125 | + * @Title: init | ||
| 126 | + * @Description: TODO(初始化配置信息) | ||
| 127 | + */ | ||
| 128 | + public void init(String lineCode) throws Exception { | ||
| 129 | + LineConfig conf = new LineConfig(); | ||
| 130 | + //线路 | ||
| 131 | + Line line = lineService.findByLineCode(lineCode); | ||
| 132 | + if (null == line) | ||
| 133 | + throw new NullPointerException("异常的lineCode"); | ||
| 134 | + | ||
| 135 | + conf.setLine(line); | ||
| 136 | + //开始运营时间 | ||
| 137 | + conf.setStartOpt("02:00"); | ||
| 138 | + //托管状态 | ||
| 139 | + conf.setTrust(true); | ||
| 140 | + //出场时间类型 | ||
| 141 | + conf.setOutConfig(0); | ||
| 142 | + //进场时间类型 | ||
| 143 | + //conf.setInConfig(1); | ||
| 144 | + //短语模板 | ||
| 145 | + conf.setPhraseTemps(""); | ||
| 146 | + //调度指令模板 | ||
| 147 | + conf.setSchDirectiveTemp(""); | ||
| 148 | + | ||
| 149 | + //80指令回复 闵行用 | ||
| 150 | + D80ReplyTemp t50 = new D80ReplyTemp(conf, (short) 0x50, "同意,回电详谈", "不同意,请回电"), t60 = new D80ReplyTemp(conf, (short) 0x60, "同意,回电详谈", "不同意,请回电"), tA2 = new D80ReplyTemp(conf, (short) 0xA2, "同意,回电详谈", "不同意,请回电"), t70 = new D80ReplyTemp(conf, (short) 0x70, "同意,回电详谈", "不同意,请回电"), t11 = new D80ReplyTemp(conf, (short) 0x11, "同意,回电详谈", "不同意,请回电"); | ||
| 151 | + | ||
| 152 | + //应急停靠默认值 | ||
| 153 | + conf.setYjtkStart("00:00"); | ||
| 154 | + conf.setYjtkEnd("23:59"); | ||
| 155 | + | ||
| 156 | + Set<D80ReplyTemp> temps = conf.getD80Temps(); | ||
| 157 | + temps.add(t50); | ||
| 158 | + temps.add(t60); | ||
| 159 | + temps.add(tA2); | ||
| 160 | + temps.add(t70); | ||
| 161 | + temps.add(t11); | ||
| 162 | + | ||
| 163 | + set(conf); | ||
| 164 | + } | ||
| 114 | } | 165 | } |
src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java
| @@ -135,8 +135,11 @@ public class InOutStationSignalHandle extends SignalHandle{ | @@ -135,8 +135,11 @@ public class InOutStationSignalHandle extends SignalHandle{ | ||
| 135 | if(StringUtils.isNotEmpty(sch.getFcsjActual())) | 135 | if(StringUtils.isNotEmpty(sch.getFcsjActual())) |
| 136 | return; | 136 | return; |
| 137 | 137 | ||
| 138 | + //应用到离站缓冲区设置参数 | ||
| 139 | + long rsT = lineConfigData.applyOut(sch, gps.getTimestamp()); | ||
| 140 | + | ||
| 138 | //实发时间 | 141 | //实发时间 |
| 139 | - sch.setFcsjActualAll(gps.getTimestamp()); | 142 | + sch.setFcsjActualAll(rsT); |
| 140 | //通知客户端 | 143 | //通知客户端 |
| 141 | sendUtils.sendFcsj(sch); | 144 | sendUtils.sendFcsj(sch); |
| 142 | //持久化 | 145 | //持久化 |
| @@ -215,7 +218,10 @@ public class InOutStationSignalHandle extends SignalHandle{ | @@ -215,7 +218,10 @@ public class InOutStationSignalHandle extends SignalHandle{ | ||
| 215 | if(StringUtils.isNotEmpty(sch.getZdsjActual())) | 218 | if(StringUtils.isNotEmpty(sch.getZdsjActual())) |
| 216 | return; | 219 | return; |
| 217 | 220 | ||
| 218 | - sch.setZdsjActualAll(gps.getTimestamp()); | 221 | + //应用到离站缓冲区设置参数 |
| 222 | + long rsT = lineConfigData.applyIn(sch, gps.getTimestamp()); | ||
| 223 | + | ||
| 224 | + sch.setZdsjActualAll(rsT); | ||
| 219 | //已完成班次数 | 225 | //已完成班次数 |
| 220 | int doneSum = dayOfSchedule.doneSum(sch.getClZbh()); | 226 | int doneSum = dayOfSchedule.doneSum(sch.getClZbh()); |
| 221 | ScheduleRealInfo next = dayOfSchedule.next(sch); | 227 | ScheduleRealInfo next = dayOfSchedule.next(sch); |
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| @@ -3,6 +3,7 @@ package com.bsth.data.schedule; | @@ -3,6 +3,7 @@ package com.bsth.data.schedule; | ||
| 3 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
| 4 | import com.alibaba.fastjson.JSONArray; | 4 | import com.alibaba.fastjson.JSONArray; |
| 5 | import com.bsth.Application; | 5 | import com.bsth.Application; |
| 6 | +import com.bsth.common.ResponseCode; | ||
| 6 | import com.bsth.data.BasicData; | 7 | import com.bsth.data.BasicData; |
| 7 | import com.bsth.data.LineConfigData; | 8 | import com.bsth.data.LineConfigData; |
| 8 | import com.bsth.data.directive.DirectivesPstThread; | 9 | import com.bsth.data.directive.DirectivesPstThread; |
| @@ -18,7 +19,6 @@ import com.bsth.util.BatchSaveUtils; | @@ -18,7 +19,6 @@ import com.bsth.util.BatchSaveUtils; | ||
| 18 | import com.bsth.util.DateUtils; | 19 | import com.bsth.util.DateUtils; |
| 19 | import com.bsth.websocket.handler.SendUtils; | 20 | import com.bsth.websocket.handler.SendUtils; |
| 20 | import com.google.common.collect.ArrayListMultimap; | 21 | import com.google.common.collect.ArrayListMultimap; |
| 21 | -import com.google.common.collect.TreeMultimap; | ||
| 22 | import org.apache.commons.lang3.StringUtils; | 22 | import org.apache.commons.lang3.StringUtils; |
| 23 | import org.joda.time.format.DateTimeFormat; | 23 | import org.joda.time.format.DateTimeFormat; |
| 24 | import org.joda.time.format.DateTimeFormatter; | 24 | import org.joda.time.format.DateTimeFormatter; |
| @@ -56,7 +56,7 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -56,7 +56,7 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 56 | private static Map<Long, ScheduleRealInfo> id2SchedulMap; | 56 | private static Map<Long, ScheduleRealInfo> id2SchedulMap; |
| 57 | 57 | ||
| 58 | // 车辆和排班起终点站对照(包括进出的停车场,区间起终点) | 58 | // 车辆和排班起终点站对照(包括进出的停车场,区间起终点) |
| 59 | - private static TreeMultimap<String, String> nbbm2SEStationMap; | 59 | + //private static TreeMultimap<String, String> nbbm2SEStationMap; |
| 60 | 60 | ||
| 61 | //车辆 ——> 当前执行班次 | 61 | //车辆 ——> 当前执行班次 |
| 62 | private static Map<String, ScheduleRealInfo> carExecutePlanMap; | 62 | private static Map<String, ScheduleRealInfo> carExecutePlanMap; |
| @@ -99,7 +99,7 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -99,7 +99,7 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 99 | pstBuffer = new LinkedList<>(); | 99 | pstBuffer = new LinkedList<>(); |
| 100 | schFCSJComparator = new ScheduleComparator.FCSJ(); | 100 | schFCSJComparator = new ScheduleComparator.FCSJ(); |
| 101 | currSchDateMap = new HashMap<>(); | 101 | currSchDateMap = new HashMap<>(); |
| 102 | - nbbm2SEStationMap = TreeMultimap.create(); | 102 | + //nbbm2SEStationMap = TreeMultimap.create(); |
| 103 | carExecutePlanMap = new HashMap<>(); | 103 | carExecutePlanMap = new HashMap<>(); |
| 104 | 104 | ||
| 105 | schedulePlanMap = new HashMap<>(); | 105 | schedulePlanMap = new HashMap<>(); |
| @@ -244,6 +244,10 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -244,6 +244,10 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 244 | return 0; | 244 | return 0; |
| 245 | } | 245 | } |
| 246 | 246 | ||
| 247 | + public int reloadSch(String lineCode){ | ||
| 248 | + return reloadSch(lineCode, calcSchDate(lineCode), true); | ||
| 249 | + } | ||
| 250 | + | ||
| 247 | /** | 251 | /** |
| 248 | * @Title: searchAllCars | 252 | * @Title: searchAllCars |
| 249 | * @Description: TODO(搜索班次集合中的车辆) | 253 | * @Description: TODO(搜索班次集合中的车辆) |
| @@ -480,9 +484,9 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -480,9 +484,9 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 480 | return id2SchedulMap.get(id); | 484 | return id2SchedulMap.get(id); |
| 481 | } | 485 | } |
| 482 | 486 | ||
| 483 | - public Set<String> getSEStationList(String nbbm) { | 487 | + /* public Set<String> getSEStationList(String nbbm) { |
| 484 | return nbbm2SEStationMap.get(nbbm); | 488 | return nbbm2SEStationMap.get(nbbm); |
| 485 | - } | 489 | + }*/ |
| 486 | 490 | ||
| 487 | /** | 491 | /** |
| 488 | * @Title: next | 492 | * @Title: next |
| @@ -610,8 +614,8 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -610,8 +614,8 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 610 | 614 | ||
| 611 | String nbbm = sch.getClZbh(); | 615 | String nbbm = sch.getClZbh(); |
| 612 | nbbmScheduleMap.put(nbbm, sch); | 616 | nbbmScheduleMap.put(nbbm, sch); |
| 613 | - nbbm2SEStationMap.put(nbbm, sch.getQdzCode()); | ||
| 614 | - nbbm2SEStationMap.put(nbbm, sch.getZdzCode()); | 617 | + //nbbm2SEStationMap.put(nbbm, sch.getQdzCode()); |
| 618 | + //nbbm2SEStationMap.put(nbbm, sch.getZdzCode()); | ||
| 615 | 619 | ||
| 616 | //主键索引 | 620 | //主键索引 |
| 617 | id2SchedulMap.put(sch.getId(), sch); | 621 | id2SchedulMap.put(sch.getId(), sch); |
| @@ -630,9 +634,6 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -630,9 +634,6 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 630 | //return sch; | 634 | //return sch; |
| 631 | } | 635 | } |
| 632 | 636 | ||
| 633 | -// public void calcQdzTimePlan(String nbbm){ | ||
| 634 | -// schAttrCalculator.calcQdzTimePlan(nbbmScheduleMap.get(nbbm)); | ||
| 635 | -// } | ||
| 636 | 637 | ||
| 637 | public List<ScheduleRealInfo> updateQdzTimePlan(String nbbm) { | 638 | public List<ScheduleRealInfo> updateQdzTimePlan(String nbbm) { |
| 638 | Collections.sort(nbbmScheduleMap.get(nbbm), schFCSJComparator); | 639 | Collections.sort(nbbmScheduleMap.get(nbbm), schFCSJComparator); |
| @@ -640,27 +641,6 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -640,27 +641,6 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 640 | } | 641 | } |
| 641 | 642 | ||
| 642 | /** | 643 | /** |
| 643 | - * | ||
| 644 | - * @Title: nextAll | ||
| 645 | - * @Description: TODO(之后的所有班次) | ||
| 646 | - */ | ||
| 647 | -/* public List<ScheduleRealInfo> nextAll(ScheduleRealInfo sch) { | ||
| 648 | - List<ScheduleRealInfo> list = nbbmScheduleMap.get(sch.getClZbh()); | ||
| 649 | - // 排序 | ||
| 650 | - Collections.sort(list, schFCSJComparator); | ||
| 651 | - | ||
| 652 | - List<ScheduleRealInfo> rs = new ArrayList<>(); | ||
| 653 | - ScheduleRealInfo temp; | ||
| 654 | - for (int i = 0; i < list.size() - 1; i++) { | ||
| 655 | - temp = list.get(i); | ||
| 656 | - if(temp.getFcsjT() > sch.getFcsjT()) | ||
| 657 | - rs.add(temp); | ||
| 658 | - | ||
| 659 | - } | ||
| 660 | - return rs; | ||
| 661 | - }*/ | ||
| 662 | - | ||
| 663 | - /** | ||
| 664 | * @Title: doneSum | 644 | * @Title: doneSum |
| 665 | * @Description: TODO(已完成班次总数) | 645 | * @Description: TODO(已完成班次总数) |
| 666 | */ | 646 | */ |
| @@ -828,8 +808,8 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -828,8 +808,8 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 828 | 808 | ||
| 829 | sch.setClZbh(newClZbh); | 809 | sch.setClZbh(newClZbh); |
| 830 | nbbmScheduleMap.put(newClZbh, sch); | 810 | nbbmScheduleMap.put(newClZbh, sch); |
| 831 | - nbbm2SEStationMap.put(newClZbh, sch.getQdzCode()); | ||
| 832 | - nbbm2SEStationMap.put(newClZbh, sch.getZdzCode()); | 811 | + //nbbm2SEStationMap.put(newClZbh, sch.getQdzCode()); |
| 812 | + //nbbm2SEStationMap.put(newClZbh, sch.getZdzCode()); | ||
| 833 | 813 | ||
| 834 | //重新计算班次应到时间 | 814 | //重新计算班次应到时间 |
| 835 | ups.addAll(updateQdzTimePlan(oldClzbh)); | 815 | ups.addAll(updateQdzTimePlan(oldClzbh)); |
| @@ -876,43 +856,50 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -876,43 +856,50 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 876 | } | 856 | } |
| 877 | 857 | ||
| 878 | /** | 858 | /** |
| 879 | - * 获取班次的计划停站时间 | ||
| 880 | - * @param sch | 859 | + * 删除实际排班 |
| 860 | + * @param lineCode | ||
| 881 | * @return | 861 | * @return |
| 862 | + */ | ||
| 863 | + public Map<String, Object> deleteRealSchedule(String lineCode) { | ||
| 864 | + Map<String, Object> rs = new HashMap<>(); | ||
| 882 | 865 | ||
| 883 | - public int stopTimePlan(Object task) { | 866 | + try { |
| 867 | + String rq = currSchDateMap.get(lineCode); | ||
| 868 | + if(StringUtils.isNotEmpty(rq)){ | ||
| 869 | + //解除gps 和班次之间的关联 | ||
| 870 | + List<ScheduleRealInfo> unions = calcUnion(findByLineCode(lineCode), carExecutePlanMap.values()); | ||
| 871 | + for(ScheduleRealInfo sch : unions){ | ||
| 872 | + removeExecPlan(sch.getClZbh()); | ||
| 873 | + } | ||
| 884 | 874 | ||
| 885 | - ScheduleRealInfo sch = prev((ScheduleRealInfo) task); | 875 | + //删除班次数据 |
| 876 | + removeRealSch(lineCode, rq); | ||
| 877 | + //删除相关班次修正记录 | ||
| 878 | + } | ||
| 879 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 880 | + }catch (Exception e){ | ||
| 881 | + logger.error("", e); | ||
| 882 | + rs.put("status", ResponseCode.ERROR); | ||
| 883 | + } | ||
| 886 | 884 | ||
| 887 | - sch.getzdsj | ||
| 888 | - return -1; | ||
| 889 | - }*/ | 885 | + return rs; |
| 886 | + } | ||
| 890 | 887 | ||
| 891 | /** | 888 | /** |
| 889 | + * 计算并集 | ||
| 892 | * | 890 | * |
| 893 | - * @Title: linkToSchPlan | ||
| 894 | - * @Description: TODO(车辆关联到班次) | 891 | + * @param all |
| 892 | + * @param sub | ||
| 893 | + * @return | ||
| 895 | */ | 894 | */ |
| 896 | -/* public void linkToSchPlan(String nbbm) { | ||
| 897 | - //当前GPS状态 | ||
| 898 | - GpsEntity gps = gpsRealData.get(BasicData.deviceId2NbbmMap.inverse().get(nbbm)); | ||
| 899 | - if(null == gps) | ||
| 900 | - return; | ||
| 901 | - | ||
| 902 | - //班次集合 | ||
| 903 | - List<ScheduleRealInfo> schArr = nbbmScheduleMap.get(nbbm); | ||
| 904 | - | ||
| 905 | - for(ScheduleRealInfo sch : schArr){ | ||
| 906 | - if(sch.getStatus() == 2) | ||
| 907 | - continue; | ||
| 908 | - if(sch.isDestroy()) | ||
| 909 | - continue; | ||
| 910 | - if(!sch.getXlBm().equals(gps.getLineId()) | ||
| 911 | - || Integer.parseInt(sch.getXlDir()) != gps.getUpDown().intValue()) | ||
| 912 | - continue; | ||
| 913 | - | ||
| 914 | - addExecPlan(sch); | ||
| 915 | - break; | ||
| 916 | - } | ||
| 917 | - }*/ | 895 | + public List<ScheduleRealInfo> calcUnion(Collection<ScheduleRealInfo> c1, Collection<ScheduleRealInfo> c2) { |
| 896 | + List<ScheduleRealInfo> rs = new ArrayList<>(); | ||
| 897 | + | ||
| 898 | + for (ScheduleRealInfo sch : c1) { | ||
| 899 | + if(c2.contains(sch)){ | ||
| 900 | + rs.add(sch); | ||
| 901 | + } | ||
| 902 | + } | ||
| 903 | + return rs; | ||
| 904 | + } | ||
| 918 | } | 905 | } |
| 919 | \ No newline at end of file | 906 | \ No newline at end of file |
src/main/java/com/bsth/data/schedule/thread/ScheduleRefreshThread.java
| @@ -2,7 +2,6 @@ package com.bsth.data.schedule.thread; | @@ -2,7 +2,6 @@ package com.bsth.data.schedule.thread; | ||
| 2 | 2 | ||
| 3 | import com.bsth.data.BasicData; | 3 | import com.bsth.data.BasicData; |
| 4 | import com.bsth.data.LineConfigData; | 4 | import com.bsth.data.LineConfigData; |
| 5 | -import com.bsth.data.arrival.ArrivalData_GPS; | ||
| 6 | import com.bsth.data.directive.DayOfDirectives; | 5 | import com.bsth.data.directive.DayOfDirectives; |
| 7 | import com.bsth.data.pilot80.PilotReport; | 6 | import com.bsth.data.pilot80.PilotReport; |
| 8 | import com.bsth.data.schedule.DayOfSchedule; | 7 | import com.bsth.data.schedule.DayOfSchedule; |
| @@ -29,8 +28,8 @@ public class ScheduleRefreshThread extends Thread{ | @@ -29,8 +28,8 @@ public class ScheduleRefreshThread extends Thread{ | ||
| 29 | @Autowired | 28 | @Autowired |
| 30 | DayOfSchedule dayOfSchedule; | 29 | DayOfSchedule dayOfSchedule; |
| 31 | 30 | ||
| 32 | - @Autowired | ||
| 33 | - ArrivalData_GPS arrivalData; | 31 | + /*@Autowired |
| 32 | + ArrivalData_GPS arrivalData;*/ | ||
| 34 | 33 | ||
| 35 | @Autowired | 34 | @Autowired |
| 36 | LineConfigData lineConfs; | 35 | LineConfigData lineConfs; |
| @@ -59,7 +58,7 @@ public class ScheduleRefreshThread extends Thread{ | @@ -59,7 +58,7 @@ public class ScheduleRefreshThread extends Thread{ | ||
| 59 | 58 | ||
| 60 | logger.info(lineCode + "开始翻班, " + currSchDate); | 59 | logger.info(lineCode + "开始翻班, " + currSchDate); |
| 61 | //清除进出站数据 | 60 | //清除进出站数据 |
| 62 | - arrivalData.clearRAMData(lineCode); | 61 | + //arrivalData.clearRAMData(lineCode); |
| 63 | //清除指令数据 | 62 | //清除指令数据 |
| 64 | Set<String> cars = dayOfSchedule.findCarByLineCode(lineCode); | 63 | Set<String> cars = dayOfSchedule.findCarByLineCode(lineCode); |
| 65 | for(String car : cars) | 64 | for(String car : cars) |
src/main/java/com/bsth/entity/realcontrol/LineConfig.java
| @@ -50,6 +50,9 @@ public class LineConfig { | @@ -50,6 +50,9 @@ public class LineConfig { | ||
| 50 | /** 出站既出场 对应的停车场 */ | 50 | /** 出站既出场 对应的停车场 */ |
| 51 | private String twinsPark; | 51 | private String twinsPark; |
| 52 | 52 | ||
| 53 | + /** 出站既出场 对应的起点站 */ | ||
| 54 | + private String twinsStation; | ||
| 55 | + | ||
| 53 | /** 短语模板 , 号分隔多个 */ | 56 | /** 短语模板 , 号分隔多个 */ |
| 54 | private String phraseTemps; | 57 | private String phraseTemps; |
| 55 | 58 | ||
| @@ -268,4 +271,12 @@ public class LineConfig { | @@ -268,4 +271,12 @@ public class LineConfig { | ||
| 268 | public void setEnableYjtk(boolean enableYjtk) { | 271 | public void setEnableYjtk(boolean enableYjtk) { |
| 269 | this.enableYjtk = enableYjtk; | 272 | this.enableYjtk = enableYjtk; |
| 270 | } | 273 | } |
| 274 | + | ||
| 275 | + public String getTwinsStation() { | ||
| 276 | + return twinsStation; | ||
| 277 | + } | ||
| 278 | + | ||
| 279 | + public void setTwinsStation(String twinsStation) { | ||
| 280 | + this.twinsStation = twinsStation; | ||
| 281 | + } | ||
| 271 | } | 282 | } |
src/main/java/com/bsth/repository/SectionRepository.java
| @@ -113,5 +113,4 @@ public interface SectionRepository extends BaseRepository<Section, Integer> { | @@ -113,5 +113,4 @@ public interface SectionRepository extends BaseRepository<Section, Integer> { | ||
| 113 | Double speedLimit,String descriptions,Integer version,Integer createBy,String createDate, | 113 | Double speedLimit,String descriptions,Integer version,Integer createBy,String createDate, |
| 114 | 114 | ||
| 115 | Integer updateBy,String updateDate); | 115 | Integer updateBy,String updateDate); |
| 116 | - | ||
| 117 | } | 116 | } |
src/main/java/com/bsth/repository/SectionRouteRepository.java
| @@ -28,6 +28,14 @@ import com.bsth.entity.SectionRoute; | @@ -28,6 +28,14 @@ import com.bsth.entity.SectionRoute; | ||
| 28 | @Repository | 28 | @Repository |
| 29 | public interface SectionRouteRepository extends BaseRepository<SectionRoute, Integer> { | 29 | public interface SectionRouteRepository extends BaseRepository<SectionRoute, Integer> { |
| 30 | 30 | ||
| 31 | + // 查询最大ID | ||
| 32 | + @Query(value = "SELECT IFNULL(num,0) as maxId from (SELECT MAX(id) as num FROM bsth_c_sectionroute) k" , nativeQuery=true) | ||
| 33 | + public long sectionRouteMaxId(); | ||
| 34 | + | ||
| 35 | + // 查询最大ID | ||
| 36 | + @Query(value = "SELECT IFNULL(num,0) as maxId from (SELECT MAX(sectionroute_code) as num FROM bsth_c_sectionroute where line_code = 601010 and directions = 1 and destroy = 0) k" , nativeQuery=true) | ||
| 37 | + public int sectionRouteCodeMaxId(); | ||
| 38 | + | ||
| 31 | /** | 39 | /** |
| 32 | * @Description :TODO(查询路段信息) | 40 | * @Description :TODO(查询路段信息) |
| 33 | * | 41 | * |
| @@ -162,4 +170,8 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | @@ -162,4 +170,8 @@ public interface SectionRouteRepository extends BaseRepository<SectionRoute, Int | ||
| 162 | @Modifying | 170 | @Modifying |
| 163 | @Query(value="UPDATE bsth_c_sectionroute set is_roade_speed = ?1 where line= ?2 and directions=?3 ",nativeQuery = true) | 171 | @Query(value="UPDATE bsth_c_sectionroute set is_roade_speed = ?1 where line= ?2 and directions=?3 ",nativeQuery = true) |
| 164 | void isRoadSpeedUpd(Integer isR,Integer line,Integer directions); | 172 | void isRoadSpeedUpd(Integer isR,Integer line,Integer directions); |
| 173 | + | ||
| 174 | + @Modifying | ||
| 175 | + @Query(value="update bsth_c_sectionroute set directions = case directions when 1 then 0 when 0 then 1 end where line_code = ?1 ", nativeQuery=true) | ||
| 176 | + public void sectionRouteDir(Integer line); | ||
| 165 | } | 177 | } |
src/main/java/com/bsth/repository/StationRouteRepository.java
| @@ -268,4 +268,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | @@ -268,4 +268,8 @@ public interface StationRouteRepository extends BaseRepository<StationRoute, Int | ||
| 268 | "ORDER BY " + | 268 | "ORDER BY " + |
| 269 | "lineCode,directions,stationRouteCode") | 269 | "lineCode,directions,stationRouteCode") |
| 270 | List<Object[]> findAllLineWithYgc(); | 270 | List<Object[]> findAllLineWithYgc(); |
| 271 | + | ||
| 272 | + @Modifying | ||
| 273 | + @Query(value="update bsth_c_stationroute set directions = case directions when 1 then 0 when 0 then 1 end where line_code = ?1 ", nativeQuery=true) | ||
| 274 | + public void stationRouteDir(Integer line); | ||
| 271 | } | 275 | } |
src/main/java/com/bsth/repository/oil/DlbRepository.java
| @@ -22,8 +22,9 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -22,8 +22,9 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | ||
| 22 | @Modifying | 22 | @Modifying |
| 23 | @Query(value="SELECT a.* FROM bsth_c_dlb a where to_days(?1)-to_days(a.rq)=1" | 23 | @Query(value="SELECT a.* FROM bsth_c_dlb a where to_days(?1)-to_days(a.rq)=1" |
| 24 | + " and jcsx=(select max(b.jcsx) from bsth_c_dlb b where a.nbbm=b.nbbm and " | 24 | + " and jcsx=(select max(b.jcsx) from bsth_c_dlb b where a.nbbm=b.nbbm and " |
| 25 | - + " to_days(?1)-to_days(b.rq)=1 )",nativeQuery=true) | ||
| 26 | - List<Dlb> obtainYlbefore(String rq); | 25 | + + " to_days(?1)-to_days(b.rq)=1 ) and ssgsdm like %?2% and fgsdm like %?3% and " |
| 26 | + + " xlbm like %?4% and nbbm like %?5%",nativeQuery=true) | ||
| 27 | + List<Dlb> obtainYlbefore(String rq,String gsdm,String fgsdm,String xlbm,String nbbm); | ||
| 27 | /** | 28 | /** |
| 28 | * 当天DLB信息 | 29 | * 当天DLB信息 |
| 29 | * @param rq | 30 | * @param rq |
| @@ -31,8 +32,10 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -31,8 +32,10 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | ||
| 31 | */ | 32 | */ |
| 32 | @Transactional | 33 | @Transactional |
| 33 | @Modifying | 34 | @Modifying |
| 34 | - @Query(value="SELECT * FROM bsth_c_dlb where to_days(?)=to_days(rq)",nativeQuery=true) | ||
| 35 | - List<Dlb> obtainDl(String rq); | 35 | + @Query(value="SELECT * FROM bsth_c_dlb where to_days(?1)=to_days(rq) and ssgsdm like %?2% " |
| 36 | + + " and fgsdm like %?3%" | ||
| 37 | + + " and xlbm like %?4% and nbbm like %?5% order by ?6 asc",nativeQuery=true) | ||
| 38 | + List<Dlb> obtainDl(String rq,String gsbm,String fgsdm,String xlbm,String nbbm,String px); | ||
| 36 | 39 | ||
| 37 | @Query(value="select s from Dlb s " | 40 | @Query(value="select s from Dlb s " |
| 38 | + " where to_days(?1)=to_days(s.rq) " | 41 | + " where to_days(?1)=to_days(s.rq) " |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| @@ -151,8 +151,8 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | @@ -151,8 +151,8 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | ||
| 151 | 151 | ||
| 152 | //按照时间段统计 | 152 | //按照时间段统计 |
| 153 | @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH) | 153 | @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH) |
| 154 | - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 and s.bcType not in ('in','out') order by s.xlBm") | ||
| 155 | - List<ScheduleRealInfo> scheduleByDateAndLineTj(String line,String date,String date2); | 154 | + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 and s.bcType not in ('in','out') and gsBm like %?4% and fgsBm like %?5% order by s.xlBm") |
| 155 | + List<ScheduleRealInfo> scheduleByDateAndLineTj(String line,String date,String date2,String gsdm,String fgsdm); | ||
| 156 | 156 | ||
| 157 | //按照时间段统计 | 157 | //按照时间段统计 |
| 158 | @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 and s.bcType not in ('in','out') order by s.xlBm") | 158 | @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 and s.bcType not in ('in','out') order by s.xlBm") |
src/main/java/com/bsth/service/SectionRouteService.java
| @@ -41,4 +41,6 @@ public interface SectionRouteService extends BaseService<SectionRoute, Integer> | @@ -41,4 +41,6 @@ public interface SectionRouteService extends BaseService<SectionRoute, Integer> | ||
| 41 | * @return List<Map<String, Object>> | 41 | * @return List<Map<String, Object>> |
| 42 | */ | 42 | */ |
| 43 | List<Map<String, Object>> findUpSectionRouteCode(Map<String, Object> map); | 43 | List<Map<String, Object>> findUpSectionRouteCode(Map<String, Object> map); |
| 44 | + | ||
| 45 | + Map<String, Object> quoteSection(Map<String, Object> map); | ||
| 44 | } | 46 | } |
src/main/java/com/bsth/service/StationRouteService.java
| @@ -79,5 +79,7 @@ public interface StationRouteService extends BaseService<StationRoute, Integer> | @@ -79,5 +79,7 @@ public interface StationRouteService extends BaseService<StationRoute, Integer> | ||
| 79 | */ | 79 | */ |
| 80 | List<Map<String, Object>> findStationRouteInfo(Map<String, Object> map); | 80 | List<Map<String, Object>> findStationRouteInfo(Map<String, Object> map); |
| 81 | 81 | ||
| 82 | - Map<String, Object> findByMultiLine(String lineIds); | 82 | + Map<String, Object> findByMultiLine(String lineIds); |
| 83 | + | ||
| 84 | + Map<String, Object> updSwitchDir(String lineIds); | ||
| 83 | } | 85 | } |
src/main/java/com/bsth/service/gps/GpsService.java
| @@ -18,4 +18,6 @@ public interface GpsService { | @@ -18,4 +18,6 @@ public interface GpsService { | ||
| 18 | Map<String,Object> findRoadSpeed(String lineCode); | 18 | Map<String,Object> findRoadSpeed(String lineCode); |
| 19 | 19 | ||
| 20 | Map<String,Object> gpsCompletion(long schId); | 20 | Map<String,Object> gpsCompletion(long schId); |
| 21 | + | ||
| 22 | + Map<String,Object> history_v2(String nbbm, long st, long et); | ||
| 21 | } | 23 | } |
src/main/java/com/bsth/service/gps/GpsServiceImpl.java
| @@ -5,11 +5,14 @@ import com.bsth.data.BasicData; | @@ -5,11 +5,14 @@ import com.bsth.data.BasicData; | ||
| 5 | import com.bsth.data.arrival.ArrivalEntity; | 5 | import com.bsth.data.arrival.ArrivalEntity; |
| 6 | import com.bsth.data.gpsdata.GpsEntity; | 6 | import com.bsth.data.gpsdata.GpsEntity; |
| 7 | import com.bsth.data.gpsdata.GpsRealData; | 7 | import com.bsth.data.gpsdata.GpsRealData; |
| 8 | +import com.bsth.data.gpsdata.arrival.utils.GeoUtils; | ||
| 8 | import com.bsth.data.schedule.DayOfSchedule; | 9 | import com.bsth.data.schedule.DayOfSchedule; |
| 9 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 10 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 10 | import com.bsth.repository.CarParkRepository; | 11 | import com.bsth.repository.CarParkRepository; |
| 11 | import com.bsth.repository.StationRepository; | 12 | import com.bsth.repository.StationRepository; |
| 12 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; | 13 | import com.bsth.repository.realcontrol.ScheduleRealInfoRepository; |
| 14 | +import com.bsth.service.gps.entity.HistoryGps_DTO; | ||
| 15 | +import com.bsth.service.gps.entity.Road_DTO; | ||
| 13 | import com.bsth.util.DateUtils; | 16 | import com.bsth.util.DateUtils; |
| 14 | import com.bsth.util.TransGPS; | 17 | import com.bsth.util.TransGPS; |
| 15 | import com.bsth.util.TransGPS.Location; | 18 | import com.bsth.util.TransGPS.Location; |
| @@ -235,6 +238,9 @@ public class GpsServiceImpl implements GpsService { | @@ -235,6 +238,9 @@ public class GpsServiceImpl implements GpsService { | ||
| 235 | bdLoc = TransGPS.bd_encrypt(gdLoc); | 238 | bdLoc = TransGPS.bd_encrypt(gdLoc); |
| 236 | map.put("bd_lon", bdLoc.getLng()); | 239 | map.put("bd_lon", bdLoc.getLng()); |
| 237 | map.put("bd_lat", bdLoc.getLat()); | 240 | map.put("bd_lat", bdLoc.getLat()); |
| 241 | + //原始坐标 | ||
| 242 | + map.put("lon", lon); | ||
| 243 | + map.put("lat", lat); | ||
| 238 | 244 | ||
| 239 | map.put("deviceId", rs.getString("DEVICE_ID")); | 245 | map.put("deviceId", rs.getString("DEVICE_ID")); |
| 240 | map.put("ts", rs.getLong("TS")); | 246 | map.put("ts", rs.getLong("TS")); |
| @@ -510,6 +516,49 @@ public class GpsServiceImpl implements GpsService { | @@ -510,6 +516,49 @@ public class GpsServiceImpl implements GpsService { | ||
| 510 | return rs; | 516 | return rs; |
| 511 | } | 517 | } |
| 512 | 518 | ||
| 519 | + @Override | ||
| 520 | + public Map<String, Object> history_v2(String nbbm, long st, long et) { | ||
| 521 | + Map<String, Object> rs = new HashMap<>(); | ||
| 522 | + | ||
| 523 | + try { | ||
| 524 | + //获取历史gps 数据 | ||
| 525 | + List<HistoryGps_DTO> list = HistoryGps_DTO.craete(history(new String[]{nbbm}, st, et)); | ||
| 526 | + if(list!=null && list.size() > 0){ | ||
| 527 | + //获取路段信息 | ||
| 528 | + String sql = "select ID, ST_AsText(GROAD_VECTOR) as GROAD_VECTOR,ROAD_CODE,ROAD_NAME,SPEED from bsth_c_road where road_code in(select section_code from bsth_c_sectionroute where line_code=? and destroy=0)"; | ||
| 529 | + List<Road_DTO> roads = Road_DTO.craete(jdbcTemplate.queryForList(sql, list.get(0).getLineId())); | ||
| 530 | + | ||
| 531 | + //为GPS数据关联路段信息 | ||
| 532 | + for(HistoryGps_DTO gps : list){ | ||
| 533 | + matchRoadToGps(gps, roads); | ||
| 534 | + } | ||
| 535 | + } | ||
| 536 | + | ||
| 537 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 538 | + rs.put("list", list); | ||
| 539 | + }catch (Exception e){ | ||
| 540 | + logger.error("", e); | ||
| 541 | + rs.put("status", ResponseCode.ERROR); | ||
| 542 | + } | ||
| 543 | + return rs; | ||
| 544 | + } | ||
| 545 | + | ||
| 546 | + private void matchRoadToGps(HistoryGps_DTO gps, List<Road_DTO> roads){ | ||
| 547 | + double min = -1,distance; | ||
| 548 | + Road_DTO nearRoad = null; | ||
| 549 | + for(Road_DTO road : roads){ | ||
| 550 | + distance = GeoUtils.getDistanceFromLine(road.getLineStr(), gps.getPoint()); | ||
| 551 | + | ||
| 552 | + if (min > distance || min == -1) { | ||
| 553 | + min = distance; | ||
| 554 | + nearRoad = road; | ||
| 555 | + } | ||
| 556 | + } | ||
| 557 | + | ||
| 558 | + gps.setRoad(nearRoad); | ||
| 559 | + gps.setRoadMinDistance(min); | ||
| 560 | + } | ||
| 561 | + | ||
| 513 | private void sortGpsList(final Field f, List<GpsEntity> rs) { | 562 | private void sortGpsList(final Field f, List<GpsEntity> rs) { |
| 514 | Collections.sort(rs, new Comparator<GpsEntity>() { | 563 | Collections.sort(rs, new Comparator<GpsEntity>() { |
| 515 | 564 |
src/main/java/com/bsth/service/gps/entity/HistoryGps_DTO.java
0 → 100644
| 1 | +package com.bsth.service.gps.entity; | ||
| 2 | + | ||
| 3 | +import com.alibaba.fastjson.JSON; | ||
| 4 | +import com.alibaba.fastjson.JSONObject; | ||
| 5 | +import com.bsth.data.arrival.ArrivalEntity; | ||
| 6 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| 7 | +import com.vividsolutions.jts.geom.Coordinate; | ||
| 8 | +import com.vividsolutions.jts.geom.GeometryFactory; | ||
| 9 | +import com.vividsolutions.jts.geom.Point; | ||
| 10 | + | ||
| 11 | +import java.util.List; | ||
| 12 | +import java.util.Map; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * 历史GPS DTO | ||
| 16 | + * Created by panzhao on 2017/4/5. | ||
| 17 | + */ | ||
| 18 | +public class HistoryGps_DTO { | ||
| 19 | + | ||
| 20 | + public static List<HistoryGps_DTO> craete(List<Map<String, Object>> mapList){ | ||
| 21 | + List<HistoryGps_DTO> list = JSONObject.parseArray(JSON.toJSONString(mapList), HistoryGps_DTO.class); | ||
| 22 | + | ||
| 23 | + GeometryFactory geometryFactory = new GeometryFactory(); | ||
| 24 | + Point point; | ||
| 25 | + for(HistoryGps_DTO gps : list){ | ||
| 26 | + point = geometryFactory.createPoint(new Coordinate(gps.getLat(), gps.getLon())); | ||
| 27 | + gps.setPoint(point); | ||
| 28 | + } | ||
| 29 | + return list; | ||
| 30 | + } | ||
| 31 | + | ||
| 32 | + private double gcj_lon; | ||
| 33 | + private double gcj_lat; | ||
| 34 | + | ||
| 35 | + private double bd_lon; | ||
| 36 | + private double bd_lat; | ||
| 37 | + | ||
| 38 | + private double lon; | ||
| 39 | + private double lat; | ||
| 40 | + | ||
| 41 | + private String deviceId; | ||
| 42 | + private long ts; | ||
| 43 | + private long timestamp; | ||
| 44 | + private String stopNo; | ||
| 45 | + private float direction; | ||
| 46 | + | ||
| 47 | + private String lineId; | ||
| 48 | + private float speed; | ||
| 49 | + private ArrivalEntity inout_stop_info; | ||
| 50 | + private int inout_stop; | ||
| 51 | + | ||
| 52 | + private String nbbm; | ||
| 53 | + private int state; | ||
| 54 | + private int upDown; | ||
| 55 | + | ||
| 56 | + @JsonIgnore | ||
| 57 | + private Point point; | ||
| 58 | + | ||
| 59 | + /** 路段 */ | ||
| 60 | + private Road_DTO road; | ||
| 61 | + /** 和路段的最短距离 */ | ||
| 62 | + private double roadMinDistance; | ||
| 63 | + | ||
| 64 | + public double getGcj_lon() { | ||
| 65 | + return gcj_lon; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + public void setGcj_lon(double gcj_lon) { | ||
| 69 | + this.gcj_lon = gcj_lon; | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + public double getGcj_lat() { | ||
| 73 | + return gcj_lat; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + public void setGcj_lat(double gcj_lat) { | ||
| 77 | + this.gcj_lat = gcj_lat; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + public double getBd_lon() { | ||
| 81 | + return bd_lon; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public void setBd_lon(double bd_lon) { | ||
| 85 | + this.bd_lon = bd_lon; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + public double getBd_lat() { | ||
| 89 | + return bd_lat; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public void setBd_lat(double bd_lat) { | ||
| 93 | + this.bd_lat = bd_lat; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public String getDeviceId() { | ||
| 97 | + return deviceId; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public void setDeviceId(String deviceId) { | ||
| 101 | + this.deviceId = deviceId; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public long getTs() { | ||
| 105 | + return ts; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public void setTs(long ts) { | ||
| 109 | + this.ts = ts; | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + public long getTimestamp() { | ||
| 113 | + return timestamp; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public void setTimestamp(long timestamp) { | ||
| 117 | + this.timestamp = timestamp; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public String getStopNo() { | ||
| 121 | + return stopNo; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + public void setStopNo(String stopNo) { | ||
| 125 | + this.stopNo = stopNo; | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + public float getDirection() { | ||
| 129 | + return direction; | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + public void setDirection(float direction) { | ||
| 133 | + this.direction = direction; | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + public String getLineId() { | ||
| 137 | + return lineId; | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + public void setLineId(String lineId) { | ||
| 141 | + this.lineId = lineId; | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + public float getSpeed() { | ||
| 145 | + return speed; | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + public void setSpeed(float speed) { | ||
| 149 | + this.speed = speed; | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + public ArrivalEntity getInout_stop_info() { | ||
| 153 | + return inout_stop_info; | ||
| 154 | + } | ||
| 155 | + | ||
| 156 | + public void setInout_stop_info(ArrivalEntity inout_stop_info) { | ||
| 157 | + this.inout_stop_info = inout_stop_info; | ||
| 158 | + } | ||
| 159 | + | ||
| 160 | + public int getInout_stop() { | ||
| 161 | + return inout_stop; | ||
| 162 | + } | ||
| 163 | + | ||
| 164 | + public void setInout_stop(int inout_stop) { | ||
| 165 | + this.inout_stop = inout_stop; | ||
| 166 | + } | ||
| 167 | + | ||
| 168 | + public String getNbbm() { | ||
| 169 | + return nbbm; | ||
| 170 | + } | ||
| 171 | + | ||
| 172 | + public void setNbbm(String nbbm) { | ||
| 173 | + this.nbbm = nbbm; | ||
| 174 | + } | ||
| 175 | + | ||
| 176 | + public int getState() { | ||
| 177 | + return state; | ||
| 178 | + } | ||
| 179 | + | ||
| 180 | + public void setState(int state) { | ||
| 181 | + this.state = state; | ||
| 182 | + } | ||
| 183 | + | ||
| 184 | + public int getUpDown() { | ||
| 185 | + return upDown; | ||
| 186 | + } | ||
| 187 | + | ||
| 188 | + public void setUpDown(int upDown) { | ||
| 189 | + this.upDown = upDown; | ||
| 190 | + } | ||
| 191 | + | ||
| 192 | + public Road_DTO getRoad() { | ||
| 193 | + return road; | ||
| 194 | + } | ||
| 195 | + | ||
| 196 | + public void setRoad(Road_DTO road) { | ||
| 197 | + this.road = road; | ||
| 198 | + } | ||
| 199 | + | ||
| 200 | + public double getRoadMinDistance() { | ||
| 201 | + return roadMinDistance; | ||
| 202 | + } | ||
| 203 | + | ||
| 204 | + public void setRoadMinDistance(double roadMinDistance) { | ||
| 205 | + this.roadMinDistance = roadMinDistance; | ||
| 206 | + } | ||
| 207 | + | ||
| 208 | + public double getLon() { | ||
| 209 | + return lon; | ||
| 210 | + } | ||
| 211 | + | ||
| 212 | + public void setLon(double lon) { | ||
| 213 | + this.lon = lon; | ||
| 214 | + } | ||
| 215 | + | ||
| 216 | + public double getLat() { | ||
| 217 | + return lat; | ||
| 218 | + } | ||
| 219 | + | ||
| 220 | + public void setLat(double lat) { | ||
| 221 | + this.lat = lat; | ||
| 222 | + } | ||
| 223 | + | ||
| 224 | + public Point getPoint() { | ||
| 225 | + return point; | ||
| 226 | + } | ||
| 227 | + | ||
| 228 | + public void setPoint(Point point) { | ||
| 229 | + this.point = point; | ||
| 230 | + } | ||
| 231 | +} |
src/main/java/com/bsth/service/gps/entity/Road_DTO.java
0 → 100644
| 1 | +package com.bsth.service.gps.entity; | ||
| 2 | + | ||
| 3 | +import com.alibaba.fastjson.JSON; | ||
| 4 | +import com.alibaba.fastjson.JSONObject; | ||
| 5 | +import com.fasterxml.jackson.annotation.JsonIgnore; | ||
| 6 | +import com.vividsolutions.jts.geom.Coordinate; | ||
| 7 | +import com.vividsolutions.jts.geom.GeometryFactory; | ||
| 8 | +import com.vividsolutions.jts.geom.LineString; | ||
| 9 | + | ||
| 10 | +import java.util.ArrayList; | ||
| 11 | +import java.util.List; | ||
| 12 | +import java.util.Map; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * 路段信息DTO | ||
| 16 | + * Created by panzhao on 2017/4/5. | ||
| 17 | + */ | ||
| 18 | +public class Road_DTO { | ||
| 19 | + | ||
| 20 | + public static List<Road_DTO> craete(List<Map<String, Object>> mapList){ | ||
| 21 | + List<Road_DTO> list = JSONObject.parseArray(JSON.toJSONString(mapList), Road_DTO.class); | ||
| 22 | + //处理路段坐标 | ||
| 23 | + String polygonStr; | ||
| 24 | + String[] coords; | ||
| 25 | + int i, len; | ||
| 26 | + String[] temps;//1, temps2; | ||
| 27 | + List<Coordinate> cds; | ||
| 28 | + | ||
| 29 | + GeometryFactory geometryFactory = new GeometryFactory(); | ||
| 30 | + for(Road_DTO road : list){ | ||
| 31 | + polygonStr = road.getGROAD_VECTOR(); | ||
| 32 | + coords = polygonStr.substring(11, polygonStr.length() - 1).split(","); | ||
| 33 | + len = coords.length; | ||
| 34 | + | ||
| 35 | + cds = new ArrayList<>(); | ||
| 36 | + //每2个点连一条线 | ||
| 37 | + for(i = 0; i < len; i ++){ | ||
| 38 | + temps = coords[i].split(" "); | ||
| 39 | + cds.add(new Coordinate(Float.parseFloat(temps[1]), Float.parseFloat(temps[0]))); | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + Coordinate[] cdsArray = new Coordinate[cds.size()]; | ||
| 43 | + road.setLineStr(geometryFactory.createLineString(cds.toArray(cdsArray))); | ||
| 44 | + } | ||
| 45 | + return list; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + private long ID; | ||
| 49 | + | ||
| 50 | + @JsonIgnore | ||
| 51 | + private String GROAD_VECTOR; | ||
| 52 | + | ||
| 53 | + private String ROAD_CODE; | ||
| 54 | + | ||
| 55 | + private String ROAD_NAME; | ||
| 56 | + | ||
| 57 | + private double SPEED; | ||
| 58 | + | ||
| 59 | + @JsonIgnore | ||
| 60 | + private LineString lineStr; | ||
| 61 | + | ||
| 62 | + public long getID() { | ||
| 63 | + return ID; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + public void setID(long ID) { | ||
| 67 | + this.ID = ID; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + public String getGROAD_VECTOR() { | ||
| 71 | + return GROAD_VECTOR; | ||
| 72 | + } | ||
| 73 | + | ||
| 74 | + public void setGROAD_VECTOR(String GROAD_VECTOR) { | ||
| 75 | + this.GROAD_VECTOR = GROAD_VECTOR; | ||
| 76 | + } | ||
| 77 | + | ||
| 78 | + public String getROAD_CODE() { | ||
| 79 | + return ROAD_CODE; | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + public void setROAD_CODE(String ROAD_CODE) { | ||
| 83 | + this.ROAD_CODE = ROAD_CODE; | ||
| 84 | + } | ||
| 85 | + | ||
| 86 | + public String getROAD_NAME() { | ||
| 87 | + return ROAD_NAME; | ||
| 88 | + } | ||
| 89 | + | ||
| 90 | + public void setROAD_NAME(String ROAD_NAME) { | ||
| 91 | + this.ROAD_NAME = ROAD_NAME; | ||
| 92 | + } | ||
| 93 | + | ||
| 94 | + public double getSPEED() { | ||
| 95 | + return SPEED; | ||
| 96 | + } | ||
| 97 | + | ||
| 98 | + public void setSPEED(double SPEED) { | ||
| 99 | + this.SPEED = SPEED; | ||
| 100 | + } | ||
| 101 | + | ||
| 102 | + public LineString getLineStr() { | ||
| 103 | + return lineStr; | ||
| 104 | + } | ||
| 105 | + | ||
| 106 | + public void setLineStr(LineString lineStr) { | ||
| 107 | + this.lineStr = lineStr; | ||
| 108 | + } | ||
| 109 | +} |
src/main/java/com/bsth/service/impl/SectionRouteServiceImpl.java
| @@ -8,7 +8,12 @@ import java.util.Map; | @@ -8,7 +8,12 @@ import java.util.Map; | ||
| 8 | import org.springframework.beans.factory.annotation.Autowired; | 8 | import org.springframework.beans.factory.annotation.Autowired; |
| 9 | import org.springframework.stereotype.Service; | 9 | import org.springframework.stereotype.Service; |
| 10 | 10 | ||
| 11 | +import com.bsth.common.ResponseCode; | ||
| 12 | +import com.bsth.entity.Line; | ||
| 13 | +import com.bsth.entity.Section; | ||
| 11 | import com.bsth.entity.SectionRoute; | 14 | import com.bsth.entity.SectionRoute; |
| 15 | +import com.bsth.repository.LineRepository; | ||
| 16 | +import com.bsth.repository.SectionRepository; | ||
| 12 | import com.bsth.repository.SectionRouteRepository; | 17 | import com.bsth.repository.SectionRouteRepository; |
| 13 | import com.bsth.service.SectionRouteService; | 18 | import com.bsth.service.SectionRouteService; |
| 14 | 19 | ||
| @@ -34,6 +39,12 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | @@ -34,6 +39,12 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | ||
| 34 | @Autowired | 39 | @Autowired |
| 35 | SectionRouteRepository repository; | 40 | SectionRouteRepository repository; |
| 36 | 41 | ||
| 42 | + @Autowired | ||
| 43 | + SectionRepository repository2; | ||
| 44 | + | ||
| 45 | + @Autowired | ||
| 46 | + LineRepository lineRepository; | ||
| 47 | + | ||
| 37 | /** | 48 | /** |
| 38 | * @Description :TODO(查询路段信息) | 49 | * @Description :TODO(查询路段信息) |
| 39 | * | 50 | * |
| @@ -43,21 +54,13 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | @@ -43,21 +54,13 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | ||
| 43 | */ | 54 | */ |
| 44 | @Override | 55 | @Override |
| 45 | public List<Map<String, Object>> getSectionRoute(Map<String, Object> map) { | 56 | public List<Map<String, Object>> getSectionRoute(Map<String, Object> map) { |
| 46 | - | ||
| 47 | int lineId = map.get("line.id_eq").equals("") ? 0 : Integer.parseInt(map.get("line.id_eq").toString()); | 57 | int lineId = map.get("line.id_eq").equals("") ? 0 : Integer.parseInt(map.get("line.id_eq").toString()); |
| 48 | - | ||
| 49 | int directions = map.get("directions_eq").equals("") ? 0 : Integer.parseInt(map.get("directions_eq").toString()); | 58 | int directions = map.get("directions_eq").equals("") ? 0 : Integer.parseInt(map.get("directions_eq").toString()); |
| 50 | - | ||
| 51 | List<Object[]> listObjArray = repository.getSectionRoute(lineId, directions); | 59 | List<Object[]> listObjArray = repository.getSectionRoute(lineId, directions); |
| 52 | - | ||
| 53 | List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>(); | 60 | List<Map<String, Object>> resultList = new ArrayList<Map<String,Object>>(); |
| 54 | - | ||
| 55 | if(listObjArray.size()>0) { | 61 | if(listObjArray.size()>0) { |
| 56 | - | ||
| 57 | for(int i = 0 ; i<listObjArray.size() ; i++){ | 62 | for(int i = 0 ; i<listObjArray.size() ; i++){ |
| 58 | - | ||
| 59 | Map<String, Object> tempM = new HashMap<String, Object>(); | 63 | Map<String, Object> tempM = new HashMap<String, Object>(); |
| 60 | - | ||
| 61 | tempM.put("sectionrouteId",listObjArray.get(i)[0]); | 64 | tempM.put("sectionrouteId",listObjArray.get(i)[0]); |
| 62 | tempM.put("sectionrouteLine",listObjArray.get(i)[1]); | 65 | tempM.put("sectionrouteLine",listObjArray.get(i)[1]); |
| 63 | tempM.put("sectionrouteLineCode",listObjArray.get(i)[2]); | 66 | tempM.put("sectionrouteLineCode",listObjArray.get(i)[2]); |
| @@ -81,12 +84,12 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | @@ -81,12 +84,12 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | ||
| 81 | tempM.put("sectionTime",listObjArray.get(i)[20]); | 84 | tempM.put("sectionTime",listObjArray.get(i)[20]); |
| 82 | tempM.put("sectiondbType",listObjArray.get(i)[21]); | 85 | tempM.put("sectiondbType",listObjArray.get(i)[21]); |
| 83 | tempM.put("sectionSpeedLimet",listObjArray.get(i)[22]); | 86 | tempM.put("sectionSpeedLimet",listObjArray.get(i)[22]); |
| 87 | + tempM.put("destroy",listObjArray.get(i)[23]); | ||
| 88 | + tempM.put("versions",listObjArray.get(i)[24]); | ||
| 89 | + tempM.put("descriptions",listObjArray.get(i)[25]); | ||
| 84 | resultList.add(tempM); | 90 | resultList.add(tempM); |
| 85 | - | ||
| 86 | } | 91 | } |
| 87 | - | ||
| 88 | } | 92 | } |
| 89 | - | ||
| 90 | return resultList; | 93 | return resultList; |
| 91 | } | 94 | } |
| 92 | 95 | ||
| @@ -228,5 +231,68 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | @@ -228,5 +231,68 @@ public class SectionRouteServiceImpl extends BaseServiceImpl<SectionRoute, Integ | ||
| 228 | 231 | ||
| 229 | return list; | 232 | return list; |
| 230 | } | 233 | } |
| 234 | + | ||
| 235 | + @Override | ||
| 236 | + public Map<String, Object> quoteSection(Map<String, Object> map) { | ||
| 237 | + Map<String, Object> resultMap = new HashMap<String, Object>(); | ||
| 238 | + try { | ||
| 239 | + Integer line = map.get("lineId") ==null ? null : Integer.parseInt(map.get("lineId").toString()); | ||
| 240 | + Integer dir = map.get("dir")==null ? null : Integer.parseInt(map.get("dir").toString()); | ||
| 241 | + Integer toDir = map.get("toDir")==null ? null : Integer.parseInt(map.get("toDir").toString()); | ||
| 242 | + if(line!=null && dir!=null) { | ||
| 243 | + List<Object[]> list = repository.getSectionRoute(line, dir); | ||
| 244 | + int src = repository.sectionRouteCodeMaxId(); | ||
| 245 | + for(int i = 0 ; i<list.size() ; i++) { | ||
| 246 | + int sectionId = Integer.parseInt(String.valueOf(repository2.sectionMaxId())) + 1 ; | ||
| 247 | + String sectionCode = String.valueOf(sectionId); | ||
| 248 | + String sectionName = list.get(i)[9] == null ? null : list.get(i)[9].toString(); | ||
| 249 | + String crosesRoad = list.get(i)[10] == null ? null : list.get(i)[10].toString(); | ||
| 250 | + String endNode = list.get(i)[11] == null ? null : list.get(i)[11].toString(); | ||
| 251 | + String startNode = list.get(i)[12] == null ? null : list.get(i)[12].toString(); | ||
| 252 | + String middleNode = list.get(i)[13] == null ? null : list.get(i)[13].toString(); | ||
| 253 | + String sectionType = list.get(i)[14] == null ? null : list.get(i)[14].toString(); | ||
| 254 | + String csectionVector = list.get(i)[15] == null ? null : list.get(i)[15].toString(); | ||
| 255 | + String bsectionVector = list.get(i)[16] == null ? null : list.get(i)[16].toString(); | ||
| 256 | + String gsectionVector = list.get(i)[17] == null ? null : list.get(i)[17].toString(); | ||
| 257 | + String roadCoding = list.get(i)[18] == null ? null : list.get(i)[18].toString(); | ||
| 258 | + Double sectionDistance = list.get(i)[19] == null ? null : Double.parseDouble(list.get(i)[19].toString()); | ||
| 259 | + Double sectionTime = list.get(i)[20] == null ? null : Double.parseDouble(list.get(i)[20].toString()); | ||
| 260 | + String dbType = list.get(i)[21] == null ? null : list.get(i)[21].toString(); | ||
| 261 | + Double speedLimit = list.get(i)[22] == null ? null : Double.parseDouble(list.get(i)[22].toString()); | ||
| 262 | + Integer destroy = list.get(i)[23] == null ? null : Integer.parseInt(list.get(i)[23].toString()); | ||
| 263 | + Integer versions = list.get(i)[24] == null ? null : Integer.parseInt(list.get(i)[24].toString()); | ||
| 264 | + String descriptions = list.get(i)[25] == null ? null : list.get(i)[25].toString(); | ||
| 265 | + repository2.systemSave(sectionCode, | ||
| 266 | + sectionName, crosesRoad, endNode, startNode, middleNode, | ||
| 267 | + gsectionVector, bsectionVector, | ||
| 268 | + sectionType, csectionVector, roadCoding, | ||
| 269 | + sectionDistance, sectionTime, dbType, speedLimit, descriptions, versions, sectionId); | ||
| 270 | + int sectionRouteId = Integer.parseInt(String.valueOf(repository.sectionRouteMaxId())) + 1 ; | ||
| 271 | + SectionRoute sr = new SectionRoute(); | ||
| 272 | + Line lineObject = lineRepository.findOne(line); | ||
| 273 | + Section section = repository2.findOne(sectionId); | ||
| 274 | + Integer xh = (src == 0 ? (toDir ==1? (list.size()-i)*10 : (list.size()+i)*10) : toDir==1? (src + (list.size()-i)*10) : (src + (list.size()+i)*10)) ; | ||
| 275 | + sr.setId(sectionRouteId); | ||
| 276 | + sr.setSectionrouteCode(xh); | ||
| 277 | + sr.setLineCode(lineObject.getLineCode()); | ||
| 278 | + sr.setSectionCode(sectionCode); | ||
| 279 | + sr.setDirections(toDir); | ||
| 280 | + sr.setVersions(versions); | ||
| 281 | + sr.setDestroy(destroy); | ||
| 282 | + sr.setLine(lineObject); | ||
| 283 | + sr.setSection(section); | ||
| 284 | + sr.setSectionCode(section.getSectionCode()); | ||
| 285 | + sr.setDescriptions(descriptions); | ||
| 286 | + sr.setIsRoadeSpeed(1); | ||
| 287 | + repository.save(sr); | ||
| 288 | + } | ||
| 289 | + } | ||
| 290 | + resultMap.put("status", ResponseCode.SUCCESS); | ||
| 291 | + } catch (Exception e) { | ||
| 292 | + resultMap.put("status", ResponseCode.ERROR); | ||
| 293 | + logger.error("save erro.", e); | ||
| 294 | + } | ||
| 295 | + return resultMap; | ||
| 296 | + } | ||
| 231 | 297 | ||
| 232 | } | 298 | } |
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
| @@ -17,6 +17,7 @@ import com.bsth.util.db.DBUtils_MS; | @@ -17,6 +17,7 @@ import com.bsth.util.db.DBUtils_MS; | ||
| 17 | import com.google.common.base.Splitter; | 17 | import com.google.common.base.Splitter; |
| 18 | import org.springframework.beans.factory.annotation.Autowired; | 18 | import org.springframework.beans.factory.annotation.Autowired; |
| 19 | import org.springframework.stereotype.Service; | 19 | import org.springframework.stereotype.Service; |
| 20 | +import org.springframework.transaction.annotation.Transactional; | ||
| 20 | 21 | ||
| 21 | import java.io.ByteArrayInputStream; | 22 | import java.io.ByteArrayInputStream; |
| 22 | import java.io.File; | 23 | import java.io.File; |
| @@ -1080,4 +1081,23 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | @@ -1080,4 +1081,23 @@ public class StationRouteServiceImpl extends BaseServiceImpl<StationRoute, Integ | ||
| 1080 | 1081 | ||
| 1081 | return rs; | 1082 | return rs; |
| 1082 | } | 1083 | } |
| 1084 | + | ||
| 1085 | + @Override | ||
| 1086 | + @Transactional | ||
| 1087 | + public Map<String, Object> updSwitchDir(String lineIds) { | ||
| 1088 | + Map<String, Object> rs = new HashMap<>(); | ||
| 1089 | + try{ | ||
| 1090 | + if(lineIds!=null && lineIds !="") { | ||
| 1091 | + Integer lineId = Integer.parseInt(lineIds); | ||
| 1092 | + // 上行站点切换到下行. | ||
| 1093 | + repository.stationRouteDir(lineId); | ||
| 1094 | + routeRepository.sectionRouteDir(lineId); | ||
| 1095 | + } | ||
| 1096 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 1097 | + }catch(Exception e){ | ||
| 1098 | + logger.error("", e); | ||
| 1099 | + rs.put("status", ResponseCode.ERROR); | ||
| 1100 | + } | ||
| 1101 | + return rs; | ||
| 1102 | + } | ||
| 1083 | } | 1103 | } |
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
| @@ -26,7 +26,9 @@ import org.springframework.stereotype.Service; | @@ -26,7 +26,9 @@ import org.springframework.stereotype.Service; | ||
| 26 | import com.alibaba.fastjson.JSONArray; | 26 | import com.alibaba.fastjson.JSONArray; |
| 27 | import com.alibaba.fastjson.JSONObject; | 27 | import com.alibaba.fastjson.JSONObject; |
| 28 | import com.bsth.common.ResponseCode; | 28 | import com.bsth.common.ResponseCode; |
| 29 | +import com.bsth.data.BasicData; | ||
| 29 | import com.bsth.entity.Cars; | 30 | import com.bsth.entity.Cars; |
| 31 | +import com.bsth.entity.Line; | ||
| 30 | import com.bsth.entity.oil.Cdl; | 32 | import com.bsth.entity.oil.Cdl; |
| 31 | import com.bsth.entity.oil.Cyl; | 33 | import com.bsth.entity.oil.Cyl; |
| 32 | import com.bsth.entity.oil.Dlb; | 34 | import com.bsth.entity.oil.Dlb; |
| @@ -97,13 +99,13 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -97,13 +99,13 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 97 | // TODO Auto-generated method stub | 99 | // TODO Auto-generated method stub |
| 98 | Map<String, Object> newMap=new HashMap<String,Object>(); | 100 | Map<String, Object> newMap=new HashMap<String,Object>(); |
| 99 | //当天DLB信息 | 101 | //当天DLB信息 |
| 100 | - List<Dlb> dlList=repository.obtainDl(rq); | 102 | + List<Dlb> dlList=repository.obtainDl(rq, gsbm, "", line, "", "nbbm"); |
| 101 | //当天YLXXB信息 | 103 | //当天YLXXB信息 |
| 102 | List<Ylxxb> ylxxList=ylxxbRepository.obtainYlxx(rq,1,gsbm); | 104 | List<Ylxxb> ylxxList=ylxxbRepository.obtainYlxx(rq,1,gsbm); |
| 103 | //当天加电信息表 | 105 | //当天加电信息表 |
| 104 | List<Jdl> jdlList=jdlRepository.JdlList(rq); | 106 | List<Jdl> jdlList=jdlRepository.JdlList(rq); |
| 105 | //前一天所有车辆最后进场班次信息 | 107 | //前一天所有车辆最后进场班次信息 |
| 106 | - List<Dlb> dlListBe=repository.obtainYlbefore(rq); | 108 | + List<Dlb> dlListBe=repository.obtainYlbefore(rq, "", "", "", ""); |
| 107 | List<Cdl> cdyList=cdlRepository.obtainCdl(); | 109 | List<Cdl> cdyList=cdlRepository.obtainCdl(); |
| 108 | //从排班表中计算出行驶的总里程 | 110 | //从排班表中计算出行驶的总里程 |
| 109 | List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList(line,rq,"","","",""); | 111 | List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList(line,rq,"","","",""); |
| @@ -258,25 +260,48 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -258,25 +260,48 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 258 | @Override | 260 | @Override |
| 259 | public Map<String, Object> checkDl(Map<String, Object> map) { | 261 | public Map<String, Object> checkDl(Map<String, Object> map) { |
| 260 | Map<String, Object> newMap=new HashMap<String,Object>(); | 262 | Map<String, Object> newMap=new HashMap<String,Object>(); |
| 261 | - String xlbm=map.get("xlbm_eq").toString(); | ||
| 262 | - String gsbm=""; | ||
| 263 | - if(map.get("ssgsdm_like")!=null){ | ||
| 264 | - gsbm=map.get("ssgsdm_like").toString(); | ||
| 265 | - } | 263 | +// String xlbm=""; |
| 264 | +// if(map.get("xlbm_like")!=null){ | ||
| 265 | +// xlbm=map.get("xlbm_like").toString(); | ||
| 266 | +// } | ||
| 266 | // TODO Auto-generated method stub | 267 | // TODO Auto-generated method stub |
| 268 | + | ||
| 269 | + List<Cars> carsList = carsRepository.findCars(); | ||
| 270 | + Map<String, String> carsMap = new HashMap<String, String>(); | ||
| 271 | + for (int i = 0; i < carsList.size(); i++) { | ||
| 272 | + Cars c = carsList.get(i); | ||
| 273 | + carsMap.put(c.getInsideCode(), c.getBrancheCompanyCode()==null?"":c.getBrancheCompanyCode()); | ||
| 274 | + } | ||
| 275 | + | ||
| 267 | try{ | 276 | try{ |
| 268 | //获取车辆存油信息 | 277 | //获取车辆存油信息 |
| 269 | -// List<Cyl> cylList=cylRepository.findAll(new CustomerSpecs<Cyl>(newMap)); | 278 | + |
| 270 | String rq=map.get("rq").toString(); | 279 | String rq=map.get("rq").toString(); |
| 271 | - List<Dlb> dlbList=repository.obtainDl(rq); | ||
| 272 | - List<Ylxxb> ylxxbList=ylxxbRepository.obtainYlxx(rq,1,gsbm); | ||
| 273 | - //当天加电信息表 | ||
| 274 | - List<Jdl> jdlList=jdlRepository.JdlList(rq); | 280 | + String xlbm=""; |
| 281 | + if(map.get("xlbm_like")!=null){ | ||
| 282 | + xlbm= map.get("xlbm_like").toString().trim(); | ||
| 283 | + } | ||
| 284 | + String gsbm=""; | ||
| 285 | + if(map.get("ssgsdm_like")!=null){ | ||
| 286 | + gsbm=map.get("ssgsdm_like").toString(); | ||
| 287 | + } | ||
| 288 | + String fgsbm=""; | ||
| 289 | + if(map.get("fgsdm_like")!=null){ | ||
| 290 | + fgsbm=map.get("fgsdm_like").toString(); | ||
| 291 | + } | ||
| 292 | + String nbbm=""; | ||
| 293 | + if(map.get("nbbm_eq")!=null){ | ||
| 294 | + nbbm=map.get("nbbm_eq").toString(); | ||
| 295 | + } | ||
| 296 | + List<Dlb> ylListBe=repository.obtainYlbefore(rq, gsbm, "", xlbm, nbbm); | ||
| 297 | +// List<Cdl> cylList=cdlRepository.obtainCdl(nbbm, gsbm); | ||
| 298 | + List<Dlb> ylbList=repository.obtainDl(rq,gsbm,fgsbm,xlbm,nbbm,"nbbm"); | ||
| 299 | + List<Ylxxb> ylxxbList=ylxxbRepository.obtainYlxx(rq,0,gsbm); | ||
| 275 | for (int i = 0; i < ylxxbList.size(); i++) { | 300 | for (int i = 0; i < ylxxbList.size(); i++) { |
| 276 | Boolean fage=true; | 301 | Boolean fage=true; |
| 277 | Ylxxb y1=ylxxbList.get(i); | 302 | Ylxxb y1=ylxxbList.get(i); |
| 278 | - for(int y=0;y<dlbList.size();y++){ | ||
| 279 | - Dlb y2=dlbList.get(y); | 303 | + for(int y=0;y<ylbList.size();y++){ |
| 304 | + Dlb y2=ylbList.get(y); | ||
| 280 | if(y1.getNbbm().equals(y2.getNbbm())){ | 305 | if(y1.getNbbm().equals(y2.getNbbm())){ |
| 281 | fage=false; | 306 | fage=false; |
| 282 | break; | 307 | break; |
| @@ -290,37 +315,54 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -290,37 +315,54 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 290 | t.setJsy(y1.getJsy()); | 315 | t.setJsy(y1.getJsy()); |
| 291 | t.setCdl(y1.getJzl()); | 316 | t.setCdl(y1.getJzl()); |
| 292 | t.setSsgsdm(y1.getGsdm()); | 317 | t.setSsgsdm(y1.getGsdm()); |
| 293 | - t.setXlbm(xlbm); | ||
| 294 | - repository.save(t); | ||
| 295 | - } | ||
| 296 | - } | ||
| 297 | - | ||
| 298 | - for (int i = 0; i < jdlList.size(); i++) { | ||
| 299 | - Boolean fage=true; | ||
| 300 | - Jdl y1=jdlList.get(i); | ||
| 301 | - for(int y=0;y<dlbList.size();y++){ | ||
| 302 | - Dlb y2=dlbList.get(y); | ||
| 303 | - if(y1.getNbbm().equals(y2.getNbbm())){ | ||
| 304 | - fage=false; | ||
| 305 | - break; | 318 | + String fgsdm=""; |
| 319 | + if(null!=carsMap.get(y1.getNbbm())){ | ||
| 320 | + fgsdm=carsMap.get(y1.getNbbm()); | ||
| 321 | + } | ||
| 322 | + t.setFgsdm(fgsdm); | ||
| 323 | + t.setJcsx(1); | ||
| 324 | + Line line= BasicData.nbbm2LineMap.get(y1.getNbbm()); | ||
| 325 | + if(null !=line){ | ||
| 326 | + t.setXlbm(line.getLineCode()); | ||
| 327 | + }else{ | ||
| 328 | + t.setXlbm(""); | ||
| 329 | + } | ||
| 330 | + boolean status=true; | ||
| 331 | + for (int j = 0; j < ylListBe.size(); j++) { | ||
| 332 | + Dlb b=ylListBe.get(j); | ||
| 333 | + if(b.getNbbm().equals(y1.getNbbm())){ | ||
| 334 | + t.setCzcd(b.getJzcd()); | ||
| 335 | + status=false; | ||
| 336 | + break; | ||
| 337 | + } | ||
| 338 | + } | ||
| 339 | + /*if(status){ | ||
| 340 | + for (int j = 0; j < cylList.size(); j++) { | ||
| 341 | + Cyl c=cylList.get(j); | ||
| 342 | + if(c.getNbbm().equals(y1.getNbbm())){ | ||
| 343 | + t.setCzyl(c.getCyl()); | ||
| 344 | + cyl=c; | ||
| 345 | + status=false; | ||
| 346 | + break; | ||
| 347 | + } | ||
| 348 | + } | ||
| 349 | + }*/ | ||
| 350 | + if(status){ | ||
| 351 | + t.setCzcd(0.0); | ||
| 352 | + } | ||
| 353 | +// double jzyl=Arith.add(t.getJzl(), t.getCzyl()); | ||
| 354 | + t.setJzcd(100.0); | ||
| 355 | + t.setHd(0.0); | ||
| 356 | + if(fgsdm.equals(fgsbm)){ | ||
| 357 | + repository.save(t); | ||
| 306 | } | 358 | } |
| 307 | - } | ||
| 308 | - | ||
| 309 | - if(fage){ | ||
| 310 | - Dlb t=new Dlb(); | ||
| 311 | - t.setNbbm(y1.getNbbm()); | ||
| 312 | - t.setRq(y1.getRq()); | ||
| 313 | -// t.setJsy(y1.getJsy()); | ||
| 314 | - t.setCdl(y1.getJdl()); | ||
| 315 | - t.setSsgsdm(y1.getGsBm()); | ||
| 316 | - t.setXlbm(xlbm); | ||
| 317 | - repository.save(t); | ||
| 318 | } | 359 | } |
| 319 | } | 360 | } |
| 320 | newMap.put("status", ResponseCode.SUCCESS); | 361 | newMap.put("status", ResponseCode.SUCCESS); |
| 321 | }catch(Exception e){ | 362 | }catch(Exception e){ |
| 322 | newMap.put("status", ResponseCode.ERROR); | 363 | newMap.put("status", ResponseCode.ERROR); |
| 323 | logger.error("save erro.", e); | 364 | logger.error("save erro.", e); |
| 365 | + throw e; | ||
| 324 | } | 366 | } |
| 325 | 367 | ||
| 326 | return newMap; | 368 | return newMap; |
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
| @@ -701,7 +701,10 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -701,7 +701,10 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 701 | t.setJsy(y1.getJsy()); | 701 | t.setJsy(y1.getJsy()); |
| 702 | t.setJzl(y1.getJzl()); | 702 | t.setJzl(y1.getJzl()); |
| 703 | t.setSsgsdm(y1.getGsdm()); | 703 | t.setSsgsdm(y1.getGsdm()); |
| 704 | - String fgsdm=carsMap.get(y1.getNbbm()); | 704 | + String fgsdm=""; |
| 705 | + if(null !=carsMap.get(y1.getNbbm())){ | ||
| 706 | + fgsdm=carsMap.get(y1.getNbbm()); | ||
| 707 | + } | ||
| 705 | t.setFgsdm(fgsdm); | 708 | t.setFgsdm(fgsdm); |
| 706 | t.setJcsx(1); | 709 | t.setJcsx(1); |
| 707 | Line line= BasicData.nbbm2LineMap.get(y1.getNbbm()); | 710 | Line line= BasicData.nbbm2LineMap.get(y1.getNbbm()); |
| @@ -737,7 +740,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -737,7 +740,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 737 | // double jzyl=Arith.add(t.getJzl(), t.getCzyl()); | 740 | // double jzyl=Arith.add(t.getJzl(), t.getCzyl()); |
| 738 | t.setJzyl(Arith.add(t.getJzl(), t.getCzyl())); | 741 | t.setJzyl(Arith.add(t.getJzl(), t.getCzyl())); |
| 739 | t.setYh(0.0); | 742 | t.setYh(0.0); |
| 740 | - if(fgsdm.equals("fgsbm")){ | 743 | + if(fgsdm.equals(fgsbm)){ |
| 741 | repository.save(t); | 744 | repository.save(t); |
| 742 | if(null!=cyl){ | 745 | if(null!=cyl){ |
| 743 | cyl.setCyl(Arith.add(t.getJzl(), t.getCzyl())); | 746 | cyl.setCyl(Arith.add(t.getJzl(), t.getCzyl())); |
src/main/java/com/bsth/service/realcontrol/LineConfigService.java
| @@ -13,11 +13,13 @@ public interface LineConfigService extends BaseService<LineConfig, Integer>{ | @@ -13,11 +13,13 @@ public interface LineConfigService extends BaseService<LineConfig, Integer>{ | ||
| 13 | 13 | ||
| 14 | Map<String, Object> editStartOptTime(String time, String lineCode); | 14 | Map<String, Object> editStartOptTime(String time, String lineCode); |
| 15 | 15 | ||
| 16 | - Map<String, Object> editOutTimeType(String lineCode, int type); | 16 | + Map<String, Object> editOutTimeType(String lineCode, int type, String parkCode, String stationCode); |
| 17 | 17 | ||
| 18 | LineConfig getByLineCode(String lineCode); | 18 | LineConfig getByLineCode(String lineCode); |
| 19 | 19 | ||
| 20 | Map<String,Object> enableInParkForSource(String lineCode, int enable); | 20 | Map<String,Object> enableInParkForSource(String lineCode, int enable); |
| 21 | 21 | ||
| 22 | Map<String,Object> bufferTimeDiff(String lineCode, String field, String value); | 22 | Map<String,Object> bufferTimeDiff(String lineCode, String field, String value); |
| 23 | + | ||
| 24 | + Map<String,Object> yjtkSet(Map<String, String> map); | ||
| 23 | } | 25 | } |
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
| @@ -112,7 +112,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | @@ -112,7 +112,7 @@ public interface ScheduleRealInfoService extends BaseService<ScheduleRealInfo, L | ||
| 112 | 112 | ||
| 113 | List<Map<String,Object>> statisticsDaily(String line, String date, String xlName, String type); | 113 | List<Map<String,Object>> statisticsDaily(String line, String date, String xlName, String type); |
| 114 | 114 | ||
| 115 | - List<Map<String,Object>> statisticsDailyTj(String line, String date,String date2, String xlName, String type); | 115 | + List<Map<String,Object>> statisticsDailyTj(String gsdm,String fgsdm,String line, String date,String date2, String xlName, String type); |
| 116 | 116 | ||
| 117 | //List<Object> scheduleDaily(String line,String date); | 117 | //List<Object> scheduleDaily(String line,String date); |
| 118 | 118 |
src/main/java/com/bsth/service/realcontrol/impl/LineConfigServiceImpl.java
| @@ -75,17 +75,20 @@ public class LineConfigServiceImpl extends BaseServiceImpl<LineConfig, Integer> | @@ -75,17 +75,20 @@ public class LineConfigServiceImpl extends BaseServiceImpl<LineConfig, Integer> | ||
| 75 | } | 75 | } |
| 76 | 76 | ||
| 77 | @Override | 77 | @Override |
| 78 | - public Map<String, Object> editOutTimeType(String lineCode, int type) { | 78 | + public Map<String, Object> editOutTimeType(String lineCode, int type, String parkCode, String stationCode) { |
| 79 | Map<String, Object> rs = new HashMap<>(); | 79 | Map<String, Object> rs = new HashMap<>(); |
| 80 | try { | 80 | try { |
| 81 | LineConfig conf = lineConfigData.get(lineCode); | 81 | LineConfig conf = lineConfigData.get(lineCode); |
| 82 | 82 | ||
| 83 | conf.setOutConfig(type); | 83 | conf.setOutConfig(type); |
| 84 | - //conf.setInConfig(type); | 84 | + if(type == 2){ |
| 85 | + conf.setTwinsPark(parkCode); | ||
| 86 | + conf.setTwinsStation(stationCode); | ||
| 87 | + } | ||
| 85 | lineConfigData.set(conf); | 88 | lineConfigData.set(conf); |
| 86 | 89 | ||
| 87 | rs.put("status", ResponseCode.SUCCESS); | 90 | rs.put("status", ResponseCode.SUCCESS); |
| 88 | - rs.put("type", type); | 91 | + rs.put("conf", conf); |
| 89 | } catch (Exception e) { | 92 | } catch (Exception e) { |
| 90 | rs.put("status", ResponseCode.ERROR); | 93 | rs.put("status", ResponseCode.ERROR); |
| 91 | rs.put("msg", e.getMessage()); | 94 | rs.put("msg", e.getMessage()); |
| @@ -140,4 +143,40 @@ public class LineConfigServiceImpl extends BaseServiceImpl<LineConfig, Integer> | @@ -140,4 +143,40 @@ public class LineConfigServiceImpl extends BaseServiceImpl<LineConfig, Integer> | ||
| 140 | } | 143 | } |
| 141 | return rs; | 144 | return rs; |
| 142 | } | 145 | } |
| 146 | + | ||
| 147 | + @Override | ||
| 148 | + public Map<String, Object> yjtkSet(Map<String, String> map) { | ||
| 149 | + String lineCode = map.get("lineCode").toString(); | ||
| 150 | + int enableYjtk = Integer.parseInt(map.get("enableYjtk").toString()); | ||
| 151 | + | ||
| 152 | + Map<String, Object> rs = new HashMap<>(); | ||
| 153 | + try { | ||
| 154 | + LineConfig conf = lineConfigData.get(lineCode); | ||
| 155 | + | ||
| 156 | + if(enableYjtk == 1){ | ||
| 157 | + String yjtkStart = map.containsKey("yjtkStart") ? map.get("yjtkStart").toString() : "00:00"; | ||
| 158 | + String yjtkEnd = map.containsKey("yjtkEnd") ? map.get("yjtkEnd").toString() : "23:59"; | ||
| 159 | + int upStopMinute = Integer.parseInt(map.get("upStopMinute").toString()); | ||
| 160 | + int downStopMinute = Integer.parseInt(map.get("downStopMinute").toString()); | ||
| 161 | + | ||
| 162 | + conf.setEnableYjtk(true); | ||
| 163 | + conf.setYjtkStart(yjtkStart); | ||
| 164 | + conf.setYjtkEnd(yjtkEnd); | ||
| 165 | + conf.setUpStopMinute(upStopMinute); | ||
| 166 | + conf.setDownStopMinute(downStopMinute); | ||
| 167 | + } | ||
| 168 | + else | ||
| 169 | + conf.setEnableYjtk(false); | ||
| 170 | + | ||
| 171 | + lineConfigData.set(conf); | ||
| 172 | + | ||
| 173 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 174 | + rs.put("conf", conf); | ||
| 175 | + } catch (Exception e) { | ||
| 176 | + rs.put("status", ResponseCode.ERROR); | ||
| 177 | + rs.put("msg", e.getMessage()); | ||
| 178 | + logger.error("", e); | ||
| 179 | + } | ||
| 180 | + return rs; | ||
| 181 | + } | ||
| 143 | } | 182 | } |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -1576,6 +1576,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1576,6 +1576,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1576 | remarks += "(烂班)"; | 1576 | remarks += "(烂班)"; |
| 1577 | s.setRemarks(remarks); | 1577 | s.setRemarks(remarks); |
| 1578 | } | 1578 | } |
| 1579 | + | ||
| 1579 | listSchedule.add(s); | 1580 | listSchedule.add(s); |
| 1580 | //计算营运里程,空驶里程 | 1581 | //计算营运里程,空驶里程 |
| 1581 | if (!childTaskPlans.isEmpty()) { | 1582 | if (!childTaskPlans.isEmpty()) { |
| @@ -1600,657 +1601,110 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1600,657 +1601,110 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1600 | t.setAdjustExps("子"); | 1601 | t.setAdjustExps("子"); |
| 1601 | listSchedule.add(t); | 1602 | listSchedule.add(t); |
| 1602 | } | 1603 | } |
| 1603 | - /* String sqlPc = "select * from bsth_c_s_child_task where schedule=" + s.getId() + " order by start_date "; | ||
| 1604 | - List<ScheduleRealInfo> lists = jdbcTemplate.query(sqlPc, | ||
| 1605 | - new RowMapper<ScheduleRealInfo>() { | ||
| 1606 | - @Override | ||
| 1607 | - public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 1608 | - ScheduleRealInfo t = new ScheduleRealInfo(); | ||
| 1609 | - if (rs.getInt("destroy") == 0) { | ||
| 1610 | - t.setFcsjActual(rs.getString("start_date")); | ||
| 1611 | - t.setZdsjActual(rs.getString("end_date")); | ||
| 1612 | - t.setJhlc(rs.getDouble("mileage")); | ||
| 1613 | - } else { | ||
| 1614 | - t.setFcsjActual(""); | ||
| 1615 | - t.setZdsjActual(""); | ||
| 1616 | - t.setJhlc(0.0); | ||
| 1617 | - } | ||
| 1618 | - t.setQdzName(rs.getString("start_station_name")); | ||
| 1619 | - t.setZdzName(rs.getString("end_station_name")); | ||
| 1620 | - t.setRemarks(rs.getString("remarks")); | ||
| 1621 | - t.setAdjustExps("子"); | ||
| 1622 | - return t; | ||
| 1623 | - } | ||
| 1624 | - }); | ||
| 1625 | - for (int j = 0; j < lists.size(); j++) { | ||
| 1626 | - ScheduleRealInfo t = lists.get(j); | ||
| 1627 | - listSchedule.add(t); | ||
| 1628 | - }*/ | ||
| 1629 | - } | ||
| 1630 | - } | ||
| 1631 | - | ||
| 1632 | - return listSchedule; | ||
| 1633 | - } | ||
| 1634 | - | ||
| 1635 | - @Override | ||
| 1636 | - public Map<String, Object> removeChildTask(Long taskId) { | ||
| 1637 | - Map<String, Object> rs = new HashMap<>(); | ||
| 1638 | - ChildTaskPlan chTask = cTaskPlanRepository.findOne(taskId); | ||
| 1639 | - | ||
| 1640 | - ScheduleRealInfo sch = dayOfSchedule.get(chTask.getSchedule().getId()); | ||
| 1641 | - try { | ||
| 1642 | - | ||
| 1643 | - sch.getcTasks().remove(chTask); | ||
| 1644 | - scheduleRealInfoRepository.save(sch); | ||
| 1645 | - rs.put("status", ResponseCode.SUCCESS); | ||
| 1646 | - } catch (Exception e) { | ||
| 1647 | - logger.error("", e); | ||
| 1648 | - rs.put("status", ResponseCode.ERROR); | ||
| 1649 | - } | ||
| 1650 | - return rs; | ||
| 1651 | - } | ||
| 1652 | - @Override | ||
| 1653 | - public List<Map<String, Object>> statisticsDaily(String line, String date, | ||
| 1654 | - String xlName, String type) { | ||
| 1655 | - List<Map<String, Object>> lMap= new ArrayList<Map<String, Object>>(); | ||
| 1656 | - List<ScheduleRealInfo> lists = scheduleRealInfoRepository.scheduleByDateAndLine2(line, date); | ||
| 1657 | - Map<String, Object> map = new HashMap<String, Object>(); | ||
| 1658 | - map.put("xlName", xlName); | ||
| 1659 | - map.put("jhlc", culateService.culateJhgl(lists)); | ||
| 1660 | - map.put("sjgl", Arith.add(culateService.culateSjgl(lists),culateService.culateLjgl(lists))); | ||
| 1661 | - map.put("ssgl", culateService.culateLbgl(lists)); | ||
| 1662 | - map.put("ssgl_lz", culateService.culateCJLC(lists, "路阻")); | ||
| 1663 | - map.put("ssgl_dm", culateService.culateCJLC(lists, "吊慢")); | ||
| 1664 | - map.put("ssgl_gz", culateService.culateCJLC(lists, "故障")); | ||
| 1665 | - map.put("ssgl_jf", culateService.culateCJLC(lists, "纠纷")); | ||
| 1666 | - map.put("ssgl_zs", culateService.culateCJLC(lists, "肇事")); | ||
| 1667 | - map.put("ssgl_qr", culateService.culateCJLC(lists, "缺人")); | ||
| 1668 | - map.put("ssgl_qc", culateService.culateCJLC(lists, "缺车")); | ||
| 1669 | - map.put("ssgl_kx", culateService.culateCJLC(lists, "客稀")); | ||
| 1670 | - map.put("ssgl_qh", culateService.culateCJLC(lists, "气候")); | ||
| 1671 | - map.put("ssgl_yw", culateService.culateCJLC(lists, "援外")); | ||
| 1672 | - map.put("ssgl_other", culateService.culateCJLC(lists, "其他")); | ||
| 1673 | - map.put("ssbc", culateService.culateLbbc(lists)); | ||
| 1674 | - map.put("ljgl", culateService.culateLjgl(lists)); | ||
| 1675 | - map.put("jhbc", culateService.culateJhbc(lists,"")); | ||
| 1676 | - map.put("jhbc_m", culateService.culateJhbc(lists, "zgf")); | ||
| 1677 | - map.put("jhbc_a", culateService.culateJhbc(lists, "wgf")); | ||
| 1678 | - map.put("sjbc", culateService.culateSjbc(lists,"")); | ||
| 1679 | - map.put("sjbc_m", culateService.culateSjbc(lists,"zgf")); | ||
| 1680 | - map.put("sjbc_a", culateService.culateSjbc(lists,"wgf")); | ||
| 1681 | - map.put("ljbc", culateService.culateLjbc(lists,"")); | ||
| 1682 | - map.put("ljbc_m", culateService.culateLjbc(lists,"zgf")); | ||
| 1683 | - map.put("ljbc_a", culateService.culateLjbc(lists,"wgf")); | ||
| 1684 | - map.put("fzbc", culateService.culateFzbc(lists, "")); | ||
| 1685 | - map.put("fzbc_m", culateService.culateFzbc(lists, "zgf")); | ||
| 1686 | - map.put("fzbc_a", culateService.culateFzbc(lists, "wgf")); | ||
| 1687 | - map.put("dtbc", 0); | ||
| 1688 | - map.put("dtbc_m", 0); | ||
| 1689 | - map.put("dtbc_a", 0); | ||
| 1690 | - map.put("djg", 0); | ||
| 1691 | - map.put("djg_m", 0); | ||
| 1692 | - map.put("djg_a", 0); | ||
| 1693 | - map.put("djg_time", 0); | ||
| 1694 | - lMap.add(map); | ||
| 1695 | - return lMap; | ||
| 1696 | - } | ||
| 1697 | - | ||
| 1698 | - /* @Override | ||
| 1699 | - public List<Map<String, Object>> statisticsDaily(String line, String date, | ||
| 1700 | - String xlName, String type) { | ||
| 1701 | - List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | ||
| 1702 | - if (date.length() == 10) | ||
| 1703 | - list = scheduleRealInfoRepository.scheduleByDateAndLine2(line, date); | ||
| 1704 | - else if (date.length() == 7) | ||
| 1705 | - list = scheduleRealInfoRepository.scheduleByDateAndLine3(line, date); | ||
| 1706 | - | ||
| 1707 | - | ||
| 1708 | - List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); | ||
| 1709 | - DecimalFormat format = new DecimalFormat("0.00"); | ||
| 1710 | - double jhlc = 0, tempJhlc = 0, childMileage = 0,jhlcOrig=0; | ||
| 1711 | - float sjgl = 0f, ssgl = 0f, ssgl_lz = 0f, ssgl_dm = 0f, ssgl_gz = 0f, ssgl_jf = 0f, ssgl_zs = 0f, ssgl_qr = 0f, ssgl_qc = 0f, ssgl_kx = 0f, ssgl_qh = 0f, ssgl_yw = 0f, ssgl_other = 0f, ljgl = 0f; | ||
| 1712 | - //班次 | ||
| 1713 | - int ssbc = 0, ssbc_lz = 0, ssbc_dm = 0, ssbc_gz = 0, ssbc_jf = 0, ssbc_zs = 0, ssbc_qr = 0, ssbc_qc = 0, ssbc_kx = 0, ssbc_qh = 0, ssbc_yw = 0, ssbc_other = 0; | ||
| 1714 | - int sj_0 = 6 * 60 + 31, sj_1 = 8 * 60 + 30, sj_2 = 16 * 60 + 1, sj_3 = 18 * 60; | ||
| 1715 | - int jhbc = 0, jhbc_m = 0, jhbc_a = 0; | ||
| 1716 | - int sjbc = 0, sjbc_m = 0, sjbc_a = 0; | ||
| 1717 | - int ljbc = 0, ljbc_m = 0, ljbc_a = 0; | ||
| 1718 | - int fzbc = 0, fzbc_m = 0, fzbc_a = 0; | ||
| 1719 | - int dtbc = 0, dtbc_m = 0, dtbc_a = 0; | ||
| 1720 | - int djg = 0, djg_m = 0, djg_a = 0, djg_time = 0; | ||
| 1721 | - | ||
| 1722 | - double jhlcZ = 0, tempJhlcZ = 0, childMileageZ = 0; | ||
| 1723 | - float sjglZ = 0f, ssglZ = 0f, ssgl_lzZ = 0f, ssgl_dmZ = 0f, | ||
| 1724 | - ssgl_gzZ = 0f, ssgl_jfZ = 0f, ssgl_zsZ = 0f, ssgl_qrZ = 0f, ssgl_qcZ = 0f, | ||
| 1725 | - ssgl_kxZ = 0f, ssgl_qhZ = 0f, ssgl_ywZ = 0f, ssgl_otherZ = 0f, ljglZ = 0f; | ||
| 1726 | - //班次 | ||
| 1727 | - int ssbcZ = 0, ssbc_lzZ = 0, ssbc_dmZ = 0, ssbc_gzZ = 0, ssbc_jfZ = 0, ssbc_zsZ = 0, ssbc_qrZ = 0, ssbc_qcZ = 0, ssbc_kxZ = 0, ssbc_qhZ = 0, ssbc_ywZ = 0, ssbc_otherZ = 0; | ||
| 1728 | - int jhbcZ = 0, jhbc_mZ = 0, jhbc_aZ = 0; | ||
| 1729 | - int sjbcZ = 0, sjbc_mZ = 0, sjbc_aZ = 0; | ||
| 1730 | - int ljbcZ = 0, ljbc_mZ = 0, ljbc_aZ = 0; | ||
| 1731 | - int fzbcZ = 0, fzbc_mZ = 0, fzbc_aZ = 0; | ||
| 1732 | - int dtbcZ = 0, dtbc_mZ = 0, dtbc_aZ = 0; | ||
| 1733 | - int djgZ = 0, djg_mZ = 0, djg_aZ = 0, djg_timeZ = 0; | ||
| 1734 | - Map<String, Object> map = null; | ||
| 1735 | - | ||
| 1736 | - double xgssgl=0,xgljgl=0,lj=0,cj=0; | ||
| 1737 | - for (int i = 0; i < list.size(); i++) { | ||
| 1738 | - ScheduleRealInfo scheduleRealInfo = list.get(i); | ||
| 1739 | - | ||
| 1740 | - if (scheduleRealInfo != null) { | ||
| 1741 | - Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); | ||
| 1742 | - //计算实际里程,少驶里程,计划里程=实际里程+少驶里程 | ||
| 1743 | - if(!scheduleRealInfo.isSflj()){ | ||
| 1744 | - jhlc += tempJhlc; | ||
| 1745 | - jhlcZ += tempJhlc; | ||
| 1746 | - } | ||
| 1747 | - if (childTaskPlans.isEmpty()) { | ||
| 1748 | - tempJhlc = scheduleRealInfo.getJhlc() == null ? 0 : scheduleRealInfo.getJhlc(); | ||
| 1749 | - jhlcOrig = scheduleRealInfo.getJhlcOrig() == null ? 0 : scheduleRealInfo.getJhlcOrig(); | ||
| 1750 | - | ||
| 1751 | - if(jhlcOrig-tempJhlc>0){ | ||
| 1752 | - xgssgl +=jhlcOrig-tempJhlc; | ||
| 1753 | - cj += jhlcOrig-tempJhlc; | ||
| 1754 | - }else{ | ||
| 1755 | - xgljgl +=tempJhlc-jhlcOrig; | ||
| 1756 | - lj +=tempJhlc-jhlcOrig; | ||
| 1757 | - } | ||
| 1758 | - //临加公里 | ||
| 1759 | - if (scheduleRealInfo.isSflj()) { | ||
| 1760 | - ljgl += tempJhlc; | ||
| 1761 | - ljglZ += tempJhlc; | ||
| 1762 | - } | ||
| 1763 | - | ||
| 1764 | - if (scheduleRealInfo.getStatus() == -1) { | ||
| 1765 | - ssgl += tempJhlc; | ||
| 1766 | - ssglZ += tempJhlc; | ||
| 1767 | - ssbc++; | ||
| 1768 | - ssbcZ++; | ||
| 1769 | - if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("路阻") != -1) { | ||
| 1770 | - ssgl_lz += tempJhlc; | ||
| 1771 | - ssgl_lzZ += tempJhlc; | ||
| 1772 | - ssbc_lz++; | ||
| 1773 | - ssbc_lzZ++; | ||
| 1774 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("吊慢") != -1) { | ||
| 1775 | - ssgl_dm += tempJhlc; | ||
| 1776 | - ssgl_dmZ += tempJhlc; | ||
| 1777 | - ssbc_dm++; | ||
| 1778 | - ssbc_dmZ++; | ||
| 1779 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("故障") != -1) { | ||
| 1780 | - ssgl_gz += tempJhlc; | ||
| 1781 | - ssgl_gzZ += tempJhlc; | ||
| 1782 | - ssbc_gz++; | ||
| 1783 | - ssbc_gzZ++; | ||
| 1784 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("纠纷") != -1) { | ||
| 1785 | - ssgl_jf += tempJhlc; | ||
| 1786 | - ssgl_jfZ += tempJhlc; | ||
| 1787 | - ssbc_jf++; | ||
| 1788 | - ssbc_jfZ++; | ||
| 1789 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("肇事") != -1) { | ||
| 1790 | - ssgl_zs += tempJhlc; | ||
| 1791 | - ssgl_zsZ += tempJhlc; | ||
| 1792 | - ssbc_zs++; | ||
| 1793 | - ssbc_zsZ++; | ||
| 1794 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("缺人") != -1) { | ||
| 1795 | - ssgl_qr += tempJhlc; | ||
| 1796 | - ssgl_qrZ += tempJhlc; | ||
| 1797 | - ssbc_qr++; | ||
| 1798 | - ssbc_qrZ++; | ||
| 1799 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("缺车") != -1) { | ||
| 1800 | - ssgl_qc += tempJhlc; | ||
| 1801 | - ssgl_qcZ += tempJhlc; | ||
| 1802 | - ssbc_qc++; | ||
| 1803 | - ssbc_qcZ++; | ||
| 1804 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("客稀") != -1) { | ||
| 1805 | - ssgl_kx += tempJhlc; | ||
| 1806 | - ssgl_kxZ += tempJhlc; | ||
| 1807 | - ssbc_kx++; | ||
| 1808 | - ssbc_kxZ++; | ||
| 1809 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("气候") != -1) { | ||
| 1810 | - ssgl_qh += tempJhlc; | ||
| 1811 | - ssgl_qhZ += tempJhlc; | ||
| 1812 | - ssbc_qh++; | ||
| 1813 | - ssbc_qhZ++; | ||
| 1814 | - } else if ((scheduleRealInfo.getRemarks() == null ? "" : scheduleRealInfo.getRemarks()).indexOf("援外") != -1) { | ||
| 1815 | - ssgl_yw += tempJhlc; | ||
| 1816 | - ssgl_ywZ += tempJhlc; | ||
| 1817 | - ssbc_yw++; | ||
| 1818 | - ssbc_ywZ++; | ||
| 1819 | - } else { | ||
| 1820 | - ssgl_other += tempJhlc; | ||
| 1821 | - ssgl_otherZ += tempJhlc; | ||
| 1822 | - ssbc_other++; | ||
| 1823 | - ssbc_otherZ++; | ||
| 1824 | - } | ||
| 1825 | - } else { | ||
| 1826 | - sjgl += tempJhlc; | ||
| 1827 | - sjglZ += tempJhlc; | ||
| 1828 | - } | ||
| 1829 | - } else { | ||
| 1830 | - Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | ||
| 1831 | - while (it.hasNext()) { | ||
| 1832 | - ChildTaskPlan childTaskPlan = it.next(); | ||
| 1833 | - childMileage = childTaskPlan.getMileage() == null ? 0 : childTaskPlan.getMileage(); | ||
| 1834 | - if (childTaskPlan.isDestroy()) { | ||
| 1835 | - ssgl += childMileage; | ||
| 1836 | - ssglZ += childMileage; | ||
| 1837 | - ssbc++; | ||
| 1838 | - ssbcZ++; | ||
| 1839 | - if (childTaskPlan.getDestroyReason().equals("路阻")) { | ||
| 1840 | - ssgl_lz += childTaskPlan.getMileage(); | ||
| 1841 | - ssgl_lzZ += childTaskPlan.getMileage(); | ||
| 1842 | - ssbc_lzZ++; | ||
| 1843 | - ssbc_lzZ++; | ||
| 1844 | - } else if (childTaskPlan.getDestroyReason().equals("吊慢")) { | ||
| 1845 | - ssgl_dm += childTaskPlan.getMileage(); | ||
| 1846 | - ssgl_dmZ += childTaskPlan.getMileage(); | ||
| 1847 | - ssbc_dm++; | ||
| 1848 | - ssbc_dmZ++; | ||
| 1849 | - } else if (childTaskPlan.getDestroyReason().equals("故障")) { | ||
| 1850 | - ssgl_gz += childTaskPlan.getMileage(); | ||
| 1851 | - ssgl_gzZ += childTaskPlan.getMileage(); | ||
| 1852 | - ssbc_gz++; | ||
| 1853 | - ssbc_gzZ++; | ||
| 1854 | - } else if (childTaskPlan.getDestroyReason().equals("纠纷")) { | ||
| 1855 | - ssgl_jf += childTaskPlan.getMileage(); | ||
| 1856 | - ssgl_jfZ += childTaskPlan.getMileage(); | ||
| 1857 | - ssbc_jf++; | ||
| 1858 | - ssbc_jfZ++; | ||
| 1859 | - } else if (childTaskPlan.getDestroyReason().equals("肇事")) { | ||
| 1860 | - ssgl_zs += childTaskPlan.getMileage(); | ||
| 1861 | - ssgl_zsZ += childTaskPlan.getMileage(); | ||
| 1862 | - ssbc_zs++; | ||
| 1863 | - ssbc_zsZ++; | ||
| 1864 | - } else if (childTaskPlan.getDestroyReason().equals("缺人")) { | ||
| 1865 | - ssgl_qr += childTaskPlan.getMileage(); | ||
| 1866 | - ssgl_qrZ += childTaskPlan.getMileage(); | ||
| 1867 | - ssbc_qr++; | ||
| 1868 | - ssbc_qrZ++; | ||
| 1869 | - } else if (childTaskPlan.getDestroyReason().equals("缺车")) { | ||
| 1870 | - ssgl_qc += childTaskPlan.getMileage(); | ||
| 1871 | - ssgl_qcZ += childTaskPlan.getMileage(); | ||
| 1872 | - ssbc_qc++; | ||
| 1873 | - ssbc_qcZ++; | ||
| 1874 | - } else if (childTaskPlan.getDestroyReason().equals("客稀")) { | ||
| 1875 | - ssgl_kx += childTaskPlan.getMileage(); | ||
| 1876 | - ssgl_kxZ += childTaskPlan.getMileage(); | ||
| 1877 | - ssbc_kx++; | ||
| 1878 | - ssbc_kxZ++; | ||
| 1879 | - } else if (childTaskPlan.getDestroyReason().equals("气候")) { | ||
| 1880 | - ssgl_qh += childTaskPlan.getMileage(); | ||
| 1881 | - ssgl_qhZ += childTaskPlan.getMileage(); | ||
| 1882 | - ssbc_qh++; | ||
| 1883 | - ssbc_qhZ++; | ||
| 1884 | - } else if (childTaskPlan.getDestroyReason().equals("援外")) { | ||
| 1885 | - ssgl_yw += childTaskPlan.getMileage(); | ||
| 1886 | - ssgl_ywZ += childTaskPlan.getMileage(); | ||
| 1887 | - ssbc_yw++; | ||
| 1888 | - ssbc_ywZ++; | ||
| 1889 | - } else { | ||
| 1890 | - ssgl_other += childTaskPlan.getMileage(); | ||
| 1891 | - ssgl_otherZ += childTaskPlan.getMileage(); | ||
| 1892 | - ssbc_other++; | ||
| 1893 | - ssbc_otherZ++; | ||
| 1894 | - } | ||
| 1895 | - } else { | ||
| 1896 | - if (scheduleRealInfo.isSflj()) { | ||
| 1897 | - ljgl += tempJhlc; | ||
| 1898 | - ljglZ += tempJhlc; | ||
| 1899 | - } else{ | ||
| 1900 | - sjgl += childMileage; | ||
| 1901 | - sjglZ += childMileage; | ||
| 1902 | - } | ||
| 1903 | - } | ||
| 1904 | - } | ||
| 1905 | - } | ||
| 1906 | - | ||
| 1907 | - //班次 | ||
| 1908 | - jhbc++; | ||
| 1909 | - jhbcZ++; | ||
| 1910 | - String[] fcsj = scheduleRealInfo.getFcsj().split(":"); | ||
| 1911 | - String[] fcsjActual = (scheduleRealInfo.getFcsjActual() == null ? "0:00" : scheduleRealInfo.getFcsjActual()).split(":"); | ||
| 1912 | - if ((Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) > sj_0 && (Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) < sj_1) { | ||
| 1913 | - jhbc_m++; | ||
| 1914 | - jhbc_mZ++; | ||
| 1915 | - } else if ((Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) > sj_2 && (Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1])) < sj_3) { | ||
| 1916 | - jhbc_a++; | ||
| 1917 | - jhbc_aZ++; | ||
| 1918 | - } | ||
| 1919 | - if (scheduleRealInfo.getStatus() != -1) { | ||
| 1920 | - sjbc++; | ||
| 1921 | - sjbcZ++; | ||
| 1922 | - if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_1) { | ||
| 1923 | - sjbc_m++; | ||
| 1924 | - sjbc_mZ++; | ||
| 1925 | - } else if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_3) { | ||
| 1926 | - sjbc_a++; | ||
| 1927 | - sjbc_aZ++; | ||
| 1928 | - } | ||
| 1929 | - } | ||
| 1930 | - if (scheduleRealInfo.isSflj()) { | ||
| 1931 | - ljbc++; | ||
| 1932 | - ljbcZ++; | ||
| 1933 | - if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_1) { | ||
| 1934 | - ljbc_m++; | ||
| 1935 | - ljbc_mZ++; | ||
| 1936 | - } else if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_3) { | ||
| 1937 | - ljbc_a++; | ||
| 1938 | - ljbc_aZ++; | ||
| 1939 | - } | ||
| 1940 | - } | ||
| 1941 | - if (scheduleRealInfo.getBcType().equals("venting")) { | ||
| 1942 | - fzbc++; | ||
| 1943 | - fzbcZ++; | ||
| 1944 | - if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_0 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_1) { | ||
| 1945 | - fzbc_m++; | ||
| 1946 | - fzbc_mZ++; | ||
| 1947 | - } else if ((Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) > sj_2 && (Integer.parseInt(fcsjActual[0]) * 60 + Integer.parseInt(fcsjActual[1])) < sj_3) { | ||
| 1948 | - fzbc_a++; | ||
| 1949 | - fzbc_aZ++; | ||
| 1950 | - } | ||
| 1951 | - } | ||
| 1952 | - | ||
| 1953 | - if (i < list.size() - 1) { | ||
| 1954 | - if (!scheduleRealInfo.getXlBm().equals(list.get(i + 1).getXlBm())) { | ||
| 1955 | - map = new HashMap<String, Object>(); | ||
| 1956 | - map.put("xlName", scheduleRealInfo.getXlName()); | ||
| 1957 | - map.put("jhlc", format.format(jhlc)); | ||
| 1958 | - map.put("sjgl", format.format(sjgl)); | ||
| 1959 | - map.put("ssgl", format.format(ssgl+cj)); | ||
| 1960 | - map.put("ssgl_lz", ssgl_lz == 0 ? 0 : format.format(ssgl_lz)); | ||
| 1961 | - map.put("ssgl_dm", ssgl_dm == 0 ? 0 : format.format(ssgl_dm)); | ||
| 1962 | - map.put("ssgl_gz", ssgl_gz == 0 ? 0 : format.format(ssgl_gz)); | ||
| 1963 | - map.put("ssgl_jf", ssgl_jf == 0 ? 0 : format.format(ssgl_jf)); | ||
| 1964 | - map.put("ssgl_zs", ssgl_zs == 0 ? 0 : format.format(ssgl_zs)); | ||
| 1965 | - map.put("ssgl_qr", ssgl_qr == 0 ? 0 : format.format(ssgl_qr)); | ||
| 1966 | - map.put("ssgl_qc", ssgl_qc == 0 ? 0 : format.format(ssgl_qc)); | ||
| 1967 | - map.put("ssgl_kx", ssgl_kx == 0 ? 0 : format.format(ssgl_kx)); | ||
| 1968 | - map.put("ssgl_qh", ssgl_qh == 0 ? 0 : format.format(ssgl_qh)); | ||
| 1969 | - map.put("ssgl_yw", ssgl_yw == 0 ? 0 : format.format(ssgl_yw)); | ||
| 1970 | - map.put("ssgl_other", ssgl_other == 0 ? 0 : format.format(ssgl_other)); | ||
| 1971 | - map.put("ssbc", ssbc); | ||
| 1972 | - map.put("ssbc_lz", ssbc_lz); | ||
| 1973 | - map.put("ssbc_dm", ssbc_dm); | ||
| 1974 | - map.put("ssbc_gz", ssbc_gz); | ||
| 1975 | - map.put("ssbc_jf", ssbc_jf); | ||
| 1976 | - map.put("ssbc_zs", ssbc_zs); | ||
| 1977 | - map.put("ssbc_qr", ssbc_qr); | ||
| 1978 | - map.put("ssbc_qc", ssbc_qc); | ||
| 1979 | - map.put("ssbc_kx", ssbc_kx); | ||
| 1980 | - map.put("ssbc_qh", ssbc_qh); | ||
| 1981 | - map.put("ssbc_yw", ssbc_yw); | ||
| 1982 | - map.put("ssbc_other", ssbc_other); | ||
| 1983 | - map.put("ljgl", format.format(ljgl+lj)); | ||
| 1984 | - map.put("jhbc", jhbc); | ||
| 1985 | - map.put("jhbc_m", jhbc_m); | ||
| 1986 | - map.put("jhbc_a", jhbc_a); | ||
| 1987 | - map.put("sjbc", sjbc); | ||
| 1988 | - map.put("sjbc_m", sjbc_m); | ||
| 1989 | - map.put("sjbc_a", sjbc_a); | ||
| 1990 | - map.put("ljbc", ljbc); | ||
| 1991 | - map.put("ljbc_m", ljbc_m); | ||
| 1992 | - map.put("ljbc_a", ljbc_a); | ||
| 1993 | - map.put("fzbc", fzbc); | ||
| 1994 | - map.put("fzbc_m", fzbc_m); | ||
| 1995 | - map.put("fzbc_a", fzbc_a); | ||
| 1996 | - map.put("dtbc", dtbc); | ||
| 1997 | - map.put("dtbc_m", dtbc_m); | ||
| 1998 | - map.put("dtbc_a", dtbc_a); | ||
| 1999 | - map.put("djg", djg); | ||
| 2000 | - map.put("djg_m", djg_m); | ||
| 2001 | - map.put("djg_a", djg_a); | ||
| 2002 | - map.put("djg_time", djg_time); | ||
| 2003 | - lMap.add(map); | ||
| 2004 | - jhlc = 0; | ||
| 2005 | - tempJhlc = 0; | ||
| 2006 | - childMileage = 0; | ||
| 2007 | - sjgl = 0f; | ||
| 2008 | - ssgl = 0f; | ||
| 2009 | - ssgl_lz = 0f; | ||
| 2010 | - ssgl_dm = 0f; | ||
| 2011 | - ssgl_gz = 0f; | ||
| 2012 | - ssgl_jf = 0f; | ||
| 2013 | - ssgl_zs = 0f; | ||
| 2014 | - ssgl_qr = 0f; | ||
| 2015 | - ssgl_qc = 0f; | ||
| 2016 | - ssgl_kx = 0f; | ||
| 2017 | - ssgl_qh = 0f; | ||
| 2018 | - ssgl_yw = 0f; | ||
| 2019 | - ssgl_other = 0f; | ||
| 2020 | - ljgl = 0f; | ||
| 2021 | - //班次 | ||
| 2022 | - jhbc = 0; | ||
| 2023 | - jhbc_m = 0; | ||
| 2024 | - jhbc_a = 0; | ||
| 2025 | - sjbc = 0; | ||
| 2026 | - sjbc_m = 0; | ||
| 2027 | - sjbc_a = 0; | ||
| 2028 | - ljbc = 0; | ||
| 2029 | - ljbc_m = 0; | ||
| 2030 | - ljbc_a = 0; | ||
| 2031 | - fzbc = 0; | ||
| 2032 | - fzbc_m = 0; | ||
| 2033 | - fzbc_a = 0; | ||
| 2034 | - dtbc = 0; | ||
| 2035 | - dtbc_m = 0; | ||
| 2036 | - dtbc_a = 0; | ||
| 2037 | - djg = 0; | ||
| 2038 | - djg_m = 0; | ||
| 2039 | - djg_a = 0; | ||
| 2040 | - djg_time = 0; | ||
| 2041 | - lj=0; | ||
| 2042 | - cj=0; | ||
| 2043 | - } | ||
| 2044 | - } else { | ||
| 2045 | - map = new HashMap<String, Object>(); | ||
| 2046 | - map.put("xlName", scheduleRealInfo.getXlName()); | ||
| 2047 | - map.put("jhlc", format.format(jhlc)); | ||
| 2048 | - map.put("sjgl", format.format(sjgl)); | ||
| 2049 | - map.put("ssgl", format.format(ssgl+cj)); | ||
| 2050 | - map.put("ssgl_lz", ssgl_lz == 0 ? 0 : format.format(ssgl_lz)); | ||
| 2051 | - map.put("ssgl_dm", ssgl_dm == 0 ? 0 : format.format(ssgl_dm)); | ||
| 2052 | - map.put("ssgl_gz", ssgl_gz == 0 ? 0 : format.format(ssgl_gz)); | ||
| 2053 | - map.put("ssgl_jf", ssgl_jf == 0 ? 0 : format.format(ssgl_jf)); | ||
| 2054 | - map.put("ssgl_zs", ssgl_zs == 0 ? 0 : format.format(ssgl_zs)); | ||
| 2055 | - map.put("ssgl_qr", ssgl_qr == 0 ? 0 : format.format(ssgl_qr)); | ||
| 2056 | - map.put("ssgl_qc", ssgl_qc == 0 ? 0 : format.format(ssgl_qc)); | ||
| 2057 | - map.put("ssgl_kx", ssgl_kx == 0 ? 0 : format.format(ssgl_kx)); | ||
| 2058 | - map.put("ssgl_qh", ssgl_qh == 0 ? 0 : format.format(ssgl_qh)); | ||
| 2059 | - map.put("ssgl_yw", ssgl_yw == 0 ? 0 : format.format(ssgl_yw)); | ||
| 2060 | - map.put("ssgl_other", ssgl_other == 0 ? 0 : format.format(ssgl_other)); | ||
| 2061 | - map.put("ssbc", ssbc); | ||
| 2062 | - map.put("ssbc_lz", ssbc_lz); | ||
| 2063 | - map.put("ssbc_dm", ssbc_dm); | ||
| 2064 | - map.put("ssbc_gz", ssbc_gz); | ||
| 2065 | - map.put("ssbc_jf", ssbc_jf); | ||
| 2066 | - map.put("ssbc_zs", ssbc_zs); | ||
| 2067 | - map.put("ssbc_qr", ssbc_qr); | ||
| 2068 | - map.put("ssbc_qc", ssbc_qc); | ||
| 2069 | - map.put("ssbc_kx", ssbc_kx); | ||
| 2070 | - map.put("ssbc_qh", ssbc_qh); | ||
| 2071 | - map.put("ssbc_yw", ssbc_yw); | ||
| 2072 | - map.put("ssbc_other", ssbc_other); | ||
| 2073 | - map.put("ljgl", format.format(ljgl+lj)); | ||
| 2074 | - map.put("jhbc", jhbc); | ||
| 2075 | - map.put("jhbc_m", jhbc_m); | ||
| 2076 | - map.put("jhbc_a", jhbc_a); | ||
| 2077 | - map.put("sjbc", sjbc); | ||
| 2078 | - map.put("sjbc_m", sjbc_m); | ||
| 2079 | - map.put("sjbc_a", sjbc_a); | ||
| 2080 | - map.put("ljbc", ljbc); | ||
| 2081 | - map.put("ljbc_m", ljbc_m); | ||
| 2082 | - map.put("ljbc_a", ljbc_a); | ||
| 2083 | - map.put("fzbc", fzbc); | ||
| 2084 | - map.put("fzbc_m", fzbc_m); | ||
| 2085 | - map.put("fzbc_a", fzbc_a); | ||
| 2086 | - map.put("dtbc", dtbc); | ||
| 2087 | - map.put("dtbc_m", dtbc_m); | ||
| 2088 | - map.put("dtbc_a", dtbc_a); | ||
| 2089 | - map.put("djg", djg); | ||
| 2090 | - map.put("djg_m", djg_m); | ||
| 2091 | - map.put("djg_a", djg_a); | ||
| 2092 | - map.put("djg_time", djg_time); | ||
| 2093 | - lMap.add(map); | ||
| 2094 | - jhlc = 0; | ||
| 2095 | - tempJhlc = 0; | ||
| 2096 | - childMileage = 0; | ||
| 2097 | - sjgl = 0f; | ||
| 2098 | - ssgl = 0f; | ||
| 2099 | - ssgl_lz = 0f; | ||
| 2100 | - ssgl_dm = 0f; | ||
| 2101 | - ssgl_gz = 0f; | ||
| 2102 | - ssgl_jf = 0f; | ||
| 2103 | - ssgl_zs = 0f; | ||
| 2104 | - ssgl_qr = 0f; | ||
| 2105 | - ssgl_qc = 0f; | ||
| 2106 | - ssgl_kx = 0f; | ||
| 2107 | - ssgl_qh = 0f; | ||
| 2108 | - ssgl_yw = 0f; | ||
| 2109 | - ssgl_other = 0f; | ||
| 2110 | - ljgl = 0f; | ||
| 2111 | - //班次 | ||
| 2112 | - jhbc = 0; | ||
| 2113 | - jhbc_m = 0; | ||
| 2114 | - jhbc_a = 0; | ||
| 2115 | - sjbc = 0; | ||
| 2116 | - sjbc_m = 0; | ||
| 2117 | - sjbc_a = 0; | ||
| 2118 | - ljbc = 0; | ||
| 2119 | - ljbc_m = 0; | ||
| 2120 | - ljbc_a = 0; | ||
| 2121 | - fzbc = 0; | ||
| 2122 | - fzbc_m = 0; | ||
| 2123 | - fzbc_a = 0; | ||
| 2124 | - dtbc = 0; | ||
| 2125 | - dtbc_m = 0; | ||
| 2126 | - dtbc_a = 0; | ||
| 2127 | - djg = 0; | ||
| 2128 | - djg_m = 0; | ||
| 2129 | - djg_a = 0; | ||
| 2130 | - djg_time = 0; | ||
| 2131 | - lj=0; | ||
| 2132 | - cj=0; | ||
| 2133 | - } | 1604 | + /* String sqlPc = "select * from bsth_c_s_child_task where schedule=" + s.getId() + " order by start_date "; |
| 1605 | + List<ScheduleRealInfo> lists = jdbcTemplate.query(sqlPc, | ||
| 1606 | + new RowMapper<ScheduleRealInfo>() { | ||
| 1607 | + @Override | ||
| 1608 | + public ScheduleRealInfo mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 1609 | + ScheduleRealInfo t = new ScheduleRealInfo(); | ||
| 1610 | + if (rs.getInt("destroy") == 0) { | ||
| 1611 | + t.setFcsjActual(rs.getString("start_date")); | ||
| 1612 | + t.setZdsjActual(rs.getString("end_date")); | ||
| 1613 | + t.setJhlc(rs.getDouble("mileage")); | ||
| 1614 | + } else { | ||
| 1615 | + t.setFcsjActual(""); | ||
| 1616 | + t.setZdsjActual(""); | ||
| 1617 | + t.setJhlc(0.0); | ||
| 1618 | + } | ||
| 1619 | + t.setQdzName(rs.getString("start_station_name")); | ||
| 1620 | + t.setZdzName(rs.getString("end_station_name")); | ||
| 1621 | + t.setRemarks(rs.getString("remarks")); | ||
| 1622 | + t.setAdjustExps("子"); | ||
| 1623 | + return t; | ||
| 1624 | + } | ||
| 1625 | + }); | ||
| 1626 | + for (int j = 0; j < lists.size(); j++) { | ||
| 1627 | + ScheduleRealInfo t = lists.get(j); | ||
| 1628 | + listSchedule.add(t); | ||
| 1629 | + }*/ | ||
| 2134 | } | 1630 | } |
| 2135 | } | 1631 | } |
| 2136 | - map = new HashMap<String, Object>(); | ||
| 2137 | - map.put("xlName", "合计"); | ||
| 2138 | - map.put("jhlc", format.format(jhlcZ)); | ||
| 2139 | - map.put("sjgl", format.format(sjglZ)); | ||
| 2140 | - map.put("ssgl", format.format(ssglZ+xgssgl)); | ||
| 2141 | - map.put("ssgl_lz", ssgl_lzZ == 0 ? 0 : format.format(ssgl_lzZ)); | ||
| 2142 | - map.put("ssgl_dm", ssgl_dmZ == 0 ? 0 : format.format(ssgl_dmZ)); | ||
| 2143 | - map.put("ssgl_gz", ssgl_gzZ == 0 ? 0 : format.format(ssgl_gzZ)); | ||
| 2144 | - map.put("ssgl_jf", ssgl_jfZ == 0 ? 0 : format.format(ssgl_jfZ)); | ||
| 2145 | - map.put("ssgl_zs", ssgl_zsZ == 0 ? 0 : format.format(ssgl_zsZ)); | ||
| 2146 | - map.put("ssgl_qr", ssgl_qrZ == 0 ? 0 : format.format(ssgl_qrZ)); | ||
| 2147 | - map.put("ssgl_qc", ssgl_qcZ == 0 ? 0 : format.format(ssgl_qcZ)); | ||
| 2148 | - map.put("ssgl_kx", ssgl_kxZ == 0 ? 0 : format.format(ssgl_kxZ)); | ||
| 2149 | - map.put("ssgl_qh", ssgl_qhZ == 0 ? 0 : format.format(ssgl_qhZ)); | ||
| 2150 | - map.put("ssgl_yw", ssgl_ywZ == 0 ? 0 : format.format(ssgl_ywZ)); | ||
| 2151 | - map.put("ssgl_other", ssgl_otherZ == 0 ? 0 : format.format(ssgl_otherZ)); | ||
| 2152 | - map.put("ssbc", ssbcZ); | ||
| 2153 | - map.put("ssbc_lz", ssbc_lzZ); | ||
| 2154 | - map.put("ssbc_dm", ssbc_lzZ); | ||
| 2155 | - map.put("ssbc_gz", ssbc_gzZ); | ||
| 2156 | - map.put("ssbc_jf", ssbc_jfZ); | ||
| 2157 | - map.put("ssbc_zs", ssbc_zsZ); | ||
| 2158 | - map.put("ssbc_qr", ssbc_qrZ); | ||
| 2159 | - map.put("ssbc_qc", ssbc_qcZ); | ||
| 2160 | - map.put("ssbc_kx", ssbc_qcZ); | ||
| 2161 | - map.put("ssbc_qh", ssbc_qhZ); | ||
| 2162 | - map.put("ssbc_yw", ssbc_ywZ); | ||
| 2163 | - map.put("ssbc_other", ssbc_otherZ); | ||
| 2164 | - map.put("ljgl", format.format(ljglZ+xgljgl)); | ||
| 2165 | - map.put("jhbc", jhbcZ); | ||
| 2166 | - map.put("jhbc_m", jhbc_mZ); | ||
| 2167 | - map.put("jhbc_a", jhbc_aZ); | ||
| 2168 | - map.put("sjbc", sjbcZ); | ||
| 2169 | - map.put("sjbc_m", sjbc_mZ); | ||
| 2170 | - map.put("sjbc_a", sjbc_aZ); | ||
| 2171 | - map.put("ljbc", ljbcZ); | ||
| 2172 | - map.put("ljbc_m", ljbc_mZ); | ||
| 2173 | - map.put("ljbc_a", ljbc_aZ); | ||
| 2174 | - map.put("fzbc", fzbcZ); | ||
| 2175 | - map.put("fzbc_m", fzbc_mZ); | ||
| 2176 | - map.put("fzbc_a", fzbc_aZ); | ||
| 2177 | - map.put("dtbc", dtbcZ); | ||
| 2178 | - map.put("dtbc_m", dtbc_mZ); | ||
| 2179 | - map.put("dtbc_a", dtbc_aZ); | ||
| 2180 | - map.put("djg", djgZ); | ||
| 2181 | - map.put("djg_m", djg_mZ); | ||
| 2182 | - map.put("djg_a", djg_aZ); | ||
| 2183 | - map.put("djg_time", djg_timeZ); | ||
| 2184 | - lMap.add(map); | ||
| 2185 | - for (int i = 0; i < lMap.size(); i++) { | ||
| 2186 | - Map<String, Object> m=lMap.get(i); | ||
| 2187 | -// m.get("")) | ||
| 2188 | - jhlc += Double.parseDouble(m.get("jhlc").toString()); | ||
| 2189 | - sjgl += Double.parseDouble(m.get("sjgl").toString()); | ||
| 2190 | - ssgl += Double.parseDouble( m.get("ssgl").toString()); | ||
| 2191 | - ssgl_lz += Double.parseDouble( m.get("ssgl_lz").toString()); | ||
| 2192 | - ssgl_dm += Double.parseDouble(m.get("ssgl_dm").toString()); | ||
| 2193 | - ssgl_gz += Double.parseDouble( m.get("ssgl_gz").toString()); | ||
| 2194 | - ssgl_jf += m.get("ssgl_jf", ssgl_jf == 0 ? 0 : format.format(ssgl_jf)); | ||
| 2195 | - m.get("ssgl_zs", ssgl_zs == 0 ? 0 : format.format(ssgl_zs)); | ||
| 2196 | - m.get("ssgl_qr", ssgl_qr == 0 ? 0 : format.format(ssgl_qr)); | ||
| 2197 | - m.get("ssgl_qc", ssgl_qc == 0 ? 0 : format.format(ssgl_qc)); | ||
| 2198 | - m.get("ssgl_kx", ssgl_kx == 0 ? 0 : format.format(ssgl_kx)); | ||
| 2199 | - m.get("ssgl_qh", ssgl_qh == 0 ? 0 : format.format(ssgl_qh)); | ||
| 2200 | - m.get("ssgl_yw", ssgl_yw == 0 ? 0 : format.format(ssgl_yw)); | ||
| 2201 | - m.get("ssgl_other", ssgl_other == 0 ? 0 : format.format(ssgl_other)); | ||
| 2202 | - m.get("ljgl", ljgl == 0 ? 0 : format.format(ljgl)); | ||
| 2203 | - m.get("jhbc", jhbc); | ||
| 2204 | - m.get("jhbc_m", jhbc_m); | ||
| 2205 | - m.get("jhbc_a", jhbc_a); | ||
| 2206 | - m.get("sjbc", sjbc); | ||
| 2207 | - m.get("sjbc_m", sjbc_m); | ||
| 2208 | - m.get("sjbc_a", sjbc_a); | ||
| 2209 | - m.get("ljbc", ljbc); | ||
| 2210 | - m.get("ljbc_m", ljbc_m); | ||
| 2211 | - m.get("ljbc_a", ljbc_a); | ||
| 2212 | - m.get("fzbc", fzbc); | ||
| 2213 | - m.get("fzbc_m", fzbc_m); | ||
| 2214 | - m.get("fzbc_a", fzbc_a); | ||
| 2215 | - m.get("dtbc", dtbc); | ||
| 2216 | - m.get("dtbc_m", dtbc_m); | ||
| 2217 | - m.get("dtbc_a", dtbc_a); | ||
| 2218 | - m.get("djg", djg); | ||
| 2219 | - m.get("djg_m", djg_m); | ||
| 2220 | - m.get("djg_a", djg_a); | ||
| 2221 | - m.get("djg_time", djg_time); | ||
| 2222 | - } | ||
| 2223 | 1632 | ||
| 2224 | - if (type != null && type.length() != 0 && type.equals("export")) { | ||
| 2225 | - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 2226 | - sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 2227 | - List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 2228 | - Map<String, Object> m = new HashMap<String, Object>(); | ||
| 2229 | - ReportUtils ee = new ReportUtils(); | ||
| 2230 | - try { | ||
| 2231 | - listI.add(lMap.iterator()); | ||
| 2232 | - String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 2233 | - ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_.xls", | ||
| 2234 | - path + "export/统计日报" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | ||
| 2235 | - } catch (Exception e) { | ||
| 2236 | - // TODO: handle exception | ||
| 2237 | - e.printStackTrace(); | ||
| 2238 | - } | ||
| 2239 | - } | 1633 | + return listSchedule; |
| 1634 | + } | ||
| 2240 | 1635 | ||
| 2241 | - return lMap; | ||
| 2242 | - }*/ | ||
| 2243 | - | ||
| 2244 | @Override | 1636 | @Override |
| 2245 | - public List<Map<String, Object>> statisticsDailyTj(String line, String date,String date2, | 1637 | + public Map<String, Object> removeChildTask(Long taskId) { |
| 1638 | + Map<String, Object> rs = new HashMap<>(); | ||
| 1639 | + ChildTaskPlan chTask = cTaskPlanRepository.findOne(taskId); | ||
| 1640 | + | ||
| 1641 | + ScheduleRealInfo sch = dayOfSchedule.get(chTask.getSchedule().getId()); | ||
| 1642 | + try { | ||
| 1643 | + | ||
| 1644 | + sch.getcTasks().remove(chTask); | ||
| 1645 | + scheduleRealInfoRepository.save(sch); | ||
| 1646 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 1647 | + } catch (Exception e) { | ||
| 1648 | + logger.error("", e); | ||
| 1649 | + rs.put("status", ResponseCode.ERROR); | ||
| 1650 | + } | ||
| 1651 | + return rs; | ||
| 1652 | + } | ||
| 1653 | + @Override | ||
| 1654 | + public List<Map<String, Object>> statisticsDaily(String line, String date, | ||
| 1655 | + String xlName, String type) { | ||
| 1656 | + List<Map<String, Object>> lMap= new ArrayList<Map<String, Object>>(); | ||
| 1657 | + List<ScheduleRealInfo> lists = scheduleRealInfoRepository.scheduleByDateAndLine2(line, date); | ||
| 1658 | + Map<String, Object> map = new HashMap<String, Object>(); | ||
| 1659 | + map.put("xlName", xlName); | ||
| 1660 | + map.put("jhlc", culateService.culateJhgl(lists)); | ||
| 1661 | + map.put("sjgl", Arith.add(culateService.culateSjgl(lists),culateService.culateLjgl(lists))); | ||
| 1662 | + map.put("ssgl", culateService.culateLbgl(lists)); | ||
| 1663 | + map.put("ssgl_lz", culateService.culateCJLC(lists, "路阻")); | ||
| 1664 | + map.put("ssgl_dm", culateService.culateCJLC(lists, "吊慢")); | ||
| 1665 | + map.put("ssgl_gz", culateService.culateCJLC(lists, "故障")); | ||
| 1666 | + map.put("ssgl_jf", culateService.culateCJLC(lists, "纠纷")); | ||
| 1667 | + map.put("ssgl_zs", culateService.culateCJLC(lists, "肇事")); | ||
| 1668 | + map.put("ssgl_qr", culateService.culateCJLC(lists, "缺人")); | ||
| 1669 | + map.put("ssgl_qc", culateService.culateCJLC(lists, "缺车")); | ||
| 1670 | + map.put("ssgl_kx", culateService.culateCJLC(lists, "客稀")); | ||
| 1671 | + map.put("ssgl_qh", culateService.culateCJLC(lists, "气候")); | ||
| 1672 | + map.put("ssgl_yw", culateService.culateCJLC(lists, "援外")); | ||
| 1673 | + map.put("ssgl_other", culateService.culateCJLC(lists, "其他")); | ||
| 1674 | + map.put("ssbc", culateService.culateLbbc(lists)); | ||
| 1675 | + map.put("ljgl", culateService.culateLjgl(lists)); | ||
| 1676 | + map.put("jhbc", culateService.culateJhbc(lists,"")); | ||
| 1677 | + map.put("jhbc_m", culateService.culateJhbc(lists, "zgf")); | ||
| 1678 | + map.put("jhbc_a", culateService.culateJhbc(lists, "wgf")); | ||
| 1679 | + map.put("sjbc", culateService.culateSjbc(lists,"")); | ||
| 1680 | + map.put("sjbc_m", culateService.culateSjbc(lists,"zgf")); | ||
| 1681 | + map.put("sjbc_a", culateService.culateSjbc(lists,"wgf")); | ||
| 1682 | + map.put("ljbc", culateService.culateLjbc(lists,"")); | ||
| 1683 | + map.put("ljbc_m", culateService.culateLjbc(lists,"zgf")); | ||
| 1684 | + map.put("ljbc_a", culateService.culateLjbc(lists,"wgf")); | ||
| 1685 | + map.put("fzbc", culateService.culateFzbc(lists, "")); | ||
| 1686 | + map.put("fzbc_m", culateService.culateFzbc(lists, "zgf")); | ||
| 1687 | + map.put("fzbc_a", culateService.culateFzbc(lists, "wgf")); | ||
| 1688 | + map.put("dtbc", 0); | ||
| 1689 | + map.put("dtbc_m", 0); | ||
| 1690 | + map.put("dtbc_a", 0); | ||
| 1691 | + map.put("djg", 0); | ||
| 1692 | + map.put("djg_m", 0); | ||
| 1693 | + map.put("djg_a", 0); | ||
| 1694 | + map.put("djg_time", 0); | ||
| 1695 | + lMap.add(map); | ||
| 1696 | + return lMap; | ||
| 1697 | + } | ||
| 1698 | + | ||
| 1699 | + /* @Override | ||
| 1700 | + public List<Map<String, Object>> statisticsDaily(String line, String date, | ||
| 2246 | String xlName, String type) { | 1701 | String xlName, String type) { |
| 2247 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | 1702 | List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); |
| 2248 | - if(line!=null){ | ||
| 2249 | - list = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date,date2); | ||
| 2250 | - }else{ | ||
| 2251 | - list = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date,date2); | ||
| 2252 | - } | ||
| 2253 | - | 1703 | + if (date.length() == 10) |
| 1704 | + list = scheduleRealInfoRepository.scheduleByDateAndLine2(line, date); | ||
| 1705 | + else if (date.length() == 7) | ||
| 1706 | + list = scheduleRealInfoRepository.scheduleByDateAndLine3(line, date); | ||
| 1707 | + | ||
| 2254 | 1708 | ||
| 2255 | List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); | 1709 | List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); |
| 2256 | DecimalFormat format = new DecimalFormat("0.00"); | 1710 | DecimalFormat format = new DecimalFormat("0.00"); |
| @@ -2378,8 +1832,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2378,8 +1832,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2378 | while (it.hasNext()) { | 1832 | while (it.hasNext()) { |
| 2379 | ChildTaskPlan childTaskPlan = it.next(); | 1833 | ChildTaskPlan childTaskPlan = it.next(); |
| 2380 | childMileage = childTaskPlan.getMileage() == null ? 0 : childTaskPlan.getMileage(); | 1834 | childMileage = childTaskPlan.getMileage() == null ? 0 : childTaskPlan.getMileage(); |
| 2381 | - jhlc += childMileage; | ||
| 2382 | - jhlcZ += childMileage; | ||
| 2383 | if (childTaskPlan.isDestroy()) { | 1835 | if (childTaskPlan.isDestroy()) { |
| 2384 | ssgl += childMileage; | 1836 | ssgl += childMileage; |
| 2385 | ssglZ += childMileage; | 1837 | ssglZ += childMileage; |
| @@ -2529,7 +1981,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2529,7 +1981,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2529 | map.put("ssbc_qh", ssbc_qh); | 1981 | map.put("ssbc_qh", ssbc_qh); |
| 2530 | map.put("ssbc_yw", ssbc_yw); | 1982 | map.put("ssbc_yw", ssbc_yw); |
| 2531 | map.put("ssbc_other", ssbc_other); | 1983 | map.put("ssbc_other", ssbc_other); |
| 2532 | - map.put("ljgl", (ljgl+lj) == 0 ? 0 : format.format(ljgl+lj)); | 1984 | + map.put("ljgl", format.format(ljgl+lj)); |
| 2533 | map.put("jhbc", jhbc); | 1985 | map.put("jhbc", jhbc); |
| 2534 | map.put("jhbc_m", jhbc_m); | 1986 | map.put("jhbc_m", jhbc_m); |
| 2535 | map.put("jhbc_a", jhbc_a); | 1987 | map.put("jhbc_a", jhbc_a); |
| @@ -2594,8 +2046,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2594,8 +2046,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2594 | map = new HashMap<String, Object>(); | 2046 | map = new HashMap<String, Object>(); |
| 2595 | map.put("xlName", scheduleRealInfo.getXlName()); | 2047 | map.put("xlName", scheduleRealInfo.getXlName()); |
| 2596 | map.put("jhlc", format.format(jhlc)); | 2048 | map.put("jhlc", format.format(jhlc)); |
| 2597 | - map.put("sjgl", format.format(sjgl+cj)); | ||
| 2598 | - map.put("ssgl", format.format(ssgl)); | 2049 | + map.put("sjgl", format.format(sjgl)); |
| 2050 | + map.put("ssgl", format.format(ssgl+cj)); | ||
| 2599 | map.put("ssgl_lz", ssgl_lz == 0 ? 0 : format.format(ssgl_lz)); | 2051 | map.put("ssgl_lz", ssgl_lz == 0 ? 0 : format.format(ssgl_lz)); |
| 2600 | map.put("ssgl_dm", ssgl_dm == 0 ? 0 : format.format(ssgl_dm)); | 2052 | map.put("ssgl_dm", ssgl_dm == 0 ? 0 : format.format(ssgl_dm)); |
| 2601 | map.put("ssgl_gz", ssgl_gz == 0 ? 0 : format.format(ssgl_gz)); | 2053 | map.put("ssgl_gz", ssgl_gz == 0 ? 0 : format.format(ssgl_gz)); |
| @@ -2731,7 +2183,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2731,7 +2183,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2731 | map.put("djg_a", djg_aZ); | 2183 | map.put("djg_a", djg_aZ); |
| 2732 | map.put("djg_time", djg_timeZ); | 2184 | map.put("djg_time", djg_timeZ); |
| 2733 | lMap.add(map); | 2185 | lMap.add(map); |
| 2734 | - /* for (int i = 0; i < lMap.size(); i++) { | 2186 | + for (int i = 0; i < lMap.size(); i++) { |
| 2735 | Map<String, Object> m=lMap.get(i); | 2187 | Map<String, Object> m=lMap.get(i); |
| 2736 | // m.get("")) | 2188 | // m.get("")) |
| 2737 | jhlc += Double.parseDouble(m.get("jhlc").toString()); | 2189 | jhlc += Double.parseDouble(m.get("jhlc").toString()); |
| @@ -2768,8 +2220,145 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2768,8 +2220,145 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2768 | m.get("djg_m", djg_m); | 2220 | m.get("djg_m", djg_m); |
| 2769 | m.get("djg_a", djg_a); | 2221 | m.get("djg_a", djg_a); |
| 2770 | m.get("djg_time", djg_time); | 2222 | m.get("djg_time", djg_time); |
| 2771 | - }*/ | 2223 | + } |
| 2224 | + | ||
| 2225 | + if (type != null && type.length() != 0 && type.equals("export")) { | ||
| 2226 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 2227 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 2228 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 2229 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 2230 | + ReportUtils ee = new ReportUtils(); | ||
| 2231 | + try { | ||
| 2232 | + listI.add(lMap.iterator()); | ||
| 2233 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 2234 | + ee.excelReplace(listI, new Object[]{m}, path + "mould/statisticsDaily_.xls", | ||
| 2235 | + path + "export/统计日报" + sdfSimple.format(sdfMonth.parse(date)) + ".xls"); | ||
| 2236 | + } catch (Exception e) { | ||
| 2237 | + // TODO: handle exception | ||
| 2238 | + e.printStackTrace(); | ||
| 2239 | + } | ||
| 2240 | + } | ||
| 2772 | 2241 | ||
| 2242 | + return lMap; | ||
| 2243 | + }*/ | ||
| 2244 | + | ||
| 2245 | + public final Map<String, Object> staticTj(List<ScheduleRealInfo> lists){ | ||
| 2246 | + Map<String, Object> map = new HashMap<String, Object>(); | ||
| 2247 | + map.put("xlName", lists.get(0).getXlName()); | ||
| 2248 | + map.put("jhlc", culateService.culateJhgl(lists)); | ||
| 2249 | + map.put("sjgl", Arith.add(culateService.culateSjgl(lists),culateService.culateLjgl(lists))); | ||
| 2250 | + map.put("ssgl", culateService.culateLbgl(lists)); | ||
| 2251 | + map.put("ssgl_lz", culateService.culateCJLC(lists, "路阻")); | ||
| 2252 | + map.put("ssgl_dm", culateService.culateCJLC(lists, "吊慢")); | ||
| 2253 | + map.put("ssgl_gz", culateService.culateCJLC(lists, "故障")); | ||
| 2254 | + map.put("ssgl_jf", culateService.culateCJLC(lists, "纠纷")); | ||
| 2255 | + map.put("ssgl_zs", culateService.culateCJLC(lists, "肇事")); | ||
| 2256 | + map.put("ssgl_qr", culateService.culateCJLC(lists, "缺人")); | ||
| 2257 | + map.put("ssgl_qc", culateService.culateCJLC(lists, "缺车")); | ||
| 2258 | + map.put("ssgl_kx", culateService.culateCJLC(lists, "客稀")); | ||
| 2259 | + map.put("ssgl_qh", culateService.culateCJLC(lists, "气候")); | ||
| 2260 | + map.put("ssgl_yw", culateService.culateCJLC(lists, "援外")); | ||
| 2261 | + map.put("ssgl_other", culateService.culateCJLC(lists, "其他")); | ||
| 2262 | + map.put("ssbc", culateService.culateLbbc(lists)); | ||
| 2263 | + map.put("ljgl", culateService.culateLjgl(lists)); | ||
| 2264 | + map.put("jhbc", culateService.culateJhbc(lists,"")); | ||
| 2265 | + map.put("jhbc_m", culateService.culateJhbc(lists, "zgf")); | ||
| 2266 | + map.put("jhbc_a", culateService.culateJhbc(lists, "wgf")); | ||
| 2267 | + map.put("sjbc", culateService.culateSjbc(lists,"")); | ||
| 2268 | + map.put("sjbc_m", culateService.culateSjbc(lists,"zgf")); | ||
| 2269 | + map.put("sjbc_a", culateService.culateSjbc(lists,"wgf")); | ||
| 2270 | + map.put("ljbc", culateService.culateLjbc(lists,"")); | ||
| 2271 | + map.put("ljbc_m", culateService.culateLjbc(lists,"zgf")); | ||
| 2272 | + map.put("ljbc_a", culateService.culateLjbc(lists,"wgf")); | ||
| 2273 | + map.put("fzbc", culateService.culateFzbc(lists, "")); | ||
| 2274 | + map.put("fzbc_m", culateService.culateFzbc(lists, "zgf")); | ||
| 2275 | + map.put("fzbc_a", culateService.culateFzbc(lists, "wgf")); | ||
| 2276 | + map.put("dtbc", 0); | ||
| 2277 | + map.put("dtbc_m", 0); | ||
| 2278 | + map.put("dtbc_a", 0); | ||
| 2279 | + map.put("djg", 0); | ||
| 2280 | + map.put("djg_m", 0); | ||
| 2281 | + map.put("djg_a", 0); | ||
| 2282 | + map.put("djg_time", 0); | ||
| 2283 | + return map; | ||
| 2284 | + } | ||
| 2285 | + | ||
| 2286 | + @Override | ||
| 2287 | + public List<Map<String, Object>> statisticsDailyTj(String gsdm,String fgsdm,String line, String date,String date2, | ||
| 2288 | + String xlName, String type) { | ||
| 2289 | + List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>(); | ||
| 2290 | + List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>(); | ||
| 2291 | + line =line.trim(); | ||
| 2292 | + if(line.equals("")){ | ||
| 2293 | + //查询所有线路 | ||
| 2294 | + list = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date,date2,gsdm,fgsdm); | ||
| 2295 | + }else{ | ||
| 2296 | + //查询单条线路 | ||
| 2297 | + list = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date,date2); | ||
| 2298 | + } | ||
| 2299 | + List<Map<String, Object>> lMap = new ArrayList<Map<String, Object>>(); | ||
| 2300 | + for (int i = 0; i < list.size(); i++) { | ||
| 2301 | + if(i<list.size()-1){ | ||
| 2302 | + if(list.get(i+1).getXlBm().equals(list.get(i).getXlBm())){ | ||
| 2303 | + lists.add(list.get(i)); | ||
| 2304 | + }else{ | ||
| 2305 | + lists.add(list.get(i)); | ||
| 2306 | + Map<String, Object> map=staticTj(lists); | ||
| 2307 | + lMap.add(map); | ||
| 2308 | + lists=new ArrayList<ScheduleRealInfo>(); | ||
| 2309 | + } | ||
| 2310 | + }else{ | ||
| 2311 | + if(list.get(i).getXlBm().equals(list.get(i-1).getXlBm())){ | ||
| 2312 | + lists.add(list.get(i)); | ||
| 2313 | + Map<String, Object> map=staticTj(lists); | ||
| 2314 | + lMap.add(map); | ||
| 2315 | + }else{ | ||
| 2316 | + lists=new ArrayList<ScheduleRealInfo>(); | ||
| 2317 | + lists.add(list.get(i)); | ||
| 2318 | + Map<String, Object> map=staticTj(lists); | ||
| 2319 | + lMap.add(map); | ||
| 2320 | + } | ||
| 2321 | + } | ||
| 2322 | + } | ||
| 2323 | + | ||
| 2324 | + Map<String, Object> map = new HashMap<String, Object>(); | ||
| 2325 | + map.put("xlName", "合计"); | ||
| 2326 | + map.put("jhlc", culateService.culateJhgl(list)); | ||
| 2327 | + map.put("sjgl", Arith.add(culateService.culateSjgl(list),culateService.culateLjgl(list))); | ||
| 2328 | + map.put("ssgl", culateService.culateLbgl(list)); | ||
| 2329 | + map.put("ssgl_lz", culateService.culateCJLC(list, "路阻")); | ||
| 2330 | + map.put("ssgl_dm", culateService.culateCJLC(list, "吊慢")); | ||
| 2331 | + map.put("ssgl_gz", culateService.culateCJLC(list, "故障")); | ||
| 2332 | + map.put("ssgl_jf", culateService.culateCJLC(list, "纠纷")); | ||
| 2333 | + map.put("ssgl_zs", culateService.culateCJLC(list, "肇事")); | ||
| 2334 | + map.put("ssgl_qr", culateService.culateCJLC(list, "缺人")); | ||
| 2335 | + map.put("ssgl_qc", culateService.culateCJLC(list, "缺车")); | ||
| 2336 | + map.put("ssgl_kx", culateService.culateCJLC(list, "客稀")); | ||
| 2337 | + map.put("ssgl_qh", culateService.culateCJLC(list, "气候")); | ||
| 2338 | + map.put("ssgl_yw", culateService.culateCJLC(list, "援外")); | ||
| 2339 | + map.put("ssgl_other", culateService.culateCJLC(list, "其他")); | ||
| 2340 | + map.put("ssbc", culateService.culateLbbc(list)); | ||
| 2341 | + map.put("ljgl", culateService.culateLjgl(list)); | ||
| 2342 | + map.put("jhbc", culateService.culateJhbc(list,"")); | ||
| 2343 | + map.put("jhbc_m", culateService.culateJhbc(list, "zgf")); | ||
| 2344 | + map.put("jhbc_a", culateService.culateJhbc(list, "wgf")); | ||
| 2345 | + map.put("sjbc", culateService.culateSjbc(list,"")); | ||
| 2346 | + map.put("sjbc_m", culateService.culateSjbc(list,"zgf")); | ||
| 2347 | + map.put("sjbc_a", culateService.culateSjbc(list,"wgf")); | ||
| 2348 | + map.put("ljbc", culateService.culateLjbc(list,"")); | ||
| 2349 | + map.put("ljbc_m", culateService.culateLjbc(list,"zgf")); | ||
| 2350 | + map.put("ljbc_a", culateService.culateLjbc(list,"wgf")); | ||
| 2351 | + map.put("fzbc", culateService.culateFzbc(list, "")); | ||
| 2352 | + map.put("fzbc_m", culateService.culateFzbc(list, "zgf")); | ||
| 2353 | + map.put("fzbc_a", culateService.culateFzbc(list, "wgf")); | ||
| 2354 | + map.put("dtbc", 0); | ||
| 2355 | + map.put("dtbc_m", 0); | ||
| 2356 | + map.put("dtbc_a", 0); | ||
| 2357 | + map.put("djg", 0); | ||
| 2358 | + map.put("djg_m", 0); | ||
| 2359 | + map.put("djg_a", 0); | ||
| 2360 | + map.put("djg_time", 0); | ||
| 2361 | + lMap.add(map); | ||
| 2773 | if (type != null && type.length() != 0 && type.equals("export")) { | 2362 | if (type != null && type.length() != 0 && type.equals("export")) { |
| 2774 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | 2363 | SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), |
| 2775 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); | 2364 | sdfSimple = new SimpleDateFormat("yyyyMMdd"); |
| @@ -3860,13 +3449,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3860,13 +3449,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3860 | ScheduleRealInfo s = scheduleRealInfoRepository.findOne(id); | 3449 | ScheduleRealInfo s = scheduleRealInfoRepository.findOne(id); |
| 3861 | String xlbm = s.getXlBm(); | 3450 | String xlbm = s.getXlBm(); |
| 3862 | String fcrq = s.getScheduleDateStr(); | 3451 | String fcrq = s.getScheduleDateStr(); |
| 3863 | - //保留两位小数 | ||
| 3864 | - DecimalFormat df = new DecimalFormat("#.00"); | ||
| 3865 | List<Ylxxb> listYlxxb = ylxxbRepository.queryListYlxxb(s.getClZbh(), fcrq); | 3452 | List<Ylxxb> listYlxxb = ylxxbRepository.queryListYlxxb(s.getClZbh(), fcrq); |
| 3866 | Double jzl = 0.0; | 3453 | Double jzl = 0.0; |
| 3867 | for (int t = 0; t < listYlxxb.size(); t++) { | 3454 | for (int t = 0; t < listYlxxb.size(); t++) { |
| 3868 | Ylxxb y = listYlxxb.get(t); | 3455 | Ylxxb y = listYlxxb.get(t); |
| 3869 | - jzl += y.getJzl(); | 3456 | + jzl = Arith.add(jzl, y.getJzl()); |
| 3870 | } | 3457 | } |
| 3871 | 3458 | ||
| 3872 | List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh()); | 3459 | List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh()); |
| @@ -3875,12 +3462,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3875,12 +3462,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3875 | Double yh = 0.0; | 3462 | Double yh = 0.0; |
| 3876 | for (int i = 0; i < listYlb.size(); i++) { | 3463 | for (int i = 0; i < listYlb.size(); i++) { |
| 3877 | Ylb y = listYlb.get(i); | 3464 | Ylb y = listYlb.get(i); |
| 3878 | - ccyl += y.getCzyl(); | ||
| 3879 | - jcyl += y.getJzyl(); | ||
| 3880 | - yh += y.getYh(); | ||
| 3881 | - | 3465 | + ccyl=Arith.add(ccyl, y.getCzyl()); |
| 3466 | + jcyl=Arith.add(jcyl, y.getJzyl()); | ||
| 3467 | + yh =Arith.add(yh ,y.getYh()); | ||
| 3882 | } | 3468 | } |
| 3883 | - map.put("jzl", df.format(jzl)); | 3469 | + map.put("jzl", jzl); |
| 3884 | map.put("yh", yh); | 3470 | map.put("yh", yh); |
| 3885 | map.put("ccyl", ccyl); | 3471 | map.put("ccyl", ccyl); |
| 3886 | map.put("jcyl", jcyl); | 3472 | map.put("jcyl", jcyl); |
| @@ -3981,18 +3567,20 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3981,18 +3567,20 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3981 | 3567 | ||
| 3982 | if (scheduleRealInfo.getsGh() != null) { | 3568 | if (scheduleRealInfo.getsGh() != null) { |
| 3983 | if (!scheduleRealInfo.getsGh().equals(sgh)) { | 3569 | if (!scheduleRealInfo.getsGh().equals(sgh)) { |
| 3984 | - sgh = scheduleRealInfo.getsGh(); | ||
| 3985 | - if (map.get("sjb1") != null) { | ||
| 3986 | - if (map.get("sjb2") != null) { | ||
| 3987 | - map.put("sjb3", scheduleRealInfo.getsGh() + "/" + | ||
| 3988 | - scheduleRealInfo.getFcsjActual()); | ||
| 3989 | - } else { | ||
| 3990 | - map.put("sjb2", scheduleRealInfo.getsGh() + "/" + | ||
| 3991 | - scheduleRealInfo.getFcsjActual()); | ||
| 3992 | - } | ||
| 3993 | - } else { | ||
| 3994 | - map.put("sjb1", scheduleRealInfo.getsGh() + "/" + | ||
| 3995 | - scheduleRealInfo.getFcsjActual()); | 3570 | + sgh = scheduleRealInfo.getsGh()==null?"":scheduleRealInfo.getsGh(); |
| 3571 | + if(!sgh.equals("")){ | ||
| 3572 | + if (map.get("sjb1") != null) { | ||
| 3573 | + if (map.get("sjb2") != null) { | ||
| 3574 | + map.put("sjb3", scheduleRealInfo.getsGh() + "/" + | ||
| 3575 | + scheduleRealInfo.getFcsjActual()); | ||
| 3576 | + } else { | ||
| 3577 | + map.put("sjb2", scheduleRealInfo.getsGh() + "/" + | ||
| 3578 | + scheduleRealInfo.getFcsjActual()); | ||
| 3579 | + } | ||
| 3580 | + } else { | ||
| 3581 | + map.put("sjb1", scheduleRealInfo.getsGh() + "/" + | ||
| 3582 | + scheduleRealInfo.getFcsjActual()); | ||
| 3583 | + } | ||
| 3996 | } | 3584 | } |
| 3997 | } | 3585 | } |
| 3998 | } | 3586 | } |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| @@ -162,7 +162,7 @@ public class ReportServiceImpl implements ReportService{ | @@ -162,7 +162,7 @@ public class ReportServiceImpl implements ReportService{ | ||
| 162 | arr.setLineCode(rs.getString("line_id")); | 162 | arr.setLineCode(rs.getString("line_id")); |
| 163 | arr.setUpDown(rs.getInt("up_down")); | 163 | arr.setUpDown(rs.getInt("up_down")); |
| 164 | arr.setStopNo(rs.getString("stop_no")); | 164 | arr.setStopNo(rs.getString("stop_no")); |
| 165 | - arr.setStopName(BasicData.stationCode2NameMap.get(arr.getStopNo())); | 165 | + arr.setStopName(BasicData.stationCode2NameMap.get(rs.getString("line_id")+"_"+rs.getInt("up_down")+"_"+rs.getString("stop_no"))); |
| 166 | arr.setInOut(rs.getInt("in_out")); | 166 | arr.setInOut(rs.getInt("in_out")); |
| 167 | arr.setCreateDate(rs.getLong("create_timestamp")); | 167 | arr.setCreateDate(rs.getLong("create_timestamp")); |
| 168 | arr.setWeeksYear(rs.getInt("weeks_year")); | 168 | arr.setWeeksYear(rs.getInt("weeks_year")); |
src/main/resources/datatools/ktrs/carsConfigDataOutput.ktr
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<transformation> | ||
| 3 | - <info> | ||
| 4 | - <name>车辆配置信息导出</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>filepath</name> | ||
| 14 | - <default_value/> | ||
| 15 | - <description>excel文件路径</description> | ||
| 16 | - </parameter> | ||
| 17 | - <parameter> | ||
| 18 | - <name>templatepath</name> | ||
| 19 | - <default_value/> | ||
| 20 | - <description>模版文件路径</description> | ||
| 21 | - </parameter> | ||
| 22 | - <parameter> | ||
| 23 | - <name>xlid</name> | ||
| 24 | - <default_value/> | ||
| 25 | - <description>线路id</description> | ||
| 26 | - </parameter> | ||
| 27 | - </parameters> | ||
| 28 | - <log> | ||
| 29 | -<trans-log-table><connection/> | ||
| 30 | -<schema/> | ||
| 31 | -<table/> | ||
| 32 | -<size_limit_lines/> | ||
| 33 | -<interval/> | ||
| 34 | -<timeout_days/> | ||
| 35 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table> | ||
| 36 | -<perf-log-table><connection/> | ||
| 37 | -<schema/> | ||
| 38 | -<table/> | ||
| 39 | -<interval/> | ||
| 40 | -<timeout_days/> | ||
| 41 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table> | ||
| 42 | -<channel-log-table><connection/> | ||
| 43 | -<schema/> | ||
| 44 | -<table/> | ||
| 45 | -<timeout_days/> | ||
| 46 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table> | ||
| 47 | -<step-log-table><connection/> | ||
| 48 | -<schema/> | ||
| 49 | -<table/> | ||
| 50 | -<timeout_days/> | ||
| 51 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table> | ||
| 52 | -<metrics-log-table><connection/> | ||
| 53 | -<schema/> | ||
| 54 | -<table/> | ||
| 55 | -<timeout_days/> | ||
| 56 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table> | ||
| 57 | - </log> | ||
| 58 | - <maxdate> | ||
| 59 | - <connection/> | ||
| 60 | - <table/> | ||
| 61 | - <field/> | ||
| 62 | - <offset>0.0</offset> | ||
| 63 | - <maxdiff>0.0</maxdiff> | ||
| 64 | - </maxdate> | ||
| 65 | - <size_rowset>10000</size_rowset> | ||
| 66 | - <sleep_time_empty>50</sleep_time_empty> | ||
| 67 | - <sleep_time_full>50</sleep_time_full> | ||
| 68 | - <unique_connections>N</unique_connections> | ||
| 69 | - <feedback_shown>Y</feedback_shown> | ||
| 70 | - <feedback_size>50000</feedback_size> | ||
| 71 | - <using_thread_priorities>Y</using_thread_priorities> | ||
| 72 | - <shared_objects_file/> | ||
| 73 | - <capture_step_performance>N</capture_step_performance> | ||
| 74 | - <step_performance_capturing_delay>1000</step_performance_capturing_delay> | ||
| 75 | - <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit> | ||
| 76 | - <dependencies> | ||
| 77 | - </dependencies> | ||
| 78 | - <partitionschemas> | ||
| 79 | - </partitionschemas> | ||
| 80 | - <slaveservers> | ||
| 81 | - </slaveservers> | ||
| 82 | - <clusterschemas> | ||
| 83 | - </clusterschemas> | ||
| 84 | - <created_user>-</created_user> | ||
| 85 | - <created_date>2017/01/11 14:14:13.722</created_date> | ||
| 86 | - <modified_user>-</modified_user> | ||
| 87 | - <modified_date>2017/01/11 14:14:13.722</modified_date> | ||
| 88 | - <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key> | ||
| 89 | - <is_key_private>N</is_key_private> | ||
| 90 | - </info> | ||
| 91 | - <notepads> | ||
| 92 | - <notepad> | ||
| 93 | - <note>这里有些问题
在window2012的环境下,
MySql数据库查询中如果返回中文内容的字段,这个内容乱码
解决办法,就是数据库查询全部缓存,就不乱码
linux环境下没问题</note> | ||
| 94 | - <xloc>81</xloc> | ||
| 95 | - <yloc>172</yloc> | ||
| 96 | - <width>333</width> | ||
| 97 | - <heigth>90</heigth> | ||
| 98 | - <fontname>YaHei Consolas Hybrid</fontname> | ||
| 99 | - <fontsize>12</fontsize> | ||
| 100 | - <fontbold>N</fontbold> | ||
| 101 | - <fontitalic>N</fontitalic> | ||
| 102 | - <fontcolorred>0</fontcolorred> | ||
| 103 | - <fontcolorgreen>0</fontcolorgreen> | ||
| 104 | - <fontcolorblue>0</fontcolorblue> | ||
| 105 | - <backgroundcolorred>255</backgroundcolorred> | ||
| 106 | - <backgroundcolorgreen>205</backgroundcolorgreen> | ||
| 107 | - <backgroundcolorblue>112</backgroundcolorblue> | ||
| 108 | - <bordercolorred>100</bordercolorred> | ||
| 109 | - <bordercolorgreen>100</bordercolorgreen> | ||
| 110 | - <bordercolorblue>100</bordercolorblue> | ||
| 111 | - <drawshadow>Y</drawshadow> | ||
| 112 | - </notepad> | ||
| 113 | - </notepads> | ||
| 114 | - <connection> | ||
| 115 | - <name>bus_control_variable</name> | ||
| 116 | - <server>${v_db_ip}</server> | ||
| 117 | - <type>MYSQL</type> | ||
| 118 | - <access>Native</access> | ||
| 119 | - <database>${v_db_dname}</database> | ||
| 120 | - <port>3306</port> | ||
| 121 | - <username>${v_db_uname}</username> | ||
| 122 | - <password>${v_db_pwd}</password> | ||
| 123 | - <servername/> | ||
| 124 | - <data_tablespace/> | ||
| 125 | - <index_tablespace/> | ||
| 126 | - <attributes> | ||
| 127 | - <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute> | ||
| 128 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 129 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 130 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 131 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 132 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 133 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 134 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 135 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 136 | - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | ||
| 137 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 138 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 139 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 140 | - </attributes> | ||
| 141 | - </connection> | ||
| 142 | - <connection> | ||
| 143 | - <name>bus_control_公司_201</name> | ||
| 144 | - <server>localhost</server> | ||
| 145 | - <type>MYSQL</type> | ||
| 146 | - <access>Native</access> | ||
| 147 | - <database>control</database> | ||
| 148 | - <port>3306</port> | ||
| 149 | - <username>root</username> | ||
| 150 | - <password>Encrypted </password> | ||
| 151 | - <servername/> | ||
| 152 | - <data_tablespace/> | ||
| 153 | - <index_tablespace/> | ||
| 154 | - <attributes> | ||
| 155 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 156 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 157 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 158 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 159 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 160 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 161 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 162 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 163 | - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | ||
| 164 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 165 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 166 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 167 | - </attributes> | ||
| 168 | - </connection> | ||
| 169 | - <connection> | ||
| 170 | - <name>bus_control_本机</name> | ||
| 171 | - <server>localhost</server> | ||
| 172 | - <type>MYSQL</type> | ||
| 173 | - <access>Native</access> | ||
| 174 | - <database>control</database> | ||
| 175 | - <port>3306</port> | ||
| 176 | - <username>root</username> | ||
| 177 | - <password>Encrypted </password> | ||
| 178 | - <servername/> | ||
| 179 | - <data_tablespace/> | ||
| 180 | - <index_tablespace/> | ||
| 181 | - <attributes> | ||
| 182 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 183 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 184 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 185 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 186 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 187 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 188 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 189 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 190 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 191 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 192 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 193 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 194 | - </attributes> | ||
| 195 | - </connection> | ||
| 196 | - <connection> | ||
| 197 | - <name>xlab_mysql_youle</name> | ||
| 198 | - <server>101.231.124.8</server> | ||
| 199 | - <type>MYSQL</type> | ||
| 200 | - <access>Native</access> | ||
| 201 | - <database>xlab_youle</database> | ||
| 202 | - <port>45687</port> | ||
| 203 | - <username>xlab-youle</username> | ||
| 204 | - <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password> | ||
| 205 | - <servername/> | ||
| 206 | - <data_tablespace/> | ||
| 207 | - <index_tablespace/> | ||
| 208 | - <attributes> | ||
| 209 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 210 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 211 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 212 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 213 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 214 | - <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute> | ||
| 215 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 216 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 217 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 218 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 219 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 220 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 221 | - </attributes> | ||
| 222 | - </connection> | ||
| 223 | - <connection> | ||
| 224 | - <name>xlab_mysql_youle(本机)</name> | ||
| 225 | - <server>localhost</server> | ||
| 226 | - <type>MYSQL</type> | ||
| 227 | - <access>Native</access> | ||
| 228 | - <database>xlab_youle</database> | ||
| 229 | - <port>3306</port> | ||
| 230 | - <username>root</username> | ||
| 231 | - <password>Encrypted </password> | ||
| 232 | - <servername/> | ||
| 233 | - <data_tablespace/> | ||
| 234 | - <index_tablespace/> | ||
| 235 | - <attributes> | ||
| 236 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 237 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 238 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 239 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 240 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 241 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 242 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 243 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 244 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 245 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 246 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 247 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 248 | - </attributes> | ||
| 249 | - </connection> | ||
| 250 | - <connection> | ||
| 251 | - <name>xlab_youle</name> | ||
| 252 | - <server/> | ||
| 253 | - <type>MYSQL</type> | ||
| 254 | - <access>JNDI</access> | ||
| 255 | - <database>xlab_youle</database> | ||
| 256 | - <port>1521</port> | ||
| 257 | - <username/> | ||
| 258 | - <password>Encrypted </password> | ||
| 259 | - <servername/> | ||
| 260 | - <data_tablespace/> | ||
| 261 | - <index_tablespace/> | ||
| 262 | - <attributes> | ||
| 263 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 264 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 265 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 266 | - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 267 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 268 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 269 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 270 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 271 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 272 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 273 | - </attributes> | ||
| 274 | - </connection> | ||
| 275 | - <order> | ||
| 276 | - <hop> <from>车辆配置(没有作废)</from><to>线路查询</to><enabled>Y</enabled> </hop> | ||
| 277 | - <hop> <from>线路查询</from><to>车辆查询</to><enabled>Y</enabled> </hop> | ||
| 278 | - <hop> <from>车辆查询</from><to>格式化日期</to><enabled>Y</enabled> </hop> | ||
| 279 | - <hop> <from>格式化日期</from><to>排序记录</to><enabled>Y</enabled> </hop> | ||
| 280 | - <hop> <from>排序记录</from><to>字段选择</to><enabled>Y</enabled> </hop> | ||
| 281 | - <hop> <from>字段选择</from><to>Excel输出</to><enabled>Y</enabled> </hop> | ||
| 282 | - </order> | ||
| 283 | - <step> | ||
| 284 | - <name>Excel输出</name> | ||
| 285 | - <type>ExcelOutput</type> | ||
| 286 | - <description/> | ||
| 287 | - <distribute>Y</distribute> | ||
| 288 | - <custom_distribution/> | ||
| 289 | - <copies>1</copies> | ||
| 290 | - <partitioning> | ||
| 291 | - <method>none</method> | ||
| 292 | - <schema_name/> | ||
| 293 | - </partitioning> | ||
| 294 | - <header>Y</header> | ||
| 295 | - <footer>N</footer> | ||
| 296 | - <encoding/> | ||
| 297 | - <append>N</append> | ||
| 298 | - <add_to_result_filenames>Y</add_to_result_filenames> | ||
| 299 | - <file> | ||
| 300 | - <name>${filepath}</name> | ||
| 301 | - <extention/> | ||
| 302 | - <do_not_open_newfile_init>N</do_not_open_newfile_init> | ||
| 303 | - <create_parent_folder>N</create_parent_folder> | ||
| 304 | - <split>N</split> | ||
| 305 | - <add_date>N</add_date> | ||
| 306 | - <add_time>N</add_time> | ||
| 307 | - <SpecifyFormat>N</SpecifyFormat> | ||
| 308 | - <date_time_format>yyyyMMddHHmmss</date_time_format> | ||
| 309 | - <sheetname>工作表1</sheetname> | ||
| 310 | - <autosizecolums>N</autosizecolums> | ||
| 311 | - <nullisblank>N</nullisblank> | ||
| 312 | - <protect_sheet>N</protect_sheet> | ||
| 313 | - <password>Encrypted </password> | ||
| 314 | - <splitevery>0</splitevery> | ||
| 315 | - <usetempfiles>N</usetempfiles> | ||
| 316 | - <tempdirectory/> | ||
| 317 | - </file> | ||
| 318 | - <template> | ||
| 319 | - <enabled>N</enabled> | ||
| 320 | - <append>N</append> | ||
| 321 | - <filename>template.xls</filename> | ||
| 322 | - </template> | ||
| 323 | - <fields> | ||
| 324 | - <field> | ||
| 325 | - <name>线路</name> | ||
| 326 | - <type>String</type> | ||
| 327 | - <format/> | ||
| 328 | - </field> | ||
| 329 | - <field> | ||
| 330 | - <name>内部编码</name> | ||
| 331 | - <type>String</type> | ||
| 332 | - <format/> | ||
| 333 | - </field> | ||
| 334 | - <field> | ||
| 335 | - <name>启用日期</name> | ||
| 336 | - <type>String</type> | ||
| 337 | - <format/> | ||
| 338 | - </field> | ||
| 339 | - <field> | ||
| 340 | - <name>终结日期</name> | ||
| 341 | - <type>String</type> | ||
| 342 | - <format/> | ||
| 343 | - </field> | ||
| 344 | - <field> | ||
| 345 | - <name>停车点</name> | ||
| 346 | - <type>String</type> | ||
| 347 | - <format/> | ||
| 348 | - </field> | ||
| 349 | - </fields> | ||
| 350 | - <custom> | ||
| 351 | - <header_font_name>arial</header_font_name> | ||
| 352 | - <header_font_size>10</header_font_size> | ||
| 353 | - <header_font_bold>N</header_font_bold> | ||
| 354 | - <header_font_italic>N</header_font_italic> | ||
| 355 | - <header_font_underline>no</header_font_underline> | ||
| 356 | - <header_font_orientation>horizontal</header_font_orientation> | ||
| 357 | - <header_font_color>black</header_font_color> | ||
| 358 | - <header_background_color>none</header_background_color> | ||
| 359 | - <header_row_height>255</header_row_height> | ||
| 360 | - <header_alignment>left</header_alignment> | ||
| 361 | - <header_image/> | ||
| 362 | - <row_font_name>arial</row_font_name> | ||
| 363 | - <row_font_size>10</row_font_size> | ||
| 364 | - <row_font_color>black</row_font_color> | ||
| 365 | - <row_background_color>none</row_background_color> | ||
| 366 | - </custom> | ||
| 367 | - <cluster_schema/> | ||
| 368 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 369 | - <xloc>596</xloc> | ||
| 370 | - <yloc>265</yloc> | ||
| 371 | - <draw>Y</draw> | ||
| 372 | - </GUI> | ||
| 373 | - </step> | ||
| 374 | - | ||
| 375 | - <step> | ||
| 376 | - <name>字段选择</name> | ||
| 377 | - <type>SelectValues</type> | ||
| 378 | - <description/> | ||
| 379 | - <distribute>Y</distribute> | ||
| 380 | - <custom_distribution/> | ||
| 381 | - <copies>1</copies> | ||
| 382 | - <partitioning> | ||
| 383 | - <method>none</method> | ||
| 384 | - <schema_name/> | ||
| 385 | - </partitioning> | ||
| 386 | - <fields> <field> <name>xlmc</name> | ||
| 387 | - <rename>线路</rename> | ||
| 388 | - <length>-2</length> | ||
| 389 | - <precision>-2</precision> | ||
| 390 | - </field> <field> <name>zbh</name> | ||
| 391 | - <rename>内部编码</rename> | ||
| 392 | - <length>-2</length> | ||
| 393 | - <precision>-2</precision> | ||
| 394 | - </field> <field> <name>qyrq</name> | ||
| 395 | - <rename>启用日期</rename> | ||
| 396 | - <length>-2</length> | ||
| 397 | - <precision>-2</precision> | ||
| 398 | - </field> <field> <name>zzrq</name> | ||
| 399 | - <rename>终结日期</rename> | ||
| 400 | - <length>-2</length> | ||
| 401 | - <precision>-2</precision> | ||
| 402 | - </field> <field> <name>tcd</name> | ||
| 403 | - <rename>停车点</rename> | ||
| 404 | - <length>-2</length> | ||
| 405 | - <precision>-2</precision> | ||
| 406 | - </field> <select_unspecified>N</select_unspecified> | ||
| 407 | - </fields> <cluster_schema/> | ||
| 408 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 409 | - <xloc>595</xloc> | ||
| 410 | - <yloc>167</yloc> | ||
| 411 | - <draw>Y</draw> | ||
| 412 | - </GUI> | ||
| 413 | - </step> | ||
| 414 | - | ||
| 415 | - <step> | ||
| 416 | - <name>排序记录</name> | ||
| 417 | - <type>SortRows</type> | ||
| 418 | - <description/> | ||
| 419 | - <distribute>Y</distribute> | ||
| 420 | - <custom_distribution/> | ||
| 421 | - <copies>1</copies> | ||
| 422 | - <partitioning> | ||
| 423 | - <method>none</method> | ||
| 424 | - <schema_name/> | ||
| 425 | - </partitioning> | ||
| 426 | - <directory>%%java.io.tmpdir%%</directory> | ||
| 427 | - <prefix>out</prefix> | ||
| 428 | - <sort_size>1000000</sort_size> | ||
| 429 | - <free_memory/> | ||
| 430 | - <compress>N</compress> | ||
| 431 | - <compress_variable/> | ||
| 432 | - <unique_rows>N</unique_rows> | ||
| 433 | - <fields> | ||
| 434 | - <field> | ||
| 435 | - <name>xlmc</name> | ||
| 436 | - <ascending>Y</ascending> | ||
| 437 | - <case_sensitive>N</case_sensitive> | ||
| 438 | - <presorted>N</presorted> | ||
| 439 | - </field> | ||
| 440 | - <field> | ||
| 441 | - <name>zbh</name> | ||
| 442 | - <ascending>Y</ascending> | ||
| 443 | - <case_sensitive>N</case_sensitive> | ||
| 444 | - <presorted>N</presorted> | ||
| 445 | - </field> | ||
| 446 | - <field> | ||
| 447 | - <name>qyrq</name> | ||
| 448 | - <ascending>Y</ascending> | ||
| 449 | - <case_sensitive>N</case_sensitive> | ||
| 450 | - <presorted>N</presorted> | ||
| 451 | - </field> | ||
| 452 | - </fields> | ||
| 453 | - <cluster_schema/> | ||
| 454 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 455 | - <xloc>592</xloc> | ||
| 456 | - <yloc>66</yloc> | ||
| 457 | - <draw>Y</draw> | ||
| 458 | - </GUI> | ||
| 459 | - </step> | ||
| 460 | - | ||
| 461 | - <step> | ||
| 462 | - <name>格式化日期</name> | ||
| 463 | - <type>SelectValues</type> | ||
| 464 | - <description/> | ||
| 465 | - <distribute>Y</distribute> | ||
| 466 | - <custom_distribution/> | ||
| 467 | - <copies>1</copies> | ||
| 468 | - <partitioning> | ||
| 469 | - <method>none</method> | ||
| 470 | - <schema_name/> | ||
| 471 | - </partitioning> | ||
| 472 | - <fields> <select_unspecified>N</select_unspecified> | ||
| 473 | - <meta> <name>qyrq</name> | ||
| 474 | - <rename>qyrq</rename> | ||
| 475 | - <type>String</type> | ||
| 476 | - <length>-2</length> | ||
| 477 | - <precision>-2</precision> | ||
| 478 | - <conversion_mask>yyyy-MM-dd</conversion_mask> | ||
| 479 | - <date_format_lenient>false</date_format_lenient> | ||
| 480 | - <date_format_locale/> | ||
| 481 | - <date_format_timezone/> | ||
| 482 | - <lenient_string_to_number>false</lenient_string_to_number> | ||
| 483 | - <encoding/> | ||
| 484 | - <decimal_symbol/> | ||
| 485 | - <grouping_symbol/> | ||
| 486 | - <currency_symbol/> | ||
| 487 | - <storage_type/> | ||
| 488 | - </meta> <meta> <name>zzrq</name> | ||
| 489 | - <rename>zzrq</rename> | ||
| 490 | - <type>String</type> | ||
| 491 | - <length>-2</length> | ||
| 492 | - <precision>-2</precision> | ||
| 493 | - <conversion_mask>yyyy-MM-dd</conversion_mask> | ||
| 494 | - <date_format_lenient>false</date_format_lenient> | ||
| 495 | - <date_format_locale/> | ||
| 496 | - <date_format_timezone/> | ||
| 497 | - <lenient_string_to_number>false</lenient_string_to_number> | ||
| 498 | - <encoding/> | ||
| 499 | - <decimal_symbol/> | ||
| 500 | - <grouping_symbol/> | ||
| 501 | - <currency_symbol/> | ||
| 502 | - <storage_type/> | ||
| 503 | - </meta> </fields> <cluster_schema/> | ||
| 504 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 505 | - <xloc>478</xloc> | ||
| 506 | - <yloc>66</yloc> | ||
| 507 | - <draw>Y</draw> | ||
| 508 | - </GUI> | ||
| 509 | - </step> | ||
| 510 | - | ||
| 511 | - <step> | ||
| 512 | - <name>线路查询</name> | ||
| 513 | - <type>DBLookup</type> | ||
| 514 | - <description/> | ||
| 515 | - <distribute>Y</distribute> | ||
| 516 | - <custom_distribution/> | ||
| 517 | - <copies>1</copies> | ||
| 518 | - <partitioning> | ||
| 519 | - <method>none</method> | ||
| 520 | - <schema_name/> | ||
| 521 | - </partitioning> | ||
| 522 | - <connection>bus_control_variable</connection> | ||
| 523 | - <cache>Y</cache> | ||
| 524 | - <cache_load_all>Y</cache_load_all> | ||
| 525 | - <cache_size>0</cache_size> | ||
| 526 | - <lookup> | ||
| 527 | - <schema/> | ||
| 528 | - <table>bsth_c_line</table> | ||
| 529 | - <orderby/> | ||
| 530 | - <fail_on_multiple>N</fail_on_multiple> | ||
| 531 | - <eat_row_on_failure>N</eat_row_on_failure> | ||
| 532 | - <key> | ||
| 533 | - <name>xl</name> | ||
| 534 | - <field>id</field> | ||
| 535 | - <condition>=</condition> | ||
| 536 | - <name2/> | ||
| 537 | - </key> | ||
| 538 | - <value> | ||
| 539 | - <name>name</name> | ||
| 540 | - <rename>xlmc</rename> | ||
| 541 | - <default/> | ||
| 542 | - <type>String</type> | ||
| 543 | - </value> | ||
| 544 | - </lookup> | ||
| 545 | - <cluster_schema/> | ||
| 546 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 547 | - <xloc>248</xloc> | ||
| 548 | - <yloc>67</yloc> | ||
| 549 | - <draw>Y</draw> | ||
| 550 | - </GUI> | ||
| 551 | - </step> | ||
| 552 | - | ||
| 553 | - <step> | ||
| 554 | - <name>车辆查询</name> | ||
| 555 | - <type>DBLookup</type> | ||
| 556 | - <description/> | ||
| 557 | - <distribute>Y</distribute> | ||
| 558 | - <custom_distribution/> | ||
| 559 | - <copies>1</copies> | ||
| 560 | - <partitioning> | ||
| 561 | - <method>none</method> | ||
| 562 | - <schema_name/> | ||
| 563 | - </partitioning> | ||
| 564 | - <connection>bus_control_variable</connection> | ||
| 565 | - <cache>N</cache> | ||
| 566 | - <cache_load_all>N</cache_load_all> | ||
| 567 | - <cache_size>0</cache_size> | ||
| 568 | - <lookup> | ||
| 569 | - <schema/> | ||
| 570 | - <table>bsth_c_cars</table> | ||
| 571 | - <orderby/> | ||
| 572 | - <fail_on_multiple>N</fail_on_multiple> | ||
| 573 | - <eat_row_on_failure>N</eat_row_on_failure> | ||
| 574 | - <key> | ||
| 575 | - <name>cl</name> | ||
| 576 | - <field>id</field> | ||
| 577 | - <condition>=</condition> | ||
| 578 | - <name2/> | ||
| 579 | - </key> | ||
| 580 | - <value> | ||
| 581 | - <name>inside_code</name> | ||
| 582 | - <rename>zbh</rename> | ||
| 583 | - <default/> | ||
| 584 | - <type>String</type> | ||
| 585 | - </value> | ||
| 586 | - </lookup> | ||
| 587 | - <cluster_schema/> | ||
| 588 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 589 | - <xloc>361</xloc> | ||
| 590 | - <yloc>67</yloc> | ||
| 591 | - <draw>Y</draw> | ||
| 592 | - </GUI> | ||
| 593 | - </step> | ||
| 594 | - | ||
| 595 | - <step> | ||
| 596 | - <name>车辆配置(没有作废)</name> | ||
| 597 | - <type>TableInput</type> | ||
| 598 | - <description/> | ||
| 599 | - <distribute>Y</distribute> | ||
| 600 | - <custom_distribution/> | ||
| 601 | - <copies>1</copies> | ||
| 602 | - <partitioning> | ||
| 603 | - <method>none</method> | ||
| 604 | - <schema_name/> | ||
| 605 | - </partitioning> | ||
| 606 | - <connection>bus_control_variable</connection> | ||
| 607 | - <sql>select * from bsth_c_s_ccinfo where is_cancel = 0 and xl = ${xlid}</sql> | ||
| 608 | - <limit>0</limit> | ||
| 609 | - <lookup/> | ||
| 610 | - <execute_each_row>N</execute_each_row> | ||
| 611 | - <variables_active>Y</variables_active> | ||
| 612 | - <lazy_conversion_active>N</lazy_conversion_active> | ||
| 613 | - <cluster_schema/> | ||
| 614 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 615 | - <xloc>106</xloc> | ||
| 616 | - <yloc>68</yloc> | ||
| 617 | - <draw>Y</draw> | ||
| 618 | - </GUI> | ||
| 619 | - </step> | ||
| 620 | - | ||
| 621 | - <step_error_handling> | ||
| 622 | - </step_error_handling> | ||
| 623 | - <slave-step-copy-partition-distribution> | ||
| 624 | -</slave-step-copy-partition-distribution> | ||
| 625 | - <slave_transformation>N</slave_transformation> | ||
| 626 | - | ||
| 627 | -</transformation> | 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<transformation> | ||
| 3 | + <info> | ||
| 4 | + <name>车辆配置信息导出</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>filepath</name> | ||
| 14 | + <default_value/> | ||
| 15 | + <description>excel文件路径</description> | ||
| 16 | + </parameter> | ||
| 17 | + <parameter> | ||
| 18 | + <name>templatepath</name> | ||
| 19 | + <default_value/> | ||
| 20 | + <description>模版文件路径</description> | ||
| 21 | + </parameter> | ||
| 22 | + <parameter> | ||
| 23 | + <name>xlid</name> | ||
| 24 | + <default_value/> | ||
| 25 | + <description>线路id</description> | ||
| 26 | + </parameter> | ||
| 27 | + </parameters> | ||
| 28 | + <log> | ||
| 29 | +<trans-log-table><connection/> | ||
| 30 | +<schema/> | ||
| 31 | +<table/> | ||
| 32 | +<size_limit_lines/> | ||
| 33 | +<interval/> | ||
| 34 | +<timeout_days/> | ||
| 35 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table> | ||
| 36 | +<perf-log-table><connection/> | ||
| 37 | +<schema/> | ||
| 38 | +<table/> | ||
| 39 | +<interval/> | ||
| 40 | +<timeout_days/> | ||
| 41 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table> | ||
| 42 | +<channel-log-table><connection/> | ||
| 43 | +<schema/> | ||
| 44 | +<table/> | ||
| 45 | +<timeout_days/> | ||
| 46 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table> | ||
| 47 | +<step-log-table><connection/> | ||
| 48 | +<schema/> | ||
| 49 | +<table/> | ||
| 50 | +<timeout_days/> | ||
| 51 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table> | ||
| 52 | +<metrics-log-table><connection/> | ||
| 53 | +<schema/> | ||
| 54 | +<table/> | ||
| 55 | +<timeout_days/> | ||
| 56 | +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table> | ||
| 57 | + </log> | ||
| 58 | + <maxdate> | ||
| 59 | + <connection/> | ||
| 60 | + <table/> | ||
| 61 | + <field/> | ||
| 62 | + <offset>0.0</offset> | ||
| 63 | + <maxdiff>0.0</maxdiff> | ||
| 64 | + </maxdate> | ||
| 65 | + <size_rowset>10000</size_rowset> | ||
| 66 | + <sleep_time_empty>50</sleep_time_empty> | ||
| 67 | + <sleep_time_full>50</sleep_time_full> | ||
| 68 | + <unique_connections>N</unique_connections> | ||
| 69 | + <feedback_shown>Y</feedback_shown> | ||
| 70 | + <feedback_size>50000</feedback_size> | ||
| 71 | + <using_thread_priorities>Y</using_thread_priorities> | ||
| 72 | + <shared_objects_file/> | ||
| 73 | + <capture_step_performance>N</capture_step_performance> | ||
| 74 | + <step_performance_capturing_delay>1000</step_performance_capturing_delay> | ||
| 75 | + <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit> | ||
| 76 | + <dependencies> | ||
| 77 | + </dependencies> | ||
| 78 | + <partitionschemas> | ||
| 79 | + </partitionschemas> | ||
| 80 | + <slaveservers> | ||
| 81 | + </slaveservers> | ||
| 82 | + <clusterschemas> | ||
| 83 | + </clusterschemas> | ||
| 84 | + <created_user>-</created_user> | ||
| 85 | + <created_date>2017/01/11 14:14:13.722</created_date> | ||
| 86 | + <modified_user>-</modified_user> | ||
| 87 | + <modified_date>2017/01/11 14:14:13.722</modified_date> | ||
| 88 | + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key> | ||
| 89 | + <is_key_private>N</is_key_private> | ||
| 90 | + </info> | ||
| 91 | + <notepads> | ||
| 92 | + <notepad> | ||
| 93 | + <note>这里有些问题
在window2012的环境下,
MySql数据库查询中如果返回中文内容的字段,这个内容乱码
解决办法,就是数据库查询全部缓存,就不乱码
linux环境下没问题</note> | ||
| 94 | + <xloc>81</xloc> | ||
| 95 | + <yloc>172</yloc> | ||
| 96 | + <width>333</width> | ||
| 97 | + <heigth>90</heigth> | ||
| 98 | + <fontname>YaHei Consolas Hybrid</fontname> | ||
| 99 | + <fontsize>12</fontsize> | ||
| 100 | + <fontbold>N</fontbold> | ||
| 101 | + <fontitalic>N</fontitalic> | ||
| 102 | + <fontcolorred>0</fontcolorred> | ||
| 103 | + <fontcolorgreen>0</fontcolorgreen> | ||
| 104 | + <fontcolorblue>0</fontcolorblue> | ||
| 105 | + <backgroundcolorred>255</backgroundcolorred> | ||
| 106 | + <backgroundcolorgreen>205</backgroundcolorgreen> | ||
| 107 | + <backgroundcolorblue>112</backgroundcolorblue> | ||
| 108 | + <bordercolorred>100</bordercolorred> | ||
| 109 | + <bordercolorgreen>100</bordercolorgreen> | ||
| 110 | + <bordercolorblue>100</bordercolorblue> | ||
| 111 | + <drawshadow>Y</drawshadow> | ||
| 112 | + </notepad> | ||
| 113 | + </notepads> | ||
| 114 | + <connection> | ||
| 115 | + <name>bus_control_variable</name> | ||
| 116 | + <server>${v_db_ip}</server> | ||
| 117 | + <type>MYSQL</type> | ||
| 118 | + <access>Native</access> | ||
| 119 | + <database>${v_db_dname}</database> | ||
| 120 | + <port>3306</port> | ||
| 121 | + <username>${v_db_uname}</username> | ||
| 122 | + <password>${v_db_pwd}</password> | ||
| 123 | + <servername/> | ||
| 124 | + <data_tablespace/> | ||
| 125 | + <index_tablespace/> | ||
| 126 | + <attributes> | ||
| 127 | + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute> | ||
| 128 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 129 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 130 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 131 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 132 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 133 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 134 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 135 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 136 | + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | ||
| 137 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 138 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 139 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 140 | + </attributes> | ||
| 141 | + </connection> | ||
| 142 | + <connection> | ||
| 143 | + <name>bus_control_公司_201</name> | ||
| 144 | + <server>localhost</server> | ||
| 145 | + <type>MYSQL</type> | ||
| 146 | + <access>Native</access> | ||
| 147 | + <database>control</database> | ||
| 148 | + <port>3306</port> | ||
| 149 | + <username>root</username> | ||
| 150 | + <password>Encrypted </password> | ||
| 151 | + <servername/> | ||
| 152 | + <data_tablespace/> | ||
| 153 | + <index_tablespace/> | ||
| 154 | + <attributes> | ||
| 155 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 156 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 157 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 158 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 159 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 160 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 161 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 162 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 163 | + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | ||
| 164 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 165 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 166 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 167 | + </attributes> | ||
| 168 | + </connection> | ||
| 169 | + <connection> | ||
| 170 | + <name>bus_control_本机</name> | ||
| 171 | + <server>localhost</server> | ||
| 172 | + <type>MYSQL</type> | ||
| 173 | + <access>Native</access> | ||
| 174 | + <database>control</database> | ||
| 175 | + <port>3306</port> | ||
| 176 | + <username>root</username> | ||
| 177 | + <password>Encrypted </password> | ||
| 178 | + <servername/> | ||
| 179 | + <data_tablespace/> | ||
| 180 | + <index_tablespace/> | ||
| 181 | + <attributes> | ||
| 182 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 183 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 184 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 185 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 186 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 187 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 188 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 189 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 190 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 191 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 192 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 193 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 194 | + </attributes> | ||
| 195 | + </connection> | ||
| 196 | + <connection> | ||
| 197 | + <name>xlab_mysql_youle</name> | ||
| 198 | + <server>101.231.124.8</server> | ||
| 199 | + <type>MYSQL</type> | ||
| 200 | + <access>Native</access> | ||
| 201 | + <database>xlab_youle</database> | ||
| 202 | + <port>45687</port> | ||
| 203 | + <username>xlab-youle</username> | ||
| 204 | + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password> | ||
| 205 | + <servername/> | ||
| 206 | + <data_tablespace/> | ||
| 207 | + <index_tablespace/> | ||
| 208 | + <attributes> | ||
| 209 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 210 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 211 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 212 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 213 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 214 | + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute> | ||
| 215 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 216 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 217 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 218 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 219 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 220 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 221 | + </attributes> | ||
| 222 | + </connection> | ||
| 223 | + <connection> | ||
| 224 | + <name>xlab_mysql_youle(本机)</name> | ||
| 225 | + <server>localhost</server> | ||
| 226 | + <type>MYSQL</type> | ||
| 227 | + <access>Native</access> | ||
| 228 | + <database>xlab_youle</database> | ||
| 229 | + <port>3306</port> | ||
| 230 | + <username>root</username> | ||
| 231 | + <password>Encrypted </password> | ||
| 232 | + <servername/> | ||
| 233 | + <data_tablespace/> | ||
| 234 | + <index_tablespace/> | ||
| 235 | + <attributes> | ||
| 236 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 237 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 238 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 239 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 240 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 241 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 242 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 243 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 244 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 245 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 246 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 247 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 248 | + </attributes> | ||
| 249 | + </connection> | ||
| 250 | + <connection> | ||
| 251 | + <name>xlab_youle</name> | ||
| 252 | + <server/> | ||
| 253 | + <type>MYSQL</type> | ||
| 254 | + <access>JNDI</access> | ||
| 255 | + <database>xlab_youle</database> | ||
| 256 | + <port>1521</port> | ||
| 257 | + <username/> | ||
| 258 | + <password>Encrypted </password> | ||
| 259 | + <servername/> | ||
| 260 | + <data_tablespace/> | ||
| 261 | + <index_tablespace/> | ||
| 262 | + <attributes> | ||
| 263 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 264 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 265 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 266 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 267 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 268 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 269 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 270 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 271 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 272 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 273 | + </attributes> | ||
| 274 | + </connection> | ||
| 275 | + <order> | ||
| 276 | + <hop> <from>车辆配置(没有作废)</from><to>线路查询</to><enabled>Y</enabled> </hop> | ||
| 277 | + <hop> <from>线路查询</from><to>车辆查询</to><enabled>Y</enabled> </hop> | ||
| 278 | + <hop> <from>车辆查询</from><to>格式化日期</to><enabled>Y</enabled> </hop> | ||
| 279 | + <hop> <from>格式化日期</from><to>排序记录</to><enabled>Y</enabled> </hop> | ||
| 280 | + <hop> <from>排序记录</from><to>字段选择</to><enabled>Y</enabled> </hop> | ||
| 281 | + <hop> <from>字段选择</from><to>Excel输出</to><enabled>Y</enabled> </hop> | ||
| 282 | + </order> | ||
| 283 | + <step> | ||
| 284 | + <name>Excel输出</name> | ||
| 285 | + <type>ExcelOutput</type> | ||
| 286 | + <description/> | ||
| 287 | + <distribute>Y</distribute> | ||
| 288 | + <custom_distribution/> | ||
| 289 | + <copies>1</copies> | ||
| 290 | + <partitioning> | ||
| 291 | + <method>none</method> | ||
| 292 | + <schema_name/> | ||
| 293 | + </partitioning> | ||
| 294 | + <header>Y</header> | ||
| 295 | + <footer>N</footer> | ||
| 296 | + <encoding/> | ||
| 297 | + <append>N</append> | ||
| 298 | + <add_to_result_filenames>Y</add_to_result_filenames> | ||
| 299 | + <file> | ||
| 300 | + <name>${filepath}</name> | ||
| 301 | + <extention/> | ||
| 302 | + <do_not_open_newfile_init>N</do_not_open_newfile_init> | ||
| 303 | + <create_parent_folder>N</create_parent_folder> | ||
| 304 | + <split>N</split> | ||
| 305 | + <add_date>N</add_date> | ||
| 306 | + <add_time>N</add_time> | ||
| 307 | + <SpecifyFormat>N</SpecifyFormat> | ||
| 308 | + <date_time_format>yyyyMMddHHmmss</date_time_format> | ||
| 309 | + <sheetname>工作表1</sheetname> | ||
| 310 | + <autosizecolums>N</autosizecolums> | ||
| 311 | + <nullisblank>N</nullisblank> | ||
| 312 | + <protect_sheet>N</protect_sheet> | ||
| 313 | + <password>Encrypted </password> | ||
| 314 | + <splitevery>0</splitevery> | ||
| 315 | + <usetempfiles>N</usetempfiles> | ||
| 316 | + <tempdirectory/> | ||
| 317 | + </file> | ||
| 318 | + <template> | ||
| 319 | + <enabled>N</enabled> | ||
| 320 | + <append>N</append> | ||
| 321 | + <filename>template.xls</filename> | ||
| 322 | + </template> | ||
| 323 | + <fields> | ||
| 324 | + <field> | ||
| 325 | + <name>线路</name> | ||
| 326 | + <type>String</type> | ||
| 327 | + <format/> | ||
| 328 | + </field> | ||
| 329 | + <field> | ||
| 330 | + <name>内部编码</name> | ||
| 331 | + <type>String</type> | ||
| 332 | + <format/> | ||
| 333 | + </field> | ||
| 334 | + <field> | ||
| 335 | + <name>启用日期</name> | ||
| 336 | + <type>String</type> | ||
| 337 | + <format/> | ||
| 338 | + </field> | ||
| 339 | + <field> | ||
| 340 | + <name>终结日期</name> | ||
| 341 | + <type>String</type> | ||
| 342 | + <format/> | ||
| 343 | + </field> | ||
| 344 | + <field> | ||
| 345 | + <name>停车点</name> | ||
| 346 | + <type>String</type> | ||
| 347 | + <format/> | ||
| 348 | + </field> | ||
| 349 | + </fields> | ||
| 350 | + <custom> | ||
| 351 | + <header_font_name>arial</header_font_name> | ||
| 352 | + <header_font_size>10</header_font_size> | ||
| 353 | + <header_font_bold>N</header_font_bold> | ||
| 354 | + <header_font_italic>N</header_font_italic> | ||
| 355 | + <header_font_underline>no</header_font_underline> | ||
| 356 | + <header_font_orientation>horizontal</header_font_orientation> | ||
| 357 | + <header_font_color>black</header_font_color> | ||
| 358 | + <header_background_color>none</header_background_color> | ||
| 359 | + <header_row_height>255</header_row_height> | ||
| 360 | + <header_alignment>left</header_alignment> | ||
| 361 | + <header_image/> | ||
| 362 | + <row_font_name>arial</row_font_name> | ||
| 363 | + <row_font_size>10</row_font_size> | ||
| 364 | + <row_font_color>black</row_font_color> | ||
| 365 | + <row_background_color>none</row_background_color> | ||
| 366 | + </custom> | ||
| 367 | + <cluster_schema/> | ||
| 368 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 369 | + <xloc>596</xloc> | ||
| 370 | + <yloc>265</yloc> | ||
| 371 | + <draw>Y</draw> | ||
| 372 | + </GUI> | ||
| 373 | + </step> | ||
| 374 | + | ||
| 375 | + <step> | ||
| 376 | + <name>字段选择</name> | ||
| 377 | + <type>SelectValues</type> | ||
| 378 | + <description/> | ||
| 379 | + <distribute>Y</distribute> | ||
| 380 | + <custom_distribution/> | ||
| 381 | + <copies>1</copies> | ||
| 382 | + <partitioning> | ||
| 383 | + <method>none</method> | ||
| 384 | + <schema_name/> | ||
| 385 | + </partitioning> | ||
| 386 | + <fields> <field> <name>xlmc</name> | ||
| 387 | + <rename>线路</rename> | ||
| 388 | + <length>-2</length> | ||
| 389 | + <precision>-2</precision> | ||
| 390 | + </field> <field> <name>zbh</name> | ||
| 391 | + <rename>内部编码</rename> | ||
| 392 | + <length>-2</length> | ||
| 393 | + <precision>-2</precision> | ||
| 394 | + </field> <field> <name>qyrq</name> | ||
| 395 | + <rename>启用日期</rename> | ||
| 396 | + <length>-2</length> | ||
| 397 | + <precision>-2</precision> | ||
| 398 | + </field> <field> <name>zzrq</name> | ||
| 399 | + <rename>终结日期</rename> | ||
| 400 | + <length>-2</length> | ||
| 401 | + <precision>-2</precision> | ||
| 402 | + </field> <field> <name>tcd</name> | ||
| 403 | + <rename>停车点</rename> | ||
| 404 | + <length>-2</length> | ||
| 405 | + <precision>-2</precision> | ||
| 406 | + </field> <select_unspecified>N</select_unspecified> | ||
| 407 | + </fields> <cluster_schema/> | ||
| 408 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 409 | + <xloc>595</xloc> | ||
| 410 | + <yloc>167</yloc> | ||
| 411 | + <draw>Y</draw> | ||
| 412 | + </GUI> | ||
| 413 | + </step> | ||
| 414 | + | ||
| 415 | + <step> | ||
| 416 | + <name>排序记录</name> | ||
| 417 | + <type>SortRows</type> | ||
| 418 | + <description/> | ||
| 419 | + <distribute>Y</distribute> | ||
| 420 | + <custom_distribution/> | ||
| 421 | + <copies>1</copies> | ||
| 422 | + <partitioning> | ||
| 423 | + <method>none</method> | ||
| 424 | + <schema_name/> | ||
| 425 | + </partitioning> | ||
| 426 | + <directory>%%java.io.tmpdir%%</directory> | ||
| 427 | + <prefix>out</prefix> | ||
| 428 | + <sort_size>1000000</sort_size> | ||
| 429 | + <free_memory/> | ||
| 430 | + <compress>N</compress> | ||
| 431 | + <compress_variable/> | ||
| 432 | + <unique_rows>N</unique_rows> | ||
| 433 | + <fields> | ||
| 434 | + <field> | ||
| 435 | + <name>xlmc</name> | ||
| 436 | + <ascending>Y</ascending> | ||
| 437 | + <case_sensitive>N</case_sensitive> | ||
| 438 | + <presorted>N</presorted> | ||
| 439 | + </field> | ||
| 440 | + <field> | ||
| 441 | + <name>zbh</name> | ||
| 442 | + <ascending>Y</ascending> | ||
| 443 | + <case_sensitive>N</case_sensitive> | ||
| 444 | + <presorted>N</presorted> | ||
| 445 | + </field> | ||
| 446 | + <field> | ||
| 447 | + <name>qyrq</name> | ||
| 448 | + <ascending>Y</ascending> | ||
| 449 | + <case_sensitive>N</case_sensitive> | ||
| 450 | + <presorted>N</presorted> | ||
| 451 | + </field> | ||
| 452 | + </fields> | ||
| 453 | + <cluster_schema/> | ||
| 454 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 455 | + <xloc>592</xloc> | ||
| 456 | + <yloc>66</yloc> | ||
| 457 | + <draw>Y</draw> | ||
| 458 | + </GUI> | ||
| 459 | + </step> | ||
| 460 | + | ||
| 461 | + <step> | ||
| 462 | + <name>格式化日期</name> | ||
| 463 | + <type>SelectValues</type> | ||
| 464 | + <description/> | ||
| 465 | + <distribute>Y</distribute> | ||
| 466 | + <custom_distribution/> | ||
| 467 | + <copies>1</copies> | ||
| 468 | + <partitioning> | ||
| 469 | + <method>none</method> | ||
| 470 | + <schema_name/> | ||
| 471 | + </partitioning> | ||
| 472 | + <fields> <select_unspecified>N</select_unspecified> | ||
| 473 | + <meta> <name>qyrq</name> | ||
| 474 | + <rename>qyrq</rename> | ||
| 475 | + <type>String</type> | ||
| 476 | + <length>-2</length> | ||
| 477 | + <precision>-2</precision> | ||
| 478 | + <conversion_mask>yyyy-MM-dd</conversion_mask> | ||
| 479 | + <date_format_lenient>false</date_format_lenient> | ||
| 480 | + <date_format_locale/> | ||
| 481 | + <date_format_timezone/> | ||
| 482 | + <lenient_string_to_number>false</lenient_string_to_number> | ||
| 483 | + <encoding/> | ||
| 484 | + <decimal_symbol/> | ||
| 485 | + <grouping_symbol/> | ||
| 486 | + <currency_symbol/> | ||
| 487 | + <storage_type/> | ||
| 488 | + </meta> <meta> <name>zzrq</name> | ||
| 489 | + <rename>zzrq</rename> | ||
| 490 | + <type>String</type> | ||
| 491 | + <length>-2</length> | ||
| 492 | + <precision>-2</precision> | ||
| 493 | + <conversion_mask>yyyy-MM-dd</conversion_mask> | ||
| 494 | + <date_format_lenient>false</date_format_lenient> | ||
| 495 | + <date_format_locale/> | ||
| 496 | + <date_format_timezone/> | ||
| 497 | + <lenient_string_to_number>false</lenient_string_to_number> | ||
| 498 | + <encoding/> | ||
| 499 | + <decimal_symbol/> | ||
| 500 | + <grouping_symbol/> | ||
| 501 | + <currency_symbol/> | ||
| 502 | + <storage_type/> | ||
| 503 | + </meta> </fields> <cluster_schema/> | ||
| 504 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 505 | + <xloc>478</xloc> | ||
| 506 | + <yloc>66</yloc> | ||
| 507 | + <draw>Y</draw> | ||
| 508 | + </GUI> | ||
| 509 | + </step> | ||
| 510 | + | ||
| 511 | + <step> | ||
| 512 | + <name>线路查询</name> | ||
| 513 | + <type>DBLookup</type> | ||
| 514 | + <description/> | ||
| 515 | + <distribute>Y</distribute> | ||
| 516 | + <custom_distribution/> | ||
| 517 | + <copies>1</copies> | ||
| 518 | + <partitioning> | ||
| 519 | + <method>none</method> | ||
| 520 | + <schema_name/> | ||
| 521 | + </partitioning> | ||
| 522 | + <connection>bus_control_variable</connection> | ||
| 523 | + <cache>Y</cache> | ||
| 524 | + <cache_load_all>Y</cache_load_all> | ||
| 525 | + <cache_size>0</cache_size> | ||
| 526 | + <lookup> | ||
| 527 | + <schema/> | ||
| 528 | + <table>bsth_c_line</table> | ||
| 529 | + <orderby/> | ||
| 530 | + <fail_on_multiple>N</fail_on_multiple> | ||
| 531 | + <eat_row_on_failure>N</eat_row_on_failure> | ||
| 532 | + <key> | ||
| 533 | + <name>xl</name> | ||
| 534 | + <field>id</field> | ||
| 535 | + <condition>=</condition> | ||
| 536 | + <name2/> | ||
| 537 | + </key> | ||
| 538 | + <value> | ||
| 539 | + <name>name</name> | ||
| 540 | + <rename>xlmc</rename> | ||
| 541 | + <default/> | ||
| 542 | + <type>String</type> | ||
| 543 | + </value> | ||
| 544 | + </lookup> | ||
| 545 | + <cluster_schema/> | ||
| 546 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 547 | + <xloc>248</xloc> | ||
| 548 | + <yloc>67</yloc> | ||
| 549 | + <draw>Y</draw> | ||
| 550 | + </GUI> | ||
| 551 | + </step> | ||
| 552 | + | ||
| 553 | + <step> | ||
| 554 | + <name>车辆查询</name> | ||
| 555 | + <type>DBLookup</type> | ||
| 556 | + <description/> | ||
| 557 | + <distribute>Y</distribute> | ||
| 558 | + <custom_distribution/> | ||
| 559 | + <copies>1</copies> | ||
| 560 | + <partitioning> | ||
| 561 | + <method>none</method> | ||
| 562 | + <schema_name/> | ||
| 563 | + </partitioning> | ||
| 564 | + <connection>bus_control_variable</connection> | ||
| 565 | + <cache>N</cache> | ||
| 566 | + <cache_load_all>N</cache_load_all> | ||
| 567 | + <cache_size>0</cache_size> | ||
| 568 | + <lookup> | ||
| 569 | + <schema/> | ||
| 570 | + <table>bsth_c_cars</table> | ||
| 571 | + <orderby/> | ||
| 572 | + <fail_on_multiple>N</fail_on_multiple> | ||
| 573 | + <eat_row_on_failure>N</eat_row_on_failure> | ||
| 574 | + <key> | ||
| 575 | + <name>cl</name> | ||
| 576 | + <field>id</field> | ||
| 577 | + <condition>=</condition> | ||
| 578 | + <name2/> | ||
| 579 | + </key> | ||
| 580 | + <value> | ||
| 581 | + <name>inside_code</name> | ||
| 582 | + <rename>zbh</rename> | ||
| 583 | + <default/> | ||
| 584 | + <type>String</type> | ||
| 585 | + </value> | ||
| 586 | + </lookup> | ||
| 587 | + <cluster_schema/> | ||
| 588 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 589 | + <xloc>361</xloc> | ||
| 590 | + <yloc>67</yloc> | ||
| 591 | + <draw>Y</draw> | ||
| 592 | + </GUI> | ||
| 593 | + </step> | ||
| 594 | + | ||
| 595 | + <step> | ||
| 596 | + <name>车辆配置(没有作废)</name> | ||
| 597 | + <type>TableInput</type> | ||
| 598 | + <description/> | ||
| 599 | + <distribute>Y</distribute> | ||
| 600 | + <custom_distribution/> | ||
| 601 | + <copies>1</copies> | ||
| 602 | + <partitioning> | ||
| 603 | + <method>none</method> | ||
| 604 | + <schema_name/> | ||
| 605 | + </partitioning> | ||
| 606 | + <connection>bus_control_variable</connection> | ||
| 607 | + <sql>select * from bsth_c_s_ccinfo where is_cancel = 0 and xl = ${xlid}</sql> | ||
| 608 | + <limit>0</limit> | ||
| 609 | + <lookup/> | ||
| 610 | + <execute_each_row>N</execute_each_row> | ||
| 611 | + <variables_active>Y</variables_active> | ||
| 612 | + <lazy_conversion_active>N</lazy_conversion_active> | ||
| 613 | + <cluster_schema/> | ||
| 614 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 615 | + <xloc>106</xloc> | ||
| 616 | + <yloc>68</yloc> | ||
| 617 | + <draw>Y</draw> | ||
| 618 | + </GUI> | ||
| 619 | + </step> | ||
| 620 | + | ||
| 621 | + <step_error_handling> | ||
| 622 | + </step_error_handling> | ||
| 623 | + <slave-step-copy-partition-distribution> | ||
| 624 | +</slave-step-copy-partition-distribution> | ||
| 625 | + <slave_transformation>N</slave_transformation> | ||
| 626 | + | ||
| 627 | +</transformation> |