Commit b3c2f0b9b8a4d79b3952e2066e258b967e6db90c

Authored by 潘钊
2 parents 21c07f5a 7eaee329

Merge branch 'minhang' into qingpu

Showing 30 changed files with 1954 additions and 1060 deletions

Too many changes to show.

To preserve performance only 30 of 111 files are displayed.

... ... @@ -220,11 +220,11 @@
220 220 <version>1.1</version>
221 221 </dependency>
222 222  
223   - <dependency>
  223 +<!-- <dependency>
224 224 <groupId>org.springframework.boot</groupId>
225 225 <artifactId>spring-boot-devtools</artifactId>
226 226 <optional>true</optional>
227   - </dependency>
  227 + </dependency>-->
228 228 </dependencies>
229 229  
230 230 <dependencyManagement>
... ...
src/main/java/com/bsth/common/Constants.java
... ... @@ -24,8 +24,9 @@ public class Constants {
24 24 /**
25 25 * 线调部分子页面不做拦截,便于浏览器缓存
26 26 */
27   - public static final String XD_CHILD_PAGES = "/real_control_v2/**";
28   - public static final String XD_TEMPS = "/pages/control/line/temps/**";
  27 + public static final String XD_CHILD_PAGES = "/real_control_v2/**";
  28 + public static final String XD_REAL_GPS = "/gps/real/line";
  29 + //public static final String XD_TEMPS = "/pages/control/line/temps/**";
29 30  
30 31 //车载网关上行接口
31 32 public static final String UPSTREAM_URL = "/control/upstream";
... ...
src/main/java/com/bsth/controller/forms/ExportController.java 0 → 100644
  1 +package com.bsth.controller.forms;
  2 +
  3 +import java.text.SimpleDateFormat;
  4 +import java.util.ArrayList;
  5 +import java.util.HashMap;
  6 +import java.util.Iterator;
  7 +import java.util.List;
  8 +import java.util.Map;
  9 +
  10 +import org.springframework.beans.factory.annotation.Autowired;
  11 +import org.springframework.web.bind.annotation.RequestMapping;
  12 +import org.springframework.web.bind.annotation.RequestMethod;
  13 +import org.springframework.web.bind.annotation.RequestParam;
  14 +import org.springframework.web.bind.annotation.RestController;
  15 +
  16 +import com.bsth.entity.mcy_forms.Linepasswengerflow;
  17 +import com.bsth.entity.mcy_forms.Operationservice;
  18 +import com.bsth.entity.mcy_forms.Shifday;
  19 +import com.bsth.entity.mcy_forms.Shiftuehiclemanth;
  20 +import com.bsth.entity.mcy_forms.Singledata;
  21 +import com.bsth.entity.mcy_forms.Vehicleloading;
  22 +import com.bsth.entity.mcy_forms.Waybillday;
  23 +import com.bsth.service.forms.ExportService;
  24 +import com.bsth.service.forms.FormsService;
  25 +import com.bsth.util.ReportUtils;
  26 +
  27 +@RestController
  28 +@RequestMapping("mcy_export")
  29 +public class ExportController {
  30 +
  31 + @Autowired
  32 + FormsService formsService;
  33 +
  34 + @Autowired
  35 + ExportService exportService;
  36 +
  37 + //行车路单日报表
  38 + @RequestMapping(value = "/waybilldayExport",method = RequestMethod.POST)
  39 + public List<Waybillday> waybilldayExport(@RequestParam Map<String, Object> map){
  40 + List<Waybillday> waybillday = formsService.waybillday(map);
  41 + exportService.waybillday(map.get("date").toString(), waybillday);
  42 + return waybillday;
  43 + }
  44 +
  45 +
  46 + //线路客流量报表
  47 + @RequestMapping(value = "/linepasswengerflowExport",method = RequestMethod.POST)
  48 + public List<Map<String, Object>> linepasswengerflowExport(@RequestParam Map<String, Object> map){
  49 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  50 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  51 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  52 + ReportUtils ee = new ReportUtils();
  53 + List<Linepasswengerflow> linepasswengerflow = formsService.linepasswengerflow(map);
  54 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  55 + int i=1;
  56 + for(Linepasswengerflow l : linepasswengerflow){
  57 + Map<String, Object> m = new HashMap<String, Object>();
  58 + m.put("i", i);
  59 + m.put("stationName", l.getStationName());
  60 + m.put("1", " ");
  61 + m.put("2", " ");
  62 + resList.add(m);
  63 + i++;
  64 + }
  65 +
  66 + try {
  67 + listI.add(resList.iterator());
  68 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  69 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\linepassengerflow.xls",
  70 + path+"export\\线路客流量报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");
  71 + } catch (Exception e) {
  72 + e.printStackTrace();
  73 + }
  74 + return resList;
  75 + }
  76 +
  77 +
  78 +
  79 + //班次车辆人员日统计
  80 + @RequestMapping(value = "/shifdayExport",method = RequestMethod.POST)
  81 + public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map){
  82 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  83 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  84 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  85 + ReportUtils ee = new ReportUtils();
  86 + List<Shifday> shifday = formsService.shifday(map);
  87 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  88 + for(Shifday l : shifday){
  89 + Map<String, Object> m = new HashMap<String, Object>();
  90 + m.put("jName",l.getjName());
  91 + m.put("sName", l.getsName());
  92 + m.put("lpName", l.getLpName());
  93 + m.put("carPlate", l.getCarPlate());
  94 + m.put("jhlc", l.getJhlc());
  95 + //m.put("sjjhlc", l.getSjjhlc());
  96 + m.put("yygl", l.getYygl());
  97 + m.put("emptMileage", l.getEmptMileage());
  98 + m.put("remMileage", l.getRemMileage());
  99 + m.put("addMileage", l.getAddMileage());
  100 + m.put("totalm", l.getTotalm());
  101 + m.put("jhbc", l.getJhbc());
  102 + //m.put("sjjhbc", l.getSjjhbc());
  103 + m.put("cjbc", l.getCjbc());
  104 + m.put("ljbc", l.getLjbc());
  105 + m.put("sjbc", l.getSjbc());
  106 + resList.add(m);
  107 + }
  108 +
  109 + try {
  110 + listI.add(resList.iterator());
  111 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  112 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\shifday.xls",
  113 + path+"export\\班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");
  114 + } catch (Exception e) {
  115 + e.printStackTrace();
  116 + }
  117 + return resList;
  118 + }
  119 +
  120 + //班次车辆人员月统计
  121 + @RequestMapping(value = "/shiftuehiclemanthExport",method = RequestMethod.POST)
  122 + public List<Map<String, Object>> shiftuehiclemanthExport(@RequestParam Map<String, Object> map){
  123 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  124 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  125 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  126 + ReportUtils ee = new ReportUtils();
  127 + List<Shiftuehiclemanth> shiftuehiclemanth = formsService.shiftuehiclemanth(map);
  128 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  129 + int i=1;
  130 + for(Shiftuehiclemanth l : shiftuehiclemanth){
  131 + Map<String, Object> m = new HashMap<String, Object>();
  132 + m.put("i", i);
  133 + m.put("jName",l.getjName() );
  134 + m.put("jhlc", l.getJhlc());
  135 + m.put("emptMileage",l.getEmptMileage() );
  136 + m.put("remMileage", l.getRemMileage());
  137 + m.put("addMileage", l.getAddMileage());
  138 + m.put("totalm", l.getTotalm());
  139 + m.put("cjbc", l.getCjbc());
  140 + m.put("ljbc", l.getLjbc());
  141 + m.put("sjbc", l.getSjbc());
  142 + resList.add(m);
  143 + i++;
  144 + }
  145 +
  146 + try {
  147 + listI.add(resList.iterator());
  148 +
  149 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  150 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\shiftuehiclemanth.xls",
  151 + path+"export\\班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  152 +
  153 + } catch (Exception e) {
  154 + e.printStackTrace();
  155 + }
  156 +
  157 + return resList;
  158 + }
  159 +
  160 +
  161 + //路单数据报表
  162 + @RequestMapping(value = "/singledataExport",method = RequestMethod.POST)
  163 + public List<Map<String, Object>> singledataExport(@RequestParam Map<String, Object> map){
  164 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  165 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  166 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  167 + ReportUtils ee = new ReportUtils();
  168 + List<Singledata> singledata = formsService.singledata(map);
  169 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  170 + int i=1;
  171 + for(Singledata l : singledata){
  172 + Map<String, Object> m = new HashMap<String, Object>();
  173 + m.put("i", i);
  174 + m.put("rQ",l.getrQ());
  175 + m.put("gS", l.getgS());
  176 + m.put("xL",l.getxL() );
  177 + m.put("clzbh", l.getClzbh());
  178 + m.put("jsy", l.getJsy());
  179 + m.put("jName", l.getjName());
  180 + m.put("sgh", l.getSgh());
  181 + m.put("sName", l.getsName());
  182 + m.put("jhlc", l.getJhlc());
  183 + m.put("emptMileage", l.getEmptMileage());
  184 + m.put("hyl", l.getHyl());
  185 + m.put("jzl", l.getJzl());
  186 + m.put("unyyyl",l.getUnyyyl());
  187 + m.put("jhjl", l.getJhjl());
  188 + resList.add(m);
  189 + i++;
  190 + }
  191 +
  192 + try {
  193 + listI.add(resList.iterator());
  194 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  195 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\singledata.xls",
  196 + path+"export\\路单报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  197 + } catch (Exception e) {
  198 + e.printStackTrace();
  199 + }
  200 +
  201 + return resList;
  202 + }
  203 +
  204 + //车辆加注
  205 + @RequestMapping(value = "/vehicleloadingExport",method = RequestMethod.POST)
  206 + public List<Map<String, Object>> vehicleloadingExport(@RequestParam Map<String, Object> map){
  207 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  208 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  209 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  210 + ReportUtils ee = new ReportUtils();
  211 + List<Vehicleloading> vehicleloading = formsService.vehicleloading(map.get("line").toString(), map.get("date").toString());
  212 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  213 + int i=1;
  214 + for(Vehicleloading l : vehicleloading){
  215 + Map<String, Object> m = new HashMap<String, Object>();
  216 + m.put("i", i);
  217 + m.put("rQ", l.getrQ());
  218 + m.put("gS", l.getgS());
  219 + m.put("xL", l.getxL());
  220 + m.put("clzbh", l.getClzbh());
  221 + m.put("hyl", l.getHyl());
  222 + m.put("jzl", l.getJzl());
  223 + m.put("ls", l.getLs());
  224 + m.put("jhlc", l.getJhlc());
  225 + m.put("unyyyl", l.getUnyyyl());
  226 + m.put("jhbc", l.getJhbc());
  227 + m.put("sjbc", l.getSjbc());
  228 + resList.add(m);
  229 + i++;
  230 + }
  231 +
  232 + try {
  233 + listI.add(resList.iterator());
  234 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  235 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\vehicleloading.xls",
  236 + path+"export\\车辆加注" + sdfSimple.format(sdfMonth.parse(map.get("date").toString())) + ".xls");
  237 + } catch (Exception e) {
  238 + e.printStackTrace();
  239 + }
  240 + return resList;
  241 + }
  242 +
  243 + //运营服务阶段报表
  244 + @RequestMapping(value = "/operationserviceExport",method = RequestMethod.POST)
  245 + public List<Map<String, Object>> operationserviceExport(@RequestParam Map<String, Object> map){
  246 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  247 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  248 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  249 + ReportUtils ee = new ReportUtils();
  250 + List<Operationservice> operationservice = formsService.operationservice(map);
  251 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  252 + int i=1;
  253 + for(Operationservice l : operationservice){
  254 + Map<String, Object> m = new HashMap<String, Object>();
  255 + m.put("i", i);
  256 + m.put("xlName", l.getXlName());
  257 + m.put("jzl", l.getJzl());
  258 + m.put("xhl", l.getXhl());
  259 + m.put("xsgl", l.getXsgl());
  260 + m.put("emptMileage", l.getEmptMileage());
  261 + m.put("sjbc", l.getSjbc());
  262 + resList.add(m);
  263 + i++;
  264 + }
  265 +
  266 + try {
  267 + listI.add(resList.iterator());
  268 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  269 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\operationservice.xls",
  270 + path+"export\\运营服务阶段报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
  271 + } catch (Exception e) {
  272 + e.printStackTrace();
  273 + }
  274 + return resList;
  275 + }
  276 +
  277 +
  278 +
  279 +
  280 +
  281 +}
... ...
src/main/java/com/bsth/controller/oil/YlbController.java
... ... @@ -4,6 +4,7 @@ import java.text.ParseException;
4 4 import java.text.SimpleDateFormat;
5 5 import java.util.ArrayList;
6 6 import java.util.Date;
  7 +import java.util.HashMap;
7 8 import java.util.Iterator;
8 9 import java.util.List;
9 10 import java.util.Map;
... ... @@ -23,6 +24,7 @@ import com.bsth.entity.oil.Ylb;
23 24 import com.bsth.entity.sys.SysUser;
24 25 import com.bsth.security.util.SecurityUtils;
25 26 import com.bsth.service.oil.YlbService;
  27 +import com.bsth.util.ReportUtils;
26 28 import com.google.common.base.Splitter;
27 29  
28 30 @RestController
... ... @@ -131,4 +133,58 @@ public class YlbController extends BaseController&lt;Ylb, Integer&gt;{
131 133 return yblService.oilListMonth(line, date);
132 134 }
133 135  
  136 +
  137 + @RequestMapping(value = "/listExport",method = RequestMethod.POST)
  138 + public List<Map<String, Object>> listExport(@RequestParam Map<String, Object> map){
  139 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  140 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  141 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  142 + ReportUtils ee = new ReportUtils();
  143 + String rq=map.get("rq").toString();
  144 + if(!(rq=="")){
  145 + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
  146 + try {
  147 + map.put("rq_eq", sdfMonth.parse(rq));
  148 + } catch (ParseException e) {
  149 + // TODO Auto-generated catch block
  150 + e.printStackTrace();
  151 + }
  152 + }
  153 + List<Ylb> ylb= (List<Ylb>)yblService.list(map);
  154 +// (new CustomerSpecs<Ylb>(map)).iterator();
  155 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  156 + for (Ylb y : ylb) {
  157 + Map<String, Object> m = new HashMap<String, Object>();
  158 + m.put("rq", y.getRq());
  159 + m.put("gsname",y.getGsname() );
  160 + m.put("xlname", y.getXlname());
  161 + m.put("nbbm", y.getNbbm());
  162 + m.put("jsy", y.getJsy());
  163 + m.put("jzl", y.getJzl());
  164 + m.put("czlc", y.getCzlc());
  165 + m.put("jzlc", y.getJzlc());
  166 + m.put("czyl", y.getCzyl());
  167 + m.put("jzyl", y.getJzyl());
  168 + m.put("yh", y.getYh());
  169 + m.put("rylx", y.getRylx());
  170 + m.put("ns", y.getNs());
  171 + m.put("shyy", y.getShyy());
  172 + m.put("sh", y.getSh());
  173 + m.put("zlc", y.getZlc());
  174 + m.put("yhlx", y.getYhlx());
  175 + m.put("bglyh", y.getBglyh());
  176 + resList.add(m);
  177 + }
  178 + try {
  179 + listI.add(resList.iterator());
  180 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  181 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\list.xls",
  182 + path+"export\\进出场存油量" + sdfSimple.format(sdfMonth.parse(map.get("rq").toString())) + ".xls");
  183 + } catch (Exception e) {
  184 + e.printStackTrace();
  185 + }
  186 +
  187 + return resList;
  188 +
  189 + }
134 190 }
... ...
src/main/java/com/bsth/data/BasicData.java
1 1 package com.bsth.data;
2 2  
3   -import java.util.ArrayList;
4   -import java.util.HashMap;
5   -import java.util.Iterator;
6   -import java.util.List;
7   -import java.util.Map;
8   -import java.util.concurrent.TimeUnit;
9   -
  3 +import com.bsth.Application;
  4 +import com.bsth.entity.*;
  5 +import com.bsth.entity.schedule.CarConfigInfo;
  6 +import com.bsth.repository.*;
  7 +import com.bsth.repository.schedule.CarConfigInfoRepository;
  8 +import com.google.common.collect.BiMap;
  9 +import com.google.common.collect.HashBiMap;
  10 +import org.apache.commons.lang3.StringUtils;
10 11 import org.slf4j.Logger;
11 12 import org.slf4j.LoggerFactory;
12 13 import org.springframework.beans.factory.annotation.Autowired;
13 14 import org.springframework.boot.CommandLineRunner;
14 15 import org.springframework.stereotype.Component;
15 16  
16   -import com.bsth.Application;
17   -import com.bsth.entity.CarPark;
18   -import com.bsth.entity.Cars;
19   -import com.bsth.entity.Line;
20   -import com.bsth.entity.Personnel;
21   -import com.bsth.entity.Station;
22   -import com.bsth.entity.StationRoute;
23   -import com.bsth.entity.schedule.CarConfigInfo;
24   -import com.bsth.repository.CarParkRepository;
25   -import com.bsth.repository.CarsRepository;
26   -import com.bsth.repository.LineRepository;
27   -import com.bsth.repository.PersonnelRepository;
28   -import com.bsth.repository.StationRepository;
29   -import com.bsth.repository.StationRouteRepository;
30   -import com.bsth.repository.schedule.CarConfigInfoRepository;
31   -import com.google.common.collect.BiMap;
32   -import com.google.common.collect.HashBiMap;
33   -import com.google.common.collect.TreeMultimap;
  17 +import java.util.*;
  18 +import java.util.concurrent.TimeUnit;
