Commit deb01f8b82c10c5f6def51b1d4054839f96023bc
Merge remote-tracking branch 'origin/pudong' into pudong
Showing
83 changed files
with
2538 additions
and
862 deletions
Too many changes to show.
To preserve performance only 83 of 186 files are displayed.
src/main/java/com/bsth/controller/oil/DlbController.java
| @@ -152,7 +152,11 @@ public class DlbController extends BaseController<Dlb, Integer>{ | @@ -152,7 +152,11 @@ public class DlbController extends BaseController<Dlb, Integer>{ | ||
| 152 | m.put("rq", y.getRq()); | 152 | m.put("rq", y.getRq()); |
| 153 | m.put("gsname",y.getGsname() ); | 153 | m.put("gsname",y.getGsname() ); |
| 154 | m.put("fgsname", y.getFgsname()); | 154 | m.put("fgsname", y.getFgsname()); |
| 155 | - m.put("xlname", y.getXlname()); | 155 | + if(y.getLinename()==null){ |
| 156 | + m.put("xlname", y.getXlname()==null?"":y.getXlname()); | ||
| 157 | + }else{ | ||
| 158 | + m.put("xlname", y.getLinename()); | ||
| 159 | + } | ||
| 156 | m.put("nbbm", y.getNbbm()); | 160 | m.put("nbbm", y.getNbbm()); |
| 157 | m.put("jsy", y.getJsy()); | 161 | m.put("jsy", y.getJsy()); |
| 158 | m.put("name", y.getName()); | 162 | m.put("name", y.getName()); |
src/main/java/com/bsth/controller/oil/YlbController.java
| @@ -255,7 +255,11 @@ public class YlbController extends BaseController<Ylb, Integer>{ | @@ -255,7 +255,11 @@ public class YlbController extends BaseController<Ylb, Integer>{ | ||
| 255 | m.put("rq", sdfMonth.format(y.getRq())); | 255 | m.put("rq", sdfMonth.format(y.getRq())); |
| 256 | m.put("gsname",y.getGsname() ); | 256 | m.put("gsname",y.getGsname() ); |
| 257 | m.put("fgsname", y.getFgsname()); | 257 | m.put("fgsname", y.getFgsname()); |
| 258 | - m.put("xlname", y.getXlname()==null?"":y.getXlname()); | 258 | + if(y.getLinename()==null){ |
| 259 | + m.put("xlname", y.getXlname()==null?"":y.getXlname()); | ||
| 260 | + }else{ | ||
| 261 | + m.put("xlname", y.getLinename()); | ||
| 262 | + } | ||
| 259 | m.put("nbbm", y.getNbbm()); | 263 | m.put("nbbm", y.getNbbm()); |
| 260 | m.put("jsy", y.getJsy()); | 264 | m.put("jsy", y.getJsy()); |
| 261 | m.put("name", y.getName()); | 265 | m.put("name", y.getName()); |
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 java.io.ByteArrayOutputStream; | ||
| 4 | +import java.io.IOException; | ||
| 5 | +import java.io.InputStream; | ||
| 6 | +import java.io.OutputStream; | ||
| 7 | +import java.net.HttpURLConnection; | ||
| 8 | +import java.net.URL; | ||
| 9 | +import java.util.ArrayList; | ||
| 10 | +import java.util.Collection; | ||
| 11 | +import java.util.HashMap; | ||
| 12 | +import java.util.List; | ||
| 13 | +import java.util.Map; | ||
| 14 | + | ||
| 15 | +import org.apache.commons.io.IOUtils; | ||
| 16 | +import org.apache.commons.lang3.StringEscapeUtils; | ||
| 17 | +import org.joda.time.format.DateTimeFormat; | ||
| 18 | +import org.joda.time.format.DateTimeFormatter; | ||
| 19 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 20 | +import org.springframework.web.bind.annotation.PathVariable; | ||
| 21 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 22 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 23 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 24 | +import org.springframework.web.bind.annotation.RestController; | ||
| 25 | + | ||
| 3 | import com.alibaba.fastjson.JSONArray; | 26 | import com.alibaba.fastjson.JSONArray; |
| 4 | import com.bsth.common.ResponseCode; | 27 | import com.bsth.common.ResponseCode; |
| 5 | import com.bsth.controller.BaseController; | 28 | import com.bsth.controller.BaseController; |
| @@ -10,14 +33,11 @@ import com.bsth.data.schedule.DayOfSchedule; | @@ -10,14 +33,11 @@ import com.bsth.data.schedule.DayOfSchedule; | ||
| 10 | import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto; | 33 | import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto; |
| 11 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 34 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 12 | import com.bsth.entity.schedule.SchedulePlanInfo; | 35 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 36 | +import com.bsth.entity.sys.SysUser; | ||
| 37 | +import com.bsth.security.util.SecurityUtils; | ||
| 13 | import com.bsth.service.realcontrol.ScheduleRealInfoService; | 38 | import com.bsth.service.realcontrol.ScheduleRealInfoService; |
| 14 | -import org.apache.commons.lang3.StringEscapeUtils; | ||
| 15 | -import org.joda.time.format.DateTimeFormat; | ||
| 16 | -import org.joda.time.format.DateTimeFormatter; | ||
| 17 | -import org.springframework.beans.factory.annotation.Autowired; | ||
| 18 | -import org.springframework.web.bind.annotation.*; | ||
| 19 | - | ||
| 20 | -import java.util.*; | 39 | +import com.bsth.util.ConfigUtil; |
| 40 | +import com.fasterxml.jackson.databind.ObjectMapper; | ||
| 21 | 41 | ||
| 22 | @RestController | 42 | @RestController |
| 23 | @RequestMapping("/realSchedule") | 43 | @RequestMapping("/realSchedule") |
| @@ -691,4 +711,74 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -691,4 +711,74 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 691 | public Map<String, Object> deleteToHistory(@PathVariable("id") Long id){ | 711 | public Map<String, Object> deleteToHistory(@PathVariable("id") Long id){ |
| 692 | return scheduleRealInfoService.deleteToHistory(id); | 712 | return scheduleRealInfoService.deleteToHistory(id); |
| 693 | } | 713 | } |
| 714 | + | ||
| 715 | + /** | ||
| 716 | + * 从历史库里删除临加班次 | ||
| 717 | + * @param sch | ||
| 718 | + * @return | ||
| 719 | + */ | ||
| 720 | + @RequestMapping(value = "wxsb", method = RequestMethod.POST) | ||
| 721 | + public Map<String, Object> deleteToHistory(@RequestParam Map<String, Object> param){ | ||
| 722 | + SysUser user = SecurityUtils.getCurrentUser(); | ||
| 723 | + String uname = user.getUserName(); | ||
| 724 | + StringBuilder url = new StringBuilder(ConfigUtil.get("http.report.url")); | ||
| 725 | + url.append("?nbbm=").append(param.get("nbbm")).append("&bxy=").append(uname).append("&bxbm=").append(param.get("bxType")); | ||
| 726 | + // 分公司保存格式 分公司编码_公司编码 | ||
| 727 | + String val = BasicData.nbbm2FgsCompanyCodeMap.get(param.get("nbbm")); | ||
| 728 | + String[] arr = val.split("_"); | ||
| 729 | + if (!"22".equals(arr[1])) { | ||
| 730 | + Map<String, Object> res = new HashMap<String, Object>(); | ||
| 731 | + res.put("status", ResponseCode.ERROR); | ||
| 732 | + res.put("msg", "除金高公司外暂未开通此功能"); | ||
| 733 | + | ||
| 734 | + return res; | ||
| 735 | + } | ||
| 736 | + url.append("&fgs=").append(arr[0]); | ||
| 737 | + | ||
| 738 | + return request(url.toString()); | ||
| 739 | + } | ||
| 740 | + | ||
| 741 | + @SuppressWarnings("unchecked") | ||
| 742 | + private static Map<String, Object> request(String url) { | ||
| 743 | + Map<String, Object> res = new HashMap<String, Object>(); | ||
| 744 | + res.put("status", ResponseCode.SUCCESS); | ||
| 745 | + InputStream in = null; | ||
| 746 | + HttpURLConnection con = null; | ||
| 747 | + try { | ||
| 748 | + con = (HttpURLConnection)new URL(url).openConnection(); | ||
| 749 | + con.setRequestMethod("POST"); | ||
| 750 | + con.setRequestProperty("keep-alive", "true"); | ||
| 751 | + con.setRequestProperty("accept", "application/json"); | ||
| 752 | + con.setRequestProperty("content-type", "application/json"); | ||
| 753 | + con.setDoInput(true); | ||
| 754 | + con.setReadTimeout(2500); | ||
| 755 | + con.setConnectTimeout(2500); | ||
| 756 | + | ||
| 757 | + con.connect(); | ||
| 758 | + if (con.getResponseCode() == 200) { | ||
| 759 | + in = con.getInputStream(); | ||
| 760 | + ByteArrayOutputStream bout = new ByteArrayOutputStream(); | ||
| 761 | + IOUtils.copy(in, bout); bout.close(); | ||
| 762 | + Map<String, Object> response = new ObjectMapper().readValue(bout.toByteArray(), Map.class); | ||
| 763 | + if (!"报修成功".equals(response.get("msg"))) { | ||
| 764 | + res.put("status", ResponseCode.ERROR); | ||
| 765 | + res.putAll(response); | ||
| 766 | + } | ||
| 767 | + } | ||
| 768 | + } catch (IOException e) { | ||
| 769 | + // TODO Auto-generated catch block | ||
| 770 | + res.put("status", ResponseCode.ERROR); | ||
| 771 | + res.put("msg", "调用上报接口异常"); | ||
| 772 | + } finally { | ||
| 773 | + try { | ||
| 774 | + if (in != null) in.close(); | ||
| 775 | + if (con != null) con.disconnect(); | ||
| 776 | + } catch (IOException e) { | ||
| 777 | + // TODO Auto-generated catch block | ||
| 778 | + e.printStackTrace(); | ||
| 779 | + } | ||
| 780 | + } | ||
| 781 | + | ||
| 782 | + return res; | ||
| 783 | + } | ||
| 694 | } | 784 | } |
src/main/java/com/bsth/controller/report/CalcSheetController.java
| @@ -42,4 +42,11 @@ public class CalcSheetController extends BaseController<CalcSheet, Integer>{ | @@ -42,4 +42,11 @@ public class CalcSheetController extends BaseController<CalcSheet, Integer>{ | ||
| 42 | List<Map<String, Object>> list=calcSheetService.calcTurnoutrate(map); | 42 | List<Map<String, Object>> list=calcSheetService.calcTurnoutrate(map); |
| 43 | return list; | 43 | return list; |
| 44 | } | 44 | } |
| 45 | + | ||
| 46 | + | ||
| 47 | + @RequestMapping(value = "/calcTurnoutrateZgf",method = RequestMethod.GET) | ||
| 48 | + public List<Map<String, Object>> calcTurnoutrateZgf(@RequestParam Map<String, Object> map){ | ||
| 49 | + List<Map<String, Object>> list=calcSheetService.calcTurnoutrateZgf(map); | ||
| 50 | + return list; | ||
| 51 | + } | ||
| 45 | } | 52 | } |
src/main/java/com/bsth/controller/report/ReportController.java
| @@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject; | @@ -19,6 +19,7 @@ import com.alibaba.fastjson.JSONObject; | ||
| 19 | import com.bsth.data.BasicData; | 19 | import com.bsth.data.BasicData; |
| 20 | import com.bsth.entity.StationRoute; | 20 | import com.bsth.entity.StationRoute; |
| 21 | import com.bsth.entity.excep.ArrivalInfo; | 21 | import com.bsth.entity.excep.ArrivalInfo; |
| 22 | +import com.bsth.entity.mcy_forms.Singledata; | ||
| 22 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 23 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 23 | import com.bsth.service.report.ReportService; | 24 | import com.bsth.service.report.ReportService; |
| 24 | import com.bsth.util.ReportUtils; | 25 | import com.bsth.util.ReportUtils; |
| @@ -357,10 +358,17 @@ public class ReportController { | @@ -357,10 +358,17 @@ public class ReportController { | ||
| 357 | 358 | ||
| 358 | return lMap; | 359 | return lMap; |
| 359 | } | 360 | } |
| 360 | - | ||
| 361 | - | ||
| 362 | @RequestMapping(value="/online") | 361 | @RequestMapping(value="/online") |
| 363 | public Map<String, Object> online(@RequestParam Map<String, Object> map){ | 362 | public Map<String, Object> online(@RequestParam Map<String, Object> map){ |
| 364 | return service.online(map); | 363 | return service.online(map); |
| 365 | } | 364 | } |
| 365 | + | ||
| 366 | + | ||
| 367 | + | ||
| 368 | + @RequestMapping(value = "/singledatatj", method = RequestMethod.GET) | ||
| 369 | + public List<Singledata> singledatatj(@RequestParam Map<String, Object> map) { | ||
| 370 | + | ||
| 371 | + return service.singledatatj(map); | ||
| 372 | + } | ||
| 373 | + | ||
| 366 | } | 374 | } |
src/main/java/com/bsth/controller/schedule/core/CarConfigInfoController.java
| @@ -63,6 +63,20 @@ public class CarConfigInfoController extends BController<CarConfigInfo, Long> { | @@ -63,6 +63,20 @@ public class CarConfigInfoController extends BController<CarConfigInfo, Long> { | ||
| 63 | return rtn; | 63 | return rtn; |
| 64 | } | 64 | } |
| 65 | 65 | ||
| 66 | + @RequestMapping(value = "/validate_cars_2", method = RequestMethod.GET) | ||
| 67 | + public Map<String, Object> validate_cars(@RequestParam Integer xlId, @RequestParam Integer clId) { | ||
| 68 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 69 | + try { | ||
| 70 | + carConfigInfoService.validate_cars(xlId, clId); | ||
| 71 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 72 | + } catch (ScheduleException exp) { | ||
| 73 | + rtn.put("status", ResponseCode.ERROR); | ||
| 74 | + rtn.put("msg", exp.getMessage()); | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + return rtn; | ||
| 78 | + } | ||
| 79 | + | ||
| 66 | @RequestMapping(value = "/validate_cars_gs", method = RequestMethod.GET) | 80 | @RequestMapping(value = "/validate_cars_gs", method = RequestMethod.GET) |
| 67 | public Map<String, Object> validate_cars_gs(HttpServletRequest request, @RequestParam Map<String, Object> param) { | 81 | public Map<String, Object> validate_cars_gs(HttpServletRequest request, @RequestParam Map<String, Object> param) { |
| 68 | HttpSession session = request.getSession(); | 82 | HttpSession session = request.getSession(); |
src/main/java/com/bsth/controller/schedule/core/SchedulePlanController.java
| @@ -57,4 +57,21 @@ public class SchedulePlanController extends BController<SchedulePlan, Long> { | @@ -57,4 +57,21 @@ public class SchedulePlanController extends BController<SchedulePlan, Long> { | ||
| 57 | return rtn; | 57 | return rtn; |
| 58 | } | 58 | } |
| 59 | 59 | ||
| 60 | + /** | ||
| 61 | + * 验证排班计划时间范围内规则的正确性。 | ||
| 62 | + * @return | ||
| 63 | + * @throws Exception | ||
| 64 | + */ | ||
| 65 | + @RequestMapping(value = "/valttrule/{xlid}/{from}/{to}", method = RequestMethod.GET) | ||
| 66 | + public Map<String, Object> validateRule( | ||
| 67 | + @PathVariable(value = "xlid") Integer xlid, | ||
| 68 | + @PathVariable(value = "from") Date from, | ||
| 69 | + @PathVariable(value = "to") Date to | ||
| 70 | + ) throws Exception { | ||
| 71 | + Map<String, Object> rtn = new HashMap<>(); | ||
| 72 | + rtn.put("status", ResponseCode.SUCCESS); | ||
| 73 | + rtn.put("data", schedulePlanService.validateRule(xlid, from, to)); | ||
| 74 | + return rtn; | ||
| 75 | + } | ||
| 76 | + | ||
| 60 | } | 77 | } |
src/main/java/com/bsth/data/BasicData.java
| @@ -55,6 +55,7 @@ public class BasicData { | @@ -55,6 +55,7 @@ public class BasicData { | ||
| 55 | //线路编码和名称对照 | 55 | //线路编码和名称对照 |
| 56 | public static Map<String, String> lineCode2NameMap; | 56 | public static Map<String, String> lineCode2NameMap; |
| 57 | 57 | ||
| 58 | + public static Map<String, String> lineCodeAllNameMap; | ||
| 58 | //停车场 | 59 | //停车场 |
| 59 | public static List<String> parkCodeList; | 60 | public static List<String> parkCodeList; |
| 60 | 61 | ||
| @@ -315,6 +316,14 @@ public class BasicData { | @@ -315,6 +316,14 @@ public class BasicData { | ||
| 315 | lineId2ShangHaiCodeMap = id2SHcode; | 316 | lineId2ShangHaiCodeMap = id2SHcode; |
| 316 | lineCode2ShangHaiCodeMap = code2SHcode; | 317 | lineCode2ShangHaiCodeMap = code2SHcode; |
| 317 | stationName2YgcNumber = tempStationName2YgcNumber; | 318 | stationName2YgcNumber = tempStationName2YgcNumber; |
| 319 | + | ||
| 320 | + Map<String, String> code2nameAll = new HashMap<>(); | ||
| 321 | + Iterator<Line> iteratorAll = lineRepository.findAll().iterator(); | ||
| 322 | + while (iteratorAll.hasNext()) { | ||
| 323 | + line = iteratorAll.next(); | ||
| 324 | + code2nameAll.put(line.getLineCode(), line.getName()); | ||
| 325 | + } | ||
| 326 | + lineCodeAllNameMap=code2nameAll; | ||
| 318 | } | 327 | } |
| 319 | 328 | ||
| 320 | /** | 329 | /** |
src/main/java/com/bsth/data/gpsdata_v2/handlers/InStationProcess.java
| @@ -121,7 +121,7 @@ public class InStationProcess { | @@ -121,7 +121,7 @@ public class InStationProcess { | ||
| 121 | private void inEndStation(ScheduleRealInfo sch, GpsEntity gps) { | 121 | private void inEndStation(ScheduleRealInfo sch, GpsEntity gps) { |
| 122 | String nbbm = sch.getClZbh(); | 122 | String nbbm = sch.getClZbh(); |
| 123 | //校验进站前置约束 | 123 | //校验进站前置约束 |
| 124 | - if (!validInPremise(gps)) | 124 | + if (!validInPremise(gps) && isNormalSch(sch)) |
| 125 | return; | 125 | return; |
| 126 | 126 | ||
| 127 | //实达时间不覆盖 | 127 | //实达时间不覆盖 |
src/main/java/com/bsth/data/gpsdata_v2/handlers/OutStationProcess.java
| @@ -74,7 +74,7 @@ public class OutStationProcess { | @@ -74,7 +74,7 @@ public class OutStationProcess { | ||
| 74 | * @param gps | 74 | * @param gps |
| 75 | */ | 75 | */ |
| 76 | private void outStation(GpsEntity gps, GpsEntity prev) { | 76 | private void outStation(GpsEntity gps, GpsEntity prev) { |
| 77 | - logger.info("进站记录(到达时间:" + gps.getArrTime() + " 进出站状态:" + gps.getInstation() + " 站点编号:" + gps.getStopNo() + " deviceId:" + gps.getDeviceId() + " nbbm:" + gps.getNbbm() + ")"); | 77 | + logger.info("出站记录(到达时间:" + gps.getArrTime() + " 进出站状态:" + gps.getInstation() + " 站点编号:" + gps.getStopNo() + " deviceId:" + gps.getDeviceId() + " nbbm:" + gps.getNbbm() + ")"); |
| 78 | ScheduleRealInfo sch = dayOfSchedule.executeCurr(gps.getNbbm()); | 78 | ScheduleRealInfo sch = dayOfSchedule.executeCurr(gps.getNbbm()); |
| 79 | 79 | ||
| 80 | //起点发车 | 80 | //起点发车 |
src/main/java/com/bsth/entity/mcy_forms/Shifday.java
| @@ -35,6 +35,8 @@ public class Shifday { | @@ -35,6 +35,8 @@ public class Shifday { | ||
| 35 | private String sjbc;//实际班次 | 35 | private String sjbc;//实际班次 |
| 36 | 36 | ||
| 37 | private String jgh; | 37 | private String jgh; |
| 38 | + | ||
| 39 | + private String sgh; | ||
| 38 | 40 | ||
| 39 | private String zbh; | 41 | private String zbh; |
| 40 | 42 | ||
| @@ -56,6 +58,14 @@ public class Shifday { | @@ -56,6 +58,14 @@ public class Shifday { | ||
| 56 | this.jgh = jgh; | 58 | this.jgh = jgh; |
| 57 | } | 59 | } |
| 58 | 60 | ||
| 61 | + public String getSgh() { | ||
| 62 | + return sgh; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public void setSgh(String sgh) { | ||
| 66 | + this.sgh = sgh; | ||
| 67 | + } | ||
| 68 | + | ||
| 59 | public String getZbh() { | 69 | public String getZbh() { |
| 60 | return zbh; | 70 | return zbh; |
| 61 | } | 71 | } |
src/main/java/com/bsth/entity/oil/Dlb.java
| @@ -22,6 +22,7 @@ public class Dlb { | @@ -22,6 +22,7 @@ public class Dlb { | ||
| 22 | @DateTimeFormat(pattern="yyyy-MM-dd") | 22 | @DateTimeFormat(pattern="yyyy-MM-dd") |
| 23 | private Date rq; | 23 | private Date rq; |
| 24 | private String xlbm; | 24 | private String xlbm; |
| 25 | + private String linename; | ||
| 25 | private String ssgsdm; | 26 | private String ssgsdm; |
| 26 | private String fgsdm; | 27 | private String fgsdm; |
| 27 | private String nbbm; | 28 | private String nbbm; |
| @@ -102,6 +103,14 @@ public class Dlb { | @@ -102,6 +103,14 @@ public class Dlb { | ||
| 102 | this.xlbm = xlbm; | 103 | this.xlbm = xlbm; |
| 103 | } | 104 | } |
| 104 | 105 | ||
| 106 | + public String getLinename() { | ||
| 107 | + return linename; | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + public void setLinename(String linename) { | ||
| 111 | + this.linename = linename; | ||
| 112 | + } | ||
| 113 | + | ||
| 105 | public String getSsgsdm() { | 114 | public String getSsgsdm() { |
| 106 | return ssgsdm; | 115 | return ssgsdm; |
| 107 | } | 116 | } |
| @@ -348,7 +357,7 @@ public class Dlb { | @@ -348,7 +357,7 @@ public class Dlb { | ||
| 348 | } | 357 | } |
| 349 | 358 | ||
| 350 | public String getXlname() { | 359 | public String getXlname() { |
| 351 | - return BasicData.lineCode2NameMap.get(this.xlbm); | 360 | + return BasicData.lineCodeAllNameMap.get(this.xlbm); |
| 352 | } | 361 | } |
| 353 | 362 | ||
| 354 | public void setXlname(String xlname) { | 363 | public void setXlname(String xlname) { |
src/main/java/com/bsth/entity/oil/Ylb.java
| @@ -22,6 +22,7 @@ public class Ylb { | @@ -22,6 +22,7 @@ public class Ylb { | ||
| 22 | @DateTimeFormat(pattern="yyyy-MM-dd") | 22 | @DateTimeFormat(pattern="yyyy-MM-dd") |
| 23 | private Date rq; | 23 | private Date rq; |
| 24 | private String xlbm; | 24 | private String xlbm; |
| 25 | + private String linename; | ||
| 25 | private String ssgsdm; | 26 | private String ssgsdm; |
| 26 | private String fgsdm; | 27 | private String fgsdm; |
| 27 | private String nbbm; | 28 | private String nbbm; |
| @@ -95,6 +96,15 @@ public class Ylb { | @@ -95,6 +96,15 @@ public class Ylb { | ||
| 95 | public void setXlbm(String xlbm) { | 96 | public void setXlbm(String xlbm) { |
| 96 | this.xlbm = xlbm; | 97 | this.xlbm = xlbm; |
| 97 | } | 98 | } |
| 99 | + | ||
| 100 | + public String getLinename() { | ||
| 101 | + return linename; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public void setLinename(String linename) { | ||
| 105 | + this.linename = linename; | ||
| 106 | + } | ||
| 107 | + | ||
| 98 | public String getSsgsdm() { | 108 | public String getSsgsdm() { |
| 99 | return ssgsdm; | 109 | return ssgsdm; |
| 100 | } | 110 | } |
| @@ -292,7 +302,7 @@ public class Ylb { | @@ -292,7 +302,7 @@ public class Ylb { | ||
| 292 | } | 302 | } |
| 293 | 303 | ||
| 294 | public String getXlname() { | 304 | public String getXlname() { |
| 295 | - return BasicData.lineCode2NameMap.get(this.xlbm); | 305 | + return BasicData.lineCodeAllNameMap.get(this.xlbm); |
| 296 | } | 306 | } |
| 297 | 307 | ||
| 298 | public void setXlname(String xlname) { | 308 | public void setXlname(String xlname) { |
src/main/java/com/bsth/entity/schedule/SchedulePlanInfo.java
| 1 | package com.bsth.entity.schedule; | 1 | package com.bsth.entity.schedule; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.Line; | 3 | import com.bsth.entity.Line; |
| 4 | -import com.bsth.service.schedule.rules.rerun.RerunRule_input; | ||
| 5 | -import com.bsth.service.schedule.rules.shiftloop.ScheduleResult_output; | ||
| 6 | -import com.bsth.service.schedule.rules.shiftloop.ScheduleRule_Type; | 4 | +import com.bsth.service.schedule.impl.plan.kBase1.core.rerun.RerunRule_input; |
| 5 | +import com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop.ScheduleResult_output; | ||
| 6 | +import com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop.ScheduleRule_Type; | ||
| 7 | 7 | ||
| 8 | import javax.persistence.*; | 8 | import javax.persistence.*; |
| 9 | import java.sql.PreparedStatement; | 9 | import java.sql.PreparedStatement; |
src/main/java/com/bsth/entity/sheet/CalcSheet.java
| @@ -49,6 +49,8 @@ public class CalcSheet { | @@ -49,6 +49,8 @@ public class CalcSheet { | ||
| 49 | private String sjbcs; | 49 | private String sjbcs; |
| 50 | /*临加班次数*/ | 50 | /*临加班次数*/ |
| 51 | private String ljbcs; | 51 | private String ljbcs; |
| 52 | + /*计划发车早高峰*/ | ||
| 53 | + private String jhcczgf; | ||
| 52 | /*公司名字*/ | 54 | /*公司名字*/ |
| 53 | @Transient | 55 | @Transient |
| 54 | private String gsname; | 56 | private String gsname; |
| @@ -173,6 +175,12 @@ public class CalcSheet { | @@ -173,6 +175,12 @@ public class CalcSheet { | ||
| 173 | } | 175 | } |
| 174 | 176 | ||
| 175 | 177 | ||
| 178 | + public String getJhcczgf() { | ||
| 179 | + return jhcczgf; | ||
| 180 | + } | ||
| 181 | + public void setJhcczgf(String jhcczgf) { | ||
| 182 | + this.jhcczgf = jhcczgf; | ||
| 183 | + } | ||
| 176 | public String getFgsname() { | 184 | public String getFgsname() { |
| 177 | return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm); | 185 | return BasicData.businessFgsCodeNameMap.get(this.fgsdm+"_"+this.gsdm); |
| 178 | } | 186 | } |
src/main/java/com/bsth/filter/AccessLogFilter.java
| @@ -58,9 +58,11 @@ public class AccessLogFilter extends BaseFilter { | @@ -58,9 +58,11 @@ public class AccessLogFilter extends BaseFilter { | ||
| 58 | s.append(getBlock(params)); | 58 | s.append(getBlock(params)); |
| 59 | s.append(getBlock(headers)); | 59 | s.append(getBlock(headers)); |
| 60 | s.append(getBlock(request.getHeader("Referer"))); | 60 | s.append(getBlock(request.getHeader("Referer"))); |
| 61 | - | ||
| 62 | - logger.info(s.toString()); | 61 | + |
| 62 | + long now = System.currentTimeMillis(); | ||
| 63 | chain.doFilter(request, response); | 63 | chain.doFilter(request, response); |
| 64 | + s.append("<cost time:").append(System.currentTimeMillis() - now).append(">"); | ||
| 65 | + logger.info(s.toString()); | ||
| 64 | } | 66 | } |
| 65 | 67 | ||
| 66 | private static String getParams(HttpServletRequest request) { | 68 | private static String getParams(HttpServletRequest request) { |
src/main/java/com/bsth/repository/LineRepository.java
| @@ -51,6 +51,8 @@ public interface LineRepository extends BaseRepository<Line, Integer> { | @@ -51,6 +51,8 @@ public interface LineRepository extends BaseRepository<Line, Integer> { | ||
| 51 | @Query("SELECT L FROM Line L where L.destroy=0 and L.remove !=1") | 51 | @Query("SELECT L FROM Line L where L.destroy=0 and L.remove !=1") |
| 52 | List<Line> findAllService(); | 52 | List<Line> findAllService(); |
| 53 | 53 | ||
| 54 | + @Query("SELECT L FROM Line L") | ||
| 55 | + List<Line> findAll(); | ||
| 54 | 56 | ||
| 55 | @Modifying | 57 | @Modifying |
| 56 | @Query(value = "UPDATE Line l set l.name=?1 , l.company=?2, l.brancheCompany=?3, " | 58 | @Query(value = "UPDATE Line l set l.name=?1 , l.company=?2, l.brancheCompany=?3, " |
src/main/java/com/bsth/repository/oil/CwjyRepository.java
| @@ -22,8 +22,8 @@ public interface CwjyRepository extends BaseRepository<Cwjy, Integer>{ | @@ -22,8 +22,8 @@ public interface CwjyRepository extends BaseRepository<Cwjy, Integer>{ | ||
| 22 | */ | 22 | */ |
| 23 | @Query(value="SELECT a.gsdm as gsdm,a.nbbm as nbbm,b.jsy as jsy,b.jzl as jzl ,b.stationid as stationid," | 23 | @Query(value="SELECT a.gsdm as gsdm,a.nbbm as nbbm,b.jsy as jsy,b.jzl as jzl ,b.stationid as stationid," |
| 24 | + "b.nylx as nylx,b.yj as yj,b.bz as bz,c.jsy as ldgh FROM bsth_c_cwjy a "+ | 24 | + "b.nylx as nylx,b.yj as yj,b.bz as bz,c.jsy as ldgh FROM bsth_c_cwjy a "+ |
| 25 | - " left join ( select * from bsth_c_ylxxb b where to_days(b.yyrq)=to_days(?1) and jylx=1) b " + | ||
| 26 | - " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy from bsth_c_ylb where to_days(rq)= to_days(?1 ) group by nbbm "+ | 25 | + " left join ( select * from bsth_c_ylxxb b where b.yyrq=?1 and jylx=1) b " + |
| 26 | + " on a.nbbm=b.nbbm left join (select nbbm,group_concat(jsy) as jsy from bsth_c_ylb where rq= ?1 group by nbbm "+ | ||
| 27 | " ) c on a.nbbm=c.nbbm where a.nbbm like %?2% ",nativeQuery=true) | 27 | " ) c on a.nbbm=c.nbbm where a.nbbm like %?2% ",nativeQuery=true) |
| 28 | List<Object[]> obtainCwjycl(String rq,String nbbm); | 28 | List<Object[]> obtainCwjycl(String rq,String nbbm); |
| 29 | 29 |
src/main/java/com/bsth/repository/oil/DlbRepository.java
| @@ -28,13 +28,13 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -28,13 +28,13 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | ||
| 28 | * @param rq | 28 | * @param rq |
| 29 | * @return | 29 | * @return |
| 30 | */ | 30 | */ |
| 31 | - @Query(value="SELECT * FROM bsth_c_dlb where to_days(?1)=to_days(rq) and ssgsdm like %?2% " | 31 | + @Query(value="SELECT * FROM bsth_c_dlb where rq=?1 and ssgsdm like %?2% " |
| 32 | + " and fgsdm like %?3%" | 32 | + " and fgsdm like %?3%" |
| 33 | + " and xlbm like %?4% and nbbm like %?5% order by ?6 asc",nativeQuery=true) | 33 | + " and xlbm like %?4% and nbbm like %?5% order by ?6 asc",nativeQuery=true) |
| 34 | List<Dlb> obtainDl(String rq,String gsbm,String fgsdm,String xlbm,String nbbm,String px); | 34 | List<Dlb> obtainDl(String rq,String gsbm,String fgsdm,String xlbm,String nbbm,String px); |
| 35 | 35 | ||
| 36 | @Query(value="select s from Dlb s " | 36 | @Query(value="select s from Dlb s " |
| 37 | - + " where to_days(?1)=to_days(s.rq) " | 37 | + + " where to_days(s.rq)=to_days(?1) " |
| 38 | + " and s.ssgsdm like %?2% " | 38 | + " and s.ssgsdm like %?2% " |
| 39 | + " and s.fgsdm like %?3%" | 39 | + " and s.fgsdm like %?3%" |
| 40 | + " and s.xlbm like %?4% " | 40 | + " and s.xlbm like %?4% " |
| @@ -49,14 +49,14 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -49,14 +49,14 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | ||
| 49 | * @param xlbm | 49 | * @param xlbm |
| 50 | * @return | 50 | * @return |
| 51 | */ | 51 | */ |
| 52 | - @Query(value="select nbbm,count(nbbm) from bsth_c_dlb where to_days(?1)=to_days(rq) and " | 52 | + @Query(value="select nbbm,count(nbbm) from bsth_c_dlb where rq=?1 and " |
| 53 | + " ssgsdm like %?2% " | 53 | + " ssgsdm like %?2% " |
| 54 | + " and fgsdm like %?3%" | 54 | + " and fgsdm like %?3%" |
| 55 | + " and xlbm like %?4% and nbbm like %?5% " | 55 | + " and xlbm like %?4% and nbbm like %?5% " |
| 56 | + " group by nbbm,rq,ssgsdm,fgsdm",nativeQuery=true) | 56 | + " group by nbbm,rq,ssgsdm,fgsdm",nativeQuery=true) |
| 57 | List<Object[]> checkNbmmNum(String rq, String gsbm,String fgsbm,String xlbm,String nbbm); | 57 | List<Object[]> checkNbmmNum(String rq, String gsbm,String fgsbm,String xlbm,String nbbm); |
| 58 | 58 | ||
| 59 | - @Query(value="select nbbm,sum(cdl*100) as cdl ,sum(zlc*100) as zlc from bsth_c_dlb where to_days(?1)=to_days(rq) and " | 59 | + @Query(value="select nbbm,sum(cdl*100) as cdl ,sum(zlc*100) as zlc from bsth_c_dlb where rq= ?1 and " |
| 60 | + " ssgsdm like %?2% " | 60 | + " ssgsdm like %?2% " |
| 61 | + " and fgsdm like %?3%" | 61 | + " and fgsdm like %?3%" |
| 62 | + " and xlbm like %?4% and nbbm like %?5% " | 62 | + " and xlbm like %?4% and nbbm like %?5% " |
| @@ -66,7 +66,7 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -66,7 +66,7 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | ||
| 66 | 66 | ||
| 67 | 67 | ||
| 68 | @Query(value="select cdl,hd,sh from Dlb s " | 68 | @Query(value="select cdl,hd,sh from Dlb s " |
| 69 | - + " where to_days(?1)=to_days(s.rq) " | 69 | + + " where to_days(s.rq)=to_days(?1) " |
| 70 | + " and s.ssgsdm like %?2% " | 70 | + " and s.ssgsdm like %?2% " |
| 71 | + " and s.fgsdm like %?3%" | 71 | + " and s.fgsdm like %?3%" |
| 72 | + " and s.xlbm like %?4% " | 72 | + " and s.xlbm like %?4% " |
| @@ -74,7 +74,7 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -74,7 +74,7 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | ||
| 74 | List<Object[]> sumDlb(String rq, String gsbm,String fgsbm,String xlbm,List<String> listNbbm); | 74 | List<Object[]> sumDlb(String rq, String gsbm,String fgsbm,String xlbm,List<String> listNbbm); |
| 75 | 75 | ||
| 76 | @Query(value="select ifnull(cdl,0),ifnull(hd,0),ifnull(sh,0) from bsth_c_dlb " | 76 | @Query(value="select ifnull(cdl,0),ifnull(hd,0),ifnull(sh,0) from bsth_c_dlb " |
| 77 | - + " where to_days(?1)=to_days(rq) " | 77 | + + " where rq=?1 " |
| 78 | + " and ssgsdm like %?2% " | 78 | + " and ssgsdm like %?2% " |
| 79 | + " and fgsdm like %?3%" | 79 | + " and fgsdm like %?3%" |
| 80 | + " and xlbm like %?4% " | 80 | + " and xlbm like %?4% " |
| @@ -93,10 +93,10 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | @@ -93,10 +93,10 @@ public interface DlbRepository extends BaseRepository<Dlb, Integer>{ | ||
| 93 | " WHERE id = ?1", nativeQuery=true) | 93 | " WHERE id = ?1", nativeQuery=true) |
| 94 | public void dlbUpdate(Integer id,double czcd,double jzcd,double hd, double sh,String shyy,int yhlx); | 94 | public void dlbUpdate(Integer id,double czcd,double jzcd,double hd, double sh,String shyy,int yhlx); |
| 95 | 95 | ||
| 96 | - @Query(value="SELECT * FROM bsth_c_dlb where to_days(?1)=to_days(rq) and nbbm =?2 and jsy=?3 and xlbm=?4",nativeQuery=true) | 96 | + @Query(value="SELECT * FROM bsth_c_dlb where rq=?1 and nbbm =?2 and jsy=?3 and xlbm=?4",nativeQuery=true) |
| 97 | List<Dlb> queryListDlb(String rq,String nbbm,String jgh,String xlbm); | 97 | List<Dlb> queryListDlb(String rq,String nbbm,String jgh,String xlbm); |
| 98 | 98 | ||
| 99 | - @Query(value="SELECT * FROM bsth_c_dlb where to_days(?1)=to_days(rq) and xlbm=?2",nativeQuery=true) | 99 | + @Query(value="SELECT * FROM bsth_c_dlb where rq=?1 and xlbm=?2",nativeQuery=true) |
| 100 | List<Dlb> queryDlbByRqXlbm(String rq, String xlbm); | 100 | List<Dlb> queryDlbByRqXlbm(String rq, String xlbm); |
| 101 | 101 | ||
| 102 | } | 102 | } |
src/main/java/com/bsth/repository/oil/LsylbRepository.java
| @@ -22,7 +22,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | @@ -22,7 +22,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | ||
| 22 | * @param xlbm | 22 | * @param xlbm |
| 23 | * @return | 23 | * @return |
| 24 | */ | 24 | */ |
| 25 | - @Query(value="select nbbm,count(nbbm) from bsth_ls_ylb where to_days(?1)=to_days(rq) and " | 25 | + @Query(value="select nbbm,count(nbbm) from bsth_ls_ylb where rq=?1 and " |
| 26 | + " ssgsdm like %?2% " | 26 | + " ssgsdm like %?2% " |
| 27 | + " and fgsdm like %?3%" | 27 | + " and fgsdm like %?3%" |
| 28 | + " and xlbm like %?4% and nbbm like %?5% and nylx= ?6 " | 28 | + " and xlbm like %?4% and nbbm like %?5% and nylx= ?6 " |
| @@ -30,7 +30,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | @@ -30,7 +30,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | ||
| 30 | List<Object[]> checkNbmmNum(String rq, String gsbm,String fgsbm,String xlbm,String nbbm,int nylx); | 30 | List<Object[]> checkNbmmNum(String rq, String gsbm,String fgsbm,String xlbm,String nbbm,int nylx); |
| 31 | 31 | ||
| 32 | @Query(value="select s from Lsylb s " | 32 | @Query(value="select s from Lsylb s " |
| 33 | - + " where to_days(?1)=to_days(s.rq) " | 33 | + + " where to_days(s.rq)=to_days(?1) " |
| 34 | + " and s.ssgsdm =?2 " | 34 | + " and s.ssgsdm =?2 " |
| 35 | + " and s.fgsdm =?3 " | 35 | + " and s.fgsdm =?3 " |
| 36 | + " and s.xlbm like %?4% " | 36 | + " and s.xlbm like %?4% " |
| @@ -38,7 +38,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | @@ -38,7 +38,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | ||
| 38 | + " and s.nbbm in ?6 order by nbbm,jhsj") | 38 | + " and s.nbbm in ?6 order by nbbm,jhsj") |
| 39 | List<Lsylb> listYlb(String rq, String gsbm,String fgsbm,String xlbm,int nylx,List<String> listNbbm); | 39 | List<Lsylb> listYlb(String rq, String gsbm,String fgsbm,String xlbm,int nylx,List<String> listNbbm); |
| 40 | 40 | ||
| 41 | - @Query(value="select nbbm,sum(jzl*100) as jzl ,sum(zlc*100) as zlc from bsth_ls_ylb where to_days(?1)=to_days(rq) and " | 41 | + @Query(value="select nbbm,sum(jzl*100) as jzl ,sum(zlc*100) as zlc from bsth_ls_ylb where rq=?1 and " |
| 42 | + " ssgsdm like %?2% " | 42 | + " ssgsdm like %?2% " |
| 43 | + " and fgsdm like %?3%" | 43 | + " and fgsdm like %?3%" |
| 44 | + " and xlbm like %?4% and nbbm like %?5% and nylx =?6 " | 44 | + " and xlbm like %?4% and nbbm like %?5% and nylx =?6 " |
| @@ -47,7 +47,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | @@ -47,7 +47,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | ||
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | @Query(value="select ifnull(jzl,0),ifnull(yh,0),ifnull(sh,0) from bsth_ls_ylb " | 49 | @Query(value="select ifnull(jzl,0),ifnull(yh,0),ifnull(sh,0) from bsth_ls_ylb " |
| 50 | - + " where to_days(?1)=to_days(rq) " | 50 | + + " where rq=?1 " |
| 51 | + " and ssgsdm like %?2% " | 51 | + " and ssgsdm like %?2% " |
| 52 | + " and fgsdm like %?3%" | 52 | + " and fgsdm like %?3%" |
| 53 | + " and xlbm like %?4% " | 53 | + " and xlbm like %?4% " |
| @@ -57,7 +57,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | @@ -57,7 +57,7 @@ public interface LsylbRepository extends BaseRepository<Lsylb, Integer>{ | ||
| 57 | 57 | ||
| 58 | 58 | ||
| 59 | @Query(value="select jzl,yh,sh from Lsylb s " | 59 | @Query(value="select jzl,yh,sh from Lsylb s " |
| 60 | - + " where to_days(?1)=to_days(s.rq) " | 60 | + + " where to_days(s.rq)=to_days(?1) " |
| 61 | + " and s.ssgsdm like %?2% " | 61 | + " and s.ssgsdm like %?2% " |
| 62 | + " and s.fgsdm like %?3%" | 62 | + " and s.fgsdm like %?3%" |
| 63 | + " and s.xlbm like %?4% " | 63 | + " and s.xlbm like %?4% " |
src/main/java/com/bsth/repository/oil/YlbRepository.java
| @@ -33,7 +33,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -33,7 +33,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 33 | @Query(value="select y.* from (select max(d.id) as id ,d.nbbm from (" | 33 | @Query(value="select y.* from (select max(d.id) as id ,d.nbbm from (" |
| 34 | + " select b.rq,b.nbbm,max(b.jcsx) as jcsx from (" | 34 | + " select b.rq,b.nbbm,max(b.jcsx) as jcsx from (" |
| 35 | + " select max(t.rq) as rq ,t.nbbm from bsth_c_ylb t " | 35 | + " select max(t.rq) as rq ,t.nbbm from bsth_c_ylb t " |
| 36 | - + " where to_days(t.rq)< to_days(?1) " | 36 | + + " where t.rq< ?1 " |
| 37 | + " and t.ssgsdm like %?2% and t.fgsdm like %?3% " | 37 | + " and t.ssgsdm like %?2% and t.fgsdm like %?3% " |
| 38 | + " and t.xlbm like %?4% and t.nbbm like %?5% group by nbbm ) a " | 38 | + " and t.xlbm like %?4% and t.nbbm like %?5% group by nbbm ) a " |
| 39 | + " left join bsth_c_ylb b on a.rq=b.rq and a.nbbm=b.nbbm " | 39 | + " left join bsth_c_ylb b on a.rq=b.rq and a.nbbm=b.nbbm " |
| @@ -63,29 +63,29 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -63,29 +63,29 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 63 | * @param rq | 63 | * @param rq |
| 64 | * @return | 64 | * @return |
| 65 | */ | 65 | */ |
| 66 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and ssgsdm like %?2% " | 66 | + @Query(value="SELECT * FROM bsth_c_ylb where rq=?1 and ssgsdm like %?2% " |
| 67 | + " and fgsdm like %?3%" | 67 | + " and fgsdm like %?3%" |
| 68 | + " and xlbm like %?4% and nbbm like %?5% order by ?6 asc ",nativeQuery=true) | 68 | + " and xlbm like %?4% and nbbm like %?5% order by ?6 asc ",nativeQuery=true) |
| 69 | List<Ylb> obtainYl(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); | 69 | List<Ylb> obtainYl(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); |
| 70 | 70 | ||
| 71 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and ssgsdm like %?2% " | 71 | + @Query(value="SELECT * FROM bsth_c_ylb where rq=?1 and ssgsdm like %?2% " |
| 72 | + " and fgsdm like %?3%" | 72 | + " and fgsdm like %?3%" |
| 73 | + " and xlbm = ?4 and nbbm like %?5% order by ?6 asc ",nativeQuery=true) | 73 | + " and xlbm = ?4 and nbbm like %?5% order by ?6 asc ",nativeQuery=true) |
| 74 | List<Ylb> obtainYlEq(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); | 74 | List<Ylb> obtainYlEq(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); |
| 75 | 75 | ||
| 76 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and ssgsdm like %?2% " | 76 | + @Query(value="SELECT * FROM bsth_c_ylb where rq=?1 and ssgsdm like %?2% " |
| 77 | + " and fgsdm like %?3%" | 77 | + " and fgsdm like %?3%" |
| 78 | + " and xlbm = ?4 and nbbm like %?5% order by ?6 asc ",nativeQuery=true) | 78 | + " and xlbm = ?4 and nbbm like %?5% order by ?6 asc ",nativeQuery=true) |
| 79 | List<Ylb> obtainYl_eq(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); | 79 | List<Ylb> obtainYl_eq(String rq,String gsdm,String fgsdm,String xlbm,String nbbm,String px); |
| 80 | 80 | ||
| 81 | 81 | ||
| 82 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and nbbm =?2 and jsy=?3 and xlbm=?4",nativeQuery=true) | 82 | + @Query(value="SELECT * FROM bsth_c_ylb where rq=?1 and nbbm =?2 and jsy=?3 and xlbm=?4",nativeQuery=true) |
| 83 | List<Ylb> queryListYlb(String rq,String nbbm,String jgh,String xlbm); | 83 | List<Ylb> queryListYlb(String rq,String nbbm,String jgh,String xlbm); |
| 84 | 84 | ||
| 85 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and xlbm=?2",nativeQuery=true) | 85 | + @Query(value="SELECT * FROM bsth_c_ylb where rq=?1 and xlbm=?2",nativeQuery=true) |
| 86 | List<Ylb> queryYlbByRqXlbm(String rq,String xlbm); | 86 | List<Ylb> queryYlbByRqXlbm(String rq,String xlbm); |
| 87 | 87 | ||
| 88 | - @Query(value="SELECT * FROM bsth_c_ylb where to_days(?1)=to_days(rq) and nbbm =?2 and jsy=?3 and xlbm=?4 order by ?5 asc",nativeQuery=true) | 88 | + @Query(value="SELECT * FROM bsth_c_ylb where rq=?1 and nbbm =?2 and jsy=?3 and xlbm=?4 order by ?5 asc",nativeQuery=true) |
| 89 | List<Ylb> checkYlb(String rq,String nbbm,String jgh,String xlbm,String px); | 89 | List<Ylb> checkYlb(String rq,String nbbm,String jgh,String xlbm,String px); |
| 90 | /** | 90 | /** |
| 91 | * 查询当天总的加注量和总里程 | 91 | * 查询当天总的加注量和总里程 |
| @@ -102,7 +102,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -102,7 +102,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 102 | * @param xlbm | 102 | * @param xlbm |
| 103 | * @return | 103 | * @return |
| 104 | */ | 104 | */ |
| 105 | - @Query(value="select nbbm,count(nbbm) from bsth_c_ylb where to_days(?1)=to_days(rq) and " | 105 | + @Query(value="select nbbm,count(nbbm) from bsth_c_ylb where rq=?1 and " |
| 106 | + " ssgsdm like %?2% " | 106 | + " ssgsdm like %?2% " |
| 107 | + " and fgsdm like %?3%" | 107 | + " and fgsdm like %?3%" |
| 108 | + " and xlbm like %?4% and nbbm like %?5% " | 108 | + " and xlbm like %?4% and nbbm like %?5% " |
| @@ -117,7 +117,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -117,7 +117,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 117 | * @param xlbm | 117 | * @param xlbm |
| 118 | * @return | 118 | * @return |
| 119 | */ | 119 | */ |
| 120 | - @Query(value="select nbbm,sum(jzl*100) as jzl ,sum(zlc*100) as zlc from bsth_c_ylb where to_days(?1)=to_days(rq) and " | 120 | + @Query(value="select nbbm,sum(jzl*100) as jzl ,sum(zlc*100) as zlc from bsth_c_ylb where rq=?1 and " |
| 121 | + " ssgsdm like %?2% " | 121 | + " ssgsdm like %?2% " |
| 122 | + " and fgsdm like %?3%" | 122 | + " and fgsdm like %?3%" |
| 123 | + " and xlbm like %?4% and nbbm like %?5% " | 123 | + " and xlbm like %?4% and nbbm like %?5% " |
| @@ -126,7 +126,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -126,7 +126,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 126 | 126 | ||
| 127 | 127 | ||
| 128 | @Query(value="select jzl,yh,sh from Ylb s " | 128 | @Query(value="select jzl,yh,sh from Ylb s " |
| 129 | - + " where to_days(?1)=to_days(s.rq) " | 129 | + + " where to_days(s.rq)=to_days(?1) " |
| 130 | + " and s.ssgsdm like %?2% " | 130 | + " and s.ssgsdm like %?2% " |
| 131 | + " and s.fgsdm like %?3%" | 131 | + " and s.fgsdm like %?3%" |
| 132 | + " and s.xlbm like %?4% " | 132 | + " and s.xlbm like %?4% " |
| @@ -134,7 +134,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -134,7 +134,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 134 | List<Object[]> sumYlb(String rq, String gsbm,String fgsbm,String xlbm,List<String> listNbbm); | 134 | List<Object[]> sumYlb(String rq, String gsbm,String fgsbm,String xlbm,List<String> listNbbm); |
| 135 | 135 | ||
| 136 | @Query(value="select ifnull(jzl,0),ifnull(yh,0),ifnull(sh,0) from bsth_c_ylb " | 136 | @Query(value="select ifnull(jzl,0),ifnull(yh,0),ifnull(sh,0) from bsth_c_ylb " |
| 137 | - + " where to_days(?1)=to_days(rq) " | 137 | + + " where rq=?1 " |
| 138 | + " and ssgsdm like %?2% " | 138 | + " and ssgsdm like %?2% " |
| 139 | + " and fgsdm like %?3%" | 139 | + " and fgsdm like %?3%" |
| 140 | + " and xlbm like %?4% " | 140 | + " and xlbm like %?4% " |
| @@ -144,7 +144,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | @@ -144,7 +144,7 @@ public interface YlbRepository extends BaseRepository<Ylb, Integer>{ | ||
| 144 | 144 | ||
| 145 | 145 | ||
| 146 | @Query(value="select s from Ylb s " | 146 | @Query(value="select s from Ylb s " |
| 147 | - + " where to_days(?1)=to_days(s.rq) " | 147 | + + " where to_days(s.rq)=to_days(?1) " |
| 148 | + " and s.ssgsdm =?2 " | 148 | + " and s.ssgsdm =?2 " |
| 149 | + " and s.fgsdm =?3 " | 149 | + " and s.fgsdm =?3 " |
| 150 | + " and s.xlbm like %?4% " | 150 | + " and s.xlbm like %?4% " |
src/main/java/com/bsth/repository/schedule/CarConfigInfoRepository.java
| @@ -50,4 +50,7 @@ public interface CarConfigInfoRepository extends BaseRepository<CarConfigInfo, L | @@ -50,4 +50,7 @@ public interface CarConfigInfoRepository extends BaseRepository<CarConfigInfo, L | ||
| 50 | 50 | ||
| 51 | @EntityGraph(value = "carConfigInfo_xl_cl", type = EntityGraph.EntityGraphType.FETCH) | 51 | @EntityGraph(value = "carConfigInfo_xl_cl", type = EntityGraph.EntityGraphType.FETCH) |
| 52 | List<CarConfigInfo> findByXlId(Integer xlid); | 52 | List<CarConfigInfo> findByXlId(Integer xlid); |
| 53 | + | ||
| 54 | + @EntityGraph(value = "carConfigInfo_xl_cl", type = EntityGraph.EntityGraphType.FETCH) | ||
| 55 | + List<CarConfigInfo> findByClId(Integer clid); | ||
| 53 | } | 56 | } |
| 54 | \ No newline at end of file | 57 | \ No newline at end of file |
src/main/java/com/bsth/repository/schedule/GuideboardInfoRepository.java
| @@ -43,5 +43,7 @@ public interface GuideboardInfoRepository extends BaseRepository<GuideboardInfo, | @@ -43,5 +43,7 @@ public interface GuideboardInfoRepository extends BaseRepository<GuideboardInfo, | ||
| 43 | 43 | ||
| 44 | @Query(value = "SELECT g FROM GuideboardInfo g where g.xl =?1 and g.lpName = ?2 and g.lpNo = ?3 and lpType =?4 and isCancel = 0") | 44 | @Query(value = "SELECT g FROM GuideboardInfo g where g.xl =?1 and g.lpName = ?2 and g.lpNo = ?3 and lpType =?4 and isCancel = 0") |
| 45 | List<GuideboardInfo> validateLp(Line xl,String lpName , int lpNo,String lpType); | 45 | List<GuideboardInfo> validateLp(Line xl,String lpName , int lpNo,String lpType); |
| 46 | + | ||
| 47 | + List<GuideboardInfo> findByXlId(Integer id); | ||
| 46 | 48 | ||
| 47 | } | 49 | } |
src/main/java/com/bsth/repository/schedule/TTInfoRepository.java
| @@ -48,4 +48,6 @@ public interface TTInfoRepository extends BaseRepository<TTInfo, Long> { | @@ -48,4 +48,6 @@ public interface TTInfoRepository extends BaseRepository<TTInfo, Long> { | ||
| 48 | "from LineVersions lv where lv.line.id = ?1 and lv.status = ?2 ") | 48 | "from LineVersions lv where lv.line.id = ?1 and lv.status = ?2 ") |
| 49 | List<Map<String, Object>> findLineVersionDescs3(Integer lineId, Integer status); | 49 | List<Map<String, Object>> findLineVersionDescs3(Integer lineId, Integer status); |
| 50 | 50 | ||
| 51 | + List<TTInfo> findByXlId(Integer xlId); | ||
| 52 | + | ||
| 51 | } | 53 | } |
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
| @@ -596,7 +596,7 @@ public class FormsServiceImpl implements FormsService { | @@ -596,7 +596,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 596 | @Override | 596 | @Override |
| 597 | public List<Shifday> shifday(Map<String, Object> map) { | 597 | public List<Shifday> shifday(Map<String, Object> map) { |
| 598 | 598 | ||
| 599 | - String line=""; | 599 | + String line=""; |
| 600 | String date=""; | 600 | String date=""; |
| 601 | String gsdmShif=""; | 601 | String gsdmShif=""; |
| 602 | String fgsdmShif=""; | 602 | String fgsdmShif=""; |
| @@ -624,18 +624,17 @@ public class FormsServiceImpl implements FormsService { | @@ -624,18 +624,17 @@ public class FormsServiceImpl implements FormsService { | ||
| 624 | if(!type.equals("") && !statue.equals("")){ | 624 | if(!type.equals("") && !statue.equals("")){ |
| 625 | sql_ +=" order by "+statue+" "+type; | 625 | sql_ +=" order by "+statue+" "+type; |
| 626 | } | 626 | } |
| 627 | - String sql ="select t.* from (select r.schedule_date,r.j_name," | ||
| 628 | - + "IFNULL(r.s_name,'')as s_name," | ||
| 629 | - + " r.cl_zbh,r.xl_bm, r.j_gh,r.gs_bm,r.fgs_bm,r.lp_name " | ||
| 630 | - + "FROM bsth_c_s_sp_info_real r where 1=1 " | ||
| 631 | - + " and r.schedule_date_str='"+date + "' " | 627 | + String sql ="select t.* from (select r.schedule_date," |
| 628 | + + " IFNULL(r.s_gh,'')as s_gh,r.cl_zbh," | ||
| 629 | + + " r.xl_bm,r.j_gh,r.gs_bm,r.fgs_bm,r.lp_name" | ||
| 630 | + + " FROM bsth_c_s_sp_info_real r where 1=1 " | ||
| 631 | + + " and r.schedule_date_str='"+date + "' " | ||
| 632 | + " and r.xl_bm = '"+line+"' " | 632 | + " and r.xl_bm = '"+line+"' " |
| 633 | + " and r.gs_bm like '%"+gsdmShif+"%' " | 633 | + " and r.gs_bm like '%"+gsdmShif+"%' " |
| 634 | - + " and r.fgs_bm like '%"+fgsdmShif+"%' ) t" | ||
| 635 | - + " GROUP BY t.schedule_date,t.j_name,t.s_name, " | ||
| 636 | - + "t.cl_zbh,t.xl_bm,t.j_gh,t.gs_bm,t.fgs_bm,t.lp_name " | ||
| 637 | - + sql_; | ||
| 638 | - | 634 | + + " and r.fgs_bm like '%"+fgsdmShif+"%' "+sql_+") t" |
| 635 | + + " GROUP BY t.schedule_date,t.xl_bm,t.cl_zbh,t.lp_name," | ||
| 636 | + + " t.j_gh,t.s_gh,t.gs_bm,t.fgs_bm "; | ||
| 637 | + | ||
| 639 | 638 | ||
| 640 | List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { | 639 | List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() { |
| 641 | 640 | ||
| @@ -643,15 +642,16 @@ public class FormsServiceImpl implements FormsService { | @@ -643,15 +642,16 @@ public class FormsServiceImpl implements FormsService { | ||
| 643 | public Shifday mapRow(ResultSet arg0, int arg1) throws SQLException { | 642 | public Shifday mapRow(ResultSet arg0, int arg1) throws SQLException { |
| 644 | Shifday shifday = new Shifday(); | 643 | Shifday shifday = new Shifday(); |
| 645 | shifday.setRq(arg0.getString("schedule_date")); | 644 | shifday.setRq(arg0.getString("schedule_date")); |
| 646 | - shifday.setjName(arg0.getString("j_name").toString()); | ||
| 647 | - shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString()); | 645 | +// shifday.setjName(arg0.getString("j_name").toString()); |
| 646 | +// shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString()); | ||
| 648 | shifday.setCarPlate(arg0.getString("cl_zbh").toString()); | 647 | shifday.setCarPlate(arg0.getString("cl_zbh").toString()); |
| 649 | shifday.setJgh(arg0.getString("j_gh")); | 648 | shifday.setJgh(arg0.getString("j_gh")); |
| 649 | + shifday.setSgh(arg0.getString("s_gh") == null ? "" : arg0.getString("s_gh").toString()); | ||
| 650 | shifday.setLpName(arg0.getString("lp_name")== null ? "" : arg0.getString("lp_name").toString()); | 650 | shifday.setLpName(arg0.getString("lp_name")== null ? "" : arg0.getString("lp_name").toString()); |
| 651 | return shifday; | 651 | return shifday; |
| 652 | } | 652 | } |
| 653 | - | ||
| 654 | }); | 653 | }); |
| 654 | + | ||
| 655 | List<ScheduleRealInfo> sList; | 655 | List<ScheduleRealInfo> sList; |
| 656 | List<ScheduleRealInfo> list_s; | 656 | List<ScheduleRealInfo> list_s; |
| 657 | List<ScheduleRealInfo> lists=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(map.get("line").toString(), map.get("date").toString()); | 657 | List<ScheduleRealInfo> lists=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(map.get("line").toString(), map.get("date").toString()); |
| @@ -661,8 +661,9 @@ public class FormsServiceImpl implements FormsService { | @@ -661,8 +661,9 @@ public class FormsServiceImpl implements FormsService { | ||
| 661 | Shifday d=list.get(i); | 661 | Shifday d=list.get(i); |
| 662 | for (int j = 0; j < lists.size(); j++) { | 662 | for (int j = 0; j < lists.size(); j++) { |
| 663 | ScheduleRealInfo s=lists.get(j); | 663 | ScheduleRealInfo s=lists.get(j); |
| 664 | - if(d.getJgh().equals(s.getjGh()) && d.getCarPlate().equals(s.getClZbh()) | ||
| 665 | - &&d.getLpName().equals(s.getLpName())){ | 664 | + if(d.getJgh().equals(s.getjGh()) && d.getSgh().equals(s.getsGh()) |
| 665 | + && d.getCarPlate().equals(s.getClZbh()) | ||
| 666 | + && d.getLpName().equals(s.getLpName())){ | ||
| 666 | sList.add(s); | 667 | sList.add(s); |
| 667 | Set<ChildTaskPlan> cts = s.getcTasks(); | 668 | Set<ChildTaskPlan> cts = s.getcTasks(); |
| 668 | if(cts != null && cts.size() > 0){ | 669 | if(cts != null && cts.size() > 0){ |
| @@ -674,7 +675,10 @@ public class FormsServiceImpl implements FormsService { | @@ -674,7 +675,10 @@ public class FormsServiceImpl implements FormsService { | ||
| 674 | } | 675 | } |
| 675 | } | 676 | } |
| 676 | } | 677 | } |
| 677 | - | 678 | + if(sList.size()>0){ |
| 679 | + d.setjName(sList.get(0).getjName()); | ||
| 680 | + d.setsName(sList.get(0).getsName() == null ? "":sList.get(0).getsName()); | ||
| 681 | + } | ||
| 678 | double ksgl=culateMileageService.culateKsgl(list_s); | 682 | double ksgl=culateMileageService.culateKsgl(list_s); |
| 679 | double jccgl=culateMileageService.culateJccgl(list_s); | 683 | double jccgl=culateMileageService.culateJccgl(list_s); |
| 680 | double zksgl=Arith.add(ksgl, jccgl); | 684 | double zksgl=Arith.add(ksgl, jccgl); |
| @@ -893,7 +897,9 @@ public class FormsServiceImpl implements FormsService { | @@ -893,7 +897,9 @@ public class FormsServiceImpl implements FormsService { | ||
| 893 | if(fgsdm.length() != 0){ | 897 | if(fgsdm.length() != 0){ |
| 894 | sql += " and r.fgs_bm ='"+fgsdm+"'"; | 898 | sql += " and r.fgs_bm ='"+fgsdm+"'"; |
| 895 | } | 899 | } |
| 896 | - sql += " group by r.j_gh,r.xl_bm,r.cl_zbh,r.j_name order by r.xl_bm,r.cl_zbh"; | 900 | + sql += " group by r.fgs_bm,r.j_gh,r.xl_bm,r.cl_zbh,r.j_name " + |
| 901 | + "order by r.xl_bm,r.cl_zbh"; | ||
| 902 | + | ||
| 897 | 903 | ||
| 898 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | 904 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 899 | @Override | 905 | @Override |
| @@ -924,7 +930,7 @@ public class FormsServiceImpl implements FormsService { | @@ -924,7 +930,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 924 | + " WHERE rq = '"+startDate+"'" | 930 | + " WHERE rq = '"+startDate+"'" |
| 925 | + linesql | 931 | + linesql |
| 926 | + " union" | 932 | + " union" |
| 927 | - + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh,fgsdm FROM bsth_c_dlb" | 933 | + + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh,fgsdm FROM bsth_c_dlb" |
| 928 | + " WHERE rq = '"+startDate+"'" | 934 | + " WHERE rq = '"+startDate+"'" |
| 929 | + linesql; | 935 | + linesql; |
| 930 | List<Singledata> listNy = jdbcTemplate.query(nysql, new RowMapper<Singledata>() { | 936 | List<Singledata> listNy = jdbcTemplate.query(nysql, new RowMapper<Singledata>() { |
| @@ -968,7 +974,7 @@ public class FormsServiceImpl implements FormsService { | @@ -968,7 +974,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 968 | s.setsName(""); | 974 | s.setsName(""); |
| 969 | s.setgS(BasicData.businessFgsCodeNameMap.get(sin_.getgS()+"_"+gsdm)); | 975 | s.setgS(BasicData.businessFgsCodeNameMap.get(sin_.getgS()+"_"+gsdm)); |
| 970 | s.setxL(line); | 976 | s.setxL(line); |
| 971 | - s.setXlmc(BasicData.lineCode2NameMap.get(line)); | 977 | + s.setXlmc(BasicData.lineCodeAllNameMap.get(line)); |
| 972 | s.setJzl(sin_.getJzl()); | 978 | s.setJzl(sin_.getJzl()); |
| 973 | s.setHyl(sin_.getHyl()); | 979 | s.setHyl(sin_.getHyl()); |
| 974 | s.setUnyyyl(sin_.getUnyyyl()); | 980 | s.setUnyyyl(sin_.getUnyyyl()); |
| @@ -1724,7 +1730,7 @@ public class FormsServiceImpl implements FormsService { | @@ -1724,7 +1730,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 1724 | startDate = map.get("startDate").toString(); | 1730 | startDate = map.get("startDate").toString(); |
| 1725 | 1731 | ||
| 1726 | String sql="select r.s_gh,r.s_name, " | 1732 | String sql="select r.s_gh,r.s_name, " |
| 1727 | - + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm" | 1733 | + + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm,xl_name" |
| 1728 | + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+startDate+"'"; | 1734 | + " from bsth_c_s_sp_info_real r where r.schedule_date_str = '"+startDate+"'"; |
| 1729 | if(!xlbm.equals("")){ | 1735 | if(!xlbm.equals("")){ |
| 1730 | sql += " and r.xl_bm = '"+xlbm+"'"; | 1736 | sql += " and r.xl_bm = '"+xlbm+"'"; |
| @@ -1736,7 +1742,7 @@ public class FormsServiceImpl implements FormsService { | @@ -1736,7 +1742,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 1736 | sql += " and r.fgs_bm='"+fgsdm+"'"; | 1742 | sql += " and r.fgs_bm='"+fgsdm+"'"; |
| 1737 | } | 1743 | } |
| 1738 | sql += " group by r.s_gh,r.s_name," | 1744 | sql += " group by r.s_gh,r.s_name," |
| 1739 | - + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | 1745 | + + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm,xl_name order by r.xl_bm,r.cl_zbh"; |
| 1740 | 1746 | ||
| 1741 | List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | 1747 | List<Singledata> list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 1742 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 1748 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| @@ -1750,6 +1756,7 @@ public class FormsServiceImpl implements FormsService { | @@ -1750,6 +1756,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 1750 | sin.setjName(arg0.getString("j_name")); | 1756 | sin.setjName(arg0.getString("j_name")); |
| 1751 | sin.setSgh(arg0.getString("s_gh")); | 1757 | sin.setSgh(arg0.getString("s_gh")); |
| 1752 | sin.setsName(arg0.getString("s_name")); | 1758 | sin.setsName(arg0.getString("s_name")); |
| 1759 | + sin.setXlmc(arg0.getString("xl_name")); | ||
| 1753 | sin.setgS(BasicData.businessFgsCodeNameMap.get(arg0.getString("fgs_bm")+"_"+arg0.getString("gs_bm"))); | 1760 | sin.setgS(BasicData.businessFgsCodeNameMap.get(arg0.getString("fgs_bm")+"_"+arg0.getString("gs_bm"))); |
| 1754 | 1761 | ||
| 1755 | return sin; | 1762 | return sin; |
| @@ -1767,7 +1774,7 @@ public class FormsServiceImpl implements FormsService { | @@ -1767,7 +1774,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 1767 | String clzbh=sin.getClzbh(); | 1774 | String clzbh=sin.getClzbh(); |
| 1768 | String xl=sin.getxL(); | 1775 | String xl=sin.getxL(); |
| 1769 | String spy=sin.getSgh(); | 1776 | String spy=sin.getSgh(); |
| 1770 | - sin.setxL(BasicData.lineCode2NameMap.get(xl)); | 1777 | + sin.setxL(sin.getXlmc()); |
| 1771 | for (int j = 0; j < listReal.size(); j++) { | 1778 | for (int j = 0; j < listReal.size(); j++) { |
| 1772 | ScheduleRealInfo s=listReal.get(j); | 1779 | ScheduleRealInfo s=listReal.get(j); |
| 1773 | if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh) | 1780 | if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh) |
| @@ -1912,7 +1919,12 @@ public class FormsServiceImpl implements FormsService { | @@ -1912,7 +1919,12 @@ public class FormsServiceImpl implements FormsService { | ||
| 1912 | sin.setEmptMileage(String.valueOf(zksgl)); | 1919 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 1913 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 1920 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 1914 | sin.setxL(y.getXlbm()); | 1921 | sin.setxL(y.getXlbm()); |
| 1915 | - sin.setXlmc(BasicData.lineCode2NameMap.get(y.getXlbm())); | 1922 | + if(y.getLinename()==null){ |
| 1923 | + sin.setXlmc(y.getXlname()); | ||
| 1924 | + }else{ | ||
| 1925 | + sin.setXlmc(y.getLinename()); | ||
| 1926 | + } | ||
| 1927 | + | ||
| 1916 | sin.setClzbh(clzbh); | 1928 | sin.setClzbh(clzbh); |
| 1917 | sin.setJsy(jsy); | 1929 | sin.setJsy(jsy); |
| 1918 | sin.setrQ(startDate); | 1930 | sin.setrQ(startDate); |
| @@ -1994,8 +2006,11 @@ public class FormsServiceImpl implements FormsService { | @@ -1994,8 +2006,11 @@ public class FormsServiceImpl implements FormsService { | ||
| 1994 | sin.setEmptMileage(String.valueOf(zksgl)); | 2006 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 1995 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 2007 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 1996 | sin.setxL(y.getXlbm()); | 2008 | sin.setxL(y.getXlbm()); |
| 1997 | - sin.setXlmc(BasicData.lineCode2NameMap.get(y.getXlbm())); | ||
| 1998 | - sin.setClzbh(clzbh); | 2009 | + if(y.getLinename()==null){ |
| 2010 | + sin.setXlmc(y.getXlname()); | ||
| 2011 | + }else{ | ||
| 2012 | + sin.setXlmc(y.getLinename()); | ||
| 2013 | + } sin.setClzbh(clzbh); | ||
| 1999 | sin.setJsy(jsy); | 2014 | sin.setJsy(jsy); |
| 2000 | sin.setrQ(startDate); | 2015 | sin.setrQ(startDate); |
| 2001 | if(newList.size()>0){ | 2016 | if(newList.size()>0){ |
| @@ -2019,7 +2034,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2019,7 +2034,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2019 | list.addAll(listD); | 2034 | list.addAll(listD); |
| 2020 | }else{ | 2035 | }else{ |
| 2021 | String sql="select r.s_gh,r.s_name, " | 2036 | String sql="select r.s_gh,r.s_name, " |
| 2022 | - + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" | 2037 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm,r.xl_name" |
| 2023 | + " from bsth_c_s_sp_info_real r where " | 2038 | + " from bsth_c_s_sp_info_real r where " |
| 2024 | + " r.schedule_date_str = '"+startDate+"'" | 2039 | + " r.schedule_date_str = '"+startDate+"'" |
| 2025 | + " and r.s_gh !='' and r.s_gh is not null "; | 2040 | + " and r.s_gh !='' and r.s_gh is not null "; |
| @@ -2033,7 +2048,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2033,7 +2048,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2033 | sql += " and r.fgs_bm='"+fgsdm+"'"; | 2048 | sql += " and r.fgs_bm='"+fgsdm+"'"; |
| 2034 | } | 2049 | } |
| 2035 | sql += " group by r.s_gh,r.s_name," | 2050 | sql += " group by r.s_gh,r.s_name," |
| 2036 | - + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | 2051 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm,r.xl_name order by r.xl_bm,r.cl_zbh"; |
| 2037 | 2052 | ||
| 2038 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | 2053 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 2039 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 2054 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| @@ -2045,6 +2060,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2045,6 +2060,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2045 | sin.setClzbh(arg0.getString("cl_zbh")); | 2060 | sin.setClzbh(arg0.getString("cl_zbh")); |
| 2046 | sin.setSgh(arg0.getString("s_gh")); | 2061 | sin.setSgh(arg0.getString("s_gh")); |
| 2047 | sin.setsName(arg0.getString("s_name")); | 2062 | sin.setsName(arg0.getString("s_name")); |
| 2063 | + sin.setXlmc(arg0.getString("xl_name")); | ||
| 2048 | return sin; | 2064 | return sin; |
| 2049 | } | 2065 | } |
| 2050 | }); | 2066 | }); |
| @@ -2054,6 +2070,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2054,6 +2070,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2054 | String jsy=sin.getSgh(); | 2070 | String jsy=sin.getSgh(); |
| 2055 | String line=sin.getxL(); | 2071 | String line=sin.getxL(); |
| 2056 | String clzbh=sin.getClzbh(); | 2072 | String clzbh=sin.getClzbh(); |
| 2073 | + String xl_name=sin.getXlmc(); | ||
| 2057 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); | 2074 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); |
| 2058 | List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); | 2075 | List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); |
| 2059 | 2076 | ||
| @@ -2086,7 +2103,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2086,7 +2103,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2086 | 2103 | ||
| 2087 | sin.setEmptMileage(String.valueOf(zksgl)); | 2104 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 2088 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 2105 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 2089 | - sin.setXlmc(BasicData.lineCode2NameMap.get(line)); | 2106 | + sin.setXlmc(xl_name); |
| 2090 | sin.setClzbh(clzbh); | 2107 | sin.setClzbh(clzbh); |
| 2091 | sin.setJsy(""); | 2108 | sin.setJsy(""); |
| 2092 | sin.setjName(""); | 2109 | sin.setjName(""); |
| @@ -2192,8 +2209,11 @@ public class FormsServiceImpl implements FormsService { | @@ -2192,8 +2209,11 @@ public class FormsServiceImpl implements FormsService { | ||
| 2192 | sin.setEmptMileage(String.valueOf(zksgl)); | 2209 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 2193 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 2210 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 2194 | sin.setxL(y.getXlbm()); | 2211 | sin.setxL(y.getXlbm()); |
| 2195 | - sin.setXlmc(BasicData.lineCode2NameMap.get(y.getXlbm())); | ||
| 2196 | - sin.setClzbh(clzbh); | 2212 | + if(y.getLinename()==null){ |
| 2213 | + sin.setXlmc(y.getXlname()); | ||
| 2214 | + }else{ | ||
| 2215 | + sin.setXlmc(y.getLinename()); | ||
| 2216 | + } sin.setClzbh(clzbh); | ||
| 2197 | sin.setJsy(jsy); | 2217 | sin.setJsy(jsy); |
| 2198 | sin.setrQ(startDate); | 2218 | sin.setrQ(startDate); |
| 2199 | if(newList.size()>0){ | 2219 | if(newList.size()>0){ |
| @@ -2274,7 +2294,11 @@ public class FormsServiceImpl implements FormsService { | @@ -2274,7 +2294,11 @@ public class FormsServiceImpl implements FormsService { | ||
| 2274 | sin.setEmptMileage(String.valueOf(zksgl)); | 2294 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 2275 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 2295 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 2276 | sin.setxL(y.getXlbm()); | 2296 | sin.setxL(y.getXlbm()); |
| 2277 | - sin.setXlmc(BasicData.lineCode2NameMap.get(y.getXlbm())); | 2297 | + if(y.getLinename()==null){ |
| 2298 | + sin.setXlmc(y.getXlname()); | ||
| 2299 | + }else{ | ||
| 2300 | + sin.setXlmc(y.getLinename()); | ||
| 2301 | + } | ||
| 2278 | sin.setClzbh(clzbh); | 2302 | sin.setClzbh(clzbh); |
| 2279 | sin.setJsy(jsy); | 2303 | sin.setJsy(jsy); |
| 2280 | sin.setrQ(startDate); | 2304 | sin.setrQ(startDate); |
| @@ -2299,7 +2323,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2299,7 +2323,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2299 | list.addAll(listD); | 2323 | list.addAll(listD); |
| 2300 | }else{ | 2324 | }else{ |
| 2301 | String sql="select r.s_gh,r.s_name, " | 2325 | String sql="select r.s_gh,r.s_name, " |
| 2302 | - + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" | 2326 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm,r.xl_name" |
| 2303 | + " from bsth_c_s_sp_info_real r where " | 2327 | + " from bsth_c_s_sp_info_real r where " |
| 2304 | + " r.schedule_date_str = '"+startDate+"'" | 2328 | + " r.schedule_date_str = '"+startDate+"'" |
| 2305 | + " and r.s_gh !='' and r.s_gh is not null "; | 2329 | + " and r.s_gh !='' and r.s_gh is not null "; |
| @@ -2313,7 +2337,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2313,7 +2337,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2313 | sql += " and r.fgs_bm='"+fgsdm+"'"; | 2337 | sql += " and r.fgs_bm='"+fgsdm+"'"; |
| 2314 | } | 2338 | } |
| 2315 | sql += " group by r.s_gh,r.s_name," | 2339 | sql += " group by r.s_gh,r.s_name," |
| 2316 | - + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | 2340 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm,xl_name order by r.xl_bm,r.cl_zbh"; |
| 2317 | 2341 | ||
| 2318 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | 2342 | list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { |
| 2319 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | 2343 | //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); |
| @@ -2325,6 +2349,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2325,6 +2349,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2325 | sin.setClzbh(arg0.getString("cl_zbh")); | 2349 | sin.setClzbh(arg0.getString("cl_zbh")); |
| 2326 | sin.setSgh(arg0.getString("s_gh")); | 2350 | sin.setSgh(arg0.getString("s_gh")); |
| 2327 | sin.setsName(arg0.getString("s_name")); | 2351 | sin.setsName(arg0.getString("s_name")); |
| 2352 | + sin.setXlmc(arg0.getString("xl_name")); | ||
| 2328 | return sin; | 2353 | return sin; |
| 2329 | } | 2354 | } |
| 2330 | }); | 2355 | }); |
| @@ -2334,6 +2359,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2334,6 +2359,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2334 | String jsy=sin.getSgh(); | 2359 | String jsy=sin.getSgh(); |
| 2335 | String line=sin.getxL(); | 2360 | String line=sin.getxL(); |
| 2336 | String clzbh=sin.getClzbh(); | 2361 | String clzbh=sin.getClzbh(); |
| 2362 | + String xl_name=sin.getXlmc(); | ||
| 2337 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); | 2363 | List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); |
| 2338 | List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); | 2364 | List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); |
| 2339 | 2365 | ||
| @@ -2367,7 +2393,7 @@ public class FormsServiceImpl implements FormsService { | @@ -2367,7 +2393,7 @@ public class FormsServiceImpl implements FormsService { | ||
| 2367 | 2393 | ||
| 2368 | sin.setEmptMileage(String.valueOf(zksgl)); | 2394 | sin.setEmptMileage(String.valueOf(zksgl)); |
| 2369 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | 2395 | sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); |
| 2370 | - sin.setXlmc(BasicData.lineCode2NameMap.get(line)); | 2396 | + sin.setXlmc(xl_name); |
| 2371 | sin.setClzbh(clzbh); | 2397 | sin.setClzbh(clzbh); |
| 2372 | sin.setJsy(""); | 2398 | sin.setJsy(""); |
| 2373 | sin.setjName(""); | 2399 | sin.setjName(""); |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| @@ -400,7 +400,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -400,7 +400,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 400 | sql += " and cl.line_code = '"+line+"'"; | 400 | sql += " and cl.line_code = '"+line+"'"; |
| 401 | if(ttId.length() != 0) | 401 | if(ttId.length() != 0) |
| 402 | sql += " and td.ttinfo = '"+ttId+"'"; | 402 | sql += " and td.ttinfo = '"+ttId+"'"; |
| 403 | - sql += " group by td.lp"; | 403 | + sql += " group by td.lp, lp.lp_name"; |
| 404 | 404 | ||
| 405 | list = jdbcTemplate.query(sql, | 405 | list = jdbcTemplate.query(sql, |
| 406 | new RowMapper<Map<String, Object>>(){ | 406 | new RowMapper<Map<String, Object>>(){ |
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
| @@ -328,7 +328,7 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw | @@ -328,7 +328,7 @@ public class CwjyServiceImpl extends BaseServiceImpl<Cwjy,Integer> implements Cw | ||
| 328 | } | 328 | } |
| 329 | 329 | ||
| 330 | String sql_ylb="SELECT nbbm,group_concat(jsy) AS jsy FROM bsth_c_ylb WHERE " | 330 | String sql_ylb="SELECT nbbm,group_concat(jsy) AS jsy FROM bsth_c_ylb WHERE " |
| 331 | - + " to_days(rq) = to_days('"+rq+"') AND ssgsdm = '"+gsdm+"' AND " | 331 | + + " rq = '"+rq+"' AND ssgsdm = '"+gsdm+"' AND " |
| 332 | + " fgsdm = '"+fgsdm+"' GROUP BY nbbm"; | 332 | + " fgsdm = '"+fgsdm+"' GROUP BY nbbm"; |
| 333 | 333 | ||
| 334 | List<Map<String, String>> ylbList= jdbcTemplate.query(sql_ylb, | 334 | List<Map<String, String>> ylbList= jdbcTemplate.query(sql_ylb, |
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
| @@ -197,6 +197,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -197,6 +197,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 197 | t.setJsy(map.get("jGh")==null?"":map.get("jGh").toString()); | 197 | t.setJsy(map.get("jGh")==null?"":map.get("jGh").toString()); |
| 198 | t.setZlc(map.get("totalKilometers")==null?0.0:Double.parseDouble(df.format(Double.parseDouble(map.get("totalKilometers").toString())))); | 198 | t.setZlc(map.get("totalKilometers")==null?0.0:Double.parseDouble(df.format(Double.parseDouble(map.get("totalKilometers").toString())))); |
| 199 | t.setXlbm(map.get("xlBm")==null?"":map.get("xlBm").toString()); | 199 | t.setXlbm(map.get("xlBm")==null?"":map.get("xlBm").toString()); |
| 200 | + t.setLinename(map.get("lineName")==null?"":map.get("lineName").toString()); | ||
| 200 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); | 201 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); |
| 201 | t.setSsgsdm(map.get("company")==null?"":map.get("company").toString()); | 202 | t.setSsgsdm(map.get("company")==null?"":map.get("company").toString()); |
| 202 | t.setFgsdm(map.get("bCompany")==null?"":map.get("bCompany").toString()); | 203 | t.setFgsdm(map.get("bCompany")==null?"":map.get("bCompany").toString()); |
| @@ -464,6 +465,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -464,6 +465,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 464 | t.setZlc(map.get("totalKilometers") == null ? 0.0 | 465 | t.setZlc(map.get("totalKilometers") == null ? 0.0 |
| 465 | : Double.parseDouble(map.get("totalKilometers").toString())); | 466 | : Double.parseDouble(map.get("totalKilometers").toString())); |
| 466 | t.setXlbm(map.get("xlBm") == null ? "" : map.get("xlBm").toString()); | 467 | t.setXlbm(map.get("xlBm") == null ? "" : map.get("xlBm").toString()); |
| 468 | + t.setLinename(map.get("lineName")==null?"":map.get("lineName").toString()); | ||
| 467 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); | 469 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); |
| 468 | t.setSsgsdm(map.get("company") == null ? "" : map.get("company").toString()); | 470 | t.setSsgsdm(map.get("company") == null ? "" : map.get("company").toString()); |
| 469 | t.setFgsdm(map.get("bCompany") == null ? "" : map.get("bCompany").toString()); | 471 | t.setFgsdm(map.get("bCompany") == null ? "" : map.get("bCompany").toString()); |
| @@ -884,7 +886,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | @@ -884,7 +886,7 @@ public class DlbServiceImpl extends BaseServiceImpl<Dlb,Integer> implements DlbS | ||
| 884 | String px) { | 886 | String px) { |
| 885 | // TODO Auto-generated method stub | 887 | // TODO Auto-generated method stub |
| 886 | String sql="SELECT * FROM bsth_c_dlb " | 888 | String sql="SELECT * FROM bsth_c_dlb " |
| 887 | - + " where to_days('"+rq+"')=to_days(rq) and ssgsdm like '%"+gsdm+"%' " | 889 | + + " where rq='"+rq+"' and ssgsdm like '%"+gsdm+"%' " |
| 888 | + " and fgsdm like '%"+fgsdm+"%'"; | 890 | + " and fgsdm like '%"+fgsdm+"%'"; |
| 889 | if(xlbm.equals("")){ | 891 | if(xlbm.equals("")){ |
| 890 | sql+= " and xlbm like '%"+xlbm+"%' "; | 892 | sql+= " and xlbm like '%"+xlbm+"%' "; |
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
| @@ -194,6 +194,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -194,6 +194,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 194 | t.setJsy(map.get("jGh")==null?"":map.get("jGh").toString()); | 194 | t.setJsy(map.get("jGh")==null?"":map.get("jGh").toString()); |
| 195 | t.setZlc(map.get("totalKilometers")==null?0.0:Double.parseDouble(map.get("totalKilometers").toString())); | 195 | t.setZlc(map.get("totalKilometers")==null?0.0:Double.parseDouble(map.get("totalKilometers").toString())); |
| 196 | t.setXlbm(map.get("xlBm")==null?"":map.get("xlBm").toString()); | 196 | t.setXlbm(map.get("xlBm")==null?"":map.get("xlBm").toString()); |
| 197 | + t.setLinename(map.get("lineName")==null?"":map.get("lineName").toString()); | ||
| 197 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); | 198 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); |
| 198 | t.setSsgsdm(map.get("company")==null?"":map.get("company").toString()); | 199 | t.setSsgsdm(map.get("company")==null?"":map.get("company").toString()); |
| 199 | t.setFgsdm(map.get("bCompany")==null?"":map.get("bCompany").toString()); | 200 | t.setFgsdm(map.get("bCompany")==null?"":map.get("bCompany").toString()); |
| @@ -492,6 +493,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | @@ -492,6 +493,7 @@ public class YlbServiceImpl extends BaseServiceImpl<Ylb,Integer> implements YlbS | ||
| 492 | t.setZlc(map.get("totalKilometers") == null ? 0.0 | 493 | t.setZlc(map.get("totalKilometers") == null ? 0.0 |
| 493 | : Double.parseDouble(map.get("totalKilometers").toString())); | 494 | : Double.parseDouble(map.get("totalKilometers").toString())); |
| 494 | t.setXlbm(map.get("xlBm") == null ? "" : map.get("xlBm").toString()); | 495 | t.setXlbm(map.get("xlBm") == null ? "" : map.get("xlBm").toString()); |
| 496 | + t.setLinename(map.get("lineName")==null?"":map.get("lineName").toString()); | ||
| 495 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); | 497 | t.setJcsx(Integer.parseInt(map.get("seqNumber").toString())); |
| 496 | t.setSsgsdm(map.get("company") == null ? "" : map.get("company").toString()); | 498 | t.setSsgsdm(map.get("company") == null ? "" : map.get("company").toString()); |
| 497 | t.setFgsdm(map.get("bCompany") == null ? "" : map.get("bCompany").toString()); | 499 | t.setFgsdm(map.get("bCompany") == null ? "" : map.get("bCompany").toString()); |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -611,111 +611,119 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -611,111 +611,119 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 611 | * 临加班次 | 611 | * 临加班次 |
| 612 | */ | 612 | */ |
| 613 | @Override | 613 | @Override |
| 614 | - public Map<String, Object> save(ScheduleRealInfo t) { | 614 | + public Map<String, Object> save(ScheduleRealInfo sch) { |
| 615 | Map<String, Object> rs = new HashMap<>(); | 615 | Map<String, Object> rs = new HashMap<>(); |
| 616 | try { | 616 | try { |
| 617 | - if (!carExist(t.getGsBm(), t.getClZbh())) { | ||
| 618 | - rs.put("msg", "车辆 " + t.getClZbh() + " <a href=\"/#/busInfoManage\" target=_blank>车辆基础信息</a> 里找不到!"); | ||
| 619 | - rs.put("status", ResponseCode.ERROR); | ||
| 620 | - return rs; | 617 | + String clZbh = sch.getClZbh(); |
| 618 | + if (StringUtils.isNotEmpty(clZbh)) { | ||
| 619 | + //检测 | ||
| 620 | + if (!carExist(sch.getGsBm(), clZbh)) { | ||
| 621 | + rs.put("status", ResponseCode.ERROR); | ||
| 622 | + rs.put("msg", "车辆 " + clZbh + " 不存在!"); | ||
| 623 | + return rs; | ||
| 624 | + } else if (!sch.getGsBm().equals(BasicData.nbbm2CompanyCodeMap.get(clZbh))) { | ||
| 625 | + rs.put("status", ResponseCode.ERROR); | ||
| 626 | + rs.put("msg", sch.getXlName() + "所属的公司编码下找不到自编号为【" + clZbh + "】的车辆"); | ||
| 627 | + return rs; | ||
| 628 | + } | ||
| 621 | } | 629 | } |
| 622 | 630 | ||
| 623 | SysUser user = SecurityUtils.getCurrentUser(); | 631 | SysUser user = SecurityUtils.getCurrentUser(); |
| 624 | - String schDate = DayOfSchedule.currSchDateMap.get(t.getXlBm()); | 632 | + String schDate = DayOfSchedule.currSchDateMap.get(sch.getXlBm()); |
| 625 | 633 | ||
| 626 | SimpleDateFormat sdfyyyyMMdd = new SimpleDateFormat("yyyy-MM-dd"), sdfyyyyMMddHHmm = new SimpleDateFormat("yyyy-MM-ddHH:mm"); | 634 | SimpleDateFormat sdfyyyyMMdd = new SimpleDateFormat("yyyy-MM-dd"), sdfyyyyMMddHHmm = new SimpleDateFormat("yyyy-MM-ddHH:mm"); |
| 627 | 635 | ||
| 628 | - if (StringUtils.isEmpty(t.getjGh())) { | 636 | + if (StringUtils.isEmpty(sch.getjGh())) { |
| 629 | rs.put("status", ResponseCode.ERROR); | 637 | rs.put("status", ResponseCode.ERROR); |
| 630 | rs.put("msg", "驾驶员工号不能为空!"); | 638 | rs.put("msg", "驾驶员工号不能为空!"); |
| 631 | return rs; | 639 | return rs; |
| 632 | } | 640 | } |
| 633 | //截取驾驶员工号 | 641 | //截取驾驶员工号 |
| 634 | - if (t.getjGh().indexOf("-") != -1) { | ||
| 635 | - t.setjGh(t.getjGh().split("-")[1]); | 642 | + if (sch.getjGh().indexOf("-") != -1) { |
| 643 | + sch.setjGh(sch.getjGh().split("-")[1]); | ||
| 636 | } | 644 | } |
| 637 | //检查驾驶员工号 | 645 | //检查驾驶员工号 |
| 638 | - String jName = getPersonName(t.getGsBm(), t.getjGh()); | 646 | + String jName = getPersonName(sch.getGsBm(), sch.getjGh()); |
| 639 | if (StringUtils.isEmpty(jName)) { | 647 | if (StringUtils.isEmpty(jName)) { |
| 640 | - rs.put("msg", t.getXlName() + "所属的公司编码下找不到工号为【" + t.getjGh() + "】的驾驶员"); | 648 | + rs.put("msg", sch.getXlName() + "所属的公司编码下找不到工号为【" + sch.getjGh() + "】的驾驶员"); |
| 641 | rs.put("status", ResponseCode.ERROR); | 649 | rs.put("status", ResponseCode.ERROR); |
| 642 | return rs; | 650 | return rs; |
| 643 | - } else if (StringUtils.isEmpty(t.getjName())) { | ||
| 644 | - t.setjName(jName);//补上驾驶员名称 | 651 | + } else if (StringUtils.isEmpty(sch.getjName())) { |
| 652 | + sch.setjName(jName);//补上驾驶员名称 | ||
| 645 | } | 653 | } |
| 646 | 654 | ||
| 647 | //有售票员 | 655 | //有售票员 |
| 648 | - if (StringUtils.isNotEmpty(t.getsGh())) { | ||
| 649 | - String sName = getPersonName(t.getGsBm(), t.getsGh()); | 656 | + if (StringUtils.isNotEmpty(sch.getsGh())) { |
| 657 | + String sName = getPersonName(sch.getGsBm(), sch.getsGh()); | ||
| 650 | if (StringUtils.isEmpty(sName)) { | 658 | if (StringUtils.isEmpty(sName)) { |
| 651 | - rs.put("msg", t.getXlName() + "所属的公司编码下找不到工号为【" + t.getjGh() + "】的售票员"); | 659 | + rs.put("msg", sch.getXlName() + "所属的公司编码下找不到工号为【" + sch.getjGh() + "】的售票员"); |
| 652 | rs.put("status", ResponseCode.ERROR); | 660 | rs.put("status", ResponseCode.ERROR); |
| 653 | return rs; | 661 | return rs; |
| 654 | - } else if (StringUtils.isEmpty(t.getsName())) { | ||
| 655 | - t.setsName(sName);//补上售票员名称 | 662 | + } else if (StringUtils.isEmpty(sch.getsName())) { |
| 663 | + sch.setsName(sName);//补上售票员名称 | ||
| 656 | } | 664 | } |
| 657 | } else { | 665 | } else { |
| 658 | - t.setsGh(""); | ||
| 659 | - t.setsName(""); | 666 | + sch.setsGh(""); |
| 667 | + sch.setsName(""); | ||
| 660 | } | 668 | } |
| 661 | 669 | ||
| 662 | //公司 和 分公司名称 | 670 | //公司 和 分公司名称 |
| 663 | - t.setGsName(BasicData.businessCodeNameMap.get(t.getGsBm())); | ||
| 664 | - t.setFgsName(BasicData.businessFgsCodeNameMap.get(t.getFgsBm() + "_" + t.getGsBm())); | ||
| 665 | - t.setCreateDate(new Date()); | ||
| 666 | - t.setScheduleDateStr(schDate); | ||
| 667 | - t.setScheduleDate(sdfyyyyMMdd.parse(schDate)); | ||
| 668 | - t.setRealExecDate(schDate); | ||
| 669 | - | ||
| 670 | - t.setCreateBy(user); | ||
| 671 | - t.setSflj(true); | ||
| 672 | - t.setLate(false); | ||
| 673 | - t.setDfsj(t.getFcsj()); | ||
| 674 | - t.setZdsjT(sdfyyyyMMddHHmm.parse(schDate + t.getZdsj()).getTime()); | ||
| 675 | - t.setJhlcOrig(t.getJhlc()); | ||
| 676 | - t.setCreateDate(new Date()); | ||
| 677 | - t.setUpdateDate(new Date()); | ||
| 678 | - t.setSpId(-1L); | 671 | + sch.setGsName(BasicData.businessCodeNameMap.get(sch.getGsBm())); |
| 672 | + sch.setFgsName(BasicData.businessFgsCodeNameMap.get(sch.getFgsBm() + "_" + sch.getGsBm())); | ||
| 673 | + sch.setCreateDate(new Date()); | ||
| 674 | + sch.setScheduleDateStr(schDate); | ||
| 675 | + sch.setScheduleDate(sdfyyyyMMdd.parse(schDate)); | ||
| 676 | + sch.setRealExecDate(schDate); | ||
| 677 | + | ||
| 678 | + sch.setCreateBy(user); | ||
| 679 | + sch.setSflj(true); | ||
| 680 | + sch.setLate(false); | ||
| 681 | + sch.setDfsj(sch.getFcsj()); | ||
| 682 | + sch.setZdsjT(sdfyyyyMMddHHmm.parse(schDate + sch.getZdsj()).getTime()); | ||
| 683 | + sch.setJhlcOrig(sch.getJhlc()); | ||
| 684 | + sch.setCreateDate(new Date()); | ||
| 685 | + sch.setUpdateDate(new Date()); | ||
| 686 | + sch.setSpId(-1L); | ||
| 679 | //起终点名称 | 687 | //起终点名称 |
| 680 | - String prefix = t.getXlBm() + "_" + t.getXlDir() + "_"; | ||
| 681 | - t.setQdzName(BasicData.getStationNameByCode(t.getQdzCode(), prefix)); | ||
| 682 | - t.setZdzName(BasicData.getStationNameByCode(t.getZdzCode(), prefix)); | 688 | + String prefix = sch.getXlBm() + "_" + sch.getXlDir() + "_"; |
| 689 | + sch.setQdzName(BasicData.getStationNameByCode(sch.getQdzCode(), prefix)); | ||
| 690 | + sch.setZdzName(BasicData.getStationNameByCode(sch.getZdzCode(), prefix)); | ||
| 683 | 691 | ||
| 684 | //计算班次实际执行时间 | 692 | //计算班次实际执行时间 |
| 685 | - schAttrCalculator.calcRealDate(t).calcAllTimeByFcsj(t); | 693 | + schAttrCalculator.calcRealDate(sch).calcAllTimeByFcsj(sch); |
| 686 | 694 | ||
| 687 | //处理计达跨24点 | 695 | //处理计达跨24点 |
| 688 | - LineConfig conf = lineConfigData.get(t.getXlBm()); | ||
| 689 | - if (t.getZdsj().compareTo(conf.getStartOpt()) < 0) { | ||
| 690 | - t.setZdsjT(sdfyyyyMMddHHmm.parse(t.getScheduleDateStr() + t.getZdsj()).getTime() + (1000 * 60 * 60 * 24)); | 696 | + LineConfig conf = lineConfigData.get(sch.getXlBm()); |
| 697 | + if (sch.getZdsj().compareTo(conf.getStartOpt()) < 0) { | ||
| 698 | + sch.setZdsjT(sdfyyyyMMddHHmm.parse(sch.getScheduleDateStr() + sch.getZdsj()).getTime() + (1000 * 60 * 60 * 24)); | ||
| 691 | } | 699 | } |
| 692 | 700 | ||
| 693 | //班次历时 | 701 | //班次历时 |
| 694 | - t.setBcsj((int) ((t.getZdsjT() - t.getDfsjT()) / 1000 / 60)); | ||
| 695 | - if (t.getZdsjT() < t.getFcsjT()) { | 702 | + sch.setBcsj((int) ((sch.getZdsjT() - sch.getDfsjT()) / 1000 / 60)); |
| 703 | + if (sch.getZdsjT() < sch.getFcsjT()) { | ||
| 696 | rs.put("status", ResponseCode.ERROR); | 704 | rs.put("status", ResponseCode.ERROR); |
| 697 | rs.put("msg", "起终点时间异常!"); | 705 | rs.put("msg", "起终点时间异常!"); |
| 698 | return rs; | 706 | return rs; |
| 699 | } | 707 | } |
| 700 | 708 | ||
| 701 | - t.setId(dayOfSchedule.getId()); | 709 | + sch.setId(dayOfSchedule.getId()); |
| 702 | //实时入库 | 710 | //实时入库 |
| 703 | - super.save(t); | 711 | + super.save(sch); |
| 704 | 712 | ||
| 705 | // 加入缓存 | 713 | // 加入缓存 |
| 706 | - dayOfSchedule.put(t); | 714 | + dayOfSchedule.put(sch); |
| 707 | 715 | ||
| 708 | //更新起点应到时间 | 716 | //更新起点应到时间 |
| 709 | - List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(t); | 717 | + List<ScheduleRealInfo> ts = dayOfSchedule.updateQdzTimePlan(sch); |
| 710 | 718 | ||
| 711 | //重新计算车辆当前执行班次 | 719 | //重新计算车辆当前执行班次 |
| 712 | - dayOfSchedule.reCalcExecPlan(t.getClZbh()); | 720 | + dayOfSchedule.reCalcExecPlan(sch.getClZbh()); |
| 713 | 721 | ||
| 714 | //记录站到场历时数据 | 722 | //记录站到场历时数据 |
| 715 | - Station2ParkBuffer.put(t); | 723 | + Station2ParkBuffer.put(sch); |
| 716 | 724 | ||
| 717 | rs.put("ts", ts); | 725 | rs.put("ts", ts); |
| 718 | - rs.put("t", t); | 726 | + rs.put("t", sch); |
| 719 | } catch (Exception e) { | 727 | } catch (Exception e) { |
| 720 | logger.error("", e); | 728 | logger.error("", e); |
| 721 | rs.put("status", ResponseCode.ERROR); | 729 | rs.put("status", ResponseCode.ERROR); |
| @@ -3257,6 +3265,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3257,6 +3265,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3257 | * 对计划发车时间相同的班次进行排序 out最前 in最后 | 3265 | * 对计划发车时间相同的班次进行排序 out最前 in最后 |
| 3258 | */ | 3266 | */ |
| 3259 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); | 3267 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| 3268 | + SimpleDateFormat sdfnyr =new SimpleDateFormat("yyyy-MM-dd"); | ||
| 3260 | String minfcsj = "02:00"; | 3269 | String minfcsj = "02:00"; |
| 3261 | List<Line> lineList = lineRepository.findLineByCode(line); | 3270 | List<Line> lineList = lineRepository.findLineByCode(line); |
| 3262 | if (lineList.size() > 0) { | 3271 | if (lineList.size() > 0) { |
| @@ -3285,9 +3294,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3285,9 +3294,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3285 | Calendar calendar = new GregorianCalendar(); | 3294 | Calendar calendar = new GregorianCalendar(); |
| 3286 | calendar.setTime(s.getScheduleDate()); | 3295 | calendar.setTime(s.getScheduleDate()); |
| 3287 | calendar.add(calendar.DATE, 1); | 3296 | calendar.add(calendar.DATE, 1); |
| 3288 | - s.setScheduleDate(calendar.getTime()); | 3297 | + Date date_sch= calendar.getTime(); |
| 3289 | try { | 3298 | try { |
| 3290 | - fscjT = sdf.parse(sdf.format(s.getScheduleDate()) + " " + s.getFcsj()).getTime(); | 3299 | + fscjT = sdf.parse(sdfnyr.format(date_sch) + " " + s.getFcsj()).getTime(); |
| 3291 | } catch (ParseException e) { | 3300 | } catch (ParseException e) { |
| 3292 | // TODO Auto-generated catch block | 3301 | // TODO Auto-generated catch block |
| 3293 | e.printStackTrace(); | 3302 | e.printStackTrace(); |
| @@ -3299,15 +3308,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3299,15 +3308,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3299 | } catch (ParseException e) { | 3308 | } catch (ParseException e) { |
| 3300 | // TODO Auto-generated catch block | 3309 | // TODO Auto-generated catch block |
| 3301 | e.printStackTrace(); | 3310 | e.printStackTrace(); |
| 3302 | - } | ||
| 3303 | - ; | 3311 | + }; |
| 3304 | } | 3312 | } |
| 3305 | s.setFcsjT(fscjT); | 3313 | s.setFcsjT(fscjT); |
| 3306 | } | 3314 | } |
| 3307 | List<ScheduleRealInfo> listInfo2=new ArrayList<ScheduleRealInfo>(); | 3315 | List<ScheduleRealInfo> listInfo2=new ArrayList<ScheduleRealInfo>(); |
| 3308 | listInfo2.addAll(listInfo); | 3316 | listInfo2.addAll(listInfo); |
| 3309 | Collections.sort(listInfo, new compareLpFcsjType()); | 3317 | Collections.sort(listInfo, new compareLpFcsjType()); |
| 3310 | - System.out.println(listInfo); | ||
| 3311 | Collections.sort(listInfo2,new compareDirLpFcsjType()); | 3318 | Collections.sort(listInfo2,new compareDirLpFcsjType()); |
| 3312 | for (int i = 0; i < listInfo.size(); i++) { | 3319 | for (int i = 0; i < listInfo.size(); i++) { |
| 3313 | ScheduleRealInfo t = listInfo.get(i); | 3320 | ScheduleRealInfo t = listInfo.get(i); |
| @@ -3446,6 +3453,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3446,6 +3453,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3446 | * 对计划发车时间相同的班次进行排序 out最前 in最后 | 3453 | * 对计划发车时间相同的班次进行排序 out最前 in最后 |
| 3447 | */ | 3454 | */ |
| 3448 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); | 3455 | SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm"); |
| 3456 | + SimpleDateFormat sdfnyr = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 3457 | + | ||
| 3449 | String minfcsj = "02:00"; | 3458 | String minfcsj = "02:00"; |
| 3450 | List<Line> lineList = lineRepository.findLineByCode(line); | 3459 | List<Line> lineList = lineRepository.findLineByCode(line); |
| 3451 | if (lineList.size() > 0) { | 3460 | if (lineList.size() > 0) { |
| @@ -3474,9 +3483,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3474,9 +3483,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3474 | Calendar calendar = new GregorianCalendar(); | 3483 | Calendar calendar = new GregorianCalendar(); |
| 3475 | calendar.setTime(s.getScheduleDate()); | 3484 | calendar.setTime(s.getScheduleDate()); |
| 3476 | calendar.add(calendar.DATE, 1); | 3485 | calendar.add(calendar.DATE, 1); |
| 3477 | - s.setScheduleDate(calendar.getTime()); | 3486 | + Date date_sch=calendar.getTime(); |
| 3478 | try { | 3487 | try { |
| 3479 | - fscjT = sdf.parse(sdf.format(s.getScheduleDate()) + " " + s.getFcsj()).getTime(); | 3488 | + fscjT = sdf.parse(sdfnyr.format(date_sch) + " " + s.getFcsj()).getTime(); |
| 3480 | } catch (ParseException e) { | 3489 | } catch (ParseException e) { |
| 3481 | // TODO Auto-generated catch block | 3490 | // TODO Auto-generated catch block |
| 3482 | e.printStackTrace(); | 3491 | e.printStackTrace(); |
| @@ -3765,6 +3774,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3765,6 +3774,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3765 | boolean fage = true; | 3774 | boolean fage = true; |
| 3766 | String company = ""; | 3775 | String company = ""; |
| 3767 | String bCompany = ""; | 3776 | String bCompany = ""; |
| 3777 | + String lineName=""; | ||
| 3768 | List<ScheduleRealInfo> listS = new ArrayList<ScheduleRealInfo>(); | 3778 | List<ScheduleRealInfo> listS = new ArrayList<ScheduleRealInfo>(); |
| 3769 | for (ScheduleRealInfo scheduleRealInfo : lists) { | 3779 | for (ScheduleRealInfo scheduleRealInfo : lists) { |
| 3770 | if (scheduleRealInfo.getjGh().equals(jName) | 3780 | if (scheduleRealInfo.getjGh().equals(jName) |
| @@ -3775,6 +3785,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3775,6 +3785,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3775 | //根据线路代码获取公司 | 3785 | //根据线路代码获取公司 |
| 3776 | company = scheduleRealInfo.getGsBm(); | 3786 | company = scheduleRealInfo.getGsBm(); |
| 3777 | bCompany = scheduleRealInfo.getFgsBm(); | 3787 | bCompany = scheduleRealInfo.getFgsBm(); |
| 3788 | + lineName = scheduleRealInfo.getXlName(); | ||
| 3778 | fage = false; | 3789 | fage = false; |
| 3779 | } | 3790 | } |
| 3780 | Set<ChildTaskPlan> cts = scheduleRealInfo.getcTasks(); | 3791 | Set<ChildTaskPlan> cts = scheduleRealInfo.getcTasks(); |
| @@ -3789,6 +3800,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3789,6 +3800,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3789 | } | 3800 | } |
| 3790 | yesterdayDataList.get(x).put("company", company); | 3801 | yesterdayDataList.get(x).put("company", company); |
| 3791 | yesterdayDataList.get(x).put("bCompany", bCompany); | 3802 | yesterdayDataList.get(x).put("bCompany", bCompany); |
| 3803 | + yesterdayDataList.get(x).put("lineName", lineName); | ||
| 3792 | Double ljgl = culateMieageService.culateLjgl(listS); | 3804 | Double ljgl = culateMieageService.culateLjgl(listS); |
| 3793 | Double sjgl = culateMieageService.culateSjgl(listS); | 3805 | Double sjgl = culateMieageService.culateSjgl(listS); |
| 3794 | Double ksgl = culateMieageService.culateKsgl(listS); | 3806 | Double ksgl = culateMieageService.culateKsgl(listS); |
| @@ -4964,6 +4976,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -4964,6 +4976,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 4964 | String state = map.get("state").toString(); | 4976 | String state = map.get("state").toString(); |
| 4965 | String type = map.get("type").toString(); | 4977 | String type = map.get("type").toString(); |
| 4966 | String genre =map.get("genre").toString(); | 4978 | String genre =map.get("genre").toString(); |
| 4979 | + String df=""; | ||
| 4980 | + if(map.get("df")!=null){ | ||
| 4981 | + df=map.get("df").toString(); | ||
| 4982 | + } | ||
| 4983 | + | ||
| 4967 | List<Map<String, Object>> dataList2 = new ArrayList<Map<String, Object>>(); | 4984 | List<Map<String, Object>> dataList2 = new ArrayList<Map<String, Object>>(); |
| 4968 | List<Map<String, Object>> dataList3 = new ArrayList<Map<String, Object>>(); | 4985 | List<Map<String, Object>> dataList3 = new ArrayList<Map<String, Object>>(); |
| 4969 | List<Map<String, Object>> list1 = this.statisticsDaily(line, date, xlName, null); | 4986 | List<Map<String, Object>> list1 = this.statisticsDaily(line, date, xlName, null); |
| @@ -5096,9 +5113,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -5096,9 +5113,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 5096 | Long zdsj_ = Long.parseLong(zdsj_s[0]) * 60 + Long.parseLong(zdsj_s[1]); | 5113 | Long zdsj_ = Long.parseLong(zdsj_s[0]) * 60 + Long.parseLong(zdsj_s[1]); |
| 5097 | Long zdsjActual_ = Long.parseLong(zdsjActual_s[0]) * 60 + Long.parseLong(zdsjActual_s[1]); | 5114 | Long zdsjActual_ = Long.parseLong(zdsjActual_s[0]) * 60 + Long.parseLong(zdsjActual_s[1]); |
| 5098 | if ((zdsj_ - zdsjActual_) > 0) { | 5115 | if ((zdsj_ - zdsjActual_) > 0) { |
| 5099 | - zdsjk = String.valueOf(zdsj_ - zdsjActual_); | 5116 | + if(zdsj_ - zdsjActual_>1200){ |
| 5117 | + zdsjm=String.valueOf(1440-(zdsj_-zdsjActual_)); | ||
| 5118 | + }else{ | ||
| 5119 | + zdsjk = String.valueOf(zdsj_ - zdsjActual_); | ||
| 5120 | + } | ||
| 5100 | } else { | 5121 | } else { |
| 5101 | - zdsjm = String.valueOf(zdsjActual_ - zdsj_); | 5122 | + if(zdsjActual_ - zdsj_>1200){ |
| 5123 | + zdsjk =String.valueOf(1440-(zdsjActual_ - zdsj_)); | ||
| 5124 | + }else{ | ||
| 5125 | + zdsjm = String.valueOf(zdsjActual_ - zdsj_); | ||
| 5126 | + } | ||
| 5102 | } | 5127 | } |
| 5103 | } | 5128 | } |
| 5104 | tempMap.put("zdsjk" + x, zdsjk); | 5129 | tempMap.put("zdsjk" + x, zdsjk); |
| @@ -5117,17 +5142,48 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -5117,17 +5142,48 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 5117 | tempMap.put("fcsjActual" + x, fcsjActuralstr); | 5142 | tempMap.put("fcsjActual" + x, fcsjActuralstr); |
| 5118 | String fcsjk = ""; | 5143 | String fcsjk = ""; |
| 5119 | String fcsjm = ""; | 5144 | String fcsjm = ""; |
| 5145 | + String dfsjk =""; | ||
| 5146 | + String dfsjm=""; | ||
| 5120 | if (!fcsjActural.equals("")) { | 5147 | if (!fcsjActural.equals("")) { |
| 5121 | - String[] zdsj_s = schedule.getFcsj().split(":"); | 5148 | + String[] fcsj_s = schedule.getFcsj().split(":"); |
| 5122 | String[] fcsjActural_s = fcsjActural.split(":"); | 5149 | String[] fcsjActural_s = fcsjActural.split(":"); |
| 5123 | - Long zdsj_ = Long.parseLong(zdsj_s[0]) * 60 + Long.parseLong(zdsj_s[1]); | 5150 | + Long fcsj_ = Long.parseLong(fcsj_s[0]) * 60 + Long.parseLong(fcsj_s[1]); |
| 5124 | Long fcsjActural_ = Long.parseLong(fcsjActural_s[0]) * 60 + Long.parseLong(fcsjActural_s[1]); | 5151 | Long fcsjActural_ = Long.parseLong(fcsjActural_s[0]) * 60 + Long.parseLong(fcsjActural_s[1]); |
| 5125 | - if ((zdsj_ - fcsjActural_) > 0) { | ||
| 5126 | - fcsjk = String.valueOf(zdsj_ - fcsjActural_); | 5152 | + if ((fcsj_ - fcsjActural_) > 0) { |
| 5153 | + if(fcsj_ - fcsjActural_>1200){ | ||
| 5154 | + fcsjm=String.valueOf(1440-(fcsj_ - fcsjActural_)); | ||
| 5155 | + }else{ | ||
| 5156 | + fcsjk = String.valueOf(fcsj_ - fcsjActural_); | ||
| 5157 | + } | ||
| 5158 | + } else { | ||
| 5159 | + if(fcsjActural_ - fcsj_>1200){ | ||
| 5160 | + fcsjk =String.valueOf(1440-(fcsjActural_ - fcsj_)); | ||
| 5161 | + } | ||
| 5162 | + else{ | ||
| 5163 | + fcsjm = String.valueOf(fcsjActural_ - fcsj_); | ||
| 5164 | + } | ||
| 5165 | + } | ||
| 5166 | + String[] dfsj_s =schedule.getDfsj().split(":"); | ||
| 5167 | + Long dfsj_ = Long.parseLong(dfsj_s[0]) * 60 + Long.parseLong(dfsj_s[1]); | ||
| 5168 | + if ((dfsj_ - fcsjActural_) > 0) { | ||
| 5169 | + if(dfsj_ - fcsjActural_>1200){ | ||
| 5170 | + dfsjm=String.valueOf(1440-(dfsj_ - fcsjActural_)); | ||
| 5171 | + }else{ | ||
| 5172 | + dfsjk = String.valueOf(dfsj_ - fcsjActural_); | ||
| 5173 | + } | ||
| 5127 | } else { | 5174 | } else { |
| 5128 | - fcsjm = String.valueOf(fcsjActural_ - zdsj_); | 5175 | + if(fcsjActural_ - dfsj_>1200){ |
| 5176 | + dfsjk= String.valueOf(1440-(fcsjActural_ - dfsj_)); | ||
| 5177 | + }else{ | ||
| 5178 | + dfsjm = String.valueOf(fcsjActural_ - dfsj_); | ||
| 5179 | + } | ||
| 5129 | } | 5180 | } |
| 5130 | } | 5181 | } |
| 5182 | + if(df.equals("df")){ | ||
| 5183 | + tempMap.put("dfsj"+x,schedule.getDfsj()); | ||
| 5184 | + tempMap.put("dfsjk" + x, dfsjk); | ||
| 5185 | + tempMap.put("dfsjm" + x, dfsjm.equals("0")?"":dfsjm); | ||
| 5186 | + } | ||
| 5131 | tempMap.put("fcsjk" + x, fcsjk); | 5187 | tempMap.put("fcsjk" + x, fcsjk); |
| 5132 | tempMap.put("fcsjm" + x, fcsjm.equals("0")?"":fcsjm); | 5188 | tempMap.put("fcsjm" + x, fcsjm.equals("0")?"":fcsjm); |
| 5133 | tempMap.put("remarks" + x, schedule.getRemark() != null ? schedule.getRemark() : ""); | 5189 | tempMap.put("remarks" + x, schedule.getRemark() != null ? schedule.getRemark() : ""); |
| @@ -5146,6 +5202,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -5146,6 +5202,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 5146 | tempMap.put("fcsjActual1", ""); | 5202 | tempMap.put("fcsjActual1", ""); |
| 5147 | tempMap.put("fcsjk1", ""); | 5203 | tempMap.put("fcsjk1", ""); |
| 5148 | tempMap.put("fcsjm1", ""); | 5204 | tempMap.put("fcsjm1", ""); |
| 5205 | + if(df.equals("df")){ | ||
| 5206 | + tempMap.put("dfsj1",""); | ||
| 5207 | + tempMap.put("dfsjk1" , ""); | ||
| 5208 | + tempMap.put("dfsjm1" , ""); | ||
| 5209 | + } | ||
| 5149 | tempMap.put("remarks1", ""); | 5210 | tempMap.put("remarks1", ""); |
| 5150 | } | 5211 | } |
| 5151 | if (tempMap.get("lpName2") == null) { | 5212 | if (tempMap.get("lpName2") == null) { |
| @@ -5159,6 +5220,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -5159,6 +5220,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 5159 | tempMap.put("fcsjActual2", ""); | 5220 | tempMap.put("fcsjActual2", ""); |
| 5160 | tempMap.put("fcsjk2", ""); | 5221 | tempMap.put("fcsjk2", ""); |
| 5161 | tempMap.put("fcsjm2", ""); | 5222 | tempMap.put("fcsjm2", ""); |
| 5223 | + if(df.equals("df")){ | ||
| 5224 | + tempMap.put("dfsj2",""); | ||
| 5225 | + tempMap.put("dfsjk2" , ""); | ||
| 5226 | + tempMap.put("dfsjm2" , ""); | ||
| 5227 | + } | ||
| 5162 | tempMap.put("remarks2", ""); | 5228 | tempMap.put("remarks2", ""); |
| 5163 | } | 5229 | } |
| 5164 | dataList3.add(tempMap); | 5230 | dataList3.add(tempMap); |
| @@ -5205,6 +5271,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -5205,6 +5271,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 5205 | sdfSimple = new SimpleDateFormat("yyyyMM"); | 5271 | sdfSimple = new SimpleDateFormat("yyyyMM"); |
| 5206 | sourcePath = path + "mould/scheduleDaily_m.xls"; | 5272 | sourcePath = path + "mould/scheduleDaily_m.xls"; |
| 5207 | } | 5273 | } |
| 5274 | + if(df.equals("df")){ | ||
| 5275 | + sourcePath =path + "mould/scheduleDaily_df.xls"; | ||
| 5276 | + } | ||
| 5208 | ee.excelReplace(listI, new Object[]{nMap}, sourcePath, | 5277 | ee.excelReplace(listI, new Object[]{nMap}, sourcePath, |
| 5209 | path + "export/" + sdfSimple.format(sdfMonth.parse(date)) + lineName + "调度日报.xls"); | 5278 | path + "export/" + sdfSimple.format(sdfMonth.parse(date)) + lineName + "调度日报.xls"); |
| 5210 | } catch (Exception e) { | 5279 | } catch (Exception e) { |
src/main/java/com/bsth/service/report/CalcSheetService.java
| @@ -12,4 +12,5 @@ public interface CalcSheetService extends BaseService<CalcSheet, Integer>{ | @@ -12,4 +12,5 @@ public interface CalcSheetService extends BaseService<CalcSheet, Integer>{ | ||
| 12 | public List<CalcSheet> calcListSheet(Map<String, Object> map); | 12 | public List<CalcSheet> calcListSheet(Map<String, Object> map); |
| 13 | public List<Sheet> calcSheet(Map<String, Object> map); | 13 | public List<Sheet> calcSheet(Map<String, Object> map); |
| 14 | public List<Map<String, Object>> calcTurnoutrate(Map<String, Object> map); | 14 | public List<Map<String, Object>> calcTurnoutrate(Map<String, Object> map); |
| 15 | + public List<Map<String, Object>> calcTurnoutrateZgf(Map<String, Object> map); | ||
| 15 | } | 16 | } |
src/main/java/com/bsth/service/report/ReportService.java
| @@ -5,6 +5,7 @@ import java.util.Map; | @@ -5,6 +5,7 @@ import java.util.Map; | ||
| 5 | 5 | ||
| 6 | import com.bsth.entity.StationRoute; | 6 | import com.bsth.entity.StationRoute; |
| 7 | import com.bsth.entity.excep.ArrivalInfo; | 7 | import com.bsth.entity.excep.ArrivalInfo; |
| 8 | +import com.bsth.entity.mcy_forms.Singledata; | ||
| 8 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 9 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 9 | 10 | ||
| 10 | 11 | ||
| @@ -56,4 +57,6 @@ public interface ReportService { | @@ -56,4 +57,6 @@ public interface ReportService { | ||
| 56 | List<Map<String, Object>> countDjg(Map<String, Object> map); | 57 | List<Map<String, Object>> countDjg(Map<String, Object> map); |
| 57 | 58 | ||
| 58 | Map<String, Object> online(Map<String, Object> map); | 59 | Map<String, Object> online(Map<String, Object> map); |
| 60 | + | ||
| 61 | + List<Singledata> singledatatj(Map<String, Object> map); | ||
| 59 | } | 62 | } |
src/main/java/com/bsth/service/report/impl/CalcSheetServiceImpl.java
| @@ -774,6 +774,91 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im | @@ -774,6 +774,91 @@ public class CalcSheetServiceImpl extends BaseServiceImpl<CalcSheet, Integer> im | ||
| 774 | } | 774 | } |
| 775 | return fage; | 775 | return fage; |
| 776 | } | 776 | } |
| 777 | + | ||
| 778 | + @Override | ||
| 779 | + public List<Map<String,Object>> calcTurnoutrateZgf(Map<String, Object> map){ | ||
| 780 | + final DecimalFormat df = new DecimalFormat("0.00"); | ||
| 781 | + String line=""; | ||
| 782 | + if(map.get("line")!=null){ | ||
| 783 | + line =map.get("line").toString().trim(); | ||
| 784 | + } | ||
| 785 | + String gs=""; | ||
| 786 | + if(map.get("gsdmTurn")!=null){ | ||
| 787 | + gs=map.get("gsdmTurn").toString().trim(); | ||
| 788 | + } | ||
| 789 | + String fgs=""; | ||
| 790 | + if(map.get("fgsdmTurn")!=null){ | ||
| 791 | + fgs=map.get("fgsdmTurn").toString().trim(); | ||
| 792 | + } | ||
| 793 | +// String nature="0"; | ||
| 794 | +// if(map.get("nature")!=null){ | ||
| 795 | +// nature=map.get("nature").toString(); | ||
| 796 | +// } | ||
| 797 | +// Map<String, Boolean> lineMap=lineService.lineNature(); | ||
| 798 | + | ||
| 799 | + String startDate=map.get("startDate").toString(); | ||
| 800 | + String endDate=map.get("endDate").toString(); | ||
| 801 | + String date=startDate+"-"+endDate; | ||
| 802 | + if(startDate.equals(endDate)){ | ||
| 803 | + date=startDate; | ||
| 804 | + }else{ | ||
| 805 | + date=startDate+"-"+endDate; | ||
| 806 | + } | ||
| 807 | + String type=map.get("type").toString(); | ||
| 808 | + final String dates=date; | ||
| 809 | + String sql_=""; | ||
| 810 | + if(line.equals("")){ | ||
| 811 | + sql_= " and gsdm ='"+gs+"' and fgsdm like '%"+fgs+"%'"; | ||
| 812 | + }else{ | ||
| 813 | + sql_=" and xl='"+line+"'"; | ||
| 814 | + } | ||
| 815 | + String sql=" select gsdm,fgsdm,xl,xl_name,sum(jhcc) as jhcc,sum(sjcc) as sjcc," | ||
| 816 | + + " sum(jhcczgf) as jhcczgf, sum(sjcczgf) as sjcczgf " | ||
| 817 | + + " from bsth_c_calc_sheet where date >='"+startDate+"' and date <='"+endDate+"'" | ||
| 818 | + + sql_ | ||
| 819 | + + " group by gsdm,fgsdm,xl,xl_name"; | ||
| 820 | + List<Map<String, Object>> lists=jdbcTemplate.query(sql, | ||
| 821 | + new RowMapper<Map<String, Object>>(){ | ||
| 822 | + @Override | ||
| 823 | + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException { | ||
| 824 | + Map<String, Object> s=new HashMap<String,Object>(); | ||
| 825 | + s.put("rq",dates); | ||
| 826 | + s.put("gsdm", rs.getString("gsdm")); | ||
| 827 | + s.put("fgsdm", rs.getString("fgsdm")); | ||
| 828 | + s.put("gsName", BasicData.businessCodeNameMap.get(rs.getString("gsdm"))); | ||
| 829 | + s.put("fgsName", BasicData.businessFgsCodeNameMap.get(rs.getString("fgsdm")+"_"+rs.getString("gsdm"))); | ||
| 830 | + s.put("xl", rs.getString("xl")); | ||
| 831 | + s.put("xlName", rs.getString("xl_name")); | ||
| 832 | + s.put("jhcc", rs.getInt("jhcc")); | ||
| 833 | + s.put("sjcc", rs.getInt("sjcc")); | ||
| 834 | + s.put("sjcczgf", rs.getInt("sjcczgf")); | ||
| 835 | + s.put("jhcczgf", rs.getInt("jhcczgf")); | ||
| 836 | + if(rs.getInt("jhcc")>0){ | ||
| 837 | + s.put("ccl",df.format((float)rs.getInt("sjcc")/rs.getInt("jhcc")*100)+"%"); | ||
| 838 | + }else{ | ||
| 839 | + s.put("ccl", "0.00%"); | ||
| 840 | + } | ||
| 841 | + if(rs.getInt("jhcczgf")>0){ | ||
| 842 | + s.put("cclzgf", df.format((float)rs.getInt("sjcczgf")/rs.getInt("jhcczgf")*100)+"%"); | ||
| 843 | + }else{ | ||
| 844 | + s.put("cclzgf","0.00%"); | ||
| 845 | + } | ||
| 846 | + s.put("sm", ""); | ||
| 847 | + return s; | ||
| 848 | + } | ||
| 849 | + }); | ||
| 850 | + if (type.equals("export")) { | ||
| 851 | + String lineName=map.get("lineName").toString(); | ||
| 852 | + ReportUtils ee = new ReportUtils(); | ||
| 853 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 854 | + listI.add(lists.iterator()); | ||
| 855 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 856 | + ee.excelReplace(listI, new Object[] { map }, path + "mould/calcTurnoutrateZgf.xls", path + "export/" | ||
| 857 | + + dates + "-" + lineName + "-营运线路出车率统计表.xls"); | ||
| 858 | + } | ||
| 859 | + return lists; | ||
| 860 | + } | ||
| 861 | + | ||
| 777 | @Override | 862 | @Override |
| 778 | public List<Map<String, Object>> calcTurnoutrate(Map<String, Object> map) { | 863 | public List<Map<String, Object>> calcTurnoutrate(Map<String, Object> map) { |
| 779 | final DecimalFormat df = new DecimalFormat("0.00"); | 864 | final DecimalFormat df = new DecimalFormat("0.00"); |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| @@ -6,6 +6,7 @@ import com.bsth.entity.Personnel; | @@ -6,6 +6,7 @@ import com.bsth.entity.Personnel; | ||
| 6 | import com.bsth.entity.StationRoute; | 6 | import com.bsth.entity.StationRoute; |
| 7 | import com.bsth.entity.excep.ArrivalInfo; | 7 | import com.bsth.entity.excep.ArrivalInfo; |
| 8 | import com.bsth.entity.mcy_forms.Daily; | 8 | import com.bsth.entity.mcy_forms.Daily; |
| 9 | +import com.bsth.entity.mcy_forms.Singledata; | ||
| 9 | import com.bsth.entity.oil.Dlb; | 10 | import com.bsth.entity.oil.Dlb; |
| 10 | import com.bsth.entity.oil.Ylb; | 11 | import com.bsth.entity.oil.Ylb; |
| 11 | import com.bsth.entity.realcontrol.ChildTaskPlan; | 12 | import com.bsth.entity.realcontrol.ChildTaskPlan; |
| @@ -52,6 +53,9 @@ public class ReportServiceImpl implements ReportService{ | @@ -52,6 +53,9 @@ public class ReportServiceImpl implements ReportService{ | ||
| 52 | 53 | ||
| 53 | private Logger logger = LoggerFactory.getLogger(this.getClass()); | 54 | private Logger logger = LoggerFactory.getLogger(this.getClass()); |
| 54 | 55 | ||
| 56 | + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), | ||
| 57 | + sdfSimple = new SimpleDateFormat("yyyyMMdd"); | ||
| 58 | + | ||
| 55 | @Autowired | 59 | @Autowired |
| 56 | JdbcTemplate jdbcTemplate; | 60 | JdbcTemplate jdbcTemplate; |
| 57 | 61 | ||
| @@ -65,7 +69,10 @@ public class ReportServiceImpl implements ReportService{ | @@ -65,7 +69,10 @@ public class ReportServiceImpl implements ReportService{ | ||
| 65 | LineRepository lineRepository; | 69 | LineRepository lineRepository; |
| 66 | @Autowired | 70 | @Autowired |
| 67 | StationRouteRepository stationRouteRepository; | 71 | StationRouteRepository stationRouteRepository; |
| 68 | - | 72 | + @Autowired |
| 73 | + CulateMileageService culateMileageService; | ||
| 74 | + | ||
| 75 | + | ||
| 69 | @Override | 76 | @Override |
| 70 | public List<ScheduleRealInfo> queryListBczx(String line, String date,String clzbh) { | 77 | public List<ScheduleRealInfo> queryListBczx(String line, String date,String clzbh) { |
| 71 | // TODO Auto-generated method stub | 78 | // TODO Auto-generated method stub |
| @@ -3549,6 +3556,393 @@ public class ReportServiceImpl implements ReportService{ | @@ -3549,6 +3556,393 @@ public class ReportServiceImpl implements ReportService{ | ||
| 3549 | } | 3556 | } |
| 3550 | return list; | 3557 | return list; |
| 3551 | } | 3558 | } |
| 3559 | + @Override | ||
| 3560 | + public List<Singledata> singledatatj(Map<String, Object> map) { | ||
| 3561 | + String sfyy=""; | ||
| 3562 | + if(map.get("sfyy")!=null){ | ||
| 3563 | + sfyy=map.get("sfyy").toString(); | ||
| 3564 | + } | ||
| 3565 | + String gsdm=""; | ||
| 3566 | + if(map.get("gsdmSing")!=null){ | ||
| 3567 | + gsdm=map.get("gsdmSing").toString(); | ||
| 3568 | + } | ||
| 3569 | + String fgsdm=""; | ||
| 3570 | + if(map.get("fgsdmSing")!=null){ | ||
| 3571 | + fgsdm=map.get("fgsdmSing").toString(); | ||
| 3572 | + } | ||
| 3573 | + String type=""; | ||
| 3574 | + if(map.get("type")!=null){ | ||
| 3575 | + type=map.get("type").toString(); | ||
| 3576 | + } | ||
| 3577 | + String tjtype=map.get("tjtype").toString(); | ||
| 3578 | + String xlbm=map.get("line").toString().trim(); | ||
| 3579 | + String startDate = map.get("startDate").toString(); | ||
| 3580 | + String endDate = map.get("endDate").toString(); | ||
| 3581 | + | ||
| 3582 | + List<ScheduleRealInfo> listReal=new ArrayList<ScheduleRealInfo>(); | ||
| 3583 | + if(xlbm.equals("")){ | ||
| 3584 | + listReal=scheduleRealInfoRepository.scheduleByDateAndLineTj(xlbm, startDate, endDate, gsdm, fgsdm); | ||
| 3585 | + }else{ | ||
| 3586 | + listReal=scheduleRealInfoRepository.scheduleByDateAndLineTj2(xlbm, startDate, endDate); | ||
| 3587 | + } | ||
| 3588 | + List<Singledata> list=new ArrayList<Singledata>(); | ||
| 3589 | + List<Singledata> list_=new ArrayList<Singledata>(); | ||
| 3590 | + if(tjtype.equals("jsy")){ | ||
| 3591 | + //油统计 | ||
| 3592 | + String sql="select r.j_gh, r.xl_bm,r.cl_zbh,r.fgs_bm" | ||
| 3593 | + + " from bsth_c_s_sp_info_real r where " | ||
| 3594 | + + " r.schedule_date_str >= '"+startDate+"'" | ||
| 3595 | + + " and r.schedule_date_str<='"+endDate+"'"; | ||
| 3596 | + if(xlbm.length() != 0){ | ||
| 3597 | + sql += " and r.xl_bm = '"+xlbm+"'"; | ||
| 3598 | + } | ||
| 3599 | + if(gsdm.length() != 0){ | ||
| 3600 | + sql += " and r.gs_bm ='"+gsdm+"'"; | ||
| 3601 | + } | ||
| 3602 | + if(fgsdm.length() != 0){ | ||
| 3603 | + sql += " and r.fgs_bm ='"+fgsdm+"'"; | ||
| 3604 | + } | ||
| 3605 | + sql += " group by r.j_gh,r.xl_bm,r.cl_zbh order by r.xl_bm,r.cl_zbh"; | ||
| 3606 | + | ||
| 3607 | + list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | ||
| 3608 | + @Override | ||
| 3609 | + public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 3610 | + Singledata sin = new Singledata(); | ||
| 3611 | + sin.setxL(arg0.getString("xl_bm")); | ||
| 3612 | + sin.setJsy(arg0.getString("j_gh")); | ||
| 3613 | + sin.setClzbh(arg0.getString("cl_zbh")); | ||
| 3614 | + sin.setgS(arg0.getString("fgs_bm")); | ||
| 3615 | + return sin; | ||
| 3616 | + } | ||
| 3617 | + }); | ||
| 3618 | + | ||
| 3619 | + | ||
| 3620 | + String linesql=""; | ||
| 3621 | + if(!xlbm.equals("")){ | ||
| 3622 | + linesql +=" and xlbm ='"+xlbm+"' "; | ||
| 3623 | + } | ||
| 3624 | + if(!gsdm.equals("")){ | ||
| 3625 | + linesql +=" and ssgsdm ='"+gsdm+"' "; | ||
| 3626 | + } | ||
| 3627 | + if(!fgsdm.equals("")){ | ||
| 3628 | + linesql +=" and fgsdm ='"+fgsdm+"' "; | ||
| 3629 | + } | ||
| 3630 | + /*String nysql="SELECT id,xlbm,nbbm,jsy,jzl as jzl,yh as yh,sh as sh,fgsdm FROM bsth_c_ylb" | ||
| 3631 | + + " WHERE rq >= '"+startDate+"' and rq <='"+endDate+"'" | ||
| 3632 | + + linesql | ||
| 3633 | + + " union" | ||
| 3634 | + + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh,fgsdm FROM bsth_c_dlb" | ||
| 3635 | + + " WHERE rq = '"+startDate+"' and rq <='"+endDate+"'" | ||
| 3636 | + + linesql;*/ | ||
| 3637 | + | ||
| 3638 | + String nysql="SELECT 'yh' as type,xlbm,nbbm,jsy,sum(jzl*1000)/1000 as jzl," | ||
| 3639 | + + " sum(yh*1000)/1000 as yh," | ||
| 3640 | + + " sum(sh*1000)/1000 as sh FROM " | ||
| 3641 | + + "bsth_c_ylb where rq>='"+startDate+"' " | ||
| 3642 | + + " and rq <='"+endDate+"' " +linesql | ||
| 3643 | + + " group by xlbm ,nbbm,jsy " | ||
| 3644 | + + " union SELECT 'dh' as type,xlbm,nbbm,jsy, " | ||
| 3645 | + + " sum(cdl*1000)/1000 as jzl,sum(hd*1000)/1000 as yh," | ||
| 3646 | + + " sum(sh * 1000) / 1000 AS sh" | ||
| 3647 | + + " FROM bsth_c_dlb where rq>='"+startDate+"' " | ||
| 3648 | + + " and rq <='"+endDate+"'" +linesql | ||
| 3649 | + + " group by xlbm ,nbbm,jsy" ; | ||
| 3650 | + | ||
| 3651 | + List<Singledata> listNy = jdbcTemplate.query(nysql, new RowMapper<Singledata>() { | ||
| 3652 | + @Override | ||
| 3653 | + public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 3654 | + Singledata sin = new Singledata(); | ||
| 3655 | + sin.setxL(arg0.getString("xlbm")); | ||
| 3656 | + sin.setJsy(arg0.getString("jsy")); | ||
| 3657 | + sin.setClzbh(arg0.getString("nbbm")); | ||
| 3658 | + sin.setJzl(arg0.getString("jzl")); | ||
| 3659 | + sin.setHyl(arg0.getString("yh")); | ||
| 3660 | + sin.setUnyyyl(arg0.getString("sh")); | ||
| 3661 | + return sin; | ||
| 3662 | + } | ||
| 3663 | + }); | ||
| 3664 | + //统计油,电表中手动添加的或者有加注没里程的数据 | ||
| 3665 | + for (int i = 0; i < listNy.size(); i++) { | ||
| 3666 | + Singledata sin_=listNy.get(i); | ||
| 3667 | + String jsy=sin_.getJsy(); | ||
| 3668 | + String line=sin_.getxL(); | ||
| 3669 | + String clzbh=sin_.getClzbh(); | ||
| 3670 | + boolean fages=true; | ||
| 3671 | + for (int j = 0; j < list.size(); j++) { | ||
| 3672 | + Singledata sin=list.get(j); | ||
| 3673 | + String jsy_=sin.getJsy(); | ||
| 3674 | + String line_=sin.getxL(); | ||
| 3675 | + String clzbh_=sin.getClzbh(); | ||
| 3676 | + if(jsy.equals(jsy_) | ||
| 3677 | + &&line.equals(line_) | ||
| 3678 | + &&clzbh.equals(clzbh_)){ | ||
| 3679 | + fages=false; | ||
| 3680 | + } | ||
| 3681 | + } | ||
| 3682 | + if(fages){ | ||
| 3683 | + Singledata s=new Singledata(); | ||
| 3684 | + s.setJsy(jsy); | ||
| 3685 | + s.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); | ||
| 3686 | + s.setClzbh(clzbh); | ||
| 3687 | + s.setSgh(""); | ||
| 3688 | + s.setsName(""); | ||
| 3689 | + s.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); | ||
| 3690 | + s.setxL(line); | ||
| 3691 | + s.setXlmc(BasicData.lineCodeAllNameMap.get(line)); | ||
| 3692 | + s.setJzl(sin_.getJzl()); | ||
| 3693 | + s.setHyl(sin_.getHyl()); | ||
| 3694 | + s.setUnyyyl(sin_.getUnyyyl()); | ||
| 3695 | + s.setJhlc("0.0"); | ||
| 3696 | + s.setEmptMileage("0.0"); | ||
| 3697 | + s.setJhjl("0.0"); | ||
| 3698 | + if(startDate.equals(endDate)) | ||
| 3699 | + s.setrQ(startDate); | ||
| 3700 | + else | ||
| 3701 | + s.setrQ(startDate+"-"+endDate); | ||
| 3702 | + | ||
| 3703 | + list_.add(s); | ||
| 3704 | + } | ||
| 3705 | + } | ||
| 3706 | + for (int i= 0; i < list.size(); i++) { | ||
| 3707 | + Singledata sin=list.get(i); | ||
| 3708 | + String jsy=sin.getJsy(); | ||
| 3709 | + String line=sin.getxL(); | ||
| 3710 | + String clzbh=sin.getClzbh(); | ||
| 3711 | + double jzl=0.0; | ||
| 3712 | + double yh=0.0; | ||
| 3713 | + double sh=0.0; | ||
| 3714 | + for (int j = 0; j < listNy.size(); j++) { | ||
| 3715 | + Singledata y=listNy.get(j); | ||
| 3716 | + if(y.getJsy().equals(jsy) | ||
| 3717 | + &&y.getClzbh().equals(clzbh) | ||
| 3718 | + &&y.getxL().equals(line)){ | ||
| 3719 | + jzl=Arith.add(jzl, y.getJzl()); | ||
| 3720 | + yh=Arith.add(yh, y.getHyl()); | ||
| 3721 | + sh=Arith.add(sh, y.getUnyyyl()); | ||
| 3722 | + } | ||
| 3723 | + } | ||
| 3724 | + sin.setHyl(String.valueOf(yh)); | ||
| 3725 | + sin.setJzl(String.valueOf(jzl)); | ||
| 3726 | + sin.setUnyyyl(String.valueOf(sh)); | ||
| 3727 | + | ||
| 3728 | + List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); | ||
| 3729 | + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); | ||
| 3730 | + for (int j = 0; j < listReal.size(); j++) { | ||
| 3731 | + ScheduleRealInfo s=listReal.get(j); | ||
| 3732 | + if(s.getjGh().equals(jsy) | ||
| 3733 | + && s.getClZbh().equals(clzbh) | ||
| 3734 | + &&s.getXlBm().equals(line)){ | ||
| 3735 | + newList.add(s); | ||
| 3736 | + Set<ChildTaskPlan> cts = s.getcTasks(); | ||
| 3737 | + if(cts != null && cts.size() > 0){ | ||
| 3738 | + newList_.add(s); | ||
| 3739 | + }else{ | ||
| 3740 | + if(s.getZdsjActual()!=null && s.getFcsjActual()!=null){ | ||
| 3741 | + newList_.add(s); | ||
| 3742 | + } | ||
| 3743 | + } | ||
| 3744 | + } | ||
| 3745 | + } | ||
| 3746 | + double jhgl=culateMileageService.culateJhgl(newList); | ||
| 3747 | + double jhjcc=culateMileageService.culateJhJccgl(newList); | ||
| 3748 | + double yygl=culateMileageService.culateSjgl(newList_); | ||
| 3749 | + double ljgl=culateMileageService.culateLjgl(newList_); | ||
| 3750 | + double ksgl=culateMileageService.culateKsgl(newList_); | ||
| 3751 | + double jcgl=culateMileageService.culateJccgl(newList_); | ||
| 3752 | + | ||
| 3753 | + double zyygl=Arith.add(yygl, ljgl); | ||
| 3754 | + double zksgl=Arith.add(ksgl, jcgl); | ||
| 3755 | + sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl))); | ||
| 3756 | + sin.setEmptMileage(String.valueOf(zksgl)); | ||
| 3757 | + sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | ||
| 3758 | + if(newList.size()>0){ | ||
| 3759 | + sin.setXlmc(newList.get(0).getXlName()); | ||
| 3760 | + sin.setjName(newList.get(0).getjName()); | ||
| 3761 | + }else{ | ||
| 3762 | + sin.setXlmc(BasicData.lineCodeAllNameMap.get(line)); | ||
| 3763 | + sin.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); | ||
| 3764 | + | ||
| 3765 | + } | ||
| 3766 | + if(startDate.equals(endDate)) | ||
| 3767 | + sin.setrQ(startDate); | ||
| 3768 | + else | ||
| 3769 | + sin.setrQ(startDate+"-"+endDate); | ||
| 3770 | +// sin.setjName(BasicData.allPerson.get(gsdm+"-"+jsy)); | ||
| 3771 | + sin.setSgh(""); | ||
| 3772 | + sin.setsName(""); | ||
| 3773 | + sin.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); | ||
| 3774 | + list_.add(sin); | ||
| 3775 | + | ||
| 3776 | + } | ||
| 3777 | + }else{ | ||
| 3778 | + String sql="select r.s_gh,r.s_name, " | ||
| 3779 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm" | ||
| 3780 | + + " from bsth_c_s_sp_info_real r where " | ||
| 3781 | + + " r.schedule_date_str >= '"+startDate+"'" | ||
| 3782 | + + " schedule_date_str <='"+endDate+"'" | ||
| 3783 | + + " and r.s_gh !='' and r.s_gh is not null "; | ||
| 3784 | + if(!xlbm.equals("")){ | ||
| 3785 | + sql += " and r.xl_bm = '"+xlbm+"'"; | ||
| 3786 | + } | ||
| 3787 | + if(!gsdm.equals("")){ | ||
| 3788 | + sql += " and r.gs_bm = '"+gsdm+"'"; | ||
| 3789 | + } | ||
| 3790 | + if(!fgsdm.equals("")){ | ||
| 3791 | + sql += " and r.fgs_bm = '"+fgsdm+"'"; | ||
| 3792 | + } | ||
| 3793 | + sql += " group by r.s_gh,r.s_name," | ||
| 3794 | + + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh"; | ||
| 3795 | + | ||
| 3796 | + list = jdbcTemplate.query(sql, new RowMapper<Singledata>() { | ||
| 3797 | + //SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd"); | ||
| 3798 | + @Override | ||
| 3799 | + public Singledata mapRow(ResultSet arg0, int arg1) throws SQLException { | ||
| 3800 | + Singledata sin = new Singledata(); | ||
| 3801 | +// sin.setrQ(startDate); | ||
| 3802 | + sin.setxL(arg0.getString("xl_bm")); | ||
| 3803 | + sin.setClzbh(arg0.getString("cl_zbh")); | ||
| 3804 | + sin.setSgh(arg0.getString("s_gh")); | ||
| 3805 | + sin.setsName(arg0.getString("s_name")); | ||
| 3806 | + sin.setgS(arg0.getString("fgs_bm")); | ||
| 3807 | + return sin; | ||
| 3808 | + } | ||
| 3809 | + }); | ||
| 3810 | + | ||
| 3811 | + String spy=""; | ||
| 3812 | + if(map.get("map")!=null){ | ||
| 3813 | + spy=map.get("spy").toString(); | ||
| 3814 | + } | ||
| 3815 | + for (int i = 0; i < list.size(); i++) { | ||
| 3816 | + Singledata sin=list.get(i); | ||
| 3817 | + sin.setrQ(startDate+"-"+endDate); | ||
| 3818 | + String jsy=sin.getSgh(); | ||
| 3819 | + String line=sin.getxL(); | ||
| 3820 | + String clzbh=sin.getClzbh(); | ||
| 3821 | + List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>(); | ||
| 3822 | + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>(); | ||
| 3823 | + | ||
| 3824 | + for (int j = 0; j < listReal.size(); j++) { | ||
| 3825 | + ScheduleRealInfo s=listReal.get(j); | ||
| 3826 | + if(s.getsGh().equals(jsy) && s.getClZbh().equals(clzbh) | ||
| 3827 | + &&s.getXlBm().equals(line)){ | ||
| 3828 | + newList.add(s); | ||
| 3829 | + Set<ChildTaskPlan> cts = s.getcTasks(); | ||
| 3830 | + if(cts != null && cts.size() > 0){ | ||
| 3831 | + newList_.add(s); | ||
| 3832 | + }else{ | ||
| 3833 | + if(s.getZdsjActual()!=null && s.getFcsjActual()!=null){ | ||
| 3834 | + newList_.add(s); | ||
| 3835 | + } | ||
| 3836 | + } | ||
| 3837 | + } | ||
| 3838 | + } | ||
| 3839 | + double jhgl=culateMileageService.culateJhgl(newList);; | ||
| 3840 | + double jhjcc=culateMileageService.culateJhJccgl(newList); | ||
| 3841 | + double yygl=0.0; | ||
| 3842 | + double ljgl=0.0; | ||
| 3843 | + double zksgl=0.0; | ||
| 3844 | + if(spy.equals("zrw")){ | ||
| 3845 | + yygl=culateMileageService.culateSjgl_spy(newList_); | ||
| 3846 | + ljgl=culateMileageService.culateLjgl_spy(newList_); | ||
| 3847 | + zksgl=culateMileageService.culateSjfyylc_spy(newList_); | ||
| 3848 | + }else{ | ||
| 3849 | + yygl=culateMileageService.culateSjgl(newList_); | ||
| 3850 | + ljgl=culateMileageService.culateLjgl(newList_); | ||
| 3851 | + double ksgl=culateMileageService.culateKsgl(newList_); | ||
| 3852 | + double jcgl=culateMileageService.culateJccgl(newList_); | ||
| 3853 | + zksgl=Arith.add(ksgl, jcgl); | ||
| 3854 | + } | ||
| 3855 | + double zyygl=Arith.add(yygl, ljgl); | ||
| 3856 | + sin.setJhlc(String.valueOf(Arith.add(zyygl,zksgl))); | ||
| 3857 | + sin.setEmptMileage(String.valueOf(zksgl)); | ||
| 3858 | + sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc))); | ||
| 3859 | + if(newList.size()>0) | ||
| 3860 | + sin.setXlmc(newList.get(0).getXlName()); | ||
| 3861 | + else | ||
| 3862 | + sin.setXlmc(BasicData.lineCodeAllNameMap.get(line)); | ||
| 3863 | + sin.setClzbh(clzbh); | ||
| 3864 | + sin.setJsy(""); | ||
| 3865 | + sin.setjName(""); | ||
| 3866 | + sin.setgS(BasicData.businessFgsCodeNameMap.get(fgsdm+"_"+gsdm)); | ||
| 3867 | + sin.setHyl(""); | ||
| 3868 | + sin.setJzl(""); | ||
| 3869 | + sin.setUnyyyl(""); | ||
| 3870 | + list_.add(sin); | ||
| 3871 | + } | ||
| 3872 | + } | ||
| 3873 | + | ||
| 3874 | + /*Map<String, Boolean> lineNature = lineService.lineNature(); | ||
| 3875 | + List<Singledata> resList = new ArrayList<Singledata>(); | ||
| 3876 | + for(Singledata s : list_){ | ||
| 3877 | + String xlBm = s.getxL(); | ||
| 3878 | + if(sfyy.length() != 0){ | ||
| 3879 | + if(sfyy.equals("0")){ | ||
| 3880 | + resList.add(s); | ||
| 3881 | + } else if(sfyy.equals("1")){ | ||
| 3882 | + if(lineNature.containsKey(xlBm) && lineNature.get(xlBm)){ | ||
| 3883 | + resList.add(s); | ||
| 3884 | + } | ||
| 3885 | + } else { | ||
| 3886 | + if(lineNature.containsKey(xlBm) && !lineNature.get(xlBm)){ | ||
| 3887 | + resList.add(s); | ||
| 3888 | + } | ||
| 3889 | + } | ||
| 3890 | + } else { | ||
| 3891 | + resList.add(s); | ||
| 3892 | + } | ||
| 3893 | + }*/ | ||
| 3894 | + | ||
| 3895 | + | ||
| 3896 | + if (type.equals("export")) { | ||
| 3897 | + List<Iterator<?>> listI = new ArrayList<Iterator<?>>(); | ||
| 3898 | + ReportUtils ee = new ReportUtils(); | ||
| 3899 | + | ||
| 3900 | + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>(); | ||
| 3901 | + int i = 1; | ||
| 3902 | + for (Singledata l : list_) { | ||
| 3903 | + Map<String, Object> m = new HashMap<String, Object>(); | ||
| 3904 | + m.put("i", i); | ||
| 3905 | + m.put("rQ", l.getrQ()); | ||
| 3906 | + m.put("gS", l.getgS()); | ||
| 3907 | + m.put("xL", l.getXlmc()); | ||
| 3908 | + m.put("clzbh", l.getClzbh()); | ||
| 3909 | + m.put("jsy", l.getJsy()); | ||
| 3910 | + m.put("jName", l.getjName()); | ||
| 3911 | + m.put("sgh", l.getSgh()); | ||
| 3912 | + m.put("sName", l.getsName()); | ||
| 3913 | + m.put("jhlc", l.getJhlc()); | ||
| 3914 | + m.put("emptMileage", l.getEmptMileage()); | ||
| 3915 | + m.put("hyl", l.getHyl()); | ||
| 3916 | + m.put("jzl", l.getJzl()); | ||
| 3917 | + m.put("unyyyl", l.getUnyyyl()); | ||
| 3918 | + m.put("jhjl", l.getJhjl()); | ||
| 3919 | + resList.add(m); | ||
| 3920 | + | ||
| 3921 | + i++; | ||
| 3922 | + } | ||
| 3923 | + | ||
| 3924 | + listI.add(resList.iterator()); | ||
| 3925 | + try { | ||
| 3926 | + String exportDate=""; | ||
| 3927 | + if(startDate.equals(endDate)){ | ||
| 3928 | + exportDate =sdfSimple.format(sdfMonth.parse(startDate)) ; | ||
| 3929 | + }else{ | ||
| 3930 | + exportDate =sdfSimple.format(sdfMonth.parse(startDate))+"-"+sdfSimple.format(sdfMonth.parse(endDate)) ; | ||
| 3931 | + } | ||
| 3932 | + String lineName = ""; | ||
| 3933 | + if(map.containsKey("lineName")) | ||
| 3934 | + lineName = map.get("lineName").toString(); | ||
| 3935 | + | ||
| 3936 | + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/"; | ||
| 3937 | + ee.excelReplace(listI, new Object[] { map }, path + "mould/singledata.xls", | ||
| 3938 | + path + "export/" +exportDate | ||
| 3939 | + + "-" + lineName + "-路单统计.xls"); | ||
| 3940 | + } catch (ParseException e) { | ||
| 3941 | + e.printStackTrace(); | ||
| 3942 | + } | ||
| 3943 | + } | ||
| 3944 | + return list_; | ||
| 3945 | + } | ||
| 3552 | 3946 | ||
| 3553 | 3947 | ||
| 3554 | } | 3948 | } |
src/main/java/com/bsth/service/schedule/CarConfigInfoService.java
| @@ -10,7 +10,10 @@ import java.util.List; | @@ -10,7 +10,10 @@ import java.util.List; | ||
| 10 | * Created by xu on 16/5/9. | 10 | * Created by xu on 16/5/9. |
| 11 | */ | 11 | */ |
| 12 | public interface CarConfigInfoService extends BService<CarConfigInfo, Long> { | 12 | public interface CarConfigInfoService extends BService<CarConfigInfo, Long> { |
| 13 | + // 判定车辆是否配置在其他线路上 | ||
| 13 | void validate_cars(CarConfigInfo carConfigInfo) throws ScheduleException; | 14 | void validate_cars(CarConfigInfo carConfigInfo) throws ScheduleException; |
| 15 | + // 判定车辆是否配置在其他线路上2 | ||
| 16 | + void validate_cars(Integer xlId, Integer clId) throws ScheduleException; | ||
| 14 | // 判定车辆是否配置在当前线路中 | 17 | // 判定车辆是否配置在当前线路中 |
| 15 | void validate_cars_config(CarConfigInfo carConfigInfo) throws ScheduleException; | 18 | void validate_cars_config(CarConfigInfo carConfigInfo) throws ScheduleException; |
| 16 | // 判定车辆所属公司和当前用户的所属公司 | 19 | // 判定车辆所属公司和当前用户的所属公司 |
src/main/java/com/bsth/service/schedule/SchedulePlanService.java
| 1 | package com.bsth.service.schedule; | 1 | package com.bsth.service.schedule; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.SchedulePlan; | 3 | import com.bsth.entity.schedule.SchedulePlan; |
| 4 | -import com.bsth.service.schedule.rules.ttinfo2.Result; | 4 | +import com.bsth.service.schedule.impl.plan.kBase3.validate.rule.ValidateRuleResult; |
| 5 | +import com.bsth.service.schedule.impl.plan.kBase3.validate.timetable.Result; | ||
| 5 | 6 | ||
| 6 | import java.util.Date; | 7 | import java.util.Date; |
| 7 | 8 | ||
| @@ -26,4 +27,13 @@ public interface SchedulePlanService extends BService<SchedulePlan, Long> { | @@ -26,4 +27,13 @@ public interface SchedulePlanService extends BService<SchedulePlan, Long> { | ||
| 26 | * @return | 27 | * @return |
| 27 | */ | 28 | */ |
| 28 | Result validateTTInfo(Integer xlid, Date from, Date to); | 29 | Result validateTTInfo(Integer xlid, Date from, Date to); |
| 30 | + | ||
| 31 | + /** | ||
| 32 | + * 验证规则。 | ||
| 33 | + * @param xlId 线路id | ||
| 34 | + * @param from 排班计划开始时间 | ||
| 35 | + * @param to 排班计划结束时间 | ||
| 36 | + * @return | ||
| 37 | + */ | ||
| 38 | + ValidateRuleResult validateRule(Integer xlId, Date from, Date to); | ||
| 29 | } | 39 | } |
| 30 | \ No newline at end of file | 40 | \ No newline at end of file |
src/main/java/com/bsth/service/schedule/impl/CarConfigInfoServiceImpl.java
| @@ -130,6 +130,18 @@ public class CarConfigInfoServiceImpl extends BServiceImpl<CarConfigInfo, Long> | @@ -130,6 +130,18 @@ public class CarConfigInfoServiceImpl extends BServiceImpl<CarConfigInfo, Long> | ||
| 130 | } | 130 | } |
| 131 | 131 | ||
| 132 | @Override | 132 | @Override |
| 133 | + public void validate_cars(Integer xlId, Integer clId) throws ScheduleException { | ||
| 134 | + Map<String, Object> param = new HashMap<>(); | ||
| 135 | + param.put("cl.id_eq", clId); | ||
| 136 | + List<CarConfigInfo> carConfigInfos = list(param); | ||
| 137 | + for (CarConfigInfo carConfigInfo : carConfigInfos) { | ||
| 138 | + if (!carConfigInfo.getXl().getId().equals(xlId)) { | ||
| 139 | + throw new ScheduleException("车辆不配置在当前线路下,配置在" + carConfigInfo.getXl().getName() + "线路中!"); | ||
| 140 | + } | ||
| 141 | + } | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + @Override | ||
| 133 | public void validate_cars_config(CarConfigInfo carConfigInfo) throws ScheduleException { | 145 | public void validate_cars_config(CarConfigInfo carConfigInfo) throws ScheduleException { |
| 134 | Map<String, Object> param = new HashMap<>(); | 146 | Map<String, Object> param = new HashMap<>(); |
| 135 | param.put("xl.id_eq", carConfigInfo.getXl().getId()); | 147 | param.put("xl.id_eq", carConfigInfo.getXl().getId()); |
src/main/java/com/bsth/service/schedule/impl/CarsServiceImpl.java
| 1 | package com.bsth.service.schedule.impl; | 1 | package com.bsth.service.schedule.impl; |
| 2 | 2 | ||
| 3 | +import com.bsth.entity.CarDevice; | ||
| 3 | import com.bsth.entity.Cars; | 4 | import com.bsth.entity.Cars; |
| 5 | +import com.bsth.entity.schedule.CarConfigInfo; | ||
| 6 | +import com.bsth.repository.schedule.CarConfigInfoRepository; | ||
| 7 | +import com.bsth.service.schedule.CarDeviceService; | ||
| 4 | import com.bsth.service.schedule.CarsService; | 8 | import com.bsth.service.schedule.CarsService; |
| 5 | import com.bsth.service.schedule.exception.ScheduleException; | 9 | import com.bsth.service.schedule.exception.ScheduleException; |
| 6 | import com.bsth.service.schedule.utils.DataToolsFile; | 10 | import com.bsth.service.schedule.utils.DataToolsFile; |
| @@ -12,7 +16,9 @@ import org.springframework.transaction.annotation.Transactional; | @@ -12,7 +16,9 @@ import org.springframework.transaction.annotation.Transactional; | ||
| 12 | import org.springframework.util.CollectionUtils; | 16 | import org.springframework.util.CollectionUtils; |
| 13 | 17 | ||
| 14 | import java.io.File; | 18 | import java.io.File; |
| 19 | +import java.util.Date; | ||
| 15 | import java.util.HashMap; | 20 | import java.util.HashMap; |
| 21 | +import java.util.List; | ||
| 16 | import java.util.Map; | 22 | import java.util.Map; |
| 17 | 23 | ||
| 18 | /** | 24 | /** |
| @@ -24,6 +30,48 @@ public class CarsServiceImpl extends BServiceImpl<Cars, Integer> implements Cars | @@ -24,6 +30,48 @@ public class CarsServiceImpl extends BServiceImpl<Cars, Integer> implements Cars | ||
| 24 | @Qualifier(value = "cars_dataTool") | 30 | @Qualifier(value = "cars_dataTool") |
| 25 | private DataToolsService dataToolsService; | 31 | private DataToolsService dataToolsService; |
| 26 | 32 | ||
| 33 | + @Autowired | ||
| 34 | + @Qualifier(value = "carDeviceServiceImpl_sc") | ||
| 35 | + private CarDeviceService carDeviceService; | ||
| 36 | + | ||
| 37 | + @Autowired | ||
| 38 | + private CarConfigInfoRepository carConfigInfoRepository; | ||
| 39 | + | ||
| 40 | + @Override | ||
| 41 | + public Cars save(Cars cars) { | ||
| 42 | + if (cars.getId() != null && cars.getScrapState()) { // 更新车辆信息,报废车辆 | ||
| 43 | + // 1、作废的车辆,修改报废号 | ||
| 44 | + String eCode = cars.getEquipmentCode(); | ||
| 45 | + cars.setEquipmentCode("BF-" + eCode); | ||
| 46 | + cars.setScrapCode("BF-" + cars.getEquipmentCode()); | ||
| 47 | + // 2、添加一条相关的设备替换记录 | ||
| 48 | + // 查找在哪条线路上 | ||
| 49 | + List<CarConfigInfo> carConfigInfoList = carConfigInfoRepository.findByClId(cars.getId()); | ||
| 50 | + for (CarConfigInfo carConfigInfo : carConfigInfoList) { | ||
| 51 | + CarDevice carDevice = new CarDevice(); | ||
| 52 | + carDevice.setGsName(cars.getCompany()); | ||
| 53 | + carDevice.setCompany(cars.getBusinessCode()); | ||
| 54 | + carDevice.setBrancheCompany(cars.getBrancheCompanyCode()); | ||
| 55 | + carDevice.setCl(cars.getId()); | ||
| 56 | + carDevice.setClZbh(cars.getInsideCode()); | ||
| 57 | + carDevice.setXl(carConfigInfo.getXl().getId()); | ||
| 58 | + carDevice.setXlName(carConfigInfo.getXl().getName()); | ||
| 59 | + carDevice.setXlBm(carConfigInfo.getXl().getLineCode()); | ||
| 60 | + carDevice.setOldDeviceNo(eCode); | ||
| 61 | + carDevice.setNewDeviceNo("BF-" + eCode); | ||
| 62 | + carDevice.setIsCancel(false); | ||
| 63 | + | ||
| 64 | + carDevice.setCreateBy(cars.getCreateBy()); | ||
| 65 | + carDevice.setUpdateBy(cars.getUpdateBy()); | ||
| 66 | + carDevice.setCreateDate(new Date()); | ||
| 67 | + carDevice.setUpdateDate(new Date()); | ||
| 68 | + carDeviceService.save(carDevice); | ||
| 69 | + } | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + return super.save(cars); | ||
| 73 | + } | ||
| 74 | + | ||
| 27 | @Override | 75 | @Override |
| 28 | public void importData(File file, Map<String, Object> params) throws ScheduleException { | 76 | public void importData(File file, Map<String, Object> params) throws ScheduleException { |
| 29 | dataToolsService.importData(file, params); | 77 | dataToolsService.importData(file, params); |
src/main/java/com/bsth/service/schedule/impl/SchedulePlanServiceImpl.java
| 1 | package com.bsth.service.schedule.impl; | 1 | package com.bsth.service.schedule.impl; |
| 2 | 2 | ||
| 3 | +import com.bsth.entity.Line; | ||
| 3 | import com.bsth.entity.schedule.SchedulePlan; | 4 | import com.bsth.entity.schedule.SchedulePlan; |
| 4 | import com.bsth.entity.schedule.TTInfo; | 5 | import com.bsth.entity.schedule.TTInfo; |
| 5 | import com.bsth.repository.BusinessRepository; | 6 | import com.bsth.repository.BusinessRepository; |
| @@ -7,10 +8,11 @@ import com.bsth.repository.LineRepository; | @@ -7,10 +8,11 @@ import com.bsth.repository.LineRepository; | ||
| 7 | import com.bsth.repository.schedule.*; | 8 | import com.bsth.repository.schedule.*; |
| 8 | import com.bsth.service.schedule.SchedulePlanService; | 9 | import com.bsth.service.schedule.SchedulePlanService; |
| 9 | import com.bsth.service.schedule.exception.ScheduleException; | 10 | import com.bsth.service.schedule.exception.ScheduleException; |
| 10 | -import com.bsth.service.schedule.plan.DroolsSchedulePlan; | ||
| 11 | -import com.bsth.service.schedule.rules.ScheduleRuleService; | ||
| 12 | -import com.bsth.service.schedule.rules.ttinfo2.CalcuParam; | ||
| 13 | -import com.bsth.service.schedule.rules.ttinfo2.Result; | 11 | +import com.bsth.service.schedule.impl.plan.kBase3.validate.rule.ValidateRuleResult; |
| 12 | +import com.bsth.service.schedule.impl.plan.kBase3.validate.timetable.CalcuParam; | ||
| 13 | +import com.bsth.service.schedule.impl.plan.kBase3.validate.timetable.Result; | ||
| 14 | +import com.bsth.service.schedule.impl.plan.DroolsSchedulePlan; | ||
| 15 | +import com.bsth.service.schedule.impl.plan.ScheduleRuleService; | ||
| 14 | import org.joda.time.DateTime; | 16 | import org.joda.time.DateTime; |
| 15 | import org.kie.api.KieBase; | 17 | import org.kie.api.KieBase; |
| 16 | import org.kie.api.runtime.KieSession; | 18 | import org.kie.api.runtime.KieSession; |
| @@ -42,6 +44,10 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | @@ -42,6 +44,10 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | ||
| 42 | private KieBase preKBase; | 44 | private KieBase preKBase; |
| 43 | 45 | ||
| 44 | @Autowired | 46 | @Autowired |
| 47 | + @Qualifier("KBase3") | ||
| 48 | + private KieBase validateKBase; | ||
| 49 | + | ||
| 50 | + @Autowired | ||
| 45 | private ScheduleRule1FlatRepository scheduleRule1FlatRepository; | 51 | private ScheduleRule1FlatRepository scheduleRule1FlatRepository; |
| 46 | @Autowired | 52 | @Autowired |
| 47 | private TTInfoRepository ttInfoRepository; | 53 | private TTInfoRepository ttInfoRepository; |
| @@ -52,6 +58,8 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | @@ -52,6 +58,8 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | ||
| 52 | @Autowired | 58 | @Autowired |
| 53 | private CarConfigInfoRepository carConfigInfoRepository; | 59 | private CarConfigInfoRepository carConfigInfoRepository; |
| 54 | @Autowired | 60 | @Autowired |
| 61 | + private GuideboardInfoRepository guideboardInfoRepository; | ||
| 62 | + @Autowired | ||
| 55 | private EmployeeConfigInfoRepository employeeConfigInfoRepository; | 63 | private EmployeeConfigInfoRepository employeeConfigInfoRepository; |
| 56 | @Autowired | 64 | @Autowired |
| 57 | private BusinessRepository businessRepository; | 65 | private BusinessRepository businessRepository; |
| @@ -146,22 +154,25 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | @@ -146,22 +154,25 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | ||
| 146 | public Result validateTTInfo(Integer xlid, Date from, Date to) { | 154 | public Result validateTTInfo(Integer xlid, Date from, Date to) { |
| 147 | // 构造drools session->载入数据->启动规则->计算->销毁session | 155 | // 构造drools session->载入数据->启动规则->计算->销毁session |
| 148 | // 创建session,内部配置的是stateful | 156 | // 创建session,内部配置的是stateful |
| 149 | - KieSession session = coreKBase.newKieSession(); | 157 | + KieSession session = validateKBase.newKieSession(); |
| 150 | // 设置gloable对象,在drl中通过别名使用 | 158 | // 设置gloable对象,在drl中通过别名使用 |
| 151 | session.setGlobal("log", logger); | 159 | session.setGlobal("log", logger); |
| 152 | - session.setGlobal("lineRepository", lineRepository); | ||
| 153 | session.setGlobal("tTInfoDetailRepository", ttInfoDetailRepository); | 160 | session.setGlobal("tTInfoDetailRepository", ttInfoDetailRepository); |
| 154 | 161 | ||
| 155 | Result rs = new Result(); // 输出gloable对象 | 162 | Result rs = new Result(); // 输出gloable对象 |
| 156 | session.setGlobal("rs", rs); | 163 | session.setGlobal("rs", rs); |
| 157 | 164 | ||
| 158 | // 载入数据 | 165 | // 载入数据 |
| 166 | + Line line = lineRepository.findOne(xlid); | ||
| 167 | + session.insert(line); | ||
| 168 | + | ||
| 159 | CalcuParam calcuParam = new CalcuParam( | 169 | CalcuParam calcuParam = new CalcuParam( |
| 160 | new DateTime(from), new DateTime(to), xlid); | 170 | new DateTime(from), new DateTime(to), xlid); |
| 161 | session.insert(calcuParam); | 171 | session.insert(calcuParam); |
| 162 | - List<TTInfo> ttInfos = (List<TTInfo>) ttInfoRepository.findAll(); | ||
| 163 | - for (TTInfo ttInfo: ttInfos) | ||
| 164 | - session.insert(ttInfo); | 172 | + List<TTInfo> ttInfos = ttInfoRepository.findByXlId(xlid); |
| 173 | + for (TTInfo ttInfo: ttInfos) { | ||
| 174 | + session.insert(ttInfo); | ||
| 175 | + } | ||
| 165 | 176 | ||
| 166 | // 执行rule | 177 | // 执行rule |
| 167 | session.fireAllRules(); | 178 | session.fireAllRules(); |
| @@ -171,4 +182,30 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | @@ -171,4 +182,30 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | ||
| 171 | 182 | ||
| 172 | return rs; | 183 | return rs; |
| 173 | } | 184 | } |
| 185 | + | ||
| 186 | + @Override | ||
| 187 | + public ValidateRuleResult validateRule(Integer xlId, Date from, Date to) { | ||
| 188 | + KieSession session = validateKBase.newKieSession(); | ||
| 189 | + session.setGlobal("LOG", logger); | ||
| 190 | + session.setGlobal("ccRepo", carConfigInfoRepository); | ||
| 191 | + session.setGlobal("lpRepo", guideboardInfoRepository); | ||
| 192 | + session.setGlobal("ecRepo", employeeConfigInfoRepository); | ||
| 193 | + session.setGlobal("ruleRepo", scheduleRule1FlatRepository); | ||
| 194 | + | ||
| 195 | + ValidateRuleResult result = new ValidateRuleResult(); | ||
| 196 | + session.setGlobal("result", result); | ||
| 197 | + | ||
| 198 | + com.bsth.service.schedule.impl.plan.kBase3.validate.rule.CalcuParam calcuParam = | ||
| 199 | + new com.bsth.service.schedule.impl.plan.kBase3.validate.rule.CalcuParam(); | ||
| 200 | + calcuParam.setXlId(xlId); | ||
| 201 | + calcuParam.setFromDate(new DateTime(from)); | ||
| 202 | + calcuParam.setToDate(new DateTime(to)); | ||
| 203 | + session.insert(calcuParam); | ||
| 204 | + | ||
| 205 | + session.fireAllRules(); | ||
| 206 | + | ||
| 207 | + session.dispose();; | ||
| 208 | + | ||
| 209 | + return result; | ||
| 210 | + } | ||
| 174 | } | 211 | } |
src/main/java/com/bsth/service/schedule/plan/DroolsSchedulePlan.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/DroolsSchedulePlan.java
| 1 | -package com.bsth.service.schedule.plan; | 1 | +package com.bsth.service.schedule.impl.plan; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.Line; | 3 | import com.bsth.entity.Line; |
| 4 | import com.bsth.entity.schedule.SchedulePlan; | 4 | import com.bsth.entity.schedule.SchedulePlan; |
| @@ -8,17 +8,16 @@ import com.bsth.entity.schedule.rule.ScheduleRule1Flat; | @@ -8,17 +8,16 @@ import com.bsth.entity.schedule.rule.ScheduleRule1Flat; | ||
| 8 | import com.bsth.repository.BusinessRepository; | 8 | import com.bsth.repository.BusinessRepository; |
| 9 | import com.bsth.repository.LineRepository; | 9 | import com.bsth.repository.LineRepository; |
| 10 | import com.bsth.repository.schedule.*; | 10 | import com.bsth.repository.schedule.*; |
| 11 | -import com.bsth.service.schedule.rules.ScheduleRuleService; | ||
| 12 | -import com.bsth.service.schedule.rules.plan.PlanCalcuParam_input; | ||
| 13 | -import com.bsth.service.schedule.rules.plan.PlanResult; | ||
| 14 | -import com.bsth.service.schedule.rules.rerun.RerunRule_input; | ||
| 15 | -import com.bsth.service.schedule.rules.rerun.RerunRule_param; | ||
| 16 | -import com.bsth.service.schedule.rules.shiftloop.ScheduleCalcuParam_input; | ||
| 17 | -import com.bsth.service.schedule.rules.shiftloop.ScheduleResults_output; | ||
| 18 | -import com.bsth.service.schedule.rules.shiftloop.ScheduleRule_input; | ||
| 19 | -import com.bsth.service.schedule.rules.ttinfo.*; | ||
| 20 | -import com.bsth.service.schedule.rules.validate.ValidateParam; | ||
| 21 | -import com.bsth.service.schedule.rules.validate.ValidateResults_output; | 11 | +import com.bsth.service.schedule.impl.plan.kBase1.core.plan.PlanCalcuParam_input; |
| 12 | +import com.bsth.service.schedule.impl.plan.kBase1.core.plan.PlanResult; | ||
| 13 | +import com.bsth.service.schedule.impl.plan.kBase1.core.rerun.RerunRule_input; | ||
| 14 | +import com.bsth.service.schedule.impl.plan.kBase1.core.rerun.RerunRule_param; | ||
| 15 | +import com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop.ScheduleCalcuParam_input; | ||
| 16 | +import com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop.ScheduleResults_output; | ||
| 17 | +import com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop.ScheduleRule_input; | ||
| 18 | +import com.bsth.service.schedule.impl.plan.kBase1.core.ttinfo.*; | ||
| 19 | +import com.bsth.service.schedule.impl.plan.kBase1.core.validate.ValidateParam; | ||
| 20 | +import com.bsth.service.schedule.impl.plan.kBase1.core.validate.ValidateResults_output; | ||
| 22 | import org.apache.commons.lang3.StringUtils; | 21 | import org.apache.commons.lang3.StringUtils; |
| 23 | import org.joda.time.DateTime; | 22 | import org.joda.time.DateTime; |
| 24 | import org.kie.api.KieBase; | 23 | import org.kie.api.KieBase; |
src/main/java/com/bsth/service/schedule/rules/MyDroolsConfiguration.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/MyDroolsConfiguration.java
| 1 | -package com.bsth.service.schedule.rules; | 1 | +package com.bsth.service.schedule.impl.plan; |
| 2 | 2 | ||
| 3 | import org.kie.api.KieBase; | 3 | import org.kie.api.KieBase; |
| 4 | import org.kie.api.KieBaseConfiguration; | 4 | import org.kie.api.KieBaseConfiguration; |
| @@ -56,27 +56,24 @@ public class MyDroolsConfiguration { | @@ -56,27 +56,24 @@ public class MyDroolsConfiguration { | ||
| 56 | // 3.2、写入drl(写法超多,有点混乱) | 56 | // 3.2、写入drl(写法超多,有点混乱) |
| 57 | // 这里使用文件的形式写入,TODO:以后考虑从数据库中读drl写入 | 57 | // 这里使用文件的形式写入,TODO:以后考虑从数据库中读drl写入 |
| 58 | // 注意kfs写的时候如果指定path,强制为src/main/resources/加上文件名,还有就是文件名不要重复否则会覆盖的 | 58 | // 注意kfs写的时候如果指定path,强制为src/main/resources/加上文件名,还有就是文件名不要重复否则会覆盖的 |
| 59 | - kfs.write("src/main/resources/functions.drl", kieServices.getResources() | 59 | + kfs.write("src/main/resources/kBase1_core_shiftloop.drl", kieServices.getResources() |
| 60 | .newInputStreamResource(this.getClass().getResourceAsStream( | 60 | .newInputStreamResource(this.getClass().getResourceAsStream( |
| 61 | - "/rules/functions.drl"), "UTF-8")); | ||
| 62 | - kfs.write("src/main/resources/shiftloop_fb_2.drl", kieServices.getResources() | 61 | + "/rules/kBase1_core_shiftloop.drl"), "UTF-8")); |
| 62 | + kfs.write("src/main/resources/kBase1_core_ttinfo.drl", kieServices.getResources() | ||
| 63 | .newInputStreamResource(this.getClass().getResourceAsStream( | 63 | .newInputStreamResource(this.getClass().getResourceAsStream( |
| 64 | - "/rules/shiftloop_fb_2.drl"), "UTF-8")); | ||
| 65 | - kfs.write("src/main/resources/ttinfo.drl", kieServices.getResources() | 64 | + "/rules/kBase1_core_ttinfo.drl"), "UTF-8")); |
| 65 | + kfs.write("src/main/resources/kBase1_core_plan.drl", kieServices.getResources() | ||
| 66 | .newInputStreamResource(this.getClass().getResourceAsStream( | 66 | .newInputStreamResource(this.getClass().getResourceAsStream( |
| 67 | - "/rules/ttinfo.drl"), "UTF-8")); | ||
| 68 | - kfs.write("src/main/resources/ttinfo2.drl", kieServices.getResources() | 67 | + "/rules/kBase1_core_plan.drl"), "UTF-8")); |
| 68 | + kfs.write("src/main/resources/kBase1_core_rerun.drl", kieServices.getResources() | ||
| 69 | .newInputStreamResource(this.getClass().getResourceAsStream( | 69 | .newInputStreamResource(this.getClass().getResourceAsStream( |
| 70 | - "/rules/ttinfo2.drl"), "UTF-8")); | ||
| 71 | - kfs.write("src/main/resources/plan.drl", kieServices.getResources() | 70 | + "/rules/kBase1_core_rerun.drl"), "UTF-8")); |
| 71 | + kfs.write("src/main/resources/kBase1_core_validate.drl", kieServices.getResources() | ||
| 72 | .newInputStreamResource(this.getClass().getResourceAsStream( | 72 | .newInputStreamResource(this.getClass().getResourceAsStream( |
| 73 | - "/rules/plan.drl"), "UTF-8")); | ||
| 74 | - kfs.write("src/main/resources/rerun.drl", kieServices.getResources() | 73 | + "/rules/kBase1_core_validate.drl"), "UTF-8")); |
| 74 | + kfs.write("src/main/resources/kBase1_core_functions.drl", kieServices.getResources() | ||
| 75 | .newInputStreamResource(this.getClass().getResourceAsStream( | 75 | .newInputStreamResource(this.getClass().getResourceAsStream( |
| 76 | - "/rules/rerun.drl"), "UTF-8")); | ||
| 77 | - kfs.write("src/main/resources/validplan.drl", kieServices.getResources() | ||
| 78 | - .newInputStreamResource(this.getClass().getResourceAsStream( | ||
| 79 | - "/rules/validplan.drl"), "UTF-8")); | 76 | + "/rules/kBase1_core_functions.drl"), "UTF-8")); |
| 80 | // TODO:还有其他drl.... | 77 | // TODO:还有其他drl.... |
| 81 | 78 | ||
| 82 | // 4、创建KieBuilder,使用KieFileSystem构建 | 79 | // 4、创建KieBuilder,使用KieFileSystem构建 |
| @@ -134,9 +131,9 @@ public class MyDroolsConfiguration { | @@ -134,9 +131,9 @@ public class MyDroolsConfiguration { | ||
| 134 | // 这里使用文件的形式写入,TODO:以后考虑从数据库中读drl写入 | 131 | // 这里使用文件的形式写入,TODO:以后考虑从数据库中读drl写入 |
| 135 | // 注意kfs写的时候如果指定path,强制为src/main/resources/加上文件名,还有就是文件名不要重复否则会覆盖的 | 132 | // 注意kfs写的时候如果指定path,强制为src/main/resources/加上文件名,还有就是文件名不要重复否则会覆盖的 |
| 136 | 133 | ||
| 137 | - kfs.write("src/main/resources/ruleWrap.drl", kieServices.getResources() | 134 | + kfs.write("src/main/resources/kBase2_wrap_rule.drl", kieServices.getResources() |
| 138 | .newInputStreamResource(this.getClass().getResourceAsStream( | 135 | .newInputStreamResource(this.getClass().getResourceAsStream( |
| 139 | - "/rules/ruleWrap.drl"), "UTF-8")); | 136 | + "/rules/kBase2_wrap_rule.drl"), "UTF-8")); |
| 140 | 137 | ||
| 141 | // TODO:还有其他drl.... | 138 | // TODO:还有其他drl.... |
| 142 | 139 | ||
| @@ -161,4 +158,52 @@ public class MyDroolsConfiguration { | @@ -161,4 +158,52 @@ public class MyDroolsConfiguration { | ||
| 161 | 158 | ||
| 162 | return kieBase; | 159 | return kieBase; |
| 163 | } | 160 | } |
| 161 | + | ||
| 162 | + /** | ||
| 163 | + * 验证相关的drl知识库。 | ||
| 164 | + * @return | ||
| 165 | + */ | ||
| 166 | + @Bean(name = "KBase3") | ||
| 167 | + public KieBase myKieBase3() { | ||
| 168 | + KieServices kieServices = KieServices.Factory.get(); | ||
| 169 | + KieModuleModel kieModuleModel = kieServices.newKieModuleModel(); | ||
| 170 | + KieBaseModel kieBaseModel = kieModuleModel.newKieBaseModel("KBase3") | ||
| 171 | + .setDefault(true) | ||
| 172 | + .setEqualsBehavior(EqualityBehaviorOption.EQUALITY) | ||
| 173 | + .setEventProcessingMode(EventProcessingOption.STREAM); | ||
| 174 | + kieBaseModel.newKieSessionModel("KSession1") | ||
| 175 | + .setDefault(true) | ||
| 176 | + .setType(KieSessionModel.KieSessionType.STATEFUL) | ||
| 177 | + .setClockType(ClockTypeOption.get("realtime")); | ||
| 178 | + | ||
| 179 | + KieFileSystem kieFileSystem = kieServices.newKieFileSystem(); | ||
| 180 | + kieFileSystem.writeKModuleXML(kieModuleModel.toXML()); | ||
| 181 | + | ||
| 182 | + kieFileSystem.write( | ||
| 183 | + "src/main/resources/kBase3_validate_timetable.drl", | ||
| 184 | + kieServices.getResources().newInputStreamResource( | ||
| 185 | + this.getClass().getResourceAsStream("/rules/kBase3_validate_timetable.drl"), | ||
| 186 | + "UTF-8")); | ||
| 187 | + kieFileSystem.write( | ||
| 188 | + "src/main/resources/kbase3_validate_rule.drl", | ||
| 189 | + kieServices.getResources().newInputStreamResource( | ||
| 190 | + this.getClass().getResourceAsStream("/rules/kBase3_validate_rule.drl"), | ||
| 191 | + "UTF-8")); | ||
| 192 | + | ||
| 193 | + KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem).buildAll(); | ||
| 194 | + Results results = kieBuilder.getResults(); | ||
| 195 | + if (results.hasMessages(Message.Level.ERROR)) { | ||
| 196 | + throw new IllegalStateException("构建drools6错误:" + results.getMessages()); | ||
| 197 | + } | ||
| 198 | + | ||
| 199 | + ReleaseId releaseId = kieServices.getRepository().getDefaultReleaseId(); | ||
| 200 | + KieContainer kieContainer = kieServices.newKieContainer(releaseId); | ||
| 201 | + | ||
| 202 | + KieBaseConfiguration kieBaseConfiguration = kieServices.newKieBaseConfiguration(); | ||
| 203 | + KieBase kieBase = kieContainer.newKieBase("KBase3", kieBaseConfiguration); | ||
| 204 | + | ||
| 205 | + return kieBase; | ||
| 206 | + | ||
| 207 | + } | ||
| 208 | + | ||
| 164 | } | 209 | } |
src/main/java/com/bsth/service/schedule/rules/ScheduleRuleService.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/ScheduleRuleService.java
| 1 | -package com.bsth.service.schedule.rules; | 1 | +package com.bsth.service.schedule.impl.plan; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.SchedulePlan; | 3 | import com.bsth.entity.schedule.SchedulePlan; |
| 4 | import com.bsth.entity.schedule.SchedulePlanInfo; | 4 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 5 | import com.bsth.entity.schedule.temp.SchedulePlanRuleResult; | 5 | import com.bsth.entity.schedule.temp.SchedulePlanRuleResult; |
| 6 | -import com.bsth.service.schedule.rules.rerun.RerunRule_input; | 6 | +import com.bsth.service.schedule.impl.plan.kBase1.core.rerun.RerunRule_input; |
| 7 | 7 | ||
| 8 | import java.util.Date; | 8 | import java.util.Date; |
| 9 | import java.util.List; | 9 | import java.util.List; |
src/main/java/com/bsth/service/schedule/rules/ScheduleRuleServiceImpl.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/ScheduleRuleServiceImpl.java
| 1 | -package com.bsth.service.schedule.rules; | 1 | +package com.bsth.service.schedule.impl.plan; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.SchedulePlan; | 3 | import com.bsth.entity.schedule.SchedulePlan; |
| 4 | import com.bsth.entity.schedule.SchedulePlanInfo; | 4 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 5 | import com.bsth.entity.schedule.temp.SchedulePlanRuleResult; | 5 | import com.bsth.entity.schedule.temp.SchedulePlanRuleResult; |
| 6 | -import com.bsth.service.schedule.rules.rerun.RerunRule_input; | 6 | +import com.bsth.service.schedule.impl.plan.kBase1.core.rerun.RerunRule_input; |
| 7 | import org.slf4j.Logger; | 7 | import org.slf4j.Logger; |
| 8 | import org.slf4j.LoggerFactory; | 8 | import org.slf4j.LoggerFactory; |
| 9 | import org.springframework.beans.factory.annotation.Autowired; | 9 | import org.springframework.beans.factory.annotation.Autowired; |
src/main/java/com/bsth/service/schedule/rules/plan/PlanCalcuParam_input.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/plan/PlanCalcuParam_input.java
| 1 | -package com.bsth.service.schedule.rules.plan; | 1 | +package com.bsth.service.schedule.impl.plan.kBase1.core.plan; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.SchedulePlan; | 3 | import com.bsth.entity.schedule.SchedulePlan; |
| 4 | -import com.bsth.service.schedule.rules.shiftloop.ScheduleResults_output; | ||
| 5 | -import com.bsth.service.schedule.rules.ttinfo.TTInfoResults_output; | 4 | +import com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop.ScheduleResults_output; |
| 5 | +import com.bsth.service.schedule.impl.plan.kBase1.core.ttinfo.TTInfoResults_output; | ||
| 6 | 6 | ||
| 7 | /** | 7 | /** |
| 8 | * 排班规则-规则输入参数。 | 8 | * 排班规则-规则输入参数。 |
src/main/java/com/bsth/service/schedule/rules/plan/PlanResult.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/plan/PlanResult.java
src/main/java/com/bsth/service/schedule/rules/plan/readme.txt renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/plan/readme.txt
src/main/java/com/bsth/service/schedule/rules/rerun/RerunRule_input.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/rerun/RerunRule_input.java
src/main/java/com/bsth/service/schedule/rules/rerun/RerunRule_param.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/rerun/RerunRule_param.java
src/main/java/com/bsth/service/schedule/rules/shiftloop/GidFbFcnoFunction.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/shiftloop/GidFbFcnoFunction.java
| 1 | -package com.bsth.service.schedule.rules.shiftloop; | 1 | +package com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.TTInfoDetail; | 3 | import com.bsth.entity.schedule.TTInfoDetail; |
| 4 | import org.kie.api.runtime.rule.AccumulateFunction; | 4 | import org.kie.api.runtime.rule.AccumulateFunction; |
src/main/java/com/bsth/service/schedule/rules/shiftloop/GidFbTimeFunction.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/shiftloop/GidFbTimeFunction.java
src/main/java/com/bsth/service/schedule/rules/shiftloop/GidsCountFunction.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/shiftloop/GidsCountFunction.java
| 1 | -package com.bsth.service.schedule.rules.shiftloop; | 1 | +package com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.TTInfoDetail; | 3 | import com.bsth.entity.schedule.TTInfoDetail; |
| 4 | import org.kie.api.runtime.rule.AccumulateFunction; | 4 | import org.kie.api.runtime.rule.AccumulateFunction; |
src/main/java/com/bsth/service/schedule/rules/shiftloop/ScheduleCalcuParam_input.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/shiftloop/ScheduleCalcuParam_input.java
src/main/java/com/bsth/service/schedule/rules/shiftloop/ScheduleResult_output.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/shiftloop/ScheduleResult_output.java
src/main/java/com/bsth/service/schedule/rules/shiftloop/ScheduleResults_output.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/shiftloop/ScheduleResults_output.java
| 1 | -package com.bsth.service.schedule.rules.shiftloop; | 1 | +package com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.temp.SchedulePlanRuleResult; | 3 | import com.bsth.entity.schedule.temp.SchedulePlanRuleResult; |
| 4 | import org.apache.commons.lang3.StringUtils; | 4 | import org.apache.commons.lang3.StringUtils; |
src/main/java/com/bsth/service/schedule/rules/shiftloop/ScheduleRule_Type.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/shiftloop/ScheduleRule_Type.java
src/main/java/com/bsth/service/schedule/rules/shiftloop/ScheduleRule_input.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/shiftloop/ScheduleRule_input.java
| 1 | -package com.bsth.service.schedule.rules.shiftloop; | 1 | +package com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.rule.ScheduleRule1Flat; | 3 | import com.bsth.entity.schedule.rule.ScheduleRule1Flat; |
| 4 | import com.google.common.base.Splitter; | 4 | import com.google.common.base.Splitter; |
src/main/java/com/bsth/service/schedule/rules/ttinfo/LpInfoResult_output.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/ttinfo/LpInfoResult_output.java
src/main/java/com/bsth/service/schedule/rules/ttinfo/LpInfoResultsFunction.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/ttinfo/LpInfoResultsFunction.java
| 1 | -package com.bsth.service.schedule.rules.ttinfo; | 1 | +package com.bsth.service.schedule.impl.plan.kBase1.core.ttinfo; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.TTInfoDetail; | 3 | import com.bsth.entity.schedule.TTInfoDetail; |
| 4 | import org.kie.api.runtime.rule.AccumulateFunction; | 4 | import org.kie.api.runtime.rule.AccumulateFunction; |
src/main/java/com/bsth/service/schedule/rules/ttinfo/LpInfoResults_output.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/ttinfo/LpInfoResults_output.java
src/main/java/com/bsth/service/schedule/rules/ttinfo/MinRuleQyrqFunction.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/ttinfo/MinRuleQyrqFunction.java
| 1 | -package com.bsth.service.schedule.rules.ttinfo; | 1 | +package com.bsth.service.schedule.impl.plan.kBase1.core.ttinfo; |
| 2 | 2 | ||
| 3 | -import com.bsth.service.schedule.rules.shiftloop.ScheduleRule_input; | 3 | +import com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop.ScheduleRule_input; |
| 4 | import org.joda.time.DateTime; | 4 | import org.joda.time.DateTime; |
| 5 | import org.kie.api.runtime.rule.AccumulateFunction; | 5 | import org.kie.api.runtime.rule.AccumulateFunction; |
| 6 | 6 |
src/main/java/com/bsth/service/schedule/rules/ttinfo/TTInfoCalcuParam_input.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/ttinfo/TTInfoCalcuParam_input.java
src/main/java/com/bsth/service/schedule/rules/ttinfo/TTInfoResult_output.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/ttinfo/TTInfoResult_output.java
src/main/java/com/bsth/service/schedule/rules/ttinfo/TTInfoResults_output.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/ttinfo/TTInfoResults_output.java
| 1 | -package com.bsth.service.schedule.rules.ttinfo; | 1 | +package com.bsth.service.schedule.impl.plan.kBase1.core.ttinfo; |
| 2 | 2 | ||
| 3 | import com.google.common.collect.ArrayListMultimap; | 3 | import com.google.common.collect.ArrayListMultimap; |
| 4 | import com.google.common.collect.Multimap; | 4 | import com.google.common.collect.Multimap; |
src/main/java/com/bsth/service/schedule/rules/ttinfo/TTInfo_input.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/ttinfo/TTInfo_input.java
src/main/java/com/bsth/service/schedule/rules/ttinfo/readme.txt renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/ttinfo/readme.txt
src/main/java/com/bsth/service/schedule/rules/validate/ValidRepeatBcFunction.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/validate/ValidRepeatBcFunction.java
| 1 | -package com.bsth.service.schedule.rules.validate; | 1 | +package com.bsth.service.schedule.impl.plan.kBase1.core.validate; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.SchedulePlanInfo; | 3 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 4 | import org.kie.api.runtime.rule.AccumulateFunction; | 4 | import org.kie.api.runtime.rule.AccumulateFunction; |
src/main/java/com/bsth/service/schedule/rules/validate/ValidWantLpFunction.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/validate/ValidWantLpFunction.java
| 1 | -package com.bsth.service.schedule.rules.validate; | 1 | +package com.bsth.service.schedule.impl.plan.kBase1.core.validate; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.SchedulePlanInfo; | 3 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 4 | -import com.bsth.service.schedule.rules.ttinfo.LpInfoResult_output; | 4 | +import com.bsth.service.schedule.impl.plan.kBase1.core.ttinfo.LpInfoResult_output; |
| 5 | import org.kie.api.runtime.rule.AccumulateFunction; | 5 | import org.kie.api.runtime.rule.AccumulateFunction; |
| 6 | 6 | ||
| 7 | import java.io.*; | 7 | import java.io.*; |
src/main/java/com/bsth/service/schedule/rules/validate/ValidWholeRerunBcFunction.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/validate/ValidWholeRerunBcFunction.java
| 1 | -package com.bsth.service.schedule.rules.validate; | 1 | +package com.bsth.service.schedule.impl.plan.kBase1.core.validate; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.SchedulePlanInfo; | 3 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 4 | import org.kie.api.runtime.rule.AccumulateFunction; | 4 | import org.kie.api.runtime.rule.AccumulateFunction; |
src/main/java/com/bsth/service/schedule/rules/validate/ValidateParam.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/validate/ValidateParam.java
src/main/java/com/bsth/service/schedule/rules/validate/ValidateResource.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/validate/ValidateResource.java
| 1 | -package com.bsth.service.schedule.rules.validate; | 1 | +package com.bsth.service.schedule.impl.plan.kBase1.core.validate; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.SchedulePlanInfo; | 3 | import com.bsth.entity.schedule.SchedulePlanInfo; |
| 4 | -import com.bsth.service.schedule.rules.ttinfo.LpInfoResult_output; | 4 | +import com.bsth.service.schedule.impl.plan.kBase1.core.ttinfo.LpInfoResult_output; |
| 5 | 5 | ||
| 6 | import java.util.Date; | 6 | import java.util.Date; |
| 7 | import java.util.List; | 7 | import java.util.List; |
src/main/java/com/bsth/service/schedule/rules/validate/ValidateResults_output.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase1/core/validate/ValidateResults_output.java
src/main/java/com/bsth/service/schedule/impl/plan/kBase3/validate/rule/CalcuParam.java
0 → 100644
| 1 | +package com.bsth.service.schedule.impl.plan.kBase3.validate.rule; | ||
| 2 | + | ||
| 3 | +import org.joda.time.DateTime; | ||
| 4 | + | ||
| 5 | +/** | ||
| 6 | + * 计算用参数。 | ||
| 7 | + */ | ||
| 8 | +public class CalcuParam { | ||
| 9 | + /** 线路Id */ | ||
| 10 | + private Integer xlId; | ||
| 11 | + | ||
| 12 | + /** 计划开始计算日期 */ | ||
| 13 | + private DateTime fromDate; | ||
| 14 | + /** 计划结束计算日期 */ | ||
| 15 | + private DateTime toDate; | ||
| 16 | + | ||
| 17 | + public Integer getXlId() { | ||
| 18 | + return xlId; | ||
| 19 | + } | ||
| 20 | + | ||
| 21 | + public void setXlId(Integer xlId) { | ||
| 22 | + this.xlId = xlId; | ||
| 23 | + } | ||
| 24 | + | ||
| 25 | + public DateTime getFromDate() { | ||
| 26 | + return fromDate; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + public void setFromDate(DateTime fromDate) { | ||
| 30 | + this.fromDate = fromDate; | ||
| 31 | + } | ||
| 32 | + | ||
| 33 | + public DateTime getToDate() { | ||
| 34 | + return toDate; | ||
| 35 | + } | ||
| 36 | + | ||
| 37 | + public void setToDate(DateTime toDate) { | ||
| 38 | + this.toDate = toDate; | ||
| 39 | + } | ||
| 40 | +} |
src/main/java/com/bsth/service/schedule/impl/plan/kBase3/validate/rule/ErrorInfoFunction.java
0 → 100644
| 1 | +package com.bsth.service.schedule.impl.plan.kBase3.validate.rule; | ||
| 2 | + | ||
| 3 | + | ||
| 4 | +import com.bsth.entity.schedule.EmployeeConfigInfo; | ||
| 5 | +import com.bsth.entity.schedule.GuideboardInfo; | ||
| 6 | +import org.apache.commons.lang3.StringUtils; | ||
| 7 | +import org.apache.commons.lang3.math.NumberUtils; | ||
| 8 | +import org.kie.api.runtime.rule.AccumulateFunction; | ||
| 9 | + | ||
| 10 | +import java.io.*; | ||
| 11 | +import java.util.HashMap; | ||
| 12 | +import java.util.Map; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * 查找错误函数。 | ||
| 16 | + */ | ||
| 17 | +public class ErrorInfoFunction implements AccumulateFunction { | ||
| 18 | + @Override | ||
| 19 | + public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { | ||
| 20 | + | ||
| 21 | + } | ||
| 22 | + | ||
| 23 | + @Override | ||
| 24 | + public void writeExternal(ObjectOutput out) throws IOException { | ||
| 25 | + | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + protected static class ErrorInfoContext implements Externalizable { | ||
| 29 | + /** 错误数量 */ | ||
| 30 | + public Integer errorCount = 0; | ||
| 31 | + /** 错误Map,Map<规则id,errorInfo> */ | ||
| 32 | + public Map<Long, ValidateRuleResult.ErrorInfo> errorInfoMap = new HashMap<>(); | ||
| 33 | + | ||
| 34 | + public ErrorInfoContext() { | ||
| 35 | + | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + @Override | ||
| 39 | + public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { | ||
| 40 | + errorCount = in.readInt(); | ||
| 41 | + errorInfoMap = (Map<Long, ValidateRuleResult.ErrorInfo>) in.readObject(); | ||
| 42 | + | ||
| 43 | + } | ||
| 44 | + | ||
| 45 | + @Override | ||
| 46 | + public void writeExternal(ObjectOutput out) throws IOException { | ||
| 47 | + out.writeInt(errorCount); | ||
| 48 | + out.writeObject(errorInfoMap); | ||
| 49 | + } | ||
| 50 | + | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + @Override | ||
| 54 | + public Serializable createContext() { | ||
| 55 | + return new ErrorInfoContext(); | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + @Override | ||
| 59 | + public void init(Serializable serializable) throws Exception { | ||
| 60 | + ErrorInfoContext errorInfoContext = (ErrorInfoContext) serializable; | ||
| 61 | + errorInfoContext.errorCount = 0; | ||
| 62 | + errorInfoContext.errorInfoMap = new HashMap<>(); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + @Override | ||
| 66 | + public void accumulate(Serializable serializable, Object o) { | ||
| 67 | + ErrorInfoContext errorInfoContext = (ErrorInfoContext) serializable; | ||
| 68 | + WrapInput wrapInput = (WrapInput) o; | ||
| 69 | + | ||
| 70 | + ValidateRuleResult.ErrorInfo errorInfo = new ValidateRuleResult.ErrorInfo(); | ||
| 71 | + errorInfo.setRuleId(wrapInput.getRuleId()); | ||
| 72 | + errorInfo.setClZbh(wrapInput.getClZbh()); | ||
| 73 | + errorInfo.setQyrq(wrapInput.getQyrq()); | ||
| 74 | + | ||
| 75 | + // 1、车辆配置验证 | ||
| 76 | + if (StringUtils.isNotEmpty(wrapInput.getClZbh())) { // 自编号不能为空 | ||
| 77 | + if (wrapInput.getCcInfos().get(wrapInput.getClZbh()) == null) { // 车辆配置不在当前线路上 | ||
| 78 | + errorInfo.getErrorDescList().add("车辆配置不在当前线路,请重新编辑保存!"); | ||
| 79 | + } | ||
| 80 | + } else { | ||
| 81 | + errorInfo.getErrorDescList().add("自编号不能为空,请重新编辑保存!"); | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + // 2、路牌id,路牌名字,路牌起始索引验证 | ||
| 85 | + if (StringUtils.isNotEmpty(wrapInput.getLpIds()) && | ||
| 86 | + StringUtils.isNotEmpty(wrapInput.getLpNames())) { // 冗余的路牌id和路牌名字都不能为空 | ||
| 87 | + String[] lpIds = wrapInput.getLpIds().split(","); | ||
| 88 | + String[] lpNames = wrapInput.getLpNames().split(","); | ||
| 89 | + if (lpIds.length == lpNames.length) { // 路牌id和路牌名字个数一致 | ||
| 90 | + for (int i = 0; i < lpIds.length; i++) { | ||
| 91 | + if (!NumberUtils.isDigits(lpIds[i])) { // 冗余路牌id必须是数字 | ||
| 92 | + errorInfo.getErrorDescList().add("冗余路牌id必须是数字,请重新编辑保存!"); | ||
| 93 | + break; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + GuideboardInfo lpInfo = wrapInput.getLpInfos().get(NumberUtils.toLong(lpIds[i])); | ||
| 97 | + if (lpInfo == null) { // 路牌不在当前线路上 | ||
| 98 | + errorInfo.getErrorDescList().add("路牌不在当前线路上,请重新编辑保存!"); | ||
| 99 | + } else { | ||
| 100 | + if (StringUtils.isEmpty(lpNames[i]) || | ||
| 101 | + !(lpNames[i].equals(lpInfo.getLpName()))) { // 路牌id和路牌名字不对应 | ||
| 102 | + errorInfo.getErrorDescList().add("路牌id和路牌名字不对应,请重新编辑保存!"); | ||
| 103 | + break; | ||
| 104 | + } | ||
| 105 | + } | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + if (wrapInput.getLpStartIndex() < 1 || | ||
| 109 | + wrapInput.getLpStartIndex() > lpIds.length) { // 路牌起始索引溢出 | ||
| 110 | + errorInfo.getErrorDescList().add("路牌起始索引溢出,请重新编辑保存!"); | ||
| 111 | + } | ||
| 112 | + } else { | ||
| 113 | + errorInfo.getErrorDescList().add("路牌id和路牌名字个数不一致,请重新编辑保存!"); | ||
| 114 | + } | ||
| 115 | + } else { | ||
| 116 | + errorInfo.getErrorDescList().add("冗余的路牌id和路牌名字都不能为空,请重新编辑保存!"); | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + // 3、人员配置,搭班编码,人员起始索引验证 | ||
| 120 | + if (StringUtils.isNotEmpty(wrapInput.getEcIds()) && | ||
| 121 | + StringUtils.isNotEmpty(wrapInput.getEcDbbms())) { // 冗余的人员配置id和人员搭班编码都不能为空 | ||
| 122 | + String[] ecIds = wrapInput.getEcIds().split(","); | ||
| 123 | + String[] ecDbbms = wrapInput.getEcDbbms().split(","); | ||
| 124 | + if (ecIds.length == ecDbbms.length) { // 人员配置id和搭班编码个数一致 | ||
| 125 | + for (int i = 0; i < ecIds.length; i++) { | ||
| 126 | + if (ecIds[i].contains("-")) { // 分班标识 | ||
| 127 | + String[] fb_ecIds = ecIds[i].split("-"); | ||
| 128 | + String[] fb_ecDbbms = ecDbbms[i].split("-"); | ||
| 129 | + if (fb_ecIds.length != 2 || fb_ecDbbms.length != 2) { // 只能早晚分班 | ||
| 130 | + errorInfo.getErrorDescList().add("只能早晚分班,请重新编辑保存!"); | ||
| 131 | + break; | ||
| 132 | + } else { | ||
| 133 | + EmployeeConfigInfo fb_ecInfo1 = wrapInput.getEcInfos().get(NumberUtils.toLong(fb_ecIds[0])); | ||
| 134 | + EmployeeConfigInfo fb_ecInfo2 = wrapInput.getEcInfos().get(NumberUtils.toLong(fb_ecIds[1])); | ||
| 135 | + if (fb_ecInfo1 == null || fb_ecInfo2 == null) { // 分班的人员配置不在当前线路 | ||
| 136 | + errorInfo.getErrorDescList().add("分班的人员配置不在当前线路,请重新编辑保存!"); | ||
| 137 | + break; | ||
| 138 | + } else { | ||
| 139 | + if (StringUtils.isEmpty(fb_ecDbbms[0]) || | ||
| 140 | + StringUtils.isEmpty(fb_ecDbbms[1]) || | ||
| 141 | + !(fb_ecDbbms[0].equals(fb_ecInfo1.getDbbm())) || | ||
| 142 | + !(fb_ecDbbms[1].equals(fb_ecInfo2.getDbbm()))) { // 分班人员配置id和搭班编码不对应 | ||
| 143 | + errorInfo.getErrorDescList().add("分班人员配置id和搭班编码不对应,请重新编辑保存!"); | ||
| 144 | + break; | ||
| 145 | + } | ||
| 146 | + } | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + } else { | ||
| 150 | + if (!NumberUtils.isDigits(ecIds[i])) { // 冗余的人员配置id必须是数字 | ||
| 151 | + errorInfo.getErrorDescList().add("冗余的人员配置id必须是数字,请重新编辑保存!"); | ||
| 152 | + break; | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + EmployeeConfigInfo ecInfo = wrapInput.getEcInfos().get(NumberUtils.toLong(ecIds[i])); | ||
| 156 | + if (ecInfo == null) { // 人员配置不在当前线路 | ||
| 157 | + errorInfo.getErrorDescList().add("人员配置不在当前线路,请重新编辑保存!"); | ||
| 158 | + break; | ||
| 159 | + } else { | ||
| 160 | + if (StringUtils.isEmpty(ecDbbms[i]) || | ||
| 161 | + !(ecDbbms[i].equals(ecInfo.getDbbm()))) { // 人员配置id和搭班编码不对应 | ||
| 162 | + errorInfo.getErrorDescList().add("人员配置id和搭班编码不对应,请重新编辑保存!"); | ||
| 163 | + break; | ||
| 164 | + } | ||
| 165 | + } | ||
| 166 | + } | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + if (wrapInput.getEcStartIndex() < 1 || | ||
| 170 | + wrapInput.getEcStartIndex() > ecIds.length) { // 人员起始索引溢出 | ||
| 171 | + errorInfo.getErrorDescList().add("人员起始索引溢出,请重新编辑保存!"); | ||
| 172 | + } | ||
| 173 | + } else { | ||
| 174 | + errorInfo.getErrorDescList().add("人员配置id和搭班编码个数不一致,请重新编辑保存!"); | ||
| 175 | + } | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + if (errorInfo.getErrorDescList().size() > 0) { | ||
| 179 | + errorInfoContext.errorCount ++; | ||
| 180 | + errorInfoContext.errorInfoMap.put(wrapInput.getRuleId(), errorInfo); | ||
| 181 | + } | ||
| 182 | + | ||
| 183 | + } | ||
| 184 | + | ||
| 185 | + @Override | ||
| 186 | + public void reverse(Serializable serializable, Object o) throws Exception { | ||
| 187 | + ErrorInfoContext errorInfoContext = (ErrorInfoContext) serializable; | ||
| 188 | + WrapInput wrapInput = (WrapInput) o; | ||
| 189 | + | ||
| 190 | + if (errorInfoContext.errorInfoMap.get(wrapInput.getRuleId()) != null) { | ||
| 191 | + errorInfoContext.errorInfoMap.remove(wrapInput.getRuleId()); | ||
| 192 | + errorInfoContext.errorCount --; | ||
| 193 | + } | ||
| 194 | + } | ||
| 195 | + | ||
| 196 | + @Override | ||
| 197 | + public Object getResult(Serializable serializable) throws Exception { | ||
| 198 | + ErrorInfoContext errorInfoContext = (ErrorInfoContext) serializable; | ||
| 199 | + return errorInfoContext.errorInfoMap; | ||
| 200 | + } | ||
| 201 | + | ||
| 202 | + @Override | ||
| 203 | + public boolean supportsReverse() { | ||
| 204 | + return true; | ||
| 205 | + } | ||
| 206 | + | ||
| 207 | + @Override | ||
| 208 | + public Class<?> getResultType() { | ||
| 209 | + return Map.class; | ||
| 210 | + } | ||
| 211 | + | ||
| 212 | +} |
src/main/java/com/bsth/service/schedule/impl/plan/kBase3/validate/rule/ValidateRuleResult.java
0 → 100644
| 1 | +package com.bsth.service.schedule.impl.plan.kBase3.validate.rule; | ||
| 2 | + | ||
| 3 | +import java.util.ArrayList; | ||
| 4 | +import java.util.Date; | ||
| 5 | +import java.util.List; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 输出结果值。 | ||
| 9 | + */ | ||
| 10 | +public class ValidateRuleResult { | ||
| 11 | + /** 线路id */ | ||
| 12 | + private Integer xlId; | ||
| 13 | + /** 规则总数量 */ | ||
| 14 | + private Integer count; | ||
| 15 | + /** 启用的规则数量 */ | ||
| 16 | + private Integer qyCount; | ||
| 17 | + /** 启用规则中的错误数量 */ | ||
| 18 | + private Integer qyErrorCount; | ||
| 19 | + /** 错误列表 */ | ||
| 20 | + private List<ErrorInfo> errorInfos = new ArrayList<>(); | ||
| 21 | + | ||
| 22 | + public Integer getXlId() { | ||
| 23 | + return xlId; | ||
| 24 | + } | ||
| 25 | + | ||
| 26 | + public void setXlId(Integer xlId) { | ||
| 27 | + this.xlId = xlId; | ||
| 28 | + } | ||
| 29 | + | ||
| 30 | + public Integer getCount() { | ||
| 31 | + return count; | ||
| 32 | + } | ||
| 33 | + | ||
| 34 | + public void setCount(Integer count) { | ||
| 35 | + this.count = count; | ||
| 36 | + } | ||
| 37 | + | ||
| 38 | + public Integer getQyCount() { | ||
| 39 | + return qyCount; | ||
| 40 | + } | ||
| 41 | + | ||
| 42 | + public void setQyCount(Integer qyCount) { | ||
| 43 | + this.qyCount = qyCount; | ||
| 44 | + } | ||
| 45 | + | ||
| 46 | + public Integer getQyErrorCount() { | ||
| 47 | + return qyErrorCount; | ||
| 48 | + } | ||
| 49 | + | ||
| 50 | + public void setQyErrorCount(Integer qyErrorCount) { | ||
| 51 | + this.qyErrorCount = qyErrorCount; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + public List<ErrorInfo> getErrorInfos() { | ||
| 55 | + return errorInfos; | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + public void setErrorInfos(List<ErrorInfo> errorInfos) { | ||
| 59 | + this.errorInfos = errorInfos; | ||
| 60 | + } | ||
| 61 | + | ||
| 62 | + public static class ErrorInfo { | ||
| 63 | + /** 规则id */ | ||
| 64 | + private Long ruleId; | ||
| 65 | + /** 车辆自编号 */ | ||
| 66 | + private String clZbh; | ||
| 67 | + /** 启用日期 */ | ||
| 68 | + private Date qyrq; | ||
| 69 | + /** 错误描述 */ | ||
| 70 | + private List<String> errorDescList = new ArrayList<>(); | ||
| 71 | + | ||
| 72 | + public Long getRuleId() { | ||
| 73 | + return ruleId; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + public void setRuleId(Long ruleId) { | ||
| 77 | + this.ruleId = ruleId; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + public String getClZbh() { | ||
| 81 | + return clZbh; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public void setClZbh(String clZbh) { | ||
| 85 | + this.clZbh = clZbh; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + public Date getQyrq() { | ||
| 89 | + return qyrq; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public void setQyrq(Date qyrq) { | ||
| 93 | + this.qyrq = qyrq; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public List<String> getErrorDescList() { | ||
| 97 | + return errorDescList; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public void setErrorDescList(List<String> errorDescList) { | ||
| 101 | + this.errorDescList = errorDescList; | ||
| 102 | + } | ||
| 103 | + } | ||
| 104 | +} |
src/main/java/com/bsth/service/schedule/impl/plan/kBase3/validate/rule/WrapInput.java
0 → 100644
| 1 | +package com.bsth.service.schedule.impl.plan.kBase3.validate.rule; | ||
| 2 | + | ||
| 3 | +import com.bsth.entity.schedule.CarConfigInfo; | ||
| 4 | +import com.bsth.entity.schedule.EmployeeConfigInfo; | ||
| 5 | +import com.bsth.entity.schedule.GuideboardInfo; | ||
| 6 | +import com.bsth.entity.schedule.rule.ScheduleRule1Flat; | ||
| 7 | +import org.springframework.util.CollectionUtils; | ||
| 8 | + | ||
| 9 | +import java.util.*; | ||
| 10 | + | ||
| 11 | +/** | ||
| 12 | + * 聚合输入的待判定数据。 | ||
| 13 | + */ | ||
| 14 | +public class WrapInput { | ||
| 15 | + /** 线路Id */ | ||
| 16 | + private Integer xlId; | ||
| 17 | + /** 车辆自编号 */ | ||
| 18 | + private String clZbh; | ||
| 19 | + /** 路牌id列表 */ | ||
| 20 | + private String lpIds; | ||
| 21 | + /** 路牌名字列表 */ | ||
| 22 | + private String lpNames; | ||
| 23 | + /** 人员配置列表 */ | ||
| 24 | + private String ecIds; | ||
| 25 | + /** 人员搭班编码列表 */ | ||
| 26 | + private String ecDbbms; | ||
| 27 | + /** 路牌循环起始索引 */ | ||
| 28 | + private Integer lpStartIndex; | ||
| 29 | + /** 人员循环起始索引 */ | ||
| 30 | + private Integer ecStartIndex; | ||
| 31 | + /** 规则id */ | ||
| 32 | + private Long ruleId; | ||
| 33 | + /** 启用日期 */ | ||
| 34 | + private Date qyrq; | ||
| 35 | + | ||
| 36 | + private Map<String, CarConfigInfo> ccInfos = new HashMap<>(); | ||
| 37 | + private Map<Long, GuideboardInfo> lpInfos = new HashMap<>(); | ||
| 38 | + private Map<Long, EmployeeConfigInfo> ecInfos = new HashMap<>(); | ||
| 39 | + | ||
| 40 | + public WrapInput(ScheduleRule1Flat r, | ||
| 41 | + Map<String, CarConfigInfo> cc, | ||
| 42 | + Map<Long, GuideboardInfo> lp, | ||
| 43 | + Map<Long, EmployeeConfigInfo> ec) { | ||
| 44 | + this.xlId = r.getXl().getId(); | ||
| 45 | + this.clZbh = r.getCarConfigInfo().getCl().getInsideCode(); | ||
| 46 | + this.lpIds = r.getLpIds(); | ||
| 47 | + this.lpNames = r.getLpNames(); | ||
| 48 | + this.ecIds = r.getRyConfigIds(); | ||
| 49 | + this.ecDbbms = r.getRyDbbms(); | ||
| 50 | + this.lpStartIndex = r.getLpStart(); | ||
| 51 | + this.ecStartIndex = r.getRyStart(); | ||
| 52 | + this.ruleId = r.getId(); | ||
| 53 | + this.qyrq = r.getQyrq(); | ||
| 54 | + | ||
| 55 | + if (!CollectionUtils.isEmpty(cc)) { | ||
| 56 | + this.ccInfos.putAll(cc); | ||
| 57 | + } | ||
| 58 | + if (!CollectionUtils.isEmpty(lp)) { | ||
| 59 | + this.lpInfos.putAll(lp); | ||
| 60 | + } | ||
| 61 | + if (!CollectionUtils.isEmpty(ec)) { | ||
| 62 | + this.ecInfos.putAll(ec); | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + } | ||
| 66 | + | ||
| 67 | + public Integer getXlId() { | ||
| 68 | + return xlId; | ||
| 69 | + } | ||
| 70 | + | ||
| 71 | + public void setXlId(Integer xlId) { | ||
| 72 | + this.xlId = xlId; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + public String getClZbh() { | ||
| 76 | + return clZbh; | ||
| 77 | + } | ||
| 78 | + | ||
| 79 | + public void setClZbh(String clZbh) { | ||
| 80 | + this.clZbh = clZbh; | ||
| 81 | + } | ||
| 82 | + | ||
| 83 | + public String getLpIds() { | ||
| 84 | + return lpIds; | ||
| 85 | + } | ||
| 86 | + | ||
| 87 | + public void setLpIds(String lpIds) { | ||
| 88 | + this.lpIds = lpIds; | ||
| 89 | + } | ||
| 90 | + | ||
| 91 | + public String getLpNames() { | ||
| 92 | + return lpNames; | ||
| 93 | + } | ||
| 94 | + | ||
| 95 | + public void setLpNames(String lpNames) { | ||
| 96 | + this.lpNames = lpNames; | ||
| 97 | + } | ||
| 98 | + | ||
| 99 | + public String getEcIds() { | ||
| 100 | + return ecIds; | ||
| 101 | + } | ||
| 102 | + | ||
| 103 | + public void setEcIds(String ecIds) { | ||
| 104 | + this.ecIds = ecIds; | ||
| 105 | + } | ||
| 106 | + | ||
| 107 | + public String getEcDbbms() { | ||
| 108 | + return ecDbbms; | ||
| 109 | + } | ||
| 110 | + | ||
| 111 | + public void setEcDbbms(String ecDbbms) { | ||
| 112 | + this.ecDbbms = ecDbbms; | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + public Integer getLpStartIndex() { | ||
| 116 | + return lpStartIndex; | ||
| 117 | + } | ||
| 118 | + | ||
| 119 | + public void setLpStartIndex(Integer lpStartIndex) { | ||
| 120 | + this.lpStartIndex = lpStartIndex; | ||
| 121 | + } | ||
| 122 | + | ||
| 123 | + public Integer getEcStartIndex() { | ||
| 124 | + return ecStartIndex; | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + public void setEcStartIndex(Integer ecStartIndex) { | ||
| 128 | + this.ecStartIndex = ecStartIndex; | ||
| 129 | + } | ||
| 130 | + | ||
| 131 | + public Long getRuleId() { | ||
| 132 | + return ruleId; | ||
| 133 | + } | ||
| 134 | + | ||
| 135 | + public void setRuleId(Long ruleId) { | ||
| 136 | + this.ruleId = ruleId; | ||
| 137 | + } | ||
| 138 | + | ||
| 139 | + public Date getQyrq() { | ||
| 140 | + return qyrq; | ||
| 141 | + } | ||
| 142 | + | ||
| 143 | + public void setQyrq(Date qyrq) { | ||
| 144 | + this.qyrq = qyrq; | ||
| 145 | + } | ||
| 146 | + | ||
| 147 | + public Map<String, CarConfigInfo> getCcInfos() { | ||
| 148 | + return ccInfos; | ||
| 149 | + } | ||
| 150 | + | ||
| 151 | + public void setCcInfos(Map<String, CarConfigInfo> ccInfos) { | ||
| 152 | + this.ccInfos = ccInfos; | ||
| 153 | + } | ||
| 154 | + | ||
| 155 | + public Map<Long, GuideboardInfo> getLpInfos() { | ||
| 156 | + return lpInfos; | ||
| 157 | + } | ||
| 158 | + | ||
| 159 | + public void setLpInfos(Map<Long, GuideboardInfo> lpInfos) { | ||
| 160 | + this.lpInfos = lpInfos; | ||
| 161 | + } | ||
| 162 | + | ||
| 163 | + public Map<Long, EmployeeConfigInfo> getEcInfos() { | ||
| 164 | + return ecInfos; | ||
| 165 | + } | ||
| 166 | + | ||
| 167 | + public void setEcInfos(Map<Long, EmployeeConfigInfo> ecInfos) { | ||
| 168 | + this.ecInfos = ecInfos; | ||
| 169 | + } | ||
| 170 | +} |
src/main/java/com/bsth/service/schedule/rules/ttinfo2/CalcuParam.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase3/validate/timetable/CalcuParam.java
src/main/java/com/bsth/service/schedule/rules/ttinfo2/ErrorBcCountFunction.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase3/validate/timetable/ErrorBcCountFunction.java
| 1 | -package com.bsth.service.schedule.rules.ttinfo2; | 1 | +package com.bsth.service.schedule.impl.plan.kBase3.validate.timetable; |
| 2 | 2 | ||
| 3 | import com.bsth.entity.schedule.TTInfoDetail; | 3 | import com.bsth.entity.schedule.TTInfoDetail; |
| 4 | import org.apache.commons.lang3.StringUtils; | 4 | import org.apache.commons.lang3.StringUtils; |
src/main/java/com/bsth/service/schedule/rules/ttinfo2/Result.java renamed to src/main/java/com/bsth/service/schedule/impl/plan/kBase3/validate/timetable/Result.java
| 1 | -package com.bsth.service.schedule.rules.ttinfo2; | 1 | +package com.bsth.service.schedule.impl.plan.kBase3.validate.timetable; |
| 2 | 2 | ||
| 3 | import java.util.ArrayList; | 3 | import java.util.ArrayList; |
| 4 | import java.util.List; | 4 | import java.util.List; |
| @@ -22,6 +22,8 @@ public class Result { | @@ -22,6 +22,8 @@ public class Result { | ||
| 22 | private Long ttid; | 22 | private Long ttid; |
| 23 | /** 时刻表名字 */ | 23 | /** 时刻表名字 */ |
| 24 | private String ttname; | 24 | private String ttname; |
| 25 | + /** 线路版本 */ | ||
| 26 | + private Integer lineVersion; | ||
| 25 | 27 | ||
| 26 | /** 所有班次数 */ | 28 | /** 所有班次数 */ |
| 27 | private Long allbc; | 29 | private Long allbc; |
| @@ -90,5 +92,13 @@ public class Result { | @@ -90,5 +92,13 @@ public class Result { | ||
| 90 | public void setErrorbc(Long errorbc) { | 92 | public void setErrorbc(Long errorbc) { |
| 91 | this.errorbc = errorbc; | 93 | this.errorbc = errorbc; |
| 92 | } | 94 | } |
| 95 | + | ||
| 96 | + public Integer getLineVersion() { | ||
| 97 | + return lineVersion; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public void setLineVersion(Integer lineVersion) { | ||
| 101 | + this.lineVersion = lineVersion; | ||
| 102 | + } | ||
| 93 | } | 103 | } |
| 94 | } | 104 | } |
src/main/resources/application-prod.properties
| @@ -17,15 +17,22 @@ spring.datasource.max-idle=8 | @@ -17,15 +17,22 @@ spring.datasource.max-idle=8 | ||
| 17 | spring.datasource.min-idle=8 | 17 | spring.datasource.min-idle=8 |
| 18 | spring.datasource.initial-size=5 | 18 | spring.datasource.initial-size=5 |
| 19 | 19 | ||
| 20 | +spring.datasource.max-wait=10000 | ||
| 21 | +spring.datasource.remove-abandoned=true | ||
| 22 | +spring.datasource.remove-abandoned-timeout=120 | ||
| 23 | + | ||
| 20 | spring.datasource.test-on-borrow=true | 24 | spring.datasource.test-on-borrow=true |
| 21 | spring.datasource.test-on-connect=true | 25 | spring.datasource.test-on-connect=true |
| 22 | spring.datasource.test-on-return=true | 26 | spring.datasource.test-on-return=true |
| 23 | spring.datasource.test-while-idle=true | 27 | spring.datasource.test-while-idle=true |
| 24 | spring.datasource.validation-query=select 1 | 28 | spring.datasource.validation-query=select 1 |
| 29 | +spring.datasource.time-between-eviction-runs-millis=1800000 | ||
| 25 | 30 | ||
| 26 | ## gps client data | 31 | ## gps client data |
| 27 | http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all | 32 | http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all |
| 28 | ## gateway real data | 33 | ## gateway real data |
| 29 | http.gps.real.url= http://10.10.200.79:8080/transport_server/rtgps/ | 34 | http.gps.real.url= http://10.10.200.79:8080/transport_server/rtgps/ |
| 30 | ## gateway send directive | 35 | ## gateway send directive |
| 31 | -http.send.directive = http://10.10.200.79:8080/transport_server/message/ | ||
| 32 | \ No newline at end of file | 36 | \ No newline at end of file |
| 37 | +http.send.directive = http://10.10.200.79:8080/transport_server/message/ | ||
| 38 | +## maintenance report | ||
| 39 | +http.report.url = http://116.247.73.122:9098/jgjwsystem_j2ee/ | ||
| 33 | \ No newline at end of file | 40 | \ No newline at end of file |
src/main/resources/application.properties
src/main/resources/datatools/ktrs/carsDataOutput.ktr
| 1 | -<?xml version="1.0" encoding="UTF-8"?> | ||
| 2 | -<transformation> | ||
| 3 | - <info> | ||
| 4 | - <name>车辆信息导出</name> | ||
| 5 | - <description>车辆信息导出</description> | ||
| 6 | - <extended_description>车辆基础信息</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>cgsbm_in</name> | ||
| 14 | - <default_value/> | ||
| 15 | - <description>分公司编码</description> | ||
| 16 | - </parameter> | ||
| 17 | - <parameter> | ||
| 18 | - <name>filepath</name> | ||
| 19 | - <default_value/> | ||
| 20 | - <description>excel文件路径</description> | ||
| 21 | - </parameter> | ||
| 22 | - </parameters> | ||
| 23 | - <log> | ||
| 24 | -<trans-log-table><connection/> | ||
| 25 | -<schema/> | ||
| 26 | -<table/> | ||
| 27 | -<size_limit_lines/> | ||
| 28 | -<interval/> | ||
| 29 | -<timeout_days/> | ||
| 30 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table> | ||
| 31 | -<perf-log-table><connection/> | ||
| 32 | -<schema/> | ||
| 33 | -<table/> | ||
| 34 | -<interval/> | ||
| 35 | -<timeout_days/> | ||
| 36 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table> | ||
| 37 | -<channel-log-table><connection/> | ||
| 38 | -<schema/> | ||
| 39 | -<table/> | ||
| 40 | -<timeout_days/> | ||
| 41 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table> | ||
| 42 | -<step-log-table><connection/> | ||
| 43 | -<schema/> | ||
| 44 | -<table/> | ||
| 45 | -<timeout_days/> | ||
| 46 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table> | ||
| 47 | -<metrics-log-table><connection/> | ||
| 48 | -<schema/> | ||
| 49 | -<table/> | ||
| 50 | -<timeout_days/> | ||
| 51 | -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table> | ||
| 52 | - </log> | ||
| 53 | - <maxdate> | ||
| 54 | - <connection/> | ||
| 55 | - <table/> | ||
| 56 | - <field/> | ||
| 57 | - <offset>0.0</offset> | ||
| 58 | - <maxdiff>0.0</maxdiff> | ||
| 59 | - </maxdate> | ||
| 60 | - <size_rowset>10000</size_rowset> | ||
| 61 | - <sleep_time_empty>50</sleep_time_empty> | ||
| 62 | - <sleep_time_full>50</sleep_time_full> | ||
| 63 | - <unique_connections>N</unique_connections> | ||
| 64 | - <feedback_shown>Y</feedback_shown> | ||
| 65 | - <feedback_size>50000</feedback_size> | ||
| 66 | - <using_thread_priorities>Y</using_thread_priorities> | ||
| 67 | - <shared_objects_file/> | ||
| 68 | - <capture_step_performance>N</capture_step_performance> | ||
| 69 | - <step_performance_capturing_delay>1000</step_performance_capturing_delay> | ||
| 70 | - <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit> | ||
| 71 | - <dependencies> | ||
| 72 | - </dependencies> | ||
| 73 | - <partitionschemas> | ||
| 74 | - </partitionschemas> | ||
| 75 | - <slaveservers> | ||
| 76 | - </slaveservers> | ||
| 77 | - <clusterschemas> | ||
| 78 | - </clusterschemas> | ||
| 79 | - <created_user>-</created_user> | ||
| 80 | - <created_date>2016/08/05 16:42:22.753</created_date> | ||
| 81 | - <modified_user>-</modified_user> | ||
| 82 | - <modified_date>2016/08/05 16:42:22.753</modified_date> | ||
| 83 | - <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA=</key_for_session_key> | ||
| 84 | - <is_key_private>N</is_key_private> | ||
| 85 | - </info> | ||
| 86 | - <notepads> | ||
| 87 | - </notepads> | ||
| 88 | - <connection> | ||
| 89 | - <name>192.168.168.1_jwgl_dw</name> | ||
| 90 | - <server>192.168.168.1</server> | ||
| 91 | - <type>ORACLE</type> | ||
| 92 | - <access>Native</access> | ||
| 93 | - <database>orcl</database> | ||
| 94 | - <port>1521</port> | ||
| 95 | - <username>jwgl_dw</username> | ||
| 96 | - <password>Encrypted 2be98afc86aa7f2e4cb13b977d2adabcd</password> | ||
| 97 | - <servername/> | ||
| 98 | - <data_tablespace/> | ||
| 99 | - <index_tablespace/> | ||
| 100 | - <attributes> | ||
| 101 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 102 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 103 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 104 | - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 105 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 106 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 107 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 108 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 109 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 110 | - </attributes> | ||
| 111 | - </connection> | ||
| 112 | - <connection> | ||
| 113 | - <name>bus_control_variable</name> | ||
| 114 | - <server>${v_db_ip}</server> | ||
| 115 | - <type>MYSQL</type> | ||
| 116 | - <access>Native</access> | ||
| 117 | - <database>${v_db_dname}</database> | ||
| 118 | - <port>3306</port> | ||
| 119 | - <username>${v_db_uname}</username> | ||
| 120 | - <password>${v_db_pwd}</password> | ||
| 121 | - <servername/> | ||
| 122 | - <data_tablespace/> | ||
| 123 | - <index_tablespace/> | ||
| 124 | - <attributes> | ||
| 125 | - <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute> | ||
| 126 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 127 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 128 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 129 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 130 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 131 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 132 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 133 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 134 | - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | ||
| 135 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 136 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 137 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 138 | - </attributes> | ||
| 139 | - </connection> | ||
| 140 | - <connection> | ||
| 141 | - <name>bus_control_公司_201</name> | ||
| 142 | - <server>localhost</server> | ||
| 143 | - <type>MYSQL</type> | ||
| 144 | - <access>Native</access> | ||
| 145 | - <database>control</database> | ||
| 146 | - <port>3306</port> | ||
| 147 | - <username>root</username> | ||
| 148 | - <password>Encrypted </password> | ||
| 149 | - <servername/> | ||
| 150 | - <data_tablespace/> | ||
| 151 | - <index_tablespace/> | ||
| 152 | - <attributes> | ||
| 153 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 154 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 155 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 156 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 157 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 158 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 159 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 160 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 161 | - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | ||
| 162 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 163 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 164 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 165 | - </attributes> | ||
| 166 | - </connection> | ||
| 167 | - <connection> | ||
| 168 | - <name>bus_control_本机</name> | ||
| 169 | - <server>localhost</server> | ||
| 170 | - <type>MYSQL</type> | ||
| 171 | - <access>Native</access> | ||
| 172 | - <database>control</database> | ||
| 173 | - <port>3306</port> | ||
| 174 | - <username>root</username> | ||
| 175 | - <password>Encrypted </password> | ||
| 176 | - <servername/> | ||
| 177 | - <data_tablespace/> | ||
| 178 | - <index_tablespace/> | ||
| 179 | - <attributes> | ||
| 180 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 181 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 182 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 183 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 184 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 185 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 186 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 187 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 188 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 189 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 190 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 191 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 192 | - </attributes> | ||
| 193 | - </connection> | ||
| 194 | - <connection> | ||
| 195 | - <name>xlab_mysql_youle</name> | ||
| 196 | - <server>101.231.124.8</server> | ||
| 197 | - <type>MYSQL</type> | ||
| 198 | - <access>Native</access> | ||
| 199 | - <database>xlab_youle</database> | ||
| 200 | - <port>45687</port> | ||
| 201 | - <username>xlab-youle</username> | ||
| 202 | - <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password> | ||
| 203 | - <servername/> | ||
| 204 | - <data_tablespace/> | ||
| 205 | - <index_tablespace/> | ||
| 206 | - <attributes> | ||
| 207 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 208 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 209 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 210 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 211 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 212 | - <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute> | ||
| 213 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 214 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 215 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 216 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 217 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 218 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 219 | - </attributes> | ||
| 220 | - </connection> | ||
| 221 | - <connection> | ||
| 222 | - <name>xlab_mysql_youle(本机)</name> | ||
| 223 | - <server>localhost</server> | ||
| 224 | - <type>MYSQL</type> | ||
| 225 | - <access>Native</access> | ||
| 226 | - <database>xlab_youle</database> | ||
| 227 | - <port>3306</port> | ||
| 228 | - <username>root</username> | ||
| 229 | - <password>Encrypted </password> | ||
| 230 | - <servername/> | ||
| 231 | - <data_tablespace/> | ||
| 232 | - <index_tablespace/> | ||
| 233 | - <attributes> | ||
| 234 | - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 235 | - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 236 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 237 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 238 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 239 | - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 240 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 241 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 242 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 243 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 244 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 245 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 246 | - </attributes> | ||
| 247 | - </connection> | ||
| 248 | - <connection> | ||
| 249 | - <name>xlab_youle</name> | ||
| 250 | - <server/> | ||
| 251 | - <type>MYSQL</type> | ||
| 252 | - <access>JNDI</access> | ||
| 253 | - <database>xlab_youle</database> | ||
| 254 | - <port>1521</port> | ||
| 255 | - <username/> | ||
| 256 | - <password>Encrypted </password> | ||
| 257 | - <servername/> | ||
| 258 | - <data_tablespace/> | ||
| 259 | - <index_tablespace/> | ||
| 260 | - <attributes> | ||
| 261 | - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 262 | - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 263 | - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 264 | - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 265 | - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 266 | - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 267 | - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 268 | - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 269 | - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 270 | - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 271 | - </attributes> | ||
| 272 | - </connection> | ||
| 273 | - <order> | ||
| 274 | - <hop> <from>公司查询</from><to>分公司查询</to><enabled>Y</enabled> </hop> | ||
| 275 | - <hop> <from>分公司查询</from><to>字段选择</to><enabled>Y</enabled> </hop> | ||
| 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>Excel输出</to><enabled>Y</enabled> </hop> | ||
| 280 | - </order> | ||
| 281 | - <step> | ||
| 282 | - <name>Excel输出</name> | ||
| 283 | - <type>ExcelOutput</type> | ||
| 284 | - <description/> | ||
| 285 | - <distribute>Y</distribute> | ||
| 286 | - <custom_distribution/> | ||
| 287 | - <copies>1</copies> | ||
| 288 | - <partitioning> | ||
| 289 | - <method>none</method> | ||
| 290 | - <schema_name/> | ||
| 291 | - </partitioning> | ||
| 292 | - <header>Y</header> | ||
| 293 | - <footer>N</footer> | ||
| 294 | - <encoding/> | ||
| 295 | - <append>N</append> | ||
| 296 | - <add_to_result_filenames>Y</add_to_result_filenames> | ||
| 297 | - <file> | ||
| 298 | - <name>${filepath}</name> | ||
| 299 | - <extention>xls</extention> | ||
| 300 | - <do_not_open_newfile_init>N</do_not_open_newfile_init> | ||
| 301 | - <create_parent_folder>N</create_parent_folder> | ||
| 302 | - <split>N</split> | ||
| 303 | - <add_date>N</add_date> | ||
| 304 | - <add_time>N</add_time> | ||
| 305 | - <SpecifyFormat>N</SpecifyFormat> | ||
| 306 | - <date_time_format>yyyyMMddHHmmss</date_time_format> | ||
| 307 | - <sheetname>工作表1</sheetname> | ||
| 308 | - <autosizecolums>N</autosizecolums> | ||
| 309 | - <nullisblank>N</nullisblank> | ||
| 310 | - <protect_sheet>N</protect_sheet> | ||
| 311 | - <password>Encrypted </password> | ||
| 312 | - <splitevery>0</splitevery> | ||
| 313 | - <usetempfiles>N</usetempfiles> | ||
| 314 | - <tempdirectory/> | ||
| 315 | - </file> | ||
| 316 | - <template> | ||
| 317 | - <enabled>N</enabled> | ||
| 318 | - <append>N</append> | ||
| 319 | - <filename>template.xls</filename> | ||
| 320 | - </template> | ||
| 321 | - <fields> | ||
| 322 | - <field> | ||
| 323 | - <name>车牌号</name> | ||
| 324 | - <type>String</type> | ||
| 325 | - <format/> | ||
| 326 | - </field> | ||
| 327 | - <field> | ||
| 328 | - <name>内部编码</name> | ||
| 329 | - <type>String</type> | ||
| 330 | - <format/> | ||
| 331 | - </field> | ||
| 332 | - <field> | ||
| 333 | - <name>所属公司</name> | ||
| 334 | - <type>String</type> | ||
| 335 | - <format/> | ||
| 336 | - </field> | ||
| 337 | - <field> | ||
| 338 | - <name>所属分公司</name> | ||
| 339 | - <type>String</type> | ||
| 340 | - <format/> | ||
| 341 | - </field> | ||
| 342 | - <field> | ||
| 343 | - <name>设备供应厂商</name> | ||
| 344 | - <type>String</type> | ||
| 345 | - <format/> | ||
| 346 | - </field> | ||
| 347 | - <field> | ||
| 348 | - <name>设备终端号</name> | ||
| 349 | - <type>String</type> | ||
| 350 | - <format/> | ||
| 351 | - </field> | ||
| 352 | - <field> | ||
| 353 | - <name>是否电车</name> | ||
| 354 | - <type>String</type> | ||
| 355 | - <format/> | ||
| 356 | - </field> | ||
| 357 | - </fields> | ||
| 358 | - <custom> | ||
| 359 | - <header_font_name>arial</header_font_name> | ||
| 360 | - <header_font_size>10</header_font_size> | ||
| 361 | - <header_font_bold>N</header_font_bold> | ||
| 362 | - <header_font_italic>N</header_font_italic> | ||
| 363 | - <header_font_underline>no</header_font_underline> | ||
| 364 | - <header_font_orientation>horizontal</header_font_orientation> | ||
| 365 | - <header_font_color>black</header_font_color> | ||
| 366 | - <header_background_color>none</header_background_color> | ||
| 367 | - <header_row_height>255</header_row_height> | ||
| 368 | - <header_alignment>left</header_alignment> | ||
| 369 | - <header_image/> | ||
| 370 | - <row_font_name>arial</row_font_name> | ||
| 371 | - <row_font_size>10</row_font_size> | ||
| 372 | - <row_font_color>black</row_font_color> | ||
| 373 | - <row_background_color>none</row_background_color> | ||
| 374 | - </custom> | ||
| 375 | - <cluster_schema/> | ||
| 376 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 377 | - <xloc>498</xloc> | ||
| 378 | - <yloc>348</yloc> | ||
| 379 | - <draw>Y</draw> | ||
| 380 | - </GUI> | ||
| 381 | - </step> | ||
| 382 | - | ||
| 383 | - <step> | ||
| 384 | - <name>公司查询</name> | ||
| 385 | - <type>DBLookup</type> | ||
| 386 | - <description/> | ||
| 387 | - <distribute>Y</distribute> | ||
| 388 | - <custom_distribution/> | ||
| 389 | - <copies>1</copies> | ||
| 390 | - <partitioning> | ||
| 391 | - <method>none</method> | ||
| 392 | - <schema_name/> | ||
| 393 | - </partitioning> | ||
| 394 | - <connection>bus_control_variable</connection> | ||
| 395 | - <cache>N</cache> | ||
| 396 | - <cache_load_all>N</cache_load_all> | ||
| 397 | - <cache_size>0</cache_size> | ||
| 398 | - <lookup> | ||
| 399 | - <schema/> | ||
| 400 | - <table>bsth_c_business</table> | ||
| 401 | - <orderby/> | ||
| 402 | - <fail_on_multiple>N</fail_on_multiple> | ||
| 403 | - <eat_row_on_failure>N</eat_row_on_failure> | ||
| 404 | - <key> | ||
| 405 | - <name>up_code</name> | ||
| 406 | - <field>up_code</field> | ||
| 407 | - <condition>=</condition> | ||
| 408 | - <name2/> | ||
| 409 | - </key> | ||
| 410 | - <key> | ||
| 411 | - <name>business_code</name> | ||
| 412 | - <field>business_code</field> | ||
| 413 | - <condition>=</condition> | ||
| 414 | - <name2/> | ||
| 415 | - </key> | ||
| 416 | - <value> | ||
| 417 | - <name>business_name</name> | ||
| 418 | - <rename>gs</rename> | ||
| 419 | - <default/> | ||
| 420 | - <type>String</type> | ||
| 421 | - </value> | ||
| 422 | - </lookup> | ||
| 423 | - <cluster_schema/> | ||
| 424 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 425 | - <xloc>364</xloc> | ||
| 426 | - <yloc>60</yloc> | ||
| 427 | - <draw>Y</draw> | ||
| 428 | - </GUI> | ||
| 429 | - </step> | ||
| 430 | - | ||
| 431 | - <step> | ||
| 432 | - <name>分公司查询</name> | ||
| 433 | - <type>DBLookup</type> | ||
| 434 | - <description/> | ||
| 435 | - <distribute>Y</distribute> | ||
| 436 | - <custom_distribution/> | ||
| 437 | - <copies>1</copies> | ||
| 438 | - <partitioning> | ||
| 439 | - <method>none</method> | ||
| 440 | - <schema_name/> | ||
| 441 | - </partitioning> | ||
| 442 | - <connection>bus_control_variable</connection> | ||
| 443 | - <cache>N</cache> | ||
| 444 | - <cache_load_all>N</cache_load_all> | ||
| 445 | - <cache_size>0</cache_size> | ||
| 446 | - <lookup> | ||
| 447 | - <schema/> | ||
| 448 | - <table>bsth_c_business</table> | ||
| 449 | - <orderby/> | ||
| 450 | - <fail_on_multiple>N</fail_on_multiple> | ||
| 451 | - <eat_row_on_failure>N</eat_row_on_failure> | ||
| 452 | - <key> | ||
| 453 | - <name>business_code</name> | ||
| 454 | - <field>up_code</field> | ||
| 455 | - <condition>=</condition> | ||
| 456 | - <name2/> | ||
| 457 | - </key> | ||
| 458 | - <key> | ||
| 459 | - <name>branche_company_code</name> | ||
| 460 | - <field>business_code</field> | ||
| 461 | - <condition>=</condition> | ||
| 462 | - <name2/> | ||
| 463 | - </key> | ||
| 464 | - <value> | ||
| 465 | - <name>business_name</name> | ||
| 466 | - <rename>fgs</rename> | ||
| 467 | - <default/> | ||
| 468 | - <type>String</type> | ||
| 469 | - </value> | ||
| 470 | - </lookup> | ||
| 471 | - <cluster_schema/> | ||
| 472 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 473 | - <xloc>491</xloc> | ||
| 474 | - <yloc>60</yloc> | ||
| 475 | - <draw>Y</draw> | ||
| 476 | - </GUI> | ||
| 477 | - </step> | ||
| 478 | - | ||
| 479 | - <step> | ||
| 480 | - <name>字段选择</name> | ||
| 481 | - <type>SelectValues</type> | ||
| 482 | - <description/> | ||
| 483 | - <distribute>Y</distribute> | ||
| 484 | - <custom_distribution/> | ||
| 485 | - <copies>1</copies> | ||
| 486 | - <partitioning> | ||
| 487 | - <method>none</method> | ||
| 488 | - <schema_name/> | ||
| 489 | - </partitioning> | ||
| 490 | - <fields> <field> <name>car_plate</name> | ||
| 491 | - <rename>车牌号</rename> | ||
| 492 | - <length>-2</length> | ||
| 493 | - <precision>-2</precision> | ||
| 494 | - </field> <field> <name>inside_code</name> | ||
| 495 | - <rename>内部编码</rename> | ||
| 496 | - <length>-2</length> | ||
| 497 | - <precision>-2</precision> | ||
| 498 | - </field> <field> <name>gs</name> | ||
| 499 | - <rename>所属公司</rename> | ||
| 500 | - <length>-2</length> | ||
| 501 | - <precision>-2</precision> | ||
| 502 | - </field> <field> <name>fgs</name> | ||
| 503 | - <rename>所属分公司</rename> | ||
| 504 | - <length>-2</length> | ||
| 505 | - <precision>-2</precision> | ||
| 506 | - </field> <field> <name>supplier_name</name> | ||
| 507 | - <rename>设备供应厂商</rename> | ||
| 508 | - <length>-2</length> | ||
| 509 | - <precision>-2</precision> | ||
| 510 | - </field> <field> <name>equipment_code</name> | ||
| 511 | - <rename>设备终端号</rename> | ||
| 512 | - <length>-2</length> | ||
| 513 | - <precision>-2</precision> | ||
| 514 | - </field> <field> <name>sfdc</name> | ||
| 515 | - <rename>sfdc_cal</rename> | ||
| 516 | - <length>-2</length> | ||
| 517 | - <precision>-2</precision> | ||
| 518 | - </field> <select_unspecified>N</select_unspecified> | ||
| 519 | - </fields> <cluster_schema/> | ||
| 520 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 521 | - <xloc>495</xloc> | ||
| 522 | - <yloc>173</yloc> | ||
| 523 | - <draw>Y</draw> | ||
| 524 | - </GUI> | ||
| 525 | - </step> | ||
| 526 | - | ||
| 527 | - <step> | ||
| 528 | - <name>添加查询常量</name> | ||
| 529 | - <type>ScriptValueMod</type> | ||
| 530 | - <description/> | ||
| 531 | - <distribute>Y</distribute> | ||
| 532 | - <custom_distribution/> | ||
| 533 | - <copies>1</copies> | ||
| 534 | - <partitioning> | ||
| 535 | - <method>none</method> | ||
| 536 | - <schema_name/> | ||
| 537 | - </partitioning> | ||
| 538 | - <compatible>N</compatible> | ||
| 539 | - <optimizationLevel>9</optimizationLevel> | ||
| 540 | - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | ||
| 541 | - <jsScript_name>Script 1</jsScript_name> | ||
| 542 | - <jsScript_script>//Script here

var up_code = '88';</jsScript_script> | ||
| 543 | - </jsScript> </jsScripts> <fields> <field> <name>up_code</name> | ||
| 544 | - <rename>up_code</rename> | ||
| 545 | - <type>String</type> | ||
| 546 | - <length>-1</length> | ||
| 547 | - <precision>-1</precision> | ||
| 548 | - <replace>N</replace> | ||
| 549 | - </field> </fields> <cluster_schema/> | ||
| 550 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 551 | - <xloc>227</xloc> | ||
| 552 | - <yloc>59</yloc> | ||
| 553 | - <draw>Y</draw> | ||
| 554 | - </GUI> | ||
| 555 | - </step> | ||
| 556 | - | ||
| 557 | - <step> | ||
| 558 | - <name>车辆信息表输入</name> | ||
| 559 | - <type>TableInput</type> | ||
| 560 | - <description/> | ||
| 561 | - <distribute>Y</distribute> | ||
| 562 | - <custom_distribution/> | ||
| 563 | - <copies>1</copies> | ||
| 564 | - <partitioning> | ||
| 565 | - <method>none</method> | ||
| 566 | - <schema_name/> | ||
| 567 | - </partitioning> | ||
| 568 | - <connection>bus_control_variable</connection> | ||
| 569 | - <sql>SELECT * FROM bsth_c_cars

</sql> | ||
| 570 | - <limit>0</limit> | ||
| 571 | - <lookup/> | ||
| 572 | - <execute_each_row>N</execute_each_row> | ||
| 573 | - <variables_active>Y</variables_active> | ||
| 574 | - <lazy_conversion_active>N</lazy_conversion_active> | ||
| 575 | - <cluster_schema/> | ||
| 576 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 577 | - <xloc>88</xloc> | ||
| 578 | - <yloc>59</yloc> | ||
| 579 | - <draw>Y</draw> | ||
| 580 | - </GUI> | ||
| 581 | - </step> | ||
| 582 | - | ||
| 583 | - <step> | ||
| 584 | - <name>是否电车</name> | ||
| 585 | - <type>ScriptValueMod</type> | ||
| 586 | - <description/> | ||
| 587 | - <distribute>Y</distribute> | ||
| 588 | - <custom_distribution/> | ||
| 589 | - <copies>1</copies> | ||
| 590 | - <partitioning> | ||
| 591 | - <method>none</method> | ||
| 592 | - <schema_name/> | ||
| 593 | - </partitioning> | ||
| 594 | - <compatible>N</compatible> | ||
| 595 | - <optimizationLevel>9</optimizationLevel> | ||
| 596 | - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | ||
| 597 | - <jsScript_name>Script 1</jsScript_name> | ||
| 598 | - <jsScript_script>//Script here

var 是否电车 = "否";

if(sfdc_cal) {
 是否电车 = "是";
}
</jsScript_script> | ||
| 599 | - </jsScript> </jsScripts> <fields> <field> <name>是否电车</name> | ||
| 600 | - <rename>是否电车</rename> | ||
| 601 | - <type>String</type> | ||
| 602 | - <length>-1</length> | ||
| 603 | - <precision>-1</precision> | ||
| 604 | - <replace>N</replace> | ||
| 605 | - </field> </fields> <cluster_schema/> | ||
| 606 | - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 607 | - <xloc>695</xloc> | ||
| 608 | - <yloc>173</yloc> | ||
| 609 | - <draw>Y</draw> | ||
| 610 | - </GUI> | ||
| 611 | - </step> | ||
| 612 | - | ||
| 613 | - <step_error_handling> | ||
| 614 | - </step_error_handling> | ||
| 615 | - <slave-step-copy-partition-distribution> | ||
| 616 | -</slave-step-copy-partition-distribution> | ||
| 617 | - <slave_transformation>N</slave_transformation> | ||
| 618 | - | ||
| 619 | -</transformation> | 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<transformation> | ||
| 3 | + <info> | ||
| 4 | + <name>车辆信息导出</name> | ||
| 5 | + <description>车辆信息导出</description> | ||
| 6 | + <extended_description>车辆基础信息</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>QUERY</name> | ||
| 14 | + <default_value/> | ||
| 15 | + <description>查询</description> | ||
| 16 | + </parameter> | ||
| 17 | + <parameter> | ||
| 18 | + <name>cgsbm_in</name> | ||
| 19 | + <default_value/> | ||
| 20 | + <description>分公司编码</description> | ||
| 21 | + </parameter> | ||
| 22 | + <parameter> | ||
| 23 | + <name>filepath</name> | ||
| 24 | + <default_value>1=1</default_value> | ||
| 25 | + <description>excel文件路径</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>2016/08/05 16:42:22.753</created_date> | ||
| 86 | + <modified_user>-</modified_user> | ||
| 87 | + <modified_date>2016/08/05 16:42:22.753</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 | + </notepads> | ||
| 93 | + <connection> | ||
| 94 | + <name>192.168.168.1_jwgl_dw</name> | ||
| 95 | + <server>192.168.168.1</server> | ||
| 96 | + <type>ORACLE</type> | ||
| 97 | + <access>Native</access> | ||
| 98 | + <database>orcl</database> | ||
| 99 | + <port>1521</port> | ||
| 100 | + <username>jwgl_dw</username> | ||
| 101 | + <password>Encrypted 2be98afc86aa7f2e4cb13b977d2adabcd</password> | ||
| 102 | + <servername/> | ||
| 103 | + <data_tablespace/> | ||
| 104 | + <index_tablespace/> | ||
| 105 | + <attributes> | ||
| 106 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 107 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 108 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 109 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 110 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 111 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 112 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 113 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 114 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 115 | + </attributes> | ||
| 116 | + </connection> | ||
| 117 | + <connection> | ||
| 118 | + <name>bus_control_variable</name> | ||
| 119 | + <server>${v_db_ip}</server> | ||
| 120 | + <type>MYSQL</type> | ||
| 121 | + <access>Native</access> | ||
| 122 | + <database>${v_db_dname}</database> | ||
| 123 | + <port>3306</port> | ||
| 124 | + <username>${v_db_uname}</username> | ||
| 125 | + <password>${v_db_pwd}</password> | ||
| 126 | + <servername/> | ||
| 127 | + <data_tablespace/> | ||
| 128 | + <index_tablespace/> | ||
| 129 | + <attributes> | ||
| 130 | + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute> | ||
| 131 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 132 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 133 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 134 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 135 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 136 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 137 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 138 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 139 | + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | ||
| 140 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 141 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 142 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 143 | + </attributes> | ||
| 144 | + </connection> | ||
| 145 | + <connection> | ||
| 146 | + <name>bus_control_公司_201</name> | ||
| 147 | + <server>localhost</server> | ||
| 148 | + <type>MYSQL</type> | ||
| 149 | + <access>Native</access> | ||
| 150 | + <database>control</database> | ||
| 151 | + <port>3306</port> | ||
| 152 | + <username>root</username> | ||
| 153 | + <password>Encrypted </password> | ||
| 154 | + <servername/> | ||
| 155 | + <data_tablespace/> | ||
| 156 | + <index_tablespace/> | ||
| 157 | + <attributes> | ||
| 158 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 159 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 160 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 161 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 162 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 163 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 164 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 165 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 166 | + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute> | ||
| 167 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 168 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 169 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 170 | + </attributes> | ||
| 171 | + </connection> | ||
| 172 | + <connection> | ||
| 173 | + <name>bus_control_本机</name> | ||
| 174 | + <server>localhost</server> | ||
| 175 | + <type>MYSQL</type> | ||
| 176 | + <access>Native</access> | ||
| 177 | + <database>control</database> | ||
| 178 | + <port>3306</port> | ||
| 179 | + <username>root</username> | ||
| 180 | + <password>Encrypted </password> | ||
| 181 | + <servername/> | ||
| 182 | + <data_tablespace/> | ||
| 183 | + <index_tablespace/> | ||
| 184 | + <attributes> | ||
| 185 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 186 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 187 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 188 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 189 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 190 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 191 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 192 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 193 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 194 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 195 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 196 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 197 | + </attributes> | ||
| 198 | + </connection> | ||
| 199 | + <connection> | ||
| 200 | + <name>JGJW_VM</name> | ||
| 201 | + <server>192.168.198.240</server> | ||
| 202 | + <type>ORACLE</type> | ||
| 203 | + <access>Native</access> | ||
| 204 | + <database>orcl</database> | ||
| 205 | + <port>1521</port> | ||
| 206 | + <username>jwgl</username> | ||
| 207 | + <password>Encrypted 2be98afc86aa7f2e4cb79ce10d485a8d6</password> | ||
| 208 | + <servername/> | ||
| 209 | + <data_tablespace/> | ||
| 210 | + <index_tablespace/> | ||
| 211 | + <attributes> | ||
| 212 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 213 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 214 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 215 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 216 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 217 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 218 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 219 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 220 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 221 | + </attributes> | ||
| 222 | + </connection> | ||
| 223 | + <connection> | ||
| 224 | + <name>NHJW_VM</name> | ||
| 225 | + <server>192.168.198.240</server> | ||
| 226 | + <type>ORACLE</type> | ||
| 227 | + <access>Native</access> | ||
| 228 | + <database>orcl</database> | ||
| 229 | + <port>1521</port> | ||
| 230 | + <username>nhjw</username> | ||
| 231 | + <password>Encrypted 2be98afc86aa7f2e4cb79ce10d09aa5cd</password> | ||
| 232 | + <servername/> | ||
| 233 | + <data_tablespace/> | ||
| 234 | + <index_tablespace/> | ||
| 235 | + <attributes> | ||
| 236 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 237 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 238 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 239 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 240 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 241 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 242 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 243 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 244 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 245 | + </attributes> | ||
| 246 | + </connection> | ||
| 247 | + <connection> | ||
| 248 | + <name>PDGJ_VM</name> | ||
| 249 | + <server>192.168.198.240</server> | ||
| 250 | + <type>ORACLE</type> | ||
| 251 | + <access>Native</access> | ||
| 252 | + <database>orcl</database> | ||
| 253 | + <port>1521</port> | ||
| 254 | + <username>pdgj</username> | ||
| 255 | + <password>Encrypted 2be98afc86aa7f2e4cb79ce10ce96a8d0</password> | ||
| 256 | + <servername/> | ||
| 257 | + <data_tablespace/> | ||
| 258 | + <index_tablespace/> | ||
| 259 | + <attributes> | ||
| 260 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 261 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 262 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 263 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 264 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 265 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 266 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 267 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 268 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 269 | + </attributes> | ||
| 270 | + </connection> | ||
| 271 | + <connection> | ||
| 272 | + <name>SNJW_VM</name> | ||
| 273 | + <server>192.168.198.240</server> | ||
| 274 | + <type>ORACLE</type> | ||
| 275 | + <access>Native</access> | ||
| 276 | + <database>orcl</database> | ||
| 277 | + <port>1521</port> | ||
| 278 | + <username>snjw</username> | ||
| 279 | + <password>Encrypted 2be98afc86aa7f2e4cb79ce10cd9ca5cd</password> | ||
| 280 | + <servername/> | ||
| 281 | + <data_tablespace/> | ||
| 282 | + <index_tablespace/> | ||
| 283 | + <attributes> | ||
| 284 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 285 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 286 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 287 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 288 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 289 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 290 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 291 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 292 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 293 | + </attributes> | ||
| 294 | + </connection> | ||
| 295 | + <connection> | ||
| 296 | + <name>xlab_mysql_youle</name> | ||
| 297 | + <server>101.231.124.8</server> | ||
| 298 | + <type>MYSQL</type> | ||
| 299 | + <access>Native</access> | ||
| 300 | + <database>xlab_youle</database> | ||
| 301 | + <port>45687</port> | ||
| 302 | + <username>xlab-youle</username> | ||
| 303 | + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password> | ||
| 304 | + <servername/> | ||
| 305 | + <data_tablespace/> | ||
| 306 | + <index_tablespace/> | ||
| 307 | + <attributes> | ||
| 308 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 309 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 310 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 311 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 312 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 313 | + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute> | ||
| 314 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 315 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 316 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 317 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 318 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 319 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 320 | + </attributes> | ||
| 321 | + </connection> | ||
| 322 | + <connection> | ||
| 323 | + <name>xlab_mysql_youle(本机)</name> | ||
| 324 | + <server>localhost</server> | ||
| 325 | + <type>MYSQL</type> | ||
| 326 | + <access>Native</access> | ||
| 327 | + <database>xlab_youle</database> | ||
| 328 | + <port>3306</port> | ||
| 329 | + <username>root</username> | ||
| 330 | + <password>Encrypted </password> | ||
| 331 | + <servername/> | ||
| 332 | + <data_tablespace/> | ||
| 333 | + <index_tablespace/> | ||
| 334 | + <attributes> | ||
| 335 | + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute> | ||
| 336 | + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute> | ||
| 337 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 338 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 339 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 340 | + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute> | ||
| 341 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 342 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 343 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 344 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 345 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute> | ||
| 346 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 347 | + </attributes> | ||
| 348 | + </connection> | ||
| 349 | + <connection> | ||
| 350 | + <name>xlab_youle</name> | ||
| 351 | + <server/> | ||
| 352 | + <type>MYSQL</type> | ||
| 353 | + <access>JNDI</access> | ||
| 354 | + <database>xlab_youle</database> | ||
| 355 | + <port>1521</port> | ||
| 356 | + <username/> | ||
| 357 | + <password>Encrypted </password> | ||
| 358 | + <servername/> | ||
| 359 | + <data_tablespace/> | ||
| 360 | + <index_tablespace/> | ||
| 361 | + <attributes> | ||
| 362 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 363 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 364 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 365 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 366 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 367 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 368 | + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute> | ||
| 369 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 370 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 371 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 372 | + </attributes> | ||
| 373 | + </connection> | ||
| 374 | + <connection> | ||
| 375 | + <name>YGJW_VM</name> | ||
| 376 | + <server>192.168.198.240</server> | ||
| 377 | + <type>ORACLE</type> | ||
| 378 | + <access>Native</access> | ||
| 379 | + <database>orcl</database> | ||
| 380 | + <port>1521</port> | ||
| 381 | + <username>ygjw</username> | ||
| 382 | + <password>Encrypted 2be98afc86aa7f2e4cb79ce10c795a5cd</password> | ||
| 383 | + <servername/> | ||
| 384 | + <data_tablespace/> | ||
| 385 | + <index_tablespace/> | ||
| 386 | + <attributes> | ||
| 387 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 388 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 389 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 390 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 391 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 392 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 393 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 394 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 395 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 396 | + </attributes> | ||
| 397 | + </connection> | ||
| 398 | + <connection> | ||
| 399 | + <name>公司jgjw</name> | ||
| 400 | + <server>192.168.168.1</server> | ||
| 401 | + <type>ORACLE</type> | ||
| 402 | + <access>Native</access> | ||
| 403 | + <database>orcl</database> | ||
| 404 | + <port>1521</port> | ||
| 405 | + <username>jwgl</username> | ||
| 406 | + <password>Encrypted 2be98afc86aa7f2e4cb79ce10d485a8d6</password> | ||
| 407 | + <servername/> | ||
| 408 | + <data_tablespace/> | ||
| 409 | + <index_tablespace/> | ||
| 410 | + <attributes> | ||
| 411 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 412 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 413 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 414 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 415 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 416 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 417 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 418 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 419 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 420 | + </attributes> | ||
| 421 | + </connection> | ||
| 422 | + <connection> | ||
| 423 | + <name>公司snjw</name> | ||
| 424 | + <server>192.168.168.1</server> | ||
| 425 | + <type>ORACLE</type> | ||
| 426 | + <access>Native</access> | ||
| 427 | + <database>orcl</database> | ||
| 428 | + <port>1521</port> | ||
| 429 | + <username>snjw</username> | ||
| 430 | + <password>Encrypted 2be98afc86aa7f2e4cb79ce10cd9ca5cd</password> | ||
| 431 | + <servername/> | ||
| 432 | + <data_tablespace/> | ||
| 433 | + <index_tablespace/> | ||
| 434 | + <attributes> | ||
| 435 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 436 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 437 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 438 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 439 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 440 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 441 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 442 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 443 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 444 | + </attributes> | ||
| 445 | + </connection> | ||
| 446 | + <connection> | ||
| 447 | + <name>公司ygjw</name> | ||
| 448 | + <server>192.168.168.1</server> | ||
| 449 | + <type>ORACLE</type> | ||
| 450 | + <access>Native</access> | ||
| 451 | + <database>orcl</database> | ||
| 452 | + <port>1521</port> | ||
| 453 | + <username>ygjw</username> | ||
| 454 | + <password>Encrypted 2be98afc86aa7f2e4cb79ce10c795a5cd</password> | ||
| 455 | + <servername/> | ||
| 456 | + <data_tablespace/> | ||
| 457 | + <index_tablespace/> | ||
| 458 | + <attributes> | ||
| 459 | + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute> | ||
| 460 | + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute> | ||
| 461 | + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute> | ||
| 462 | + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute> | ||
| 463 | + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute> | ||
| 464 | + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute> | ||
| 465 | + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 466 | + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute> | ||
| 467 | + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute> | ||
| 468 | + </attributes> | ||
| 469 | + </connection> | ||
| 470 | + <order> | ||
| 471 | + <hop> <from>公司查询</from><to>分公司查询</to><enabled>Y</enabled> </hop> | ||
| 472 | + <hop> <from>分公司查询</from><to>字段选择</to><enabled>Y</enabled> </hop> | ||
| 473 | + <hop> <from>添加查询常量</from><to>公司查询</to><enabled>Y</enabled> </hop> | ||
| 474 | + <hop> <from>车辆信息表输入</from><to>添加查询常量</to><enabled>Y</enabled> </hop> | ||
| 475 | + <hop> <from>字段选择</from><to>是否电车</to><enabled>Y</enabled> </hop> | ||
| 476 | + <hop> <from>是否电车</from><to>Excel输出</to><enabled>Y</enabled> </hop> | ||
| 477 | + </order> | ||
| 478 | + <step> | ||
| 479 | + <name>Excel输出</name> | ||
| 480 | + <type>ExcelOutput</type> | ||
| 481 | + <description/> | ||
| 482 | + <distribute>Y</distribute> | ||
| 483 | + <custom_distribution/> | ||
| 484 | + <copies>1</copies> | ||
| 485 | + <partitioning> | ||
| 486 | + <method>none</method> | ||
| 487 | + <schema_name/> | ||
| 488 | + </partitioning> | ||
| 489 | + <header>Y</header> | ||
| 490 | + <footer>N</footer> | ||
| 491 | + <encoding/> | ||
| 492 | + <append>N</append> | ||
| 493 | + <add_to_result_filenames>Y</add_to_result_filenames> | ||
| 494 | + <file> | ||
| 495 | + <name>${filepath}</name> | ||
| 496 | + <extention>xls</extention> | ||
| 497 | + <do_not_open_newfile_init>N</do_not_open_newfile_init> | ||
| 498 | + <create_parent_folder>N</create_parent_folder> | ||
| 499 | + <split>N</split> | ||
| 500 | + <add_date>N</add_date> | ||
| 501 | + <add_time>N</add_time> | ||
| 502 | + <SpecifyFormat>N</SpecifyFormat> | ||
| 503 | + <date_time_format>yyyyMMddHHmmss</date_time_format> | ||
| 504 | + <sheetname>工作表1</sheetname> | ||
| 505 | + <autosizecolums>N</autosizecolums> | ||
| 506 | + <nullisblank>N</nullisblank> | ||
| 507 | + <protect_sheet>N</protect_sheet> | ||
| 508 | + <password>Encrypted </password> | ||
| 509 | + <splitevery>0</splitevery> | ||
| 510 | + <usetempfiles>N</usetempfiles> | ||
| 511 | + <tempdirectory/> | ||
| 512 | + </file> | ||
| 513 | + <template> | ||
| 514 | + <enabled>N</enabled> | ||
| 515 | + <append>N</append> | ||
| 516 | + <filename>template.xls</filename> | ||
| 517 | + </template> | ||
| 518 | + <fields> | ||
| 519 | + <field> | ||
| 520 | + <name>车牌号</name> | ||
| 521 | + <type>String</type> | ||
| 522 | + <format/> | ||
| 523 | + </field> | ||
| 524 | + <field> | ||
| 525 | + <name>内部编码</name> | ||
| 526 | + <type>String</type> | ||
| 527 | + <format/> | ||
| 528 | + </field> | ||
| 529 | + <field> | ||
| 530 | + <name>所属公司</name> | ||
| 531 | + <type>String</type> | ||
| 532 | + <format/> | ||
| 533 | + </field> | ||
| 534 | + <field> | ||
| 535 | + <name>所属分公司</name> | ||
| 536 | + <type>String</type> | ||
| 537 | + <format/> | ||
| 538 | + </field> | ||
| 539 | + <field> | ||
| 540 | + <name>设备供应厂商</name> | ||
| 541 | + <type>String</type> | ||
| 542 | + <format/> | ||
| 543 | + </field> | ||
| 544 | + <field> | ||
| 545 | + <name>设备终端号</name> | ||
| 546 | + <type>String</type> | ||
| 547 | + <format/> | ||
| 548 | + </field> | ||
| 549 | + <field> | ||
| 550 | + <name>是否电车</name> | ||
| 551 | + <type>String</type> | ||
| 552 | + <format/> | ||
| 553 | + </field> | ||
| 554 | + </fields> | ||
| 555 | + <custom> | ||
| 556 | + <header_font_name>arial</header_font_name> | ||
| 557 | + <header_font_size>10</header_font_size> | ||
| 558 | + <header_font_bold>N</header_font_bold> | ||
| 559 | + <header_font_italic>N</header_font_italic> | ||
| 560 | + <header_font_underline>no</header_font_underline> | ||
| 561 | + <header_font_orientation>horizontal</header_font_orientation> | ||
| 562 | + <header_font_color>black</header_font_color> | ||
| 563 | + <header_background_color>none</header_background_color> | ||
| 564 | + <header_row_height>255</header_row_height> | ||
| 565 | + <header_alignment>left</header_alignment> | ||
| 566 | + <header_image/> | ||
| 567 | + <row_font_name>arial</row_font_name> | ||
| 568 | + <row_font_size>10</row_font_size> | ||
| 569 | + <row_font_color>black</row_font_color> | ||
| 570 | + <row_background_color>none</row_background_color> | ||
| 571 | + </custom> | ||
| 572 | + <cluster_schema/> | ||
| 573 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 574 | + <xloc>498</xloc> | ||
| 575 | + <yloc>348</yloc> | ||
| 576 | + <draw>Y</draw> | ||
| 577 | + </GUI> | ||
| 578 | + </step> | ||
| 579 | + | ||
| 580 | + <step> | ||
| 581 | + <name>公司查询</name> | ||
| 582 | + <type>DBLookup</type> | ||
| 583 | + <description/> | ||
| 584 | + <distribute>Y</distribute> | ||
| 585 | + <custom_distribution/> | ||
| 586 | + <copies>1</copies> | ||
| 587 | + <partitioning> | ||
| 588 | + <method>none</method> | ||
| 589 | + <schema_name/> | ||
| 590 | + </partitioning> | ||
| 591 | + <connection>bus_control_variable</connection> | ||
| 592 | + <cache>N</cache> | ||
| 593 | + <cache_load_all>N</cache_load_all> | ||
| 594 | + <cache_size>0</cache_size> | ||
| 595 | + <lookup> | ||
| 596 | + <schema/> | ||
| 597 | + <table>bsth_c_business</table> | ||
| 598 | + <orderby/> | ||
| 599 | + <fail_on_multiple>N</fail_on_multiple> | ||
| 600 | + <eat_row_on_failure>N</eat_row_on_failure> | ||
| 601 | + <key> | ||
| 602 | + <name>up_code</name> | ||
| 603 | + <field>up_code</field> | ||
| 604 | + <condition>=</condition> | ||
| 605 | + <name2/> | ||
| 606 | + </key> | ||
| 607 | + <key> | ||
| 608 | + <name>business_code</name> | ||
| 609 | + <field>business_code</field> | ||
| 610 | + <condition>=</condition> | ||
| 611 | + <name2/> | ||
| 612 | + </key> | ||
| 613 | + <value> | ||
| 614 | + <name>business_name</name> | ||
| 615 | + <rename>gs</rename> | ||
| 616 | + <default/> | ||
| 617 | + <type>String</type> | ||
| 618 | + </value> | ||
| 619 | + </lookup> | ||
| 620 | + <cluster_schema/> | ||
| 621 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 622 | + <xloc>364</xloc> | ||
| 623 | + <yloc>60</yloc> | ||
| 624 | + <draw>Y</draw> | ||
| 625 | + </GUI> | ||
| 626 | + </step> | ||
| 627 | + | ||
| 628 | + <step> | ||
| 629 | + <name>分公司查询</name> | ||
| 630 | + <type>DBLookup</type> | ||
| 631 | + <description/> | ||
| 632 | + <distribute>Y</distribute> | ||
| 633 | + <custom_distribution/> | ||
| 634 | + <copies>1</copies> | ||
| 635 | + <partitioning> | ||
| 636 | + <method>none</method> | ||
| 637 | + <schema_name/> | ||
| 638 | + </partitioning> | ||
| 639 | + <connection>bus_control_variable</connection> | ||
| 640 | + <cache>N</cache> | ||
| 641 | + <cache_load_all>N</cache_load_all> | ||
| 642 | + <cache_size>0</cache_size> | ||
| 643 | + <lookup> | ||
| 644 | + <schema/> | ||
| 645 | + <table>bsth_c_business</table> | ||
| 646 | + <orderby/> | ||
| 647 | + <fail_on_multiple>N</fail_on_multiple> | ||
| 648 | + <eat_row_on_failure>N</eat_row_on_failure> | ||
| 649 | + <key> | ||
| 650 | + <name>business_code</name> | ||
| 651 | + <field>up_code</field> | ||
| 652 | + <condition>=</condition> | ||
| 653 | + <name2/> | ||
| 654 | + </key> | ||
| 655 | + <key> | ||
| 656 | + <name>branche_company_code</name> | ||
| 657 | + <field>business_code</field> | ||
| 658 | + <condition>=</condition> | ||
| 659 | + <name2/> | ||
| 660 | + </key> | ||
| 661 | + <value> | ||
| 662 | + <name>business_name</name> | ||
| 663 | + <rename>fgs</rename> | ||
| 664 | + <default/> | ||
| 665 | + <type>String</type> | ||
| 666 | + </value> | ||
| 667 | + </lookup> | ||
| 668 | + <cluster_schema/> | ||
| 669 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 670 | + <xloc>491</xloc> | ||
| 671 | + <yloc>60</yloc> | ||
| 672 | + <draw>Y</draw> | ||
| 673 | + </GUI> | ||
| 674 | + </step> | ||
| 675 | + | ||
| 676 | + <step> | ||
| 677 | + <name>字段选择</name> | ||
| 678 | + <type>SelectValues</type> | ||
| 679 | + <description/> | ||
| 680 | + <distribute>N</distribute> | ||
| 681 | + <custom_distribution/> | ||
| 682 | + <copies>1</copies> | ||
| 683 | + <partitioning> | ||
| 684 | + <method>none</method> | ||
| 685 | + <schema_name/> | ||
| 686 | + </partitioning> | ||
| 687 | + <fields> <field> <name>car_plate</name> | ||
| 688 | + <rename>车牌号</rename> | ||
| 689 | + <length>-2</length> | ||
| 690 | + <precision>-2</precision> | ||
| 691 | + </field> <field> <name>inside_code</name> | ||
| 692 | + <rename>内部编码</rename> | ||
| 693 | + <length>-2</length> | ||
| 694 | + <precision>-2</precision> | ||
| 695 | + </field> <field> <name>gs</name> | ||
| 696 | + <rename>所属公司</rename> | ||
| 697 | + <length>-2</length> | ||
| 698 | + <precision>-2</precision> | ||
| 699 | + </field> <field> <name>fgs</name> | ||
| 700 | + <rename>所属分公司</rename> | ||
| 701 | + <length>-2</length> | ||
| 702 | + <precision>-2</precision> | ||
| 703 | + </field> <field> <name>supplier_name</name> | ||
| 704 | + <rename>设备供应厂商</rename> | ||
| 705 | + <length>-2</length> | ||
| 706 | + <precision>-2</precision> | ||
| 707 | + </field> <field> <name>equipment_code</name> | ||
| 708 | + <rename>设备终端号</rename> | ||
| 709 | + <length>-2</length> | ||
| 710 | + <precision>-2</precision> | ||
| 711 | + </field> <field> <name>sfdc</name> | ||
| 712 | + <rename>sfdc_cal</rename> | ||
| 713 | + <length>-2</length> | ||
| 714 | + <precision>-2</precision> | ||
| 715 | + </field> <select_unspecified>N</select_unspecified> | ||
| 716 | + </fields> <cluster_schema/> | ||
| 717 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 718 | + <xloc>495</xloc> | ||
| 719 | + <yloc>173</yloc> | ||
| 720 | + <draw>Y</draw> | ||
| 721 | + </GUI> | ||
| 722 | + </step> | ||
| 723 | + | ||
| 724 | + <step> | ||
| 725 | + <name>是否电车</name> | ||
| 726 | + <type>ScriptValueMod</type> | ||
| 727 | + <description/> | ||
| 728 | + <distribute>Y</distribute> | ||
| 729 | + <custom_distribution/> | ||
| 730 | + <copies>1</copies> | ||
| 731 | + <partitioning> | ||
| 732 | + <method>none</method> | ||
| 733 | + <schema_name/> | ||
| 734 | + </partitioning> | ||
| 735 | + <compatible>N</compatible> | ||
| 736 | + <optimizationLevel>9</optimizationLevel> | ||
| 737 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | ||
| 738 | + <jsScript_name>Script 1</jsScript_name> | ||
| 739 | + <jsScript_script>//Script here

var 是否电车 = "否";

if(sfdc_cal == 0) {
 是否电车 = "否";
} else if (sfdc_cal == 1) {
 是否电车 = "是";
} else {
 是否电车 = "否";
}
</jsScript_script> | ||
| 740 | + </jsScript> </jsScripts> <fields> <field> <name>是否电车</name> | ||
| 741 | + <rename>是否电车</rename> | ||
| 742 | + <type>String</type> | ||
| 743 | + <length>-1</length> | ||
| 744 | + <precision>-1</precision> | ||
| 745 | + <replace>N</replace> | ||
| 746 | + </field> </fields> <cluster_schema/> | ||
| 747 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 748 | + <xloc>695</xloc> | ||
| 749 | + <yloc>173</yloc> | ||
| 750 | + <draw>Y</draw> | ||
| 751 | + </GUI> | ||
| 752 | + </step> | ||
| 753 | + | ||
| 754 | + <step> | ||
| 755 | + <name>添加查询常量</name> | ||
| 756 | + <type>ScriptValueMod</type> | ||
| 757 | + <description/> | ||
| 758 | + <distribute>Y</distribute> | ||
| 759 | + <custom_distribution/> | ||
| 760 | + <copies>1</copies> | ||
| 761 | + <partitioning> | ||
| 762 | + <method>none</method> | ||
| 763 | + <schema_name/> | ||
| 764 | + </partitioning> | ||
| 765 | + <compatible>N</compatible> | ||
| 766 | + <optimizationLevel>9</optimizationLevel> | ||
| 767 | + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type> | ||
| 768 | + <jsScript_name>Script 1</jsScript_name> | ||
| 769 | + <jsScript_script>//Script here

var up_code = '88';</jsScript_script> | ||
| 770 | + </jsScript> </jsScripts> <fields> <field> <name>up_code</name> | ||
| 771 | + <rename>up_code</rename> | ||
| 772 | + <type>String</type> | ||
| 773 | + <length>-1</length> | ||
| 774 | + <precision>-1</precision> | ||
| 775 | + <replace>N</replace> | ||
| 776 | + </field> </fields> <cluster_schema/> | ||
| 777 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 778 | + <xloc>227</xloc> | ||
| 779 | + <yloc>59</yloc> | ||
| 780 | + <draw>Y</draw> | ||
| 781 | + </GUI> | ||
| 782 | + </step> | ||
| 783 | + | ||
| 784 | + <step> | ||
| 785 | + <name>车辆信息表输入</name> | ||
| 786 | + <type>TableInput</type> | ||
| 787 | + <description/> | ||
| 788 | + <distribute>Y</distribute> | ||
| 789 | + <custom_distribution/> | ||
| 790 | + <copies>1</copies> | ||
| 791 | + <partitioning> | ||
| 792 | + <method>none</method> | ||
| 793 | + <schema_name/> | ||
| 794 | + </partitioning> | ||
| 795 | + <connection>bus_control_variable</connection> | ||
| 796 | + <sql>SELECT * FROM bsth_c_cars
where ${QUERY}</sql> | ||
| 797 | + <limit>0</limit> | ||
| 798 | + <lookup/> | ||
| 799 | + <execute_each_row>N</execute_each_row> | ||
| 800 | + <variables_active>Y</variables_active> | ||
| 801 | + <lazy_conversion_active>N</lazy_conversion_active> | ||
| 802 | + <cluster_schema/> | ||
| 803 | + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI> | ||
| 804 | + <xloc>88</xloc> | ||
| 805 | + <yloc>59</yloc> | ||
| 806 | + <draw>Y</draw> | ||
| 807 | + </GUI> | ||
| 808 | + </step> | ||
| 809 | + | ||
| 810 | + <step_error_handling> | ||
| 811 | + </step_error_handling> | ||
| 812 | + <slave-step-copy-partition-distribution> | ||
| 813 | +</slave-step-copy-partition-distribution> | ||
| 814 | + <slave_transformation>N</slave_transformation> | ||
| 815 | + | ||
| 816 | +</transformation> |
src/main/resources/rules/functions.drl deleted
100644 → 0
| 1 | -package com.bsth.service.schedule; | ||
| 2 | - | ||
| 3 | -import accumulate com.bsth.service.schedule.rules.ttinfo2.ErrorBcCountFunction ecount; | ||
| 4 | -import accumulate com.bsth.service.schedule.rules.shiftloop.GidsCountFunction gidscount; | ||
| 5 | -import accumulate com.bsth.service.schedule.rules.shiftloop.GidFbTimeFunction gidfbtime; | ||
| 6 | -import accumulate com.bsth.service.schedule.rules.shiftloop.GidFbFcnoFunction gidfbfcno; | ||
| 7 | -import accumulate com.bsth.service.schedule.rules.ttinfo.LpInfoResultsFunction lpinforesult; | ||
| 8 | -import accumulate com.bsth.service.schedule.rules.ttinfo.MinRuleQyrqFunction minruleqyrq; | ||
| 9 | -import accumulate com.bsth.service.schedule.rules.validate.ValidRepeatBcFunction vrb; | ||
| 10 | -import accumulate com.bsth.service.schedule.rules.validate.ValidWholeRerunBcFunction vwrb; | ||
| 11 | -import accumulate com.bsth.service.schedule.rules.validate.ValidWantLpFunction vwlp; |
src/main/resources/rules/kBase1_core_functions.drl
0 → 100644
| 1 | +package com.bsth.service.schedule.impl.plan.kBase1.core; | ||
| 2 | + | ||
| 3 | +import accumulate com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop.GidsCountFunction gidscount; | ||
| 4 | +import accumulate com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop.GidFbTimeFunction gidfbtime; | ||
| 5 | +import accumulate com.bsth.service.schedule.impl.plan.kBase1.core.shiftloop.GidFbFcnoFunction gidfbfcno; | ||
| 6 | +import accumulate com.bsth.service.schedule.impl.plan.kBase1.core.ttinfo.LpInfoResultsFunction lpinforesult; | ||
| 7 | +import accumulate com.bsth.service.schedule.impl.plan.kBase1.core.ttinfo.MinRuleQyrqFunction minruleqyrq; | ||
| 8 | +import accumulate com.bsth.service.schedule.impl.plan.kBase1.core.validate.ValidRepeatBcFunction vrb; | ||
| 9 | +import accumulate com.bsth.service.schedule.impl.plan.kBase1.core.validate.ValidWholeRerunBcFunction vwrb; | ||
| 10 | +import accumulate com.bsth.service.schedule.impl.plan.kBase1.core.validate.ValidWantLpFunction vwlp; |