34 19  
35 20 /**
36   - *
  21 + * @author PanZhao
37 22 * @ClassName: BasicData
38 23 * @Description: TODO(基础的映射数据)
39   - * @author PanZhao
40 24 * @date 2016年8月10日 下午3:27:45
41   - *
42 25 */
43 26 @Component
44   -public class BasicData implements CommandLineRunner{
45   -
46   - //设备号和车辆自编号 (K: 设备编码 ,V:车辆自编号)
47   - public static BiMap<String, String> deviceId2NbbmMap;
48   -
49   - //车辆自编号和公司代码对照 (K: 车辆自编号 ,V:公司代码)
50   - public static Map<String, String> nbbm2CompanyCodeMap;
51   -
52   - //站点编码和名称对照,包括停车场 (K: 站点编码 ,V:站点名称)
53   - public static Map<String, String> stationCode2NameMap;
54   -
55   - //车辆和线路对照
56   - public static Map<String, Line> nbbm2LineMap;
57   -
58   - //线路和用户对照 用于webSocket定向推送消息(用户进入线调时写入数据)
59   - public static TreeMultimap<String, String> lineCode2SocketUserMap = TreeMultimap.create();
60   -
61   - //线路ID和code 对照
62   - public static BiMap<Integer, String> lineId2CodeMap;
63   -
64   - //线路编码和名称对照
65   - public static Map<String, String> lineCode2NameMap;
66   -
67   - //线路编码_站点编码 == 0|1 上下行
68   - public static Map<String, Integer> lineStationUpDownMap;
69   -
70   - //停车场
71   - public static List<String> parkCodeList;
72   -
73   - //线路ID和shangHaiLinecode 对照
74   - public static Map<Integer, String> lineId2ShangHaiCodeMap;
75   -
76   - //线路Code和shangHaiLinecode 对照
77   - public static Map<String, String> lineCode2ShangHaiCodeMap;
78   -
79   - //驾驶员工号 和 personnel 对象映射
80   - public static Map<String, Personnel> jsyMap;
81   - //售票员工号 和 personnel 对象映射
82   - public static Map<String, Personnel> spyMap;
83   - //全量员工 工号和姓名对照
84   - public static Map<String, String> allPerson;
85   -
86   -
87   - static Logger logger = LoggerFactory.getLogger(BasicData.class);
88   -
89   - @Autowired
90   - BasicDataLoader dataLoader;
91   -
92   - @Override
93   - public void run(String... arg0) throws Exception {
94   - Application.mainServices.scheduleWithFixedDelay(dataLoader, 0, 1, TimeUnit.HOURS);
95   - }
96   -
97   -
98   - @Component
99   - public static class BasicDataLoader extends Thread{
100   -
101   - @Autowired
102   - CarsRepository carsRepository;
103   -
104   - @Autowired
105   - StationRepository stationRepository;
106   -
107   - @Autowired
108   - CarParkRepository carParkRepository;
109   -
110   - @Autowired
111   - CarConfigInfoRepository carConfigInfoRepository;
112   -
113   - @Autowired
114   - LineRepository lineRepository;
115   -
116   - @Autowired
117   - StationRouteRepository stationRouteRepository;
118   -
119   - @Autowired
120   - PersonnelRepository personnelRepository;
121   -
122   -
123   - @Override
124   - public void run() {
125   - loadAllData();
126   - }
127   -
128   - /**
129   - * @Title: loadAllData
130   - * @Description: TODO(加载所有数据)
131   - */
132   - public int loadAllData(){
133   - try{
134   - //设备信息
135   - loadDeviceInfo();
136   - //站点信息
137   - loadStationInfo();
138   - //线路信息
139   - loadLineInfo();
140   - //车辆和线路映射信息
141   - loadNbbm2LineInfo();
142   - //站点路由信息
143   - loadStationRouteInfo();
144   - //人员信息
145   - loadPersonnelInfo();
146   - logger.info("加载基础数据成功!," );
147   - }catch(Exception e){
148   - logger.error("加载基础数据时出现异常," , e);
149   - }
150   - return 0;
151   - }
152   -
153   -
154   - private void loadStationRouteInfo() {
155   - Iterator<StationRoute> iterator = stationRouteRepository.findAllEffective().iterator();
156   - Map<String, Integer> map = new HashMap<>();
157   - StationRoute route;
158   -
159   - while(iterator.hasNext()){
160   - route = iterator.next();
161   - map.put(route.getLineCode() + "_" + route.getStationCode(), route.getDirections());
162   - }
163   - lineStationUpDownMap = map;
164   - }
165   -
166   - /**
167   - * @Title: loadDeviceInfo
168   - * @Description: TODO(加载设备相关信息)
169   - */
170   - public void loadDeviceInfo(){
171   - BiMap<String, String> deviceId2Nbbm = HashBiMap.create();
172   - //车辆和公司代码对照
173   - Map<String, String> nbbm2CompanyCode = new HashMap<>();
174   - Iterator<Cars> carIterator = carsRepository.findAll().iterator();
175   - Cars car;
176   - while(carIterator.hasNext()){
177   - car = carIterator.next();
178   - deviceId2Nbbm.put(car.getEquipmentCode(), car.getInsideCode());
179   - nbbm2CompanyCode.put(car.getInsideCode(), car.getBusinessCode());
180   - }
181   -
182   - deviceId2NbbmMap = deviceId2Nbbm;
183   - nbbm2CompanyCodeMap = nbbm2CompanyCode;
184   - }
185   -
186   - /**
187   - * @Title: loadStationInfo
188   - * @Description: TODO(加载站点信息)
189   - */
190   - public void loadStationInfo(){
191   - Map<String, String> stationCode2Name = new HashMap<>();
192   - Iterator<Station> iterator = stationRepository.findAll().iterator();
193   - //站点
194   - Station station;
195   - while(iterator.hasNext()){
196   - station = iterator.next();
197   - stationCode2Name.put(station.getStationCod(), station.getStationName());
198   - }
199   - //停车场
200   - Iterator<CarPark> iterator2 = carParkRepository.findAll().iterator();
201   -
202   - List<String> parkCodes = new ArrayList<>();
203   -
204   - CarPark carPark;
205   - while(iterator2.hasNext()){
206   - carPark = iterator2.next();
207   - stationCode2Name.put(carPark.getParkCode(), carPark.getParkName());
208   -
209   - parkCodes.add(carPark.getParkCode());
210   - }
211   - parkCodeList = parkCodes;
212   - stationCode2NameMap = stationCode2Name;
213   - }
214   -
215   - /**
216   - * @Title: loadNbbm2LineInfo
217   - * @Description: TODO(车辆和线路对照)
218   - */
219   - public void loadNbbm2LineInfo(){
220   - Iterator<CarConfigInfo> allIterator = carConfigInfoRepository.findAll().iterator();
221   - Map<String, Line> ccMap = new HashMap<>();
222   -
223   - CarConfigInfo cci;
224   - while(allIterator.hasNext()){
225   - cci = allIterator.next();
226   - ccMap.put(cci.getCl().getInsideCode(), cci.getXl());
227   - }
228   - nbbm2LineMap = ccMap;
229   - }
230   -
231   - /**
232   - * @Title: loadLineInfo
233   - * @Description: TODO(加载线路相关信息)
234   - */
235   - public void loadLineInfo(){
236   - Iterator<Line> iterator = lineRepository.findAll().iterator();
237   -
238   - Line line;
239   - BiMap<Integer, String> biMap = HashBiMap.create();
240   - Map<String, String> code2name = new HashMap<>();
241   - Map<Integer, String> id2SHcode = new HashMap<Integer, String>();
242   - Map<String, String> code2SHcode = new HashMap<String, String>();
243   -
244   - while(iterator.hasNext()){
245   - line = iterator.next();
246   - biMap.put(line.getId(), line.getLineCode());
247   - code2name.put(line.getLineCode(), line.getName());
248   - id2SHcode.put(line.getId(),line.getShanghaiLinecode());
249   - code2SHcode.put(line.getLineCode(), line.getShanghaiLinecode());
250   - }
251   -
252   - lineId2CodeMap = biMap;
253   - lineCode2NameMap = code2name;
254   - lineId2ShangHaiCodeMap = id2SHcode;
255   - lineCode2ShangHaiCodeMap = code2SHcode;
256   - }
257   -
258   - /**
259   - *
260   - * @Title: loadPersonnelInfo
261   - * @Description: TODO(加载人员信息)
262   - */
263   - public void loadPersonnelInfo() {
264   - Iterator<Personnel> iterator = personnelRepository.findAll().iterator();
265   -
266   - Map<String, Personnel> jsyTempMap=new HashMap<>()
267   - , spyTempMap=new HashMap<>();
268   - Map<String, String> allPersonMap=new HashMap<>();
269   -
270   - Personnel p;
271   -
272   - while(iterator.hasNext()){
273   - p = iterator.next();
274   -
275   - if(p.getPosts() != null){
276   - if(p.getPosts().equals("1"))
277   - jsyTempMap.put(p.getJobCode(), p);
278   - else if(p.getPosts().equals("2"))
279   - spyTempMap.put(p.getJobCode(), p);
280   - }
281   -
282   - allPersonMap.put(p.getJobCode(), p.getPersonnelName());
283   - }
284   -
285   - jsyMap=jsyTempMap;
286   - spyMap=spyTempMap;
287   - allPerson=allPersonMap;
288   - }
289   - }
  27 +public class BasicData implements CommandLineRunner {
  28 +
  29 + //设备号和车辆自编号 (K: 设备编码 ,V:车辆自编号)
  30 + public static BiMap<String, String> deviceId2NbbmMap;
  31 +
  32 + //车辆自编号和公司代码对照 (K: 车辆自编号 ,V:公司代码)
  33 + public static Map<String, String> nbbm2CompanyCodeMap;
  34 +
  35 + //站点编码和名称对照,包括停车场 (K: 站点编码 ,V:站点名称)
  36 + public static Map<String, String> stationCode2NameMap;
  37 +
  38 + //线路起终点对照(线路编码_上下行_起终点) 1024_0_B (1024上行起点)
  39 + public static Map<String, String> lineSEPointMap;
  40 +
  41 + //车辆和线路对照
  42 + public static Map<String, Line> nbbm2LineMap;
  43 +
  44 + //线路和用户对照 用于webSocket定向推送消息(用户进入线调时写入数据)
  45 + //public static TreeMultimap<String, String> lineCode2SocketUserMap = TreeMultimap.create();
  46 +
  47 + //线路ID和code 对照
  48 + public static BiMap<Integer, String> lineId2CodeMap;
  49 +
  50 + //线路编码和名称对照
  51 + public static Map<String, String> lineCode2NameMap;
  52 +
  53 + //线路编码_站点编码 == 0|1 上下行
  54 + public static Map<String, Integer> lineStationUpDownMap;
  55 +
  56 + //停车场
  57 + public static List<String> parkCodeList;
  58 +
  59 + //线路ID和shangHaiLinecode 对照
  60 + public static Map<Integer, String> lineId2ShangHaiCodeMap;
  61 +
  62 + //线路Code和shangHaiLinecode 对照
  63 + public static Map<String, String> lineCode2ShangHaiCodeMap;
  64 +
  65 + //驾驶员工号 和 personnel 对象映射
  66 + public static Map<String, Personnel> jsyMap;
  67 + //售票员工号 和 personnel 对象映射
  68 + public static Map<String, Personnel> spyMap;
  69 + //全量员工 工号和姓名对照
  70 + public static Map<String, String> allPerson;
  71 +
  72 + //站点名和运管处编号 对照
  73 + public static Map<String, Map<String, Map>> stationName2YgcNumber;
  74 +
  75 +
  76 + static Logger logger = LoggerFactory.getLogger(BasicData.class);
  77 +
  78 + @Autowired
  79 + BasicDataLoader dataLoader;
  80 +
  81 + @Override
  82 + public void run(String... arg0) throws Exception {
  83 + Application.mainServices.scheduleWithFixedDelay(dataLoader, 0, 1, TimeUnit.HOURS);
  84 + }
  85 +
  86 +
  87 + @Component
  88 + public static class BasicDataLoader extends Thread {
  89 +
  90 + @Autowired
  91 + CarsRepository carsRepository;
  92 +
  93 + @Autowired
  94 + StationRepository stationRepository;
  95 +
  96 + @Autowired
  97 + CarParkRepository carParkRepository;
  98 +
  99 + @Autowired
  100 + CarConfigInfoRepository carConfigInfoRepository;
  101 +
  102 + @Autowired
  103 + LineRepository lineRepository;
  104 +
  105 + @Autowired
  106 + StationRouteRepository stationRouteRepository;
  107 +
  108 + @Autowired
  109 + PersonnelRepository personnelRepository;
  110 +
  111 +
  112 + @Override
  113 + public void run() {
  114 + loadAllData();
  115 + }
  116 +
  117 + /**
  118 + * @Title: loadAllData
  119 + * @Description: TODO(加载所有数据)
  120 + */
  121 + public int loadAllData() {
  122 + try {
  123 + //设备信息
  124 + loadDeviceInfo();
  125 + //站点信息
  126 + loadStationInfo();
  127 + //线路信息
  128 + loadLineInfo();
  129 + //车辆和线路映射信息
  130 + loadNbbm2LineInfo();
  131 + //站点路由信息
  132 + loadStationRouteInfo();
  133 + //人员信息
  134 + loadPersonnelInfo();
  135 + logger.info("加载基础数据成功!,");
  136 + } catch (Exception e) {
  137 + logger.error("加载基础数据时出现异常,", e);
  138 + }
  139 + return 0;
  140 + }
  141 +
  142 +
  143 + private void loadStationRouteInfo() {
  144 + Iterator<StationRoute> iterator = stationRouteRepository.findAllEffective().iterator();
  145 +
  146 + Map<String, String> sePointMap = new HashMap<>();
  147 + //lineSEPointMap
  148 + Map<String, Integer> map = new HashMap<>();
  149 +
  150 + StationRoute route;
  151 + while (iterator.hasNext()) {
  152 + route = iterator.next();
  153 + map.put(route.getLineCode() + "_" + route.getStationCode(), route.getDirections());
  154 +
  155 + if (route.getStationMark() != null &&
  156 + (route.getStationMark().equals("B") || route.getStationMark().equals("E"))) {
  157 + sePointMap.put(route.getLineCode() + "_"
  158 + + route.getDirections()
  159 + + "_" + route.getStationMark(), route.getStationCode());
  160 + }
  161 + }
  162 + lineStationUpDownMap = map;
  163 + lineSEPointMap = sePointMap;
  164 + }
  165 +
  166 + /**
  167 + * @Title: loadDeviceInfo
  168 + * @Description: TODO(加载设备相关信息)
  169 + */
  170 + public void loadDeviceInfo() {
  171 + BiMap<String, String> deviceId2Nbbm = HashBiMap.create();
  172 + //车辆和公司代码对照
  173 + Map<String, String> nbbm2CompanyCode = new HashMap<>();
  174 + Iterator<Cars> carIterator = carsRepository.findAll().iterator();
  175 + Cars car;
  176 + while (carIterator.hasNext()) {
  177 + car = carIterator.next();
  178 + deviceId2Nbbm.put(car.getEquipmentCode(), car.getInsideCode());
  179 + nbbm2CompanyCode.put(car.getInsideCode(), car.getBusinessCode());
  180 + }
  181 +
  182 + deviceId2NbbmMap = deviceId2Nbbm;
  183 + nbbm2CompanyCodeMap = nbbm2CompanyCode;
  184 + }
  185 +
  186 + /**
  187 + * @Title: loadStationInfo
  188 + * @Description: TODO(加载站点信息)
  189 + */
  190 + public void loadStationInfo() {
  191 + Map<String, String> stationCode2Name = new HashMap<>();
  192 + Iterator<Station> iterator = stationRepository.findAll().iterator();
  193 + //站点
  194 + Station station;
  195 + while (iterator.hasNext()) {
  196 + station = iterator.next();
  197 + stationCode2Name.put(station.getStationCod(), station.getStationName());
  198 + }
  199 + //停车场
  200 + Iterator<CarPark> iterator2 = carParkRepository.findAll().iterator();
  201 +
  202 + List<String> parkCodes = new ArrayList<>();
  203 +
  204 + CarPark carPark;
  205 + while (iterator2.hasNext()) {
  206 + carPark = iterator2.next();
  207 + stationCode2Name.put(carPark.getParkCode(), carPark.getParkName());
  208 +
  209 + parkCodes.add(carPark.getParkCode());
  210 + }
  211 + parkCodeList = parkCodes;
  212 + stationCode2NameMap = stationCode2Name;
  213 + }
  214 +
  215 + /**
  216 + * @Title: loadNbbm2LineInfo
  217 + * @Description: TODO(车辆和线路对照)
  218 + */
  219 + public void loadNbbm2LineInfo() {
  220 + Iterator<CarConfigInfo> allIterator = carConfigInfoRepository.findAll().iterator();
  221 + Map<String, Line> ccMap = new HashMap<>();
  222 +
  223 + CarConfigInfo cci;
  224 + while (allIterator.hasNext()) {
  225 + cci = allIterator.next();
  226 + ccMap.put(cci.getCl().getInsideCode(), cci.getXl());
  227 + }
  228 + nbbm2LineMap = ccMap;
  229 + }
  230 +
  231 + /**
  232 + * @Title: loadLineInfo
  233 + * @Description: TODO(加载线路相关信息)
  234 + */
  235 + public void loadLineInfo(){
  236 + List<StationRoute> stationsList = null;// 站点路由集
  237 + StationRoute stationRoute = null;
  238 + int size = 0;
  239 + Map<String, Integer> station2Number ;
  240 + Map<String, Map> dirs2Statioin ;
  241 + int[] dirs = {0,1};// 运行方向 上下行
  242 + int num = 1;
  243 + Iterator<Line> iterator = lineRepository.findAll().iterator();
  244 +
  245 + Line line;
  246 + BiMap<Integer, String> biMap = HashBiMap.create();
  247 + Map<String, String> code2name = new HashMap<>();
  248 + Map<Integer, String> id2SHcode = new HashMap<Integer, String>();
  249 + Map<String, String> code2SHcode = new HashMap<String, String>();
  250 + Map<String, Map<String, Map>> tempStationName2YgcNumber = new HashMap<String, Map<String, Map>>();
  251 +
  252 + while(iterator.hasNext()){
  253 + line = iterator.next();
  254 + biMap.put(line.getId(), line.getLineCode());
  255 + code2name.put(line.getLineCode(), line.getName());
  256 + id2SHcode.put(line.getId(),line.getShanghaiLinecode());
  257 + code2SHcode.put(line.getLineCode(), line.getShanghaiLinecode());
  258 +
  259 + /**
  260 + * 加载运管处的站点及序号
  261 + * 上行从1开始,下行顺序续编
  262 +
  263 + num = 1;
  264 + dirs2Statioin = new HashMap<String, Map>();
  265 + for (int i = 0; i < dirs.length; i++) {
  266 + // 分别取得上下行的站点
  267 + stationsList = stationRouteRepository.findByLine(line.getLineCode(), dirs[i]);
  268 + size = stationsList == null ? 0 :stationsList.size();
  269 + if(size > 0 ){
  270 + station2Number = new HashMap<String, Integer>();
  271 + for (int j = 0; j < size; j++) {
  272 + stationRoute = stationsList.get(j);
  273 + // map保存为(站点名称 -->序号)
  274 + station2Number.put(stationRoute.getStationName(), num++);
  275 + }
  276 + // 保存两个数据,(0 --> station2Number)(1 --> station2Number) 0上行 1 下行
  277 + dirs2Statioin.put(dirs[i]+"", station2Number);
  278 + }
  279 + }
  280 + // 保存(站点编码 --> dirs2Statioin)
  281 + tempStationName2YgcNumber.put(line.getLineCode(), dirs2Statioin);
  282 + */
  283 + }
  284 +
  285 + lineId2CodeMap = biMap;
  286 + lineCode2NameMap = code2name;
  287 + lineId2ShangHaiCodeMap = id2SHcode;
  288 + lineCode2ShangHaiCodeMap = code2SHcode;
  289 + stationName2YgcNumber = tempStationName2YgcNumber;
  290 + }
  291 +
  292 + /**
  293 + * @Title: loadPersonnelInfo
  294 + * @Description: TODO(加载人员信息)
  295 + */
  296 + public void loadPersonnelInfo() {
  297 + Iterator<Personnel> iterator = personnelRepository.findAll().iterator();
  298 +
  299 + Map<String, Personnel> jsyTempMap = new HashMap<>(), spyTempMap = new HashMap<>();
  300 + Map<String, String> allPersonMap = new HashMap<>();
  301 +
  302 + Personnel p;
  303 + String jobCode;
  304 + while (iterator.hasNext()) {
  305 + p = iterator.next();
  306 +
  307 + jobCode = p.getJobCode();
  308 + if (StringUtils.isEmpty(jobCode))
  309 + continue;
  310 +
  311 + /*if (jobCode.indexOf("-") != -1) {
  312 + jobCode = jobCode.split("-")[1];
  313 + }*/
  314 + if (p.getPosts() != null) {
  315 + if (p.getPosts().equals("1"))
  316 + jsyTempMap.put(jobCode, p);
  317 + else if (p.getPosts().equals("2"))
  318 + spyTempMap.put(jobCode, p);
  319 + }
  320 +
  321 + allPersonMap.put(jobCode, p.getPersonnelName());
  322 + }
  323 +
  324 + jsyMap = jsyTempMap;
  325 + spyMap = spyTempMap;
  326 + allPerson = allPersonMap;
  327 + }
  328 + }
290 329 }
... ...
src/main/java/com/bsth/data/arrival/ArrivalData_GPS.java
1 1 package com.bsth.data.arrival;
2 2  
3   -import java.util.ArrayList;
4   -import java.util.Collection;
5   -import java.util.HashMap;
6   -import java.util.List;
7   -import java.util.Map;
8   -import java.util.Set;
9   -import java.util.TreeSet;
10   -import java.util.concurrent.TimeUnit;
11   -
  3 +import com.bsth.data.match.Arrival2Schedule;
  4 +import com.bsth.data.schedule.DayOfSchedule;
  5 +import com.google.common.collect.ArrayListMultimap;
  6 +import com.google.common.collect.ListMultimap;
12 7 import org.slf4j.Logger;
13 8 import org.slf4j.LoggerFactory;
14 9 import org.springframework.beans.factory.annotation.Autowired;
15 10 import org.springframework.boot.CommandLineRunner;
16 11 import org.springframework.stereotype.Component;
17 12  
18   -import com.bsth.Application;
19   -import com.bsth.data.match.Arrival2Schedule;
20   -import com.bsth.data.schedule.DayOfSchedule;
21   -import com.google.common.collect.ArrayListMultimap;
22   -import com.google.common.collect.ListMultimap;
  13 +import java.util.*;
23 14  
24 15 /**
25 16 *
... ... @@ -32,7 +23,7 @@ import com.google.common.collect.ListMultimap;
32 23 @Component
33 24 public class ArrivalData_GPS implements CommandLineRunner{
34 25  
35   - // 起终点站进出数据 K:车辆编码
  26 + // 起终点站进出数据 K:车辆编码
36 27 private static ListMultimap<String, ArrivalEntity> startAndEndMaps;
37 28  
38 29 private static Map<String, Integer> carIndexMap;
... ... @@ -69,6 +60,7 @@ public class ArrivalData_GPS implements CommandLineRunner{
69 60 @Override
70 61 public void run() {
71 62 try{
  63 + logger.info("开始加载到离站数据, " + System.currentTimeMillis());
72 64 List<ArrivalEntity> arrSets = dataLoader.load();
73 65 if(null == arrSets || arrSets.size() == 0)
74 66 return;
... ...
src/main/java/com/bsth/data/gpsdata/GpsEntity.java
... ... @@ -71,6 +71,9 @@ public class GpsEntity {
71 71  
72 72 private int version;
73 73  
  74 + /** 是否起终点站 */
  75 + private boolean sEPoint;
  76 +
74 77 public Integer getCompanyCode() {
75 78 return companyCode;
76 79 }
... ... @@ -238,4 +241,12 @@ public class GpsEntity {
238 241 public void setVersion(int version) {
239 242 this.version = version;
240 243 }
  244 +
  245 + public boolean issEPoint() {
  246 + return sEPoint;
  247 + }
  248 +
  249 + public void setsEPoint(boolean sEPoint) {
  250 + this.sEPoint = sEPoint;
  251 + }
241 252 }
... ...
src/main/java/com/bsth/data/gpsdata/GpsRealData.java
... ... @@ -28,7 +28,7 @@ import com.bsth.util.ConfigUtil;
28 28 import com.google.common.collect.TreeMultimap;
29 29  
30 30 /**
31   - *
  31 + *
32 32 * @ClassName: GpsRealData
33 33 * @Description: TODO(实时GPS数据集合)
34 34 * @author PanZhao
... ... @@ -37,25 +37,25 @@ import com.google.common.collect.TreeMultimap;
37 37 */
38 38 @Component
39 39 public class GpsRealData implements CommandLineRunner{
40   -
  40 +
41 41 static Logger logger = LoggerFactory.getLogger(GpsRealData.class);
42   -
  42 +
43 43 private static Map<String, GpsEntity> gpsMap;
44   -
  44 +
45 45 //按线路分组设备号
46 46 private static TreeMultimap<String, String> lineCode2Devices;
47 47  
48 48 // 网关数据接口地址
49 49 private static String url;
50   -
  50 +
51 51 @Autowired
52 52 GpsDataLoader gpsDataLoader;
53   -
  53 +
54 54 @Autowired
55 55 DayOfSchedule dayOfSchedule;
56   -
  56 +
57 57 @Autowired
58   - ForecastRealServer forecastRealServer;
  58 + ForecastRealServer forecastRealServer;
59 59 /**
60 60 * 构造函数
61 61 */
... ... @@ -64,49 +64,52 @@ public class GpsRealData implements CommandLineRunner{
64 64 lineCode2Devices = TreeMultimap.create();
65 65 url = ConfigUtil.get("http.gps.real.url");
66 66 }
67   -
  67 +
68 68 @Override
69 69 public void run(String... arg0) throws Exception {
70 70 logger.info("gpsDataLoader,20,6");
71   - //Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 6, TimeUnit.SECONDS);
  71 + Application.mainServices.scheduleWithFixedDelay(gpsDataLoader, 20, 5, TimeUnit.SECONDS);
72 72 }
73 73  
74 74 public GpsEntity add(GpsEntity gps) {
75 75 String device = gps.getDeviceId();
76 76 GpsEntity old = gpsMap.get(device);
77   -
78   - //定时定距数据附带站点编码改变
79   - if(null == old || !old.getStopNo().equals(gps.getStopNo())){
80   - gps.setArrTime(gps.getTimestamp());
81   - //预测到达终点时间
82   - forecastRealServer.forecast(gps.getNbbm(), gps);
83   - }
84   - else{
85   - gps.setArrTime(old.getArrTime());
86   - //不预测, 重新计算终点时间
87   - gps.setExpectStopTime(forecastRealServer.expectStopTime(gps.getNbbm()));
  77 +
  78 + if(!StringUtils.isEmpty(gps.getStopNo())){
  79 + //定时定距数据附带站点编码改变
  80 + if(null == old || !gps.getStopNo().equals(old.getStopNo())){
  81 + gps.setArrTime(gps.getTimestamp());
  82 + //预测到达终点时间
  83 + forecastRealServer.forecast(gps.getNbbm(), gps);
  84 + }
  85 + else{
  86 + gps.setArrTime(old.getArrTime());
  87 + //不预测, 重新计算终点时间
  88 + gps.setExpectStopTime(forecastRealServer.expectStopTime(gps.getNbbm()));
  89 + }
88 90 }
89   -
  91 +
90 92 gpsMap.put(device, gps);
91   - lineCode2Devices.put(gps.getLineId(), device);
  93 + if(StringUtils.isNotBlank(gps.getLineId()))
  94 + lineCode2Devices.put(gps.getLineId(), device);
92 95 return gps;
93 96 }
94 97  
95 98 /**
96   - *
  99 + *
97 100 * @Title: get @Description: TODO(设备号获取GPS)
98 101 */
99 102 public GpsEntity get(String deviceId) {
100 103 return gpsMap.get(deviceId);
101 104 }
102   -
  105 +
103 106 /**
104   - *
  107 + *
105 108 * @Title: get @Description: TODO(线路编码获取GPS集合) @throws
106 109 */
107 110 public List<GpsEntity> getByLine(String lineCode) {
108 111 NavigableSet<String> set = lineCode2Devices.get(lineCode);
109   -
  112 +
110 113 List<GpsEntity> rs = new ArrayList<>();
111 114 GpsEntity gps;
112 115 ScheduleRealInfo sch;
... ... @@ -115,19 +118,19 @@ public class GpsRealData implements CommandLineRunner{
115 118 //过滤异常GPS数据
116 119 if(gps.isAbnormal())
117 120 continue;
118   -
  121 +
119 122 sch = dayOfSchedule.execPlamMap().get(gps.getNbbm());
120 123 if(null != sch)
121 124 gps.setSchId(sch.getId());
122 125 rs.add(gps);
123 126 }
124   -
  127 +
125 128 return rs;
126 129 }
127   -
  130 +
128 131 public List<GpsEntity> get(List<String> pArray){
129 132 List<GpsEntity> list = new ArrayList<>();
130   -
  133 +
131 134 for(String code : pArray)
132 135 list.addAll(getByLine(code));
133 136 return list;
... ... @@ -136,11 +139,11 @@ public class GpsRealData implements CommandLineRunner{
136 139 public Set<String> allDevices(){
137 140 return gpsMap.keySet();
138 141 }
139   -
  142 +
140 143 public GpsEntity findByDeviceId(String deviceId) {
141 144 return gpsMap.get(deviceId);
142 145 }
143   -
  146 +
144 147 public Collection<GpsEntity> all(){
145 148 return gpsMap.values();
146 149 }
... ... @@ -150,9 +153,9 @@ public class GpsRealData implements CommandLineRunner{
150 153 }
151 154 @Component
152 155 public static class GpsDataLoader extends Thread{
153   -
  156 +
154 157 Logger logger = LoggerFactory.getLogger(GpsDataLoader.class);
155   -
  158 +
156 159 @Autowired
157 160 GpsRealData gpsRealData;
158 161  
... ... @@ -164,7 +167,7 @@ public class GpsRealData implements CommandLineRunner{
164 167 logger.error("", e);
165 168 }
166 169 }
167   -
  170 +
168 171 public void load() throws Exception {
169 172 List<GpsEntity> list = new ArrayList<>();
170 173 CloseableHttpClient httpClient = null;
... ... @@ -172,7 +175,7 @@ public class GpsRealData implements CommandLineRunner{
172 175 try {
173 176 httpClient = HttpClients.createDefault();
174 177 HttpGet get = new HttpGet(url);
175   -
  178 +
176 179 response = httpClient.execute(get);
177 180  
178 181 HttpEntity entity = response.getEntity();
... ... @@ -181,32 +184,45 @@ public class GpsRealData implements CommandLineRunner{
181 184 BufferedReader br = new BufferedReader(new InputStreamReader(entity.getContent()));
182 185 StringBuffer stringBuffer = new StringBuffer();
183 186 String str = "";
184   - while ((str = br.readLine()) != null)
  187 + while ((str = br.readLine()) != null)
185 188 stringBuffer.append(str);
186 189  
187 190 JSONObject jsonObj = JSON.parseObject(stringBuffer.toString());
188 191  
189   - if (jsonObj != null)
  192 + if (jsonObj != null)
190 193 list = JSON.parseArray(jsonObj.getString("data"), GpsEntity.class);
191   -
  194 +
192 195 String nbbm;
193   - //附加车辆内部编码
194   - Integer updown;
195 196 for(GpsEntity gps : list){
  197 + //没有设备号
  198 + if(StringUtils.isBlank(gps.getDeviceId()))
  199 + continue;
  200 +
196 201 nbbm = BasicData.deviceId2NbbmMap.get(gps.getDeviceId());
197 202 if(StringUtils.isBlank(nbbm))
198 203 gps.setAbnormal(true);//标记为异常数据
199 204 else
200 205 gps.setNbbm(nbbm);
201   -
  206 +
202 207 gps.setStationName(BasicData.stationCode2NameMap.get(gps.getStopNo()));
  208 + gpsRealData.add(gps);
  209 +
  210 + //纠正走向
  211 + correctUpdown(gps);
  212 + /*if(issEPoint(gps))
  213 + continue;
  214 +
  215 + //如果走向未知,尝试根据站点纠正走向
203 216 if(gps.getUpDown() == -1){
204   - //如果走向未知,尝试根据站点纠正走向
205   - updown=BasicData.lineStationUpDownMap.get(gps.getLineId()+"_"+gps.getStopNo());
  217 + updown=stationUpDownMap.get(gps.getLineId()+"_"+gps.getStopNo());
206 218 if(updown != null)
207 219 gps.setUpDown(updown);
208 220 }
209   - gpsRealData.add(gps);
  221 + //如果站点编码和走向相反(即上行站点ID,走向为下行),尝试根据站点纠正走向
  222 + updown=stationUpDownMap.get(gps.getLineId()+"_"+gps.getStopNo());
  223 + if(updown != null && !gps.getUpDown().equals(updown)){
  224 + gps.setUpDown(updown);
  225 + }*/
210 226 }
211 227 } else
212 228 logger.error("result is null");
... ... @@ -220,5 +236,55 @@ public class GpsRealData implements CommandLineRunner{
220 236 response.close();
221 237 }
222 238 }
  239 +
  240 + /**
  241 + * 是否是起终点
  242 + * @param gps
  243 + * @return
  244 + */
  245 + public boolean isSEPoint(GpsEntity gps){
  246 + String key = gps.getLineId()+"_"+gps.getUpDown()+"_"
  247 + ,stationCode;
  248 +
  249 + if(BasicData.lineSEPointMap.containsKey(key+"B")){
  250 + stationCode = BasicData.lineSEPointMap.get(key+"B");
  251 + if(gps.getStopNo().equals(stationCode)){
  252 + gps.setsEPoint(true);
  253 + return true;
  254 + }
  255 + }
  256 +
  257 + if(BasicData.lineSEPointMap.containsKey(key+"E")){
  258 + stationCode = BasicData.lineSEPointMap.get(key+"E");
  259 + if(gps.getStopNo().equals(stationCode)){
  260 + gps.setsEPoint(true);
  261 + return true;
  262 + }
  263 + }
  264 + return false;
  265 + }
  266 +
  267 + /**
  268 + * 纠正上下行
  269 + * @param gps
  270 + */
  271 + public void correctUpdown(GpsEntity gps){
  272 + Integer updown=BasicData.lineStationUpDownMap.get(gps.getLineId()+"_"+gps.getStopNo());
  273 + if(updown != null && !updown.equals(gps.getUpDown()))
  274 + gps.setUpDown(updown);
  275 + /*//如果走向未知,尝试根据站点纠正走向
  276 + if(gps.getUpDown() == -1){
  277 +
  278 + }*/
  279 +
  280 + if(isSEPoint(gps))
  281 + return;
  282 +
  283 + /*//如果站点编码和走向相反(即上行站点ID,走向为下行),尝试根据站点纠正走向
  284 + updown=BasicData.lineStationUpDownMap.get(gps.getLineId()+"_"+gps.getStopNo());
  285 + if(updown != null && !gps.getUpDown().equals(updown)){
  286 + gps.setUpDown(updown);
  287 + }*/
  288 + }
223 289 }
224 290 }
... ...
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
... ... @@ -130,11 +130,11 @@ public class DayOfSchedule implements CommandLineRunner {
130 130 //翻班线程
131 131 Application.mainServices.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
132 132 //入库
133   - //Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 60, TimeUnit.SECONDS);
  133 + Application.mainServices.scheduleWithFixedDelay(schedulePstThread, 60, 60, TimeUnit.SECONDS);
134 134 //首班出场指令补发器
135   - //Application.mainServices.scheduleWithFixedDelay(firstScheduleCheckThread, 30, 240, TimeUnit.SECONDS);
  135 + Application.mainServices.scheduleWithFixedDelay(firstScheduleCheckThread, 30, 240, TimeUnit.SECONDS);
136 136 //班次误点扫描
137   - //Application.mainServices.scheduleWithFixedDelay(scheduleLateThread, 60, 60, TimeUnit.SECONDS);
  137 + Application.mainServices.scheduleWithFixedDelay(scheduleLateThread, 60, 60, TimeUnit.SECONDS);
138 138  
139 139 //每天凌晨2点20提交数据到运管处
140 140 long diff = (DateUtils.getTimestamp() + 1000*60*140) - System.currentTimeMillis();
... ...
src/main/java/com/bsth/entity/Station.java
... ... @@ -97,7 +97,16 @@ public class Station {
97 97  
98 98 // 版本号
99 99 private Integer versions;
100   -
  100 +
  101 + /** 是否有电子站牌 这里是老调度系统的原始字段,暂时保留该字段。 */
  102 + private Integer isHaveLed;
  103 +
  104 + /** 是否有候车亭 这里是老调度系统的原始字段,暂时保留该字段。*/
  105 + private Integer isHaveShelter;
  106 +
  107 + /** 是否港湾式公交站 这里是老调度系统的原始字段,暂时保留该字段。*/
  108 + private Integer isHarbourStation;
  109 +
101 110 // 描述
102 111 private String descriptions;
103 112  
... ... @@ -115,6 +124,30 @@ public class Station {
115 124 @Column(name = "update_date", columnDefinition = "timestamp DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
116 125 private Date updateDate;
117 126  
  127 + public Integer getIsHaveLed() {
  128 + return isHaveLed;
  129 + }
  130 +
  131 + public void setIsHaveLed(Integer isHaveLed) {
  132 + this.isHaveLed = isHaveLed;
  133 + }
  134 +
  135 + public Integer getIsHaveShelter() {
  136 + return isHaveShelter;
  137 + }
  138 +
  139 + public void setIsHaveShelter(Integer isHaveShelter) {
  140 + this.isHaveShelter = isHaveShelter;
  141 + }
  142 +
  143 + public Integer getIsHarbourStation() {
  144 + return isHarbourStation;
  145 + }
  146 +
  147 + public void setIsHarbourStation(Integer isHarbourStation) {
  148 + this.isHarbourStation = isHarbourStation;
  149 + }
  150 +
118 151 public String getAddr() {
119 152 return addr;
120 153 }
... ...
src/main/java/com/bsth/filter/BaseFilter.java
... ... @@ -24,7 +24,7 @@ public abstract class BaseFilter implements Filter {
24 24 * 白名单
25 25 */
26 26 private String[] whiteListURLs = { Constants.LOGIN_PAGE,Constants.CAPTCHA,
27   - Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_TEMPS };
  27 + Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.METRONIC_URL, Constants.LOGIN, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_REAL_GPS };
28 28  
29 29 @Override
30 30 public void destroy() {
... ...
src/main/java/com/bsth/oplog/http/HttpOpLogInterceptor.java
... ... @@ -3,8 +3,8 @@ package com.bsth.oplog.http;
3 3 import javax.servlet.http.HttpServletRequest;
4 4 import javax.servlet.http.HttpServletResponse;
5 5  
  6 +import com.bsth.common.Constants;
6 7 import org.springframework.beans.factory.annotation.Autowired;
7   -import org.springframework.stereotype.Component;
8 8 import org.springframework.util.AntPathMatcher;
9 9 import org.springframework.util.PathMatcher;
10 10 import org.springframework.web.method.HandlerMethod;
... ... @@ -25,7 +25,7 @@ public class HttpOpLogInterceptor implements HandlerInterceptor {
25 25 private final PathMatcher pathMatcher = new AntPathMatcher();
26 26  
27 27 // GET 白名单
28   - private String[] httpGetWhiteList = { "/user/login/**", "/user/currentUser","/dictionary/**", "/module/findByCurrentUser", "/gps/**", "/error/**" };
  28 + private String[] httpGetWhiteList = { "/user/login/**", "/user/currentUser","/dictionary/**", "/module/findByCurrentUser", "/gps/**", "/error/**", Constants.XD_CHILD_PAGES};
29 29  
30 30 // POST 白名单
31 31 private String[] httpPostWhiteList = {
... ...
src/main/java/com/bsth/repository/CarParkRepository.java
... ... @@ -33,9 +33,9 @@ public interface CarParkRepository extends BaseRepository&lt;CarPark, Integer&gt;{
33 33  
34 34 "?6 , str_to_date(?7,'%Y-%m-%d %H:%i:%s') , ?8 , ?9 , ?10," +
35 35  
36   - "str_to_date(?11,'%Y-%m-%d %H:%i:%s'), ?12 ,?13,GeomFromText(?14), ?15, " +
  36 + "str_to_date(?11,'%Y-%m-%d %H:%i:%s'), ?12 ,?13,ST_GeomFromText(?14), ?15, " +
37 37  
38   - "?16, GeomFromText(?17), ?18,?19)", nativeQuery=true)
  38 + "?16, ST_GeomFromText(?17), ?18,?19)", nativeQuery=true)
39 39 public void carParkSave(Double area,String company,String parkCode,String parkName,
40 40  
41 41 String brancheCompany,Integer createBy,String createDate,String descriptions,Integer destroy,
... ... @@ -91,8 +91,8 @@ public interface CarParkRepository extends BaseRepository&lt;CarPark, Integer&gt;{
91 91 "versions = ?12 , " +
92 92 "b_center_point = ?13 , " +
93 93 "g_center_point = ?14 , " +
94   - "b_park_point = GeomFromText(?15) , " +
95   - "g_park_point = GeomFromText(?16) , " +
  94 + "b_park_point = ST_GeomFromText(?15) , " +
  95 + "g_park_point = ST_GeomFromText(?16) , " +
96 96 "db_type = ?17 , " +
97 97 "radius = ?18 , " +
98 98 "shapes_type = ?19 " +
... ...
src/main/java/com/bsth/repository/SectionRepository.java
... ... @@ -83,33 +83,32 @@ public interface SectionRepository extends BaseRepository&lt;Section, Integer&gt; {
83 83 @Transactional
84 84 @Modifying
85 85 @Query(value="UPDATE bsth_c_section SET " +
86   - "gsection_vector = ST_GeomFromText(?2) , " +
87   - "bsection_vector = ST_GeomFromText(?3)," +
88   - "section_code = ?4," +
89   - "section_name = ?5," +
90   - "croses_road = ?6," +
91   - "end_node = ?7," +
92   - "start_node = ?8," +
93   - "middle_node = ?9," +
94   - "section_type = ?10," +
95   - "csection_vector = ?11," +
96   - "road_coding = ?12," +
97   - "section_distance = ?13," +
98   - "section_time = ?14," +
99   - "db_type = ?15," +
100   - "speed_limit = ?16," +
101   - "descriptions = ?17," +
102   - "versions = ?18," +
103   - "create_by = ?19," +
104   - "create_date = str_to_date(?20,'%Y-%m-%d %H:%i:%s')," +
105   - "update_by = ?21," +
106   - "update_date = str_to_date(?22,'%Y-%m-%d %H:%i:%s')" +
  86 + " gsection_vector = ST_GeomFromText(?2) , " +
  87 + " bsection_vector = ST_GeomFromText(?3)," +
  88 + " section_code = ?4," +
  89 + " section_name = ?5," +
  90 + " croses_road = ?6," +
  91 + " end_node = ?7," +
  92 + " start_node = ?8," +
  93 + " middle_node = ?9," +
  94 + " section_type = ?10," +
  95 + " road_coding = ?11," +
  96 + " section_distance = ?12," +
  97 + " section_time = ?13," +
  98 + " db_type = ?14," +
  99 + " speed_limit = ?15," +
  100 + " descriptions = ?16," +
  101 + " versions = ?17," +
  102 + " create_by = ?18," +
  103 + " create_date = str_to_date(?19,'%Y-%m-%d %H:%i:%s')," +
  104 + " update_by = ?20," +
  105 + " update_date = str_to_date(?21,'%Y-%m-%d %H:%i:%s')" +
107 106 " WHERE id = ?1", nativeQuery=true)
108 107 public void sectionUpdate(Integer sectionId,String gsectionVector,String bsectionVector,String sectionCode,String sectionName,
109 108  
110 109 String crosesRoad,String endNode,String startNode,String middleNode,String sectionType,
111 110  
112   - String csectionVector,String roadCoding,Double sectionDistance,Double sectionTime,String dbType,
  111 + String roadCoding,Double sectionDistance,Double sectionTime,String dbType,
113 112  
114 113 Double speedLimit,String descriptions,Integer version,Integer createBy,String createDate,
115 114  
... ...
src/main/java/com/bsth/repository/SectionRouteRepository.java
... ... @@ -69,7 +69,7 @@ public interface SectionRouteRepository extends BaseRepository&lt;SectionRoute, Int
69 69 "r.versions AS versions," +
70 70 "r.descriptions AS descriptions" +
71 71 " FROM bsth_c_sectionroute r where r.line = ?1 and r.directions = ?2 and r.destroy=0 ) a " +
72   - " LEFT JOIN bsth_c_section b ON a.sectionrouteSection = b.id", nativeQuery=true)
  72 + " LEFT JOIN bsth_c_section b ON a.sectionrouteSection = b.id order by a.sectionrouteCode asc", nativeQuery=true)
73 73 List<Object[]> getSectionRoute(int lineId, int directions);
74 74  
75 75  
... ...
src/main/java/com/bsth/repository/StationRouteRepository.java
... ... @@ -110,9 +110,12 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
110 110 *
111 111 * @return List<Object[]>
112 112 */
113   - @Query(value = "SELECT s.b_jwpoints,s.station_name FROM (" +
  113 + /*@Query(value = "SELECT s.b_jwpoints,s.station_name FROM (" +
114 114 "SELECT b.station FROM bsth_c_stationroute b where b.line =?1 and b.directions = ?2 and b.destroy=0) r " +
115   - "LEFT JOIN bsth_c_station s on r.station = s.id", nativeQuery=true)
  115 + "LEFT JOIN bsth_c_station s on r.station = s.id", nativeQuery=true)*/
  116 + @Query(value = "SELECT s.b_jwpoints,s.station_name,r.station_route_code FROM (" +
  117 + "SELECT b.station,b.station_route_code FROM bsth_c_stationroute b where b.line =?1 and b.directions = ?2 and b.destroy=0) r " +
  118 + "LEFT JOIN bsth_c_station s on r.station = s.id order by r.station_route_code asc", nativeQuery=true)
116 119 List<Object[]> getSelectStationRouteCenterPoints(Integer lineId,Integer direction);
117 120  
118 121 /**
... ...
src/main/java/com/bsth/repository/oil/YlbRepository.java
... ... @@ -23,7 +23,7 @@ public interface YlbRepository extends BaseRepository&lt;Ylb, Integer&gt;{
23 23 @Modifying
24 24 @Query(value="SELECT a.* FROM bsth_c_ylb a where to_days(?1)-to_days(a.rq)=1"
25 25 + " and jcsx=(select max(b.jcsx) from bsth_c_ylb b where a.nbbm=b.nbbm and "
26   - + " to_days(?1)-to_days(b.rq)=1 ) group by nbbm",nativeQuery=true)
  26 + + " to_days(?1)-to_days(b.rq)=1 )",nativeQuery=true)
27 27 List<Ylb> obtainYlbefore(String rq);
28 28  
29 29 /**
... ...
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
... ... @@ -100,10 +100,10 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
100 100 void deleteByLineCodeAndDate(String xlBm, String schDate);
101 101  
102 102 //去掉了 xlBm is not null
103   - @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2")
  103 + @Query(value="select s from ScheduleRealInfo s where (s.xlBm = ?1 or s.xlBm is not null) and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2")
104 104 List<ScheduleRealInfo> scheduleByDateAndLine(String line,String date);
105 105  
106   - @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh) from ScheduleRealInfo s where (s.xlBm = ?1 or s.xlBm is not null) and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY xlBm,clZbh,jGh ORDER BY xlBm,clZbh,realExecDate,fcsjActual")
  106 + @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh) from ScheduleRealInfo s where (s.xlBm = ?1 or s.xlBm is not null) and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY xlBm,clZbh,jGh,scheduleDate,jGh ORDER BY xlBm,clZbh")
107 107 List<Map<String,Object>> yesterdayDataList(String line,String date);
108 108  
109 109 @Query(value="select s from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 ORDER BY xlBm,lpName,clZbh,xlDir")
... ...
src/main/java/com/bsth/security/WebSecurityConfig.java
... ... @@ -36,7 +36,7 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
36 36 public void configure(WebSecurity web) throws Exception {
37 37 // 白名单
38 38 web.ignoring().antMatchers(Constants.LOGIN_PAGE, Constants.LOGIN, Constants.ASSETS_URL, Constants.FAVICON_URL, Constants.CAPTCHA,
39   - Constants.METRONIC_URL, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES, Constants.XD_TEMPS);
  39 + Constants.METRONIC_URL, Constants.LOGIN_FAILURE, Constants.UPSTREAM_URL, Constants.XD_CHILD_PAGES);
40 40 }
41 41  
42 42 @Override
... ...
src/main/java/com/bsth/service/TrafficManageService.java
1 1 package com.bsth.service;
2 2  
3   -import com.bsth.entity.Line;
4   -
5 3 /**
6   - *
  4 + *
7 5 * @Interface: LineService(线路service业务层实现接口)
8   - *
  6 + *
9 7 * @extends : BaseService
10   - *
  8 + *
11 9 * @Description: TODO(线路service业务层实现接口)
12   - *
  10 + *
13 11 * @Author bsth@lq
14   - *
  12 + *
15 13 * @Date 2016年4月28日 上午9:21:17
16 14 *
17 15 * @Version 公交调度系统BS版 0.1
18   - *
  16 + *
19 17 */
20 18 public interface TrafficManageService {
21   -
  19 +
22 20 /**
23 21 * 上传线路信息
24   - *
  22 + *
25 23 * @return 调用接口返回信息
26 24 */
27 25 String setXL();
28   -
  26 +
29 27 /**
30 28 * 上传车辆信息
31   - *
  29 + *
32 30 * @return 调用接口返回信息
33 31 */
34 32 String setCL();
35   -
  33 +
36 34 /**
37 35 * 上传司机信息
38 36 * @return 调用接口返回信息
39 37 */
40 38 String setSJ();
41   -
  39 +
42 40 /**
43 41 * 上传超速数据
44   - *
  42 + *
45 43 * @return 调用接口返回信息
46 44 */
47 45 String setCS();
48   -
  46 +
49 47 /**
50 48 * 上传线路班次时刻表数据
51   - *
  49 + *
52 50 * @return 调用接口返回信息
53 51 */
54 52 String setSKB(String ids);
55   -
  53 +
56 54 /**
57 55 * 线路人员车辆配置信息
58 56 * @return 调用接口返回信息
59 57 */
60 58 String setXLPC();
61   -
  59 +
62 60 /**
63 61 * 线路计划班次表
64 62 * @return 调用接口返回信息
65 63 */
66 64 String setJHBC();
67   -
  65 +
68 66 String setLD();
69   -
  67 +
70 68 String setLCYH();
71   -
72   - String setDDRB();
  69 +
  70 + String setDDRB();
  71 +
  72 + /**
  73 + * 下载全量的公交基础数据
  74 + * @return
  75 + */
  76 + String getDownLoadAllDataFile();
  77 +
  78 + /**
  79 + * 下载增量的公交基础数据
  80 + * @return
  81 + */
  82 + String getDownLoadIncreaseDataFile();
  83 +
  84 + /**
  85 + * 指定线路查询方式公交基础数据下载
  86 + * @return
  87 + */
  88 + String getDownLoadWarrantsBusLineStation();
73 89 }
... ...
src/main/java/com/bsth/service/forms/ExportService.java 0 → 100644
  1 +package com.bsth.service.forms;
  2 +
  3 +import java.util.List;
  4 +
  5 +import com.bsth.entity.mcy_forms.Linepasswengerflow;
  6 +import com.bsth.entity.mcy_forms.Operationservice;
  7 +import com.bsth.entity.mcy_forms.Shifday;
  8 +import com.bsth.entity.mcy_forms.Shiftuehiclemanth;
  9 +import com.bsth.entity.mcy_forms.Singledata;
  10 +import com.bsth.entity.mcy_forms.Vehicleloading;
  11 +import com.bsth.entity.mcy_forms.Waybillday;
  12 +
  13 +public interface ExportService {
  14 +
  15 + public void waybillday(String date, List<Waybillday> resList);
  16 +
  17 + public void linepasswengerflow(String date,List<Linepasswengerflow> resList);
  18 +
  19 + public void shifday(String date, List<Shifday> resList);
  20 +
  21 + public void shiftuehiclemanth(String startDate, String endDate, String lpName,
  22 + List<Shiftuehiclemanth> resList);
  23 +
  24 + public void singledata(String startDate, String endDate, String lpName, List<Singledata> resList);
  25 +
  26 + public void vehicleloading(String date, List<Vehicleloading> resList);
  27 +
  28 + public void operationservice(String startDate, String endDate, String lpName,
  29 + List<Operationservice> resList);
  30 +
  31 +
  32 +
  33 +}
... ...
src/main/java/com/bsth/service/forms/impl/ExportServiceImpl.java 0 → 100644
  1 +package com.bsth.service.forms.impl;
  2 +
  3 +import java.text.SimpleDateFormat;
  4 +import java.util.ArrayList;
  5 +import java.util.HashMap;
  6 +import java.util.Iterator;
  7 +import java.util.List;
  8 +import java.util.Map;
  9 +import org.springframework.stereotype.Service;
  10 +
  11 +import com.bsth.entity.mcy_forms.Linepasswengerflow;
  12 +import com.bsth.entity.mcy_forms.Operationservice;
  13 +import com.bsth.entity.mcy_forms.Shifday;
  14 +import com.bsth.entity.mcy_forms.Shiftuehiclemanth;
  15 +import com.bsth.entity.mcy_forms.Singledata;
  16 +import com.bsth.entity.mcy_forms.Vehicleloading;
  17 +import com.bsth.entity.mcy_forms.Waybillday;
  18 +import com.bsth.service.forms.ExportService;
  19 +import com.bsth.util.ReportUtils;
  20 +
  21 +@Service
  22 +public class ExportServiceImpl implements ExportService{
  23 +
  24 +
  25 + //行车路单日报表
  26 + @Override
  27 + public void waybillday(String date, List<Waybillday> list) {
  28 +
  29 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  30 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  31 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  32 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  33 + Map<String,Object> map = new HashMap<String, Object>();
  34 + ReportUtils ee = new ReportUtils();
  35 +
  36 + for(Waybillday w : list){
  37 + Map<String, Object> m = new HashMap<String, Object>();
  38 + m.put("carPlate", w.getCarPlate());
  39 + m.put("jzl1", w.getJzl1());
  40 + m.put("jzl", w.getJzl());
  41 + m.put("yh", w.getYh());
  42 + m.put("jName", w.getjName());
  43 + m.put("zlc", w.getZlc());
  44 + resList.add(m);
  45 + }
  46 +
  47 + try {
  48 + listI.add(resList.iterator());
  49 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  50 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\waybillday.xls",
  51 + path+"export\\行车路单日报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
  52 + } catch (Exception e) {
  53 + e.printStackTrace();
  54 + }
  55 + }
  56 +
  57 + //线路客流量报表
  58 + @Override
  59 + public void linepasswengerflow(String date, List<Linepasswengerflow> list) {
  60 +
  61 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  62 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  63 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  64 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  65 + Map<String,Object> map = new HashMap<String, Object>();
  66 + ReportUtils ee = new ReportUtils();
  67 + for(Linepasswengerflow l : list){
  68 + Map<String, Object> m = new HashMap<String, Object>();
  69 + m.put("stationName", l.getStationName());
  70 + resList.add(m);
  71 + }
  72 +
  73 + try {
  74 + listI.add(resList.iterator());
  75 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  76 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\linepasswengerflow.xls",
  77 + path+"export\\线路客流量报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
  78 + } catch (Exception e) {
  79 + e.printStackTrace();
  80 + }
  81 +
  82 + }
  83 +
  84 +
  85 + //班次车辆人员日统计
  86 + @Override
  87 + public void shifday(String date,List<Shifday> list) {
  88 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  89 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  90 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  91 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  92 + Map<String,Object> map = new HashMap<String, Object>();
  93 + ReportUtils ee = new ReportUtils();
  94 +
  95 + for(Shifday l : list){
  96 + Map<String, Object> m = new HashMap<String, Object>();
  97 + m.put("jName",l.getjName());
  98 + m.put("sName", l.getsName());
  99 + m.put("lpName", l.getLpName());
  100 + m.put("carPlate", l.getCarPlate());
  101 + m.put("jhlc", l.getJhlc());
  102 + m.put("sjjhlc", l.getSjjhlc());
  103 + m.put("yygl", l.getYygl());
  104 + m.put("emptMileage", l.getEmptMileage());
  105 + m.put("remMileage", l.getRemMileage());
  106 + m.put("addMileage", l.getAddMileage());
  107 + m.put("totalm", l.getTotalm());
  108 + m.put("jhbc", l.getJhbc());
  109 + m.put("sjjhbc", l.getSjjhbc());
  110 + m.put("cjbc", l.getCjbc());
  111 + m.put("ljbc", l.getLjbc());
  112 + m.put("sjbc", l.getSjbc());
  113 + resList.add(m);
  114 + }
  115 +
  116 + try {
  117 + listI.add(resList.iterator());
  118 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  119 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\shifday.xls",
  120 + path+"export\\班次车辆人员日报表" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
  121 + } catch (Exception e) {
  122 + e.printStackTrace();
  123 + }
  124 +
  125 + }
  126 +
  127 + //班次车辆人员月统计
  128 + @Override
  129 + public void shiftuehiclemanth(String startDate,String endDate,String lpName, List<Shiftuehiclemanth> list) {
  130 +
  131 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  132 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  133 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  134 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  135 + Map<String,Object> map = new HashMap<String, Object>();
  136 + ReportUtils ee = new ReportUtils();
  137 +
  138 + for(Shiftuehiclemanth l : list){
  139 + Map<String, Object> m = new HashMap<String, Object>();
  140 + m.put("jName",l.getjName() );
  141 + m.put("jhlc", l.getJhlc());
  142 + m.put("emptMileage",l.getEmptMileage() );
  143 + m.put("remMileage", l.getRemMileage());
  144 + m.put("addMileage", l.getAddMileage());
  145 + m.put("totalm", l.getTotalm());
  146 + m.put("cjbc", l.getCjbc());
  147 + m.put("ljbc", l.getLjbc());
  148 + m.put("sjbc", l.getSjbc());
  149 + resList.add(m);
  150 + }
  151 +
  152 + try {
  153 + listI.add(resList.iterator());
  154 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  155 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\shiftuehiclemanth.xls",
  156 + path+"export\\班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(startDate)) + ".xls");
  157 + } catch (Exception e) {
  158 + e.printStackTrace();
  159 + }
  160 +
  161 + }
  162 +
  163 + //路单报表
  164 + @Override
  165 + public void singledata(String startDate,String endDate,String lpName, List<Singledata> list) {
  166 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  167 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  168 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  169 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  170 + Map<String,Object> map = new HashMap<String, Object>();
  171 + ReportUtils ee = new ReportUtils();
  172 +
  173 + for(Singledata l : list){
  174 + Map<String, Object> m = new HashMap<String, Object>();
  175 + m.put("rQ",l.getrQ());
  176 + m.put("gS", l.getgS());
  177 + m.put("xL",l.getxL() );
  178 + m.put("clzbh", l.getClzbh());
  179 + m.put("jsy", l.getJsy());
  180 + m.put("jName", l.getjName());
  181 + m.put("sgh", l.getSgh());
  182 + m.put("sName", l.getsName());
  183 + m.put("jhlc", l.getJhlc());
  184 + m.put("emptMileage", l.getEmptMileage());
  185 + m.put("hyl", l.getHyl());
  186 + m.put("jzl", l.getJzl());
  187 + m.put("unyyyl",l.getUnyyyl());
  188 + m.put("jhjl", l.getJhjl());
  189 + resList.add(m);
  190 + }
  191 +
  192 + try {
  193 + listI.add(resList.iterator());
  194 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  195 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\singledata.xls",
  196 + path+"export\\路单日报表" + sdfSimple.format(sdfMonth.parse(startDate)) + ".xls");
  197 + } catch (Exception e) {
  198 + e.printStackTrace();
  199 + }
  200 +
  201 +
  202 + }
  203 +
  204 +
  205 + //车辆加注
  206 + @Override
  207 + public void vehicleloading(String date, List<Vehicleloading> list) {
  208 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  209 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  210 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  211 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  212 + Map<String,Object> map = new HashMap<String, Object>();
  213 + ReportUtils ee = new ReportUtils();
  214 +
  215 + for(Vehicleloading l : list){
  216 + Map<String, Object> m = new HashMap<String, Object>();
  217 + m.put("rQ", l.getrQ());
  218 + m.put("gS", l.getgS());
  219 + m.put("xL", l.getxL());
  220 + m.put("clzbh", l.getClzbh());
  221 + m.put("hyl", l.getHyl());
  222 + m.put("jzl", l.getJzl());
  223 + m.put("ls", l.getLs());
  224 + m.put("jhlc", l.getJhlc());
  225 + m.put("unyyyl", l.getUnyyyl());
  226 + m.put("jhbc", l.getJhbc());
  227 + m.put("sjbc", l.getSjbc());
  228 + resList.add(m);
  229 + }
  230 +
  231 + try {
  232 + listI.add(resList.iterator());
  233 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  234 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\vehicleloading.xls",
  235 + path+"export\\车辆加注" + sdfSimple.format(sdfMonth.parse(date)) + ".xls");
  236 + } catch (Exception e) {
  237 + e.printStackTrace();
  238 + }
  239 + }
  240 +
  241 + //运营服务阶段报表
  242 + @Override
  243 + public void operationservice(String startDate,String endDate,String lpName,List<Operationservice> list) {
  244 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  245 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  246 +
  247 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  248 + Map<String,Object> map = new HashMap<String, Object>();
  249 + ReportUtils ee = new ReportUtils();
  250 + List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
  251 + for(Operationservice l : list){
  252 + Map<String, Object> m = new HashMap<String, Object>();
  253 + m.put("xlName", l.getXlName());
  254 + m.put("jzl", l.getJzl());
  255 + m.put("xhl", l.getXhl());
  256 + m.put("xsgl", l.getXsgl());
  257 + m.put("emptMileage", l.getEmptMileage());
  258 + m.put("sjbc", l.getSjbc());
  259 + resList.add(m);
  260 + }
  261 +
  262 + try {
  263 + listI.add(resList.iterator());
  264 + String path = this.getClass().getResource("/").getPath()+"static\\pages\\forms\\";
  265 + ee.excelReplace(listI, new Object[] { map }, path+"mould\\operationservice.xls",
  266 + path+"export\\运营服务阶段报表" + sdfSimple.format(sdfMonth.parse(startDate)) + ".xls");
  267 + } catch (Exception e) {
  268 + e.printStackTrace();
  269 + }
  270 + }
  271 +
  272 +
  273 +}
... ...
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
... ... @@ -339,4 +339,5 @@ public class FormsServiceImpl implements FormsService{
339 339 }
340 340  
341 341  
  342 +
342 343 }
... ...
src/main/java/com/bsth/service/impl/CarParkServiceImpl.java
... ... @@ -75,9 +75,19 @@ public class CarParkServiceImpl extends BaseServiceImpl&lt;CarPark, Integer&gt; implem
75 75  
76 76 }
77 77  
78   - bParkPoint = "POLYGON((" + bParkPoint +"))";
  78 + if(bParkPoint.equals(""))
  79 + bParkPoint = null;
  80 + else
  81 + bParkPoint = "POLYGON((" + bParkPoint +"))";
  82 +
  83 + if(gParkPoint.equals(""))
  84 + gParkPoint = null;
  85 + else
  86 + gParkPoint = "POLYGON((" + gParkPoint +"))";
79 87  
80   - gParkPoint = "POLYGON((" + gParkPoint +"))";
  88 + /*bParkPoint = "POLYGON((" + bParkPoint +"))";
  89 +
  90 + gParkPoint = "POLYGON((" + gParkPoint +"))";*/
81 91  
82 92 // 地理位置中心点(百度坐标)
83 93 String bCenterPoint = map.get("bCenterPoint").equals("") ? "" : map.get("bCenterPoint").toString();
... ... @@ -93,7 +103,7 @@ public class CarParkServiceImpl extends BaseServiceImpl&lt;CarPark, Integer&gt; implem
93 103  
94 104 }
95 105  
96   - String gCenterPoint = "";
  106 + String gCenterPoint = null;
97 107  
98 108 if(bJwpointsArray.length>0) {
99 109  
... ... @@ -147,6 +157,9 @@ public class CarParkServiceImpl extends BaseServiceImpl&lt;CarPark, Integer&gt; implem
147 157 // 修改人
148 158 Integer updateBy = map.get("updateBy").equals("") ? null : Integer.parseInt(map.get("updateBy").toString());
149 159  
  160 +
  161 +
  162 +
150 163 carParkRepository.carParkSave(area, company, parkCode, parkName,
151 164  
152 165 brancheCompany, createBy, createDate, descriptions, destroy,
... ... @@ -296,7 +309,7 @@ public class CarParkServiceImpl extends BaseServiceImpl&lt;CarPark, Integer&gt; implem
296 309  
297 310 }
298 311  
299   - String gCenterPoint = "";
  312 + String gCenterPoint =null;
300 313  
301 314 if(bJwpointsArray.length>0) {
302 315  
... ... @@ -337,10 +350,18 @@ public class CarParkServiceImpl extends BaseServiceImpl&lt;CarPark, Integer&gt; implem
337 350 }
338 351  
339 352 }
  353 + if(bParkPoint.equals(""))
  354 + bParkPoint = null;
  355 + else
  356 + bParkPoint = "POLYGON((" + bParkPoint +"))";
  357 +
  358 + if(gParkPoint.equals(""))
  359 + gParkPoint = null;
  360 + else
  361 + gParkPoint = "POLYGON((" + gParkPoint +"))";
  362 + /*bParkPoint = "POLYGON((" + bParkPoint +"))";
340 363  
341   - bParkPoint = "POLYGON((" + bParkPoint +"))";
342   -
343   - gParkPoint = "POLYGON((" + gParkPoint +"))";
  364 + gParkPoint = "POLYGON((" + gParkPoint +"))";*/
344 365  
345 366 // 编码
346 367 String parkCode = map.get("parkCode").equals("") ? "" : map.get("parkCode").toString();
... ...
src/main/java/com/bsth/service/impl/SectionServiceImpl.java
... ... @@ -213,10 +213,11 @@ public class SectionServiceImpl extends BaseServiceImpl&lt;Section, Integer&gt; implem
213 213  
214 214 String sectionType="";
215 215  
216   - String csectionVector="";
  216 + // String csectionVector="";
217 217  
218 218 // 更新
219   - repository.sectionUpdate(sectionId, gsectionVector, bsectionVectorS, sectionCode, sectionName, crosesRoad, endNode, startNode, middleNode, sectionType, csectionVector, roadCoding, sectionDistance, sectionTime, dbType, speedLimit, descriptions, version, createBy, createDate, updateBy, updateDate);
  219 + /*repository.sectionUpdate(sectionId, gsectionVector, bsectionVectorS, sectionCode, sectionName, crosesRoad, endNode, startNode, middleNode, sectionType, csectionVector, roadCoding, sectionDistance, sectionTime, dbType, speedLimit, descriptions, version, createBy, createDate, updateBy, updateDate);*/
  220 + repository.sectionUpdate(sectionId, gsectionVector, bsectionVectorS, sectionCode, sectionName, crosesRoad, endNode, startNode, middleNode, sectionType, roadCoding, sectionDistance, sectionTime, dbType, speedLimit, descriptions, version, createBy, createDate, updateBy, updateDate);
220 221  
221 222 SectionRoute route = new SectionRoute();
222 223  
... ... @@ -393,7 +394,7 @@ public class SectionServiceImpl extends BaseServiceImpl&lt;Section, Integer&gt; implem
393 394  
394 395 String sectionType="";
395 396  
396   - String csectionVector="";
  397 + String csectionVector=null;
397 398  
398 399 Integer id = Integer.valueOf(sectionCode);
399 400  
... ...
src/main/java/com/bsth/service/impl/StationServiceImpl.java
... ... @@ -977,9 +977,9 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
977 977  
978 978 }
979 979  
980   - bPloygonGrid = "POLYGON((" + bPloygonGrid +"))";
  980 + /* bPloygonGrid = "POLYGON((" + bPloygonGrid +"))";
981 981  
982   - gPloygonGrid = "POLYGON((" + gPloygonGrid +"))";
  982 + gPloygonGrid = "POLYGON((" + gPloygonGrid +"))";*/
983 983  
984 984 // 是否撤销
985 985 Integer destroy = map.get("destroy").equals("") ? null : Integer.parseInt(map.get("destroy").toString());
... ...
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
... ... @@ -22,6 +22,7 @@ import org.slf4j.LoggerFactory;
22 22 import org.springframework.beans.factory.annotation.Autowired;
23 23 import org.springframework.data.domain.Sort;
24 24 import org.springframework.data.domain.Sort.Direction;
  25 +import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;
25 26 import org.springframework.stereotype.Service;
26 27  
27 28 import com.bsth.data.BasicData;
... ... @@ -119,6 +120,10 @@ public class TrafficManageServiceImpl implements TrafficManageService{
119 120 @Autowired
120 121 private ScheduleRealInfoRepository scheduleRealInfoRepository;
121 122  
  123 + @Autowired
  124 + NamedParameterJdbcTemplate jdbcTemplate;
  125 +
  126 +
122 127 // 运管处接口
123 128 private InternalPortType portType = new Internal().getInternalHttpSoap11Endpoint();
124 129 private WebServiceSoap ssop ;
... ... @@ -163,9 +168,6 @@ public class TrafficManageServiceImpl implements TrafficManageService{
163 168 sBuffer.append("<XLs>");
164 169 while(lineIterator.hasNext()){
165 170 line = lineIterator.next();
166   - if(line.getLinePlayType() == null){
167   - continue;
168   - }
169 171 if(BasicData.lineId2ShangHaiCodeMap.get(line.getId()) == null){
170 172 continue;
171 173 }
... ... @@ -189,7 +191,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{
189 191 sBuffer.append("<QZLC>").append(upMileage).append("</QZLC>");
190 192 sBuffer.append("<ZQLC>").append(downMileage).append("</ZQLC>");
191 193 }
192   - sBuffer.append("<XLGH>").append(line.getLinePlayType()).append("</XLGH>");
  194 + sBuffer.append("<XLGH>").append(line.getLinePlayType() == null ?"0":line.getLinePlayType())
  195 + .append("</XLGH>");
193 196 // 循环添加站点信息
194 197 sBuffer.append("<StationList>");
195 198 // 先查上行
... ... @@ -334,21 +337,28 @@ public class TrafficManageServiceImpl implements TrafficManageService{
334 337  
335 338 int seqNumber = 0;
336 339 for(ScheduleRealInfo scheduleRealInfo:list){
337   - if(schRealInfo.getXlBm().equals(scheduleRealInfo.getXlBm()) && schRealInfo.getLpName().equals(scheduleRealInfo.getLpName())
  340 + if(schRealInfo.getXlBm().equals(scheduleRealInfo.getXlBm()) && schRealInfo.getLpName()
  341 + .equals(scheduleRealInfo.getLpName())
338 342 && schRealInfo.getClZbh().equals(scheduleRealInfo.getClZbh())){
  343 + if(scheduleRealInfo.getFcsjActual() == null ||scheduleRealInfo.getBcType().equals("in")
  344 + || scheduleRealInfo.getBcType().equals("out")){
  345 + continue;
  346 + }
339 347 scheduleRealInfo.getQdzCode();
340 348 sf.append("<LD>");
341 349 sf.append("<SJGH>"+scheduleRealInfo.getjGh()+"</SJGH>");
342 350 sf.append("<SXX>"+scheduleRealInfo.getXlDir()+"</SXX>");
343 351 sf.append("<FCZDMC>"+scheduleRealInfo.getQdzName()+"</FCZDMC>");
344   - sf.append("<FCZDXH>" + ++seqNumber + "</FCZDXH>");
  352 + sf.append("<FCZDXH>" + getYgcStationNumByLineCodeAndDirectionAndStationName(
  353 + scheduleRealInfo.getXlBm(), scheduleRealInfo.getXlDir(), scheduleRealInfo.getQdzName()) + "</FCZDXH>");
345 354 sf.append("<FCZDBM>"+scheduleRealInfo.getQdzCode()+"</FCZDBM>");
346 355 sf.append("<JHFCSJ>"+scheduleRealInfo.getFcsj()+"</JHFCSJ>");
347 356 sf.append("<DFSJ>"+scheduleRealInfo.getDfsj()+"</DFSJ>");
348 357 sf.append("<SJFCSJ>"+scheduleRealInfo.getFcsjActual()+"</SJFCSJ>");
349 358 sf.append("<FCZDLX>"+""+"</FCZDLX>");
350 359 sf.append("<DDZDMC>"+scheduleRealInfo.getZdzName()+"</DDZDMC>");
351   - sf.append("<DDZDXH>"+ seqNumber +"</DDZDXH>");
  360 + sf.append("<DDZDXH>"+ getYgcStationNumByLineCodeAndDirectionAndStationName(
  361 + scheduleRealInfo.getXlBm(), scheduleRealInfo.getXlDir(), scheduleRealInfo.getZdzName()) +"</DDZDXH>");
352 362 sf.append("<DDZDBM>"+scheduleRealInfo.getZdzCode()+"</DDZDBM>");
353 363 sf.append("<JHDDSJ>"+scheduleRealInfo.getZdsj()+"</JHDDSJ>");
354 364 sf.append("<SJDDSJ>"+scheduleRealInfo.getZdsjActual()+"</SJDDSJ>");
... ... @@ -404,7 +414,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{
404 414 sf.append("<XLBM>"+BasicData.lineCode2ShangHaiCodeMap.get(schRealInfo.getXlBm())+"</XLBM>");
405 415 sf.append("<CPH>"+car.getCarPlate()+"</CPH>");
406 416 for(ScheduleRealInfo scheduleRealInfo:list){
407   - if(schRealInfo.getXlBm().equals(scheduleRealInfo.getXlBm()) && schRealInfo.getClZbh().equals(scheduleRealInfo.getClZbh())){
  417 + if(schRealInfo.getXlBm().equals(scheduleRealInfo.getXlBm()) && schRealInfo.getClZbh()
  418 + .equals(scheduleRealInfo.getClZbh())){
408 419 Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
409 420 //如果没有子任务,里程就是已执行(Status=2);有子任务的,忽略主任务,子任务的烂班
410 421 if(childTaskPlans.isEmpty()){
... ... @@ -412,7 +423,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{
412 423 totalKilometers += scheduleRealInfo.getJhlc()==null?0.0:scheduleRealInfo.getJhlc();
413 424 if(scheduleRealInfo.getBcType().equals("in") || scheduleRealInfo.getBcType().equals("out")
414 425 || scheduleRealInfo.getBcType().equals("venting")){
415   - emptyKilometers += scheduleRealInfo.getJhlc()==null?0.0:scheduleRealInfo.getJhlc();;
  426 + emptyKilometers += scheduleRealInfo.getJhlc()==null?0.0:scheduleRealInfo.getJhlc();
416 427 }
417 428 }
418 429 }else{
... ... @@ -588,14 +599,19 @@ public class TrafficManageServiceImpl implements TrafficManageService{
588 599 if(xlbm.equals(schedulePlanInfo.getXlBm())
589 600 && zbh.equals(schedulePlanInfo.getClZbh())
590 601 && lp == schedulePlanInfo.getLp()){
  602 + if(schedulePlanInfo.getBcType().equals("in") || schedulePlanInfo.getBcType().equals("out")){
  603 + continue;
  604 + }
591 605 sBuffer.append("<BC>");
592 606 sBuffer.append("<SJGH>").append(schedulePlanInfo.getjGh()).append("</SJGH>");
593 607 sBuffer.append("<SXX>").append(schedulePlanInfo.getXlDir()).append("</SXX>");
594 608 sBuffer.append("<FCZDMC>").append(schedulePlanInfo.getQdzName()).append("</FCZDMC>");
595   - sBuffer.append("<ZDXH>").append(++startSerialNum).append("</ZDXH>");
  609 + sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(
  610 + schedulePlanInfo.getXlBm(), schedulePlanInfo.getXlDir(), schedulePlanInfo.getQdzName())).append("</ZDXH>");
596 611 sBuffer.append("<JHFCSJ>").append(schedulePlanInfo.getFcsj()).append("</JHFCSJ>");
597 612 sBuffer.append("<DDZDMC>").append(schedulePlanInfo.getZdzName()).append("</DDZDMC>");
598   - sBuffer.append("<ZDXH>").append(++endSerialNum).append("</ZDXH>");
  613 + sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(
  614 + schedulePlanInfo.getXlBm(), schedulePlanInfo.getXlDir(), schedulePlanInfo.getZdzName())).append("</ZDXH>");
599 615 sBuffer.append("<JHDDSJ>").append(calcDdsj(schedulePlanInfo.getFcsj(),schedulePlanInfo.getBcsj()))
600 616 .append("</JHDDSJ>");
601 617 sBuffer.append("</BC>");
... ... @@ -643,6 +659,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{
643 659 Iterator<TTInfoDetail> ttInfoDetailIterator;
644 660 HashMap<String,Object> param = new HashMap<String, Object>();
645 661 String ttinfoJhlc = null;//计划总里程
  662 + String lineCode ;
646 663 sBuffer.append("<SKBs>");
647 664 for (int i = 0; i < idArray.length; i++) {
648 665 ttInfo = ttInfoRepository.findOne(Long.valueOf(idArray[i]));
... ... @@ -652,7 +669,8 @@ public class TrafficManageServiceImpl implements TrafficManageService{
652 669 ttInfoDetailIterator = ttInfoDetailRepository.findAll(new CustomerSpecs<TTInfoDetail>(param),
653 670 new Sort(Direction.ASC, "xlDir")).iterator();
654 671 sBuffer.append("<SKB>");
655   - sBuffer.append("<XLBM>").append(BasicData.lineId2ShangHaiCodeMap.get(ttInfo.getXl())).append("</XLBM>");
  672 + sBuffer.append("<XLBM>").append(BasicData.lineId2ShangHaiCodeMap.get(ttInfo.getXl().getId()))
  673 + .append("</XLBM>");
656 674 ttinfoJhlc = new String();
657 675 sBuffer.append("<JHZLC>").append(ttinfoJhlc).append("</JHZLC>");
658 676 sBuffer.append("<JHYYLC>").append(ttinfoJhlc).append("</JHYYLC>");
... ... @@ -662,23 +680,35 @@ public class TrafficManageServiceImpl implements TrafficManageService{
662 680 sBuffer.append("<TBYY>").append("").append("</TBYY>");
663 681 sBuffer.append("<UPDT>").append(sdfnyrsfm.format(new Date())).append("</UPDT>");
664 682 int num = 1;
  683 + // 加上<BCList>
  684 + if(ttInfoDetailIterator.hasNext()){
  685 + sBuffer.append("<BCList>");
  686 + }
665 687 while (ttInfoDetailIterator.hasNext()) {
666 688 ttInfoDetail = ttInfoDetailIterator.next();
  689 + if(ttInfoDetail.getBcType().equals("in") || ttInfoDetail.getBcType().equals("out")){
  690 + continue;
  691 + }
667 692 ttinfoJhlc = ttInfoDetail.getJhlc()+"";// 设置计划总里程
668   - sBuffer.append("<BCList>");
  693 + lineCode = ttInfoDetail.getXl().getLineCode();
669 694 sBuffer.append("<BC>");
670 695 sBuffer.append("<LPBH>").append(ttInfoDetail.getLp().getLpNo()).append("</LPBH>");
671 696 sBuffer.append("<SXX>").append(ttInfoDetail.getXlDir()).append("</SXX>");
672   - sBuffer.append("<FCZDMC>").append(ttInfoDetail.getQdz()).append("</FCZDMC>");
673   - sBuffer.append("<ZDXH>").append(num).append("</ZDXH>");
  697 + sBuffer.append("<FCZDMC>").append(ttInfoDetail.getQdz().getStationName()).append("</FCZDMC>");
  698 + sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(
  699 + lineCode, ttInfoDetail.getXlDir(), ttInfoDetail.getQdz().getStationName())).append("</ZDXH>");
674 700 sBuffer.append("<JHFCSJ>").append(ttInfoDetail.getFcsj()).append("</JHFCSJ>");
675   - sBuffer.append("<DDZDMC>").append(ttInfoDetail.getZdz()).append("</DDZDMC>");
676   - sBuffer.append("<ZDXH>").append(num).append("</ZDXH>");
  701 + sBuffer.append("<DDZDMC>").append(ttInfoDetail.getZdz().getStationName()).append("</DDZDMC>");
  702 + sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(
  703 + lineCode, ttInfoDetail.getXlDir(), ttInfoDetail.getZdz().getStationName())).append("</ZDXH>");
677 704 sBuffer.append("<JHDDSJ>").append(calcDdsj(ttInfoDetail.getFcsj(),ttInfoDetail.getBcsj())).append("</JHDDSJ>");
678 705 sBuffer.append("</BC>");
679   - sBuffer.append("</BCList>");
  706 +
680 707 num++;
681 708 }
  709 + if(sBuffer.indexOf("<BCList>") != -1){
  710 + sBuffer.append("</BCList>");
  711 + }
682 712 sBuffer.append("</SKB>");
683 713 }
684 714 sBuffer.append("</SKBs>");
... ... @@ -1008,7 +1038,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{
1008 1038 zdlx = "2";
1009 1039 }
1010 1040 sBuffer.append("<Station>");
1011   - sBuffer.append("<ZDXH>").append(startId).append("</ZDXH>");
  1041 + sBuffer.append("<ZDXH>").append(getYgcStationNumByLineCodeAndDirectionAndStationName(srRoute.getLineCode(),srRoute.getDirections()+"",srRoute.getStationName())).append("</ZDXH>");
1012 1042 sBuffer.append("<SXX>").append(srRoute.getDirections()).append("</SXX>");
1013 1043 sBuffer.append("<ZDMC>").append(srRoute.getStationName()).append("</ZDMC>");
1014 1044 sBuffer.append("<ZDBM>").append(srRoute.getStationCode()).append("</ZDBM>");
... ... @@ -1023,4 +1053,18 @@ public class TrafficManageServiceImpl implements TrafficManageService{
1023 1053 return startId;
1024 1054 }
1025 1055  
  1056 + /**
  1057 + *
  1058 + * @param lineCode 线路编码
  1059 + * @param direction 线路方向
  1060 + * @param stationName 让点名称
  1061 + * @return 运管处站点序号
  1062 + */
  1063 + private Integer getYgcStationNumByLineCodeAndDirectionAndStationName(String lineCode,String direction,String stationName){
  1064 + Integer number = 0;
  1065 + Map<String, Map> dirs2Statioin = BasicData.stationName2YgcNumber.get(lineCode);
  1066 + Map<String, Integer> station2Number = dirs2Statioin.get(direction);
  1067 + number = station2Number.get(stationName);
  1068 + return number;
  1069 + }
1026 1070 }
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
1 1 package com.bsth.service.realcontrol.impl;
2 2  
3   -import java.text.DecimalFormat;
4   -import java.text.ParseException;
5   -import java.text.SimpleDateFormat;
6   -import java.util.ArrayList;
7   -import java.util.Collection;
8   -import java.util.Collections;
9   -import java.util.Date;
10   -import java.util.HashMap;
11   -import java.util.HashSet;
12   -import java.util.Iterator;
13   -import java.util.List;
14   -import java.util.Map;
15   -import java.util.Set;
16   -
17   -import com.bsth.entity.realcontrol.LineConfig;
18   -import org.apache.commons.lang3.StringUtils;
19   -import org.joda.time.format.DateTimeFormat;
20   -import org.joda.time.format.DateTimeFormatter;
21   -import org.slf4j.Logger;
22   -import org.slf4j.LoggerFactory;
23   -import org.springframework.beans.factory.annotation.Autowired;
24   -import org.springframework.stereotype.Service;
25   -
26 3 import com.alibaba.fastjson.JSONArray;
27 4 import com.alibaba.fastjson.JSONObject;
28 5 import com.bsth.common.ResponseCode;
... ... @@ -39,6 +16,7 @@ import com.bsth.entity.Cars;
39 16 import com.bsth.entity.Line;
40 17 import com.bsth.entity.Personnel;
41 18 import com.bsth.entity.realcontrol.ChildTaskPlan;
  19 +import com.bsth.entity.realcontrol.LineConfig;
42 20 import com.bsth.entity.realcontrol.ScheduleRealInfo;
43 21 import com.bsth.entity.schedule.CarConfigInfo;
44 22 import com.bsth.entity.schedule.EmployeeConfigInfo;
... ... @@ -54,17 +32,25 @@ import com.bsth.security.util.SecurityUtils;
54 32 import com.bsth.service.SectionRouteService;
55 33 import com.bsth.service.impl.BaseServiceImpl;
56 34 import com.bsth.service.realcontrol.ScheduleRealInfoService;
57   -import com.bsth.util.DateUtils;
58   -import com.bsth.util.ReportRelatedUtils;
59   -import com.bsth.util.ReportUtils;
60   -import com.bsth.util.TimeUtils;
61   -import com.bsth.util.TransGPS;
  35 +import com.bsth.util.*;
62 36 import com.bsth.util.TransGPS.Location;
63 37 import com.bsth.websocket.handler.SendUtils;
64 38 import com.google.common.base.Splitter;
65 39 import com.google.common.collect.ArrayListMultimap;
66 40 import com.google.common.collect.Lists;
67 41 import com.google.common.collect.Multimap;
  42 +import org.apache.commons.lang3.StringUtils;
  43 +import org.joda.time.format.DateTimeFormat;
  44 +import org.joda.time.format.DateTimeFormatter;
  45 +import org.slf4j.Logger;
  46 +import org.slf4j.LoggerFactory;
  47 +import org.springframework.beans.factory.annotation.Autowired;
  48 +import org.springframework.stereotype.Service;
  49 +
  50 +import java.text.DecimalFormat;
  51 +import java.text.ParseException;
  52 +import java.text.SimpleDateFormat;
  53 +import java.util.*;
68 54  
69 55 @Service
70 56 public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInfo, Long>
... ... @@ -289,6 +275,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
289 275 rs.put("msg", "驾驶员工号不能为空!");
290 276 return rs;
291 277 }
  278 + //截取工号
  279 + if(t.getsGh().indexOf("-") != -1){
  280 + t.setsGh(t.getsGh().split("-")[1]);
  281 + }
292 282  
293 283 t.setScheduleDateStr(schDate);
294 284 t.setScheduleDate(sdfyyyyMMdd.parse(schDate));
... ... @@ -454,12 +444,16 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
454 444  
455 445 @Override
456 446 public void adjustDriver(ScheduleRealInfo schedule, String driver, String driverName) {
  447 + if(driver.indexOf("-") != -1)
  448 + driver = driver.split("-")[1];
457 449 schedule.setjGh(driver);
458 450 schedule.setjName(driverName);
459 451 }
460 452  
461 453 @Override
462 454 public void adjustConductor(ScheduleRealInfo schedule, String conductor, String conductorName) {
  455 + if(conductor.indexOf("-") != -1)
  456 + conductor = conductor.split("-")[1];
463 457 schedule.setsGh(conductor);
464 458 schedule.setsName(conductorName);
465 459 }
... ...
src/main/java/com/bsth/util/Geo/SHCJ2BDJW.java
... ... @@ -25,9 +25,11 @@ public class SHCJ2BDJW {
25 25  
26 26 ResultSet rs = null;
27 27  
28   - String sqlSelect = "SELECT b.SHAPESTRING as SHAPE , b.id as ID FROM jjwgps_t_gjldb b where SHAPESTRING is not null order by b.ldbh asc ";
  28 + /*String sqlSelect = "SELECT b.SHAPESTRING as SHAPE , b.id as ID FROM jjwgps_t_gjldb b where SHAPESTRING is not null order by b.ldbh asc ";*/
  29 + /*String sqlSelect = "select s.id,s.descriptions from bsth_c_station s order by s.id asc ";*/
  30 + String sqlSelect = "SELECT s.id,s.descriptions FROM bsth_c_section s order by s.id asc ";
29 31  
30   - String sqlUpdate = "UPDATE jjwgps_t_gjldb SET bdjw = GeomFromText(?),SHAPE = GeomFromText(?) where id = ?";
  32 + String sqlUpdate = "UPDATE bsth_c_section SET csection_vector = ST_GeomFromText(?) , bsection_vector=ST_GeomFromText(?) , gsection_vector=ST_GeomFromText(?) where id = ?";
31 33  
32 34 List<Map<String, Object>> list = new ArrayList<>();
33 35  
... ... @@ -42,9 +44,9 @@ public class SHCJ2BDJW {
42 44  
43 45 Map<String, Object> map = new HashMap<String, Object>();
44 46  
45   - map.put("shape", rs.getString("SHAPE"));
  47 + map.put("descriptions", rs.getString("descriptions"));
46 48  
47   - map.put("id", rs.getInt("ID"));
  49 + map.put("id", rs.getInt("id"));
48 50  
49 51 list.add(map);
50 52 }
... ... @@ -52,15 +54,29 @@ public class SHCJ2BDJW {
52 54 for(int i =0;i<list.size();i++) {
53 55  
54 56 Map<String, Object> temp = list.get(i);
55   -
56   - String lineString = temp.get("shape").toString();
57   - /*String lineString = "LINESTRING (13532.5305161702 -3677.63275264995, 13433.22401617 -3881.74765264988)";*/
58   -
  57 + // POINT (8229.30921617 -933.16425265)
  58 + String lineString = temp.get("descriptions").toString();
  59 + int id = Integer.parseInt(temp.get("id").toString());
59 60  
60 61 String arrayP[] = lineString.substring(lineString.indexOf("(")+1, lineString.length()-1).split(", ");
61   -
62   - int id = Integer.parseInt(temp.get("id").toString());
63   - String geometry = "";
  62 + /*String arrayP[] = lineString.substring(lineString.indexOf("(")+1, lineString.length()-1).split(" ");
  63 + String b_jwpoints = "";
  64 + Float g_lonx=0.0f,g_laty=0.0f,x=0.0f,y=0.0f;*/
  65 +
  66 + /*Double lng = Double.parseDouble(arrayP[0]);
  67 + Double lat = Double.parseDouble(arrayP[1]);
  68 + x = Float.parseFloat(arrayP[0]);
  69 + y = Float.parseFloat(arrayP[1]);
  70 + // WGS84
  71 + Map map_2 = JWDUtil.ConvertSHToJW(lng,lat);
  72 + g_lonx = Float.parseFloat(map_2.get("x").toString());
  73 + g_laty = Float.parseFloat(map_2.get("y").toString());
  74 + Location location = TransGPS.LocationMake(Float.parseFloat(map_2.get("x").toString()), Float.parseFloat(map_2.get("y").toString()));
  75 + location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(location));
  76 + b_jwpoints = (location.getLng()+0.000727) + " " + (location.getLat() - 0.0000624);*/
  77 + //b_jwpoints = (location.getLng()) + " " + (location.getLat());
  78 +
  79 + String csection_vector="",bsection_vector="",gsection_vector="";
64 80  
65 81 for(int k =0;k<arrayP.length;k++) {
66 82  
... ... @@ -76,28 +92,42 @@ public class SHCJ2BDJW {
76 92  
77 93 location = TransGPS.bd_encrypt(TransGPS.transformFromWGSToGCJ(location));
78 94  
79   - if(k==arrayP.length-1)
80   - geometry = geometry + (location.getLng()+0.000727) + " " + (location.getLat() - 0.0000624);
81   - else
82   - geometry = geometry + (location.getLng()+0.000727) + " " + (location.getLat() - 0.0000624) + ",";
  95 + if(k==arrayP.length-1) {
  96 + bsection_vector = bsection_vector + (location.getLng()+0.000727) + " " + (location.getLat() - 0.0000624);
  97 + csection_vector = csection_vector + arrayXY[0] + " " + arrayXY[1];
  98 + gsection_vector = gsection_vector + map_2.get("x").toString() + " " + map_2.get("y").toString();
  99 + }else {
  100 + bsection_vector = bsection_vector + (location.getLng()+0.000727) + " " + (location.getLat() - 0.0000624) + ",";
  101 + csection_vector = csection_vector + arrayXY[0] + " " + arrayXY[1] +",";
  102 + gsection_vector = gsection_vector + map_2.get("x").toString() + " " + map_2.get("y").toString()+",";
  103 + }
83 104  
84 105  
85 106 }
86 107  
87 108 ps = null;
88   -
89   - geometry = "LINESTRING(" + geometry +")";
  109 + bsection_vector = "LINESTRING(" + bsection_vector +")";
  110 + csection_vector = "LINESTRING(" + csection_vector +")";
  111 + gsection_vector = "LINESTRING(" + gsection_vector +")";
90 112  
91 113 ps = conn.prepareStatement(sqlUpdate);
92 114  
93   - ps.setString(1, geometry);
94   -
95   - ps.setString(2, lineString);
96   -
97   - ps.setInt(3, id);
98   -
  115 + // String sqlUpdate = "UPDATE bsth_c_section SET csection_vector = ? , bsection_vector=? , gsection_vector=? where id = ?";
  116 + ps.setString(1, csection_vector);
  117 + ps.setString(2, bsection_vector);
  118 + ps.setString(3, gsection_vector);
  119 + ps.setInt(4, id);
  120 +
  121 + //int stauts = ps.executeUpdate();
  122 + // String sqlUpdate = "UPDATE bsth_c_station SET b_jwpoints = ?1 , g_lonx=?2 , g_laty=?3 , x = ?4 , y = ?5 where id = ?6";
  123 + /*ps.setString(1, b_jwpoints);
  124 + ps.setFloat(2, g_lonx);
  125 + ps.setFloat(3, g_laty);
  126 + ps.setFloat(4, x);
  127 + ps.setFloat(5, y);
  128 + ps.setFloat(6, id);*/
99 129 int stauts = ps.executeUpdate();
100   -
  130 + System.out.println(stauts);
101 131 }
102 132  
103 133 } catch (SQLException e) {
... ...
src/main/resources/datatools/ktrs/ttinfodetailDataOutput.ktr
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<transformation>
3   - <info>
4   - <name>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x5bfc;&#x51fa;</name>
5   - <description/>
6   - <extended_description/>
7   - <trans_version/>
8   - <trans_type>Normal</trans_type>
9   - <trans_status>0</trans_status>
10   - <directory>&#x2f;</directory>
11   - <parameters>
12   - </parameters>
13   - <log>
14   -<trans-log-table><connection/>
15   -<schema/>
16   -<table/>
17   -<size_limit_lines/>
18   -<interval/>
19   -<timeout_days/>
20   -<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>
21   -<perf-log-table><connection/>
22   -<schema/>
23   -<table/>
24   -<interval/>
25   -<timeout_days/>
26   -<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>
27   -<channel-log-table><connection/>
28   -<schema/>
29   -<table/>
30   -<timeout_days/>
31   -<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>
32   -<step-log-table><connection/>
33   -<schema/>
34   -<table/>
35   -<timeout_days/>
36   -<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>
37   -<metrics-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>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>
42   - </log>
43   - <maxdate>
44   - <connection/>
45   - <table/>
46   - <field/>
47   - <offset>0.0</offset>
48   - <maxdiff>0.0</maxdiff>
49   - </maxdate>
50   - <size_rowset>10000</size_rowset>
51   - <sleep_time_empty>50</sleep_time_empty>
52   - <sleep_time_full>50</sleep_time_full>
53   - <unique_connections>N</unique_connections>
54   - <feedback_shown>Y</feedback_shown>
55   - <feedback_size>50000</feedback_size>
56   - <using_thread_priorities>Y</using_thread_priorities>
57   - <shared_objects_file/>
58   - <capture_step_performance>N</capture_step_performance>
59   - <step_performance_capturing_delay>1000</step_performance_capturing_delay>
60   - <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
61   - <dependencies>
62   - </dependencies>
63   - <partitionschemas>
64   - </partitionschemas>
65   - <slaveservers>
66   - </slaveservers>
67   - <clusterschemas>
68   - </clusterschemas>
69   - <created_user>-</created_user>
70   - <created_date>2016&#x2f;11&#x2f;15 13&#x3a;00&#x3a;52.076</created_date>
71   - <modified_user>-</modified_user>
72   - <modified_date>2016&#x2f;11&#x2f;15 13&#x3a;00&#x3a;52.076</modified_date>
73   - <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>
74   - <is_key_private>N</is_key_private>
75   - </info>
76   - <notepads>
77   - </notepads>
78   - <connection>
79   - <name>bus_control_variable</name>
80   - <server>&#x24;&#x7b;v_db_ip&#x7d;</server>
81   - <type>MYSQL</type>
82   - <access>Native</access>
83   - <database>&#x24;&#x7b;v_db_dname&#x7d;</database>
84   - <port>3306</port>
85   - <username>&#x24;&#x7b;v_db_uname&#x7d;</username>
86   - <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>
87   - <servername/>
88   - <data_tablespace/>
89   - <index_tablespace/>
90   - <attributes>
91   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
92   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
93   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
94   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
95   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
96   - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
97   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
98   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
99   - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
100   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
101   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
102   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
103   - </attributes>
104   - </connection>
105   - <connection>
106   - <name>bus_control_&#x516c;&#x53f8;_201</name>
107   - <server>localhost</server>
108   - <type>MYSQL</type>
109   - <access>Native</access>
110   - <database>control</database>
111   - <port>3306</port>
112   - <username>root</username>
113   - <password>Encrypted </password>
114   - <servername/>
115   - <data_tablespace/>
116   - <index_tablespace/>
117   - <attributes>
118   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
119   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
120   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
121   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
122   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
123   - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
124   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
125   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
126   - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
127   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
128   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
129   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
130   - </attributes>
131   - </connection>
132   - <connection>
133   - <name>bus_control_&#x672c;&#x673a;</name>
134   - <server>localhost</server>
135   - <type>MYSQL</type>
136   - <access>Native</access>
137   - <database>control</database>
138   - <port>3306</port>
139   - <username>root</username>
140   - <password>Encrypted </password>
141   - <servername/>
142   - <data_tablespace/>
143   - <index_tablespace/>
144   - <attributes>
145   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
146   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
147   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
148   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
149   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
150   - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
151   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
152   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
153   - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
154   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
155   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
156   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
157   - </attributes>
158   - </connection>
159   - <connection>
160   - <name>xlab_mysql_youle</name>
161   - <server>101.231.124.8</server>
162   - <type>MYSQL</type>
163   - <access>Native</access>
164   - <database>xlab_youle</database>
165   - <port>45687</port>
166   - <username>xlab-youle</username>
167   - <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>
168   - <servername/>
169   - <data_tablespace/>
170   - <index_tablespace/>
171   - <attributes>
172   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
173   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
174   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
175   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
176   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
177   - <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>
178   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
179   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
180   - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
181   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
182   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
183   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
184   - </attributes>
185   - </connection>
186   - <connection>
187   - <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>
188   - <server>localhost</server>
189   - <type>MYSQL</type>
190   - <access>Native</access>
191   - <database>xlab_youle</database>
192   - <port>3306</port>
193   - <username>root</username>
194   - <password>Encrypted </password>
195   - <servername/>
196   - <data_tablespace/>
197   - <index_tablespace/>
198   - <attributes>
199   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
200   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
201   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
202   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
203   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
204   - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
205   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
206   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
207   - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
208   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
209   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
210   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
211   - </attributes>
212   - </connection>
213   - <connection>
214   - <name>xlab_youle</name>
215   - <server/>
216   - <type>MYSQL</type>
217   - <access>JNDI</access>
218   - <database>xlab_youle</database>
219   - <port>1521</port>
220   - <username/>
221   - <password>Encrypted </password>
222   - <servername/>
223   - <data_tablespace/>
224   - <index_tablespace/>
225   - <attributes>
226   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
227   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
228   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
229   - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
230   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
231   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
232   - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
233   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
234   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
235   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
236   - </attributes>
237   - </connection>
238   - <order>
239   - <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</from><to>&#x5217;&#x8f6c;&#x884c;</to><enabled>Y</enabled> </hop>
240   - <hop> <from>&#x5217;&#x8f6c;&#x884c;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>
241   - <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
242   - <hop> <from>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x6570;&#x636e;&#x8868;</from><to>&#x8def;&#x724c;&#x540d;&#x5b57;&#x67e5;&#x627e;</to><enabled>Y</enabled> </hop>
243   - <hop> <from>&#x8def;&#x724c;&#x540d;&#x5b57;&#x67e5;&#x627e;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
244   - </order>
245   - <step>
246   - <name>&#x5217;&#x8f6c;&#x884c;</name>
247   - <type>Denormaliser</type>
248   - <description/>
249   - <distribute>Y</distribute>
250   - <custom_distribution/>
251   - <copies>1</copies>
252   - <partitioning>
253   - <method>none</method>
254   - <schema_name/>
255   - </partitioning>
256   - <key_field>fcno</key_field>
257   - <group>
258   - <field>
259   - <name>lp</name>
260   - </field>
261   - </group>
262   - <fields>
263   - <field>
264   - <field_name>fcsj</field_name>
265   - <key_value>1</key_value>
266   - <target_name>&#x51fa;&#x573a;1</target_name>
267   - <target_type>String</target_type>
268   - <target_format/>
269   - <target_length>-1</target_length>
270   - <target_precision>-1</target_precision>
271   - <target_decimal_symbol/>
272   - <target_grouping_symbol/>
273   - <target_currency_symbol/>
274   - <target_null_string/>
275   - <target_aggregation_type>-</target_aggregation_type>
276   - </field>
277   - <field>
278   - <field_name>fcsj</field_name>
279   - <key_value>2</key_value>
280   - <target_name>&#x9752;&#x5b89;&#x8def;&#x6c7d;&#x8f66;&#x7ad9;2</target_name>
281   - <target_type>String</target_type>
282   - <target_format/>
283   - <target_length>-1</target_length>
284   - <target_precision>-1</target_precision>
285   - <target_decimal_symbol/>
286   - <target_grouping_symbol/>
287   - <target_currency_symbol/>
288   - <target_null_string/>
289   - <target_aggregation_type>-</target_aggregation_type>
290   - </field>
291   - <field>
292   - <field_name>fcsj</field_name>
293   - <key_value>3</key_value>
294   - <target_name>&#x9752;&#x5b89;&#x8def;&#x6c7d;&#x8f66;&#x7ad9;3</target_name>
295   - <target_type>String</target_type>
296   - <target_format/>
297   - <target_length>-1</target_length>
298   - <target_precision>-1</target_precision>
299   - <target_decimal_symbol/>
300   - <target_grouping_symbol/>
301   - <target_currency_symbol/>
302   - <target_null_string/>
303   - <target_aggregation_type>-</target_aggregation_type>
304   - </field>
305   - <field>
306   - <field_name>fcsj</field_name>
307   - <key_value>4</key_value>
308   - <target_name>&#x9752;&#x5b89;&#x8def;&#x6c7d;&#x8f66;&#x7ad9;4</target_name>
309   - <target_type>String</target_type>
310   - <target_format/>
311   - <target_length>-1</target_length>
312   - <target_precision>-1</target_precision>
313   - <target_decimal_symbol/>
314   - <target_grouping_symbol/>
315   - <target_currency_symbol/>
316   - <target_null_string/>
317   - <target_aggregation_type>-</target_aggregation_type>
318   - </field>
319   - <field>
320   - <field_name>fcsj</field_name>
321   - <key_value>5</key_value>
322   - <target_name>&#x9752;&#x5b89;&#x8def;&#x6c7d;&#x8f66;&#x7ad9;5</target_name>
323   - <target_type>String</target_type>
324   - <target_format/>
325   - <target_length>-1</target_length>
326   - <target_precision>-1</target_precision>
327   - <target_decimal_symbol/>
328   - <target_grouping_symbol/>
329   - <target_currency_symbol/>
330   - <target_null_string/>
331   - <target_aggregation_type>-</target_aggregation_type>
332   - </field>
333   - <field>
334   - <field_name>fcsj</field_name>
335   - <key_value>6</key_value>
336   - <target_name>&#x9752;&#x5b89;&#x8def;&#x6c7d;&#x8f66;&#x7ad9;6</target_name>
337   - <target_type>String</target_type>
338   - <target_format/>
339   - <target_length>-1</target_length>
340   - <target_precision>-1</target_precision>
341   - <target_decimal_symbol/>
342   - <target_grouping_symbol/>
343   - <target_currency_symbol/>
344   - <target_null_string/>
345   - <target_aggregation_type>-</target_aggregation_type>
346   - </field>
347   - <field>
348   - <field_name>fcsj</field_name>
349   - <key_value>7</key_value>
350   - <target_name>&#x8fdb;&#x573a;7</target_name>
351   - <target_type>String</target_type>
352   - <target_format/>
353   - <target_length>-1</target_length>
354   - <target_precision>-1</target_precision>
355   - <target_decimal_symbol/>
356   - <target_grouping_symbol/>
357   - <target_currency_symbol/>
358   - <target_null_string/>
359   - <target_aggregation_type>-</target_aggregation_type>
360   - </field>
361   - </fields>
362   - <cluster_schema/>
363   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
364   - <xloc>531</xloc>
365   - <yloc>65</yloc>
366   - <draw>Y</draw>
367   - </GUI>
368   - </step>
369   -
370   - <step>
371   - <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</name>
372   - <type>SortRows</type>
373   - <description/>
374   - <distribute>Y</distribute>
375   - <custom_distribution/>
376   - <copies>1</copies>
377   - <partitioning>
378   - <method>none</method>
379   - <schema_name/>
380   - </partitioning>
381   - <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>
382   - <prefix>out</prefix>
383   - <sort_size>1000000</sort_size>
384   - <free_memory/>
385   - <compress>N</compress>
386   - <compress_variable/>
387   - <unique_rows>N</unique_rows>
388   - <fields>
389   - <field>
390   - <name>lp</name>
391   - <ascending>Y</ascending>
392   - <case_sensitive>N</case_sensitive>
393   - <presorted>N</presorted>
394   - </field>
395   - <field>
396   - <name>fcno</name>
397   - <ascending>Y</ascending>
398   - <case_sensitive>N</case_sensitive>
399   - <presorted>N</presorted>
400   - </field>
401   - </fields>
402   - <cluster_schema/>
403   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
404   - <xloc>331</xloc>
405   - <yloc>65</yloc>
406   - <draw>Y</draw>
407   - </GUI>
408   - </step>
409   -
410   - <step>
411   - <name>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x6570;&#x636e;&#x8868;</name>
412   - <type>TableInput</type>
413   - <description/>
414   - <distribute>Y</distribute>
415   - <custom_distribution/>
416   - <copies>1</copies>
417   - <partitioning>
418   - <method>none</method>
419   - <schema_name/>
420   - </partitioning>
421   - <connection>bus_control_variable</connection>
422   - <sql>select &#x2a; from bsth_c_s_ttinfo_detail&#xa;where ttinfo &#x3d; &#x24;&#x7b;ttinfoid&#x7d;</sql>
423   - <limit>0</limit>
424   - <lookup/>
425   - <execute_each_row>N</execute_each_row>
426   - <variables_active>Y</variables_active>
427   - <lazy_conversion_active>N</lazy_conversion_active>
428   - <cluster_schema/>
429   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
430   - <xloc>131</xloc>
431   - <yloc>65</yloc>
432   - <draw>Y</draw>
433   - </GUI>
434   - </step>
435   -
436   - <step>
437   - <name>Excel&#x8f93;&#x51fa;</name>
438   - <type>ExcelOutput</type>
439   - <description/>
440   - <distribute>Y</distribute>
441   - <custom_distribution/>
442   - <copies>1</copies>
443   - <partitioning>
444   - <method>none</method>
445   - <schema_name/>
446   - </partitioning>
447   - <header>Y</header>
448   - <footer>N</footer>
449   - <encoding/>
450   - <append>N</append>
451   - <add_to_result_filenames>Y</add_to_result_filenames>
452   - <file>
453   - <name>&#x24;&#x7b;filepath&#x7d;</name>
454   - <extention/>
455   - <do_not_open_newfile_init>N</do_not_open_newfile_init>
456   - <create_parent_folder>N</create_parent_folder>
457   - <split>N</split>
458   - <add_date>N</add_date>
459   - <add_time>N</add_time>
460   - <SpecifyFormat>N</SpecifyFormat>
461   - <date_time_format/>
462   - <sheetname>Sheet1</sheetname>
463   - <autosizecolums>N</autosizecolums>
464   - <nullisblank>N</nullisblank>
465   - <protect_sheet>N</protect_sheet>
466   - <password>Encrypted </password>
467   - <splitevery>0</splitevery>
468   - <usetempfiles>N</usetempfiles>
469   - <tempdirectory/>
470   - </file>
471   - <template>
472   - <enabled>N</enabled>
473   - <append>N</append>
474   - <filename>template.xls</filename>
475   - </template>
476   - <fields>
477   - </fields>
478   - <custom>
479   - <header_font_name>arial</header_font_name>
480   - <header_font_size>10</header_font_size>
481   - <header_font_bold>N</header_font_bold>
482   - <header_font_italic>N</header_font_italic>
483   - <header_font_underline>no</header_font_underline>
484   - <header_font_orientation>horizontal</header_font_orientation>
485   - <header_font_color>black</header_font_color>
486   - <header_background_color>none</header_background_color>
487   - <header_row_height>255</header_row_height>
488   - <header_alignment>left</header_alignment>
489   - <header_image/>
490   - <row_font_name>arial</row_font_name>
491   - <row_font_size>10</row_font_size>
492   - <row_font_color>black</row_font_color>
493   - <row_background_color>none</row_background_color>
494   - </custom>
495   - <cluster_schema/>
496   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
497   - <xloc>731</xloc>
498   - <yloc>65</yloc>
499   - <draw>Y</draw>
500   - </GUI>
501   - </step>
502   -
503   - <step>
504   - <name>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</name>
505   - <type>SelectValues</type>
506   - <description/>
507   - <distribute>Y</distribute>
508   - <custom_distribution/>
509   - <copies>1</copies>
510   - <partitioning>
511   - <method>none</method>
512   - <schema_name/>
513   - </partitioning>
514   - <fields> <field> <name>lp_name</name>
515   - <rename>&#x8def;&#x724c;</rename>
516   - <length>-2</length>
517   - <precision>-2</precision>
518   - </field> <select_unspecified>Y</select_unspecified>
519   - </fields> <cluster_schema/>
520   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
521   - <xloc>534</xloc>
522   - <yloc>243</yloc>
523   - <draw>Y</draw>
524   - </GUI>
525   - </step>
526   -
527   - <step>
528   - <name>&#x8def;&#x724c;&#x540d;&#x5b57;&#x67e5;&#x627e;</name>
529   - <type>DBLookup</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   - <connection>bus_control_variable</connection>
539   - <cache>N</cache>
540   - <cache_load_all>N</cache_load_all>
541   - <cache_size>0</cache_size>
542   - <lookup>
543   - <schema/>
544   - <table>bsth_c_s_gbi</table>
545   - <orderby/>
546   - <fail_on_multiple>N</fail_on_multiple>
547   - <eat_row_on_failure>N</eat_row_on_failure>
548   - <key>
549   - <name>lp</name>
550   - <field>id</field>
551   - <condition>&#x3d;</condition>
552   - <name2/>
553   - </key>
554   - <value>
555   - <name>lp_name</name>
556   - <rename>lp_name</rename>
557   - <default/>
558   - <type>String</type>
559   - </value>
560   - </lookup>
561   - <cluster_schema/>
562   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
563   - <xloc>237</xloc>
564   - <yloc>156</yloc>
565   - <draw>Y</draw>
566   - </GUI>
567   - </step>
568   -
569   - <step_error_handling>
570   - </step_error_handling>
571   - <slave-step-copy-partition-distribution>
572   -</slave-step-copy-partition-distribution>
573   - <slave_transformation>N</slave_transformation>
574   -
575   -</transformation>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<transformation>
  3 + <info>
  4 + <name>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x5bfc;&#x51fa;</name>
  5 + <description/>
  6 + <extended_description/>
  7 + <trans_version/>
  8 + <trans_type>Normal</trans_type>
  9 + <trans_status>0</trans_status>
  10 + <directory>&#x2f;</directory>
  11 + <parameters>
  12 + </parameters>
  13 + <log>
  14 +<trans-log-table><connection/>
  15 +<schema/>
  16 +<table/>
  17 +<size_limit_lines/>
  18 +<interval/>
  19 +<timeout_days/>
  20 +<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>
  21 +<perf-log-table><connection/>
  22 +<schema/>
  23 +<table/>
  24 +<interval/>
  25 +<timeout_days/>
  26 +<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>
  27 +<channel-log-table><connection/>
  28 +<schema/>
  29 +<table/>
  30 +<timeout_days/>
  31 +<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>
  32 +<step-log-table><connection/>
  33 +<schema/>
  34 +<table/>
  35 +<timeout_days/>
  36 +<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>
  37 +<metrics-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>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>
  42 + </log>
  43 + <maxdate>
  44 + <connection/>
  45 + <table/>
  46 + <field/>
  47 + <offset>0.0</offset>
  48 + <maxdiff>0.0</maxdiff>
  49 + </maxdate>
  50 + <size_rowset>10000</size_rowset>
  51 + <sleep_time_empty>50</sleep_time_empty>
  52 + <sleep_time_full>50</sleep_time_full>
  53 + <unique_connections>N</unique_connections>
  54 + <feedback_shown>Y</feedback_shown>
  55 + <feedback_size>50000</feedback_size>
  56 + <using_thread_priorities>Y</using_thread_priorities>
  57 + <shared_objects_file/>
  58 + <capture_step_performance>N</capture_step_performance>
  59 + <step_performance_capturing_delay>1000</step_performance_capturing_delay>
  60 + <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
  61 + <dependencies>
  62 + </dependencies>
  63 + <partitionschemas>
  64 + </partitionschemas>
  65 + <slaveservers>
  66 + </slaveservers>
  67 + <clusterschemas>
  68 + </clusterschemas>
  69 + <created_user>-</created_user>
  70 + <created_date>2016&#x2f;11&#x2f;15 13&#x3a;00&#x3a;52.076</created_date>
  71 + <modified_user>-</modified_user>
  72 + <modified_date>2016&#x2f;11&#x2f;15 13&#x3a;00&#x3a;52.076</modified_date>
  73 + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>
  74 + <is_key_private>N</is_key_private>
  75 + </info>
  76 + <notepads>
  77 + </notepads>
  78 + <connection>
  79 + <name>bus_control_variable</name>
  80 + <server>&#x24;&#x7b;v_db_ip&#x7d;</server>
  81 + <type>MYSQL</type>
  82 + <access>Native</access>
  83 + <database>&#x24;&#x7b;v_db_dname&#x7d;</database>
  84 + <port>3306</port>
  85 + <username>&#x24;&#x7b;v_db_uname&#x7d;</username>
  86 + <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>
  87 + <servername/>
  88 + <data_tablespace/>
  89 + <index_tablespace/>
  90 + <attributes>
  91 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  92 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  93 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  94 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  95 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  96 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  97 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  98 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  99 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  100 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  101 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  102 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  103 + </attributes>
  104 + </connection>
  105 + <connection>
  106 + <name>bus_control_&#x516c;&#x53f8;_201</name>
  107 + <server>localhost</server>
  108 + <type>MYSQL</type>
  109 + <access>Native</access>
  110 + <database>control</database>
  111 + <port>3306</port>
  112 + <username>root</username>
  113 + <password>Encrypted </password>
  114 + <servername/>
  115 + <data_tablespace/>
  116 + <index_tablespace/>
  117 + <attributes>
  118 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  119 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  120 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  121 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  122 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  123 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  124 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  125 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  126 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  127 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  128 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  129 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  130 + </attributes>
  131 + </connection>
  132 + <connection>
  133 + <name>bus_control_&#x672c;&#x673a;</name>
  134 + <server>localhost</server>
  135 + <type>MYSQL</type>
  136 + <access>Native</access>
  137 + <database>control</database>
  138 + <port>3306</port>
  139 + <username>root</username>
  140 + <password>Encrypted </password>
  141 + <servername/>
  142 + <data_tablespace/>
  143 + <index_tablespace/>
  144 + <attributes>
  145 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  146 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  147 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  148 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  149 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  150 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  151 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  152 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  153 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  154 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  155 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  156 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  157 + </attributes>
  158 + </connection>
  159 + <connection>
  160 + <name>xlab_mysql_youle</name>
  161 + <server>101.231.124.8</server>
  162 + <type>MYSQL</type>
  163 + <access>Native</access>
  164 + <database>xlab_youle</database>
  165 + <port>45687</port>
  166 + <username>xlab-youle</username>
  167 + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>
  168 + <servername/>
  169 + <data_tablespace/>
  170 + <index_tablespace/>
  171 + <attributes>
  172 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  173 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  174 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  175 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  176 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  177 + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>
  178 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  179 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  180 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  181 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  182 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  183 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  184 + </attributes>
  185 + </connection>
  186 + <connection>
  187 + <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>
  188 + <server>localhost</server>
  189 + <type>MYSQL</type>
  190 + <access>Native</access>
  191 + <database>xlab_youle</database>
  192 + <port>3306</port>
  193 + <username>root</username>
  194 + <password>Encrypted </password>
  195 + <servername/>
  196 + <data_tablespace/>
  197 + <index_tablespace/>
  198 + <attributes>
  199 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  200 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  201 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  202 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  203 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  204 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  205 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  206 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  207 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  208 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  209 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  210 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  211 + </attributes>
  212 + </connection>
  213 + <connection>
  214 + <name>xlab_youle</name>
  215 + <server/>
  216 + <type>MYSQL</type>
  217 + <access>JNDI</access>
  218 + <database>xlab_youle</database>
  219 + <port>1521</port>
  220 + <username/>
  221 + <password>Encrypted </password>
  222 + <servername/>
  223 + <data_tablespace/>
  224 + <index_tablespace/>
  225 + <attributes>
  226 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  227 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  228 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  229 + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
  230 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  231 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  232 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  233 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  234 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  235 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  236 + </attributes>
  237 + </connection>
  238 + <order>
  239 + <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</from><to>&#x5217;&#x8f6c;&#x884c;</to><enabled>Y</enabled> </hop>
  240 + <hop> <from>&#x5217;&#x8f6c;&#x884c;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>
  241 + <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
  242 + <hop> <from>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x6570;&#x636e;&#x8868;</from><to>&#x8def;&#x724c;&#x540d;&#x5b57;&#x67e5;&#x627e;</to><enabled>Y</enabled> </hop>
  243 + <hop> <from>&#x8def;&#x724c;&#x540d;&#x5b57;&#x67e5;&#x627e;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  244 + </order>
  245 + <step>
  246 + <name>&#x5217;&#x8f6c;&#x884c;</name>
  247 + <type>Denormaliser</type>
  248 + <description/>
  249 + <distribute>Y</distribute>
  250 + <custom_distribution/>
  251 + <copies>1</copies>
  252 + <partitioning>
  253 + <method>none</method>
  254 + <schema_name/>
  255 + </partitioning>
  256 + <key_field>fcno</key_field>
  257 + <group>
  258 + <field>
  259 + <name>lp</name>
  260 + </field>
  261 + </group>
  262 + <fields>
  263 + <field>
  264 + <field_name>fcsj</field_name>
  265 + <key_value>1</key_value>
  266 + <target_name>&#x51fa;&#x573a;1</target_name>
  267 + <target_type>String</target_type>
  268 + <target_format/>
  269 + <target_length>-1</target_length>
  270 + <target_precision>-1</target_precision>
  271 + <target_decimal_symbol/>
  272 + <target_grouping_symbol/>
  273 + <target_currency_symbol/>
  274 + <target_null_string/>
  275 + <target_aggregation_type>-</target_aggregation_type>
  276 + </field>
  277 + <field>
  278 + <field_name>fcsj</field_name>
  279 + <key_value>2</key_value>
  280 + <target_name>&#x9752;&#x5b89;&#x8def;&#x6c7d;&#x8f66;&#x7ad9;2</target_name>
  281 + <target_type>String</target_type>
  282 + <target_format/>
  283 + <target_length>-1</target_length>
  284 + <target_precision>-1</target_precision>
  285 + <target_decimal_symbol/>
  286 + <target_grouping_symbol/>
  287 + <target_currency_symbol/>
  288 + <target_null_string/>
  289 + <target_aggregation_type>-</target_aggregation_type>
  290 + </field>
  291 + <field>
  292 + <field_name>fcsj</field_name>
  293 + <key_value>3</key_value>
  294 + <target_name>&#x9752;&#x5b89;&#x8def;&#x6c7d;&#x8f66;&#x7ad9;3</target_name>
  295 + <target_type>String</target_type>
  296 + <target_format/>
  297 + <target_length>-1</target_length>
  298 + <target_precision>-1</target_precision>
  299 + <target_decimal_symbol/>
  300 + <target_grouping_symbol/>
  301 + <target_currency_symbol/>
  302 + <target_null_string/>
  303 + <target_aggregation_type>-</target_aggregation_type>
  304 + </field>
  305 + <field>
  306 + <field_name>fcsj</field_name>
  307 + <key_value>4</key_value>
  308 + <target_name>&#x9752;&#x5b89;&#x8def;&#x6c7d;&#x8f66;&#x7ad9;4</target_name>
  309 + <target_type>String</target_type>
  310 + <target_format/>
  311 + <target_length>-1</target_length>
  312 + <target_precision>-1</target_precision>
  313 + <target_decimal_symbol/>
  314 + <target_grouping_symbol/>
  315 + <target_currency_symbol/>
  316 + <target_null_string/>
  317 + <target_aggregation_type>-</target_aggregation_type>
  318 + </field>
  319 + <field>
  320 + <field_name>fcsj</field_name>
  321 + <key_value>5</key_value>
  322 + <target_name>&#x9752;&#x5b89;&#x8def;&#x6c7d;&#x8f66;&#x7ad9;5</target_name>
  323 + <target_type>String</target_type>
  324 + <target_format/>
  325 + <target_length>-1</target_length>
  326 + <target_precision>-1</target_precision>
  327 + <target_decimal_symbol/>
  328 + <target_grouping_symbol/>
  329 + <target_currency_symbol/>
  330 + <target_null_string/>
  331 + <target_aggregation_type>-</target_aggregation_type>
  332 + </field>
  333 + <field>
  334 + <field_name>fcsj</field_name>
  335 + <key_value>6</key_value>
  336 + <target_name>&#x9752;&#x5b89;&#x8def;&#x6c7d;&#x8f66;&#x7ad9;6</target_name>
  337 + <target_type>String</target_type>
  338 + <target_format/>
  339 + <target_length>-1</target_length>
  340 + <target_precision>-1</target_precision>
  341 + <target_decimal_symbol/>
  342 + <target_grouping_symbol/>
  343 + <target_currency_symbol/>
  344 + <target_null_string/>
  345 + <target_aggregation_type>-</target_aggregation_type>
  346 + </field>
  347 + <field>
  348 + <field_name>fcsj</field_name>
  349 + <key_value>7</key_value>
  350 + <target_name>&#x8fdb;&#x573a;7</target_name>
  351 + <target_type>String</target_type>
  352 + <target_format/>
  353 + <target_length>-1</target_length>
  354 + <target_precision>-1</target_precision>
  355 + <target_decimal_symbol/>
  356 + <target_grouping_symbol/>
  357 + <target_currency_symbol/>
  358 + <target_null_string/>
  359 + <target_aggregation_type>-</target_aggregation_type>
  360 + </field>
  361 + </fields>
  362 + <cluster_schema/>
  363 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  364 + <xloc>531</xloc>
  365 + <yloc>65</yloc>
  366 + <draw>Y</draw>
  367 + </GUI>
  368 + </step>
  369 +
  370 + <step>
  371 + <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</name>
  372 + <type>SortRows</type>
  373 + <description/>
  374 + <distribute>Y</distribute>
  375 + <custom_distribution/>
  376 + <copies>1</copies>
  377 + <partitioning>
  378 + <method>none</method>
  379 + <schema_name/>
  380 + </partitioning>
  381 + <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>
  382 + <prefix>out</prefix>
  383 + <sort_size>1000000</sort_size>
  384 + <free_memory/>
  385 + <compress>N</compress>
  386 + <compress_variable/>
  387 + <unique_rows>N</unique_rows>
  388 + <fields>
  389 + <field>
  390 + <name>lp</name>
  391 + <ascending>Y</ascending>
  392 + <case_sensitive>N</case_sensitive>
  393 + <presorted>N</presorted>
  394 + </field>
  395 + <field>
  396 + <name>fcno</name>
  397 + <ascending>Y</ascending>
  398 + <case_sensitive>N</case_sensitive>
  399 + <presorted>N</presorted>
  400 + </field>
  401 + </fields>
  402 + <cluster_schema/>
  403 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  404 + <xloc>331</xloc>
  405 + <yloc>65</yloc>
  406 + <draw>Y</draw>
  407 + </GUI>
  408 + </step>
  409 +
  410 + <step>
  411 + <name>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x6570;&#x636e;&#x8868;</name>
  412 + <type>TableInput</type>
  413 + <description/>
  414 + <distribute>Y</distribute>
  415 + <custom_distribution/>
  416 + <copies>1</copies>
  417 + <partitioning>
  418 + <method>none</method>
  419 + <schema_name/>
  420 + </partitioning>
  421 + <connection>bus_control_variable</connection>
  422 + <sql>select &#x2a; from bsth_c_s_ttinfo_detail&#xa;where ttinfo &#x3d; &#x24;&#x7b;ttinfoid&#x7d;</sql>
  423 + <limit>0</limit>
  424 + <lookup/>
  425 + <execute_each_row>N</execute_each_row>
  426 + <variables_active>Y</variables_active>
  427 + <lazy_conversion_active>N</lazy_conversion_active>
  428 + <cluster_schema/>
  429 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  430 + <xloc>131</xloc>
  431 + <yloc>65</yloc>
  432 + <draw>Y</draw>
  433 + </GUI>
  434 + </step>
  435 +
  436 + <step>
  437 + <name>Excel&#x8f93;&#x51fa;</name>
  438 + <type>ExcelOutput</type>
  439 + <description/>
  440 + <distribute>Y</distribute>
  441 + <custom_distribution/>
  442 + <copies>1</copies>
  443 + <partitioning>
  444 + <method>none</method>
  445 + <schema_name/>
  446 + </partitioning>
  447 + <header>Y</header>
  448 + <footer>N</footer>
  449 + <encoding/>
  450 + <append>N</append>
  451 + <add_to_result_filenames>Y</add_to_result_filenames>
  452 + <file>
  453 + <name>&#x24;&#x7b;filepath&#x7d;</name>
  454 + <extention/>
  455 + <do_not_open_newfile_init>N</do_not_open_newfile_init>
  456 + <create_parent_folder>N</create_parent_folder>
  457 + <split>N</split>
  458 + <add_date>N</add_date>
  459 + <add_time>N</add_time>
  460 + <SpecifyFormat>N</SpecifyFormat>
  461 + <date_time_format/>
  462 + <sheetname>Sheet1</sheetname>
  463 + <autosizecolums>N</autosizecolums>
  464 + <nullisblank>N</nullisblank>
  465 + <protect_sheet>N</protect_sheet>
  466 + <password>Encrypted </password>
  467 + <splitevery>0</splitevery>
  468 + <usetempfiles>N</usetempfiles>
  469 + <tempdirectory/>
  470 + </file>
  471 + <template>
  472 + <enabled>N</enabled>
  473 + <append>N</append>
  474 + <filename>template.xls</filename>
  475 + </template>
  476 + <fields>
  477 + </fields>
  478 + <custom>
  479 + <header_font_name>arial</header_font_name>
  480 + <header_font_size>10</header_font_size>
  481 + <header_font_bold>N</header_font_bold>
  482 + <header_font_italic>N</header_font_italic>
  483 + <header_font_underline>no</header_font_underline>
  484 + <header_font_orientation>horizontal</header_font_orientation>
  485 + <header_font_color>black</header_font_color>
  486 + <header_background_color>none</header_background_color>
  487 + <header_row_height>255</header_row_height>
  488 + <header_alignment>left</header_alignment>
  489 + <header_image/>
  490 + <row_font_name>arial</row_font_name>
  491 + <row_font_size>10</row_font_size>
  492 + <row_font_color>black</row_font_color>
  493 + <row_background_color>none</row_background_color>
  494 + </custom>
  495 + <cluster_schema/>
  496 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  497 + <xloc>731</xloc>
  498 + <yloc>65</yloc>
  499 + <draw>Y</draw>
  500 + </GUI>
  501 + </step>
  502 +
  503 + <step>
  504 + <name>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</name>
  505 + <type>SelectValues</type>
  506 + <description/>
  507 + <distribute>Y</distribute>
  508 + <custom_distribution/>
  509 + <copies>1</copies>
  510 + <partitioning>
  511 + <method>none</method>
  512 + <schema_name/>
  513 + </partitioning>
  514 + <fields> <field> <name>lp_name</name>
  515 + <rename>&#x8def;&#x724c;</rename>
  516 + <length>-2</length>
  517 + <precision>-2</precision>
  518 + </field> <select_unspecified>Y</select_unspecified>
  519 + </fields> <cluster_schema/>
  520 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  521 + <xloc>534</xloc>
  522 + <yloc>243</yloc>
  523 + <draw>Y</draw>
  524 + </GUI>
  525 + </step>
  526 +
  527 + <step>
  528 + <name>&#x8def;&#x724c;&#x540d;&#x5b57;&#x67e5;&#x627e;</name>
  529 + <type>DBLookup</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 + <connection>bus_control_variable</connection>
  539 + <cache>N</cache>
  540 + <cache_load_all>N</cache_load_all>
  541 + <cache_size>0</cache_size>
  542 + <lookup>
  543 + <schema/>
  544 + <table>bsth_c_s_gbi</table>
  545 + <orderby/>
  546 + <fail_on_multiple>N</fail_on_multiple>
  547 + <eat_row_on_failure>N</eat_row_on_failure>
  548 + <key>
  549 + <name>lp</name>
  550 + <field>id</field>
  551 + <condition>&#x3d;</condition>
  552 + <name2/>
  553 + </key>
  554 + <value>
  555 + <name>lp_name</name>
  556 + <rename>lp_name</rename>
  557 + <default/>
  558 + <type>String</type>
  559 + </value>
  560 + </lookup>
  561 + <cluster_schema/>
  562 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  563 + <xloc>237</xloc>
  564 + <yloc>156</yloc>
  565 + <draw>Y</draw>
  566 + </GUI>
  567 + </step>
  568 +
  569 + <step_error_handling>
  570 + </step_error_handling>
  571 + <slave-step-copy-partition-distribution>
  572 +</slave-step-copy-partition-distribution>
  573 + <slave_transformation>N</slave_transformation>
  574 +
  575 +</transformation>
... ...