Commit b3c2f0b9b8a4d79b3952e2066e258b967e6db90c

Authored by 潘钊
2 parents 21c07f5a 7eaee329

Merge branch 'minhang' into qingpu

Showing 111 changed files with 10853 additions and 1985 deletions
... ... @@ -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>
... ...
src/main/resources/datatools/ktrs/ttinfodetailDataOutputMetaData.ktr
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<transformation>
3   - <info>
4   - <name>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x5bfc;&#x51fa;&#x5143;&#x6570;&#x636e;</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   - <parameter>
13   - <name>filepath</name>
14   - <default_value>&#x2f;Users&#x2f;xu&#x2f;resource&#x2f;project_code&#x2f;runtime_temp&#x2f;bsth_control_u_d_files&#x2f;ttinfodetail_test.xls</default_value>
15   - <description>&#x65f6;&#x523b;&#x8868;excel&#x5bfc;&#x51fa;&#x6587;&#x4ef6;&#x8def;&#x5f84;&#x540d;</description>
16   - </parameter>
17   - <parameter>
18   - <name>injectktrfile</name>
19   - <default_value>&#x2f;Users&#x2f;xu&#x2f;resource&#x2f;project_code&#x2f;bsth_project&#x2f;bsth_control&#x2f;src&#x2f;main&#x2f;resources&#x2f;datatools&#x2f;ktrs&#x2f;ttinfodetailDataOutput.ktr</default_value>
20   - <description>&#x6ce8;&#x5165;&#x5143;&#x6570;&#x636e;&#x7684;ktr&#x6587;&#x4ef6;</description>
21   - </parameter>
22   - <parameter>
23   - <name>ttinfoid</name>
24   - <default_value>56</default_value>
25   - <description>&#x65f6;&#x523b;&#x8868;id</description>
26   - </parameter>
27   - </parameters>
28   - <log>
29   -<trans-log-table><connection/>
30   -<schema/>
31   -<table/>
32   -<size_limit_lines/>
33   -<interval/>
34   -<timeout_days/>
35   -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>
36   -<perf-log-table><connection/>
37   -<schema/>
38   -<table/>
39   -<interval/>
40   -<timeout_days/>
41   -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>
42   -<channel-log-table><connection/>
43   -<schema/>
44   -<table/>
45   -<timeout_days/>
46   -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>
47   -<step-log-table><connection/>
48   -<schema/>
49   -<table/>
50   -<timeout_days/>
51   -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>
52   -<metrics-log-table><connection/>
53   -<schema/>
54   -<table/>
55   -<timeout_days/>
56   -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>
57   - </log>
58   - <maxdate>
59   - <connection/>
60   - <table/>
61   - <field/>
62   - <offset>0.0</offset>
63   - <maxdiff>0.0</maxdiff>
64   - </maxdate>
65   - <size_rowset>10000</size_rowset>
66   - <sleep_time_empty>50</sleep_time_empty>
67   - <sleep_time_full>50</sleep_time_full>
68   - <unique_connections>N</unique_connections>
69   - <feedback_shown>Y</feedback_shown>
70   - <feedback_size>50000</feedback_size>
71   - <using_thread_priorities>Y</using_thread_priorities>
72   - <shared_objects_file/>
73   - <capture_step_performance>N</capture_step_performance>
74   - <step_performance_capturing_delay>1000</step_performance_capturing_delay>
75   - <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
76   - <dependencies>
77   - </dependencies>
78   - <partitionschemas>
79   - </partitionschemas>
80   - <slaveservers>
81   - </slaveservers>
82   - <clusterschemas>
83   - </clusterschemas>
84   - <created_user>-</created_user>
85   - <created_date>2016&#x2f;11&#x2f;15 15&#x3a;02&#x3a;41.624</created_date>
86   - <modified_user>-</modified_user>
87   - <modified_date>2016&#x2f;11&#x2f;15 15&#x3a;02&#x3a;41.624</modified_date>
88   - <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>
89   - <is_key_private>N</is_key_private>
90   - </info>
91   - <notepads>
92   - </notepads>
93   - <connection>
94   - <name>bus_control_variable</name>
95   - <server>&#x24;&#x7b;v_db_ip&#x7d;</server>
96   - <type>MYSQL</type>
97   - <access>Native</access>
98   - <database>&#x24;&#x7b;v_db_dname&#x7d;</database>
99   - <port>3306</port>
100   - <username>&#x24;&#x7b;v_db_uname&#x7d;</username>
101   - <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>
102   - <servername/>
103   - <data_tablespace/>
104   - <index_tablespace/>
105   - <attributes>
106   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
107   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
108   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
109   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
110   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
111   - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
112   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
113   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
114   - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
115   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
116   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
117   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
118   - </attributes>
119   - </connection>
120   - <connection>
121   - <name>bus_control_&#x516c;&#x53f8;_201</name>
122   - <server>localhost</server>
123   - <type>MYSQL</type>
124   - <access>Native</access>
125   - <database>control</database>
126   - <port>3306</port>
127   - <username>root</username>
128   - <password>Encrypted </password>
129   - <servername/>
130   - <data_tablespace/>
131   - <index_tablespace/>
132   - <attributes>
133   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
134   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
135   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
136   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
137   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
138   - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
139   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
140   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
141   - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
142   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
143   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
144   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
145   - </attributes>
146   - </connection>
147   - <connection>
148   - <name>bus_control_&#x672c;&#x673a;</name>
149   - <server>localhost</server>
150   - <type>MYSQL</type>
151   - <access>Native</access>
152   - <database>control</database>
153   - <port>3306</port>
154   - <username>root</username>
155   - <password>Encrypted </password>
156   - <servername/>
157   - <data_tablespace/>
158   - <index_tablespace/>
159   - <attributes>
160   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
161   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
162   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
163   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
164   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
165   - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
166   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
167   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
168   - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
169   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
170   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
171   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
172   - </attributes>
173   - </connection>
174   - <connection>
175   - <name>xlab_mysql_youle</name>
176   - <server>101.231.124.8</server>
177   - <type>MYSQL</type>
178   - <access>Native</access>
179   - <database>xlab_youle</database>
180   - <port>45687</port>
181   - <username>xlab-youle</username>
182   - <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>
183   - <servername/>
184   - <data_tablespace/>
185   - <index_tablespace/>
186   - <attributes>
187   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
188   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
189   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
190   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
191   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
192   - <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>
193   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
194   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
195   - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
196   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
197   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
198   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
199   - </attributes>
200   - </connection>
201   - <connection>
202   - <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>
203   - <server>localhost</server>
204   - <type>MYSQL</type>
205   - <access>Native</access>
206   - <database>xlab_youle</database>
207   - <port>3306</port>
208   - <username>root</username>
209   - <password>Encrypted </password>
210   - <servername/>
211   - <data_tablespace/>
212   - <index_tablespace/>
213   - <attributes>
214   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
215   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
216   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
217   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
218   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
219   - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
220   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
221   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
222   - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
223   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
224   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
225   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
226   - </attributes>
227   - </connection>
228   - <connection>
229   - <name>xlab_youle</name>
230   - <server/>
231   - <type>MYSQL</type>
232   - <access>JNDI</access>
233   - <database>xlab_youle</database>
234   - <port>1521</port>
235   - <username/>
236   - <password>Encrypted </password>
237   - <servername/>
238   - <data_tablespace/>
239   - <index_tablespace/>
240   - <attributes>
241   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
242   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
243   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
244   - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
245   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
246   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
247   - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
248   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
249   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
250   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
251   - </attributes>
252   - </connection>
253   - <order>
254   - <hop> <from>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x5206;&#x7ec4;&#x6570;&#x636e;</from><to>&#x8fc7;&#x6ee4;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
255   - <hop> <from>&#x8fc7;&#x6ee4;&#x8bb0;&#x5f55;</from><to>&#x8ba1;&#x7b97;&#x7ad9;&#x70b9;</to><enabled>Y</enabled> </hop>
256   - <hop> <from>&#x8ba1;&#x7b97;&#x7ad9;&#x70b9;</from><to>&#x67e5;&#x627e;&#x7ad9;&#x70b9;&#x540d;</to><enabled>Y</enabled> </hop>
257   - <hop> <from>&#x67e5;&#x627e;&#x7ad9;&#x70b9;&#x540d;</from><to>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</to><enabled>Y</enabled> </hop>
258   - <hop> <from>&#x67e5;&#x627e;&#x7ad9;&#x70b9;&#x540d;</from><to>&#x8ba1;&#x7b97;excel&#x8f93;&#x51fa;&#x5b57;&#x6bb5;</to><enabled>Y</enabled> </hop>
259   - <hop> <from>&#x8ba1;&#x7b97;excel&#x8f93;&#x51fa;&#x5b57;&#x6bb5;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>
260   - <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
261   - <hop> <from>&#x751f;&#x6210;&#x8def;&#x724c;&#x5b57;&#x6bb5;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
262   - <hop> <from>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</from><to>ETL&#x5143;&#x6570;&#x636e;&#x6ce8;&#x5165;</to><enabled>Y</enabled> </hop>
263   - <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</from><to>ETL&#x5143;&#x6570;&#x636e;&#x6ce8;&#x5165;</to><enabled>Y</enabled> </hop>
264   - </order>
265   - <step>
266   - <name>ETL&#x5143;&#x6570;&#x636e;&#x6ce8;&#x5165;</name>
267   - <type>MetaInject</type>
268   - <description/>
269   - <distribute>Y</distribute>
270   - <custom_distribution/>
271   - <copies>1</copies>
272   - <partitioning>
273   - <method>none</method>
274   - <schema_name/>
275   - </partitioning>
276   - <specification_method>filename</specification_method>
277   - <trans_object_id/>
278   - <trans_name/>
279   - <filename>&#x24;&#x7b;injectktrfile&#x7d;</filename>
280   - <directory_path/>
281   - <source_step/>
282   - <source_output_fields> </source_output_fields> <target_file/>
283   - <no_execution>N</no_execution>
284   - <stream_source_step/>
285   - <stream_target_step/>
286   - <mappings> <mapping> <target_step_name>&#x5217;&#x8f6c;&#x884c;</target_step_name>
287   - <target_attribute_key>TARGET_TYPE</target_attribute_key>
288   - <target_detail>Y</target_detail>
289   - <source_step>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</source_step>
290   - <source_field>targettype</source_field>
291   - </mapping> <mapping> <target_step_name>Excel&#x8f93;&#x51fa;</target_step_name>
292   - <target_attribute_key>TYPE</target_attribute_key>
293   - <target_detail>Y</target_detail>
294   - <source_step>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</source_step>
295   - <source_field>fieldtype</source_field>
296   - </mapping> <mapping> <target_step_name>&#x5217;&#x8f6c;&#x884c;</target_step_name>
297   - <target_attribute_key>NAME</target_attribute_key>
298   - <target_detail>Y</target_detail>
299   - <source_step>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</source_step>
300   - <source_field>valuefieldname</source_field>
301   - </mapping> <mapping> <target_step_name>Excel&#x8f93;&#x51fa;</target_step_name>
302   - <target_attribute_key>NAME</target_attribute_key>
303   - <target_detail>Y</target_detail>
304   - <source_step>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</source_step>
305   - <source_field>fieldname</source_field>
306   - </mapping> <mapping> <target_step_name>&#x5217;&#x8f6c;&#x884c;</target_step_name>
307   - <target_attribute_key>TARGET_NAME</target_attribute_key>
308   - <target_detail>Y</target_detail>
309   - <source_step>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</source_step>
310   - <source_field>targetfieldname</source_field>
311   - </mapping> <mapping> <target_step_name>&#x5217;&#x8f6c;&#x884c;</target_step_name>
312   - <target_attribute_key>KEY_VALUE</target_attribute_key>
313   - <target_detail>Y</target_detail>
314   - <source_step>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</source_step>
315   - <source_field>keyvalue</source_field>
316   - </mapping> </mappings> <cluster_schema/>
317   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
318   - <xloc>640</xloc>
319   - <yloc>64</yloc>
320   - <draw>Y</draw>
321   - </GUI>
322   - </step>
323   -
324   - <step>
325   - <name>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x5206;&#x7ec4;&#x6570;&#x636e;</name>
326   - <type>TableInput</type>
327   - <description/>
328   - <distribute>Y</distribute>
329   - <custom_distribution/>
330   - <copies>1</copies>
331   - <partitioning>
332   - <method>none</method>
333   - <schema_name/>
334   - </partitioning>
335   - <connection>bus_control_variable</connection>
336   - <sql>select &#xa;fcno&#xa;, min&#x28;xl_dir&#x29; xl_dir&#xa;,min&#x28;qdz&#x29; qdz&#xa;,min&#x28;zdz&#x29; zdz&#xa;,bc_type &#xa;from bsth_c_s_ttinfo_detail&#xa;where ttinfo &#x3d; &#x24;&#x7b;ttinfoid&#x7d;&#xa;group by fcno,bc_type</sql>
337   - <limit>0</limit>
338   - <lookup/>
339   - <execute_each_row>N</execute_each_row>
340   - <variables_active>Y</variables_active>
341   - <lazy_conversion_active>N</lazy_conversion_active>
342   - <cluster_schema/>
343   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
344   - <xloc>56</xloc>
345   - <yloc>185</yloc>
346   - <draw>Y</draw>
347   - </GUI>
348   - </step>
349   -
350   - <step>
351   - <name>&#x8fc7;&#x6ee4;&#x8bb0;&#x5f55;</name>
352   - <type>FilterRows</type>
353   - <description/>
354   - <distribute>Y</distribute>
355   - <custom_distribution/>
356   - <copies>1</copies>
357   - <partitioning>
358   - <method>none</method>
359   - <schema_name/>
360   - </partitioning>
361   -<send_true_to/>
362   -<send_false_to/>
363   - <compare>
364   -<condition>
365   - <negated>N</negated>
366   - <leftvalue>bc_type</leftvalue>
367   - <function>IS NOT NULL</function>
368   - <rightvalue/>
369   - </condition>
370   - </compare>
371   - <cluster_schema/>
372   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
373   - <xloc>182</xloc>
374   - <yloc>189</yloc>
375   - <draw>Y</draw>
376   - </GUI>
377   - </step>
378   -
379   - <step>
380   - <name>&#x8ba1;&#x7b97;&#x7ad9;&#x70b9;</name>
381   - <type>ScriptValueMod</type>
382   - <description/>
383   - <distribute>Y</distribute>
384   - <custom_distribution/>
385   - <copies>1</copies>
386   - <partitioning>
387   - <method>none</method>
388   - <schema_name/>
389   - </partitioning>
390   - <compatible>N</compatible>
391   - <optimizationLevel>9</optimizationLevel>
392   - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
393   - <jsScript_name>Script 1</jsScript_name>
394   - <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var zd&#x3b;&#xa;&#xa;if &#x28;bc_type &#x3d;&#x3d; &#x27;in&#x27;&#x29; &#x7b;&#xa; zd &#x3d; qdz&#x3b;&#xa;&#x7d; else if &#x28;bc_type &#x3d;&#x3d; &#x27;out&#x27;&#x29; &#x7b;&#xa; zd &#x3d; zdz&#x3b;&#xa;&#x7d; else if &#x28;bc_type &#x3d;&#x3d; &#x27;normal&#x27;&#x29; &#x7b;&#xa; zd &#x3d; qdz&#x3b;&#xa;&#x7d; else &#x7b;&#xa; zd &#x3d; qdz&#x3b;&#xa;&#x7d;&#xa;</jsScript_script>
395   - </jsScript> </jsScripts> <fields> <field> <name>zd</name>
396   - <rename>zd</rename>
397   - <type>String</type>
398   - <length>-1</length>
399   - <precision>-1</precision>
400   - <replace>N</replace>
401   - </field> </fields> <cluster_schema/>
402   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
403   - <xloc>300</xloc>
404   - <yloc>190</yloc>
405   - <draw>Y</draw>
406   - </GUI>
407   - </step>
408   -
409   - <step>
410   - <name>&#x67e5;&#x627e;&#x7ad9;&#x70b9;&#x540d;</name>
411   - <type>DBLookup</type>
412   - <description/>
413   - <distribute>N</distribute>
414   - <custom_distribution/>
415   - <copies>1</copies>
416   - <partitioning>
417   - <method>none</method>
418   - <schema_name/>
419   - </partitioning>
420   - <connection>bus_control_variable</connection>
421   - <cache>N</cache>
422   - <cache_load_all>N</cache_load_all>
423   - <cache_size>0</cache_size>
424   - <lookup>
425   - <schema/>
426   - <table>bsth_c_stationroute</table>
427   - <orderby/>
428   - <fail_on_multiple>N</fail_on_multiple>
429   - <eat_row_on_failure>N</eat_row_on_failure>
430   - <key>
431   - <name>zd</name>
432   - <field>station</field>
433   - <condition>&#x3d;</condition>
434   - <name2/>
435   - </key>
436   - <key>
437   - <name>xl_dir</name>
438   - <field>directions</field>
439   - <condition>&#x3d;</condition>
440   - <name2/>
441   - </key>
442   - <value>
443   - <name>station_name</name>
444   - <rename>zdname</rename>
445   - <default/>
446   - <type>String</type>
447   - </value>
448   - </lookup>
449   - <cluster_schema/>
450   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
451   - <xloc>410</xloc>
452   - <yloc>191</yloc>
453   - <draw>Y</draw>
454   - </GUI>
455   - </step>
456   -
457   - <step>
458   - <name>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</name>
459   - <type>ScriptValueMod</type>
460   - <description/>
461   - <distribute>Y</distribute>
462   - <custom_distribution/>
463   - <copies>1</copies>
464   - <partitioning>
465   - <method>none</method>
466   - <schema_name/>
467   - </partitioning>
468   - <compatible>N</compatible>
469   - <optimizationLevel>9</optimizationLevel>
470   - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
471   - <jsScript_name>Script 1</jsScript_name>
472   - <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var targetfieldname&#x3b; &#x2f;&#x2f; &#x76ee;&#x6807;&#x5b57;&#x6bb5;&#x540d;&#xa;var targettype&#x3b; &#x2f;&#x2f; &#x76ee;&#x6807;&#x7c7b;&#x578b;&#xa;var valuefieldname&#x3b; &#x2f;&#x2f; &#x503c;&#x5b57;&#x6bb5;&#x540d;&#xa;var keyvalue&#x3b; &#x2f;&#x2f; &#x5173;&#x952e;&#x5b57;&#x503c;&#xa;&#xa;if &#x28;bc_type &#x3d;&#x3d; &#x27;in&#x27;&#x29; &#x7b;&#xa; targetfieldname &#x3d; &#x27;&#x8fdb;&#x573a;&#x27; &#x2b; fcno&#x3b;&#xa;&#x7d; else if &#x28;bc_type &#x3d;&#x3d; &#x27;out&#x27;&#x29; &#x7b;&#xa; targetfieldname &#x3d; &#x27;&#x51fa;&#x573a;&#x27; &#x2b; fcno&#x3b;&#xa;&#x7d; else if &#x28;bc_type &#x3d;&#x3d; &#x27;normal&#x27;&#x29; &#x7b;&#xa; targetfieldname &#x3d; zdname &#x2b; fcno&#x3b;&#xa;&#x7d; else &#x7b;&#xa; targetfieldname &#x3d; zdname &#x2b; fcno&#x3b;&#xa;&#x7d; &#xa;&#xa;targettype &#x3d; &#x27;String&#x27;&#x3b;&#xa;valuefieldname &#x3d; &#x27;fcsj&#x27;&#x3b;&#xa;keyvalue &#x3d; fcno&#x3b;&#xa;</jsScript_script>
473   - </jsScript> </jsScripts> <fields> <field> <name>targetfieldname</name>
474   - <rename>targetfieldname</rename>
475   - <type>String</type>
476   - <length>-1</length>
477   - <precision>-1</precision>
478   - <replace>N</replace>
479   - </field> <field> <name>targettype</name>
480   - <rename>targettype</rename>
481   - <type>String</type>
482   - <length>-1</length>
483   - <precision>-1</precision>
484   - <replace>N</replace>
485   - </field> <field> <name>valuefieldname</name>
486   - <rename>valuefieldname</rename>
487   - <type>String</type>
488   - <length>-1</length>
489   - <precision>-1</precision>
490   - <replace>N</replace>
491   - </field> <field> <name>keyvalue</name>
492   - <rename>keyvalue</rename>
493   - <type>String</type>
494   - <length>-1</length>
495   - <precision>-1</precision>
496   - <replace>N</replace>
497   - </field> </fields> <cluster_schema/>
498   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
499   - <xloc>410</xloc>
500   - <yloc>64</yloc>
501   - <draw>Y</draw>
502   - </GUI>
503   - </step>
504   -
505   - <step>
506   - <name>&#x8ba1;&#x7b97;excel&#x8f93;&#x51fa;&#x5b57;&#x6bb5;</name>
507   - <type>ScriptValueMod</type>
508   - <description/>
509   - <distribute>Y</distribute>
510   - <custom_distribution/>
511   - <copies>1</copies>
512   - <partitioning>
513   - <method>none</method>
514   - <schema_name/>
515   - </partitioning>
516   - <compatible>N</compatible>
517   - <optimizationLevel>9</optimizationLevel>
518   - <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
519   - <jsScript_name>Script 1</jsScript_name>
520   - <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var fieldname&#x3b; &#x2f;&#x2f; &#x5b57;&#x6bb5;&#x540d;&#xa;var fieldtype&#x3b; &#x2f;&#x2f; &#x5b57;&#x6bb5;&#x7c7b;&#x578b;&#xa;&#xa;if &#x28;bc_type &#x3d;&#x3d; &#x27;in&#x27;&#x29; &#x7b;&#xa; fieldname &#x3d; &#x27;&#x8fdb;&#x573a;&#x27; &#x2b; fcno&#x3b;&#xa;&#x7d; else if &#x28;bc_type &#x3d;&#x3d; &#x27;out&#x27;&#x29; &#x7b;&#xa; fieldname &#x3d; &#x27;&#x51fa;&#x573a;&#x27; &#x2b; fcno&#x3b;&#xa;&#x7d; else if &#x28;bc_type &#x3d;&#x3d; &#x27;normal&#x27;&#x29; &#x7b;&#xa; fieldname &#x3d; zdname &#x2b; fcno&#x3b;&#xa;&#x7d; else &#x7b;&#xa; fieldname &#x3d; zdname &#x2b; fcno&#x3b;&#xa;&#x7d; &#xa;&#xa;fieldtype &#x3d; &#x27;String&#x27;&#x3b;&#xa;</jsScript_script>
521   - </jsScript> </jsScripts> <fields> <field> <name>fieldname</name>
522   - <rename>fieldname</rename>
523   - <type>String</type>
524   - <length>-1</length>
525   - <precision>-1</precision>
526   - <replace>N</replace>
527   - </field> <field> <name>fieldtype</name>
528   - <rename>fieldtype</rename>
529   - <type>String</type>
530   - <length>-1</length>
531   - <precision>-1</precision>
532   - <replace>N</replace>
533   - </field> </fields> <cluster_schema/>
534   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
535   - <xloc>410</xloc>
536   - <yloc>326</yloc>
537   - <draw>Y</draw>
538   - </GUI>
539   - </step>
540   -
541   - <step>
542   - <name>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</name>
543   - <type>SelectValues</type>
544   - <description/>
545   - <distribute>Y</distribute>
546   - <custom_distribution/>
547   - <copies>1</copies>
548   - <partitioning>
549   - <method>none</method>
550   - <schema_name/>
551   - </partitioning>
552   - <fields> <field> <name>fieldname</name>
553   - <rename/>
554   - <length>-2</length>
555   - <precision>-2</precision>
556   - </field> <field> <name>fieldtype</name>
557   - <rename/>
558   - <length>-2</length>
559   - <precision>-2</precision>
560   - </field> <field> <name>fcno</name>
561   - <rename/>
562   - <length>-2</length>
563   - <precision>-2</precision>
564   - </field> <select_unspecified>N</select_unspecified>
565   - </fields> <cluster_schema/>
566   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
567   - <xloc>533</xloc>
568   - <yloc>325</yloc>
569   - <draw>Y</draw>
570   - </GUI>
571   - </step>
572   -
573   - <step>
574   - <name>&#x751f;&#x6210;&#x8def;&#x724c;&#x5b57;&#x6bb5;</name>
575   - <type>RowGenerator</type>
576   - <description/>
577   - <distribute>Y</distribute>
578   - <custom_distribution/>
579   - <copies>1</copies>
580   - <partitioning>
581   - <method>none</method>
582   - <schema_name/>
583   - </partitioning>
584   - <fields>
585   - <field>
586   - <name>fieldname</name>
587   - <type>String</type>
588   - <format/>
589   - <currency/>
590   - <decimal/>
591   - <group/>
592   - <nullif>&#x8def;&#x724c;</nullif>
593   - <length>-1</length>
594   - <precision>-1</precision>
595   - <set_empty_string>N</set_empty_string>
596   - </field>
597   - <field>
598   - <name>fieldtype</name>
599   - <type>String</type>
600   - <format/>
601   - <currency/>
602   - <decimal/>
603   - <group/>
604   - <nullif>String</nullif>
605   - <length>-1</length>
606   - <precision>-1</precision>
607   - <set_empty_string>N</set_empty_string>
608   - </field>
609   - <field>
610   - <name>fcno</name>
611   - <type>Integer</type>
612   - <format/>
613   - <currency/>
614   - <decimal/>
615   - <group/>
616   - <nullif>0</nullif>
617   - <length>-1</length>
618   - <precision>-1</precision>
619   - <set_empty_string>N</set_empty_string>
620   - </field>
621   - </fields>
622   - <limit>1</limit>
623   - <never_ending>N</never_ending>
624   - <interval_in_ms>5000</interval_in_ms>
625   - <row_time_field>now</row_time_field>
626   - <last_time_field>FiveSecondsAgo</last_time_field>
627   - <cluster_schema/>
628   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
629   - <xloc>530</xloc>
630   - <yloc>194</yloc>
631   - <draw>Y</draw>
632   - </GUI>
633   - </step>
634   -
635   - <step>
636   - <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</name>
637   - <type>SortRows</type>
638   - <description/>
639   - <distribute>Y</distribute>
640   - <custom_distribution/>
641   - <copies>1</copies>
642   - <partitioning>
643   - <method>none</method>
644   - <schema_name/>
645   - </partitioning>
646   - <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>
647   - <prefix>out</prefix>
648   - <sort_size>1000000</sort_size>
649   - <free_memory/>
650   - <compress>N</compress>
651   - <compress_variable/>
652   - <unique_rows>N</unique_rows>
653   - <fields>
654   - <field>
655   - <name>fcno</name>
656   - <ascending>Y</ascending>
657   - <case_sensitive>N</case_sensitive>
658   - <presorted>N</presorted>
659   - </field>
660   - </fields>
661   - <cluster_schema/>
662   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
663   - <xloc>642</xloc>
664   - <yloc>325</yloc>
665   - <draw>Y</draw>
666   - </GUI>
667   - </step>
668   -
669   - <step_error_handling>
670   - </step_error_handling>
671   - <slave-step-copy-partition-distribution>
672   -</slave-step-copy-partition-distribution>
673   - <slave_transformation>N</slave_transformation>
674   -
675   -</transformation>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<transformation>
  3 + <info>
  4 + <name>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x5bfc;&#x51fa;&#x5143;&#x6570;&#x636e;</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 + <parameter>
  13 + <name>filepath</name>
  14 + <default_value>&#x2f;Users&#x2f;xu&#x2f;resource&#x2f;project_code&#x2f;runtime_temp&#x2f;bsth_control_u_d_files&#x2f;ttinfodetail_test.xls</default_value>
  15 + <description>&#x65f6;&#x523b;&#x8868;excel&#x5bfc;&#x51fa;&#x6587;&#x4ef6;&#x8def;&#x5f84;&#x540d;</description>
  16 + </parameter>
  17 + <parameter>
  18 + <name>injectktrfile</name>
  19 + <default_value>&#x2f;Users&#x2f;xu&#x2f;resource&#x2f;project_code&#x2f;bsth_project&#x2f;bsth_control&#x2f;src&#x2f;main&#x2f;resources&#x2f;datatools&#x2f;ktrs&#x2f;ttinfodetailDataOutput.ktr</default_value>
  20 + <description>&#x6ce8;&#x5165;&#x5143;&#x6570;&#x636e;&#x7684;ktr&#x6587;&#x4ef6;</description>
  21 + </parameter>
  22 + <parameter>
  23 + <name>ttinfoid</name>
  24 + <default_value>56</default_value>
  25 + <description>&#x65f6;&#x523b;&#x8868;id</description>
  26 + </parameter>
  27 + </parameters>
  28 + <log>
  29 +<trans-log-table><connection/>
  30 +<schema/>
  31 +<table/>
  32 +<size_limit_lines/>
  33 +<interval/>
  34 +<timeout_days/>
  35 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>
  36 +<perf-log-table><connection/>
  37 +<schema/>
  38 +<table/>
  39 +<interval/>
  40 +<timeout_days/>
  41 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>
  42 +<channel-log-table><connection/>
  43 +<schema/>
  44 +<table/>
  45 +<timeout_days/>
  46 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>
  47 +<step-log-table><connection/>
  48 +<schema/>
  49 +<table/>
  50 +<timeout_days/>
  51 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>
  52 +<metrics-log-table><connection/>
  53 +<schema/>
  54 +<table/>
  55 +<timeout_days/>
  56 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>
  57 + </log>
  58 + <maxdate>
  59 + <connection/>
  60 + <table/>
  61 + <field/>
  62 + <offset>0.0</offset>
  63 + <maxdiff>0.0</maxdiff>
  64 + </maxdate>
  65 + <size_rowset>10000</size_rowset>
  66 + <sleep_time_empty>50</sleep_time_empty>
  67 + <sleep_time_full>50</sleep_time_full>
  68 + <unique_connections>N</unique_connections>
  69 + <feedback_shown>Y</feedback_shown>
  70 + <feedback_size>50000</feedback_size>
  71 + <using_thread_priorities>Y</using_thread_priorities>
  72 + <shared_objects_file/>
  73 + <capture_step_performance>N</capture_step_performance>
  74 + <step_performance_capturing_delay>1000</step_performance_capturing_delay>
  75 + <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
  76 + <dependencies>
  77 + </dependencies>
  78 + <partitionschemas>
  79 + </partitionschemas>
  80 + <slaveservers>
  81 + </slaveservers>
  82 + <clusterschemas>
  83 + </clusterschemas>
  84 + <created_user>-</created_user>
  85 + <created_date>2016&#x2f;11&#x2f;15 15&#x3a;02&#x3a;41.624</created_date>
  86 + <modified_user>-</modified_user>
  87 + <modified_date>2016&#x2f;11&#x2f;15 15&#x3a;02&#x3a;41.624</modified_date>
  88 + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>
  89 + <is_key_private>N</is_key_private>
  90 + </info>
  91 + <notepads>
  92 + </notepads>
  93 + <connection>
  94 + <name>bus_control_variable</name>
  95 + <server>&#x24;&#x7b;v_db_ip&#x7d;</server>
  96 + <type>MYSQL</type>
  97 + <access>Native</access>
  98 + <database>&#x24;&#x7b;v_db_dname&#x7d;</database>
  99 + <port>3306</port>
  100 + <username>&#x24;&#x7b;v_db_uname&#x7d;</username>
  101 + <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>
  102 + <servername/>
  103 + <data_tablespace/>
  104 + <index_tablespace/>
  105 + <attributes>
  106 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  107 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  108 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  109 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  110 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  111 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  112 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  113 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  114 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  115 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  116 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  117 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  118 + </attributes>
  119 + </connection>
  120 + <connection>
  121 + <name>bus_control_&#x516c;&#x53f8;_201</name>
  122 + <server>localhost</server>
  123 + <type>MYSQL</type>
  124 + <access>Native</access>
  125 + <database>control</database>
  126 + <port>3306</port>
  127 + <username>root</username>
  128 + <password>Encrypted </password>
  129 + <servername/>
  130 + <data_tablespace/>
  131 + <index_tablespace/>
  132 + <attributes>
  133 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  134 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  135 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  136 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  137 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  138 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  139 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  140 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  141 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  142 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  143 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  144 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  145 + </attributes>
  146 + </connection>
  147 + <connection>
  148 + <name>bus_control_&#x672c;&#x673a;</name>
  149 + <server>localhost</server>
  150 + <type>MYSQL</type>
  151 + <access>Native</access>
  152 + <database>control</database>
  153 + <port>3306</port>
  154 + <username>root</username>
  155 + <password>Encrypted </password>
  156 + <servername/>
  157 + <data_tablespace/>
  158 + <index_tablespace/>
  159 + <attributes>
  160 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  161 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  162 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  163 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  164 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  165 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  166 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  167 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  168 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  169 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  170 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  171 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  172 + </attributes>
  173 + </connection>
  174 + <connection>
  175 + <name>xlab_mysql_youle</name>
  176 + <server>101.231.124.8</server>
  177 + <type>MYSQL</type>
  178 + <access>Native</access>
  179 + <database>xlab_youle</database>
  180 + <port>45687</port>
  181 + <username>xlab-youle</username>
  182 + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>
  183 + <servername/>
  184 + <data_tablespace/>
  185 + <index_tablespace/>
  186 + <attributes>
  187 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  188 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  189 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  190 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  191 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  192 + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>
  193 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  194 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  195 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  196 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  197 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  198 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  199 + </attributes>
  200 + </connection>
  201 + <connection>
  202 + <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>
  203 + <server>localhost</server>
  204 + <type>MYSQL</type>
  205 + <access>Native</access>
  206 + <database>xlab_youle</database>
  207 + <port>3306</port>
  208 + <username>root</username>
  209 + <password>Encrypted </password>
  210 + <servername/>
  211 + <data_tablespace/>
  212 + <index_tablespace/>
  213 + <attributes>
  214 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  215 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  216 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  217 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  218 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  219 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  220 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  221 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  222 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  223 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  224 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  225 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  226 + </attributes>
  227 + </connection>
  228 + <connection>
  229 + <name>xlab_youle</name>
  230 + <server/>
  231 + <type>MYSQL</type>
  232 + <access>JNDI</access>
  233 + <database>xlab_youle</database>
  234 + <port>1521</port>
  235 + <username/>
  236 + <password>Encrypted </password>
  237 + <servername/>
  238 + <data_tablespace/>
  239 + <index_tablespace/>
  240 + <attributes>
  241 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  242 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  243 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  244 + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
  245 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  246 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  247 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  248 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  249 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  250 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  251 + </attributes>
  252 + </connection>
  253 + <order>
  254 + <hop> <from>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x5206;&#x7ec4;&#x6570;&#x636e;</from><to>&#x8fc7;&#x6ee4;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  255 + <hop> <from>&#x8fc7;&#x6ee4;&#x8bb0;&#x5f55;</from><to>&#x8ba1;&#x7b97;&#x7ad9;&#x70b9;</to><enabled>Y</enabled> </hop>
  256 + <hop> <from>&#x8ba1;&#x7b97;&#x7ad9;&#x70b9;</from><to>&#x67e5;&#x627e;&#x7ad9;&#x70b9;&#x540d;</to><enabled>Y</enabled> </hop>
  257 + <hop> <from>&#x67e5;&#x627e;&#x7ad9;&#x70b9;&#x540d;</from><to>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</to><enabled>Y</enabled> </hop>
  258 + <hop> <from>&#x67e5;&#x627e;&#x7ad9;&#x70b9;&#x540d;</from><to>&#x8ba1;&#x7b97;excel&#x8f93;&#x51fa;&#x5b57;&#x6bb5;</to><enabled>Y</enabled> </hop>
  259 + <hop> <from>&#x8ba1;&#x7b97;excel&#x8f93;&#x51fa;&#x5b57;&#x6bb5;</from><to>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</to><enabled>Y</enabled> </hop>
  260 + <hop> <from>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  261 + <hop> <from>&#x751f;&#x6210;&#x8def;&#x724c;&#x5b57;&#x6bb5;</from><to>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</to><enabled>Y</enabled> </hop>
  262 + <hop> <from>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</from><to>ETL&#x5143;&#x6570;&#x636e;&#x6ce8;&#x5165;</to><enabled>Y</enabled> </hop>
  263 + <hop> <from>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</from><to>ETL&#x5143;&#x6570;&#x636e;&#x6ce8;&#x5165;</to><enabled>Y</enabled> </hop>
  264 + </order>
  265 + <step>
  266 + <name>ETL&#x5143;&#x6570;&#x636e;&#x6ce8;&#x5165;</name>
  267 + <type>MetaInject</type>
  268 + <description/>
  269 + <distribute>Y</distribute>
  270 + <custom_distribution/>
  271 + <copies>1</copies>
  272 + <partitioning>
  273 + <method>none</method>
  274 + <schema_name/>
  275 + </partitioning>
  276 + <specification_method>filename</specification_method>
  277 + <trans_object_id/>
  278 + <trans_name/>
  279 + <filename>&#x24;&#x7b;injectktrfile&#x7d;</filename>
  280 + <directory_path/>
  281 + <source_step/>
  282 + <source_output_fields> </source_output_fields> <target_file/>
  283 + <no_execution>N</no_execution>
  284 + <stream_source_step/>
  285 + <stream_target_step/>
  286 + <mappings> <mapping> <target_step_name>&#x5217;&#x8f6c;&#x884c;</target_step_name>
  287 + <target_attribute_key>TARGET_TYPE</target_attribute_key>
  288 + <target_detail>Y</target_detail>
  289 + <source_step>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</source_step>
  290 + <source_field>targettype</source_field>
  291 + </mapping> <mapping> <target_step_name>Excel&#x8f93;&#x51fa;</target_step_name>
  292 + <target_attribute_key>TYPE</target_attribute_key>
  293 + <target_detail>Y</target_detail>
  294 + <source_step>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</source_step>
  295 + <source_field>fieldtype</source_field>
  296 + </mapping> <mapping> <target_step_name>&#x5217;&#x8f6c;&#x884c;</target_step_name>
  297 + <target_attribute_key>NAME</target_attribute_key>
  298 + <target_detail>Y</target_detail>
  299 + <source_step>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</source_step>
  300 + <source_field>valuefieldname</source_field>
  301 + </mapping> <mapping> <target_step_name>Excel&#x8f93;&#x51fa;</target_step_name>
  302 + <target_attribute_key>NAME</target_attribute_key>
  303 + <target_detail>Y</target_detail>
  304 + <source_step>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</source_step>
  305 + <source_field>fieldname</source_field>
  306 + </mapping> <mapping> <target_step_name>&#x5217;&#x8f6c;&#x884c;</target_step_name>
  307 + <target_attribute_key>TARGET_NAME</target_attribute_key>
  308 + <target_detail>Y</target_detail>
  309 + <source_step>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</source_step>
  310 + <source_field>targetfieldname</source_field>
  311 + </mapping> <mapping> <target_step_name>&#x5217;&#x8f6c;&#x884c;</target_step_name>
  312 + <target_attribute_key>KEY_VALUE</target_attribute_key>
  313 + <target_detail>Y</target_detail>
  314 + <source_step>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</source_step>
  315 + <source_field>keyvalue</source_field>
  316 + </mapping> </mappings> <cluster_schema/>
  317 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  318 + <xloc>640</xloc>
  319 + <yloc>64</yloc>
  320 + <draw>Y</draw>
  321 + </GUI>
  322 + </step>
  323 +
  324 + <step>
  325 + <name>&#x65f6;&#x523b;&#x8868;&#x660e;&#x7ec6;&#x5206;&#x7ec4;&#x6570;&#x636e;</name>
  326 + <type>TableInput</type>
  327 + <description/>
  328 + <distribute>Y</distribute>
  329 + <custom_distribution/>
  330 + <copies>1</copies>
  331 + <partitioning>
  332 + <method>none</method>
  333 + <schema_name/>
  334 + </partitioning>
  335 + <connection>bus_control_variable</connection>
  336 + <sql>select &#xa;fcno&#xa;, min&#x28;xl_dir&#x29; xl_dir&#xa;,min&#x28;qdz&#x29; qdz&#xa;,min&#x28;zdz&#x29; zdz&#xa;,bc_type &#xa;from bsth_c_s_ttinfo_detail&#xa;where ttinfo &#x3d; &#x24;&#x7b;ttinfoid&#x7d;&#xa;group by fcno,bc_type</sql>
  337 + <limit>0</limit>
  338 + <lookup/>
  339 + <execute_each_row>N</execute_each_row>
  340 + <variables_active>Y</variables_active>
  341 + <lazy_conversion_active>N</lazy_conversion_active>
  342 + <cluster_schema/>
  343 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  344 + <xloc>56</xloc>
  345 + <yloc>185</yloc>
  346 + <draw>Y</draw>
  347 + </GUI>
  348 + </step>
  349 +
  350 + <step>
  351 + <name>&#x8fc7;&#x6ee4;&#x8bb0;&#x5f55;</name>
  352 + <type>FilterRows</type>
  353 + <description/>
  354 + <distribute>Y</distribute>
  355 + <custom_distribution/>
  356 + <copies>1</copies>
  357 + <partitioning>
  358 + <method>none</method>
  359 + <schema_name/>
  360 + </partitioning>
  361 +<send_true_to/>
  362 +<send_false_to/>
  363 + <compare>
  364 +<condition>
  365 + <negated>N</negated>
  366 + <leftvalue>bc_type</leftvalue>
  367 + <function>IS NOT NULL</function>
  368 + <rightvalue/>
  369 + </condition>
  370 + </compare>
  371 + <cluster_schema/>
  372 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  373 + <xloc>182</xloc>
  374 + <yloc>189</yloc>
  375 + <draw>Y</draw>
  376 + </GUI>
  377 + </step>
  378 +
  379 + <step>
  380 + <name>&#x8ba1;&#x7b97;&#x7ad9;&#x70b9;</name>
  381 + <type>ScriptValueMod</type>
  382 + <description/>
  383 + <distribute>Y</distribute>
  384 + <custom_distribution/>
  385 + <copies>1</copies>
  386 + <partitioning>
  387 + <method>none</method>
  388 + <schema_name/>
  389 + </partitioning>
  390 + <compatible>N</compatible>
  391 + <optimizationLevel>9</optimizationLevel>
  392 + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
  393 + <jsScript_name>Script 1</jsScript_name>
  394 + <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var zd&#x3b;&#xa;&#xa;if &#x28;bc_type &#x3d;&#x3d; &#x27;in&#x27;&#x29; &#x7b;&#xa; zd &#x3d; qdz&#x3b;&#xa;&#x7d; else if &#x28;bc_type &#x3d;&#x3d; &#x27;out&#x27;&#x29; &#x7b;&#xa; zd &#x3d; zdz&#x3b;&#xa;&#x7d; else if &#x28;bc_type &#x3d;&#x3d; &#x27;normal&#x27;&#x29; &#x7b;&#xa; zd &#x3d; qdz&#x3b;&#xa;&#x7d; else &#x7b;&#xa; zd &#x3d; qdz&#x3b;&#xa;&#x7d;&#xa;</jsScript_script>
  395 + </jsScript> </jsScripts> <fields> <field> <name>zd</name>
  396 + <rename>zd</rename>
  397 + <type>String</type>
  398 + <length>-1</length>
  399 + <precision>-1</precision>
  400 + <replace>N</replace>
  401 + </field> </fields> <cluster_schema/>
  402 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  403 + <xloc>300</xloc>
  404 + <yloc>190</yloc>
  405 + <draw>Y</draw>
  406 + </GUI>
  407 + </step>
  408 +
  409 + <step>
  410 + <name>&#x67e5;&#x627e;&#x7ad9;&#x70b9;&#x540d;</name>
  411 + <type>DBLookup</type>
  412 + <description/>
  413 + <distribute>N</distribute>
  414 + <custom_distribution/>
  415 + <copies>1</copies>
  416 + <partitioning>
  417 + <method>none</method>
  418 + <schema_name/>
  419 + </partitioning>
  420 + <connection>bus_control_variable</connection>
  421 + <cache>N</cache>
  422 + <cache_load_all>N</cache_load_all>
  423 + <cache_size>0</cache_size>
  424 + <lookup>
  425 + <schema/>
  426 + <table>bsth_c_stationroute</table>
  427 + <orderby/>
  428 + <fail_on_multiple>N</fail_on_multiple>
  429 + <eat_row_on_failure>N</eat_row_on_failure>
  430 + <key>
  431 + <name>zd</name>
  432 + <field>station</field>
  433 + <condition>&#x3d;</condition>
  434 + <name2/>
  435 + </key>
  436 + <key>
  437 + <name>xl_dir</name>
  438 + <field>directions</field>
  439 + <condition>&#x3d;</condition>
  440 + <name2/>
  441 + </key>
  442 + <value>
  443 + <name>station_name</name>
  444 + <rename>zdname</rename>
  445 + <default/>
  446 + <type>String</type>
  447 + </value>
  448 + </lookup>
  449 + <cluster_schema/>
  450 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  451 + <xloc>410</xloc>
  452 + <yloc>191</yloc>
  453 + <draw>Y</draw>
  454 + </GUI>
  455 + </step>
  456 +
  457 + <step>
  458 + <name>&#x8ba1;&#x7b97;&#x53cd;&#x8303;&#x5f0f;&#x5143;&#x6570;&#x636e;</name>
  459 + <type>ScriptValueMod</type>
  460 + <description/>
  461 + <distribute>Y</distribute>
  462 + <custom_distribution/>
  463 + <copies>1</copies>
  464 + <partitioning>
  465 + <method>none</method>
  466 + <schema_name/>
  467 + </partitioning>
  468 + <compatible>N</compatible>
  469 + <optimizationLevel>9</optimizationLevel>
  470 + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
  471 + <jsScript_name>Script 1</jsScript_name>
  472 + <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var targetfieldname&#x3b; &#x2f;&#x2f; &#x76ee;&#x6807;&#x5b57;&#x6bb5;&#x540d;&#xa;var targettype&#x3b; &#x2f;&#x2f; &#x76ee;&#x6807;&#x7c7b;&#x578b;&#xa;var valuefieldname&#x3b; &#x2f;&#x2f; &#x503c;&#x5b57;&#x6bb5;&#x540d;&#xa;var keyvalue&#x3b; &#x2f;&#x2f; &#x5173;&#x952e;&#x5b57;&#x503c;&#xa;&#xa;if &#x28;bc_type &#x3d;&#x3d; &#x27;in&#x27;&#x29; &#x7b;&#xa; targetfieldname &#x3d; &#x27;&#x8fdb;&#x573a;&#x27; &#x2b; fcno&#x3b;&#xa;&#x7d; else if &#x28;bc_type &#x3d;&#x3d; &#x27;out&#x27;&#x29; &#x7b;&#xa; targetfieldname &#x3d; &#x27;&#x51fa;&#x573a;&#x27; &#x2b; fcno&#x3b;&#xa;&#x7d; else if &#x28;bc_type &#x3d;&#x3d; &#x27;normal&#x27;&#x29; &#x7b;&#xa; targetfieldname &#x3d; zdname &#x2b; fcno&#x3b;&#xa;&#x7d; else &#x7b;&#xa; targetfieldname &#x3d; zdname &#x2b; fcno&#x3b;&#xa;&#x7d; &#xa;&#xa;targettype &#x3d; &#x27;String&#x27;&#x3b;&#xa;valuefieldname &#x3d; &#x27;fcsj&#x27;&#x3b;&#xa;keyvalue &#x3d; fcno&#x3b;&#xa;</jsScript_script>
  473 + </jsScript> </jsScripts> <fields> <field> <name>targetfieldname</name>
  474 + <rename>targetfieldname</rename>
  475 + <type>String</type>
  476 + <length>-1</length>
  477 + <precision>-1</precision>
  478 + <replace>N</replace>
  479 + </field> <field> <name>targettype</name>
  480 + <rename>targettype</rename>
  481 + <type>String</type>
  482 + <length>-1</length>
  483 + <precision>-1</precision>
  484 + <replace>N</replace>
  485 + </field> <field> <name>valuefieldname</name>
  486 + <rename>valuefieldname</rename>
  487 + <type>String</type>
  488 + <length>-1</length>
  489 + <precision>-1</precision>
  490 + <replace>N</replace>
  491 + </field> <field> <name>keyvalue</name>
  492 + <rename>keyvalue</rename>
  493 + <type>String</type>
  494 + <length>-1</length>
  495 + <precision>-1</precision>
  496 + <replace>N</replace>
  497 + </field> </fields> <cluster_schema/>
  498 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  499 + <xloc>410</xloc>
  500 + <yloc>64</yloc>
  501 + <draw>Y</draw>
  502 + </GUI>
  503 + </step>
  504 +
  505 + <step>
  506 + <name>&#x8ba1;&#x7b97;excel&#x8f93;&#x51fa;&#x5b57;&#x6bb5;</name>
  507 + <type>ScriptValueMod</type>
  508 + <description/>
  509 + <distribute>Y</distribute>
  510 + <custom_distribution/>
  511 + <copies>1</copies>
  512 + <partitioning>
  513 + <method>none</method>
  514 + <schema_name/>
  515 + </partitioning>
  516 + <compatible>N</compatible>
  517 + <optimizationLevel>9</optimizationLevel>
  518 + <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
  519 + <jsScript_name>Script 1</jsScript_name>
  520 + <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;var fieldname&#x3b; &#x2f;&#x2f; &#x5b57;&#x6bb5;&#x540d;&#xa;var fieldtype&#x3b; &#x2f;&#x2f; &#x5b57;&#x6bb5;&#x7c7b;&#x578b;&#xa;&#xa;if &#x28;bc_type &#x3d;&#x3d; &#x27;in&#x27;&#x29; &#x7b;&#xa; fieldname &#x3d; &#x27;&#x8fdb;&#x573a;&#x27; &#x2b; fcno&#x3b;&#xa;&#x7d; else if &#x28;bc_type &#x3d;&#x3d; &#x27;out&#x27;&#x29; &#x7b;&#xa; fieldname &#x3d; &#x27;&#x51fa;&#x573a;&#x27; &#x2b; fcno&#x3b;&#xa;&#x7d; else if &#x28;bc_type &#x3d;&#x3d; &#x27;normal&#x27;&#x29; &#x7b;&#xa; fieldname &#x3d; zdname &#x2b; fcno&#x3b;&#xa;&#x7d; else &#x7b;&#xa; fieldname &#x3d; zdname &#x2b; fcno&#x3b;&#xa;&#x7d; &#xa;&#xa;fieldtype &#x3d; &#x27;String&#x27;&#x3b;&#xa;</jsScript_script>
  521 + </jsScript> </jsScripts> <fields> <field> <name>fieldname</name>
  522 + <rename>fieldname</rename>
  523 + <type>String</type>
  524 + <length>-1</length>
  525 + <precision>-1</precision>
  526 + <replace>N</replace>
  527 + </field> <field> <name>fieldtype</name>
  528 + <rename>fieldtype</rename>
  529 + <type>String</type>
  530 + <length>-1</length>
  531 + <precision>-1</precision>
  532 + <replace>N</replace>
  533 + </field> </fields> <cluster_schema/>
  534 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  535 + <xloc>410</xloc>
  536 + <yloc>326</yloc>
  537 + <draw>Y</draw>
  538 + </GUI>
  539 + </step>
  540 +
  541 + <step>
  542 + <name>&#x5b57;&#x6bb5;&#x9009;&#x62e9;</name>
  543 + <type>SelectValues</type>
  544 + <description/>
  545 + <distribute>Y</distribute>
  546 + <custom_distribution/>
  547 + <copies>1</copies>
  548 + <partitioning>
  549 + <method>none</method>
  550 + <schema_name/>
  551 + </partitioning>
  552 + <fields> <field> <name>fieldname</name>
  553 + <rename/>
  554 + <length>-2</length>
  555 + <precision>-2</precision>
  556 + </field> <field> <name>fieldtype</name>
  557 + <rename/>
  558 + <length>-2</length>
  559 + <precision>-2</precision>
  560 + </field> <field> <name>fcno</name>
  561 + <rename/>
  562 + <length>-2</length>
  563 + <precision>-2</precision>
  564 + </field> <select_unspecified>N</select_unspecified>
  565 + </fields> <cluster_schema/>
  566 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  567 + <xloc>533</xloc>
  568 + <yloc>325</yloc>
  569 + <draw>Y</draw>
  570 + </GUI>
  571 + </step>
  572 +
  573 + <step>
  574 + <name>&#x751f;&#x6210;&#x8def;&#x724c;&#x5b57;&#x6bb5;</name>
  575 + <type>RowGenerator</type>
  576 + <description/>
  577 + <distribute>Y</distribute>
  578 + <custom_distribution/>
  579 + <copies>1</copies>
  580 + <partitioning>
  581 + <method>none</method>
  582 + <schema_name/>
  583 + </partitioning>
  584 + <fields>
  585 + <field>
  586 + <name>fieldname</name>
  587 + <type>String</type>
  588 + <format/>
  589 + <currency/>
  590 + <decimal/>
  591 + <group/>
  592 + <nullif>&#x8def;&#x724c;</nullif>
  593 + <length>-1</length>
  594 + <precision>-1</precision>
  595 + <set_empty_string>N</set_empty_string>
  596 + </field>
  597 + <field>
  598 + <name>fieldtype</name>
  599 + <type>String</type>
  600 + <format/>
  601 + <currency/>
  602 + <decimal/>
  603 + <group/>
  604 + <nullif>String</nullif>
  605 + <length>-1</length>
  606 + <precision>-1</precision>
  607 + <set_empty_string>N</set_empty_string>
  608 + </field>
  609 + <field>
  610 + <name>fcno</name>
  611 + <type>Integer</type>
  612 + <format/>
  613 + <currency/>
  614 + <decimal/>
  615 + <group/>
  616 + <nullif>0</nullif>
  617 + <length>-1</length>
  618 + <precision>-1</precision>
  619 + <set_empty_string>N</set_empty_string>
  620 + </field>
  621 + </fields>
  622 + <limit>1</limit>
  623 + <never_ending>N</never_ending>
  624 + <interval_in_ms>5000</interval_in_ms>
  625 + <row_time_field>now</row_time_field>
  626 + <last_time_field>FiveSecondsAgo</last_time_field>
  627 + <cluster_schema/>
  628 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  629 + <xloc>530</xloc>
  630 + <yloc>194</yloc>
  631 + <draw>Y</draw>
  632 + </GUI>
  633 + </step>
  634 +
  635 + <step>
  636 + <name>&#x6392;&#x5e8f;&#x8bb0;&#x5f55;</name>
  637 + <type>SortRows</type>
  638 + <description/>
  639 + <distribute>Y</distribute>
  640 + <custom_distribution/>
  641 + <copies>1</copies>
  642 + <partitioning>
  643 + <method>none</method>
  644 + <schema_name/>
  645 + </partitioning>
  646 + <directory>&#x25;&#x25;java.io.tmpdir&#x25;&#x25;</directory>
  647 + <prefix>out</prefix>
  648 + <sort_size>1000000</sort_size>
  649 + <free_memory/>
  650 + <compress>N</compress>
  651 + <compress_variable/>
  652 + <unique_rows>N</unique_rows>
  653 + <fields>
  654 + <field>
  655 + <name>fcno</name>
  656 + <ascending>Y</ascending>
  657 + <case_sensitive>N</case_sensitive>
  658 + <presorted>N</presorted>
  659 + </field>
  660 + </fields>
  661 + <cluster_schema/>
  662 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  663 + <xloc>642</xloc>
  664 + <yloc>325</yloc>
  665 + <draw>Y</draw>
  666 + </GUI>
  667 + </step>
  668 +
  669 + <step_error_handling>
  670 + </step_error_handling>
  671 + <slave-step-copy-partition-distribution>
  672 +</slave-step-copy-partition-distribution>
  673 + <slave_transformation>N</slave_transformation>
  674 +
  675 +</transformation>
... ...
src/main/resources/static/pages/base/carpark/js/carpark-positions-function.js
... ... @@ -59,11 +59,11 @@ var PublicFunctions = function () {
59 59  
60 60 var shapesV = '';
61 61  
62   - if(r[0].carParkShapesType='d') {
  62 + if(r[0].carParkShapesType=='d') {
63 63  
64 64 shapesV = '多边形';
65 65  
66   - }else if(r[0].carParkShapesType='r') {
  66 + }else if(r[0].carParkShapesType=='r') {
67 67  
68 68 shapesV = '圆形';
69 69  
... ...
src/main/resources/static/pages/base/carpark/js/carpark-positions-map.js
... ... @@ -326,7 +326,6 @@ var CarParkPWorldsBMap = function () {
326 326  
327 327 // 编辑图形
328 328 editShapes : function(stationShapesTypeV,mindex) {
329   -
330 329 // 关闭信息窗口
331 330 marker.closeInfoWindow();
332 331  
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
... ... @@ -438,10 +438,10 @@ var PublicFunctions = function () {
438 438 // 刷行左边树
439 439 PublicFunctions.resjtreeDate(Line.id,stationRouteDirections);
440 440  
441   - /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:上行路段数据 */
  441 + /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:路段数据 */
442 442 GetAjaxData.getSectionRouteInfo(Line.id,stationRouteDirections,function(data) {
443 443  
444   - /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:上行路段数据> */
  444 + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
445 445 PublicFunctions.linePanlThree(Line.id,data,stationRouteDirections);
446 446  
447 447 });
... ... @@ -594,8 +594,45 @@ var PublicFunctions = function () {
594 594 $('#descriptionsTextarea').val(Section.descriptions);
595 595  
596 596 },
  597 + //lineId,data,direction
  598 + treeSectionClick: function(lineId,data,direction){
  599 + /** 获取站点路由信息 @param:<Line.id:线路Id;0:上行> @return:<resultdata:站点路由数据> */
  600 + WorldsBMap.clearMarkAndOverlays();
  601 + // 编辑路段数据
  602 + for(var d= 0; d<data.length;d++){
  603 +
  604 + // 地图折线坐标点集合
  605 + var polylineArray = [];
  606 + // 获取路段折线坐标字符串
  607 + var sectionBsectionVectorStr = data[d].sectionBsectionVector;
  608 +
  609 + if(sectionBsectionVectorStr==null) {
  610 +
  611 + continue;
  612 +
  613 + }
  614 +
  615 + // 切割段折线坐标字符串
  616 + var tempStr = sectionBsectionVectorStr.substring(11,sectionBsectionVectorStr.length-1);
  617 +
  618 + // 分割折线坐标字符串
  619 + var lineArray = tempStr.split(',');
  620 +
  621 + for(var i = 0;i<lineArray.length;i++) {
  622 +
  623 + polylineArray.push(new BMap.Point(lineArray[i].split(' ')[0],lineArray[i].split(' ')[1]));
  624 +
  625 + }
  626 + var index = parseInt(polylineArray.length/2);
  627 + var center = polylineArray[index];
  628 + /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */
  629 + WorldsBMap.drawingUpline(polylineArray,center);
  630 + /** 在地图上画点 @param:<point_center:中心坐标点> */
  631 + WorldsBMap.drawingUpStationPoint(center,data[d].name,d+1);
  632 + }
  633 + },
597 634  
598   - /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:上行路段数据> */
  635 + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
599 636 linePanlThree : function(lineId,data,direction) {
600 637  
601 638 /** 获取站点路由信息 @param:<Line.id:线路Id;0:上行> @return:<resultdata:站点路由数据> */
... ... @@ -603,18 +640,52 @@ var PublicFunctions = function () {
603 640  
604 641 WorldsBMap.clearMarkAndOverlays();
605 642  
  643 + var polyline_center;
  644 +
  645 + // 如果站点路由数据不为空
  646 + if(resultdata.length>0) {
  647 +
  648 + var ceter_index = Math.round(resultdata.length / 2);
  649 +
  650 + var ceterPointsStr = resultdata[ceter_index].bJwpoints;
  651 +
  652 + var ceterPointsArray = ceterPointsStr.split(' ');
  653 +
  654 + polyline_center = new BMap.Point(ceterPointsArray[0],ceterPointsArray[1]);
  655 +
  656 + // 遍历站点路由数据
  657 + for(var s = 0 ; s<resultdata.length;s++) {
  658 +
  659 + // 中心点坐标字符串
  660 + var bJwpointsStr = resultdata[s].bJwpoints;
  661 +
  662 + var stationName = resultdata[s].stationName;
  663 +
  664 + // 起个中心点坐标字符串
  665 + var bJwpointsArray = bJwpointsStr.split(' ');
  666 +
  667 + // 设置中心点
  668 + var point_center = new BMap.Point(bJwpointsArray[0],bJwpointsArray[1]);
  669 +
  670 + /** 在地图上画点 @param:<point_center:中心坐标点> */
  671 + WorldsBMap.drawingUpStationPoint(point_center,stationName,s+1);
  672 +
  673 + }
  674 +
  675 + }
  676 +
606 677 // 路段数据长度
607 678 var dataLen = data.length;
608   -
  679 + //debugger;
609 680 // 如果大于零
610 681 if(dataLen>0) {
611 682  
612   - // 地图折线坐标点集合
613   - var polylineArray = [];
614   -
615 683 // 编辑路段数据
616 684 for(var d= 0; d<dataLen;d++){
617 685  
  686 + // 地图折线坐标点集合
  687 + var polylineArray = [];
  688 +
618 689 // 获取路段折线坐标字符串
619 690 var sectionBsectionVectorStr = data[d].sectionBsectionVector;
620 691  
... ... @@ -635,36 +706,10 @@ var PublicFunctions = function () {
635 706 polylineArray.push(new BMap.Point(lineArray[i].split(' ')[0],lineArray[i].split(' ')[1]));
636 707  
637 708 }
  709 + /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */
  710 + WorldsBMap.drawingUpline(polylineArray,polyline_center);
638 711  
639 712 }
640   -
641   - /** 在地图上画出线路走向 @param:<polylineArray:地图折线坐标点集合;resultdata:站点路由数据> */
642   - WorldsBMap.drawingUpline(polylineArray,resultdata);
643   -
644   - // 如果站点路由数据不为空
645   - if(resultdata.length>0) {
646   -
647   - // 遍历站点路由数据
648   - for(var s = 0 ; s<resultdata.length;s++) {
649   -
650   - // 中心点坐标字符串
651   - var bJwpointsStr = resultdata[s].bJwpoints;
652   -
653   - var stationName = resultdata[s].stationName;
654   -
655   - // 起个中心点坐标字符串
656   - var bJwpointsArray = bJwpointsStr.split(' ');
657   -
658   - // 设置中心点
659   - var point_center = new BMap.Point(bJwpointsArray[0],bJwpointsArray[1]);
660   -
661   - /** 在地图上画点 @param:<point_center:中心坐标点> */
662   - WorldsBMap.drawingUpStationPoint(point_center,stationName,s+1);
663   -
664   - }
665   -
666   - }
667   -
668 713 }
669 714  
670 715 });
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
... ... @@ -651,10 +651,9 @@ var WorldsBMap = function () {
651 651 },
652 652  
653 653 // 在地图上画出上行线路走向
654   - drawingUpline : function (polylineArray,resultdata) {
655   -
656   - WorldsBMap.clearMarkAndOverlays();
  654 + drawingUpline : function (polylineArray,polyline_center) {
657 655  
  656 + /*WorldsBMap.clearMarkAndOverlays();*/
658 657 polyUpline = '';
659 658  
660 659 // 创建线路走向
... ... @@ -663,13 +662,13 @@ var WorldsBMap = function () {
663 662 // 把折线添加到地图上
664 663 mapBValue.addOverlay(polyUpline);
665 664  
666   - var ceter_index = Math.round(resultdata.length / 2);
  665 + /*var ceter_index = Math.round(resultdata.length / 2);
667 666  
668 667 var ceterPointsStr = resultdata[ceter_index].bJwpoints;
669 668  
670 669 var ceterPointsArray = ceterPointsStr.split(' ');
671 670  
672   - var polyline_center = new BMap.Point(ceterPointsArray[0],ceterPointsArray[1]);
  671 + var polyline_center = new BMap.Point(ceterPointsArray[0],ceterPointsArray[1]);*/
673 672  
674 673 var PanOptions_ ={noAnimation :true};
675 674  
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-reload.js
... ... @@ -62,10 +62,10 @@ $(function(){
62 62 /** 初始化下行树 @param:<Line.id:线路Id;0:下行> */
63 63 PublicFunctions.TreeUpOrDown(Line.id,'1');
64 64  
65   - /** 查询上行路段信息 @param:<Line.id:线路Id;0:上行> @return:data:上行路段数据 */
  65 + /** 查询路段信息 @param:<Line.id:线路Id;0:上行> @return:data:路段数据 */
66 66 GetAjaxData.getSectionRouteInfo(Line.id,'0',function(data) {
67 67  
68   - /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:上行路段数据> */
  68 + /** 在地图上画出线路走向 @param:<Line.id:线路Id;0:上行;data:路段数据> */
69 69 PublicFunctions.linePanlThree(Line.id,data,'0');
70 70  
71 71 });
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-treedata.js
... ... @@ -57,8 +57,10 @@ var StationTreeData = function(){
57 57 // 线路ID
58 58 var Line = LineObj.getLineObj();
59 59  
  60 + /*// 百度地图画路段
  61 + PublicFunctions.linePanlThree(Line.id,polylineArray,dire_);*/
60 62 // 百度地图画路段
61   - PublicFunctions.linePanlThree(Line.id,polylineArray,dire_);
  63 + PublicFunctions.treeSectionClick(Line.id,polylineArray,dire_);
62 64  
63 65 }
64 66  
... ... @@ -151,7 +153,8 @@ var StationTreeData = function(){
151 153 var polylineArray_ = [edtste];
152 154  
153 155 // 百度地图画路段
154   - PublicFunctions.linePanlThree(edtste.sectionrouteLine,polylineArray_,edtste.sectionrouteDirections);
  156 + // PublicFunctions.linePanlThree(edtste.sectionrouteLine,polylineArray_,edtste.sectionrouteDirections);
  157 + PublicFunctions.treeSectionClick(Line.id,polylineArray,dire_);
155 158  
156 159 parmasObj();
157 160  
... ...
src/main/resources/static/pages/forms/mould/list.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/waybillday.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/waybillday.html
... ... @@ -118,9 +118,11 @@
118 118 }
119 119 });
120 120  
  121 + var line;
  122 + var date;
121 123 $("#query").on("click",function(){
122   - var line = $("#line").val();
123   - var date = $("#date").val();
  124 + line = $("#line").val();
  125 + date = $("#date").val();
124 126 $post('/mcy_forms/waybillday',{line:line,date:date},function(result){
125 127 $.each(result, function(i, obj) {
126 128 obj.requestType = reqCodeMap[obj.requestType];
... ... @@ -132,18 +134,11 @@
132 134 });
133 135 });
134 136  
135   - //导出
136   -// $("#export").on("click",function(){
137   -// $get('/mcy_forms/waybilldayExcel',{line:line,date:date,type:'export'},function(result){
138   -// window.open("/downloadFile/download?fileName=行车路单日报表"+moment(date).format("YYYYMMDD"));
139   -// });
140   -// });
141 137 $("#export").on("click",function(){
142   -
143   - $post('/mcy_forms/waybilldayExcel',{line:line,date:date},function(result){
144   - window.open("/downloadFile/download?fileName="+line);
  138 + $post('/mcy_export/waybilldayExport',{line:line,date:date,type:'export'},function(result){
  139 + window.open("/downloadFile/download?fileName=行车路单日报表"+moment(date).format("YYYYMMDD"));
145 140 });
146   - });
  141 + });
147 142 });
148 143 </script>
149 144 <script type="text/html" id="waybillday">
... ...
src/main/resources/static/pages/oil/checkJyryList.html
... ... @@ -136,8 +136,9 @@
136 136 {{obj.bz}}
137 137 </td>
138 138 <td>
139   - <a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>
140   - </td>
  139 + <!-- <a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>
  140 + -->
  141 +</td>
141 142 </tr>
142 143 {{/each}}
143 144 {{if list.length == 0}}
... ...
src/main/resources/static/pages/oil/cylList.html
... ... @@ -22,7 +22,7 @@
22 22 <div class="actions">
23 23 <a class="btn btn-circle blue" href="cylAdd.html" data-pjax><i class="fa fa-plus"></i> 添加</a>
24 24 <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> -->
25   - <div class="btn-group">
  25 + <!-- <div class="btn-group">
26 26 <a class="btn red btn-outline btn-circle" href="javascript:;"
27 27 data-toggle="dropdown"> <i class="fa fa-share"></i> <span
28 28 class="hidden-xs"> 系统工具 </span> <i class="fa fa-angle-down"></i>
... ... @@ -43,7 +43,7 @@
43 43 class="tool-action"> <i class="fa fa-refresh"></i> 刷新数据
44 44 </a></li>
45 45 </ul>
46   - </div>
  46 + </div> -->
47 47 </div>
48 48 </div>
49 49 <div class="portlet-body">
... ... @@ -115,7 +115,7 @@
115 115 {{obj.updatetime}}
116 116 </td>
117 117 <td>
118   - <a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>
  118 + <!--<a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>-->
119 119 </td>
120 120 </tr>
121 121 {{/each}}
... ...
src/main/resources/static/pages/oil/jyszAdd.html
... ... @@ -21,7 +21,10 @@
21 21 <label class="col-md-3 control-label">公司</label>
22 22 <div class="col-md-9">
23 23 <select class="form-control input-medium " name="gsdm">
24   - <option value="77">闵行公交</option>
  24 + <option value="22">金高公交</option>
  25 + <option value="05">杨高公交</option>
  26 + <option value="55">上南公交</option>
  27 + <option value="26">南汇公交</option>
25 28 </select>
26 29 </div>
27 30 </div>
... ...
src/main/resources/static/pages/oil/jyszList.html
... ... @@ -105,7 +105,7 @@
105 105 <td>{{obj.xgr}}</td>
106 106 <td>{{obj.createDate}}</td>
107 107 <td>
108   - <a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>
  108 + <!--<a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>-->
109 109 </td>
110 110 </tr>
111 111 {{/each}}
... ...
src/main/resources/static/pages/oil/list.html
... ... @@ -42,7 +42,7 @@
42 42 </a></li>
43 43 <li class="divider"></li>
44 44 <li><a href="javascript:;" data-action="3"
45   - class="tool-action"> <i class="fa fa-file-excel-o"></i>
  45 + class="tool-action" id="export"> <i class="fa fa-file-excel-o"></i>
46 46 导出Excel
47 47 </a></li>
48 48 </ul>
... ... @@ -57,30 +57,30 @@
57 57 <thead>
58 58 <tr role="row" class="filter">
59 59 <td colspan="3">
60   -<!-- 公司: -->
61   -<!-- <select name="ssgsdm"> -->
62   -<!-- <option value="">请选择...</option> -->
63   -<!-- <option value="1">可用</option> -->
64   -<!-- <option value="0">禁用</option> -->
65   -<!-- </select> -->
  60 + <!-- 公司:
  61 + <select name="ssgsdm" id="ssgsdm">
  62 + <option value="">请选择...</option>
  63 + <option value="1">可用</option>
  64 + <option value="0">禁用</option>
  65 + </select> -->
66 66 </td>
67   -
  67 + <td >
68 68 <!-- <select name="fgsdm"> -->
69 69 <!-- <option value="">请选择...</option> -->
70 70 <!-- <option value="1">可用</option> -->
71 71 <!-- <option value="0">禁用</option> -->
72 72 <!-- </select> -->
73   - <td>
  73 +
74 74 日期:
75 75 </td>
76   - <td colspan="2">
77   - <input type="text" style="width: 80px" name="rq" id="rq"/>
  76 + <td colspan="2">
  77 + <input type="text" style="width: 80px" name="rq" id="rq"/>
78 78 </td>
79 79 <td colspan="2">
80 80 线路:
81 81 </td>
82 82 <td colspan="3">
83   - <select class="form-control" name="xlbm" id="xlbm" style="width: 120px;"></select>
  83 + <select class="form-control" name="xlbm_eq" id="xlbm" style="width: 120px;"></select>
84 84 &nbsp;
85 85 </td>
86 86 <td colspan="2">
... ... @@ -118,7 +118,7 @@
118 118 <th width="5%">当日总里程</th>
119 119 <th width="5%">数据类型</th>
120 120 <th width="5%">百公里油耗</th>
121   - <th width="5%">操作</th>
  121 +<!-- <th width="5%">操作</th> -->
122 122 </tr>
123 123 </thead>
124 124 <tbody></tbody>
... ... @@ -196,7 +196,7 @@
196 196 {{obj.bglyh}}
197 197 </td>
198 198 <td>
199   - <a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>
  199 + <!--<a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>-->
200 200 </td>
201 201 </tr>
202 202 {{/each}}
... ... @@ -405,9 +405,20 @@ $(function(){
405 405 return;
406 406 }
407 407  
408   -
409   - page = num - 1;
410   - jsDoQuery(null, false);
  408 + var cells = $('tr.filter')[0].cells
  409 + ,params = {}
  410 + ,name;
  411 + $.each(cells, function(i, cell){
  412 + var items = $('input,select', cell);
  413 + for(var j = 0, item; item = items[j++];){
  414 + name = $(item).attr('name');
  415 + if(name){
  416 + params[name] = $(item).val();
  417 + }
  418 + }
  419 + });
  420 + page = num - 1;
  421 + jsDoQuery(params, true);
411 422 }
412 423 });
413 424 }
... ... @@ -505,6 +516,33 @@ $(function(){
505 516 }
506 517 })
507 518  
  519 +
  520 +//导出
  521 +
  522 + $("#export").on("click",function(){
  523 + if($("#rq").val()!=""){
  524 + var cells = $('tr.filter')[0].cells
  525 + ,params = {}
  526 + ,name;
  527 + $.each(cells, function(i, cell){
  528 + var items = $('input,select', cell);
  529 + for(var j = 0, item; item = items[j++];){
  530 + name = $(item).attr('name');
  531 + if(name){
  532 + params[name] = $(item).val();
  533 + }
  534 + }
  535 + });
  536 + console.log(params);
  537 + $post('/ylb/listExport',params,function(result){
  538 + console.log(result);
  539 + window.open("/downloadFile/download?fileName=进出场存油量"+moment($("#rq").val()).format("YYYYMMDD"));
  540 + });
  541 + }else{
  542 + layer.msg('请选择日期.');
  543 + }
  544 + });
  545 +
508 546 });
509 547 //改变状态
510 548 function startOptJzylLink(id){
... ... @@ -526,5 +564,8 @@ function startOptJzylLink(id){
526 564 .on('save', function(e, params) {
527 565 $('#'+id).text(params.newValue);
528 566 });
  567 +
  568 +
  569 +
529 570 }
530 571 </script>
531 572 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/core.js 0 → 100644
  1 +/*!
  2 + * jQuery UI Core 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/category/ui-core/
  10 + */
  11 +(function( factory ) {
  12 + if ( typeof define === "function" && define.amd ) {
  13 +
  14 + // AMD. Register as an anonymous module.
  15 + define( [ "jquery" ], factory );
  16 + } else {
  17 +
  18 + // Browser globals
  19 + factory( jQuery );
  20 + }
  21 +}(function( $ ) {
  22 +
  23 +// $.ui might exist from components with no dependencies, e.g., $.ui.position
  24 +$.ui = $.ui || {};
  25 +
  26 +$.extend( $.ui, {
  27 + version: "1.11.1",
  28 +
  29 + keyCode: {
  30 + BACKSPACE: 8,
  31 + COMMA: 188,
  32 + DELETE: 46,
  33 + DOWN: 40,
  34 + END: 35,
  35 + ENTER: 13,
  36 + ESCAPE: 27,
  37 + HOME: 36,
  38 + LEFT: 37,
  39 + PAGE_DOWN: 34,
  40 + PAGE_UP: 33,
  41 + PERIOD: 190,
  42 + RIGHT: 39,
  43 + SPACE: 32,
  44 + TAB: 9,
  45 + UP: 38
  46 + }
  47 +});
  48 +
  49 +// plugins
  50 +$.fn.extend({
  51 + scrollParent: function( includeHidden ) {
  52 + var position = this.css( "position" ),
  53 + excludeStaticParent = position === "absolute",
  54 + overflowRegex = includeHidden ? /(auto|scroll|hidden)/ : /(auto|scroll)/,
  55 + scrollParent = this.parents().filter( function() {
  56 + var parent = $( this );
  57 + if ( excludeStaticParent && parent.css( "position" ) === "static" ) {
  58 + return false;
  59 + }
  60 + return overflowRegex.test( parent.css( "overflow" ) + parent.css( "overflow-y" ) + parent.css( "overflow-x" ) );
  61 + }).eq( 0 );
  62 +
  63 + return position === "fixed" || !scrollParent.length ? $( this[ 0 ].ownerDocument || document ) : scrollParent;
  64 + },
  65 +
  66 + uniqueId: (function() {
  67 + var uuid = 0;
  68 +
  69 + return function() {
  70 + return this.each(function() {
  71 + if ( !this.id ) {
  72 + this.id = "ui-id-" + ( ++uuid );
  73 + }
  74 + });
  75 + };
  76 + })(),
  77 +
  78 + removeUniqueId: function() {
  79 + return this.each(function() {
  80 + if ( /^ui-id-\d+$/.test( this.id ) ) {
  81 + $( this ).removeAttr( "id" );
  82 + }
  83 + });
  84 + }
  85 +});
  86 +
  87 +// selectors
  88 +function focusable( element, isTabIndexNotNaN ) {
  89 + var map, mapName, img,
  90 + nodeName = element.nodeName.toLowerCase();
  91 + if ( "area" === nodeName ) {
  92 + map = element.parentNode;
  93 + mapName = map.name;
  94 + if ( !element.href || !mapName || map.nodeName.toLowerCase() !== "map" ) {
  95 + return false;
  96 + }
  97 + img = $( "img[usemap='#" + mapName + "']" )[ 0 ];
  98 + return !!img && visible( img );
  99 + }
  100 + return ( /input|select|textarea|button|object/.test( nodeName ) ?
  101 + !element.disabled :
  102 + "a" === nodeName ?
  103 + element.href || isTabIndexNotNaN :
  104 + isTabIndexNotNaN) &&
  105 + // the element and all of its ancestors must be visible
  106 + visible( element );
  107 +}
  108 +
  109 +function visible( element ) {
  110 + return $.expr.filters.visible( element ) &&
  111 + !$( element ).parents().addBack().filter(function() {
  112 + return $.css( this, "visibility" ) === "hidden";
  113 + }).length;
  114 +}
  115 +
  116 +$.extend( $.expr[ ":" ], {
  117 + data: $.expr.createPseudo ?
  118 + $.expr.createPseudo(function( dataName ) {
  119 + return function( elem ) {
  120 + return !!$.data( elem, dataName );
  121 + };
  122 + }) :
  123 + // support: jQuery <1.8
  124 + function( elem, i, match ) {
  125 + return !!$.data( elem, match[ 3 ] );
  126 + },
  127 +
  128 + focusable: function( element ) {
  129 + return focusable( element, !isNaN( $.attr( element, "tabindex" ) ) );
  130 + },
  131 +
  132 + tabbable: function( element ) {
  133 + var tabIndex = $.attr( element, "tabindex" ),
  134 + isTabIndexNaN = isNaN( tabIndex );
  135 + return ( isTabIndexNaN || tabIndex >= 0 ) && focusable( element, !isTabIndexNaN );
  136 + }
  137 +});
  138 +
  139 +// support: jQuery <1.8
  140 +if ( !$( "<a>" ).outerWidth( 1 ).jquery ) {
  141 + $.each( [ "Width", "Height" ], function( i, name ) {
  142 + var side = name === "Width" ? [ "Left", "Right" ] : [ "Top", "Bottom" ],
  143 + type = name.toLowerCase(),
  144 + orig = {
  145 + innerWidth: $.fn.innerWidth,
  146 + innerHeight: $.fn.innerHeight,
  147 + outerWidth: $.fn.outerWidth,
  148 + outerHeight: $.fn.outerHeight
  149 + };
  150 +
  151 + function reduce( elem, size, border, margin ) {
  152 + $.each( side, function() {
  153 + size -= parseFloat( $.css( elem, "padding" + this ) ) || 0;
  154 + if ( border ) {
  155 + size -= parseFloat( $.css( elem, "border" + this + "Width" ) ) || 0;
  156 + }
  157 + if ( margin ) {
  158 + size -= parseFloat( $.css( elem, "margin" + this ) ) || 0;
  159 + }
  160 + });
  161 + return size;
  162 + }
  163 +
  164 + $.fn[ "inner" + name ] = function( size ) {
  165 + if ( size === undefined ) {
  166 + return orig[ "inner" + name ].call( this );
  167 + }
  168 +
  169 + return this.each(function() {
  170 + $( this ).css( type, reduce( this, size ) + "px" );
  171 + });
  172 + };
  173 +
  174 + $.fn[ "outer" + name] = function( size, margin ) {
  175 + if ( typeof size !== "number" ) {
  176 + return orig[ "outer" + name ].call( this, size );
  177 + }
  178 +
  179 + return this.each(function() {
  180 + $( this).css( type, reduce( this, size, true, margin ) + "px" );
  181 + });
  182 + };
  183 + });
  184 +}
  185 +
  186 +// support: jQuery <1.8
  187 +if ( !$.fn.addBack ) {
  188 + $.fn.addBack = function( selector ) {
  189 + return this.add( selector == null ?
  190 + this.prevObject : this.prevObject.filter( selector )
  191 + );
  192 + };
  193 +}
  194 +
  195 +// support: jQuery 1.6.1, 1.6.2 (http://bugs.jquery.com/ticket/9413)
  196 +if ( $( "<a>" ).data( "a-b", "a" ).removeData( "a-b" ).data( "a-b" ) ) {
  197 + $.fn.removeData = (function( removeData ) {
  198 + return function( key ) {
  199 + if ( arguments.length ) {
  200 + return removeData.call( this, $.camelCase( key ) );
  201 + } else {
  202 + return removeData.call( this );
  203 + }
  204 + };
  205 + })( $.fn.removeData );
  206 +}
  207 +
  208 +// deprecated
  209 +$.ui.ie = !!/msie [\w.]+/.exec( navigator.userAgent.toLowerCase() );
  210 +
  211 +$.fn.extend({
  212 + focus: (function( orig ) {
  213 + return function( delay, fn ) {
  214 + return typeof delay === "number" ?
  215 + this.each(function() {
  216 + var elem = this;
  217 + setTimeout(function() {
  218 + $( elem ).focus();
  219 + if ( fn ) {
  220 + fn.call( elem );
  221 + }
  222 + }, delay );
  223 + }) :
  224 + orig.apply( this, arguments );
  225 + };
  226 + })( $.fn.focus ),
  227 +
  228 + disableSelection: (function() {
  229 + var eventType = "onselectstart" in document.createElement( "div" ) ?
  230 + "selectstart" :
  231 + "mousedown";
  232 +
  233 + return function() {
  234 + return this.bind( eventType + ".ui-disableSelection", function( event ) {
  235 + event.preventDefault();
  236 + });
  237 + };
  238 + })(),
  239 +
  240 + enableSelection: function() {
  241 + return this.unbind( ".ui-disableSelection" );
  242 + },
  243 +
  244 + zIndex: function( zIndex ) {
  245 + if ( zIndex !== undefined ) {
  246 + return this.css( "zIndex", zIndex );
  247 + }
  248 +
  249 + if ( this.length ) {
  250 + var elem = $( this[ 0 ] ), position, value;
  251 + while ( elem.length && elem[ 0 ] !== document ) {
  252 + // Ignore z-index if position is set to a value where z-index is ignored by the browser
  253 + // This makes behavior of this function consistent across browsers
  254 + // WebKit always returns auto if the element is positioned
  255 + position = elem.css( "position" );
  256 + if ( position === "absolute" || position === "relative" || position === "fixed" ) {
  257 + // IE returns 0 when zIndex is not specified
  258 + // other browsers return a string
  259 + // we ignore the case of nested elements with an explicit value of 0
  260 + // <div style="z-index: -10;"><div style="z-index: 0;"></div></div>
  261 + value = parseInt( elem.css( "zIndex" ), 10 );
  262 + if ( !isNaN( value ) && value !== 0 ) {
  263 + return value;
  264 + }
  265 + }
  266 + elem = elem.parent();
  267 + }
  268 + }
  269 +
  270 + return 0;
  271 + }
  272 +});
  273 +
  274 +// $.ui.plugin is deprecated. Use $.widget() extensions instead.
  275 +$.ui.plugin = {
  276 + add: function( module, option, set ) {
  277 + var i,
  278 + proto = $.ui[ module ].prototype;
  279 + for ( i in set ) {
  280 + proto.plugins[ i ] = proto.plugins[ i ] || [];
  281 + proto.plugins[ i ].push( [ option, set[ i ] ] );
  282 + }
  283 + },
  284 + call: function( instance, name, args, allowDisconnected ) {
  285 + var i,
  286 + set = instance.plugins[ name ];
  287 +
  288 + if ( !set ) {
  289 + return;
  290 + }
  291 +
  292 + if ( !allowDisconnected && ( !instance.element[ 0 ].parentNode || instance.element[ 0 ].parentNode.nodeType === 11 ) ) {
  293 + return;
  294 + }
  295 +
  296 + for ( i = 0; i < set.length; i++ ) {
  297 + if ( instance.options[ set[ i ][ 0 ] ] ) {
  298 + set[ i ][ 1 ].apply( instance.element, args );
  299 + }
  300 + }
  301 + }
  302 +};
  303 +
  304 +}));
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/mouse.js 0 → 100644
  1 +/*!
  2 + * jQuery UI Mouse 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/mouse/
  10 + */
  11 +(function( factory ) {
  12 + if ( typeof define === "function" && define.amd ) {
  13 +
  14 + // AMD. Register as an anonymous module.
  15 + define([
  16 + "jquery",
  17 + "./widget"
  18 + ], factory );
  19 + } else {
  20 +
  21 + // Browser globals
  22 + factory( jQuery );
  23 + }
  24 +}(function( $ ) {
  25 +
  26 +var mouseHandled = false;
  27 +$( document ).mouseup( function() {
  28 + mouseHandled = false;
  29 +});
  30 +
  31 +return $.widget("ui.mouse", {
  32 + version: "1.11.1",
  33 + options: {
  34 + cancel: "input,textarea,button,select,option",
  35 + distance: 1,
  36 + delay: 0
  37 + },
  38 + _mouseInit: function() {
  39 + var that = this;
  40 +
  41 + this.element
  42 + .bind("mousedown." + this.widgetName, function(event) {
  43 + return that._mouseDown(event);
  44 + })
  45 + .bind("click." + this.widgetName, function(event) {
  46 + if (true === $.data(event.target, that.widgetName + ".preventClickEvent")) {
  47 + $.removeData(event.target, that.widgetName + ".preventClickEvent");
  48 + event.stopImmediatePropagation();
  49 + return false;
  50 + }
  51 + });
  52 +
  53 + this.started = false;
  54 + },
  55 +
  56 + // TODO: make sure destroying one instance of mouse doesn't mess with
  57 + // other instances of mouse
  58 + _mouseDestroy: function() {
  59 + this.element.unbind("." + this.widgetName);
  60 + if ( this._mouseMoveDelegate ) {
  61 + this.document
  62 + .unbind("mousemove." + this.widgetName, this._mouseMoveDelegate)
  63 + .unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
  64 + }
  65 + },
  66 +
  67 + _mouseDown: function(event) {
  68 + // don't let more than one widget handle mouseStart
  69 + if ( mouseHandled ) {
  70 + return;
  71 + }
  72 +
  73 + // we may have missed mouseup (out of window)
  74 + (this._mouseStarted && this._mouseUp(event));
  75 +
  76 + this._mouseDownEvent = event;
  77 +
  78 + var that = this,
  79 + btnIsLeft = (event.which === 1),
  80 + // event.target.nodeName works around a bug in IE 8 with
  81 + // disabled inputs (#7620)
  82 + elIsCancel = (typeof this.options.cancel === "string" && event.target.nodeName ? $(event.target).closest(this.options.cancel).length : false);
  83 + if (!btnIsLeft || elIsCancel || !this._mouseCapture(event)) {
  84 + return true;
  85 + }
  86 +
  87 + this.mouseDelayMet = !this.options.delay;
  88 + if (!this.mouseDelayMet) {
  89 + this._mouseDelayTimer = setTimeout(function() {
  90 + that.mouseDelayMet = true;
  91 + }, this.options.delay);
  92 + }
  93 +
  94 + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
  95 + this._mouseStarted = (this._mouseStart(event) !== false);
  96 + if (!this._mouseStarted) {
  97 + event.preventDefault();
  98 + return true;
  99 + }
  100 + }
  101 +
  102 + // Click event may never have fired (Gecko & Opera)
  103 + if (true === $.data(event.target, this.widgetName + ".preventClickEvent")) {
  104 + $.removeData(event.target, this.widgetName + ".preventClickEvent");
  105 + }
  106 +
  107 + // these delegates are required to keep context
  108 + this._mouseMoveDelegate = function(event) {
  109 + return that._mouseMove(event);
  110 + };
  111 + this._mouseUpDelegate = function(event) {
  112 + return that._mouseUp(event);
  113 + };
  114 +
  115 + this.document
  116 + .bind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
  117 + .bind( "mouseup." + this.widgetName, this._mouseUpDelegate );
  118 +
  119 + event.preventDefault();
  120 +
  121 + mouseHandled = true;
  122 + return true;
  123 + },
  124 +
  125 + _mouseMove: function(event) {
  126 + // IE mouseup check - mouseup happened when mouse was out of window
  127 + if ($.ui.ie && ( !document.documentMode || document.documentMode < 9 ) && !event.button) {
  128 + return this._mouseUp(event);
  129 +
  130 + // Iframe mouseup check - mouseup occurred in another document
  131 + } else if ( !event.which ) {
  132 + return this._mouseUp( event );
  133 + }
  134 +
  135 + if (this._mouseStarted) {
  136 + this._mouseDrag(event);
  137 + return event.preventDefault();
  138 + }
  139 +
  140 + if (this._mouseDistanceMet(event) && this._mouseDelayMet(event)) {
  141 + this._mouseStarted =
  142 + (this._mouseStart(this._mouseDownEvent, event) !== false);
  143 + (this._mouseStarted ? this._mouseDrag(event) : this._mouseUp(event));
  144 + }
  145 +
  146 + return !this._mouseStarted;
  147 + },
  148 +
  149 + _mouseUp: function(event) {
  150 + this.document
  151 + .unbind( "mousemove." + this.widgetName, this._mouseMoveDelegate )
  152 + .unbind( "mouseup." + this.widgetName, this._mouseUpDelegate );
  153 +
  154 + if (this._mouseStarted) {
  155 + this._mouseStarted = false;
  156 +
  157 + if (event.target === this._mouseDownEvent.target) {
  158 + $.data(event.target, this.widgetName + ".preventClickEvent", true);
  159 + }
  160 +
  161 + this._mouseStop(event);
  162 + }
  163 +
  164 + mouseHandled = false;
  165 + return false;
  166 + },
  167 +
  168 + _mouseDistanceMet: function(event) {
  169 + return (Math.max(
  170 + Math.abs(this._mouseDownEvent.pageX - event.pageX),
  171 + Math.abs(this._mouseDownEvent.pageY - event.pageY)
  172 + ) >= this.options.distance
  173 + );
  174 + },
  175 +
  176 + _mouseDelayMet: function(/* event */) {
  177 + return this.mouseDelayMet;
  178 + },
  179 +
  180 + // These are placeholder methods, to be overriden by extending plugin
  181 + _mouseStart: function(/* event */) {},
  182 + _mouseDrag: function(/* event */) {},
  183 + _mouseStop: function(/* event */) {},
  184 + _mouseCapture: function(/* event */) { return true; }
  185 +});
  186 +
  187 +}));
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/resizable.js 0 → 100644
  1 +/*!
  2 + * jQuery UI Resizable 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/resizable/
  10 + */
  11 +(function( factory ) {
  12 + if ( typeof define === "function" && define.amd ) {
  13 +
  14 + // AMD. Register as an anonymous module.
  15 + define([
  16 + "jquery",
  17 + "./core",
  18 + "./mouse",
  19 + "./widget"
  20 + ], factory );
  21 + } else {
  22 +
  23 + // Browser globals
  24 + factory( jQuery );
  25 + }
  26 +}(function( $ ) {
  27 +
  28 +$.widget("ui.resizable", $.ui.mouse, {
  29 + version: "1.11.1",
  30 + widgetEventPrefix: "resize",
  31 + options: {
  32 + alsoResize: false,
  33 + animate: false,
  34 + animateDuration: "slow",
  35 + animateEasing: "swing",
  36 + aspectRatio: false,
  37 + autoHide: false,
  38 + containment: false,
  39 + ghost: false,
  40 + grid: false,
  41 + handles: "e,s,se",
  42 + helper: false,
  43 + maxHeight: null,
  44 + maxWidth: null,
  45 + minHeight: 10,
  46 + minWidth: 10,
  47 + // See #7960
  48 + zIndex: 90,
  49 +
  50 + // callbacks
  51 + resize: null,
  52 + start: null,
  53 + stop: null
  54 + },
  55 +
  56 + _num: function( value ) {
  57 + return parseInt( value, 10 ) || 0;
  58 + },
  59 +
  60 + _isNumber: function( value ) {
  61 + return !isNaN( parseInt( value, 10 ) );
  62 + },
  63 +
  64 + _hasScroll: function( el, a ) {
  65 +
  66 + if ( $( el ).css( "overflow" ) === "hidden") {
  67 + return false;
  68 + }
  69 +
  70 + var scroll = ( a && a === "left" ) ? "scrollLeft" : "scrollTop",
  71 + has = false;
  72 +
  73 + if ( el[ scroll ] > 0 ) {
  74 + return true;
  75 + }
  76 +
  77 + // TODO: determine which cases actually cause this to happen
  78 + // if the element doesn't have the scroll set, see if it's possible to
  79 + // set the scroll
  80 + el[ scroll ] = 1;
  81 + has = ( el[ scroll ] > 0 );
  82 + el[ scroll ] = 0;
  83 + return has;
  84 + },
  85 +
  86 + _create: function() {
  87 +
  88 + var n, i, handle, axis, hname,
  89 + that = this,
  90 + o = this.options;
  91 + this.element.addClass("ui-resizable");
  92 +
  93 + $.extend(this, {
  94 + _aspectRatio: !!(o.aspectRatio),
  95 + aspectRatio: o.aspectRatio,
  96 + originalElement: this.element,
  97 + _proportionallyResizeElements: [],
  98 + _helper: o.helper || o.ghost || o.animate ? o.helper || "ui-resizable-helper" : null
  99 + });
  100 +
  101 + // Wrap the element if it cannot hold child nodes
  102 + if (this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)) {
  103 +
  104 + this.element.wrap(
  105 + $("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({
  106 + position: this.element.css("position"),
  107 + width: this.element.outerWidth(),
  108 + height: this.element.outerHeight(),
  109 + top: this.element.css("top"),
  110 + left: this.element.css("left")
  111 + })
  112 + );
  113 +
  114 + this.element = this.element.parent().data(
  115 + "ui-resizable", this.element.resizable( "instance" )
  116 + );
  117 +
  118 + this.elementIsWrapper = true;
  119 +
  120 + this.element.css({
  121 + marginLeft: this.originalElement.css("marginLeft"),
  122 + marginTop: this.originalElement.css("marginTop"),
  123 + marginRight: this.originalElement.css("marginRight"),
  124 + marginBottom: this.originalElement.css("marginBottom")
  125 + });
  126 + this.originalElement.css({
  127 + marginLeft: 0,
  128 + marginTop: 0,
  129 + marginRight: 0,
  130 + marginBottom: 0
  131 + });
  132 + // support: Safari
  133 + // Prevent Safari textarea resize
  134 + this.originalResizeStyle = this.originalElement.css("resize");
  135 + this.originalElement.css("resize", "none");
  136 +
  137 + this._proportionallyResizeElements.push( this.originalElement.css({
  138 + position: "static",
  139 + zoom: 1,
  140 + display: "block"
  141 + }) );
  142 +
  143 + // support: IE9
  144 + // avoid IE jump (hard set the margin)
  145 + this.originalElement.css({ margin: this.originalElement.css("margin") });
  146 +
  147 + this._proportionallyResize();
  148 + }
  149 +
  150 + this.handles = o.handles ||
  151 + ( !$(".ui-resizable-handle", this.element).length ?
  152 + "e,s,se" : {
  153 + n: ".ui-resizable-n",
  154 + e: ".ui-resizable-e",
  155 + s: ".ui-resizable-s",
  156 + w: ".ui-resizable-w",
  157 + se: ".ui-resizable-se",
  158 + sw: ".ui-resizable-sw",
  159 + ne: ".ui-resizable-ne",
  160 + nw: ".ui-resizable-nw"
  161 + } );
  162 +
  163 + if (this.handles.constructor === String) {
  164 +
  165 + if ( this.handles === "all") {
  166 + this.handles = "n,e,s,w,se,sw,ne,nw";
  167 + }
  168 +
  169 + n = this.handles.split(",");
  170 + this.handles = {};
  171 +
  172 + for (i = 0; i < n.length; i++) {
  173 +
  174 + handle = $.trim(n[i]);
  175 + hname = "ui-resizable-" + handle;
  176 + axis = $("<div class='ui-resizable-handle " + hname + "'></div>");
  177 +
  178 + axis.css({ zIndex: o.zIndex });
  179 +
  180 + // TODO : What's going on here?
  181 + if ("se" === handle) {
  182 + axis.addClass("ui-icon ui-icon-gripsmall-diagonal-se");
  183 + }
  184 +
  185 + this.handles[handle] = ".ui-resizable-" + handle;
  186 + this.element.append(axis);
  187 + }
  188 +
  189 + }
  190 +
  191 + this._renderAxis = function(target) {
  192 +
  193 + var i, axis, padPos, padWrapper;
  194 +
  195 + target = target || this.element;
  196 +
  197 + for (i in this.handles) {
  198 +
  199 + if (this.handles[i].constructor === String) {
  200 + this.handles[i] = this.element.children( this.handles[ i ] ).first().show();
  201 + }
  202 +
  203 + if (this.elementIsWrapper && this.originalElement[0].nodeName.match(/textarea|input|select|button/i)) {
  204 +
  205 + axis = $(this.handles[i], this.element);
  206 +
  207 + padWrapper = /sw|ne|nw|se|n|s/.test(i) ? axis.outerHeight() : axis.outerWidth();
  208 +
  209 + padPos = [ "padding",
  210 + /ne|nw|n/.test(i) ? "Top" :
  211 + /se|sw|s/.test(i) ? "Bottom" :
  212 + /^e$/.test(i) ? "Right" : "Left" ].join("");
  213 +
  214 + target.css(padPos, padWrapper);
  215 +
  216 + this._proportionallyResize();
  217 +
  218 + }
  219 +
  220 + // TODO: What's that good for? There's not anything to be executed left
  221 + if (!$(this.handles[i]).length) {
  222 + continue;
  223 + }
  224 + }
  225 + };
  226 +
  227 + // TODO: make renderAxis a prototype function
  228 + this._renderAxis(this.element);
  229 +
  230 + this._handles = $(".ui-resizable-handle", this.element)
  231 + .disableSelection();
  232 +
  233 + this._handles.mouseover(function() {
  234 + if (!that.resizing) {
  235 + if (this.className) {
  236 + axis = this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i);
  237 + }
  238 + that.axis = axis && axis[1] ? axis[1] : "se";
  239 + }
  240 + });
  241 +
  242 + if (o.autoHide) {
  243 + this._handles.hide();
  244 + $(this.element)
  245 + .addClass("ui-resizable-autohide")
  246 + .mouseenter(function() {
  247 + if (o.disabled) {
  248 + return;
  249 + }
  250 + $(this).removeClass("ui-resizable-autohide");
  251 + that._handles.show();
  252 + })
  253 + .mouseleave(function() {
  254 + if (o.disabled) {
  255 + return;
  256 + }
  257 + if (!that.resizing) {
  258 + $(this).addClass("ui-resizable-autohide");
  259 + that._handles.hide();
  260 + }
  261 + });
  262 + }
  263 +
  264 + this._mouseInit();
  265 +
  266 + },
  267 +
  268 + _destroy: function() {
  269 +
  270 + this._mouseDestroy();
  271 +
  272 + var wrapper,
  273 + _destroy = function(exp) {
  274 + $(exp)
  275 + .removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing")
  276 + .removeData("resizable")
  277 + .removeData("ui-resizable")
  278 + .unbind(".resizable")
  279 + .find(".ui-resizable-handle")
  280 + .remove();
  281 + };
  282 +
  283 + // TODO: Unwrap at same DOM position
  284 + if (this.elementIsWrapper) {
  285 + _destroy(this.element);
  286 + wrapper = this.element;
  287 + this.originalElement.css({
  288 + position: wrapper.css("position"),
  289 + width: wrapper.outerWidth(),
  290 + height: wrapper.outerHeight(),
  291 + top: wrapper.css("top"),
  292 + left: wrapper.css("left")
  293 + }).insertAfter( wrapper );
  294 + wrapper.remove();
  295 + }
  296 +
  297 + this.originalElement.css("resize", this.originalResizeStyle);
  298 + _destroy(this.originalElement);
  299 +
  300 + return this;
  301 + },
  302 +
  303 + _mouseCapture: function(event) {
  304 + var i, handle,
  305 + capture = false;
  306 +
  307 + for (i in this.handles) {
  308 + handle = $(this.handles[i])[0];
  309 + if (handle === event.target || $.contains(handle, event.target)) {
  310 + capture = true;
  311 + }
  312 + }
  313 +
  314 + return !this.options.disabled && capture;
  315 + },
  316 +
  317 + _mouseStart: function(event) {
  318 +
  319 + var curleft, curtop, cursor,
  320 + o = this.options,
  321 + el = this.element;
  322 +
  323 + this.resizing = true;
  324 +
  325 + this._renderProxy();
  326 +
  327 + curleft = this._num(this.helper.css("left"));
  328 + curtop = this._num(this.helper.css("top"));
  329 +
  330 + if (o.containment) {
  331 + curleft += $(o.containment).scrollLeft() || 0;
  332 + curtop += $(o.containment).scrollTop() || 0;
  333 + }
  334 +
  335 + this.offset = this.helper.offset();
  336 + this.position = { left: curleft, top: curtop };
  337 +
  338 + this.size = this._helper ? {
  339 + width: this.helper.width(),
  340 + height: this.helper.height()
  341 + } : {
  342 + width: el.width(),
  343 + height: el.height()
  344 + };
  345 +
  346 + this.originalSize = this._helper ? {
  347 + width: el.outerWidth(),
  348 + height: el.outerHeight()
  349 + } : {
  350 + width: el.width(),
  351 + height: el.height()
  352 + };
  353 +
  354 + this.sizeDiff = {
  355 + width: el.outerWidth() - el.width(),
  356 + height: el.outerHeight() - el.height()
  357 + };
  358 +
  359 + this.originalPosition = { left: curleft, top: curtop };
  360 + this.originalMousePosition = { left: event.pageX, top: event.pageY };
  361 +
  362 + this.aspectRatio = (typeof o.aspectRatio === "number") ?
  363 + o.aspectRatio :
  364 + ((this.originalSize.width / this.originalSize.height) || 1);
  365 +
  366 + cursor = $(".ui-resizable-" + this.axis).css("cursor");
  367 + $("body").css("cursor", cursor === "auto" ? this.axis + "-resize" : cursor);
  368 +
  369 + el.addClass("ui-resizable-resizing");
  370 + this._propagate("start", event);
  371 + return true;
  372 + },
  373 +
  374 + _mouseDrag: function(event) {
  375 +
  376 + var data, props,
  377 + smp = this.originalMousePosition,
  378 + a = this.axis,
  379 + dx = (event.pageX - smp.left) || 0,
  380 + dy = (event.pageY - smp.top) || 0,
  381 + trigger = this._change[a];
  382 +
  383 + this._updatePrevProperties();
  384 +
  385 + if (!trigger) {
  386 + return false;
  387 + }
  388 +
  389 + data = trigger.apply(this, [ event, dx, dy ]);
  390 +
  391 + this._updateVirtualBoundaries(event.shiftKey);
  392 + if (this._aspectRatio || event.shiftKey) {
  393 + data = this._updateRatio(data, event);
  394 + }
  395 +
  396 + data = this._respectSize(data, event);
  397 +
  398 + this._updateCache(data);
  399 +
  400 + this._propagate("resize", event);
  401 +
  402 + props = this._applyChanges();
  403 +
  404 + if ( !this._helper && this._proportionallyResizeElements.length ) {
  405 + this._proportionallyResize();
  406 + }
  407 +
  408 + if ( !$.isEmptyObject( props ) ) {
  409 + this._updatePrevProperties();
  410 + this._trigger( "resize", event, this.ui() );
  411 + this._applyChanges();
  412 + }
  413 +
  414 + return false;
  415 + },
  416 +
  417 + _mouseStop: function(event) {
  418 +
  419 + this.resizing = false;
  420 + var pr, ista, soffseth, soffsetw, s, left, top,
  421 + o = this.options, that = this;
  422 +
  423 + if (this._helper) {
  424 +
  425 + pr = this._proportionallyResizeElements;
  426 + ista = pr.length && (/textarea/i).test(pr[0].nodeName);
  427 + soffseth = ista && this._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height;
  428 + soffsetw = ista ? 0 : that.sizeDiff.width;
  429 +
  430 + s = {
  431 + width: (that.helper.width() - soffsetw),
  432 + height: (that.helper.height() - soffseth)
  433 + };
  434 + left = (parseInt(that.element.css("left"), 10) +
  435 + (that.position.left - that.originalPosition.left)) || null;
  436 + top = (parseInt(that.element.css("top"), 10) +
  437 + (that.position.top - that.originalPosition.top)) || null;
  438 +
  439 + if (!o.animate) {
  440 + this.element.css($.extend(s, { top: top, left: left }));
  441 + }
  442 +
  443 + that.helper.height(that.size.height);
  444 + that.helper.width(that.size.width);
  445 +
  446 + if (this._helper && !o.animate) {
  447 + this._proportionallyResize();
  448 + }
  449 + }
  450 +
  451 + $("body").css("cursor", "auto");
  452 +
  453 + this.element.removeClass("ui-resizable-resizing");
  454 +
  455 + this._propagate("stop", event);
  456 +
  457 + if (this._helper) {
  458 + this.helper.remove();
  459 + }
  460 +
  461 + return false;
  462 +
  463 + },
  464 +
  465 + _updatePrevProperties: function() {
  466 + this.prevPosition = {
  467 + top: this.position.top,
  468 + left: this.position.left
  469 + };
  470 + this.prevSize = {
  471 + width: this.size.width,
  472 + height: this.size.height
  473 + };
  474 + },
  475 +
  476 + _applyChanges: function() {
  477 + var props = {};
  478 +
  479 + if ( this.position.top !== this.prevPosition.top ) {
  480 + props.top = this.position.top + "px";
  481 + }
  482 + if ( this.position.left !== this.prevPosition.left ) {
  483 + props.left = this.position.left + "px";
  484 + }
  485 + if ( this.size.width !== this.prevSize.width ) {
  486 + props.width = this.size.width + "px";
  487 + }
  488 + if ( this.size.height !== this.prevSize.height ) {
  489 + props.height = this.size.height + "px";
  490 + }
  491 +
  492 + this.helper.css( props );
  493 +
  494 + return props;
  495 + },
  496 +
  497 + _updateVirtualBoundaries: function(forceAspectRatio) {
  498 + var pMinWidth, pMaxWidth, pMinHeight, pMaxHeight, b,
  499 + o = this.options;
  500 +
  501 + b = {
  502 + minWidth: this._isNumber(o.minWidth) ? o.minWidth : 0,
  503 + maxWidth: this._isNumber(o.maxWidth) ? o.maxWidth : Infinity,
  504 + minHeight: this._isNumber(o.minHeight) ? o.minHeight : 0,
  505 + maxHeight: this._isNumber(o.maxHeight) ? o.maxHeight : Infinity
  506 + };
  507 +
  508 + if (this._aspectRatio || forceAspectRatio) {
  509 + pMinWidth = b.minHeight * this.aspectRatio;
  510 + pMinHeight = b.minWidth / this.aspectRatio;
  511 + pMaxWidth = b.maxHeight * this.aspectRatio;
  512 + pMaxHeight = b.maxWidth / this.aspectRatio;
  513 +
  514 + if (pMinWidth > b.minWidth) {
  515 + b.minWidth = pMinWidth;
  516 + }
  517 + if (pMinHeight > b.minHeight) {
  518 + b.minHeight = pMinHeight;
  519 + }
  520 + if (pMaxWidth < b.maxWidth) {
  521 + b.maxWidth = pMaxWidth;
  522 + }
  523 + if (pMaxHeight < b.maxHeight) {
  524 + b.maxHeight = pMaxHeight;
  525 + }
  526 + }
  527 + this._vBoundaries = b;
  528 + },
  529 +
  530 + _updateCache: function(data) {
  531 + this.offset = this.helper.offset();
  532 + if (this._isNumber(data.left)) {
  533 + this.position.left = data.left;
  534 + }
  535 + if (this._isNumber(data.top)) {
  536 + this.position.top = data.top;
  537 + }
  538 + if (this._isNumber(data.height)) {
  539 + this.size.height = data.height;
  540 + }
  541 + if (this._isNumber(data.width)) {
  542 + this.size.width = data.width;
  543 + }
  544 + },
  545 +
  546 + _updateRatio: function( data ) {
  547 +
  548 + var cpos = this.position,
  549 + csize = this.size,
  550 + a = this.axis;
  551 +
  552 + if (this._isNumber(data.height)) {
  553 + data.width = (data.height * this.aspectRatio);
  554 + } else if (this._isNumber(data.width)) {
  555 + data.height = (data.width / this.aspectRatio);
  556 + }
  557 +
  558 + if (a === "sw") {
  559 + data.left = cpos.left + (csize.width - data.width);
  560 + data.top = null;
  561 + }
  562 + if (a === "nw") {
  563 + data.top = cpos.top + (csize.height - data.height);
  564 + data.left = cpos.left + (csize.width - data.width);
  565 + }
  566 +
  567 + return data;
  568 + },
  569 +
  570 + _respectSize: function( data ) {
  571 +
  572 + var o = this._vBoundaries,
  573 + a = this.axis,
  574 + ismaxw = this._isNumber(data.width) && o.maxWidth && (o.maxWidth < data.width),
  575 + ismaxh = this._isNumber(data.height) && o.maxHeight && (o.maxHeight < data.height),
  576 + isminw = this._isNumber(data.width) && o.minWidth && (o.minWidth > data.width),
  577 + isminh = this._isNumber(data.height) && o.minHeight && (o.minHeight > data.height),
  578 + dw = this.originalPosition.left + this.originalSize.width,
  579 + dh = this.position.top + this.size.height,
  580 + cw = /sw|nw|w/.test(a), ch = /nw|ne|n/.test(a);
  581 + if (isminw) {
  582 + data.width = o.minWidth;
  583 + }
  584 + if (isminh) {
  585 + data.height = o.minHeight;
  586 + }
  587 + if (ismaxw) {
  588 + data.width = o.maxWidth;
  589 + }
  590 + if (ismaxh) {
  591 + data.height = o.maxHeight;
  592 + }
  593 +
  594 + if (isminw && cw) {
  595 + data.left = dw - o.minWidth;
  596 + }
  597 + if (ismaxw && cw) {
  598 + data.left = dw - o.maxWidth;
  599 + }
  600 + if (isminh && ch) {
  601 + data.top = dh - o.minHeight;
  602 + }
  603 + if (ismaxh && ch) {
  604 + data.top = dh - o.maxHeight;
  605 + }
  606 +
  607 + // Fixing jump error on top/left - bug #2330
  608 + if (!data.width && !data.height && !data.left && data.top) {
  609 + data.top = null;
  610 + } else if (!data.width && !data.height && !data.top && data.left) {
  611 + data.left = null;
  612 + }
  613 +
  614 + return data;
  615 + },
  616 +
  617 + _getPaddingPlusBorderDimensions: function( element ) {
  618 + var i = 0,
  619 + widths = [],
  620 + borders = [
  621 + element.css( "borderTopWidth" ),
  622 + element.css( "borderRightWidth" ),
  623 + element.css( "borderBottomWidth" ),
  624 + element.css( "borderLeftWidth" )
  625 + ],
  626 + paddings = [
  627 + element.css( "paddingTop" ),
  628 + element.css( "paddingRight" ),
  629 + element.css( "paddingBottom" ),
  630 + element.css( "paddingLeft" )
  631 + ];
  632 +
  633 + for ( ; i < 4; i++ ) {
  634 + widths[ i ] = ( parseInt( borders[ i ], 10 ) || 0 );
  635 + widths[ i ] += ( parseInt( paddings[ i ], 10 ) || 0 );
  636 + }
  637 +
  638 + return {
  639 + height: widths[ 0 ] + widths[ 2 ],
  640 + width: widths[ 1 ] + widths[ 3 ]
  641 + };
  642 + },
  643 +
  644 + _proportionallyResize: function() {
  645 +
  646 + if (!this._proportionallyResizeElements.length) {
  647 + return;
  648 + }
  649 +
  650 + var prel,
  651 + i = 0,
  652 + element = this.helper || this.element;
  653 +
  654 + for ( ; i < this._proportionallyResizeElements.length; i++) {
  655 +
  656 + prel = this._proportionallyResizeElements[i];
  657 +
  658 + // TODO: Seems like a bug to cache this.outerDimensions
  659 + // considering that we are in a loop.
  660 + if (!this.outerDimensions) {
  661 + this.outerDimensions = this._getPaddingPlusBorderDimensions( prel );
  662 + }
  663 +
  664 + prel.css({
  665 + height: (element.height() - this.outerDimensions.height) || 0,
  666 + width: (element.width() - this.outerDimensions.width) || 0
  667 + });
  668 +
  669 + }
  670 +
  671 + },
  672 +
  673 + _renderProxy: function() {
  674 +
  675 + var el = this.element, o = this.options;
  676 + this.elementOffset = el.offset();
  677 +
  678 + if (this._helper) {
  679 +
  680 + this.helper = this.helper || $("<div style='overflow:hidden;'></div>");
  681 +
  682 + this.helper.addClass(this._helper).css({
  683 + width: this.element.outerWidth() - 1,
  684 + height: this.element.outerHeight() - 1,
  685 + position: "absolute",
  686 + left: this.elementOffset.left + "px",
  687 + top: this.elementOffset.top + "px",
  688 + zIndex: ++o.zIndex //TODO: Don't modify option
  689 + });
  690 +
  691 + this.helper
  692 + .appendTo("body")
  693 + .disableSelection();
  694 +
  695 + } else {
  696 + this.helper = this.element;
  697 + }
  698 +
  699 + },
  700 +
  701 + _change: {
  702 + e: function(event, dx) {
  703 + return { width: this.originalSize.width + dx };
  704 + },
  705 + w: function(event, dx) {
  706 + var cs = this.originalSize, sp = this.originalPosition;
  707 + return { left: sp.left + dx, width: cs.width - dx };
  708 + },
  709 + n: function(event, dx, dy) {
  710 + var cs = this.originalSize, sp = this.originalPosition;
  711 + return { top: sp.top + dy, height: cs.height - dy };
  712 + },
  713 + s: function(event, dx, dy) {
  714 + return { height: this.originalSize.height + dy };
  715 + },
  716 + se: function(event, dx, dy) {
  717 + return $.extend(this._change.s.apply(this, arguments),
  718 + this._change.e.apply(this, [ event, dx, dy ]));
  719 + },
  720 + sw: function(event, dx, dy) {
  721 + return $.extend(this._change.s.apply(this, arguments),
  722 + this._change.w.apply(this, [ event, dx, dy ]));
  723 + },
  724 + ne: function(event, dx, dy) {
  725 + return $.extend(this._change.n.apply(this, arguments),
  726 + this._change.e.apply(this, [ event, dx, dy ]));
  727 + },
  728 + nw: function(event, dx, dy) {
  729 + return $.extend(this._change.n.apply(this, arguments),
  730 + this._change.w.apply(this, [ event, dx, dy ]));
  731 + }
  732 + },
  733 +
  734 + _propagate: function(n, event) {
  735 + $.ui.plugin.call(this, n, [ event, this.ui() ]);
  736 + (n !== "resize" && this._trigger(n, event, this.ui()));
  737 + },
  738 +
  739 + plugins: {},
  740 +
  741 + ui: function() {
  742 + return {
  743 + originalElement: this.originalElement,
  744 + element: this.element,
  745 + helper: this.helper,
  746 + position: this.position,
  747 + size: this.size,
  748 + originalSize: this.originalSize,
  749 + originalPosition: this.originalPosition
  750 + };
  751 + }
  752 +
  753 +});
  754 +
  755 +/*
  756 + * Resizable Extensions
  757 + */
  758 +
  759 +$.ui.plugin.add("resizable", "animate", {
  760 +
  761 + stop: function( event ) {
  762 + var that = $(this).resizable( "instance" ),
  763 + o = that.options,
  764 + pr = that._proportionallyResizeElements,
  765 + ista = pr.length && (/textarea/i).test(pr[0].nodeName),
  766 + soffseth = ista && that._hasScroll(pr[0], "left") ? 0 : that.sizeDiff.height,
  767 + soffsetw = ista ? 0 : that.sizeDiff.width,
  768 + style = { width: (that.size.width - soffsetw), height: (that.size.height - soffseth) },
  769 + left = (parseInt(that.element.css("left"), 10) +
  770 + (that.position.left - that.originalPosition.left)) || null,
  771 + top = (parseInt(that.element.css("top"), 10) +
  772 + (that.position.top - that.originalPosition.top)) || null;
  773 +
  774 + that.element.animate(
  775 + $.extend(style, top && left ? { top: top, left: left } : {}), {
  776 + duration: o.animateDuration,
  777 + easing: o.animateEasing,
  778 + step: function() {
  779 +
  780 + var data = {
  781 + width: parseInt(that.element.css("width"), 10),
  782 + height: parseInt(that.element.css("height"), 10),
  783 + top: parseInt(that.element.css("top"), 10),
  784 + left: parseInt(that.element.css("left"), 10)
  785 + };
  786 +
  787 + if (pr && pr.length) {
  788 + $(pr[0]).css({ width: data.width, height: data.height });
  789 + }
  790 +
  791 + // propagating resize, and updating values for each animation step
  792 + that._updateCache(data);
  793 + that._propagate("resize", event);
  794 +
  795 + }
  796 + }
  797 + );
  798 + }
  799 +
  800 +});
  801 +
  802 +$.ui.plugin.add( "resizable", "containment", {
  803 +
  804 + start: function() {
  805 + var element, p, co, ch, cw, width, height,
  806 + that = $( this ).resizable( "instance" ),
  807 + o = that.options,
  808 + el = that.element,
  809 + oc = o.containment,
  810 + ce = ( oc instanceof $ ) ? oc.get( 0 ) : ( /parent/.test( oc ) ) ? el.parent().get( 0 ) : oc;
  811 +
  812 + if ( !ce ) {
  813 + return;
  814 + }
  815 +
  816 + that.containerElement = $( ce );
  817 +
  818 + if ( /document/.test( oc ) || oc === document ) {
  819 + that.containerOffset = {
  820 + left: 0,
  821 + top: 0
  822 + };
  823 + that.containerPosition = {
  824 + left: 0,
  825 + top: 0
  826 + };
  827 +
  828 + that.parentData = {
  829 + element: $( document ),
  830 + left: 0,
  831 + top: 0,
  832 + width: $( document ).width(),
  833 + height: $( document ).height() || document.body.parentNode.scrollHeight
  834 + };
  835 + } else {
  836 + element = $( ce );
  837 + p = [];
  838 + $([ "Top", "Right", "Left", "Bottom" ]).each(function( i, name ) {
  839 + p[ i ] = that._num( element.css( "padding" + name ) );
  840 + });
  841 +
  842 + that.containerOffset = element.offset();
  843 + that.containerPosition = element.position();
  844 + that.containerSize = {
  845 + height: ( element.innerHeight() - p[ 3 ] ),
  846 + width: ( element.innerWidth() - p[ 1 ] )
  847 + };
  848 +
  849 + co = that.containerOffset;
  850 + ch = that.containerSize.height;
  851 + cw = that.containerSize.width;
  852 + width = ( that._hasScroll ( ce, "left" ) ? ce.scrollWidth : cw );
  853 + height = ( that._hasScroll ( ce ) ? ce.scrollHeight : ch ) ;
  854 +
  855 + that.parentData = {
  856 + element: ce,
  857 + left: co.left,
  858 + top: co.top,
  859 + width: width,
  860 + height: height
  861 + };
  862 + }
  863 + },
  864 +
  865 + resize: function( event ) {
  866 + var woset, hoset, isParent, isOffsetRelative,
  867 + that = $( this ).resizable( "instance" ),
  868 + o = that.options,
  869 + co = that.containerOffset,
  870 + cp = that.position,
  871 + pRatio = that._aspectRatio || event.shiftKey,
  872 + cop = {
  873 + top: 0,
  874 + left: 0
  875 + },
  876 + ce = that.containerElement,
  877 + continueResize = true;
  878 +
  879 + if ( ce[ 0 ] !== document && ( /static/ ).test( ce.css( "position" ) ) ) {
  880 + cop = co;
  881 + }
  882 +
  883 + if ( cp.left < ( that._helper ? co.left : 0 ) ) {
  884 + that.size.width = that.size.width +
  885 + ( that._helper ?
  886 + ( that.position.left - co.left ) :
  887 + ( that.position.left - cop.left ) );
  888 +
  889 + if ( pRatio ) {
  890 + that.size.height = that.size.width / that.aspectRatio;
  891 + continueResize = false;
  892 + }
  893 + that.position.left = o.helper ? co.left : 0;
  894 + }
  895 +
  896 + if ( cp.top < ( that._helper ? co.top : 0 ) ) {
  897 + that.size.height = that.size.height +
  898 + ( that._helper ?
  899 + ( that.position.top - co.top ) :
  900 + that.position.top );
  901 +
  902 + if ( pRatio ) {
  903 + that.size.width = that.size.height * that.aspectRatio;
  904 + continueResize = false;
  905 + }
  906 + that.position.top = that._helper ? co.top : 0;
  907 + }
  908 +
  909 + isParent = that.containerElement.get( 0 ) === that.element.parent().get( 0 );
  910 + isOffsetRelative = /relative|absolute/.test( that.containerElement.css( "position" ) );
  911 +
  912 + if ( isParent && isOffsetRelative ) {
  913 + that.offset.left = that.parentData.left + that.position.left;
  914 + that.offset.top = that.parentData.top + that.position.top;
  915 + } else {
  916 + that.offset.left = that.element.offset().left;
  917 + that.offset.top = that.element.offset().top;
  918 + }
  919 +
  920 + woset = Math.abs( that.sizeDiff.width +
  921 + (that._helper ?
  922 + that.offset.left - cop.left :
  923 + (that.offset.left - co.left)) );
  924 +
  925 + hoset = Math.abs( that.sizeDiff.height +
  926 + (that._helper ?
  927 + that.offset.top - cop.top :
  928 + (that.offset.top - co.top)) );
  929 +
  930 + if ( woset + that.size.width >= that.parentData.width ) {
  931 + that.size.width = that.parentData.width - woset;
  932 + if ( pRatio ) {
  933 + that.size.height = that.size.width / that.aspectRatio;
  934 + continueResize = false;
  935 + }
  936 + }
  937 +
  938 + if ( hoset + that.size.height >= that.parentData.height ) {
  939 + that.size.height = that.parentData.height - hoset;
  940 + if ( pRatio ) {
  941 + that.size.width = that.size.height * that.aspectRatio;
  942 + continueResize = false;
  943 + }
  944 + }
  945 +
  946 + if ( !continueResize ){
  947 + that.position.left = that.prevPosition.left;
  948 + that.position.top = that.prevPosition.top;
  949 + that.size.width = that.prevSize.width;
  950 + that.size.height = that.prevSize.height;
  951 + }
  952 + },
  953 +
  954 + stop: function() {
  955 + var that = $( this ).resizable( "instance" ),
  956 + o = that.options,
  957 + co = that.containerOffset,
  958 + cop = that.containerPosition,
  959 + ce = that.containerElement,
  960 + helper = $( that.helper ),
  961 + ho = helper.offset(),
  962 + w = helper.outerWidth() - that.sizeDiff.width,
  963 + h = helper.outerHeight() - that.sizeDiff.height;
  964 +
  965 + if ( that._helper && !o.animate && ( /relative/ ).test( ce.css( "position" ) ) ) {
  966 + $( this ).css({
  967 + left: ho.left - cop.left - co.left,
  968 + width: w,
  969 + height: h
  970 + });
  971 + }
  972 +
  973 + if ( that._helper && !o.animate && ( /static/ ).test( ce.css( "position" ) ) ) {
  974 + $( this ).css({
  975 + left: ho.left - cop.left - co.left,
  976 + width: w,
  977 + height: h
  978 + });
  979 + }
  980 + }
  981 +});
  982 +
  983 +$.ui.plugin.add("resizable", "alsoResize", {
  984 +
  985 + start: function() {
  986 + var that = $(this).resizable( "instance" ),
  987 + o = that.options,
  988 + _store = function(exp) {
  989 + $(exp).each(function() {
  990 + var el = $(this);
  991 + el.data("ui-resizable-alsoresize", {
  992 + width: parseInt(el.width(), 10), height: parseInt(el.height(), 10),
  993 + left: parseInt(el.css("left"), 10), top: parseInt(el.css("top"), 10)
  994 + });
  995 + });
  996 + };
  997 +
  998 + if (typeof(o.alsoResize) === "object" && !o.alsoResize.parentNode) {
  999 + if (o.alsoResize.length) {
  1000 + o.alsoResize = o.alsoResize[0];
  1001 + _store(o.alsoResize);
  1002 + } else {
  1003 + $.each(o.alsoResize, function(exp) {
  1004 + _store(exp);
  1005 + });
  1006 + }
  1007 + } else {
  1008 + _store(o.alsoResize);
  1009 + }
  1010 + },
  1011 +
  1012 + resize: function(event, ui) {
  1013 + var that = $(this).resizable( "instance" ),
  1014 + o = that.options,
  1015 + os = that.originalSize,
  1016 + op = that.originalPosition,
  1017 + delta = {
  1018 + height: (that.size.height - os.height) || 0,
  1019 + width: (that.size.width - os.width) || 0,
  1020 + top: (that.position.top - op.top) || 0,
  1021 + left: (that.position.left - op.left) || 0
  1022 + },
  1023 +
  1024 + _alsoResize = function(exp, c) {
  1025 + $(exp).each(function() {
  1026 + var el = $(this), start = $(this).data("ui-resizable-alsoresize"), style = {},
  1027 + css = c && c.length ?
  1028 + c :
  1029 + el.parents(ui.originalElement[0]).length ?
  1030 + [ "width", "height" ] :
  1031 + [ "width", "height", "top", "left" ];
  1032 +
  1033 + $.each(css, function(i, prop) {
  1034 + var sum = (start[prop] || 0) + (delta[prop] || 0);
  1035 + if (sum && sum >= 0) {
  1036 + style[prop] = sum || null;
  1037 + }
  1038 + });
  1039 +
  1040 + el.css(style);
  1041 + });
  1042 + };
  1043 +
  1044 + if (typeof(o.alsoResize) === "object" && !o.alsoResize.nodeType) {
  1045 + $.each(o.alsoResize, function(exp, c) {
  1046 + _alsoResize(exp, c);
  1047 + });
  1048 + } else {
  1049 + _alsoResize(o.alsoResize);
  1050 + }
  1051 + },
  1052 +
  1053 + stop: function() {
  1054 + $(this).removeData("resizable-alsoresize");
  1055 + }
  1056 +});
  1057 +
  1058 +$.ui.plugin.add("resizable", "ghost", {
  1059 +
  1060 + start: function() {
  1061 +
  1062 + var that = $(this).resizable( "instance" ), o = that.options, cs = that.size;
  1063 +
  1064 + that.ghost = that.originalElement.clone();
  1065 + that.ghost
  1066 + .css({
  1067 + opacity: 0.25,
  1068 + display: "block",
  1069 + position: "relative",
  1070 + height: cs.height,
  1071 + width: cs.width,
  1072 + margin: 0,
  1073 + left: 0,
  1074 + top: 0
  1075 + })
  1076 + .addClass("ui-resizable-ghost")
  1077 + .addClass(typeof o.ghost === "string" ? o.ghost : "");
  1078 +
  1079 + that.ghost.appendTo(that.helper);
  1080 +
  1081 + },
  1082 +
  1083 + resize: function() {
  1084 + var that = $(this).resizable( "instance" );
  1085 + if (that.ghost) {
  1086 + that.ghost.css({
  1087 + position: "relative",
  1088 + height: that.size.height,
  1089 + width: that.size.width
  1090 + });
  1091 + }
  1092 + },
  1093 +
  1094 + stop: function() {
  1095 + var that = $(this).resizable( "instance" );
  1096 + if (that.ghost && that.helper) {
  1097 + that.helper.get(0).removeChild(that.ghost.get(0));
  1098 + }
  1099 + }
  1100 +
  1101 +});
  1102 +
  1103 +$.ui.plugin.add("resizable", "grid", {
  1104 +
  1105 + resize: function() {
  1106 + var outerDimensions,
  1107 + that = $(this).resizable( "instance" ),
  1108 + o = that.options,
  1109 + cs = that.size,
  1110 + os = that.originalSize,
  1111 + op = that.originalPosition,
  1112 + a = that.axis,
  1113 + grid = typeof o.grid === "number" ? [ o.grid, o.grid ] : o.grid,
  1114 + gridX = (grid[0] || 1),
  1115 + gridY = (grid[1] || 1),
  1116 + ox = Math.round((cs.width - os.width) / gridX) * gridX,
  1117 + oy = Math.round((cs.height - os.height) / gridY) * gridY,
  1118 + newWidth = os.width + ox,
  1119 + newHeight = os.height + oy,
  1120 + isMaxWidth = o.maxWidth && (o.maxWidth < newWidth),
  1121 + isMaxHeight = o.maxHeight && (o.maxHeight < newHeight),
  1122 + isMinWidth = o.minWidth && (o.minWidth > newWidth),
  1123 + isMinHeight = o.minHeight && (o.minHeight > newHeight);
  1124 +
  1125 + o.grid = grid;
  1126 +
  1127 + if (isMinWidth) {
  1128 + newWidth += gridX;
  1129 + }
  1130 + if (isMinHeight) {
  1131 + newHeight += gridY;
  1132 + }
  1133 + if (isMaxWidth) {
  1134 + newWidth -= gridX;
  1135 + }
  1136 + if (isMaxHeight) {
  1137 + newHeight -= gridY;
  1138 + }
  1139 +
  1140 + if (/^(se|s|e)$/.test(a)) {
  1141 + that.size.width = newWidth;
  1142 + that.size.height = newHeight;
  1143 + } else if (/^(ne)$/.test(a)) {
  1144 + that.size.width = newWidth;
  1145 + that.size.height = newHeight;
  1146 + that.position.top = op.top - oy;
  1147 + } else if (/^(sw)$/.test(a)) {
  1148 + that.size.width = newWidth;
  1149 + that.size.height = newHeight;
  1150 + that.position.left = op.left - ox;
  1151 + } else {
  1152 + if ( newHeight - gridY <= 0 || newWidth - gridX <= 0) {
  1153 + outerDimensions = that._getPaddingPlusBorderDimensions( this );
  1154 + }
  1155 +
  1156 + if ( newHeight - gridY > 0 ) {
  1157 + that.size.height = newHeight;
  1158 + that.position.top = op.top - oy;
  1159 + } else {
  1160 + newHeight = gridY - outerDimensions.height;
  1161 + that.size.height = newHeight;
  1162 + that.position.top = op.top + os.height - newHeight;
  1163 + }
  1164 + if ( newWidth - gridX > 0 ) {
  1165 + that.size.width = newWidth;
  1166 + that.position.left = op.left - ox;
  1167 + } else {
  1168 + newWidth = gridY - outerDimensions.height;
  1169 + that.size.width = newWidth;
  1170 + that.position.left = op.left + os.width - newWidth;
  1171 + }
  1172 + }
  1173 + }
  1174 +
  1175 +});
  1176 +
  1177 +return $.ui.resizable;
  1178 +
  1179 +}));
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/accordion.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Accordion 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/accordion/#theming
  10 + */
  11 +.ui-accordion .ui-accordion-header {
  12 + display: block;
  13 + cursor: pointer;
  14 + position: relative;
  15 + margin: 2px 0 0 0;
  16 + padding: .5em .5em .5em .7em;
  17 + min-height: 0; /* support: IE7 */
  18 + font-size: 100%;
  19 +}
  20 +.ui-accordion .ui-accordion-icons {
  21 + padding-left: 2.2em;
  22 +}
  23 +.ui-accordion .ui-accordion-icons .ui-accordion-icons {
  24 + padding-left: 2.2em;
  25 +}
  26 +.ui-accordion .ui-accordion-header .ui-accordion-header-icon {
  27 + position: absolute;
  28 + left: .5em;
  29 + top: 50%;
  30 + margin-top: -8px;
  31 +}
  32 +.ui-accordion .ui-accordion-content {
  33 + padding: 1em 2.2em;
  34 + border-top: 0;
  35 + overflow: auto;
  36 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/all.css 0 → 100644
  1 +/*!
  2 + * jQuery UI CSS Framework 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/category/theming/
  10 + */
  11 +@import "base.css";
  12 +@import "theme.css";
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/autocomplete.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Autocomplete 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/autocomplete/#theming
  10 + */
  11 +.ui-autocomplete {
  12 + position: absolute;
  13 + top: 0;
  14 + left: 0;
  15 + cursor: default;
  16 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/base.css 0 → 100644
  1 +/*!
  2 + * jQuery UI CSS Framework 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/category/theming/
  10 + */
  11 +@import url("core.css");
  12 +
  13 +@import url("accordion.css");
  14 +@import url("autocomplete.css");
  15 +@import url("button.css");
  16 +@import url("datepicker.css");
  17 +@import url("dialog.css");
  18 +@import url("draggable.css");
  19 +@import url("menu.css");
  20 +@import url("progressbar.css");
  21 +@import url("resizable.css");
  22 +@import url("selectable.css");
  23 +@import url("selectmenu.css");
  24 +@import url("sortable.css");
  25 +@import url("slider.css");
  26 +@import url("spinner.css");
  27 +@import url("tabs.css");
  28 +@import url("tooltip.css");
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/button.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Button 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/button/#theming
  10 + */
  11 +.ui-button {
  12 + display: inline-block;
  13 + position: relative;
  14 + padding: 0;
  15 + line-height: normal;
  16 + margin-right: .1em;
  17 + cursor: pointer;
  18 + vertical-align: middle;
  19 + text-align: center;
  20 + overflow: visible; /* removes extra width in IE */
  21 +}
  22 +.ui-button,
  23 +.ui-button:link,
  24 +.ui-button:visited,
  25 +.ui-button:hover,
  26 +.ui-button:active {
  27 + text-decoration: none;
  28 +}
  29 +/* to make room for the icon, a width needs to be set here */
  30 +.ui-button-icon-only {
  31 + width: 2.2em;
  32 +}
  33 +/* button elements seem to need a little more width */
  34 +button.ui-button-icon-only {
  35 + width: 2.4em;
  36 +}
  37 +.ui-button-icons-only {
  38 + width: 3.4em;
  39 +}
  40 +button.ui-button-icons-only {
  41 + width: 3.7em;
  42 +}
  43 +
  44 +/* button text element */
  45 +.ui-button .ui-button-text {
  46 + display: block;
  47 + line-height: normal;
  48 +}
  49 +.ui-button-text-only .ui-button-text {
  50 + padding: .4em 1em;
  51 +}
  52 +.ui-button-icon-only .ui-button-text,
  53 +.ui-button-icons-only .ui-button-text {
  54 + padding: .4em;
  55 + text-indent: -9999999px;
  56 +}
  57 +.ui-button-text-icon-primary .ui-button-text,
  58 +.ui-button-text-icons .ui-button-text {
  59 + padding: .4em 1em .4em 2.1em;
  60 +}
  61 +.ui-button-text-icon-secondary .ui-button-text,
  62 +.ui-button-text-icons .ui-button-text {
  63 + padding: .4em 2.1em .4em 1em;
  64 +}
  65 +.ui-button-text-icons .ui-button-text {
  66 + padding-left: 2.1em;
  67 + padding-right: 2.1em;
  68 +}
  69 +/* no icon support for input elements, provide padding by default */
  70 +input.ui-button {
  71 + padding: .4em 1em;
  72 +}
  73 +
  74 +/* button icon element(s) */
  75 +.ui-button-icon-only .ui-icon,
  76 +.ui-button-text-icon-primary .ui-icon,
  77 +.ui-button-text-icon-secondary .ui-icon,
  78 +.ui-button-text-icons .ui-icon,
  79 +.ui-button-icons-only .ui-icon {
  80 + position: absolute;
  81 + top: 50%;
  82 + margin-top: -8px;
  83 +}
  84 +.ui-button-icon-only .ui-icon {
  85 + left: 50%;
  86 + margin-left: -8px;
  87 +}
  88 +.ui-button-text-icon-primary .ui-button-icon-primary,
  89 +.ui-button-text-icons .ui-button-icon-primary,
  90 +.ui-button-icons-only .ui-button-icon-primary {
  91 + left: .5em;
  92 +}
  93 +.ui-button-text-icon-secondary .ui-button-icon-secondary,
  94 +.ui-button-text-icons .ui-button-icon-secondary,
  95 +.ui-button-icons-only .ui-button-icon-secondary {
  96 + right: .5em;
  97 +}
  98 +
  99 +/* button sets */
  100 +.ui-buttonset {
  101 + margin-right: 7px;
  102 +}
  103 +.ui-buttonset .ui-button {
  104 + margin-left: 0;
  105 + margin-right: -.3em;
  106 +}
  107 +
  108 +/* workarounds */
  109 +/* reset extra padding in Firefox, see h5bp.com/l */
  110 +input.ui-button::-moz-focus-inner,
  111 +button.ui-button::-moz-focus-inner {
  112 + border: 0;
  113 + padding: 0;
  114 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/core.css 0 → 100644
  1 +/*!
  2 + * jQuery UI CSS Framework 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/category/theming/
  10 + */
  11 +
  12 +/* Layout helpers
  13 +----------------------------------*/
  14 +.ui-helper-hidden {
  15 + display: none;
  16 +}
  17 +.ui-helper-hidden-accessible {
  18 + border: 0;
  19 + clip: rect(0 0 0 0);
  20 + height: 1px;
  21 + margin: -1px;
  22 + overflow: hidden;
  23 + padding: 0;
  24 + position: absolute;
  25 + width: 1px;
  26 +}
  27 +.ui-helper-reset {
  28 + margin: 0;
  29 + padding: 0;
  30 + border: 0;
  31 + outline: 0;
  32 + line-height: 1.3;
  33 + text-decoration: none;
  34 + font-size: 100%;
  35 + list-style: none;
  36 +}
  37 +.ui-helper-clearfix:before,
  38 +.ui-helper-clearfix:after {
  39 + content: "";
  40 + display: table;
  41 + border-collapse: collapse;
  42 +}
  43 +.ui-helper-clearfix:after {
  44 + clear: both;
  45 +}
  46 +.ui-helper-clearfix {
  47 + min-height: 0; /* support: IE7 */
  48 +}
  49 +.ui-helper-zfix {
  50 + width: 100%;
  51 + height: 100%;
  52 + top: 0;
  53 + left: 0;
  54 + position: absolute;
  55 + opacity: 0;
  56 + filter:Alpha(Opacity=0); /* support: IE8 */
  57 +}
  58 +
  59 +.ui-front {
  60 + z-index: 100;
  61 +}
  62 +
  63 +
  64 +/* Interaction Cues
  65 +----------------------------------*/
  66 +.ui-state-disabled {
  67 + cursor: default !important;
  68 +}
  69 +
  70 +
  71 +/* Icons
  72 +----------------------------------*/
  73 +
  74 +/* states and images */
  75 +.ui-icon {
  76 + display: block;
  77 + text-indent: -99999px;
  78 + overflow: hidden;
  79 + background-repeat: no-repeat;
  80 +}
  81 +
  82 +
  83 +/* Misc visuals
  84 +----------------------------------*/
  85 +
  86 +/* Overlays */
  87 +.ui-widget-overlay {
  88 + position: fixed;
  89 + top: 0;
  90 + left: 0;
  91 + width: 100%;
  92 + height: 100%;
  93 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/datepicker.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Datepicker 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/datepicker/#theming
  10 + */
  11 +.ui-datepicker {
  12 + width: 17em;
  13 + padding: .2em .2em 0;
  14 + display: none;
  15 +}
  16 +.ui-datepicker .ui-datepicker-header {
  17 + position: relative;
  18 + padding: .2em 0;
  19 +}
  20 +.ui-datepicker .ui-datepicker-prev,
  21 +.ui-datepicker .ui-datepicker-next {
  22 + position: absolute;
  23 + top: 2px;
  24 + width: 1.8em;
  25 + height: 1.8em;
  26 +}
  27 +.ui-datepicker .ui-datepicker-prev-hover,
  28 +.ui-datepicker .ui-datepicker-next-hover {
  29 + top: 1px;
  30 +}
  31 +.ui-datepicker .ui-datepicker-prev {
  32 + left: 2px;
  33 +}
  34 +.ui-datepicker .ui-datepicker-next {
  35 + right: 2px;
  36 +}
  37 +.ui-datepicker .ui-datepicker-prev-hover {
  38 + left: 1px;
  39 +}
  40 +.ui-datepicker .ui-datepicker-next-hover {
  41 + right: 1px;
  42 +}
  43 +.ui-datepicker .ui-datepicker-prev span,
  44 +.ui-datepicker .ui-datepicker-next span {
  45 + display: block;
  46 + position: absolute;
  47 + left: 50%;
  48 + margin-left: -8px;
  49 + top: 50%;
  50 + margin-top: -8px;
  51 +}
  52 +.ui-datepicker .ui-datepicker-title {
  53 + margin: 0 2.3em;
  54 + line-height: 1.8em;
  55 + text-align: center;
  56 +}
  57 +.ui-datepicker .ui-datepicker-title select {
  58 + font-size: 1em;
  59 + margin: 1px 0;
  60 +}
  61 +.ui-datepicker select.ui-datepicker-month,
  62 +.ui-datepicker select.ui-datepicker-year {
  63 + width: 45%;
  64 +}
  65 +.ui-datepicker table {
  66 + width: 100%;
  67 + font-size: .9em;
  68 + border-collapse: collapse;
  69 + margin: 0 0 .4em;
  70 +}
  71 +.ui-datepicker th {
  72 + padding: .7em .3em;
  73 + text-align: center;
  74 + font-weight: bold;
  75 + border: 0;
  76 +}
  77 +.ui-datepicker td {
  78 + border: 0;
  79 + padding: 1px;
  80 +}
  81 +.ui-datepicker td span,
  82 +.ui-datepicker td a {
  83 + display: block;
  84 + padding: .2em;
  85 + text-align: right;
  86 + text-decoration: none;
  87 +}
  88 +.ui-datepicker .ui-datepicker-buttonpane {
  89 + background-image: none;
  90 + margin: .7em 0 0 0;
  91 + padding: 0 .2em;
  92 + border-left: 0;
  93 + border-right: 0;
  94 + border-bottom: 0;
  95 +}
  96 +.ui-datepicker .ui-datepicker-buttonpane button {
  97 + float: right;
  98 + margin: .5em .2em .4em;
  99 + cursor: pointer;
  100 + padding: .2em .6em .3em .6em;
  101 + width: auto;
  102 + overflow: visible;
  103 +}
  104 +.ui-datepicker .ui-datepicker-buttonpane button.ui-datepicker-current {
  105 + float: left;
  106 +}
  107 +
  108 +/* with multiple calendars */
  109 +.ui-datepicker.ui-datepicker-multi {
  110 + width: auto;
  111 +}
  112 +.ui-datepicker-multi .ui-datepicker-group {
  113 + float: left;
  114 +}
  115 +.ui-datepicker-multi .ui-datepicker-group table {
  116 + width: 95%;
  117 + margin: 0 auto .4em;
  118 +}
  119 +.ui-datepicker-multi-2 .ui-datepicker-group {
  120 + width: 50%;
  121 +}
  122 +.ui-datepicker-multi-3 .ui-datepicker-group {
  123 + width: 33.3%;
  124 +}
  125 +.ui-datepicker-multi-4 .ui-datepicker-group {
  126 + width: 25%;
  127 +}
  128 +.ui-datepicker-multi .ui-datepicker-group-last .ui-datepicker-header,
  129 +.ui-datepicker-multi .ui-datepicker-group-middle .ui-datepicker-header {
  130 + border-left-width: 0;
  131 +}
  132 +.ui-datepicker-multi .ui-datepicker-buttonpane {
  133 + clear: left;
  134 +}
  135 +.ui-datepicker-row-break {
  136 + clear: both;
  137 + width: 100%;
  138 + font-size: 0;
  139 +}
  140 +
  141 +/* RTL support */
  142 +.ui-datepicker-rtl {
  143 + direction: rtl;
  144 +}
  145 +.ui-datepicker-rtl .ui-datepicker-prev {
  146 + right: 2px;
  147 + left: auto;
  148 +}
  149 +.ui-datepicker-rtl .ui-datepicker-next {
  150 + left: 2px;
  151 + right: auto;
  152 +}
  153 +.ui-datepicker-rtl .ui-datepicker-prev:hover {
  154 + right: 1px;
  155 + left: auto;
  156 +}
  157 +.ui-datepicker-rtl .ui-datepicker-next:hover {
  158 + left: 1px;
  159 + right: auto;
  160 +}
  161 +.ui-datepicker-rtl .ui-datepicker-buttonpane {
  162 + clear: right;
  163 +}
  164 +.ui-datepicker-rtl .ui-datepicker-buttonpane button {
  165 + float: left;
  166 +}
  167 +.ui-datepicker-rtl .ui-datepicker-buttonpane button.ui-datepicker-current,
  168 +.ui-datepicker-rtl .ui-datepicker-group {
  169 + float: right;
  170 +}
  171 +.ui-datepicker-rtl .ui-datepicker-group-last .ui-datepicker-header,
  172 +.ui-datepicker-rtl .ui-datepicker-group-middle .ui-datepicker-header {
  173 + border-right-width: 0;
  174 + border-left-width: 1px;
  175 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/dialog.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Dialog 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/dialog/#theming
  10 + */
  11 +.ui-dialog {
  12 + overflow: hidden;
  13 + position: absolute;
  14 + top: 0;
  15 + left: 0;
  16 + padding: .2em;
  17 + outline: 0;
  18 +}
  19 +.ui-dialog .ui-dialog-titlebar {
  20 + padding: .4em 1em;
  21 + position: relative;
  22 +}
  23 +.ui-dialog .ui-dialog-title {
  24 + float: left;
  25 + margin: .1em 0;
  26 + white-space: nowrap;
  27 + width: 90%;
  28 + overflow: hidden;
  29 + text-overflow: ellipsis;
  30 +}
  31 +.ui-dialog .ui-dialog-titlebar-close {
  32 + position: absolute;
  33 + right: .3em;
  34 + top: 50%;
  35 + width: 20px;
  36 + margin: -10px 0 0 0;
  37 + padding: 1px;
  38 + height: 20px;
  39 +}
  40 +.ui-dialog .ui-dialog-content {
  41 + position: relative;
  42 + border: 0;
  43 + padding: .5em 1em;
  44 + background: none;
  45 + overflow: auto;
  46 +}
  47 +.ui-dialog .ui-dialog-buttonpane {
  48 + text-align: left;
  49 + border-width: 1px 0 0 0;
  50 + background-image: none;
  51 + margin-top: .5em;
  52 + padding: .3em 1em .5em .4em;
  53 +}
  54 +.ui-dialog .ui-dialog-buttonpane .ui-dialog-buttonset {
  55 + float: right;
  56 +}
  57 +.ui-dialog .ui-dialog-buttonpane button {
  58 + margin: .5em .4em .5em 0;
  59 + cursor: pointer;
  60 +}
  61 +.ui-dialog .ui-resizable-se {
  62 + width: 12px;
  63 + height: 12px;
  64 + right: -5px;
  65 + bottom: -5px;
  66 + background-position: 16px 16px;
  67 +}
  68 +.ui-draggable .ui-dialog-titlebar {
  69 + cursor: move;
  70 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/draggable.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Draggable 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + */
  9 +.ui-draggable-handle {
  10 + -ms-touch-action: none;
  11 + touch-action: none;
  12 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_flat_0_aaaaaa_40x100.png 0 → 100644

180 Bytes

src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_flat_75_ffffff_40x100.png 0 → 100644

178 Bytes

src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_55_fbf9ee_1x400.png 0 → 100644

120 Bytes

src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_65_ffffff_1x400.png 0 → 100644

105 Bytes

src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_75_dadada_1x400.png 0 → 100644

111 Bytes

src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_75_e6e6e6_1x400.png 0 → 100644

110 Bytes

src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_glass_95_fef1ec_1x400.png 0 → 100644

119 Bytes

src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-bg_highlight-soft_75_cccccc_1x100.png 0 → 100644

101 Bytes

src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_222222_256x240.png 0 → 100644

4.27 KB

src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_2e83ff_256x240.png 0 → 100644

4.27 KB

src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_454545_256x240.png 0 → 100644

4.27 KB

src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_888888_256x240.png 0 → 100644

4.27 KB

src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/images/ui-icons_cd0a0a_256x240.png 0 → 100644

4.27 KB

src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/menu.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Menu 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/menu/#theming
  10 + */
  11 +.ui-menu {
  12 + list-style: none;
  13 + padding: 0;
  14 + margin: 0;
  15 + display: block;
  16 + outline: none;
  17 +}
  18 +.ui-menu .ui-menu {
  19 + position: absolute;
  20 +}
  21 +.ui-menu .ui-menu-item {
  22 + position: relative;
  23 + margin: 0;
  24 + padding: 3px 1em 3px .4em;
  25 + cursor: pointer;
  26 + min-height: 0; /* support: IE7 */
  27 + /* support: IE10, see #8844 */
  28 + list-style-image: url("data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7");
  29 +}
  30 +.ui-menu .ui-menu-divider {
  31 + margin: 5px 0;
  32 + height: 0;
  33 + font-size: 0;
  34 + line-height: 0;
  35 + border-width: 1px 0 0 0;
  36 +}
  37 +.ui-menu .ui-state-focus,
  38 +.ui-menu .ui-state-active {
  39 + margin: -1px;
  40 +}
  41 +
  42 +/* icon support */
  43 +.ui-menu-icons {
  44 + position: relative;
  45 +}
  46 +.ui-menu-icons .ui-menu-item {
  47 + padding-left: 2em;
  48 +}
  49 +
  50 +/* left-aligned */
  51 +.ui-menu .ui-icon {
  52 + position: absolute;
  53 + top: 0;
  54 + bottom: 0;
  55 + left: .2em;
  56 + margin: auto 0;
  57 +}
  58 +
  59 +/* right-aligned */
  60 +.ui-menu .ui-menu-icon {
  61 + left: auto;
  62 + right: 0;
  63 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/progressbar.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Progressbar 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/progressbar/#theming
  10 + */
  11 +.ui-progressbar {
  12 + height: 2em;
  13 + text-align: left;
  14 + overflow: hidden;
  15 +}
  16 +.ui-progressbar .ui-progressbar-value {
  17 + margin: -1px;
  18 + height: 100%;
  19 +}
  20 +.ui-progressbar .ui-progressbar-overlay {
  21 + background: url("data:image/gif;base64,R0lGODlhKAAoAIABAAAAAP///yH/C05FVFNDQVBFMi4wAwEAAAAh+QQJAQABACwAAAAAKAAoAAACkYwNqXrdC52DS06a7MFZI+4FHBCKoDeWKXqymPqGqxvJrXZbMx7Ttc+w9XgU2FB3lOyQRWET2IFGiU9m1frDVpxZZc6bfHwv4c1YXP6k1Vdy292Fb6UkuvFtXpvWSzA+HycXJHUXiGYIiMg2R6W459gnWGfHNdjIqDWVqemH2ekpObkpOlppWUqZiqr6edqqWQAAIfkECQEAAQAsAAAAACgAKAAAApSMgZnGfaqcg1E2uuzDmmHUBR8Qil95hiPKqWn3aqtLsS18y7G1SzNeowWBENtQd+T1JktP05nzPTdJZlR6vUxNWWjV+vUWhWNkWFwxl9VpZRedYcflIOLafaa28XdsH/ynlcc1uPVDZxQIR0K25+cICCmoqCe5mGhZOfeYSUh5yJcJyrkZWWpaR8doJ2o4NYq62lAAACH5BAkBAAEALAAAAAAoACgAAAKVDI4Yy22ZnINRNqosw0Bv7i1gyHUkFj7oSaWlu3ovC8GxNso5fluz3qLVhBVeT/Lz7ZTHyxL5dDalQWPVOsQWtRnuwXaFTj9jVVh8pma9JjZ4zYSj5ZOyma7uuolffh+IR5aW97cHuBUXKGKXlKjn+DiHWMcYJah4N0lYCMlJOXipGRr5qdgoSTrqWSq6WFl2ypoaUAAAIfkECQEAAQAsAAAAACgAKAAAApaEb6HLgd/iO7FNWtcFWe+ufODGjRfoiJ2akShbueb0wtI50zm02pbvwfWEMWBQ1zKGlLIhskiEPm9R6vRXxV4ZzWT2yHOGpWMyorblKlNp8HmHEb/lCXjcW7bmtXP8Xt229OVWR1fod2eWqNfHuMjXCPkIGNileOiImVmCOEmoSfn3yXlJWmoHGhqp6ilYuWYpmTqKUgAAIfkECQEAAQAsAAAAACgAKAAAApiEH6kb58biQ3FNWtMFWW3eNVcojuFGfqnZqSebuS06w5V80/X02pKe8zFwP6EFWOT1lDFk8rGERh1TTNOocQ61Hm4Xm2VexUHpzjymViHrFbiELsefVrn6XKfnt2Q9G/+Xdie499XHd2g4h7ioOGhXGJboGAnXSBnoBwKYyfioubZJ2Hn0RuRZaflZOil56Zp6iioKSXpUAAAh+QQJAQABACwAAAAAKAAoAAACkoQRqRvnxuI7kU1a1UU5bd5tnSeOZXhmn5lWK3qNTWvRdQxP8qvaC+/yaYQzXO7BMvaUEmJRd3TsiMAgswmNYrSgZdYrTX6tSHGZO73ezuAw2uxuQ+BbeZfMxsexY35+/Qe4J1inV0g4x3WHuMhIl2jXOKT2Q+VU5fgoSUI52VfZyfkJGkha6jmY+aaYdirq+lQAACH5BAkBAAEALAAAAAAoACgAAAKWBIKpYe0L3YNKToqswUlvznigd4wiR4KhZrKt9Upqip61i9E3vMvxRdHlbEFiEXfk9YARYxOZZD6VQ2pUunBmtRXo1Lf8hMVVcNl8JafV38aM2/Fu5V16Bn63r6xt97j09+MXSFi4BniGFae3hzbH9+hYBzkpuUh5aZmHuanZOZgIuvbGiNeomCnaxxap2upaCZsq+1kAACH5BAkBAAEALAAAAAAoACgAAAKXjI8By5zf4kOxTVrXNVlv1X0d8IGZGKLnNpYtm8Lr9cqVeuOSvfOW79D9aDHizNhDJidFZhNydEahOaDH6nomtJjp1tutKoNWkvA6JqfRVLHU/QUfau9l2x7G54d1fl995xcIGAdXqMfBNadoYrhH+Mg2KBlpVpbluCiXmMnZ2Sh4GBqJ+ckIOqqJ6LmKSllZmsoq6wpQAAAh+QQJAQABACwAAAAAKAAoAAAClYx/oLvoxuJDkU1a1YUZbJ59nSd2ZXhWqbRa2/gF8Gu2DY3iqs7yrq+xBYEkYvFSM8aSSObE+ZgRl1BHFZNr7pRCavZ5BW2142hY3AN/zWtsmf12p9XxxFl2lpLn1rseztfXZjdIWIf2s5dItwjYKBgo9yg5pHgzJXTEeGlZuenpyPmpGQoKOWkYmSpaSnqKileI2FAAACH5BAkBAAEALAAAAAAoACgAAAKVjB+gu+jG4kORTVrVhRlsnn2dJ3ZleFaptFrb+CXmO9OozeL5VfP99HvAWhpiUdcwkpBH3825AwYdU8xTqlLGhtCosArKMpvfa1mMRae9VvWZfeB2XfPkeLmm18lUcBj+p5dnN8jXZ3YIGEhYuOUn45aoCDkp16hl5IjYJvjWKcnoGQpqyPlpOhr3aElaqrq56Bq7VAAAOw==");
  22 + height: 100%;
  23 + filter: alpha(opacity=25); /* support: IE8 */
  24 + opacity: 0.25;
  25 +}
  26 +.ui-progressbar-indeterminate .ui-progressbar-value {
  27 + background-image: none;
  28 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/resizable.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Resizable 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + */
  9 +.ui-resizable {
  10 + position: relative;
  11 +}
  12 +.ui-resizable-handle {
  13 + position: absolute;
  14 + font-size: 0.1px;
  15 + display: block;
  16 + -ms-touch-action: none;
  17 + touch-action: none;
  18 +}
  19 +.ui-resizable-disabled .ui-resizable-handle,
  20 +.ui-resizable-autohide .ui-resizable-handle {
  21 + display: none;
  22 +}
  23 +.ui-resizable-n {
  24 + cursor: n-resize;
  25 + height: 7px;
  26 + width: 100%;
  27 + top: -5px;
  28 + left: 0;
  29 +}
  30 +.ui-resizable-s {
  31 + cursor: s-resize;
  32 + height: 7px;
  33 + width: 100%;
  34 + bottom: -5px;
  35 + left: 0;
  36 +}
  37 +.ui-resizable-e {
  38 + cursor: e-resize;
  39 + width: 7px;
  40 + right: -5px;
  41 + top: 0;
  42 + height: 100%;
  43 +}
  44 +.ui-resizable-w {
  45 + cursor: w-resize;
  46 + width: 7px;
  47 + left: -5px;
  48 + top: 0;
  49 + height: 100%;
  50 +}
  51 +.ui-resizable-se {
  52 + cursor: se-resize;
  53 + width: 12px;
  54 + height: 12px;
  55 + right: 1px;
  56 + bottom: 1px;
  57 +}
  58 +.ui-resizable-sw {
  59 + cursor: sw-resize;
  60 + width: 9px;
  61 + height: 9px;
  62 + left: -5px;
  63 + bottom: -5px;
  64 +}
  65 +.ui-resizable-nw {
  66 + cursor: nw-resize;
  67 + width: 9px;
  68 + height: 9px;
  69 + left: -5px;
  70 + top: -5px;
  71 +}
  72 +.ui-resizable-ne {
  73 + cursor: ne-resize;
  74 + width: 9px;
  75 + height: 9px;
  76 + right: -5px;
  77 + top: -5px;
  78 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/selectable.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Selectable 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + */
  9 +.ui-selectable {
  10 + -ms-touch-action: none;
  11 + touch-action: none;
  12 +}
  13 +.ui-selectable-helper {
  14 + position: absolute;
  15 + z-index: 100;
  16 + border: 1px dotted black;
  17 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/selectmenu.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Selectmenu 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/selectmenu/#theming
  10 + */
  11 +.ui-selectmenu-menu {
  12 + padding: 0;
  13 + margin: 0;
  14 + position: absolute;
  15 + top: 0;
  16 + left: 0;
  17 + display: none;
  18 +}
  19 +.ui-selectmenu-menu .ui-menu {
  20 + overflow: auto;
  21 + /* Support: IE7 */
  22 + overflow-x: hidden;
  23 + padding-bottom: 1px;
  24 +}
  25 +.ui-selectmenu-menu .ui-menu .ui-selectmenu-optgroup {
  26 + font-size: 1em;
  27 + font-weight: bold;
  28 + line-height: 1.5;
  29 + padding: 2px 0.4em;
  30 + margin: 0.5em 0 0 0;
  31 + height: auto;
  32 + border: 0;
  33 +}
  34 +.ui-selectmenu-open {
  35 + display: block;
  36 +}
  37 +.ui-selectmenu-button {
  38 + display: inline-block;
  39 + overflow: hidden;
  40 + position: relative;
  41 + text-decoration: none;
  42 + cursor: pointer;
  43 +}
  44 +.ui-selectmenu-button span.ui-icon {
  45 + right: 0.5em;
  46 + left: auto;
  47 + margin-top: -8px;
  48 + position: absolute;
  49 + top: 50%;
  50 +}
  51 +.ui-selectmenu-button span.ui-selectmenu-text {
  52 + text-align: left;
  53 + padding: 0.4em 2.1em 0.4em 1em;
  54 + display: block;
  55 + line-height: 1.4;
  56 + overflow: hidden;
  57 + text-overflow: ellipsis;
  58 + white-space: nowrap;
  59 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/slider.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Slider 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/slider/#theming
  10 + */
  11 +.ui-slider {
  12 + position: relative;
  13 + text-align: left;
  14 +}
  15 +.ui-slider .ui-slider-handle {
  16 + position: absolute;
  17 + z-index: 2;
  18 + width: 1.2em;
  19 + height: 1.2em;
  20 + cursor: default;
  21 + -ms-touch-action: none;
  22 + touch-action: none;
  23 +}
  24 +.ui-slider .ui-slider-range {
  25 + position: absolute;
  26 + z-index: 1;
  27 + font-size: .7em;
  28 + display: block;
  29 + border: 0;
  30 + background-position: 0 0;
  31 +}
  32 +
  33 +/* support: IE8 - See #6727 */
  34 +.ui-slider.ui-state-disabled .ui-slider-handle,
  35 +.ui-slider.ui-state-disabled .ui-slider-range {
  36 + filter: inherit;
  37 +}
  38 +
  39 +.ui-slider-horizontal {
  40 + height: .8em;
  41 +}
  42 +.ui-slider-horizontal .ui-slider-handle {
  43 + top: -.3em;
  44 + margin-left: -.6em;
  45 +}
  46 +.ui-slider-horizontal .ui-slider-range {
  47 + top: 0;
  48 + height: 100%;
  49 +}
  50 +.ui-slider-horizontal .ui-slider-range-min {
  51 + left: 0;
  52 +}
  53 +.ui-slider-horizontal .ui-slider-range-max {
  54 + right: 0;
  55 +}
  56 +
  57 +.ui-slider-vertical {
  58 + width: .8em;
  59 + height: 100px;
  60 +}
  61 +.ui-slider-vertical .ui-slider-handle {
  62 + left: -.3em;
  63 + margin-left: 0;
  64 + margin-bottom: -.6em;
  65 +}
  66 +.ui-slider-vertical .ui-slider-range {
  67 + left: 0;
  68 + width: 100%;
  69 +}
  70 +.ui-slider-vertical .ui-slider-range-min {
  71 + bottom: 0;
  72 +}
  73 +.ui-slider-vertical .ui-slider-range-max {
  74 + top: 0;
  75 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/sortable.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Sortable 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + */
  9 +.ui-sortable-handle {
  10 + -ms-touch-action: none;
  11 + touch-action: none;
  12 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/spinner.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Spinner 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/spinner/#theming
  10 + */
  11 +.ui-spinner {
  12 + position: relative;
  13 + display: inline-block;
  14 + overflow: hidden;
  15 + padding: 0;
  16 + vertical-align: middle;
  17 +}
  18 +.ui-spinner-input {
  19 + border: none;
  20 + background: none;
  21 + color: inherit;
  22 + padding: 0;
  23 + margin: .2em 0;
  24 + vertical-align: middle;
  25 + margin-left: .4em;
  26 + margin-right: 22px;
  27 +}
  28 +.ui-spinner-button {
  29 + width: 16px;
  30 + height: 50%;
  31 + font-size: .5em;
  32 + padding: 0;
  33 + margin: 0;
  34 + text-align: center;
  35 + position: absolute;
  36 + cursor: default;
  37 + display: block;
  38 + overflow: hidden;
  39 + right: 0;
  40 +}
  41 +/* more specificity required here to override default borders */
  42 +.ui-spinner a.ui-spinner-button {
  43 + border-top: none;
  44 + border-bottom: none;
  45 + border-right: none;
  46 +}
  47 +/* vertically center icon */
  48 +.ui-spinner .ui-icon {
  49 + position: absolute;
  50 + margin-top: -8px;
  51 + top: 50%;
  52 + left: 0;
  53 +}
  54 +.ui-spinner-up {
  55 + top: 0;
  56 +}
  57 +.ui-spinner-down {
  58 + bottom: 0;
  59 +}
  60 +
  61 +/* TR overrides */
  62 +.ui-spinner .ui-icon-triangle-1-s {
  63 + /* need to fix icons sprite */
  64 + background-position: -65px -16px;
  65 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/tabs.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Tabs 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/tabs/#theming
  10 + */
  11 +.ui-tabs {
  12 + position: relative;/* position: relative prevents IE scroll bug (element with position: relative inside container with overflow: auto appear as "fixed") */
  13 + padding: .2em;
  14 +}
  15 +.ui-tabs .ui-tabs-nav {
  16 + margin: 0;
  17 + padding: .2em .2em 0;
  18 +}
  19 +.ui-tabs .ui-tabs-nav li {
  20 + list-style: none;
  21 + float: left;
  22 + position: relative;
  23 + top: 0;
  24 + margin: 1px .2em 0 0;
  25 + border-bottom-width: 0;
  26 + padding: 0;
  27 + white-space: nowrap;
  28 +}
  29 +.ui-tabs .ui-tabs-nav .ui-tabs-anchor {
  30 + float: left;
  31 + padding: .5em 1em;
  32 + text-decoration: none;
  33 +}
  34 +.ui-tabs .ui-tabs-nav li.ui-tabs-active {
  35 + margin-bottom: -1px;
  36 + padding-bottom: 1px;
  37 +}
  38 +.ui-tabs .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor,
  39 +.ui-tabs .ui-tabs-nav li.ui-state-disabled .ui-tabs-anchor,
  40 +.ui-tabs .ui-tabs-nav li.ui-tabs-loading .ui-tabs-anchor {
  41 + cursor: text;
  42 +}
  43 +.ui-tabs-collapsible .ui-tabs-nav li.ui-tabs-active .ui-tabs-anchor {
  44 + cursor: pointer;
  45 +}
  46 +.ui-tabs .ui-tabs-panel {
  47 + display: block;
  48 + border-width: 0;
  49 + padding: 1em 1.4em;
  50 + background: none;
  51 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/theme.css 0 → 100644
  1 +/*!
  2 + * jQuery UI CSS Framework 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/category/theming/
  10 + *
  11 + * To view and modify this theme, visit http://jqueryui.com/themeroller/
  12 + */
  13 +
  14 +
  15 +/* Component containers
  16 +----------------------------------*/
  17 +.ui-widget {
  18 + font-family: Verdana,Arial,sans-serif/*{ffDefault}*/;
  19 + font-size: 1.1em/*{fsDefault}*/;
  20 +}
  21 +.ui-widget .ui-widget {
  22 + font-size: 1em;
  23 +}
  24 +.ui-widget input,
  25 +.ui-widget select,
  26 +.ui-widget textarea,
  27 +.ui-widget button {
  28 + font-family: Verdana,Arial,sans-serif/*{ffDefault}*/;
  29 + font-size: 1em;
  30 +}
  31 +.ui-widget-content {
  32 + border: 1px solid #aaaaaa/*{borderColorContent}*/;
  33 + background: #ffffff/*{bgColorContent}*/ url("images/ui-bg_flat_75_ffffff_40x100.png")/*{bgImgUrlContent}*/ 50%/*{bgContentXPos}*/ 50%/*{bgContentYPos}*/ repeat-x/*{bgContentRepeat}*/;
  34 + color: #222222/*{fcContent}*/;
  35 +}
  36 +.ui-widget-content a {
  37 + color: #222222/*{fcContent}*/;
  38 +}
  39 +.ui-widget-header {
  40 + border: 1px solid #aaaaaa/*{borderColorHeader}*/;
  41 + background: #cccccc/*{bgColorHeader}*/ url("images/ui-bg_highlight-soft_75_cccccc_1x100.png")/*{bgImgUrlHeader}*/ 50%/*{bgHeaderXPos}*/ 50%/*{bgHeaderYPos}*/ repeat-x/*{bgHeaderRepeat}*/;
  42 + color: #222222/*{fcHeader}*/;
  43 + font-weight: bold;
  44 +}
  45 +.ui-widget-header a {
  46 + color: #222222/*{fcHeader}*/;
  47 +}
  48 +
  49 +/* Interaction states
  50 +----------------------------------*/
  51 +.ui-state-default,
  52 +.ui-widget-content .ui-state-default,
  53 +.ui-widget-header .ui-state-default {
  54 + border: 1px solid #d3d3d3/*{borderColorDefault}*/;
  55 + background: #e6e6e6/*{bgColorDefault}*/ url("images/ui-bg_glass_75_e6e6e6_1x400.png")/*{bgImgUrlDefault}*/ 50%/*{bgDefaultXPos}*/ 50%/*{bgDefaultYPos}*/ repeat-x/*{bgDefaultRepeat}*/;
  56 + font-weight: normal/*{fwDefault}*/;
  57 + color: #555555/*{fcDefault}*/;
  58 +}
  59 +.ui-state-default a,
  60 +.ui-state-default a:link,
  61 +.ui-state-default a:visited {
  62 + color: #555555/*{fcDefault}*/;
  63 + text-decoration: none;
  64 +}
  65 +.ui-state-hover,
  66 +.ui-widget-content .ui-state-hover,
  67 +.ui-widget-header .ui-state-hover,
  68 +.ui-state-focus,
  69 +.ui-widget-content .ui-state-focus,
  70 +.ui-widget-header .ui-state-focus {
  71 + border: 1px solid #999999/*{borderColorHover}*/;
  72 + background: #dadada/*{bgColorHover}*/ url("images/ui-bg_glass_75_dadada_1x400.png")/*{bgImgUrlHover}*/ 50%/*{bgHoverXPos}*/ 50%/*{bgHoverYPos}*/ repeat-x/*{bgHoverRepeat}*/;
  73 + font-weight: normal/*{fwDefault}*/;
  74 + color: #212121/*{fcHover}*/;
  75 +}
  76 +.ui-state-hover a,
  77 +.ui-state-hover a:hover,
  78 +.ui-state-hover a:link,
  79 +.ui-state-hover a:visited,
  80 +.ui-state-focus a,
  81 +.ui-state-focus a:hover,
  82 +.ui-state-focus a:link,
  83 +.ui-state-focus a:visited {
  84 + color: #212121/*{fcHover}*/;
  85 + text-decoration: none;
  86 +}
  87 +.ui-state-active,
  88 +.ui-widget-content .ui-state-active,
  89 +.ui-widget-header .ui-state-active {
  90 + border: 1px solid #aaaaaa/*{borderColorActive}*/;
  91 + background: #ffffff/*{bgColorActive}*/ url("images/ui-bg_glass_65_ffffff_1x400.png")/*{bgImgUrlActive}*/ 50%/*{bgActiveXPos}*/ 50%/*{bgActiveYPos}*/ repeat-x/*{bgActiveRepeat}*/;
  92 + font-weight: normal/*{fwDefault}*/;
  93 + color: #212121/*{fcActive}*/;
  94 +}
  95 +.ui-state-active a,
  96 +.ui-state-active a:link,
  97 +.ui-state-active a:visited {
  98 + color: #212121/*{fcActive}*/;
  99 + text-decoration: none;
  100 +}
  101 +
  102 +/* Interaction Cues
  103 +----------------------------------*/
  104 +.ui-state-highlight,
  105 +.ui-widget-content .ui-state-highlight,
  106 +.ui-widget-header .ui-state-highlight {
  107 + border: 1px solid #fcefa1/*{borderColorHighlight}*/;
  108 + background: #fbf9ee/*{bgColorHighlight}*/ url("images/ui-bg_glass_55_fbf9ee_1x400.png")/*{bgImgUrlHighlight}*/ 50%/*{bgHighlightXPos}*/ 50%/*{bgHighlightYPos}*/ repeat-x/*{bgHighlightRepeat}*/;
  109 + color: #363636/*{fcHighlight}*/;
  110 +}
  111 +.ui-state-highlight a,
  112 +.ui-widget-content .ui-state-highlight a,
  113 +.ui-widget-header .ui-state-highlight a {
  114 + color: #363636/*{fcHighlight}*/;
  115 +}
  116 +.ui-state-error,
  117 +.ui-widget-content .ui-state-error,
  118 +.ui-widget-header .ui-state-error {
  119 + border: 1px solid #cd0a0a/*{borderColorError}*/;
  120 + background: #fef1ec/*{bgColorError}*/ url("images/ui-bg_glass_95_fef1ec_1x400.png")/*{bgImgUrlError}*/ 50%/*{bgErrorXPos}*/ 50%/*{bgErrorYPos}*/ repeat-x/*{bgErrorRepeat}*/;
  121 + color: #cd0a0a/*{fcError}*/;
  122 +}
  123 +.ui-state-error a,
  124 +.ui-widget-content .ui-state-error a,
  125 +.ui-widget-header .ui-state-error a {
  126 + color: #cd0a0a/*{fcError}*/;
  127 +}
  128 +.ui-state-error-text,
  129 +.ui-widget-content .ui-state-error-text,
  130 +.ui-widget-header .ui-state-error-text {
  131 + color: #cd0a0a/*{fcError}*/;
  132 +}
  133 +.ui-priority-primary,
  134 +.ui-widget-content .ui-priority-primary,
  135 +.ui-widget-header .ui-priority-primary {
  136 + font-weight: bold;
  137 +}
  138 +.ui-priority-secondary,
  139 +.ui-widget-content .ui-priority-secondary,
  140 +.ui-widget-header .ui-priority-secondary {
  141 + opacity: .7;
  142 + filter:Alpha(Opacity=70); /* support: IE8 */
  143 + font-weight: normal;
  144 +}
  145 +.ui-state-disabled,
  146 +.ui-widget-content .ui-state-disabled,
  147 +.ui-widget-header .ui-state-disabled {
  148 + opacity: .35;
  149 + filter:Alpha(Opacity=35); /* support: IE8 */
  150 + background-image: none;
  151 +}
  152 +.ui-state-disabled .ui-icon {
  153 + filter:Alpha(Opacity=35); /* support: IE8 - See #6059 */
  154 +}
  155 +
  156 +/* Icons
  157 +----------------------------------*/
  158 +
  159 +/* states and images */
  160 +.ui-icon {
  161 + width: 16px;
  162 + height: 16px;
  163 +}
  164 +.ui-icon,
  165 +.ui-widget-content .ui-icon {
  166 + background-image: url("images/ui-icons_222222_256x240.png")/*{iconsContent}*/;
  167 +}
  168 +.ui-widget-header .ui-icon {
  169 + background-image: url("images/ui-icons_222222_256x240.png")/*{iconsHeader}*/;
  170 +}
  171 +.ui-state-default .ui-icon {
  172 + background-image: url("images/ui-icons_888888_256x240.png")/*{iconsDefault}*/;
  173 +}
  174 +.ui-state-hover .ui-icon,
  175 +.ui-state-focus .ui-icon {
  176 + background-image: url("images/ui-icons_454545_256x240.png")/*{iconsHover}*/;
  177 +}
  178 +.ui-state-active .ui-icon {
  179 + background-image: url("images/ui-icons_454545_256x240.png")/*{iconsActive}*/;
  180 +}
  181 +.ui-state-highlight .ui-icon {
  182 + background-image: url("images/ui-icons_2e83ff_256x240.png")/*{iconsHighlight}*/;
  183 +}
  184 +.ui-state-error .ui-icon,
  185 +.ui-state-error-text .ui-icon {
  186 + background-image: url("images/ui-icons_cd0a0a_256x240.png")/*{iconsError}*/;
  187 +}
  188 +
  189 +/* positioning */
  190 +.ui-icon-blank { background-position: 16px 16px; }
  191 +.ui-icon-carat-1-n { background-position: 0 0; }
  192 +.ui-icon-carat-1-ne { background-position: -16px 0; }
  193 +.ui-icon-carat-1-e { background-position: -32px 0; }
  194 +.ui-icon-carat-1-se { background-position: -48px 0; }
  195 +.ui-icon-carat-1-s { background-position: -64px 0; }
  196 +.ui-icon-carat-1-sw { background-position: -80px 0; }
  197 +.ui-icon-carat-1-w { background-position: -96px 0; }
  198 +.ui-icon-carat-1-nw { background-position: -112px 0; }
  199 +.ui-icon-carat-2-n-s { background-position: -128px 0; }
  200 +.ui-icon-carat-2-e-w { background-position: -144px 0; }
  201 +.ui-icon-triangle-1-n { background-position: 0 -16px; }
  202 +.ui-icon-triangle-1-ne { background-position: -16px -16px; }
  203 +.ui-icon-triangle-1-e { background-position: -32px -16px; }
  204 +.ui-icon-triangle-1-se { background-position: -48px -16px; }
  205 +.ui-icon-triangle-1-s { background-position: -64px -16px; }
  206 +.ui-icon-triangle-1-sw { background-position: -80px -16px; }
  207 +.ui-icon-triangle-1-w { background-position: -96px -16px; }
  208 +.ui-icon-triangle-1-nw { background-position: -112px -16px; }
  209 +.ui-icon-triangle-2-n-s { background-position: -128px -16px; }
  210 +.ui-icon-triangle-2-e-w { background-position: -144px -16px; }
  211 +.ui-icon-arrow-1-n { background-position: 0 -32px; }
  212 +.ui-icon-arrow-1-ne { background-position: -16px -32px; }
  213 +.ui-icon-arrow-1-e { background-position: -32px -32px; }
  214 +.ui-icon-arrow-1-se { background-position: -48px -32px; }
  215 +.ui-icon-arrow-1-s { background-position: -64px -32px; }
  216 +.ui-icon-arrow-1-sw { background-position: -80px -32px; }
  217 +.ui-icon-arrow-1-w { background-position: -96px -32px; }
  218 +.ui-icon-arrow-1-nw { background-position: -112px -32px; }
  219 +.ui-icon-arrow-2-n-s { background-position: -128px -32px; }
  220 +.ui-icon-arrow-2-ne-sw { background-position: -144px -32px; }
  221 +.ui-icon-arrow-2-e-w { background-position: -160px -32px; }
  222 +.ui-icon-arrow-2-se-nw { background-position: -176px -32px; }
  223 +.ui-icon-arrowstop-1-n { background-position: -192px -32px; }
  224 +.ui-icon-arrowstop-1-e { background-position: -208px -32px; }
  225 +.ui-icon-arrowstop-1-s { background-position: -224px -32px; }
  226 +.ui-icon-arrowstop-1-w { background-position: -240px -32px; }
  227 +.ui-icon-arrowthick-1-n { background-position: 0 -48px; }
  228 +.ui-icon-arrowthick-1-ne { background-position: -16px -48px; }
  229 +.ui-icon-arrowthick-1-e { background-position: -32px -48px; }
  230 +.ui-icon-arrowthick-1-se { background-position: -48px -48px; }
  231 +.ui-icon-arrowthick-1-s { background-position: -64px -48px; }
  232 +.ui-icon-arrowthick-1-sw { background-position: -80px -48px; }
  233 +.ui-icon-arrowthick-1-w { background-position: -96px -48px; }
  234 +.ui-icon-arrowthick-1-nw { background-position: -112px -48px; }
  235 +.ui-icon-arrowthick-2-n-s { background-position: -128px -48px; }
  236 +.ui-icon-arrowthick-2-ne-sw { background-position: -144px -48px; }
  237 +.ui-icon-arrowthick-2-e-w { background-position: -160px -48px; }
  238 +.ui-icon-arrowthick-2-se-nw { background-position: -176px -48px; }
  239 +.ui-icon-arrowthickstop-1-n { background-position: -192px -48px; }
  240 +.ui-icon-arrowthickstop-1-e { background-position: -208px -48px; }
  241 +.ui-icon-arrowthickstop-1-s { background-position: -224px -48px; }
  242 +.ui-icon-arrowthickstop-1-w { background-position: -240px -48px; }
  243 +.ui-icon-arrowreturnthick-1-w { background-position: 0 -64px; }
  244 +.ui-icon-arrowreturnthick-1-n { background-position: -16px -64px; }
  245 +.ui-icon-arrowreturnthick-1-e { background-position: -32px -64px; }
  246 +.ui-icon-arrowreturnthick-1-s { background-position: -48px -64px; }
  247 +.ui-icon-arrowreturn-1-w { background-position: -64px -64px; }
  248 +.ui-icon-arrowreturn-1-n { background-position: -80px -64px; }
  249 +.ui-icon-arrowreturn-1-e { background-position: -96px -64px; }
  250 +.ui-icon-arrowreturn-1-s { background-position: -112px -64px; }
  251 +.ui-icon-arrowrefresh-1-w { background-position: -128px -64px; }
  252 +.ui-icon-arrowrefresh-1-n { background-position: -144px -64px; }
  253 +.ui-icon-arrowrefresh-1-e { background-position: -160px -64px; }
  254 +.ui-icon-arrowrefresh-1-s { background-position: -176px -64px; }
  255 +.ui-icon-arrow-4 { background-position: 0 -80px; }
  256 +.ui-icon-arrow-4-diag { background-position: -16px -80px; }
  257 +.ui-icon-extlink { background-position: -32px -80px; }
  258 +.ui-icon-newwin { background-position: -48px -80px; }
  259 +.ui-icon-refresh { background-position: -64px -80px; }
  260 +.ui-icon-shuffle { background-position: -80px -80px; }
  261 +.ui-icon-transfer-e-w { background-position: -96px -80px; }
  262 +.ui-icon-transferthick-e-w { background-position: -112px -80px; }
  263 +.ui-icon-folder-collapsed { background-position: 0 -96px; }
  264 +.ui-icon-folder-open { background-position: -16px -96px; }
  265 +.ui-icon-document { background-position: -32px -96px; }
  266 +.ui-icon-document-b { background-position: -48px -96px; }
  267 +.ui-icon-note { background-position: -64px -96px; }
  268 +.ui-icon-mail-closed { background-position: -80px -96px; }
  269 +.ui-icon-mail-open { background-position: -96px -96px; }
  270 +.ui-icon-suitcase { background-position: -112px -96px; }
  271 +.ui-icon-comment { background-position: -128px -96px; }
  272 +.ui-icon-person { background-position: -144px -96px; }
  273 +.ui-icon-print { background-position: -160px -96px; }
  274 +.ui-icon-trash { background-position: -176px -96px; }
  275 +.ui-icon-locked { background-position: -192px -96px; }
  276 +.ui-icon-unlocked { background-position: -208px -96px; }
  277 +.ui-icon-bookmark { background-position: -224px -96px; }
  278 +.ui-icon-tag { background-position: -240px -96px; }
  279 +.ui-icon-home { background-position: 0 -112px; }
  280 +.ui-icon-flag { background-position: -16px -112px; }
  281 +.ui-icon-calendar { background-position: -32px -112px; }
  282 +.ui-icon-cart { background-position: -48px -112px; }
  283 +.ui-icon-pencil { background-position: -64px -112px; }
  284 +.ui-icon-clock { background-position: -80px -112px; }
  285 +.ui-icon-disk { background-position: -96px -112px; }
  286 +.ui-icon-calculator { background-position: -112px -112px; }
  287 +.ui-icon-zoomin { background-position: -128px -112px; }
  288 +.ui-icon-zoomout { background-position: -144px -112px; }
  289 +.ui-icon-search { background-position: -160px -112px; }
  290 +.ui-icon-wrench { background-position: -176px -112px; }
  291 +.ui-icon-gear { background-position: -192px -112px; }
  292 +.ui-icon-heart { background-position: -208px -112px; }
  293 +.ui-icon-star { background-position: -224px -112px; }
  294 +.ui-icon-link { background-position: -240px -112px; }
  295 +.ui-icon-cancel { background-position: 0 -128px; }
  296 +.ui-icon-plus { background-position: -16px -128px; }
  297 +.ui-icon-plusthick { background-position: -32px -128px; }
  298 +.ui-icon-minus { background-position: -48px -128px; }
  299 +.ui-icon-minusthick { background-position: -64px -128px; }
  300 +.ui-icon-close { background-position: -80px -128px; }
  301 +.ui-icon-closethick { background-position: -96px -128px; }
  302 +.ui-icon-key { background-position: -112px -128px; }
  303 +.ui-icon-lightbulb { background-position: -128px -128px; }
  304 +.ui-icon-scissors { background-position: -144px -128px; }
  305 +.ui-icon-clipboard { background-position: -160px -128px; }
  306 +.ui-icon-copy { background-position: -176px -128px; }
  307 +.ui-icon-contact { background-position: -192px -128px; }
  308 +.ui-icon-image { background-position: -208px -128px; }
  309 +.ui-icon-video { background-position: -224px -128px; }
  310 +.ui-icon-script { background-position: -240px -128px; }
  311 +.ui-icon-alert { background-position: 0 -144px; }
  312 +.ui-icon-info { background-position: -16px -144px; }
  313 +.ui-icon-notice { background-position: -32px -144px; }
  314 +.ui-icon-help { background-position: -48px -144px; }
  315 +.ui-icon-check { background-position: -64px -144px; }
  316 +.ui-icon-bullet { background-position: -80px -144px; }
  317 +.ui-icon-radio-on { background-position: -96px -144px; }
  318 +.ui-icon-radio-off { background-position: -112px -144px; }
  319 +.ui-icon-pin-w { background-position: -128px -144px; }
  320 +.ui-icon-pin-s { background-position: -144px -144px; }
  321 +.ui-icon-play { background-position: 0 -160px; }
  322 +.ui-icon-pause { background-position: -16px -160px; }
  323 +.ui-icon-seek-next { background-position: -32px -160px; }
  324 +.ui-icon-seek-prev { background-position: -48px -160px; }
  325 +.ui-icon-seek-end { background-position: -64px -160px; }
  326 +.ui-icon-seek-start { background-position: -80px -160px; }
  327 +/* ui-icon-seek-first is deprecated, use ui-icon-seek-start instead */
  328 +.ui-icon-seek-first { background-position: -80px -160px; }
  329 +.ui-icon-stop { background-position: -96px -160px; }
  330 +.ui-icon-eject { background-position: -112px -160px; }
  331 +.ui-icon-volume-off { background-position: -128px -160px; }
  332 +.ui-icon-volume-on { background-position: -144px -160px; }
  333 +.ui-icon-power { background-position: 0 -176px; }
  334 +.ui-icon-signal-diag { background-position: -16px -176px; }
  335 +.ui-icon-signal { background-position: -32px -176px; }
  336 +.ui-icon-battery-0 { background-position: -48px -176px; }
  337 +.ui-icon-battery-1 { background-position: -64px -176px; }
  338 +.ui-icon-battery-2 { background-position: -80px -176px; }
  339 +.ui-icon-battery-3 { background-position: -96px -176px; }
  340 +.ui-icon-circle-plus { background-position: 0 -192px; }
  341 +.ui-icon-circle-minus { background-position: -16px -192px; }
  342 +.ui-icon-circle-close { background-position: -32px -192px; }
  343 +.ui-icon-circle-triangle-e { background-position: -48px -192px; }
  344 +.ui-icon-circle-triangle-s { background-position: -64px -192px; }
  345 +.ui-icon-circle-triangle-w { background-position: -80px -192px; }
  346 +.ui-icon-circle-triangle-n { background-position: -96px -192px; }
  347 +.ui-icon-circle-arrow-e { background-position: -112px -192px; }
  348 +.ui-icon-circle-arrow-s { background-position: -128px -192px; }
  349 +.ui-icon-circle-arrow-w { background-position: -144px -192px; }
  350 +.ui-icon-circle-arrow-n { background-position: -160px -192px; }
  351 +.ui-icon-circle-zoomin { background-position: -176px -192px; }
  352 +.ui-icon-circle-zoomout { background-position: -192px -192px; }
  353 +.ui-icon-circle-check { background-position: -208px -192px; }
  354 +.ui-icon-circlesmall-plus { background-position: 0 -208px; }
  355 +.ui-icon-circlesmall-minus { background-position: -16px -208px; }
  356 +.ui-icon-circlesmall-close { background-position: -32px -208px; }
  357 +.ui-icon-squaresmall-plus { background-position: -48px -208px; }
  358 +.ui-icon-squaresmall-minus { background-position: -64px -208px; }
  359 +.ui-icon-squaresmall-close { background-position: -80px -208px; }
  360 +.ui-icon-grip-dotted-vertical { background-position: 0 -224px; }
  361 +.ui-icon-grip-dotted-horizontal { background-position: -16px -224px; }
  362 +.ui-icon-grip-solid-vertical { background-position: -32px -224px; }
  363 +.ui-icon-grip-solid-horizontal { background-position: -48px -224px; }
  364 +.ui-icon-gripsmall-diagonal-se { background-position: -64px -224px; }
  365 +.ui-icon-grip-diagonal-se { background-position: -80px -224px; }
  366 +
  367 +
  368 +/* Misc visuals
  369 +----------------------------------*/
  370 +
  371 +/* Corner radius */
  372 +.ui-corner-all,
  373 +.ui-corner-top,
  374 +.ui-corner-left,
  375 +.ui-corner-tl {
  376 + border-top-left-radius: 4px/*{cornerRadius}*/;
  377 +}
  378 +.ui-corner-all,
  379 +.ui-corner-top,
  380 +.ui-corner-right,
  381 +.ui-corner-tr {
  382 + border-top-right-radius: 4px/*{cornerRadius}*/;
  383 +}
  384 +.ui-corner-all,
  385 +.ui-corner-bottom,
  386 +.ui-corner-left,
  387 +.ui-corner-bl {
  388 + border-bottom-left-radius: 4px/*{cornerRadius}*/;
  389 +}
  390 +.ui-corner-all,
  391 +.ui-corner-bottom,
  392 +.ui-corner-right,
  393 +.ui-corner-br {
  394 + border-bottom-right-radius: 4px/*{cornerRadius}*/;
  395 +}
  396 +
  397 +/* Overlays */
  398 +.ui-widget-overlay {
  399 + background: #aaaaaa/*{bgColorOverlay}*/ url("images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlOverlay}*/ 50%/*{bgOverlayXPos}*/ 50%/*{bgOverlayYPos}*/ repeat-x/*{bgOverlayRepeat}*/;
  400 + opacity: .3/*{opacityOverlay}*/;
  401 + filter: Alpha(Opacity=30)/*{opacityFilterOverlay}*/; /* support: IE8 */
  402 +}
  403 +.ui-widget-shadow {
  404 + margin: -8px/*{offsetTopShadow}*/ 0 0 -8px/*{offsetLeftShadow}*/;
  405 + padding: 8px/*{thicknessShadow}*/;
  406 + background: #aaaaaa/*{bgColorShadow}*/ url("images/ui-bg_flat_0_aaaaaa_40x100.png")/*{bgImgUrlShadow}*/ 50%/*{bgShadowXPos}*/ 50%/*{bgShadowYPos}*/ repeat-x/*{bgShadowRepeat}*/;
  407 + opacity: .3/*{opacityShadow}*/;
  408 + filter: Alpha(Opacity=30)/*{opacityFilterShadow}*/; /* support: IE8 */
  409 + border-radius: 8px/*{cornerRadiusShadow}*/;
  410 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/themes/base/tooltip.css 0 → 100644
  1 +/*!
  2 + * jQuery UI Tooltip 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/tooltip/#theming
  10 + */
  11 +.ui-tooltip {
  12 + padding: 8px;
  13 + position: absolute;
  14 + z-index: 9999;
  15 + max-width: 300px;
  16 + -webkit-box-shadow: 0 0 5px #aaa;
  17 + box-shadow: 0 0 5px #aaa;
  18 +}
  19 +body .ui-tooltip {
  20 + border-width: 2px;
  21 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/jquery.ui/widget.js 0 → 100644
  1 +/*!
  2 + * jQuery UI Widget 1.11.1
  3 + * http://jqueryui.com
  4 + *
  5 + * Copyright 2014 jQuery Foundation and other contributors
  6 + * Released under the MIT license.
  7 + * http://jquery.org/license
  8 + *
  9 + * http://api.jqueryui.com/jQuery.widget/
  10 + */
  11 +(function( factory ) {
  12 + if ( typeof define === "function" && define.amd ) {
  13 +
  14 + // AMD. Register as an anonymous module.
  15 + define( [ "jquery" ], factory );
  16 + } else {
  17 +
  18 + // Browser globals
  19 + factory( jQuery );
  20 + }
  21 +}(function( $ ) {
  22 +
  23 +var widget_uuid = 0,
  24 + widget_slice = Array.prototype.slice;
  25 +
  26 +$.cleanData = (function( orig ) {
  27 + return function( elems ) {
  28 + var events, elem, i;
  29 + for ( i = 0; (elem = elems[i]) != null; i++ ) {
  30 + try {
  31 +
  32 + // Only trigger remove when necessary to save time
  33 + events = $._data( elem, "events" );
  34 + if ( events && events.remove ) {
  35 + $( elem ).triggerHandler( "remove" );
  36 + }
  37 +
  38 + // http://bugs.jquery.com/ticket/8235
  39 + } catch( e ) {}
  40 + }
  41 + orig( elems );
  42 + };
  43 +})( $.cleanData );
  44 +
  45 +$.widget = function( name, base, prototype ) {
  46 + var fullName, existingConstructor, constructor, basePrototype,
  47 + // proxiedPrototype allows the provided prototype to remain unmodified
  48 + // so that it can be used as a mixin for multiple widgets (#8876)
  49 + proxiedPrototype = {},
  50 + namespace = name.split( "." )[ 0 ];
  51 +
  52 + name = name.split( "." )[ 1 ];
  53 + fullName = namespace + "-" + name;
  54 +
  55 + if ( !prototype ) {
  56 + prototype = base;
  57 + base = $.Widget;
  58 + }
  59 +
  60 + // create selector for plugin
  61 + $.expr[ ":" ][ fullName.toLowerCase() ] = function( elem ) {
  62 + return !!$.data( elem, fullName );
  63 + };
  64 +
  65 + $[ namespace ] = $[ namespace ] || {};
  66 + existingConstructor = $[ namespace ][ name ];
  67 + constructor = $[ namespace ][ name ] = function( options, element ) {
  68 + // allow instantiation without "new" keyword
  69 + if ( !this._createWidget ) {
  70 + return new constructor( options, element );
  71 + }
  72 +
  73 + // allow instantiation without initializing for simple inheritance
  74 + // must use "new" keyword (the code above always passes args)
  75 + if ( arguments.length ) {
  76 + this._createWidget( options, element );
  77 + }
  78 + };
  79 + // extend with the existing constructor to carry over any static properties
  80 + $.extend( constructor, existingConstructor, {
  81 + version: prototype.version,
  82 + // copy the object used to create the prototype in case we need to
  83 + // redefine the widget later
  84 + _proto: $.extend( {}, prototype ),
  85 + // track widgets that inherit from this widget in case this widget is
  86 + // redefined after a widget inherits from it
  87 + _childConstructors: []
  88 + });
  89 +
  90 + basePrototype = new base();
  91 + // we need to make the options hash a property directly on the new instance
  92 + // otherwise we'll modify the options hash on the prototype that we're
  93 + // inheriting from
  94 + basePrototype.options = $.widget.extend( {}, basePrototype.options );
  95 + $.each( prototype, function( prop, value ) {
  96 + if ( !$.isFunction( value ) ) {
  97 + proxiedPrototype[ prop ] = value;
  98 + return;
  99 + }
  100 + proxiedPrototype[ prop ] = (function() {
  101 + var _super = function() {
  102 + return base.prototype[ prop ].apply( this, arguments );
  103 + },
  104 + _superApply = function( args ) {
  105 + return base.prototype[ prop ].apply( this, args );
  106 + };
  107 + return function() {
  108 + var __super = this._super,
  109 + __superApply = this._superApply,
  110 + returnValue;
  111 +
  112 + this._super = _super;
  113 + this._superApply = _superApply;
  114 +
  115 + returnValue = value.apply( this, arguments );
  116 +
  117 + this._super = __super;
  118 + this._superApply = __superApply;
  119 +
  120 + return returnValue;
  121 + };
  122 + })();
  123 + });
  124 + constructor.prototype = $.widget.extend( basePrototype, {
  125 + // TODO: remove support for widgetEventPrefix
  126 + // always use the name + a colon as the prefix, e.g., draggable:start
  127 + // don't prefix for widgets that aren't DOM-based
  128 + widgetEventPrefix: existingConstructor ? (basePrototype.widgetEventPrefix || name) : name
  129 + }, proxiedPrototype, {
  130 + constructor: constructor,
  131 + namespace: namespace,
  132 + widgetName: name,
  133 + widgetFullName: fullName
  134 + });
  135 +
  136 + // If this widget is being redefined then we need to find all widgets that
  137 + // are inheriting from it and redefine all of them so that they inherit from
  138 + // the new version of this widget. We're essentially trying to replace one
  139 + // level in the prototype chain.
  140 + if ( existingConstructor ) {
  141 + $.each( existingConstructor._childConstructors, function( i, child ) {
  142 + var childPrototype = child.prototype;
  143 +
  144 + // redefine the child widget using the same prototype that was
  145 + // originally used, but inherit from the new version of the base
  146 + $.widget( childPrototype.namespace + "." + childPrototype.widgetName, constructor, child._proto );
  147 + });
  148 + // remove the list of existing child constructors from the old constructor
  149 + // so the old child constructors can be garbage collected
  150 + delete existingConstructor._childConstructors;
  151 + } else {
  152 + base._childConstructors.push( constructor );
  153 + }
  154 +
  155 + $.widget.bridge( name, constructor );
  156 +
  157 + return constructor;
  158 +};
  159 +
  160 +$.widget.extend = function( target ) {
  161 + var input = widget_slice.call( arguments, 1 ),
  162 + inputIndex = 0,
  163 + inputLength = input.length,
  164 + key,
  165 + value;
  166 + for ( ; inputIndex < inputLength; inputIndex++ ) {
  167 + for ( key in input[ inputIndex ] ) {
  168 + value = input[ inputIndex ][ key ];
  169 + if ( input[ inputIndex ].hasOwnProperty( key ) && value !== undefined ) {
  170 + // Clone objects
  171 + if ( $.isPlainObject( value ) ) {
  172 + target[ key ] = $.isPlainObject( target[ key ] ) ?
  173 + $.widget.extend( {}, target[ key ], value ) :
  174 + // Don't extend strings, arrays, etc. with objects
  175 + $.widget.extend( {}, value );
  176 + // Copy everything else by reference
  177 + } else {
  178 + target[ key ] = value;
  179 + }
  180 + }
  181 + }
  182 + }
  183 + return target;
  184 +};
  185 +
  186 +$.widget.bridge = function( name, object ) {
  187 + var fullName = object.prototype.widgetFullName || name;
  188 + $.fn[ name ] = function( options ) {
  189 + var isMethodCall = typeof options === "string",
  190 + args = widget_slice.call( arguments, 1 ),
  191 + returnValue = this;
  192 +
  193 + // allow multiple hashes to be passed on init
  194 + options = !isMethodCall && args.length ?
  195 + $.widget.extend.apply( null, [ options ].concat(args) ) :
  196 + options;
  197 +
  198 + if ( isMethodCall ) {
  199 + this.each(function() {
  200 + var methodValue,
  201 + instance = $.data( this, fullName );
  202 + if ( options === "instance" ) {
  203 + returnValue = instance;
  204 + return false;
  205 + }
  206 + if ( !instance ) {
  207 + return $.error( "cannot call methods on " + name + " prior to initialization; " +
  208 + "attempted to call method '" + options + "'" );
  209 + }
  210 + if ( !$.isFunction( instance[options] ) || options.charAt( 0 ) === "_" ) {
  211 + return $.error( "no such method '" + options + "' for " + name + " widget instance" );
  212 + }
  213 + methodValue = instance[ options ].apply( instance, args );
  214 + if ( methodValue !== instance && methodValue !== undefined ) {
  215 + returnValue = methodValue && methodValue.jquery ?
  216 + returnValue.pushStack( methodValue.get() ) :
  217 + methodValue;
  218 + return false;
  219 + }
  220 + });
  221 + } else {
  222 + this.each(function() {
  223 + var instance = $.data( this, fullName );
  224 + if ( instance ) {
  225 + instance.option( options || {} );
  226 + if ( instance._init ) {
  227 + instance._init();
  228 + }
  229 + } else {
  230 + $.data( this, fullName, new object( options, this ) );
  231 + }
  232 + });
  233 + }
  234 +
  235 + return returnValue;
  236 + };
  237 +};
  238 +
  239 +$.Widget = function( /* options, element */ ) {};
  240 +$.Widget._childConstructors = [];
  241 +
  242 +$.Widget.prototype = {
  243 + widgetName: "widget",
  244 + widgetEventPrefix: "",
  245 + defaultElement: "<div>",
  246 + options: {
  247 + disabled: false,
  248 +
  249 + // callbacks
  250 + create: null
  251 + },
  252 + _createWidget: function( options, element ) {
  253 + element = $( element || this.defaultElement || this )[ 0 ];
  254 + this.element = $( element );
  255 + this.uuid = widget_uuid++;
  256 + this.eventNamespace = "." + this.widgetName + this.uuid;
  257 + this.options = $.widget.extend( {},
  258 + this.options,
  259 + this._getCreateOptions(),
  260 + options );
  261 +
  262 + this.bindings = $();
  263 + this.hoverable = $();
  264 + this.focusable = $();
  265 +
  266 + if ( element !== this ) {
  267 + $.data( element, this.widgetFullName, this );
  268 + this._on( true, this.element, {
  269 + remove: function( event ) {
  270 + if ( event.target === element ) {
  271 + this.destroy();
  272 + }
  273 + }
  274 + });
  275 + this.document = $( element.style ?
  276 + // element within the document
  277 + element.ownerDocument :
  278 + // element is window or document
  279 + element.document || element );
  280 + this.window = $( this.document[0].defaultView || this.document[0].parentWindow );
  281 + }
  282 +
  283 + this._create();
  284 + this._trigger( "create", null, this._getCreateEventData() );
  285 + this._init();
  286 + },
  287 + _getCreateOptions: $.noop,
  288 + _getCreateEventData: $.noop,
  289 + _create: $.noop,
  290 + _init: $.noop,
  291 +
  292 + destroy: function() {
  293 + this._destroy();
  294 + // we can probably remove the unbind calls in 2.0
  295 + // all event bindings should go through this._on()
  296 + this.element
  297 + .unbind( this.eventNamespace )
  298 + .removeData( this.widgetFullName )
  299 + // support: jquery <1.6.3
  300 + // http://bugs.jquery.com/ticket/9413
  301 + .removeData( $.camelCase( this.widgetFullName ) );
  302 + this.widget()
  303 + .unbind( this.eventNamespace )
  304 + .removeAttr( "aria-disabled" )
  305 + .removeClass(
  306 + this.widgetFullName + "-disabled " +
  307 + "ui-state-disabled" );
  308 +
  309 + // clean up events and states
  310 + this.bindings.unbind( this.eventNamespace );
  311 + this.hoverable.removeClass( "ui-state-hover" );
  312 + this.focusable.removeClass( "ui-state-focus" );
  313 + },
  314 + _destroy: $.noop,
  315 +
  316 + widget: function() {
  317 + return this.element;
  318 + },
  319 +
  320 + option: function( key, value ) {
  321 + var options = key,
  322 + parts,
  323 + curOption,
  324 + i;
  325 +
  326 + if ( arguments.length === 0 ) {
  327 + // don't return a reference to the internal hash
  328 + return $.widget.extend( {}, this.options );
  329 + }
  330 +
  331 + if ( typeof key === "string" ) {
  332 + // handle nested keys, e.g., "foo.bar" => { foo: { bar: ___ } }
  333 + options = {};
  334 + parts = key.split( "." );
  335 + key = parts.shift();
  336 + if ( parts.length ) {
  337 + curOption = options[ key ] = $.widget.extend( {}, this.options[ key ] );
  338 + for ( i = 0; i < parts.length - 1; i++ ) {
  339 + curOption[ parts[ i ] ] = curOption[ parts[ i ] ] || {};
  340 + curOption = curOption[ parts[ i ] ];
  341 + }
  342 + key = parts.pop();
  343 + if ( arguments.length === 1 ) {
  344 + return curOption[ key ] === undefined ? null : curOption[ key ];
  345 + }
  346 + curOption[ key ] = value;
  347 + } else {
  348 + if ( arguments.length === 1 ) {
  349 + return this.options[ key ] === undefined ? null : this.options[ key ];
  350 + }
  351 + options[ key ] = value;
  352 + }
  353 + }
  354 +
  355 + this._setOptions( options );
  356 +
  357 + return this;
  358 + },
  359 + _setOptions: function( options ) {
  360 + var key;
  361 +
  362 + for ( key in options ) {
  363 + this._setOption( key, options[ key ] );
  364 + }
  365 +
  366 + return this;
  367 + },
  368 + _setOption: function( key, value ) {
  369 + this.options[ key ] = value;
  370 +
  371 + if ( key === "disabled" ) {
  372 + this.widget()
  373 + .toggleClass( this.widgetFullName + "-disabled", !!value );
  374 +
  375 + // If the widget is becoming disabled, then nothing is interactive
  376 + if ( value ) {
  377 + this.hoverable.removeClass( "ui-state-hover" );
  378 + this.focusable.removeClass( "ui-state-focus" );
  379 + }
  380 + }
  381 +
  382 + return this;
  383 + },
  384 +
  385 + enable: function() {
  386 + return this._setOptions({ disabled: false });
  387 + },
  388 + disable: function() {
  389 + return this._setOptions({ disabled: true });
  390 + },
  391 +
  392 + _on: function( suppressDisabledCheck, element, handlers ) {
  393 + var delegateElement,
  394 + instance = this;
  395 +
  396 + // no suppressDisabledCheck flag, shuffle arguments
  397 + if ( typeof suppressDisabledCheck !== "boolean" ) {
  398 + handlers = element;
  399 + element = suppressDisabledCheck;
  400 + suppressDisabledCheck = false;
  401 + }
  402 +
  403 + // no element argument, shuffle and use this.element
  404 + if ( !handlers ) {
  405 + handlers = element;
  406 + element = this.element;
  407 + delegateElement = this.widget();
  408 + } else {
  409 + element = delegateElement = $( element );
  410 + this.bindings = this.bindings.add( element );
  411 + }
  412 +
  413 + $.each( handlers, function( event, handler ) {
  414 + function handlerProxy() {
  415 + // allow widgets to customize the disabled handling
  416 + // - disabled as an array instead of boolean
  417 + // - disabled class as method for disabling individual parts
  418 + if ( !suppressDisabledCheck &&
  419 + ( instance.options.disabled === true ||
  420 + $( this ).hasClass( "ui-state-disabled" ) ) ) {
  421 + return;
  422 + }
  423 + return ( typeof handler === "string" ? instance[ handler ] : handler )
  424 + .apply( instance, arguments );
  425 + }
  426 +
  427 + // copy the guid so direct unbinding works
  428 + if ( typeof handler !== "string" ) {
  429 + handlerProxy.guid = handler.guid =
  430 + handler.guid || handlerProxy.guid || $.guid++;
  431 + }
  432 +
  433 + var match = event.match( /^([\w:-]*)\s*(.*)$/ ),
  434 + eventName = match[1] + instance.eventNamespace,
  435 + selector = match[2];
  436 + if ( selector ) {
  437 + delegateElement.delegate( selector, eventName, handlerProxy );
  438 + } else {
  439 + element.bind( eventName, handlerProxy );
  440 + }
  441 + });
  442 + },
  443 +
  444 + _off: function( element, eventName ) {
  445 + eventName = (eventName || "").split( " " ).join( this.eventNamespace + " " ) + this.eventNamespace;
  446 + element.unbind( eventName ).undelegate( eventName );
  447 + },
  448 +
  449 + _delay: function( handler, delay ) {
  450 + function handlerProxy() {
  451 + return ( typeof handler === "string" ? instance[ handler ] : handler )
  452 + .apply( instance, arguments );
  453 + }
  454 + var instance = this;
  455 + return setTimeout( handlerProxy, delay || 0 );
  456 + },
  457 +
  458 + _hoverable: function( element ) {
  459 + this.hoverable = this.hoverable.add( element );
  460 + this._on( element, {
  461 + mouseenter: function( event ) {
  462 + $( event.currentTarget ).addClass( "ui-state-hover" );
  463 + },
  464 + mouseleave: function( event ) {
  465 + $( event.currentTarget ).removeClass( "ui-state-hover" );
  466 + }
  467 + });
  468 + },
  469 +
  470 + _focusable: function( element ) {
  471 + this.focusable = this.focusable.add( element );
  472 + this._on( element, {
  473 + focusin: function( event ) {
  474 + $( event.currentTarget ).addClass( "ui-state-focus" );
  475 + },
  476 + focusout: function( event ) {
  477 + $( event.currentTarget ).removeClass( "ui-state-focus" );
  478 + }
  479 + });
  480 + },
  481 +
  482 + _trigger: function( type, event, data ) {
  483 + var prop, orig,
  484 + callback = this.options[ type ];
  485 +
  486 + data = data || {};
  487 + event = $.Event( event );
  488 + event.type = ( type === this.widgetEventPrefix ?
  489 + type :
  490 + this.widgetEventPrefix + type ).toLowerCase();
  491 + // the original event may come from any element
  492 + // so we need to reset the target on the new event
  493 + event.target = this.element[ 0 ];
  494 +
  495 + // copy original event properties over to the new event
  496 + orig = event.originalEvent;
  497 + if ( orig ) {
  498 + for ( prop in orig ) {
  499 + if ( !( prop in event ) ) {
  500 + event[ prop ] = orig[ prop ];
  501 + }
  502 + }
  503 + }
  504 +
  505 + this.element.trigger( event, data );
  506 + return !( $.isFunction( callback ) &&
  507 + callback.apply( this.element[0], [ event ].concat( data ) ) === false ||
  508 + event.isDefaultPrevented() );
  509 + }
  510 +};
  511 +
  512 +$.each( { show: "fadeIn", hide: "fadeOut" }, function( method, defaultEffect ) {
  513 + $.Widget.prototype[ "_" + method ] = function( element, options, callback ) {
  514 + if ( typeof options === "string" ) {
  515 + options = { effect: options };
  516 + }
  517 + var hasOptions,
  518 + effectName = !options ?
  519 + method :
  520 + options === true || typeof options === "number" ?
  521 + defaultEffect :
  522 + options.effect || defaultEffect;
  523 + options = options || {};
  524 + if ( typeof options === "number" ) {
  525 + options = { duration: options };
  526 + }
  527 + hasOptions = !$.isEmptyObject( options );
  528 + options.complete = callback;
  529 + if ( options.delay ) {
  530 + element.delay( options.delay );
  531 + }
  532 + if ( hasOptions && $.effects && $.effects.effect[ effectName ] ) {
  533 + element[ method ]( options );
  534 + } else if ( effectName !== method && element[ effectName ] ) {
  535 + element[ effectName ]( options.duration, options.easing, callback );
  536 + } else {
  537 + element.queue(function( next ) {
  538 + $( this )[ method ]();
  539 + if ( callback ) {
  540 + callback.call( element[ 0 ] );
  541 + }
  542 + next();
  543 + });
  544 + }
  545 + };
  546 +});
  547 +
  548 +return $.widget;
  549 +
  550 +}));
... ...
src/main/resources/static/real_control_v2/assets/plugins/spectrum/spectrum.css 0 → 100644
  1 +/***
  2 +Spectrum Colorpicker v1.8.0
  3 +https://github.com/bgrins/spectrum
  4 +Author: Brian Grinstead
  5 +License: MIT
  6 +***/
  7 +
  8 +.sp-container {
  9 + position:absolute;
  10 + top:0;
  11 + left:0;
  12 + display:inline-block;
  13 + *display: inline;
  14 + *zoom: 1;
  15 + /* https://github.com/bgrins/spectrum/issues/40 */
  16 + z-index: 9999994;
  17 + overflow: hidden;
  18 +}
  19 +.sp-container.sp-flat {
  20 + position: relative;
  21 +}
  22 +
  23 +/* Fix for * { box-sizing: border-box; } */
  24 +.sp-container,
  25 +.sp-container * {
  26 + -webkit-box-sizing: content-box;
  27 + -moz-box-sizing: content-box;
  28 + box-sizing: content-box;
  29 +}
  30 +
  31 +/* http://ansciath.tumblr.com/post/7347495869/css-aspect-ratio */
  32 +.sp-top {
  33 + position:relative;
  34 + width: 100%;
  35 + display:inline-block;
  36 +}
  37 +.sp-top-inner {
  38 + position:absolute;
  39 + top:0;
  40 + left:0;
  41 + bottom:0;
  42 + right:0;
  43 +}
  44 +.sp-color {
  45 + position: absolute;
  46 + top:0;
  47 + left:0;
  48 + bottom:0;
  49 + right:20%;
  50 +}
  51 +.sp-hue {
  52 + position: absolute;
  53 + top:0;
  54 + right:0;
  55 + bottom:0;
  56 + left:84%;
  57 + height: 100%;
  58 +}
  59 +
  60 +.sp-clear-enabled .sp-hue {
  61 + top:33px;
  62 + height: 77.5%;
  63 +}
  64 +
  65 +.sp-fill {
  66 + padding-top: 80%;
  67 +}
  68 +.sp-sat, .sp-val {
  69 + position: absolute;
  70 + top:0;
  71 + left:0;
  72 + right:0;
  73 + bottom:0;
  74 +}
  75 +
  76 +.sp-alpha-enabled .sp-top {
  77 + margin-bottom: 18px;
  78 +}
  79 +.sp-alpha-enabled .sp-alpha {
  80 + display: block;
  81 +}
  82 +.sp-alpha-handle {
  83 + position:absolute;
  84 + top:-4px;
  85 + bottom: -4px;
  86 + width: 6px;
  87 + left: 50%;
  88 + cursor: pointer;
  89 + border: 1px solid black;
  90 + background: white;
  91 + opacity: .8;
  92 +}
  93 +.sp-alpha {
  94 + display: none;
  95 + position: absolute;
  96 + bottom: -14px;
  97 + right: 0;
  98 + left: 0;
  99 + height: 8px;
  100 +}
  101 +.sp-alpha-inner {
  102 + border: solid 1px #333;
  103 +}
  104 +
  105 +.sp-clear {
  106 + display: none;
  107 +}
  108 +
  109 +.sp-clear.sp-clear-display {
  110 + background-position: center;
  111 +}
  112 +
  113 +.sp-clear-enabled .sp-clear {
  114 + display: block;
  115 + position:absolute;
  116 + top:0px;
  117 + right:0;
  118 + bottom:0;
  119 + left:84%;
  120 + height: 28px;
  121 +}
  122 +
  123 +/* Don't allow text selection */
  124 +.sp-container, .sp-replacer, .sp-preview, .sp-dragger, .sp-slider, .sp-alpha, .sp-clear, .sp-alpha-handle, .sp-container.sp-dragging .sp-input, .sp-container button {
  125 + -webkit-user-select:none;
  126 + -moz-user-select: -moz-none;
  127 + -o-user-select:none;
  128 + user-select: none;
  129 +}
  130 +
  131 +.sp-container.sp-input-disabled .sp-input-container {
  132 + display: none;
  133 +}
  134 +.sp-container.sp-buttons-disabled .sp-button-container {
  135 + display: none;
  136 +}
  137 +.sp-container.sp-palette-buttons-disabled .sp-palette-button-container {
  138 + display: none;
  139 +}
  140 +.sp-palette-only .sp-picker-container {
  141 + display: none;
  142 +}
  143 +.sp-palette-disabled .sp-palette-container {
  144 + display: none;
  145 +}
  146 +
  147 +.sp-initial-disabled .sp-initial {
  148 + display: none;
  149 +}
  150 +
  151 +
  152 +/* Gradients for hue, saturation and value instead of images. Not pretty... but it works */
  153 +.sp-sat {
  154 + background-image: -webkit-gradient(linear, 0 0, 100% 0, from(#FFF), to(rgba(204, 154, 129, 0)));
  155 + background-image: -webkit-linear-gradient(left, #FFF, rgba(204, 154, 129, 0));
  156 + background-image: -moz-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
  157 + background-image: -o-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
  158 + background-image: -ms-linear-gradient(left, #fff, rgba(204, 154, 129, 0));
  159 + background-image: linear-gradient(to right, #fff, rgba(204, 154, 129, 0));
  160 + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr=#FFFFFFFF, endColorstr=#00CC9A81)";
  161 + filter : progid:DXImageTransform.Microsoft.gradient(GradientType = 1, startColorstr='#FFFFFFFF', endColorstr='#00CC9A81');
  162 +}
  163 +.sp-val {
  164 + background-image: -webkit-gradient(linear, 0 100%, 0 0, from(#000000), to(rgba(204, 154, 129, 0)));
  165 + background-image: -webkit-linear-gradient(bottom, #000000, rgba(204, 154, 129, 0));
  166 + background-image: -moz-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
  167 + background-image: -o-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
  168 + background-image: -ms-linear-gradient(bottom, #000, rgba(204, 154, 129, 0));
  169 + background-image: linear-gradient(to top, #000, rgba(204, 154, 129, 0));
  170 + -ms-filter: "progid:DXImageTransform.Microsoft.gradient(startColorstr=#00CC9A81, endColorstr=#FF000000)";
  171 + filter : progid:DXImageTransform.Microsoft.gradient(startColorstr='#00CC9A81', endColorstr='#FF000000');
  172 +}
  173 +
  174 +.sp-hue {
  175 + background: -moz-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  176 + background: -ms-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  177 + background: -o-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  178 + background: -webkit-gradient(linear, left top, left bottom, from(#ff0000), color-stop(0.17, #ffff00), color-stop(0.33, #00ff00), color-stop(0.5, #00ffff), color-stop(0.67, #0000ff), color-stop(0.83, #ff00ff), to(#ff0000));
  179 + background: -webkit-linear-gradient(top, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  180 + background: linear-gradient(to bottom, #ff0000 0%, #ffff00 17%, #00ff00 33%, #00ffff 50%, #0000ff 67%, #ff00ff 83%, #ff0000 100%);
  181 +}
  182 +
  183 +/* IE filters do not support multiple color stops.
  184 + Generate 6 divs, line them up, and do two color gradients for each.
  185 + Yes, really.
  186 + */
  187 +.sp-1 {
  188 + height:17%;
  189 + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff0000', endColorstr='#ffff00');
  190 +}
  191 +.sp-2 {
  192 + height:16%;
  193 + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffff00', endColorstr='#00ff00');
  194 +}
  195 +.sp-3 {
  196 + height:17%;
  197 + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ff00', endColorstr='#00ffff');
  198 +}
  199 +.sp-4 {
  200 + height:17%;
  201 + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#00ffff', endColorstr='#0000ff');
  202 +}
  203 +.sp-5 {
  204 + height:16%;
  205 + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#0000ff', endColorstr='#ff00ff');
  206 +}
  207 +.sp-6 {
  208 + height:17%;
  209 + filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ff00ff', endColorstr='#ff0000');
  210 +}
  211 +
  212 +.sp-hidden {
  213 + display: none !important;
  214 +}
  215 +
  216 +/* Clearfix hack */
  217 +.sp-cf:before, .sp-cf:after { content: ""; display: table; }
  218 +.sp-cf:after { clear: both; }
  219 +.sp-cf { *zoom: 1; }
  220 +
  221 +/* Mobile devices, make hue slider bigger so it is easier to slide */
  222 +@media (max-device-width: 480px) {
  223 + .sp-color { right: 40%; }
  224 + .sp-hue { left: 63%; }
  225 + .sp-fill { padding-top: 60%; }
  226 +}
  227 +.sp-dragger {
  228 + border-radius: 5px;
  229 + height: 5px;
  230 + width: 5px;
  231 + border: 1px solid #fff;
  232 + background: #000;
  233 + cursor: pointer;
  234 + position:absolute;
  235 + top:0;
  236 + left: 0;
  237 +}
  238 +.sp-slider {
  239 + position: absolute;
  240 + top:0;
  241 + cursor:pointer;
  242 + height: 3px;
  243 + left: -1px;
  244 + right: -1px;
  245 + border: 1px solid #000;
  246 + background: white;
  247 + opacity: .8;
  248 +}
  249 +
  250 +/*
  251 +Theme authors:
  252 +Here are the basic themeable display options (colors, fonts, global widths).
  253 +See http://bgrins.github.io/spectrum/themes/ for instructions.
  254 +*/
  255 +
  256 +.sp-container {
  257 + border-radius: 0;
  258 + background-color: #ECECEC;
  259 + border: solid 1px #f0c49B;
  260 + padding: 0;
  261 +}
  262 +.sp-container, .sp-container button, .sp-container input, .sp-color, .sp-hue, .sp-clear {
  263 + font: normal 12px "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Geneva, Verdana, sans-serif;
  264 + -webkit-box-sizing: border-box;
  265 + -moz-box-sizing: border-box;
  266 + -ms-box-sizing: border-box;
  267 + box-sizing: border-box;
  268 +}
  269 +.sp-top {
  270 + margin-bottom: 3px;
  271 +}
  272 +.sp-color, .sp-hue, .sp-clear {
  273 + border: solid 1px #666;
  274 +}
  275 +
  276 +/* Input */
  277 +.sp-input-container {
  278 + float:right;
  279 + width: 100px;
  280 + margin-bottom: 4px;
  281 +}
  282 +.sp-initial-disabled .sp-input-container {
  283 + width: 100%;
  284 +}
  285 +.sp-input {
  286 + font-size: 12px !important;
  287 + border: 1px inset;
  288 + padding: 4px 5px;
  289 + margin: 0;
  290 + width: 100%;
  291 + background:transparent;
  292 + border-radius: 3px;
  293 + color: #222;
  294 +}
  295 +.sp-input:focus {
  296 + border: 1px solid orange;
  297 +}
  298 +.sp-input.sp-validation-error {
  299 + border: 1px solid red;
  300 + background: #fdd;
  301 +}
  302 +.sp-picker-container , .sp-palette-container {
  303 + float:left;
  304 + position: relative;
  305 + padding: 10px;
  306 + padding-bottom: 300px;
  307 + margin-bottom: -290px;
  308 +}
  309 +.sp-picker-container {
  310 + width: 172px;
  311 + border-left: solid 1px #fff;
  312 +}
  313 +
  314 +/* Palettes */
  315 +.sp-palette-container {
  316 + border-right: solid 1px #ccc;
  317 +}
  318 +
  319 +.sp-palette-only .sp-palette-container {
  320 + border: 0;
  321 +}
  322 +
  323 +.sp-palette .sp-thumb-el {
  324 + display: block;
  325 + position:relative;
  326 + float:left;
  327 + width: 24px;
  328 + height: 15px;
  329 + margin: 3px;
  330 + cursor: pointer;
  331 + border:solid 2px transparent;
  332 +}
  333 +.sp-palette .sp-thumb-el:hover, .sp-palette .sp-thumb-el.sp-thumb-active {
  334 + border-color: orange;
  335 +}
  336 +.sp-thumb-el {
  337 + position:relative;
  338 +}
  339 +
  340 +/* Initial */
  341 +.sp-initial {
  342 + float: left;
  343 + border: solid 1px #333;
  344 +}
  345 +.sp-initial span {
  346 + width: 30px;
  347 + height: 25px;
  348 + border:none;
  349 + display:block;
  350 + float:left;
  351 + margin:0;
  352 +}
  353 +
  354 +.sp-initial .sp-clear-display {
  355 + background-position: center;
  356 +}
  357 +
  358 +/* Buttons */
  359 +.sp-palette-button-container,
  360 +.sp-button-container {
  361 + float: right;
  362 +}
  363 +
  364 +/* Replacer (the little preview div that shows up instead of the <input>) */
  365 +.sp-replacer {
  366 + margin:0;
  367 + overflow:hidden;
  368 + cursor:pointer;
  369 + padding: 4px;
  370 + display:inline-block;
  371 + *zoom: 1;
  372 + *display: inline;
  373 + border: solid 1px #91765d;
  374 + background: #eee;
  375 + color: #333;
  376 + vertical-align: middle;
  377 +}
  378 +.sp-replacer:hover, .sp-replacer.sp-active {
  379 + border-color: #F0C49B;
  380 + color: #111;
  381 +}
  382 +.sp-replacer.sp-disabled {
  383 + cursor:default;
  384 + border-color: silver;
  385 + color: silver;
  386 +}
  387 +.sp-dd {
  388 + padding: 2px 0;
  389 + height: 16px;
  390 + line-height: 16px;
  391 + float:left;
  392 + font-size:10px;
  393 +}
  394 +.sp-preview {
  395 + position:relative;
  396 + width:25px;
  397 + height: 20px;
  398 + border: solid 1px #222;
  399 + margin-right: 5px;
  400 + float:left;
  401 + z-index: 0;
  402 +}
  403 +
  404 +.sp-palette {
  405 + *width: 220px;
  406 + max-width: 220px;
  407 +}
  408 +.sp-palette .sp-thumb-el {
  409 + width:16px;
  410 + height: 16px;
  411 + margin:2px 1px;
  412 + border: solid 1px #d0d0d0;
  413 +}
  414 +
  415 +.sp-container {
  416 + padding-bottom:0;
  417 +}
  418 +
  419 +
  420 +/* Buttons: http://hellohappy.org/css3-buttons/ */
  421 +.sp-container button {
  422 + background-color: #eeeeee;
  423 + background-image: -webkit-linear-gradient(top, #eeeeee, #cccccc);
  424 + background-image: -moz-linear-gradient(top, #eeeeee, #cccccc);
  425 + background-image: -ms-linear-gradient(top, #eeeeee, #cccccc);
  426 + background-image: -o-linear-gradient(top, #eeeeee, #cccccc);
  427 + background-image: linear-gradient(to bottom, #eeeeee, #cccccc);
  428 + border: 1px solid #ccc;
  429 + border-bottom: 1px solid #bbb;
  430 + border-radius: 3px;
  431 + color: #333;
  432 + font-size: 14px;
  433 + line-height: 1;
  434 + padding: 5px 4px;
  435 + text-align: center;
  436 + text-shadow: 0 1px 0 #eee;
  437 + vertical-align: middle;
  438 +}
  439 +.sp-container button:hover {
  440 + background-color: #dddddd;
  441 + background-image: -webkit-linear-gradient(top, #dddddd, #bbbbbb);
  442 + background-image: -moz-linear-gradient(top, #dddddd, #bbbbbb);
  443 + background-image: -ms-linear-gradient(top, #dddddd, #bbbbbb);
  444 + background-image: -o-linear-gradient(top, #dddddd, #bbbbbb);
  445 + background-image: linear-gradient(to bottom, #dddddd, #bbbbbb);
  446 + border: 1px solid #bbb;
  447 + border-bottom: 1px solid #999;
  448 + cursor: pointer;
  449 + text-shadow: 0 1px 0 #ddd;
  450 +}
  451 +.sp-container button:active {
  452 + border: 1px solid #aaa;
  453 + border-bottom: 1px solid #888;
  454 + -webkit-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
  455 + -moz-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
  456 + -ms-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
  457 + -o-box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
  458 + box-shadow: inset 0 0 5px 2px #aaaaaa, 0 1px 0 0 #eeeeee;
  459 +}
  460 +.sp-cancel {
  461 + font-size: 11px;
  462 + color: #d93f3f !important;
  463 + margin:0;
  464 + padding:2px;
  465 + margin-right: 5px;
  466 + vertical-align: middle;
  467 + text-decoration:none;
  468 +
  469 +}
  470 +.sp-cancel:hover {
  471 + color: #d93f3f !important;
  472 + text-decoration: underline;
  473 +}
  474 +
  475 +
  476 +.sp-palette span:hover, .sp-palette span.sp-thumb-active {
  477 + border-color: #000;
  478 +}
  479 +
  480 +.sp-preview, .sp-alpha, .sp-thumb-el {
  481 + position:relative;
  482 + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAMCAIAAADZF8uwAAAAGUlEQVQYV2M4gwH+YwCGIasIUwhT25BVBADtzYNYrHvv4gAAAABJRU5ErkJggg==);
  483 +}
  484 +.sp-preview-inner, .sp-alpha-inner, .sp-thumb-inner {
  485 + display:block;
  486 + position:absolute;
  487 + top:0;left:0;bottom:0;right:0;
  488 +}
  489 +
  490 +.sp-palette .sp-thumb-inner {
  491 + background-position: 50% 50%;
  492 + background-repeat: no-repeat;
  493 +}
  494 +
  495 +.sp-palette .sp-thumb-light.sp-thumb-active .sp-thumb-inner {
  496 + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAIVJREFUeNpiYBhsgJFMffxAXABlN5JruT4Q3wfi/0DsT64h8UD8HmpIPCWG/KemIfOJCUB+Aoacx6EGBZyHBqI+WsDCwuQ9mhxeg2A210Ntfo8klk9sOMijaURm7yc1UP2RNCMbKE9ODK1HM6iegYLkfx8pligC9lCD7KmRof0ZhjQACDAAceovrtpVBRkAAAAASUVORK5CYII=);
  497 +}
  498 +
  499 +.sp-palette .sp-thumb-dark.sp-thumb-active .sp-thumb-inner {
  500 + background-image: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABIAAAASCAYAAABWzo5XAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAADsMAAA7DAcdvqGQAAAAadEVYdFNvZnR3YXJlAFBhaW50Lk5FVCB2My41LjEwMPRyoQAAAMdJREFUOE+tkgsNwzAMRMugEAahEAahEAZhEAqlEAZhEAohEAYh81X2dIm8fKpEspLGvudPOsUYpxE2BIJCroJmEW9qJ+MKaBFhEMNabSy9oIcIPwrB+afvAUFoK4H0tMaQ3XtlrggDhOVVMuT4E5MMG0FBbCEYzjYT7OxLEvIHQLY2zWwQ3D+9luyOQTfKDiFD3iUIfPk8VqrKjgAiSfGFPecrg6HN6m/iBcwiDAo7WiBeawa+Kwh7tZoSCGLMqwlSAzVDhoK+6vH4G0P5wdkAAAAASUVORK5CYII=);
  501 +}
  502 +
  503 +.sp-clear-display {
  504 + background-repeat:no-repeat;
  505 + background-position: center;
  506 + background-image: url(data:image/gif;base64,R0lGODlhFAAUAPcAAAAAAJmZmZ2dnZ6enqKioqOjo6SkpKWlpaampqenp6ioqKmpqaqqqqurq/Hx8fLy8vT09PX19ff39/j4+Pn5+fr6+vv7+wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAP8ALAAAAAAUABQAAAihAP9FoPCvoMGDBy08+EdhQAIJCCMybCDAAYUEARBAlFiQQoMABQhKUJBxY0SPICEYHBnggEmDKAuoPMjS5cGYMxHW3IiT478JJA8M/CjTZ0GgLRekNGpwAsYABHIypcAgQMsITDtWJYBR6NSqMico9cqR6tKfY7GeBCuVwlipDNmefAtTrkSzB1RaIAoXodsABiZAEFB06gIBWC1mLVgBa0AAOw==);
  507 +}
... ...
src/main/resources/static/real_control_v2/assets/plugins/spectrum/spectrum.js 0 → 100644
  1 +// Spectrum Colorpicker v1.8.0
  2 +// https://github.com/bgrins/spectrum
  3 +// Author: Brian Grinstead
  4 +// License: MIT
  5 +
  6 +(function (factory) {
  7 + "use strict";
  8 +
  9 + if (typeof define === 'function' && define.amd) { // AMD
  10 + define(['jquery'], factory);
  11 + }
  12 + else if (typeof exports == "object" && typeof module == "object") { // CommonJS
  13 + module.exports = factory(require('jquery'));
  14 + }
  15 + else { // Browser
  16 + factory(jQuery);
  17 + }
  18 +})(function($, undefined) {
  19 + "use strict";
  20 +
  21 + var defaultOpts = {
  22 +
  23 + // Callbacks
  24 + beforeShow: noop,
  25 + move: noop,
  26 + change: noop,
  27 + show: noop,
  28 + hide: noop,
  29 +
  30 + // Options
  31 + color: false,
  32 + flat: false,
  33 + showInput: false,
  34 + allowEmpty: false,
  35 + showButtons: true,
  36 + clickoutFiresChange: true,
  37 + showInitial: false,
  38 + showPalette: false,
  39 + showPaletteOnly: false,
  40 + hideAfterPaletteSelect: false,
  41 + togglePaletteOnly: false,
  42 + showSelectionPalette: true,
  43 + localStorageKey: false,
  44 + appendTo: "body",
  45 + maxSelectionSize: 7,
  46 + cancelText: "cancel",
  47 + chooseText: "choose",
  48 + togglePaletteMoreText: "more",
  49 + togglePaletteLessText: "less",
  50 + clearText: "Clear Color Selection",
  51 + noColorSelectedText: "No Color Selected",
  52 + preferredFormat: false,
  53 + className: "", // Deprecated - use containerClassName and replacerClassName instead.
  54 + containerClassName: "",
  55 + replacerClassName: "",
  56 + showAlpha: false,
  57 + theme: "sp-light",
  58 + palette: [["#ffffff", "#000000", "#ff0000", "#ff8000", "#ffff00", "#008000", "#0000ff", "#4b0082", "#9400d3"]],
  59 + selectionPalette: [],
  60 + disabled: false,
  61 + offset: null
  62 + },
  63 + spectrums = [],
  64 + IE = !!/msie/i.exec( window.navigator.userAgent ),
  65 + rgbaSupport = (function() {
  66 + function contains( str, substr ) {
  67 + return !!~('' + str).indexOf(substr);
  68 + }
  69 +
  70 + var elem = document.createElement('div');
  71 + var style = elem.style;
  72 + style.cssText = 'background-color:rgba(0,0,0,.5)';
  73 + return contains(style.backgroundColor, 'rgba') || contains(style.backgroundColor, 'hsla');
  74 + })(),
  75 + replaceInput = [
  76 + "<div class='sp-replacer'>",
  77 + "<div class='sp-preview'><div class='sp-preview-inner'></div></div>",
  78 + "<div class='sp-dd'>&#9660;</div>",
  79 + "</div>"
  80 + ].join(''),
  81 + markup = (function () {
  82 +
  83 + // IE does not support gradients with multiple stops, so we need to simulate
  84 + // that for the rainbow slider with 8 divs that each have a single gradient
  85 + var gradientFix = "";
  86 + if (IE) {
  87 + for (var i = 1; i <= 6; i++) {
  88 + gradientFix += "<div class='sp-" + i + "'></div>";
  89 + }
  90 + }
  91 +
  92 + return [
  93 + "<div class='sp-container sp-hidden'>",
  94 + "<div class='sp-palette-container'>",
  95 + "<div class='sp-palette sp-thumb sp-cf'></div>",
  96 + "<div class='sp-palette-button-container sp-cf'>",
  97 + "<button type='button' class='sp-palette-toggle'></button>",
  98 + "</div>",
  99 + "</div>",
  100 + "<div class='sp-picker-container'>",
  101 + "<div class='sp-top sp-cf'>",
  102 + "<div class='sp-fill'></div>",
  103 + "<div class='sp-top-inner'>",
  104 + "<div class='sp-color'>",
  105 + "<div class='sp-sat'>",
  106 + "<div class='sp-val'>",
  107 + "<div class='sp-dragger'></div>",
  108 + "</div>",
  109 + "</div>",
  110 + "</div>",
  111 + "<div class='sp-clear sp-clear-display'>",
  112 + "</div>",
  113 + "<div class='sp-hue'>",
  114 + "<div class='sp-slider'></div>",
  115 + gradientFix,
  116 + "</div>",
  117 + "</div>",
  118 + "<div class='sp-alpha'><div class='sp-alpha-inner'><div class='sp-alpha-handle'></div></div></div>",
  119 + "</div>",
  120 + "<div class='sp-input-container sp-cf'>",
  121 + "<input class='sp-input' type='text' spellcheck='false' />",
  122 + "</div>",
  123 + "<div class='sp-initial sp-thumb sp-cf'></div>",
  124 + "<div class='sp-button-container sp-cf'>",
  125 + "<a class='sp-cancel' href='#'></a>",
  126 + "<button type='button' class='sp-choose'></button>",
  127 + "</div>",
  128 + "</div>",
  129 + "</div>"
  130 + ].join("");
  131 + })();
  132 +
  133 + function paletteTemplate (p, color, className, opts) {
  134 + var html = [];
  135 + for (var i = 0; i < p.length; i++) {
  136 + var current = p[i];
  137 + if(current) {
  138 + var tiny = tinycolor(current);
  139 + var c = tiny.toHsl().l < 0.5 ? "sp-thumb-el sp-thumb-dark" : "sp-thumb-el sp-thumb-light";
  140 + c += (tinycolor.equals(color, current)) ? " sp-thumb-active" : "";
  141 + var formattedString = tiny.toString(opts.preferredFormat || "rgb");
  142 + var swatchStyle = rgbaSupport ? ("background-color:" + tiny.toRgbString()) : "filter:" + tiny.toFilter();
  143 + html.push('<span title="' + formattedString + '" data-color="' + tiny.toRgbString() + '" class="' + c + '"><span class="sp-thumb-inner" style="' + swatchStyle + ';" /></span>');
  144 + } else {
  145 + var cls = 'sp-clear-display';
  146 + html.push($('<div />')
  147 + .append($('<span data-color="" style="background-color:transparent;" class="' + cls + '"></span>')
  148 + .attr('title', opts.noColorSelectedText)
  149 + )
  150 + .html()
  151 + );
  152 + }
  153 + }
  154 + return "<div class='sp-cf " + className + "'>" + html.join('') + "</div>";
  155 + }
  156 +
  157 + function hideAll() {
  158 + for (var i = 0; i < spectrums.length; i++) {
  159 + if (spectrums[i]) {
  160 + spectrums[i].hide();
  161 + }
  162 + }
  163 + }
  164 +
  165 + function instanceOptions(o, callbackContext) {
  166 + var opts = $.extend({}, defaultOpts, o);
  167 + opts.callbacks = {
  168 + 'move': bind(opts.move, callbackContext),
  169 + 'change': bind(opts.change, callbackContext),
  170 + 'show': bind(opts.show, callbackContext),
  171 + 'hide': bind(opts.hide, callbackContext),
  172 + 'beforeShow': bind(opts.beforeShow, callbackContext)
  173 + };
  174 +
  175 + return opts;
  176 + }
  177 +
  178 + function spectrum(element, o) {
  179 +
  180 + var opts = instanceOptions(o, element),
  181 + flat = opts.flat,
  182 + showSelectionPalette = opts.showSelectionPalette,
  183 + localStorageKey = opts.localStorageKey,
  184 + theme = opts.theme,
  185 + callbacks = opts.callbacks,
  186 + resize = throttle(reflow, 10),
  187 + visible = false,
  188 + isDragging = false,
  189 + dragWidth = 0,
  190 + dragHeight = 0,
  191 + dragHelperHeight = 0,
  192 + slideHeight = 0,
  193 + slideWidth = 0,
  194 + alphaWidth = 0,
  195 + alphaSlideHelperWidth = 0,
  196 + slideHelperHeight = 0,
  197 + currentHue = 0,
  198 + currentSaturation = 0,
  199 + currentValue = 0,
  200 + currentAlpha = 1,
  201 + palette = [],
  202 + paletteArray = [],
  203 + paletteLookup = {},
  204 + selectionPalette = opts.selectionPalette.slice(0),
  205 + maxSelectionSize = opts.maxSelectionSize,
  206 + draggingClass = "sp-dragging",
  207 + shiftMovementDirection = null;
  208 +
  209 + var doc = element.ownerDocument,
  210 + body = doc.body,
  211 + boundElement = $(element),
  212 + disabled = false,
  213 + container = $(markup, doc).addClass(theme),
  214 + pickerContainer = container.find(".sp-picker-container"),
  215 + dragger = container.find(".sp-color"),
  216 + dragHelper = container.find(".sp-dragger"),
  217 + slider = container.find(".sp-hue"),
  218 + slideHelper = container.find(".sp-slider"),
  219 + alphaSliderInner = container.find(".sp-alpha-inner"),
  220 + alphaSlider = container.find(".sp-alpha"),
  221 + alphaSlideHelper = container.find(".sp-alpha-handle"),
  222 + textInput = container.find(".sp-input"),
  223 + paletteContainer = container.find(".sp-palette"),
  224 + initialColorContainer = container.find(".sp-initial"),
  225 + cancelButton = container.find(".sp-cancel"),
  226 + clearButton = container.find(".sp-clear"),
  227 + chooseButton = container.find(".sp-choose"),
  228 + toggleButton = container.find(".sp-palette-toggle"),
  229 + isInput = boundElement.is("input"),
  230 + isInputTypeColor = isInput && boundElement.attr("type") === "color" && inputTypeColorSupport(),
  231 + shouldReplace = isInput && !flat,
  232 + replacer = (shouldReplace) ? $(replaceInput).addClass(theme).addClass(opts.className).addClass(opts.replacerClassName) : $([]),
  233 + offsetElement = (shouldReplace) ? replacer : boundElement,
  234 + previewElement = replacer.find(".sp-preview-inner"),
  235 + initialColor = opts.color || (isInput && boundElement.val()),
  236 + colorOnShow = false,
  237 + currentPreferredFormat = opts.preferredFormat,
  238 + clickoutFiresChange = !opts.showButtons || opts.clickoutFiresChange,
  239 + isEmpty = !initialColor,
  240 + allowEmpty = opts.allowEmpty && !isInputTypeColor;
  241 +
  242 + function applyOptions() {
  243 +
  244 + if (opts.showPaletteOnly) {
  245 + opts.showPalette = true;
  246 + }
  247 +
  248 + toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText);
  249 +
  250 + if (opts.palette) {
  251 + palette = opts.palette.slice(0);
  252 + paletteArray = $.isArray(palette[0]) ? palette : [palette];
  253 + paletteLookup = {};
  254 + for (var i = 0; i < paletteArray.length; i++) {
  255 + for (var j = 0; j < paletteArray[i].length; j++) {
  256 + var rgb = tinycolor(paletteArray[i][j]).toRgbString();
  257 + paletteLookup[rgb] = true;
  258 + }
  259 + }
  260 + }
  261 +
  262 + container.toggleClass("sp-flat", flat);
  263 + container.toggleClass("sp-input-disabled", !opts.showInput);
  264 + container.toggleClass("sp-alpha-enabled", opts.showAlpha);
  265 + container.toggleClass("sp-clear-enabled", allowEmpty);
  266 + container.toggleClass("sp-buttons-disabled", !opts.showButtons);
  267 + container.toggleClass("sp-palette-buttons-disabled", !opts.togglePaletteOnly);
  268 + container.toggleClass("sp-palette-disabled", !opts.showPalette);
  269 + container.toggleClass("sp-palette-only", opts.showPaletteOnly);
  270 + container.toggleClass("sp-initial-disabled", !opts.showInitial);
  271 + container.addClass(opts.className).addClass(opts.containerClassName);
  272 +
  273 + reflow();
  274 + }
  275 +
  276 + function initialize() {
  277 +
  278 + if (IE) {
  279 + container.find("*:not(input)").attr("unselectable", "on");
  280 + }
  281 +
  282 + applyOptions();
  283 +
  284 + if (shouldReplace) {
  285 + boundElement.after(replacer).hide();
  286 + }
  287 +
  288 + if (!allowEmpty) {
  289 + clearButton.hide();
  290 + }
  291 +
  292 + if (flat) {
  293 + boundElement.after(container).hide();
  294 + }
  295 + else {
  296 +
  297 + var appendTo = opts.appendTo === "parent" ? boundElement.parent() : $(opts.appendTo);
  298 + if (appendTo.length !== 1) {
  299 + appendTo = $("body");
  300 + }
  301 +
  302 + appendTo.append(container);
  303 + }
  304 +
  305 + updateSelectionPaletteFromStorage();
  306 +
  307 + offsetElement.on("click.spectrum touchstart.spectrum", function (e) {
  308 + if (!disabled) {
  309 + toggle();
  310 + }
  311 +
  312 + e.stopPropagation();
  313 +
  314 + if (!$(e.target).is("input")) {
  315 + e.preventDefault();
  316 + }
  317 + });
  318 +
  319 + if(boundElement.is(":disabled") || (opts.disabled === true)) {
  320 + disable();
  321 + }
  322 +
  323 + // Prevent clicks from bubbling up to document. This would cause it to be hidden.
  324 + container.click(stopPropagation);
  325 +
  326 + // Handle user typed input
  327 + textInput.change(setFromTextInput);
  328 + textInput.on("paste", function () {
  329 + setTimeout(setFromTextInput, 1);
  330 + });
  331 + textInput.keydown(function (e) { if (e.keyCode == 13) { setFromTextInput(); } });
  332 +
  333 + cancelButton.text(opts.cancelText);
  334 + cancelButton.on("click.spectrum", function (e) {
  335 + e.stopPropagation();
  336 + e.preventDefault();
  337 + revert();
  338 + hide();
  339 + });
  340 +
  341 + clearButton.attr("title", opts.clearText);
  342 + clearButton.on("click.spectrum", function (e) {
  343 + e.stopPropagation();
  344 + e.preventDefault();
  345 + isEmpty = true;
  346 + move();
  347 +
  348 + if(flat) {
  349 + //for the flat style, this is a change event
  350 + updateOriginalInput(true);
  351 + }
  352 + });
  353 +
  354 + chooseButton.text(opts.chooseText);
  355 + chooseButton.on("click.spectrum", function (e) {
  356 + e.stopPropagation();
  357 + e.preventDefault();
  358 +
  359 + if (IE && textInput.is(":focus")) {
  360 + textInput.trigger('change');
  361 + }
  362 +
  363 + if (isValid()) {
  364 + updateOriginalInput(true);
  365 + hide();
  366 + }
  367 + });
  368 +
  369 + toggleButton.text(opts.showPaletteOnly ? opts.togglePaletteMoreText : opts.togglePaletteLessText);
  370 + toggleButton.on("click.spectrum", function (e) {
  371 + e.stopPropagation();
  372 + e.preventDefault();
  373 +
  374 + opts.showPaletteOnly = !opts.showPaletteOnly;
  375 +
  376 + // To make sure the Picker area is drawn on the right, next to the
  377 + // Palette area (and not below the palette), first move the Palette
  378 + // to the left to make space for the picker, plus 5px extra.
  379 + // The 'applyOptions' function puts the whole container back into place
  380 + // and takes care of the button-text and the sp-palette-only CSS class.
  381 + if (!opts.showPaletteOnly && !flat) {
  382 + container.css('left', '-=' + (pickerContainer.outerWidth(true) + 5));
  383 + }
  384 + applyOptions();
  385 + });
  386 +
  387 + draggable(alphaSlider, function (dragX, dragY, e) {
  388 + currentAlpha = (dragX / alphaWidth);
  389 + isEmpty = false;
  390 + if (e.shiftKey) {
  391 + currentAlpha = Math.round(currentAlpha * 10) / 10;
  392 + }
  393 +
  394 + move();
  395 + }, dragStart, dragStop);
  396 +
  397 + draggable(slider, function (dragX, dragY) {
  398 + currentHue = parseFloat(dragY / slideHeight);
  399 + isEmpty = false;
  400 + if (!opts.showAlpha) {
  401 + currentAlpha = 1;
  402 + }
  403 + move();
  404 + }, dragStart, dragStop);
  405 +
  406 + draggable(dragger, function (dragX, dragY, e) {
  407 +
  408 + // shift+drag should snap the movement to either the x or y axis.
  409 + if (!e.shiftKey) {
  410 + shiftMovementDirection = null;
  411 + }
  412 + else if (!shiftMovementDirection) {
  413 + var oldDragX = currentSaturation * dragWidth;
  414 + var oldDragY = dragHeight - (currentValue * dragHeight);
  415 + var furtherFromX = Math.abs(dragX - oldDragX) > Math.abs(dragY - oldDragY);
  416 +
  417 + shiftMovementDirection = furtherFromX ? "x" : "y";
  418 + }
  419 +
  420 + var setSaturation = !shiftMovementDirection || shiftMovementDirection === "x";
  421 + var setValue = !shiftMovementDirection || shiftMovementDirection === "y";
  422 +
  423 + if (setSaturation) {
  424 + currentSaturation = parseFloat(dragX / dragWidth);
  425 + }
  426 + if (setValue) {
  427 + currentValue = parseFloat((dragHeight - dragY) / dragHeight);
  428 + }
  429 +
  430 + isEmpty = false;
  431 + if (!opts.showAlpha) {
  432 + currentAlpha = 1;
  433 + }
  434 +
  435 + move();
  436 +
  437 + }, dragStart, dragStop);
  438 +
  439 + if (!!initialColor) {
  440 + set(initialColor);
  441 +
  442 + // In case color was black - update the preview UI and set the format
  443 + // since the set function will not run (default color is black).
  444 + updateUI();
  445 + currentPreferredFormat = opts.preferredFormat || tinycolor(initialColor).format;
  446 +
  447 + addColorToSelectionPalette(initialColor);
  448 + }
  449 + else {
  450 + updateUI();
  451 + }
  452 +
  453 + if (flat) {
  454 + show();
  455 + }
  456 +
  457 + function paletteElementClick(e) {
  458 + if (e.data && e.data.ignore) {
  459 + set($(e.target).closest(".sp-thumb-el").data("color"));
  460 + move();
  461 + }
  462 + else {
  463 + set($(e.target).closest(".sp-thumb-el").data("color"));
  464 + move();
  465 +
  466 + // If the picker is going to close immediately, a palette selection
  467 + // is a change. Otherwise, it's a move only.
  468 + if (opts.hideAfterPaletteSelect) {
  469 + updateOriginalInput(true);
  470 + hide();
  471 + } else {
  472 + updateOriginalInput();
  473 + }
  474 + }
  475 +
  476 + return false;
  477 + }
  478 +
  479 + var paletteEvent = IE ? "mousedown.spectrum" : "click.spectrum touchstart.spectrum";
  480 + paletteContainer.on(paletteEvent, ".sp-thumb-el", paletteElementClick);
  481 + initialColorContainer.on(paletteEvent, ".sp-thumb-el:nth-child(1)", { ignore: true }, paletteElementClick);
  482 + }
  483 +
  484 + function updateSelectionPaletteFromStorage() {
  485 +
  486 + if (localStorageKey && window.localStorage) {
  487 +
  488 + // Migrate old palettes over to new format. May want to remove this eventually.
  489 + try {
  490 + var oldPalette = window.localStorage[localStorageKey].split(",#");
  491 + if (oldPalette.length > 1) {
  492 + delete window.localStorage[localStorageKey];
  493 + $.each(oldPalette, function(i, c) {
  494 + addColorToSelectionPalette(c);
  495 + });
  496 + }
  497 + }
  498 + catch(e) { }
  499 +
  500 + try {
  501 + selectionPalette = window.localStorage[localStorageKey].split(";");
  502 + }
  503 + catch (e) { }
  504 + }
  505 + }
  506 +
  507 + function addColorToSelectionPalette(color) {
  508 + if (showSelectionPalette) {
  509 + var rgb = tinycolor(color).toRgbString();
  510 + if (!paletteLookup[rgb] && $.inArray(rgb, selectionPalette) === -1) {
  511 + selectionPalette.push(rgb);
  512 + while(selectionPalette.length > maxSelectionSize) {
  513 + selectionPalette.shift();
  514 + }
  515 + }
  516 +
  517 + if (localStorageKey && window.localStorage) {
  518 + try {
  519 + window.localStorage[localStorageKey] = selectionPalette.join(";");
  520 + }
  521 + catch(e) { }
  522 + }
  523 + }
  524 + }
  525 +
  526 + function getUniqueSelectionPalette() {
  527 + var unique = [];
  528 + if (opts.showPalette) {
  529 + for (var i = 0; i < selectionPalette.length; i++) {
  530 + var rgb = tinycolor(selectionPalette[i]).toRgbString();
  531 +
  532 + if (!paletteLookup[rgb]) {
  533 + unique.push(selectionPalette[i]);
  534 + }
  535 + }
  536 + }
  537 +
  538 + return unique.reverse().slice(0, opts.maxSelectionSize);
  539 + }
  540 +
  541 + function drawPalette() {
  542 +
  543 + var currentColor = get();
  544 +
  545 + var html = $.map(paletteArray, function (palette, i) {
  546 + return paletteTemplate(palette, currentColor, "sp-palette-row sp-palette-row-" + i, opts);
  547 + });
  548 +
  549 + updateSelectionPaletteFromStorage();
  550 +
  551 + if (selectionPalette) {
  552 + html.push(paletteTemplate(getUniqueSelectionPalette(), currentColor, "sp-palette-row sp-palette-row-selection", opts));
  553 + }
  554 +
  555 + paletteContainer.html(html.join(""));
  556 + }
  557 +
  558 + function drawInitial() {
  559 + if (opts.showInitial) {
  560 + var initial = colorOnShow;
  561 + var current = get();
  562 + initialColorContainer.html(paletteTemplate([initial, current], current, "sp-palette-row-initial", opts));
  563 + }
  564 + }
  565 +
  566 + function dragStart() {
  567 + if (dragHeight <= 0 || dragWidth <= 0 || slideHeight <= 0) {
  568 + reflow();
  569 + }
  570 + isDragging = true;
  571 + container.addClass(draggingClass);
  572 + shiftMovementDirection = null;
  573 + boundElement.trigger('dragstart.spectrum', [ get() ]);
  574 + }
  575 +
  576 + function dragStop() {
  577 + isDragging = false;
  578 + container.removeClass(draggingClass);
  579 + boundElement.trigger('dragstop.spectrum', [ get() ]);
  580 + }
  581 +
  582 + function setFromTextInput() {
  583 +
  584 + var value = textInput.val();
  585 +
  586 + if ((value === null || value === "") && allowEmpty) {
  587 + set(null);
  588 + move();
  589 + updateOriginalInput();
  590 + }
  591 + else {
  592 + var tiny = tinycolor(value);
  593 + if (tiny.isValid()) {
  594 + set(tiny);
  595 + move();
  596 + updateOriginalInput();
  597 + }
  598 + else {
  599 + textInput.addClass("sp-validation-error");
  600 + }
  601 + }
  602 + }
  603 +
  604 + function toggle() {
  605 + if (visible) {
  606 + hide();
  607 + }
  608 + else {
  609 + show();
  610 + }
  611 + }
  612 +
  613 + function show() {
  614 + var event = $.Event('beforeShow.spectrum');
  615 +
  616 + if (visible) {
  617 + reflow();
  618 + return;
  619 + }
  620 +
  621 + boundElement.trigger(event, [ get() ]);
  622 +
  623 + if (callbacks.beforeShow(get()) === false || event.isDefaultPrevented()) {
  624 + return;
  625 + }
  626 +
  627 + hideAll();
  628 + visible = true;
  629 +
  630 + $(doc).on("keydown.spectrum", onkeydown);
  631 + $(doc).on("click.spectrum", clickout);
  632 + $(window).on("resize.spectrum", resize);
  633 + replacer.addClass("sp-active");
  634 + container.removeClass("sp-hidden");
  635 +
  636 + reflow();
  637 + updateUI();
  638 +
  639 + colorOnShow = get();
  640 +
  641 + drawInitial();
  642 + callbacks.show(colorOnShow);
  643 + boundElement.trigger('show.spectrum', [ colorOnShow ]);
  644 + }
  645 +
  646 + function onkeydown(e) {
  647 + // Close on ESC
  648 + if (e.keyCode === 27) {
  649 + hide();
  650 + }
  651 + }
  652 +
  653 + function clickout(e) {
  654 + // Return on right click.
  655 + if (e.button == 2) { return; }
  656 +
  657 + // If a drag event was happening during the mouseup, don't hide
  658 + // on click.
  659 + if (isDragging) { return; }
  660 +
  661 + if (clickoutFiresChange) {
  662 + updateOriginalInput(true);
  663 + }
  664 + else {
  665 + revert();
  666 + }
  667 + hide();
  668 + }
  669 +
  670 + function hide() {
  671 + // Return if hiding is unnecessary
  672 + if (!visible || flat) { return; }
  673 + visible = false;
  674 +
  675 + $(doc).off("keydown.spectrum", onkeydown);
  676 + $(doc).off("click.spectrum", clickout);
  677 + $(window).off("resize.spectrum", resize);
  678 +
  679 + replacer.removeClass("sp-active");
  680 + container.addClass("sp-hidden");
  681 +
  682 + callbacks.hide(get());
  683 + boundElement.trigger('hide.spectrum', [ get() ]);
  684 + }
  685 +
  686 + function revert() {
  687 + set(colorOnShow, true);
  688 + updateOriginalInput(true);
  689 + }
  690 +
  691 + function set(color, ignoreFormatChange) {
  692 + if (tinycolor.equals(color, get())) {
  693 + // Update UI just in case a validation error needs
  694 + // to be cleared.
  695 + updateUI();
  696 + return;
  697 + }
  698 +
  699 + var newColor, newHsv;
  700 + if (!color && allowEmpty) {
  701 + isEmpty = true;
  702 + } else {
  703 + isEmpty = false;
  704 + newColor = tinycolor(color);
  705 + newHsv = newColor.toHsv();
  706 +
  707 + currentHue = (newHsv.h % 360) / 360;
  708 + currentSaturation = newHsv.s;
  709 + currentValue = newHsv.v;
  710 + currentAlpha = newHsv.a;
  711 + }
  712 + updateUI();
  713 +
  714 + if (newColor && newColor.isValid() && !ignoreFormatChange) {
  715 + currentPreferredFormat = opts.preferredFormat || newColor.getFormat();
  716 + }
  717 + }
  718 +
  719 + function get(opts) {
  720 + opts = opts || { };
  721 +
  722 + if (allowEmpty && isEmpty) {
  723 + return null;
  724 + }
  725 +
  726 + return tinycolor.fromRatio({
  727 + h: currentHue,
  728 + s: currentSaturation,
  729 + v: currentValue,
  730 + a: Math.round(currentAlpha * 1000) / 1000
  731 + }, { format: opts.format || currentPreferredFormat });
  732 + }
  733 +
  734 + function isValid() {
  735 + return !textInput.hasClass("sp-validation-error");
  736 + }
  737 +
  738 + function move() {
  739 + updateUI();
  740 +
  741 + callbacks.move(get());
  742 + boundElement.trigger('move.spectrum', [ get() ]);
  743 + }
  744 +
  745 + function updateUI() {
  746 +
  747 + textInput.removeClass("sp-validation-error");
  748 +
  749 + updateHelperLocations();
  750 +
  751 + // Update dragger background color (gradients take care of saturation and value).
  752 + var flatColor = tinycolor.fromRatio({ h: currentHue, s: 1, v: 1 });
  753 + dragger.css("background-color", flatColor.toHexString());
  754 +
  755 + // Get a format that alpha will be included in (hex and names ignore alpha)
  756 + var format = currentPreferredFormat;
  757 + if (currentAlpha < 1 && !(currentAlpha === 0 && format === "name")) {
  758 + if (format === "hex" || format === "hex3" || format === "hex6" || format === "name") {
  759 + format = "rgb";
  760 + }
  761 + }
  762 +
  763 + var realColor = get({ format: format }),
  764 + displayColor = '';
  765 +
  766 + //reset background info for preview element
  767 + previewElement.removeClass("sp-clear-display");
  768 + previewElement.css('background-color', 'transparent');
  769 +
  770 + if (!realColor && allowEmpty) {
  771 + // Update the replaced elements background with icon indicating no color selection
  772 + previewElement.addClass("sp-clear-display");
  773 + }
  774 + else {
  775 + var realHex = realColor.toHexString(),
  776 + realRgb = realColor.toRgbString();
  777 +
  778 + // Update the replaced elements background color (with actual selected color)
  779 + if (rgbaSupport || realColor.alpha === 1) {
  780 + previewElement.css("background-color", realRgb);
  781 + }
  782 + else {
  783 + previewElement.css("background-color", "transparent");
  784 + previewElement.css("filter", realColor.toFilter());
  785 + }
  786 +
  787 + if (opts.showAlpha) {
  788 + var rgb = realColor.toRgb();
  789 + rgb.a = 0;
  790 + var realAlpha = tinycolor(rgb).toRgbString();
  791 + var gradient = "linear-gradient(left, " + realAlpha + ", " + realHex + ")";
  792 +
  793 + if (IE) {
  794 + alphaSliderInner.css("filter", tinycolor(realAlpha).toFilter({ gradientType: 1 }, realHex));
  795 + }
  796 + else {
  797 + alphaSliderInner.css("background", "-webkit-" + gradient);
  798 + alphaSliderInner.css("background", "-moz-" + gradient);
  799 + alphaSliderInner.css("background", "-ms-" + gradient);
  800 + // Use current syntax gradient on unprefixed property.
  801 + alphaSliderInner.css("background",
  802 + "linear-gradient(to right, " + realAlpha + ", " + realHex + ")");
  803 + }
  804 + }
  805 +
  806 + displayColor = realColor.toString(format);
  807 + }
  808 +
  809 + // Update the text entry input as it changes happen
  810 + if (opts.showInput) {
  811 + textInput.val(displayColor);
  812 + }
  813 +
  814 + if (opts.showPalette) {
  815 + drawPalette();
  816 + }
  817 +
  818 + drawInitial();
  819 + }
  820 +
  821 + function updateHelperLocations() {
  822 + var s = currentSaturation;
  823 + var v = currentValue;
  824 +
  825 + if(allowEmpty && isEmpty) {
  826 + //if selected color is empty, hide the helpers
  827 + alphaSlideHelper.hide();
  828 + slideHelper.hide();
  829 + dragHelper.hide();
  830 + }
  831 + else {
  832 + //make sure helpers are visible
  833 + alphaSlideHelper.show();
  834 + slideHelper.show();
  835 + dragHelper.show();
  836 +
  837 + // Where to show the little circle in that displays your current selected color
  838 + var dragX = s * dragWidth;
  839 + var dragY = dragHeight - (v * dragHeight);
  840 + dragX = Math.max(
  841 + -dragHelperHeight,
  842 + Math.min(dragWidth - dragHelperHeight, dragX - dragHelperHeight)
  843 + );
  844 + dragY = Math.max(
  845 + -dragHelperHeight,
  846 + Math.min(dragHeight - dragHelperHeight, dragY - dragHelperHeight)
  847 + );
  848 + dragHelper.css({
  849 + "top": dragY + "px",
  850 + "left": dragX + "px"
  851 + });
  852 +
  853 + var alphaX = currentAlpha * alphaWidth;
  854 + alphaSlideHelper.css({
  855 + "left": (alphaX - (alphaSlideHelperWidth / 2)) + "px"
  856 + });
  857 +
  858 + // Where to show the bar that displays your current selected hue
  859 + var slideY = (currentHue) * slideHeight;
  860 + slideHelper.css({
  861 + "top": (slideY - slideHelperHeight) + "px"
  862 + });
  863 + }
  864 + }
  865 +
  866 + function updateOriginalInput(fireCallback) {
  867 + var color = get(),
  868 + displayColor = '',
  869 + hasChanged = !tinycolor.equals(color, colorOnShow);
  870 +
  871 + if (color) {
  872 + displayColor = color.toString(currentPreferredFormat);
  873 + // Update the selection palette with the current color
  874 + addColorToSelectionPalette(color);
  875 + }
  876 +
  877 + if (isInput) {
  878 + boundElement.val(displayColor);
  879 + }
  880 +
  881 + if (fireCallback && hasChanged) {
  882 + callbacks.change(color);
  883 + boundElement.trigger('change', [ color ]);
  884 + }
  885 + }
  886 +
  887 + function reflow() {
  888 + if (!visible) {
  889 + return; // Calculations would be useless and wouldn't be reliable anyways
  890 + }
  891 + dragWidth = dragger.width();
  892 + dragHeight = dragger.height();
  893 + dragHelperHeight = dragHelper.height();
  894 + slideWidth = slider.width();
  895 + slideHeight = slider.height();
  896 + slideHelperHeight = slideHelper.height();
  897 + alphaWidth = alphaSlider.width();
  898 + alphaSlideHelperWidth = alphaSlideHelper.width();
  899 +
  900 + if (!flat) {
  901 + container.css("position", "absolute");
  902 + if (opts.offset) {
  903 + container.offset(opts.offset);
  904 + } else {
  905 + container.offset(getOffset(container, offsetElement));
  906 + }
  907 + }
  908 +
  909 + updateHelperLocations();
  910 +
  911 + if (opts.showPalette) {
  912 + drawPalette();
  913 + }
  914 +
  915 + boundElement.trigger('reflow.spectrum');
  916 + }
  917 +
  918 + function destroy() {
  919 + boundElement.show();
  920 + offsetElement.off("click.spectrum touchstart.spectrum");
  921 + container.remove();
  922 + replacer.remove();
  923 + spectrums[spect.id] = null;
  924 + }
  925 +
  926 + function option(optionName, optionValue) {
  927 + if (optionName === undefined) {
  928 + return $.extend({}, opts);
  929 + }
  930 + if (optionValue === undefined) {
  931 + return opts[optionName];
  932 + }
  933 +
  934 + opts[optionName] = optionValue;
  935 +
  936 + if (optionName === "preferredFormat") {
  937 + currentPreferredFormat = opts.preferredFormat;
  938 + }
  939 + applyOptions();
  940 + }
  941 +
  942 + function enable() {
  943 + disabled = false;
  944 + boundElement.attr("disabled", false);
  945 + offsetElement.removeClass("sp-disabled");
  946 + }
  947 +
  948 + function disable() {
  949 + hide();
  950 + disabled = true;
  951 + boundElement.attr("disabled", true);
  952 + offsetElement.addClass("sp-disabled");
  953 + }
  954 +
  955 + function setOffset(coord) {
  956 + opts.offset = coord;
  957 + reflow();
  958 + }
  959 +
  960 + initialize();
  961 +
  962 + var spect = {
  963 + show: show,
  964 + hide: hide,
  965 + toggle: toggle,
  966 + reflow: reflow,
  967 + option: option,
  968 + enable: enable,
  969 + disable: disable,
  970 + offset: setOffset,
  971 + set: function (c) {
  972 + set(c);
  973 + updateOriginalInput();
  974 + },
  975 + get: get,
  976 + destroy: destroy,
  977 + container: container
  978 + };
  979 +
  980 + spect.id = spectrums.push(spect) - 1;
  981 +
  982 + return spect;
  983 + }
  984 +
  985 + /**
  986 + * checkOffset - get the offset below/above and left/right element depending on screen position
  987 + * Thanks https://github.com/jquery/jquery-ui/blob/master/ui/jquery.ui.datepicker.js
  988 + */
  989 + function getOffset(picker, input) {
  990 + var extraY = 0;
  991 + var dpWidth = picker.outerWidth();
  992 + var dpHeight = picker.outerHeight();
  993 + var inputHeight = input.outerHeight();
  994 + var doc = picker[0].ownerDocument;
  995 + var docElem = doc.documentElement;
  996 + var viewWidth = docElem.clientWidth + $(doc).scrollLeft();
  997 + var viewHeight = docElem.clientHeight + $(doc).scrollTop();
  998 + var offset = input.offset();
  999 + var offsetLeft = offset.left;
  1000 + var offsetTop = offset.top;
  1001 +
  1002 + offsetTop += inputHeight;
  1003 +
  1004 + offsetLeft -=
  1005 + Math.min(offsetLeft, (offsetLeft + dpWidth > viewWidth && viewWidth > dpWidth) ?
  1006 + Math.abs(offsetLeft + dpWidth - viewWidth) : 0);
  1007 +
  1008 + offsetTop -=
  1009 + Math.min(offsetTop, ((offsetTop + dpHeight > viewHeight && viewHeight > dpHeight) ?
  1010 + Math.abs(dpHeight + inputHeight - extraY) : extraY));
  1011 +
  1012 + return {
  1013 + top: offsetTop,
  1014 + bottom: offset.bottom,
  1015 + left: offsetLeft,
  1016 + right: offset.right,
  1017 + width: offset.width,
  1018 + height: offset.height
  1019 + };
  1020 + }
  1021 +
  1022 + /**
  1023 + * noop - do nothing
  1024 + */
  1025 + function noop() {
  1026 +
  1027 + }
  1028 +
  1029 + /**
  1030 + * stopPropagation - makes the code only doing this a little easier to read in line
  1031 + */
  1032 + function stopPropagation(e) {
  1033 + e.stopPropagation();
  1034 + }
  1035 +
  1036 + /**
  1037 + * Create a function bound to a given object
  1038 + * Thanks to underscore.js
  1039 + */
  1040 + function bind(func, obj) {
  1041 + var slice = Array.prototype.slice;
  1042 + var args = slice.call(arguments, 2);
  1043 + return function () {
  1044 + return func.apply(obj, args.concat(slice.call(arguments)));
  1045 + };
  1046 + }
  1047 +
  1048 + /**
  1049 + * Lightweight drag helper. Handles containment within the element, so that
  1050 + * when dragging, the x is within [0,element.width] and y is within [0,element.height]
  1051 + */
  1052 + function draggable(element, onmove, onstart, onstop) {
  1053 + onmove = onmove || function () { };
  1054 + onstart = onstart || function () { };
  1055 + onstop = onstop || function () { };
  1056 + var doc = document;
  1057 + var dragging = false;
  1058 + var offset = {};
  1059 + var maxHeight = 0;
  1060 + var maxWidth = 0;
  1061 + var hasTouch = ('ontouchstart' in window);
  1062 +
  1063 + var duringDragEvents = {};
  1064 + duringDragEvents["selectstart"] = prevent;
  1065 + duringDragEvents["dragstart"] = prevent;
  1066 + duringDragEvents["touchmove mousemove"] = move;
  1067 + duringDragEvents["touchend mouseup"] = stop;
  1068 +
  1069 + function prevent(e) {
  1070 + if (e.stopPropagation) {
  1071 + e.stopPropagation();
  1072 + }
  1073 + if (e.preventDefault) {
  1074 + e.preventDefault();
  1075 + }
  1076 + e.returnValue = false;
  1077 + }
  1078 +
  1079 + function move(e) {
  1080 + if (dragging) {
  1081 + // Mouseup happened outside of window
  1082 + if (IE && doc.documentMode < 9 && !e.button) {
  1083 + return stop();
  1084 + }
  1085 +
  1086 + var t0 = e.originalEvent && e.originalEvent.touches && e.originalEvent.touches[0];
  1087 + var pageX = t0 && t0.pageX || e.pageX;
  1088 + var pageY = t0 && t0.pageY || e.pageY;
  1089 +
  1090 + var dragX = Math.max(0, Math.min(pageX - offset.left, maxWidth));
  1091 + var dragY = Math.max(0, Math.min(pageY - offset.top, maxHeight));
  1092 +
  1093 + if (hasTouch) {
  1094 + // Stop scrolling in iOS
  1095 + prevent(e);
  1096 + }
  1097 +
  1098 + onmove.apply(element, [dragX, dragY, e]);
  1099 + }
  1100 + }
  1101 +
  1102 + function start(e) {
  1103 + var rightclick = (e.which) ? (e.which == 3) : (e.button == 2);
  1104 +
  1105 + if (!rightclick && !dragging) {
  1106 + if (onstart.apply(element, arguments) !== false) {
  1107 + dragging = true;
  1108 + maxHeight = $(element).height();
  1109 + maxWidth = $(element).width();
  1110 + offset = $(element).offset();
  1111 +
  1112 + $(doc).on(duringDragEvents);
  1113 + $(doc.body).addClass("sp-dragging");
  1114 +
  1115 + move(e);
  1116 +
  1117 + prevent(e);
  1118 + }
  1119 + }
  1120 + }
  1121 +
  1122 + function stop() {
  1123 + if (dragging) {
  1124 + $(doc).off(duringDragEvents);
  1125 + $(doc.body).removeClass("sp-dragging");
  1126 +
  1127 + // Wait a tick before notifying observers to allow the click event
  1128 + // to fire in Chrome.
  1129 + setTimeout(function() {
  1130 + onstop.apply(element, arguments);
  1131 + }, 0);
  1132 + }
  1133 + dragging = false;
  1134 + }
  1135 +
  1136 + $(element).on("touchstart mousedown", start);
  1137 + }
  1138 +
  1139 + function throttle(func, wait, debounce) {
  1140 + var timeout;
  1141 + return function () {
  1142 + var context = this, args = arguments;
  1143 + var throttler = function () {
  1144 + timeout = null;
  1145 + func.apply(context, args);
  1146 + };
  1147 + if (debounce) clearTimeout(timeout);
  1148 + if (debounce || !timeout) timeout = setTimeout(throttler, wait);
  1149 + };
  1150 + }
  1151 +
  1152 + function inputTypeColorSupport() {
  1153 + return $.fn.spectrum.inputTypeColorSupport();
  1154 + }
  1155 +
  1156 + /**
  1157 + * Define a jQuery plugin
  1158 + */
  1159 + var dataID = "spectrum.id";
  1160 + $.fn.spectrum = function (opts, extra) {
  1161 +
  1162 + if (typeof opts == "string") {
  1163 +
  1164 + var returnValue = this;
  1165 + var args = Array.prototype.slice.call( arguments, 1 );
  1166 +
  1167 + this.each(function () {
  1168 + var spect = spectrums[$(this).data(dataID)];
  1169 + if (spect) {
  1170 + var method = spect[opts];
  1171 + if (!method) {
  1172 + throw new Error( "Spectrum: no such method: '" + opts + "'" );
  1173 + }
  1174 +
  1175 + if (opts == "get") {
  1176 + returnValue = spect.get();
  1177 + }
  1178 + else if (opts == "container") {
  1179 + returnValue = spect.container;
  1180 + }
  1181 + else if (opts == "option") {
  1182 + returnValue = spect.option.apply(spect, args);
  1183 + }
  1184 + else if (opts == "destroy") {
  1185 + spect.destroy();
  1186 + $(this).removeData(dataID);
  1187 + }
  1188 + else {
  1189 + method.apply(spect, args);
  1190 + }
  1191 + }
  1192 + });
  1193 +
  1194 + return returnValue;
  1195 + }
  1196 +
  1197 + // Initializing a new instance of spectrum
  1198 + return this.spectrum("destroy").each(function () {
  1199 + var options = $.extend({}, $(this).data(), opts);
  1200 + var spect = spectrum(this, options);
  1201 + $(this).data(dataID, spect.id);
  1202 + });
  1203 + };
  1204 +
  1205 + $.fn.spectrum.load = true;
  1206 + $.fn.spectrum.loadOpts = {};
  1207 + $.fn.spectrum.draggable = draggable;
  1208 + $.fn.spectrum.defaults = defaultOpts;
  1209 + $.fn.spectrum.inputTypeColorSupport = function inputTypeColorSupport() {
  1210 + if (typeof inputTypeColorSupport._cachedResult === "undefined") {
  1211 + var colorInput = $("<input type='color'/>")[0]; // if color element is supported, value will default to not null
  1212 + inputTypeColorSupport._cachedResult = colorInput.type === "color" && colorInput.value !== "";
  1213 + }
  1214 + return inputTypeColorSupport._cachedResult;
  1215 + };
  1216 +
  1217 + $.spectrum = { };
  1218 + $.spectrum.localization = { };
  1219 + $.spectrum.palettes = { };
  1220 +
  1221 + $.fn.spectrum.processNativeColorInputs = function () {
  1222 + var colorInputs = $("input[type=color]");
  1223 + if (colorInputs.length && !inputTypeColorSupport()) {
  1224 + colorInputs.spectrum({
  1225 + preferredFormat: "hex6"
  1226 + });
  1227 + }
  1228 + };
  1229 +
  1230 + // TinyColor v1.1.2
  1231 + // https://github.com/bgrins/TinyColor
  1232 + // Brian Grinstead, MIT License
  1233 +
  1234 + (function() {
  1235 +
  1236 + var trimLeft = /^[\s,#]+/,
  1237 + trimRight = /\s+$/,
  1238 + tinyCounter = 0,
  1239 + math = Math,
  1240 + mathRound = math.round,
  1241 + mathMin = math.min,
  1242 + mathMax = math.max,
  1243 + mathRandom = math.random;
  1244 +
  1245 + var tinycolor = function(color, opts) {
  1246 +
  1247 + color = (color) ? color : '';
  1248 + opts = opts || { };
  1249 +
  1250 + // If input is already a tinycolor, return itself
  1251 + if (color instanceof tinycolor) {
  1252 + return color;
  1253 + }
  1254 + // If we are called as a function, call using new instead
  1255 + if (!(this instanceof tinycolor)) {
  1256 + return new tinycolor(color, opts);
  1257 + }
  1258 +
  1259 + var rgb = inputToRGB(color);
  1260 + this._originalInput = color,
  1261 + this._r = rgb.r,
  1262 + this._g = rgb.g,
  1263 + this._b = rgb.b,
  1264 + this._a = rgb.a,
  1265 + this._roundA = mathRound(1000 * this._a) / 1000,
  1266 + this._format = opts.format || rgb.format;
  1267 + this._gradientType = opts.gradientType;
  1268 +
  1269 + // Don't let the range of [0,255] come back in [0,1].
  1270 + // Potentially lose a little bit of precision here, but will fix issues where
  1271 + // .5 gets interpreted as half of the total, instead of half of 1
  1272 + // If it was supposed to be 128, this was already taken care of by `inputToRgb`
  1273 + if (this._r < 1) { this._r = mathRound(this._r); }
  1274 + if (this._g < 1) { this._g = mathRound(this._g); }
  1275 + if (this._b < 1) { this._b = mathRound(this._b); }
  1276 +
  1277 + this._ok = rgb.ok;
  1278 + this._tc_id = tinyCounter++;
  1279 + };
  1280 +
  1281 + tinycolor.prototype = {
  1282 + isDark: function() {
  1283 + return this.getBrightness() < 128;
  1284 + },
  1285 + isLight: function() {
  1286 + return !this.isDark();
  1287 + },
  1288 + isValid: function() {
  1289 + return this._ok;
  1290 + },
  1291 + getOriginalInput: function() {
  1292 + return this._originalInput;
  1293 + },
  1294 + getFormat: function() {
  1295 + return this._format;
  1296 + },
  1297 + getAlpha: function() {
  1298 + return this._a;
  1299 + },
  1300 + getBrightness: function() {
  1301 + var rgb = this.toRgb();
  1302 + return (rgb.r * 299 + rgb.g * 587 + rgb.b * 114) / 1000;
  1303 + },
  1304 + setAlpha: function(value) {
  1305 + this._a = boundAlpha(value);
  1306 + this._roundA = mathRound(1000 * this._a) / 1000;
  1307 + return this;
  1308 + },
  1309 + toHsv: function() {
  1310 + var hsv = rgbToHsv(this._r, this._g, this._b);
  1311 + return { h: hsv.h * 360, s: hsv.s, v: hsv.v, a: this._a };
  1312 + },
  1313 + toHsvString: function() {
  1314 + var hsv = rgbToHsv(this._r, this._g, this._b);
  1315 + var h = mathRound(hsv.h * 360), s = mathRound(hsv.s * 100), v = mathRound(hsv.v * 100);
  1316 + return (this._a == 1) ?
  1317 + "hsv(" + h + ", " + s + "%, " + v + "%)" :
  1318 + "hsva(" + h + ", " + s + "%, " + v + "%, "+ this._roundA + ")";
  1319 + },
  1320 + toHsl: function() {
  1321 + var hsl = rgbToHsl(this._r, this._g, this._b);
  1322 + return { h: hsl.h * 360, s: hsl.s, l: hsl.l, a: this._a };
  1323 + },
  1324 + toHslString: function() {
  1325 + var hsl = rgbToHsl(this._r, this._g, this._b);
  1326 + var h = mathRound(hsl.h * 360), s = mathRound(hsl.s * 100), l = mathRound(hsl.l * 100);
  1327 + return (this._a == 1) ?
  1328 + "hsl(" + h + ", " + s + "%, " + l + "%)" :
  1329 + "hsla(" + h + ", " + s + "%, " + l + "%, "+ this._roundA + ")";
  1330 + },
  1331 + toHex: function(allow3Char) {
  1332 + return rgbToHex(this._r, this._g, this._b, allow3Char);
  1333 + },
  1334 + toHexString: function(allow3Char) {
  1335 + return '#' + this.toHex(allow3Char);
  1336 + },
  1337 + toHex8: function() {
  1338 + return rgbaToHex(this._r, this._g, this._b, this._a);
  1339 + },
  1340 + toHex8String: function() {
  1341 + return '#' + this.toHex8();
  1342 + },
  1343 + toRgb: function() {
  1344 + return { r: mathRound(this._r), g: mathRound(this._g), b: mathRound(this._b), a: this._a };
  1345 + },
  1346 + toRgbString: function() {
  1347 + return (this._a == 1) ?
  1348 + "rgb(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ")" :
  1349 + "rgba(" + mathRound(this._r) + ", " + mathRound(this._g) + ", " + mathRound(this._b) + ", " + this._roundA + ")";
  1350 + },
  1351 + toPercentageRgb: function() {
  1352 + return { r: mathRound(bound01(this._r, 255) * 100) + "%", g: mathRound(bound01(this._g, 255) * 100) + "%", b: mathRound(bound01(this._b, 255) * 100) + "%", a: this._a };
  1353 + },
  1354 + toPercentageRgbString: function() {
  1355 + return (this._a == 1) ?
  1356 + "rgb(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%)" :
  1357 + "rgba(" + mathRound(bound01(this._r, 255) * 100) + "%, " + mathRound(bound01(this._g, 255) * 100) + "%, " + mathRound(bound01(this._b, 255) * 100) + "%, " + this._roundA + ")";
  1358 + },
  1359 + toName: function() {
  1360 + if (this._a === 0) {
  1361 + return "transparent";
  1362 + }
  1363 +
  1364 + if (this._a < 1) {
  1365 + return false;
  1366 + }
  1367 +
  1368 + return hexNames[rgbToHex(this._r, this._g, this._b, true)] || false;
  1369 + },
  1370 + toFilter: function(secondColor) {
  1371 + var hex8String = '#' + rgbaToHex(this._r, this._g, this._b, this._a);
  1372 + var secondHex8String = hex8String;
  1373 + var gradientType = this._gradientType ? "GradientType = 1, " : "";
  1374 +
  1375 + if (secondColor) {
  1376 + var s = tinycolor(secondColor);
  1377 + secondHex8String = s.toHex8String();
  1378 + }
  1379 +
  1380 + return "progid:DXImageTransform.Microsoft.gradient("+gradientType+"startColorstr="+hex8String+",endColorstr="+secondHex8String+")";
  1381 + },
  1382 + toString: function(format) {
  1383 + var formatSet = !!format;
  1384 + format = format || this._format;
  1385 +
  1386 + var formattedString = false;
  1387 + var hasAlpha = this._a < 1 && this._a >= 0;
  1388 + var needsAlphaFormat = !formatSet && hasAlpha && (format === "hex" || format === "hex6" || format === "hex3" || format === "name");
  1389 +
  1390 + if (needsAlphaFormat) {
  1391 + // Special case for "transparent", all other non-alpha formats
  1392 + // will return rgba when there is transparency.
  1393 + if (format === "name" && this._a === 0) {
  1394 + return this.toName();
  1395 + }
  1396 + return this.toRgbString();
  1397 + }
  1398 + if (format === "rgb") {
  1399 + formattedString = this.toRgbString();
  1400 + }
  1401 + if (format === "prgb") {
  1402 + formattedString = this.toPercentageRgbString();
  1403 + }
  1404 + if (format === "hex" || format === "hex6") {
  1405 + formattedString = this.toHexString();
  1406 + }
  1407 + if (format === "hex3") {
  1408 + formattedString = this.toHexString(true);
  1409 + }
  1410 + if (format === "hex8") {
  1411 + formattedString = this.toHex8String();
  1412 + }
  1413 + if (format === "name") {
  1414 + formattedString = this.toName();
  1415 + }
  1416 + if (format === "hsl") {
  1417 + formattedString = this.toHslString();
  1418 + }
  1419 + if (format === "hsv") {
  1420 + formattedString = this.toHsvString();
  1421 + }
  1422 +
  1423 + return formattedString || this.toHexString();
  1424 + },
  1425 +
  1426 + _applyModification: function(fn, args) {
  1427 + var color = fn.apply(null, [this].concat([].slice.call(args)));
  1428 + this._r = color._r;
  1429 + this._g = color._g;
  1430 + this._b = color._b;
  1431 + this.setAlpha(color._a);
  1432 + return this;
  1433 + },
  1434 + lighten: function() {
  1435 + return this._applyModification(lighten, arguments);
  1436 + },
  1437 + brighten: function() {
  1438 + return this._applyModification(brighten, arguments);
  1439 + },
  1440 + darken: function() {
  1441 + return this._applyModification(darken, arguments);
  1442 + },
  1443 + desaturate: function() {
  1444 + return this._applyModification(desaturate, arguments);
  1445 + },
  1446 + saturate: function() {
  1447 + return this._applyModification(saturate, arguments);
  1448 + },
  1449 + greyscale: function() {
  1450 + return this._applyModification(greyscale, arguments);
  1451 + },
  1452 + spin: function() {
  1453 + return this._applyModification(spin, arguments);
  1454 + },
  1455 +
  1456 + _applyCombination: function(fn, args) {
  1457 + return fn.apply(null, [this].concat([].slice.call(args)));
  1458 + },
  1459 + analogous: function() {
  1460 + return this._applyCombination(analogous, arguments);
  1461 + },
  1462 + complement: function() {
  1463 + return this._applyCombination(complement, arguments);
  1464 + },
  1465 + monochromatic: function() {
  1466 + return this._applyCombination(monochromatic, arguments);
  1467 + },
  1468 + splitcomplement: function() {
  1469 + return this._applyCombination(splitcomplement, arguments);
  1470 + },
  1471 + triad: function() {
  1472 + return this._applyCombination(triad, arguments);
  1473 + },
  1474 + tetrad: function() {
  1475 + return this._applyCombination(tetrad, arguments);
  1476 + }
  1477 + };
  1478 +
  1479 + // If input is an object, force 1 into "1.0" to handle ratios properly
  1480 + // String input requires "1.0" as input, so 1 will be treated as 1
  1481 + tinycolor.fromRatio = function(color, opts) {
  1482 + if (typeof color == "object") {
  1483 + var newColor = {};
  1484 + for (var i in color) {
  1485 + if (color.hasOwnProperty(i)) {
  1486 + if (i === "a") {
  1487 + newColor[i] = color[i];
  1488 + }
  1489 + else {
  1490 + newColor[i] = convertToPercentage(color[i]);
  1491 + }
  1492 + }
  1493 + }
  1494 + color = newColor;
  1495 + }
  1496 +
  1497 + return tinycolor(color, opts);
  1498 + };
  1499 +
  1500 + // Given a string or object, convert that input to RGB
  1501 + // Possible string inputs:
  1502 + //
  1503 + // "red"
  1504 + // "#f00" or "f00"
  1505 + // "#ff0000" or "ff0000"
  1506 + // "#ff000000" or "ff000000"
  1507 + // "rgb 255 0 0" or "rgb (255, 0, 0)"
  1508 + // "rgb 1.0 0 0" or "rgb (1, 0, 0)"
  1509 + // "rgba (255, 0, 0, 1)" or "rgba 255, 0, 0, 1"
  1510 + // "rgba (1.0, 0, 0, 1)" or "rgba 1.0, 0, 0, 1"
  1511 + // "hsl(0, 100%, 50%)" or "hsl 0 100% 50%"
  1512 + // "hsla(0, 100%, 50%, 1)" or "hsla 0 100% 50%, 1"
  1513 + // "hsv(0, 100%, 100%)" or "hsv 0 100% 100%"
  1514 + //
  1515 + function inputToRGB(color) {
  1516 +
  1517 + var rgb = { r: 0, g: 0, b: 0 };
  1518 + var a = 1;
  1519 + var ok = false;
  1520 + var format = false;
  1521 +
  1522 + if (typeof color == "string") {
  1523 + color = stringInputToObject(color);
  1524 + }
  1525 +
  1526 + if (typeof color == "object") {
  1527 + if (color.hasOwnProperty("r") && color.hasOwnProperty("g") && color.hasOwnProperty("b")) {
  1528 + rgb = rgbToRgb(color.r, color.g, color.b);
  1529 + ok = true;
  1530 + format = String(color.r).substr(-1) === "%" ? "prgb" : "rgb";
  1531 + }
  1532 + else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("v")) {
  1533 + color.s = convertToPercentage(color.s);
  1534 + color.v = convertToPercentage(color.v);
  1535 + rgb = hsvToRgb(color.h, color.s, color.v);
  1536 + ok = true;
  1537 + format = "hsv";
  1538 + }
  1539 + else if (color.hasOwnProperty("h") && color.hasOwnProperty("s") && color.hasOwnProperty("l")) {
  1540 + color.s = convertToPercentage(color.s);
  1541 + color.l = convertToPercentage(color.l);
  1542 + rgb = hslToRgb(color.h, color.s, color.l);
  1543 + ok = true;
  1544 + format = "hsl";
  1545 + }
  1546 +
  1547 + if (color.hasOwnProperty("a")) {
  1548 + a = color.a;
  1549 + }
  1550 + }
  1551 +
  1552 + a = boundAlpha(a);
  1553 +
  1554 + return {
  1555 + ok: ok,
  1556 + format: color.format || format,
  1557 + r: mathMin(255, mathMax(rgb.r, 0)),
  1558 + g: mathMin(255, mathMax(rgb.g, 0)),
  1559 + b: mathMin(255, mathMax(rgb.b, 0)),
  1560 + a: a
  1561 + };
  1562 + }
  1563 +
  1564 +
  1565 + // Conversion Functions
  1566 + // --------------------
  1567 +
  1568 + // `rgbToHsl`, `rgbToHsv`, `hslToRgb`, `hsvToRgb` modified from:
  1569 + // <http://mjijackson.com/2008/02/rgb-to-hsl-and-rgb-to-hsv-color-model-conversion-algorithms-in-javascript>
  1570 +
  1571 + // `rgbToRgb`
  1572 + // Handle bounds / percentage checking to conform to CSS color spec
  1573 + // <http://www.w3.org/TR/css3-color/>
  1574 + // *Assumes:* r, g, b in [0, 255] or [0, 1]
  1575 + // *Returns:* { r, g, b } in [0, 255]
  1576 + function rgbToRgb(r, g, b){
  1577 + return {
  1578 + r: bound01(r, 255) * 255,
  1579 + g: bound01(g, 255) * 255,
  1580 + b: bound01(b, 255) * 255
  1581 + };
  1582 + }
  1583 +
  1584 + // `rgbToHsl`
  1585 + // Converts an RGB color value to HSL.
  1586 + // *Assumes:* r, g, and b are contained in [0, 255] or [0, 1]
  1587 + // *Returns:* { h, s, l } in [0,1]
  1588 + function rgbToHsl(r, g, b) {
  1589 +
  1590 + r = bound01(r, 255);
  1591 + g = bound01(g, 255);
  1592 + b = bound01(b, 255);
  1593 +
  1594 + var max = mathMax(r, g, b), min = mathMin(r, g, b);
  1595 + var h, s, l = (max + min) / 2;
  1596 +
  1597 + if(max == min) {
  1598 + h = s = 0; // achromatic
  1599 + }
  1600 + else {
  1601 + var d = max - min;
  1602 + s = l > 0.5 ? d / (2 - max - min) : d / (max + min);
  1603 + switch(max) {
  1604 + case r: h = (g - b) / d + (g < b ? 6 : 0); break;
  1605 + case g: h = (b - r) / d + 2; break;
  1606 + case b: h = (r - g) / d + 4; break;
  1607 + }
  1608 +
  1609 + h /= 6;
  1610 + }
  1611 +
  1612 + return { h: h, s: s, l: l };
  1613 + }
  1614 +
  1615 + // `hslToRgb`
  1616 + // Converts an HSL color value to RGB.
  1617 + // *Assumes:* h is contained in [0, 1] or [0, 360] and s and l are contained [0, 1] or [0, 100]
  1618 + // *Returns:* { r, g, b } in the set [0, 255]
  1619 + function hslToRgb(h, s, l) {
  1620 + var r, g, b;
  1621 +
  1622 + h = bound01(h, 360);
  1623 + s = bound01(s, 100);
  1624 + l = bound01(l, 100);
  1625 +
  1626 + function hue2rgb(p, q, t) {
  1627 + if(t < 0) t += 1;
  1628 + if(t > 1) t -= 1;
  1629 + if(t < 1/6) return p + (q - p) * 6 * t;
  1630 + if(t < 1/2) return q;
  1631 + if(t < 2/3) return p + (q - p) * (2/3 - t) * 6;
  1632 + return p;
  1633 + }
  1634 +
  1635 + if(s === 0) {
  1636 + r = g = b = l; // achromatic
  1637 + }
  1638 + else {
  1639 + var q = l < 0.5 ? l * (1 + s) : l + s - l * s;
  1640 + var p = 2 * l - q;
  1641 + r = hue2rgb(p, q, h + 1/3);
  1642 + g = hue2rgb(p, q, h);
  1643 + b = hue2rgb(p, q, h - 1/3);
  1644 + }
  1645 +
  1646 + return { r: r * 255, g: g * 255, b: b * 255 };
  1647 + }
  1648 +
  1649 + // `rgbToHsv`
  1650 + // Converts an RGB color value to HSV
  1651 + // *Assumes:* r, g, and b are contained in the set [0, 255] or [0, 1]
  1652 + // *Returns:* { h, s, v } in [0,1]
  1653 + function rgbToHsv(r, g, b) {
  1654 +
  1655 + r = bound01(r, 255);
  1656 + g = bound01(g, 255);
  1657 + b = bound01(b, 255);
  1658 +
  1659 + var max = mathMax(r, g, b), min = mathMin(r, g, b);
  1660 + var h, s, v = max;
  1661 +
  1662 + var d = max - min;
  1663 + s = max === 0 ? 0 : d / max;
  1664 +
  1665 + if(max == min) {
  1666 + h = 0; // achromatic
  1667 + }
  1668 + else {
  1669 + switch(max) {
  1670 + case r: h = (g - b) / d + (g < b ? 6 : 0); break;
  1671 + case g: h = (b - r) / d + 2; break;
  1672 + case b: h = (r - g) / d + 4; break;
  1673 + }
  1674 + h /= 6;
  1675 + }
  1676 + return { h: h, s: s, v: v };
  1677 + }
  1678 +
  1679 + // `hsvToRgb`
  1680 + // Converts an HSV color value to RGB.
  1681 + // *Assumes:* h is contained in [0, 1] or [0, 360] and s and v are contained in [0, 1] or [0, 100]
  1682 + // *Returns:* { r, g, b } in the set [0, 255]
  1683 + function hsvToRgb(h, s, v) {
  1684 +
  1685 + h = bound01(h, 360) * 6;
  1686 + s = bound01(s, 100);
  1687 + v = bound01(v, 100);
  1688 +
  1689 + var i = math.floor(h),
  1690 + f = h - i,
  1691 + p = v * (1 - s),
  1692 + q = v * (1 - f * s),
  1693 + t = v * (1 - (1 - f) * s),
  1694 + mod = i % 6,
  1695 + r = [v, q, p, p, t, v][mod],
  1696 + g = [t, v, v, q, p, p][mod],
  1697 + b = [p, p, t, v, v, q][mod];
  1698 +
  1699 + return { r: r * 255, g: g * 255, b: b * 255 };
  1700 + }
  1701 +
  1702 + // `rgbToHex`
  1703 + // Converts an RGB color to hex
  1704 + // Assumes r, g, and b are contained in the set [0, 255]
  1705 + // Returns a 3 or 6 character hex
  1706 + function rgbToHex(r, g, b, allow3Char) {
  1707 +
  1708 + var hex = [
  1709 + pad2(mathRound(r).toString(16)),
  1710 + pad2(mathRound(g).toString(16)),
  1711 + pad2(mathRound(b).toString(16))
  1712 + ];
  1713 +
  1714 + // Return a 3 character hex if possible
  1715 + if (allow3Char && hex[0].charAt(0) == hex[0].charAt(1) && hex[1].charAt(0) == hex[1].charAt(1) && hex[2].charAt(0) == hex[2].charAt(1)) {
  1716 + return hex[0].charAt(0) + hex[1].charAt(0) + hex[2].charAt(0);
  1717 + }
  1718 +
  1719 + return hex.join("");
  1720 + }
  1721 + // `rgbaToHex`
  1722 + // Converts an RGBA color plus alpha transparency to hex
  1723 + // Assumes r, g, b and a are contained in the set [0, 255]
  1724 + // Returns an 8 character hex
  1725 + function rgbaToHex(r, g, b, a) {
  1726 +
  1727 + var hex = [
  1728 + pad2(convertDecimalToHex(a)),
  1729 + pad2(mathRound(r).toString(16)),
  1730 + pad2(mathRound(g).toString(16)),
  1731 + pad2(mathRound(b).toString(16))
  1732 + ];
  1733 +
  1734 + return hex.join("");
  1735 + }
  1736 +
  1737 + // `equals`
  1738 + // Can be called with any tinycolor input
  1739 + tinycolor.equals = function (color1, color2) {
  1740 + if (!color1 || !color2) { return false; }
  1741 + return tinycolor(color1).toRgbString() == tinycolor(color2).toRgbString();
  1742 + };
  1743 + tinycolor.random = function() {
  1744 + return tinycolor.fromRatio({
  1745 + r: mathRandom(),
  1746 + g: mathRandom(),
  1747 + b: mathRandom()
  1748 + });
  1749 + };
  1750 +
  1751 +
  1752 + // Modification Functions
  1753 + // ----------------------
  1754 + // Thanks to less.js for some of the basics here
  1755 + // <https://github.com/cloudhead/less.js/blob/master/lib/less/functions.js>
  1756 +
  1757 + function desaturate(color, amount) {
  1758 + amount = (amount === 0) ? 0 : (amount || 10);
  1759 + var hsl = tinycolor(color).toHsl();
  1760 + hsl.s -= amount / 100;
  1761 + hsl.s = clamp01(hsl.s);
  1762 + return tinycolor(hsl);
  1763 + }
  1764 +
  1765 + function saturate(color, amount) {
  1766 + amount = (amount === 0) ? 0 : (amount || 10);
  1767 + var hsl = tinycolor(color).toHsl();
  1768 + hsl.s += amount / 100;
  1769 + hsl.s = clamp01(hsl.s);
  1770 + return tinycolor(hsl);
  1771 + }
  1772 +
  1773 + function greyscale(color) {
  1774 + return tinycolor(color).desaturate(100);
  1775 + }
  1776 +
  1777 + function lighten (color, amount) {
  1778 + amount = (amount === 0) ? 0 : (amount || 10);
  1779 + var hsl = tinycolor(color).toHsl();
  1780 + hsl.l += amount / 100;
  1781 + hsl.l = clamp01(hsl.l);
  1782 + return tinycolor(hsl);
  1783 + }
  1784 +
  1785 + function brighten(color, amount) {
  1786 + amount = (amount === 0) ? 0 : (amount || 10);
  1787 + var rgb = tinycolor(color).toRgb();
  1788 + rgb.r = mathMax(0, mathMin(255, rgb.r - mathRound(255 * - (amount / 100))));
  1789 + rgb.g = mathMax(0, mathMin(255, rgb.g - mathRound(255 * - (amount / 100))));
  1790 + rgb.b = mathMax(0, mathMin(255, rgb.b - mathRound(255 * - (amount / 100))));
  1791 + return tinycolor(rgb);
  1792 + }
  1793 +
  1794 + function darken (color, amount) {
  1795 + amount = (amount === 0) ? 0 : (amount || 10);
  1796 + var hsl = tinycolor(color).toHsl();
  1797 + hsl.l -= amount / 100;
  1798 + hsl.l = clamp01(hsl.l);
  1799 + return tinycolor(hsl);
  1800 + }
  1801 +
  1802 + // Spin takes a positive or negative amount within [-360, 360] indicating the change of hue.
  1803 + // Values outside of this range will be wrapped into this range.
  1804 + function spin(color, amount) {
  1805 + var hsl = tinycolor(color).toHsl();
  1806 + var hue = (mathRound(hsl.h) + amount) % 360;
  1807 + hsl.h = hue < 0 ? 360 + hue : hue;
  1808 + return tinycolor(hsl);
  1809 + }
  1810 +
  1811 + // Combination Functions
  1812 + // ---------------------
  1813 + // Thanks to jQuery xColor for some of the ideas behind these
  1814 + // <https://github.com/infusion/jQuery-xcolor/blob/master/jquery.xcolor.js>
  1815 +
  1816 + function complement(color) {
  1817 + var hsl = tinycolor(color).toHsl();
  1818 + hsl.h = (hsl.h + 180) % 360;
  1819 + return tinycolor(hsl);
  1820 + }
  1821 +
  1822 + function triad(color) {
  1823 + var hsl = tinycolor(color).toHsl();
  1824 + var h = hsl.h;
  1825 + return [
  1826 + tinycolor(color),
  1827 + tinycolor({ h: (h + 120) % 360, s: hsl.s, l: hsl.l }),
  1828 + tinycolor({ h: (h + 240) % 360, s: hsl.s, l: hsl.l })
  1829 + ];
  1830 + }
  1831 +
  1832 + function tetrad(color) {
  1833 + var hsl = tinycolor(color).toHsl();
  1834 + var h = hsl.h;
  1835 + return [
  1836 + tinycolor(color),
  1837 + tinycolor({ h: (h + 90) % 360, s: hsl.s, l: hsl.l }),
  1838 + tinycolor({ h: (h + 180) % 360, s: hsl.s, l: hsl.l }),
  1839 + tinycolor({ h: (h + 270) % 360, s: hsl.s, l: hsl.l })
  1840 + ];
  1841 + }
  1842 +
  1843 + function splitcomplement(color) {
  1844 + var hsl = tinycolor(color).toHsl();
  1845 + var h = hsl.h;
  1846 + return [
  1847 + tinycolor(color),
  1848 + tinycolor({ h: (h + 72) % 360, s: hsl.s, l: hsl.l}),
  1849 + tinycolor({ h: (h + 216) % 360, s: hsl.s, l: hsl.l})
  1850 + ];
  1851 + }
  1852 +
  1853 + function analogous(color, results, slices) {
  1854 + results = results || 6;
  1855 + slices = slices || 30;
  1856 +
  1857 + var hsl = tinycolor(color).toHsl();
  1858 + var part = 360 / slices;
  1859 + var ret = [tinycolor(color)];
  1860 +
  1861 + for (hsl.h = ((hsl.h - (part * results >> 1)) + 720) % 360; --results; ) {
  1862 + hsl.h = (hsl.h + part) % 360;
  1863 + ret.push(tinycolor(hsl));
  1864 + }
  1865 + return ret;
  1866 + }
  1867 +
  1868 + function monochromatic(color, results) {
  1869 + results = results || 6;
  1870 + var hsv = tinycolor(color).toHsv();
  1871 + var h = hsv.h, s = hsv.s, v = hsv.v;
  1872 + var ret = [];
  1873 + var modification = 1 / results;
  1874 +
  1875 + while (results--) {
  1876 + ret.push(tinycolor({ h: h, s: s, v: v}));
  1877 + v = (v + modification) % 1;
  1878 + }
  1879 +
  1880 + return ret;
  1881 + }
  1882 +
  1883 + // Utility Functions
  1884 + // ---------------------
  1885 +
  1886 + tinycolor.mix = function(color1, color2, amount) {
  1887 + amount = (amount === 0) ? 0 : (amount || 50);
  1888 +
  1889 + var rgb1 = tinycolor(color1).toRgb();
  1890 + var rgb2 = tinycolor(color2).toRgb();
  1891 +
  1892 + var p = amount / 100;
  1893 + var w = p * 2 - 1;
  1894 + var a = rgb2.a - rgb1.a;
  1895 +
  1896 + var w1;
  1897 +
  1898 + if (w * a == -1) {
  1899 + w1 = w;
  1900 + } else {
  1901 + w1 = (w + a) / (1 + w * a);
  1902 + }
  1903 +
  1904 + w1 = (w1 + 1) / 2;
  1905 +
  1906 + var w2 = 1 - w1;
  1907 +
  1908 + var rgba = {
  1909 + r: rgb2.r * w1 + rgb1.r * w2,
  1910 + g: rgb2.g * w1 + rgb1.g * w2,
  1911 + b: rgb2.b * w1 + rgb1.b * w2,
  1912 + a: rgb2.a * p + rgb1.a * (1 - p)
  1913 + };
  1914 +
  1915 + return tinycolor(rgba);
  1916 + };
  1917 +
  1918 +
  1919 + // Readability Functions
  1920 + // ---------------------
  1921 + // <http://www.w3.org/TR/AERT#color-contrast>
  1922 +
  1923 + // `readability`
  1924 + // Analyze the 2 colors and returns an object with the following properties:
  1925 + // `brightness`: difference in brightness between the two colors
  1926 + // `color`: difference in color/hue between the two colors
  1927 + tinycolor.readability = function(color1, color2) {
  1928 + var c1 = tinycolor(color1);
  1929 + var c2 = tinycolor(color2);
  1930 + var rgb1 = c1.toRgb();
  1931 + var rgb2 = c2.toRgb();
  1932 + var brightnessA = c1.getBrightness();
  1933 + var brightnessB = c2.getBrightness();
  1934 + var colorDiff = (
  1935 + Math.max(rgb1.r, rgb2.r) - Math.min(rgb1.r, rgb2.r) +
  1936 + Math.max(rgb1.g, rgb2.g) - Math.min(rgb1.g, rgb2.g) +
  1937 + Math.max(rgb1.b, rgb2.b) - Math.min(rgb1.b, rgb2.b)
  1938 + );
  1939 +
  1940 + return {
  1941 + brightness: Math.abs(brightnessA - brightnessB),
  1942 + color: colorDiff
  1943 + };
  1944 + };
  1945 +
  1946 + // `readable`
  1947 + // http://www.w3.org/TR/AERT#color-contrast
  1948 + // Ensure that foreground and background color combinations provide sufficient contrast.
  1949 + // *Example*
  1950 + // tinycolor.isReadable("#000", "#111") => false
  1951 + tinycolor.isReadable = function(color1, color2) {
  1952 + var readability = tinycolor.readability(color1, color2);
  1953 + return readability.brightness > 125 && readability.color > 500;
  1954 + };
  1955 +
  1956 + // `mostReadable`
  1957 + // Given a base color and a list of possible foreground or background
  1958 + // colors for that base, returns the most readable color.
  1959 + // *Example*
  1960 + // tinycolor.mostReadable("#123", ["#fff", "#000"]) => "#000"
  1961 + tinycolor.mostReadable = function(baseColor, colorList) {
  1962 + var bestColor = null;
  1963 + var bestScore = 0;
  1964 + var bestIsReadable = false;
  1965 + for (var i=0; i < colorList.length; i++) {
  1966 +
  1967 + // We normalize both around the "acceptable" breaking point,
  1968 + // but rank brightness constrast higher than hue.
  1969 +
  1970 + var readability = tinycolor.readability(baseColor, colorList[i]);
  1971 + var readable = readability.brightness > 125 && readability.color > 500;
  1972 + var score = 3 * (readability.brightness / 125) + (readability.color / 500);
  1973 +
  1974 + if ((readable && ! bestIsReadable) ||
  1975 + (readable && bestIsReadable && score > bestScore) ||
  1976 + ((! readable) && (! bestIsReadable) && score > bestScore)) {
  1977 + bestIsReadable = readable;
  1978 + bestScore = score;
  1979 + bestColor = tinycolor(colorList[i]);
  1980 + }
  1981 + }
  1982 + return bestColor;
  1983 + };
  1984 +
  1985 +
  1986 + // Big List of Colors
  1987 + // ------------------
  1988 + // <http://www.w3.org/TR/css3-color/#svg-color>
  1989 + var names = tinycolor.names = {
  1990 + aliceblue: "f0f8ff",
  1991 + antiquewhite: "faebd7",
  1992 + aqua: "0ff",
  1993 + aquamarine: "7fffd4",
  1994 + azure: "f0ffff",
  1995 + beige: "f5f5dc",
  1996 + bisque: "ffe4c4",
  1997 + black: "000",
  1998 + blanchedalmond: "ffebcd",
  1999 + blue: "00f",
  2000 + blueviolet: "8a2be2",
  2001 + brown: "a52a2a",
  2002 + burlywood: "deb887",
  2003 + burntsienna: "ea7e5d",
  2004 + cadetblue: "5f9ea0",
  2005 + chartreuse: "7fff00",
  2006 + chocolate: "d2691e",
  2007 + coral: "ff7f50",
  2008 + cornflowerblue: "6495ed",
  2009 + cornsilk: "fff8dc",
  2010 + crimson: "dc143c",
  2011 + cyan: "0ff",
  2012 + darkblue: "00008b",
  2013 + darkcyan: "008b8b",
  2014 + darkgoldenrod: "b8860b",
  2015 + darkgray: "a9a9a9",
  2016 + darkgreen: "006400",
  2017 + darkgrey: "a9a9a9",
  2018 + darkkhaki: "bdb76b",
  2019 + darkmagenta: "8b008b",
  2020 + darkolivegreen: "556b2f",
  2021 + darkorange: "ff8c00",
  2022 + darkorchid: "9932cc",
  2023 + darkred: "8b0000",
  2024 + darksalmon: "e9967a",
  2025 + darkseagreen: "8fbc8f",
  2026 + darkslateblue: "483d8b",
  2027 + darkslategray: "2f4f4f",
  2028 + darkslategrey: "2f4f4f",
  2029 + darkturquoise: "00ced1",
  2030 + darkviolet: "9400d3",
  2031 + deeppink: "ff1493",
  2032 + deepskyblue: "00bfff",
  2033 + dimgray: "696969",
  2034 + dimgrey: "696969",
  2035 + dodgerblue: "1e90ff",
  2036 + firebrick: "b22222",
  2037 + floralwhite: "fffaf0",
  2038 + forestgreen: "228b22",
  2039 + fuchsia: "f0f",
  2040 + gainsboro: "dcdcdc",
  2041 + ghostwhite: "f8f8ff",
  2042 + gold: "ffd700",
  2043 + goldenrod: "daa520",
  2044 + gray: "808080",
  2045 + green: "008000",
  2046 + greenyellow: "adff2f",
  2047 + grey: "808080",
  2048 + honeydew: "f0fff0",
  2049 + hotpink: "ff69b4",
  2050 + indianred: "cd5c5c",
  2051 + indigo: "4b0082",
  2052 + ivory: "fffff0",
  2053 + khaki: "f0e68c",
  2054 + lavender: "e6e6fa",
  2055 + lavenderblush: "fff0f5",
  2056 + lawngreen: "7cfc00",
  2057 + lemonchiffon: "fffacd",
  2058 + lightblue: "add8e6",
  2059 + lightcoral: "f08080",
  2060 + lightcyan: "e0ffff",
  2061 + lightgoldenrodyellow: "fafad2",
  2062 + lightgray: "d3d3d3",
  2063 + lightgreen: "90ee90",
  2064 + lightgrey: "d3d3d3",
  2065 + lightpink: "ffb6c1",
  2066 + lightsalmon: "ffa07a",
  2067 + lightseagreen: "20b2aa",
  2068 + lightskyblue: "87cefa",
  2069 + lightslategray: "789",
  2070 + lightslategrey: "789",
  2071 + lightsteelblue: "b0c4de",
  2072 + lightyellow: "ffffe0",
  2073 + lime: "0f0",
  2074 + limegreen: "32cd32",
  2075 + linen: "faf0e6",
  2076 + magenta: "f0f",
  2077 + maroon: "800000",
  2078 + mediumaquamarine: "66cdaa",
  2079 + mediumblue: "0000cd",
  2080 + mediumorchid: "ba55d3",
  2081 + mediumpurple: "9370db",
  2082 + mediumseagreen: "3cb371",
  2083 + mediumslateblue: "7b68ee",
  2084 + mediumspringgreen: "00fa9a",
  2085 + mediumturquoise: "48d1cc",
  2086 + mediumvioletred: "c71585",
  2087 + midnightblue: "191970",
  2088 + mintcream: "f5fffa",
  2089 + mistyrose: "ffe4e1",
  2090 + moccasin: "ffe4b5",
  2091 + navajowhite: "ffdead",
  2092 + navy: "000080",
  2093 + oldlace: "fdf5e6",
  2094 + olive: "808000",
  2095 + olivedrab: "6b8e23",
  2096 + orange: "ffa500",
  2097 + orangered: "ff4500",
  2098 + orchid: "da70d6",
  2099 + palegoldenrod: "eee8aa",
  2100 + palegreen: "98fb98",
  2101 + paleturquoise: "afeeee",
  2102 + palevioletred: "db7093",
  2103 + papayawhip: "ffefd5",
  2104 + peachpuff: "ffdab9",
  2105 + peru: "cd853f",
  2106 + pink: "ffc0cb",
  2107 + plum: "dda0dd",
  2108 + powderblue: "b0e0e6",
  2109 + purple: "800080",
  2110 + rebeccapurple: "663399",
  2111 + red: "f00",
  2112 + rosybrown: "bc8f8f",
  2113 + royalblue: "4169e1",
  2114 + saddlebrown: "8b4513",
  2115 + salmon: "fa8072",
  2116 + sandybrown: "f4a460",
  2117 + seagreen: "2e8b57",
  2118 + seashell: "fff5ee",
  2119 + sienna: "a0522d",
  2120 + silver: "c0c0c0",
  2121 + skyblue: "87ceeb",
  2122 + slateblue: "6a5acd",
  2123 + slategray: "708090",
  2124 + slategrey: "708090",
  2125 + snow: "fffafa",
  2126 + springgreen: "00ff7f",
  2127 + steelblue: "4682b4",
  2128 + tan: "d2b48c",
  2129 + teal: "008080",
  2130 + thistle: "d8bfd8",
  2131 + tomato: "ff6347",
  2132 + turquoise: "40e0d0",
  2133 + violet: "ee82ee",
  2134 + wheat: "f5deb3",
  2135 + white: "fff",
  2136 + whitesmoke: "f5f5f5",
  2137 + yellow: "ff0",
  2138 + yellowgreen: "9acd32"
  2139 + };
  2140 +
  2141 + // Make it easy to access colors via `hexNames[hex]`
  2142 + var hexNames = tinycolor.hexNames = flip(names);
  2143 +
  2144 +
  2145 + // Utilities
  2146 + // ---------
  2147 +
  2148 + // `{ 'name1': 'val1' }` becomes `{ 'val1': 'name1' }`
  2149 + function flip(o) {
  2150 + var flipped = { };
  2151 + for (var i in o) {
  2152 + if (o.hasOwnProperty(i)) {
  2153 + flipped[o[i]] = i;
  2154 + }
  2155 + }
  2156 + return flipped;
  2157 + }
  2158 +
  2159 + // Return a valid alpha value [0,1] with all invalid values being set to 1
  2160 + function boundAlpha(a) {
  2161 + a = parseFloat(a);
  2162 +
  2163 + if (isNaN(a) || a < 0 || a > 1) {
  2164 + a = 1;
  2165 + }
  2166 +
  2167 + return a;
  2168 + }
  2169 +
  2170 + // Take input from [0, n] and return it as [0, 1]
  2171 + function bound01(n, max) {
  2172 + if (isOnePointZero(n)) { n = "100%"; }
  2173 +
  2174 + var processPercent = isPercentage(n);
  2175 + n = mathMin(max, mathMax(0, parseFloat(n)));
  2176 +
  2177 + // Automatically convert percentage into number
  2178 + if (processPercent) {
  2179 + n = parseInt(n * max, 10) / 100;
  2180 + }
  2181 +
  2182 + // Handle floating point rounding errors
  2183 + if ((math.abs(n - max) < 0.000001)) {
  2184 + return 1;
  2185 + }
  2186 +
  2187 + // Convert into [0, 1] range if it isn't already
  2188 + return (n % max) / parseFloat(max);
  2189 + }
  2190 +
  2191 + // Force a number between 0 and 1
  2192 + function clamp01(val) {
  2193 + return mathMin(1, mathMax(0, val));
  2194 + }
  2195 +
  2196 + // Parse a base-16 hex value into a base-10 integer
  2197 + function parseIntFromHex(val) {
  2198 + return parseInt(val, 16);
  2199 + }
  2200 +
  2201 + // Need to handle 1.0 as 100%, since once it is a number, there is no difference between it and 1
  2202 + // <http://stackoverflow.com/questions/7422072/javascript-how-to-detect-number-as-a-decimal-including-1-0>
  2203 + function isOnePointZero(n) {
  2204 + return typeof n == "string" && n.indexOf('.') != -1 && parseFloat(n) === 1;
  2205 + }
  2206 +
  2207 + // Check to see if string passed in is a percentage
  2208 + function isPercentage(n) {
  2209 + return typeof n === "string" && n.indexOf('%') != -1;
  2210 + }
  2211 +
  2212 + // Force a hex value to have 2 characters
  2213 + function pad2(c) {
  2214 + return c.length == 1 ? '0' + c : '' + c;
  2215 + }
  2216 +
  2217 + // Replace a decimal with it's percentage value
  2218 + function convertToPercentage(n) {
  2219 + if (n <= 1) {
  2220 + n = (n * 100) + "%";
  2221 + }
  2222 +
  2223 + return n;
  2224 + }
  2225 +
  2226 + // Converts a decimal to a hex value
  2227 + function convertDecimalToHex(d) {
  2228 + return Math.round(parseFloat(d) * 255).toString(16);
  2229 + }
  2230 + // Converts a hex value to a decimal
  2231 + function convertHexToDecimal(h) {
  2232 + return (parseIntFromHex(h) / 255);
  2233 + }
  2234 +
  2235 + var matchers = (function() {
  2236 +
  2237 + // <http://www.w3.org/TR/css3-values/#integers>
  2238 + var CSS_INTEGER = "[-\\+]?\\d+%?";
  2239 +
  2240 + // <http://www.w3.org/TR/css3-values/#number-value>
  2241 + var CSS_NUMBER = "[-\\+]?\\d*\\.\\d+%?";
  2242 +
  2243 + // Allow positive/negative integer/number. Don't capture the either/or, just the entire outcome.
  2244 + var CSS_UNIT = "(?:" + CSS_NUMBER + ")|(?:" + CSS_INTEGER + ")";
  2245 +
  2246 + // Actual matching.
  2247 + // Parentheses and commas are optional, but not required.
  2248 + // Whitespace can take the place of commas or opening paren
  2249 + var PERMISSIVE_MATCH3 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
  2250 + var PERMISSIVE_MATCH4 = "[\\s|\\(]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")[,|\\s]+(" + CSS_UNIT + ")\\s*\\)?";
  2251 +
  2252 + return {
  2253 + rgb: new RegExp("rgb" + PERMISSIVE_MATCH3),
  2254 + rgba: new RegExp("rgba" + PERMISSIVE_MATCH4),
  2255 + hsl: new RegExp("hsl" + PERMISSIVE_MATCH3),
  2256 + hsla: new RegExp("hsla" + PERMISSIVE_MATCH4),
  2257 + hsv: new RegExp("hsv" + PERMISSIVE_MATCH3),
  2258 + hsva: new RegExp("hsva" + PERMISSIVE_MATCH4),
  2259 + hex3: /^([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,
  2260 + hex6: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,
  2261 + hex8: /^([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/
  2262 + };
  2263 + })();
  2264 +
  2265 + // `stringInputToObject`
  2266 + // Permissive string parsing. Take in a number of formats, and output an object
  2267 + // based on detected format. Returns `{ r, g, b }` or `{ h, s, l }` or `{ h, s, v}`
  2268 + function stringInputToObject(color) {
  2269 +
  2270 + color = color.replace(trimLeft,'').replace(trimRight, '').toLowerCase();
  2271 + var named = false;
  2272 + if (names[color]) {
  2273 + color = names[color];
  2274 + named = true;
  2275 + }
  2276 + else if (color == 'transparent') {
  2277 + return { r: 0, g: 0, b: 0, a: 0, format: "name" };
  2278 + }
  2279 +
  2280 + // Try to match string input using regular expressions.
  2281 + // Keep most of the number bounding out of this function - don't worry about [0,1] or [0,100] or [0,360]
  2282 + // Just return an object and let the conversion functions handle that.
  2283 + // This way the result will be the same whether the tinycolor is initialized with string or object.
  2284 + var match;
  2285 + if ((match = matchers.rgb.exec(color))) {
  2286 + return { r: match[1], g: match[2], b: match[3] };
  2287 + }
  2288 + if ((match = matchers.rgba.exec(color))) {
  2289 + return { r: match[1], g: match[2], b: match[3], a: match[4] };
  2290 + }
  2291 + if ((match = matchers.hsl.exec(color))) {
  2292 + return { h: match[1], s: match[2], l: match[3] };
  2293 + }
  2294 + if ((match = matchers.hsla.exec(color))) {
  2295 + return { h: match[1], s: match[2], l: match[3], a: match[4] };
  2296 + }
  2297 + if ((match = matchers.hsv.exec(color))) {
  2298 + return { h: match[1], s: match[2], v: match[3] };
  2299 + }
  2300 + if ((match = matchers.hsva.exec(color))) {
  2301 + return { h: match[1], s: match[2], v: match[3], a: match[4] };
  2302 + }
  2303 + if ((match = matchers.hex8.exec(color))) {
  2304 + return {
  2305 + a: convertHexToDecimal(match[1]),
  2306 + r: parseIntFromHex(match[2]),
  2307 + g: parseIntFromHex(match[3]),
  2308 + b: parseIntFromHex(match[4]),
  2309 + format: named ? "name" : "hex8"
  2310 + };
  2311 + }
  2312 + if ((match = matchers.hex6.exec(color))) {
  2313 + return {
  2314 + r: parseIntFromHex(match[1]),
  2315 + g: parseIntFromHex(match[2]),
  2316 + b: parseIntFromHex(match[3]),
  2317 + format: named ? "name" : "hex"
  2318 + };
  2319 + }
  2320 + if ((match = matchers.hex3.exec(color))) {
  2321 + return {
  2322 + r: parseIntFromHex(match[1] + '' + match[1]),
  2323 + g: parseIntFromHex(match[2] + '' + match[2]),
  2324 + b: parseIntFromHex(match[3] + '' + match[3]),
  2325 + format: named ? "name" : "hex"
  2326 + };
  2327 + }
  2328 +
  2329 + return false;
  2330 + }
  2331 +
  2332 + window.tinycolor = tinycolor;
  2333 + })();
  2334 +
  2335 + $(function () {
  2336 + if ($.fn.spectrum.load) {
  2337 + $.fn.spectrum.processNativeColorInputs();
  2338 + }
  2339 + });
  2340 +
  2341 +});
... ...
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/form-advanced.gradient.min.css 0 → 100644
  1 +/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
  2 +.uk-form input[type=radio],.uk-form input[type=checkbox]{display:inline-block;height:14px;width:14px;border:1px solid #aaa;overflow:hidden;margin-top:-4px;vertical-align:middle;-webkit-appearance:none;outline:0;background:0 0}.uk-form input[type=radio]{border-radius:50%}.uk-form input[type=checkbox]:before,.uk-form input[type=radio]:before{display:block}.uk-form input[type=radio]:checked:before{content:'';width:8px;height:8px;margin:2px auto 0;border-radius:50%;background:#00a8e6}.uk-form input[type=checkbox]:checked:before,.uk-form input[type=checkbox]:indeterminate:before{content:"\f00c";font-family:FontAwesome;font-size:12px;-webkit-font-smoothing:antialiased;text-align:center;line-height:12px;color:#00a8e6}.uk-form input[type=checkbox]:indeterminate:before{content:"\f068"}.uk-form input[type=checkbox]:disabled,.uk-form input[type=radio]:disabled{border-color:#ddd}.uk-form input[type=radio]:disabled:checked:before{background-color:#aaa}.uk-form input[type=checkbox]:disabled:checked:before,.uk-form input[type=checkbox]:disabled:indeterminate:before{color:#aaa}
0 3 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/css/line_schedule.css
... ... @@ -101,11 +101,11 @@
101 101 }
102 102  
103 103 .line-schedule-table dl dt:nth-of-type(5), .line-schedule-table dl dd:nth-of-type(5) {
104   - width: 11%;
  104 + width: 10%;
105 105 }
106 106  
107 107 .line-schedule-table dl dt:nth-of-type(6), .line-schedule-table dl dd:nth-of-type(6) {
108   - width: calc(15% + 8px);
  108 + width: calc(13% + 18px);
109 109 /*color: #676767;*/
110 110 }
111 111  
... ... @@ -114,7 +114,7 @@
114 114 }
115 115  
116 116 .line-schedule-table dl dt:nth-of-type(8), .line-schedule-table dl dd:nth-of-type(8) {
117   - width: calc(48% - 228px);
  117 + width: calc(51% - 238px);
118 118 }
119 119  
120 120 .line-schedule-table dl dt:nth-of-type(9), .line-schedule-table dl dd:nth-of-type(9) {
... ... @@ -253,7 +253,7 @@ span.fcsj-diff {
253 253 }
254 254  
255 255 .tl-wd{
256   - background: #e2e2a0;
  256 + background: #caca4f;
257 257 }
258 258  
259 259 .tl-xxsd{
... ... @@ -827,4 +827,23 @@ input.i-cbox[type=checkbox]{
827 827  
828 828 .qtip.sch-tl-tip{
829 829 max-width: 335px;
  830 +}
  831 +
  832 +.sfsj-sch-detail{
  833 + list-style: none;
  834 + padding: 5px 0px;
  835 + margin-bottom: 3px;
  836 +}
  837 +.sfsj-sch-detail li{
  838 + font-size: 14px;
  839 + line-height: 24px;
  840 +}
  841 +
  842 +.sfsj-sch-detail li span{
  843 + display: inline-block;
  844 + width: 65px;
  845 + text-align: right;
  846 + color: #bab6b6;
  847 + font-family: 微软雅黑;
  848 + font-size: 13px;
830 849 }
831 850 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/css/main.css
... ... @@ -140,8 +140,9 @@ svg.line-chart path.station_link.down {
140 140  
141 141 svg.line-chart text.station_text {
142 142 writing-mode: tb;
143   - fill: #676767;
144   - text-shadow: 1px 1px 1px #e0e0e0;
  143 + fill: #3e3e3e;
  144 + letter-spacing: -.2px;
  145 + text-shadow: 0 0 2px #dadada;
145 146 }
146 147  
147 148 svg.line-chart text.station_text.up {
... ... @@ -165,17 +166,19 @@ svg.line-chart g.item:nth-last-child(3)&gt;text {
165 166 svg.line-chart g.gps-wrap>rect {
166 167 width: 28px;
167 168 height: 24px;
168   - fill: #fff;
169   - rx: 5px;
  169 + /*fill: #fff;*/
  170 + rx: 4px;
170 171 cursor: pointer;
171 172 }
172 173  
173 174 svg.line-chart g.gps-wrap>rect[updown="0"] {
174   - stroke: #5e96d2;
  175 + stroke: rgb(62, 80, 179);
  176 + fill: rgb(62, 80, 179);
175 177 }
176 178  
177 179 svg.line-chart g.gps-wrap>rect[updown="1"] {
178   - stroke: #c92121;
  180 + stroke: #c94f21;
  181 + fill: #c94f21;
179 182 }
180 183  
181 184 svg.line-chart g.gps-wrap>rect.hover {
... ... @@ -189,11 +192,11 @@ svg.line-chart g.gps-wrap&gt;text {
189 192 }
190 193  
191 194 svg.line-chart g.gps-wrap>text[updown="0"] {
192   - fill: #5e96d2;
  195 + fill: #fff;
193 196 }
194 197  
195 198 svg.line-chart g.gps-wrap>text[updown="1"] {
196   - fill: #c92121;
  199 + fill: #fff;
197 200 }
198 201  
199 202 svg.line-chart .merge_hide {
... ... @@ -204,8 +207,11 @@ svg.line-chart g.merge-item rect {
204 207 width: 24px;
205 208 height: 24px;
206 209 rx: 15px;
207   - fill: rgb(62, 80, 179);
  210 + fill: #19a53a;
208 211 cursor: pointer;
  212 + stroke: #19a53a;
  213 + stroke-dasharray: 1,2;
  214 + stroke-width: 3px;
209 215 }
210 216  
211 217 svg.line-chart g.merge-item text {
... ...
src/main/resources/static/real_control_v2/css/north.css
1 1 .north {
2   - background: linear-gradient(to right ,#595959, #7b7b7b,#595959);
3 2 height: 120px;
4 3 position: relative;
5 4 transition: all .3s ease;
... ... @@ -9,6 +8,10 @@
9 8 background: linear-gradient(to right, #082F4A, #125688, #0a3f64);
10 9 }
11 10  
  11 +.north.monitor{
  12 + background: linear-gradient(to right ,#595959, #7b7b7b,#595959);
  13 +}
  14 +
12 15 .north.scok-colse {
13 16 background: linear-gradient(to right, #924040, #ce6262, #924040) !important;
14 17 }
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/sch_table.html
... ... @@ -67,15 +67,15 @@
67 67 </dd>
68 68 <dd data-sort-val={{sch.dfsjT}} dbclick dbclick-type="dfsj" dbclick-val="{{sch.dfsj}}">{{sch.dfsj}}</dd>
69 69 <dd class="
70   - {{if sch.status==-1}}
71   - tl-qrlb
72   - {{else if sch.status==2}}
73   - tl-yzx
74   - {{else if sch.status==1}}
75   - tl-zzzx
76   - {{else if sch.status == 0 && sch.late}}
77   - tl-wd
78   - {{/if}}">
  70 + {{if sch.status==-1}}
  71 + tl-qrlb
  72 + {{else if sch.status==2}}
  73 + tl-yzx
  74 + {{else if sch.status==1}}
  75 + tl-zzzx
  76 + {{else if sch.status == 0 && sch.late}}
  77 + tl-wd
  78 + {{/if}} fcsjActualCell" >
79 79 {{sch.fcsjActual}}<span class="fcsj-diff">{{sch.fcsj_diff}}</span>
80 80 </dd>
81 81 <dd data-uk-observe>
... ... @@ -111,19 +111,19 @@
111 111 </dd>
112 112 </script>
113 113  
114   -<script id="line-schedule-sfsj-temp" type="text/html">
115   -<dd class="
116   -{{if status==-1}}
117   - tl-qrlb
118   -{{else if status==2}}
119   - tl-yzx
120   -{{else if status==1}}
121   - tl-zzzx
122   -{{else if status == 0 && late}}
123   - tl-wd
124   -{{/if}}">
125   - {{fcsjActual}}<span class="fcsj-diff">{{fcsj_diff}}</span>
126   - </dd>
  114 + <script id="line-schedule-sfsj-temp" type="text/html">
  115 + <dd class="
  116 + {{if status==-1}}
  117 + tl-qrlb
  118 + {{else if status==2}}
  119 + tl-yzx
  120 + {{else if status==1}}
  121 + tl-zzzx
  122 + {{else if status == 0 && late}}
  123 + tl-wd
  124 + {{/if}}">
  125 + {{fcsjActual}}<span class="fcsj-diff">{{fcsj_diff}}</span>
  126 + </dd>
127 127 </script>
128 128  
129 129 <script id="line-schedule-nbbm-temp" type="text/html">
... ... @@ -132,4 +132,18 @@
132 132 {{clZbh}}
133 133 </dd>
134 134 </script>
  135 +
  136 + <script id="sfsj_sch-detail-temp" type="text/html">
  137 + <ul class="sfsj-sch-detail">
  138 + <li><span>路牌:</span>{{lpName}}</li>
  139 + <li><span>车辆:</span>{{clZbh}}</li>
  140 + <li><span>计发:</span>{{fcsj}}</li>
  141 + <li><span>实发:</span>{{fcsjActual}}</li>
  142 + <li><span>计达:</span>{{zdsj}}</li>
  143 + <li><span>实达:</span>{{zdsjActual}}</li>
  144 + <li><span>驾驶员:</span>{{jName}}</li>
  145 + <li><span>售票员:</span>{{sName}}</li>
  146 + <li><span>终点站:</span>{{zdzName}}</li>
  147 + </ul>
  148 + </script>
135 149 </div>
... ...
src/main/resources/static/real_control_v2/js/common.js
... ... @@ -150,6 +150,7 @@ var gb_common = (function() {
150 150 'type': 'device',
151 151 'device': this.deviceId
152 152 },
  153 + 'data': {lineId: this.lineId, upDown: this.upDown},
153 154 'icon': 'uk-icon-bus'
154 155 });
155 156 });
... ... @@ -157,7 +158,7 @@ var gb_common = (function() {
157 158 }
158 159  
159 160 return treeData;
160   - }
  161 + };
161 162  
162 163 var lineAutocomplete = function(element) {
163 164 //construction data
... ...
src/main/resources/static/real_control_v2/js/data/data_basic.js
... ... @@ -51,6 +51,8 @@ var gb_data_basic = (function () {
51 51 var data=[],name;
52 52 for(var jobCode in rs){
53 53 name=rs[jobCode];
  54 + /*if(jobCode.indexOf("-")!=-1)
  55 + jobCode=jobCode.split('-')[1];*/
54 56 data.push({
55 57 value: jobCode+'/'+name,
56 58 fullChars: pinyin.getFullChars(name).toUpperCase(),
... ...
src/main/resources/static/real_control_v2/js/data/data_gps.js
... ... @@ -38,7 +38,9 @@ var gb_data_gps = (function() {
38 38 upArr.push(this);
39 39 } else
40 40 addArr.push(this);
41   -
  41 + //起终点 拼接方向标识
  42 + if(this.sEPoint)
  43 + this.stopNo=this.stopNo+'_'+this.upDown;
42 44 realData[this.deviceId] = this;
43 45 });
44 46  
... ...
src/main/resources/static/real_control_v2/js/home/line_panel.js
... ... @@ -82,6 +82,9 @@ var gb_home_line_panel = (function() {
82 82 var cells = e.find('dd');
83 83 $(cells[1]).text(t.speed);
84 84 $(cells[2]).html(t.expectStopTime == null ? '' : t.expectStopTime);
  85 +
  86 + if(!t.stationName)
  87 + t.stationName='';
85 88 $(cells[3]).text(t.stationName).attr('title', t.stationName);
86 89  
87 90 //班次信息
... ...
src/main/resources/static/real_control_v2/js/line_schedule/sch_table.js
... ... @@ -65,10 +65,37 @@ var gb_schedule_table = (function() {
65 65 //dbclick event
66 66 gb_schedule_table_dbclick.init();
67 67  
  68 + fcsjActualCellQtip();
68 69 cb && cb();
69 70 });
70 71 }
71 72  
  73 + function fcsjActualCellQtip(){
  74 + //单击实发单元格显示详细信息
  75 + $('dd.fcsjActualCell').qtip({
  76 + show: 'click',
  77 + content: {
  78 + text: function(e) {
  79 + var lineCode=$(e.target).parents('li.line_schedule').data('id')
  80 + ,id=$(e.target).parents('dl').data('id')
  81 + ,sch=line2Schedule[lineCode][id];
  82 + return temps['sfsj_sch-detail-temp'](sch);
  83 + }
  84 + }
  85 + ,style: {
  86 + classes: 'qtip-dark qtip-rounded qtip-shadow'
  87 + },
  88 + hide: {
  89 + fixed: true,
  90 + delay: 300
  91 + },
  92 + position: {
  93 + my: 'center left',
  94 + at: 'center right'
  95 + }
  96 + });
  97 + }
  98 +
72 99 //重置序号
73 100 var reset_seq_no = function(dls) {
74 101 dls.each(function(i, dl) {
... ...
src/main/resources/static/real_control_v2/js/main.js
... ... @@ -58,7 +58,7 @@ var gb_main_ep = new EventProxy(),
58 58 });
59 59  
60 60 //嵌入地图页面
61   - $('li.map-panel','#main-tab-content').load('/real_control_v2/mapmonitor/real_monitor/real.html');
  61 + $('li.map-panel','#main-tab-content').load('/real_control_v2/mapmonitor/real.html');
62 62 });
63 63  
64 64 function g_emit(id) {
... ...
src/main/resources/static/real_control_v2/js/utils/svg_chart.js
... ... @@ -97,7 +97,8 @@ var gb_svg_chart = (function() {
97 97 var c_clzz = {
98 98 'station_circle': true
99 99 };
100   - items.append('circle').classed(c_clzz)
  100 + items.select(function (d) {return d.type!=1?this:null;})
  101 + .append('circle').classed(c_clzz)
101 102 .attr('cx', cx)
102 103 .attr('cy', cy)
103 104 .attr('data-id', function(d) {
... ... @@ -106,13 +107,14 @@ var gb_svg_chart = (function() {
106 107  
107 108 //down circle
108 109 c_clzz.down = true;
109   - items.append('circle').classed(c_clzz)
  110 + items.select(function (d) {return d.type!=0?this:null;})
  111 + .append('circle').classed(c_clzz)
110 112 .attr('cx', cx)
111 113 .attr('cy', function(d, i) {
112 114 return cy(d, i) + chart_height;
113 115 })
114 116 .attr('data-id', function(d) {
115   - return d.id[1];
  117 + return d.type==1?d.id[0]:d.id[1];
116 118 });
117 119  
118 120 //station name text
... ... @@ -148,9 +150,14 @@ var gb_svg_chart = (function() {
148 150 //gps 按线路站点分组后的下标映射
149 151 var line_gps_index = {};
150 152 var get_circle = function(dataId, svg) {
151   - var circle = $('.station_circle[data-id=' + dataId + ']', svg);
152   - if (circle.length == 0)
153   - circle = null;
  153 + try {
  154 + var circle = $('.station_circle[data-id=' + dataId + ']', svg);
  155 + if (circle.length == 0)
  156 + circle = null;
  157 + }catch (e){
  158 + console.log('get_circle error! station_circle data-id:' + dataId);
  159 + return null;
  160 + }
154 161 return circle;
155 162 },
156 163 gx = function(gps, svg) {
... ... @@ -216,17 +223,23 @@ var gb_svg_chart = (function() {
216 223 var svgs = $('.line-chart[data-code=' + lineCode + ']'),
217 224 data = gb_data_gps.gpsByLineCode(lineCode);
218 225  
219   - line_gps_index[lineCode] = gps_index_mapp(data);
  226 + var list=[];
  227 + //过滤无站点字段的数据
  228 + $.each(data, function(){
  229 + if(!this.stopNo || this.stopNo=='')
  230 + return true;
  231 + list.push(this);
  232 + });
  233 +
  234 + line_gps_index[lineCode] = gps_index_mapp(list);
220 235 $.each(svgs, function() {
221 236 //绘制gps
222   - draw_gps(this, data);
  237 + draw_gps(this, list);
223 238 //聚合gps
224 239 marker_clusterer(this, lineCode);
225 240 });
226 241  
227   -
228   - //marker_clusterer(lineCode);
229   - }
  242 + };
230 243  
231 244 var draw_gps = function(svg, data) {
232 245 //remove merge_hide class
... ... @@ -280,12 +293,12 @@ var gb_svg_chart = (function() {
280 293 //merge rect
281 294 mergerG.append('rect').attr('x', x - 12)
282 295 .attr('y', function() {
283   - return isDown ? y + 5 : y - 30;
  296 + return isDown ? y + 7 : y - 32;
284 297 });
285 298 //merge text
286 299 mergerG.append('text').text(gpsArr.length)
287 300 .attr('x', x - 4)
288   - .attr('y', isDown ? y + 22 : y - 12);
  301 + .attr('y', isDown ? y + 24 : y - 14);
289 302 }
290 303  
291 304 return {
... ...
src/main/resources/static/real_control_v2/js/utils/svg_chart_map.js
1   -var gb_svg_map_util = (function(){
2   - var storage = window.localStorage;
3   - var drawLine = function(map, gps) {
4   - //从storage里获取路段路由数据
5   - var routes = JSON.parse(storage.getItem(gps.lineId + '_route')),
6   - updown = gps.upDown == 0 ? 'up' : 'down',
7   - pots = [],
8   - tempArr;
9   -
10   - $.each(routes[updown].split(','), function() {
11   - tempArr = this.split(' ');
12   - pots.push(new BMap.Point(tempArr[0], tempArr[1]));
13   - });
14   -
15   - var polyline = new BMap.Polyline(pots, {
16   - strokeWeight: 6,
17   - strokeOpacity: 0.5,
18   - strokeColor: gps.upDown == 0 ? 'blue' : 'red'
19   - });
20   -
21   - map.addOverlay(polyline);
22   -
23   - $.each(gb_data_basic.stationRoutes(gps.lineId), function() {
24   - if (this.directions == gps.upDown) {
25   - var marker = drawStationMarker(this);
26   - if (marker)
27   - map.addOverlay(marker);
28   - }
29   - })
30   - }
31   -
32   - var drawStationMarker = function(routeItem) {
33   - var station = routeItem.station,
34   - coord = TransGPS.wgsToBD(station.gLaty, station.gLonx);
35   -
36   - var marker = new BMap.Marker(new BMap.Point(coord.lng, coord.lat));
37   -
38   - //label
39   - var offsetX = Math.abs(station.stationName.length / 2 * 12),
40   - offsetY = -20,
41   - label = new BMap.Label(station.stationName, {
42   - offset: new BMap.Size(-offsetX, offsetY)
43   - });
44   -
45   - label.setStyle({
46   - borderColor: 'rgb(130, 119, 119)',
47   - borderRadius: '3px',
48   - padding: '3px 7px 3px 7px',
49   - color: 'rgb(130, 119, 119)'
50   - });
51   - marker.setLabel(label);
52   - return marker;
53   - }
54   -
55   - return {drawLine: drawLine};
  1 +var gb_svg_map_util = (function () {
  2 + var storage = window.localStorage;
  3 + var drawLine = function (map, gps) {
  4 + //从storage里获取路段路由数据
  5 + var routes = JSON.parse(storage.getItem(gps.lineId + '_route')),
  6 + updown = gps.upDown == 0 ? 'up' : 'down',
  7 + pots = [],
  8 + tempArr;
  9 +
  10 + $.each(routes[updown].split(','), function () {
  11 + tempArr = this.split(' ');
  12 + pots.push(new BMap.Point(tempArr[0], tempArr[1]));
  13 + });
  14 +
  15 + var polyline = new BMap.Polyline(pots, {
  16 + strokeWeight: 6,
  17 + strokeOpacity: 0.5,
  18 + strokeColor: gps.upDown == 0 ? 'blue' : 'red'
  19 + });
  20 +
  21 + map.addOverlay(polyline);
  22 +
  23 + $.each(gb_data_basic.stationRoutes(gps.lineId), function (i) {
  24 + if (this.directions == gps.upDown) {
  25 + try {
  26 + var marker = drawStationMarker(this);
  27 + if (marker)
  28 + map.addOverlay(marker);
  29 + }catch(e){
  30 + console.log(e);}
  31 + }
  32 + })
  33 + }
  34 +
  35 + var drawStationMarker = function (routeItem) {
  36 + var station = routeItem.station,
  37 + coord = TransGPS.wgsToBD(station.gLaty, station.gLonx);
  38 +
  39 + var marker = new BMap.Marker(new BMap.Point(coord.lng, coord.lat));
  40 +
  41 + //label
  42 + var offsetX = Math.abs(station.stationName.length / 2 * 12),
  43 + offsetY = -20,
  44 + label = new BMap.Label(station.stationName, {
  45 + offset: new BMap.Size(-offsetX, offsetY)
  46 + });
  47 +
  48 + label.setStyle({
  49 + borderColor: 'rgb(130, 119, 119)',
  50 + borderRadius: '3px',
  51 + padding: '3px 7px 3px 7px',
  52 + color: 'rgb(130, 119, 119)'
  53 + });
  54 + marker.setLabel(label);
  55 + return marker;
  56 + }
  57 +
  58 + return {drawLine: drawLine};
56 59 })();
... ...
src/main/resources/static/real_control_v2/js/utils/svg_chart_tooltip.js
1 1 /* 线路模拟图 tooltip */
2 2  
3   -var gb_svg_tooltip = (function() {
  3 +var gb_svg_tooltip = (function () {
4 4  
5 5 var temps;
6   - $.get('/real_control_v2/fragments/home/tooltip.html', function(dom) {
  6 + $.get('/real_control_v2/fragments/home/tooltip.html', function (dom) {
7 7 temps = gb_common.compileTempByDom(dom);
8 8 });
9 9  
10 10 // normal gps tooltip
11   - $(document).on('mouseenter', 'svg .gps-wrap rect', function() {
  11 + $(document).on('mouseenter', 'svg .gps-wrap rect', function () {
12 12 var rect = $(this);
13   - if(rect.attr('aria-describedby'))
14   - return;
  13 + if (rect.attr('aria-describedby'))
  14 + return;
15 15 var gps = gb_data_gps.findOne($(this).attr('_id').split('_')[1]);
16 16 $(this).qtip({
17 17 show: {
... ... @@ -19,7 +19,7 @@ var gb_svg_tooltip = (function() {
19 19 delay: 300
20 20 },
21 21 content: {
22   - text: function() {
  22 + text: function () {
23 23 return temps['tooltip_gps_temp'](gps);
24 24 }
25 25 },
... ... @@ -35,13 +35,13 @@ var gb_svg_tooltip = (function() {
35 35 delay: 300
36 36 },
37 37 events: {
38   - hidden: function(event, api) {
  38 + hidden: function (event, api) {
39 39 rect.dblclick(null);
40 40 rect.removeAttr('fiexd-tip');
41 41 //destroy dom
42 42 $(this).qtip('destroy', true);
43 43 },
44   - visible: function() {
  44 + visible: function () {
45 45 show_baidu_map($('.tip_map_wrap', this)[0], gps);
46 46 rect.dblclick(fiexdTip);
47 47 }
... ... @@ -50,24 +50,24 @@ var gb_svg_tooltip = (function() {
50 50 });
51 51  
52 52 //multiple gps tooltip
53   - $(document).on('mouseenter', 'svg .merge-item rect', function() {
  53 + $(document).on('mouseenter', 'svg .merge-item rect', function () {
54 54 var rect = $(this);
55   - if(rect.attr('aria-describedby'))
56   - return;
57   - // var gps = gb_data_gps.findOne($(this).attr('_id').split('_')[1]);
  55 + if (rect.attr('aria-describedby'))
  56 + return;
  57 + // var gps = gb_data_gps.findOne($(this).attr('_id').split('_')[1]);
58 58 //获取聚合的gps
59   - var lineCode=$(this).parents('svg').data('code')
60   - ,stop=$(this).parent().attr('_id').split('_')[1]
61   - ,gpsArray=searchByStop(gb_data_gps.gpsByLineCode(lineCode), stop);
  59 + var lineCode = $(this).parents('svg').data('code')
  60 + , stop = $(this).parent().attr('_id').substr(7)//merger_
  61 + , gpsArray = searchByStop(gb_data_gps.gpsByLineCode(lineCode), stop);
62 62  
63   - console.log('gpsArray...',gpsArray);
  63 + // console.log('stop...',stop);
64 64 $(this).qtip({
65 65 show: {
66 66 ready: true,
67 67 delay: 300
68 68 },
69 69 content: {
70   - text: function() {
  70 + text: function () {
71 71 return temps['tooltip_multi_gps_temp']({list: gpsArray});
72 72 }
73 73 },
... ... @@ -83,12 +83,12 @@ var gb_svg_tooltip = (function() {
83 83 delay: 300
84 84 },
85 85 events: {
86   - hidden: function(event, api) {
  86 + hidden: function (event, api) {
87 87 //rect.dblclick(null);
88 88 //destroy dom
89 89 $(this).qtip('destroy', true);
90 90 },
91   - visible: function() {
  91 + visible: function () {
92 92 show_baidu_map($('.tip_map_wrap', this)[0], gpsArray);
93 93 //rect.dblclick(fiexdTip);
94 94 }
... ... @@ -97,7 +97,7 @@ var gb_svg_tooltip = (function() {
97 97 });
98 98  
99 99 //dblclick
100   - var fiexdTip = function() {
  100 + var fiexdTip = function () {
101 101 var tipId = $(this).attr('aria-describedby');
102 102 if (tipId) {
103 103 var api = $('#' + tipId).qtip('api');
... ... @@ -114,59 +114,59 @@ var gb_svg_tooltip = (function() {
114 114  
115 115 var carIcon = '/assets/img/bus1.png';
116 116 //,normalIcon = '/assets/img/Marker_32px_583000_easyicon.net.png';
117   - var show_baidu_map = function(elem, list) {
118   - if(!window.BMap)
  117 + var show_baidu_map = function (elem, list) {
  118 + if (!window.BMap)
119 119 return;
120 120  
121   - if(!isArray(list))
122   - list=[list];
  121 + if (!isArray(list))
  122 + list = [list];
123 123 //init map
124 124 var map = new BMap.Map(elem);
125 125 map.setMapStyle({
126   - style: 'googlelite'
  126 + style: 'googlelite'
127 127 });
128 128 map.enableScrollWheelZoom(true);
129 129 //gps marker
130   - var coord,point;
131   - $.each(list, function(i){
132   - coord = TransGPS.wgsToBD(this.lat, this.lon);
133   - point = new BMap.Point(coord.lng, coord.lat);
134   -
135   - var marker = new BMap.Marker(point),
136   - icon = new BMap.Icon(carIcon, new BMap.Size(25, 25));
137   - marker.setIcon(icon);
138   - marker.setRotation(this.direction);
139   - marker.setTop(true);
140   - map.addOverlay(marker);
141   -
142   - if(i>=list.length-1)
143   - map.centerAndZoom(point, 15);
  130 + var coord, point;
  131 + $.each(list, function (i) {
  132 + coord = TransGPS.wgsToBD(this.lat, this.lon);
  133 + point = new BMap.Point(coord.lng, coord.lat);
  134 +
  135 + var marker = new BMap.Marker(point),
  136 + icon = new BMap.Icon(carIcon, new BMap.Size(25, 25));
  137 + marker.setIcon(icon);
  138 + marker.setRotation(this.direction);
  139 + marker.setTop(true);
  140 + map.addOverlay(marker);
  141 +
  142 + if (i >= list.length - 1)
  143 + map.centerAndZoom(point, 15);
144 144 });
145 145 //draw line routes
146 146 gb_svg_map_util.drawLine(map, list[0]);
147 147 }
148 148  
149   - function searchByStop(list, stop){
150   - var rs = [];
151   - $.each(list, function(){
152   - if(this.stopNo==stop)
153   - rs.push(this);
154   - });
155   - return rs;
  149 + function searchByStop(list, stop) {
  150 + var rs = [];
  151 + $.each(list, function () {
  152 + if (this.stopNo == stop)
  153 + rs.push(this);
  154 + });
  155 + return rs;
156 156 }
157 157  
158   - function updateFixedTip(es){
159   - $.each(es, function(){
160   - if(!$(this).attr('fiexd-tip'))
161   - return true;
  158 + function updateFixedTip(es) {
  159 + $.each(es, function () {
  160 + if (!$(this).attr('fiexd-tip'))
  161 + return true;
162 162  
163   - var qtip=$('#'+$(this).attr('aria-describedby'));
  163 + var qtip = $('#' + $(this).attr('aria-describedby'));
164 164  
165 165  
166   - });
  166 + });
167 167 }
168 168  
169 169 return {
170   - update: updateFixedTip
  170 + update: updateFixedTip
171 171 };
172 172 })();
... ...
src/main/resources/static/real_control_v2/js/utils/svg_data_convert.js
... ... @@ -20,7 +20,7 @@ var gb_svg_data_convert = (function() {
20 20 downS = nvl_get(down, j),
21 21 op = {
22 22 name: [upS.stationName],
23   - id: [upS.stationCode, downS.stationCode],
  23 + id: [get_station_code(upS), get_station_code(downS)],
24 24 type: 2,
25 25 stationMark: upS.stationMark//站点标记
26 26 };
... ... @@ -85,14 +85,14 @@ var gb_svg_data_convert = (function() {
85 85  
86 86 var upSort = function(a, b) {
87 87 return a.stationRouteCode - b.stationRouteCode;
88   - }
  88 + };
89 89  
90 90 var downSort = function(a, b) {
91 91 return b.stationRouteCode - a.stationRouteCode;
92   - }
  92 + };
93 93  
94 94 var station_indexof = function(array, station, start) {
95   - var res = -1
  95 + var res = -1;
96 96 for (var i = start, obj; obj = array[i++];) {
97 97 if (obj.stationName == station.stationName) {
98 98 res = i;
... ... @@ -100,10 +100,17 @@ var gb_svg_data_convert = (function() {
100 100 }
101 101 }
102 102 return res;
103   - }
  103 + };
  104 +
  105 + var get_station_code=function (station) {
  106 + if(station.stationMark=='B' || station.stationMark=='E')
  107 + return station.stationCode+'_'+station.directions;
  108 + else
  109 + return station.stationCode;
  110 + };
104 111  
105 112 var nvl_get = function(list, index) {
106 113 return list[index] == null ? {} : list[index];
107   - }
  114 + };
108 115 return {mergeRoute: mergeRoute};
109 116 })();
... ...
src/main/resources/static/real_control_v2/mapmonitor/css/real.css 0 → 100644
  1 +.z-depth-2 {
  2 + box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  3 +}
  4 +
  5 +.map-system-msg a{
  6 + position: absolute;
  7 + z-index: 2;
  8 + top: 20px;
  9 + background: red;
  10 + color: white;
  11 + padding: 7px;
  12 + left: calc(50% - 250px);
  13 + border-radius: 5px;
  14 + font-size: 20px;
  15 + cursor: pointer;
  16 +}
  17 +
  18 +#real_map_container{
  19 + width: 100%;
  20 + height: 100%;
  21 +
  22 + moz-user-select: -moz-none;
  23 + -moz-user-select: none;
  24 + -o-user-select:none;
  25 + -khtml-user-select:none;
  26 + -webkit-user-select:none;
  27 + -ms-user-select:none;
  28 + user-select:none;
  29 +}
  30 +
  31 +.real_right_gps_panel{
  32 + position: absolute;
  33 + right: 4px;
  34 + width: 320px;
  35 + height: 100%;
  36 + height: calc(100% - 6px);
  37 + background: #ffffff;
  38 + top: 3px;
  39 + box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  40 +}
  41 +
  42 +/**/
  43 +.real_bottom_panel{
  44 + position: absolute !important;
  45 + height: 18px;
  46 + width: 100%;
  47 + width: calc(100% - 342px);
  48 + bottom: 2px !important;
  49 + left: 0px !important;
  50 + background: #fff;
  51 + box-shadow: 0 8px 17px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
  52 + /* border-radius: 0 60px 0 0;*/
  53 + border: 1px solid #bfbcbc;
  54 +}
  55 +
  56 +
  57 +.real_right_gps_panel>form{
  58 + text-align: center;
  59 + margin-top: 20px;
  60 +}
  61 +
  62 +.real_right_gps_panel>form>div.uk-form-icon{
  63 + width: 88%;
  64 +}
  65 +
  66 +.real_right_gps_panel>form>div.uk-form-icon input{
  67 + width: 100%;
  68 +}
  69 +
  70 +.real_right_gps_panel>form>div.uk-form-icon input::-webkit-input-placeholder{
  71 + font-size: 12px;
  72 +}
  73 +
  74 +.real_right_gps_panel .gps_tree_list{
  75 + height: calc(100% - 80px);
  76 + overflow: auto;
  77 + padding: 20px 0 0 32px;
  78 +}
  79 +
  80 +/*.real_bottom_panel{
  81 + width: 100%;
  82 + background: red;
  83 + height: 100px;
  84 + position: fixed !important;
  85 + top: auto !important;
  86 + bottom: 0 !important;
  87 + left: 0;
  88 + right: 0;
  89 +}
  90 +*/
  91 +.real_bottom_panel #handle{
  92 + width: 100%;
  93 + height: 4px;
  94 + top: -4px;
  95 + background-color: rgba(136, 137, 138, 0.49);
  96 + cursor: row-resize;
  97 +}
  98 +
  99 +
  100 +.real_bottom_panel .real_bl_cont{
  101 + display: inline-block;
  102 + width: calc(100% - 240px);
  103 + height: 100%;
  104 + overflow: auto;
  105 +}
  106 +
  107 +.real_bottom_panel .real_br_cont{
  108 + display: inline-block;
  109 + width: 232px;
  110 + height: 100%;
  111 + height: calc(100% - 7px);
  112 + overflow: auto;
  113 + padding-top: 7px;
  114 + font-size: 13px
  115 +}
  116 +
  117 +.real_br_cont .uk-form .uk-form-row{
  118 + border-bottom: 1px solid #e9e9e9;
  119 + padding-bottom: 4px;
  120 +}
  121 +
  122 +.real_br_cont .uk-form input{
  123 + vertical-align: middle;
  124 + margin-top: -2px;
  125 +}
  126 +
  127 +.real_br_cont .uk-form .uk-form-controls label{
  128 + margin-right: 15px;
  129 + display: inline-block;
  130 +}
  131 +
  132 +.real_br_cont .uk-form .uk-form-controls label:last-child{
  133 + margin-right: 0;
  134 +}
  135 +
  136 +.real_br_cont .sp-placeholder{
  137 + width: 15px;
  138 + height: 15px;
  139 + margin: 2px 0 0 7px;
  140 + border-radius: 2px;
  141 + float: right;
  142 + cursor: pointer;
  143 +}
  144 +
  145 +.real_br_cont .color_block{
  146 + display: inline-block;
  147 + margin-right: 9px;
  148 +}
  149 +
  150 +.real_br_cont .color_block:last-child{
  151 + margin-right: 0;
  152 +}
  153 +
  154 +.real_br_cont .sp-placeholder .sp-placeholder-color {
  155 + width: 15px;
  156 + height: 15px;
  157 + border-radius: 2px;
  158 + box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.1) inset;
  159 +}
  160 +
  161 +.sp-container {
  162 + border: 1px solid #d3d3d3;
  163 + background-color: #fff;
  164 + border-radius: 4px;
  165 + box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  166 +}
0 167 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_config.html 0 → 100644
  1 +<div>
  2 + <script id="map-config-form-temp" type="text/html">
  3 + <form class="uk-form uk-form-stacked">
  4 + <div class="uk-form-row">
  5 + <span class="uk-form-label">图层</span>
  6 + <div class="uk-form-controls">
  7 + <label><input type="radio" name="map_type" {{if map_type=='baidu'}}checked{{/if}}> 百度</label>
  8 + <label><input type="radio" name="map_type" {{if map_type=='gaode'}}checked{{/if}}> 高德</label>
  9 + <label><input type="checkbox" name="map_type" {{if traffic}}checked{{/if}}> 实时路况</label>
  10 + </div>
  11 + </div>
  12 +
  13 + <div class="uk-form-row">
  14 + <span class="uk-form-label">空间数据</span>
  15 + <div class="uk-form-controls">
  16 + <label><input type="checkbox" {{if spatialData.station}}checked{{/if}}> 站点</label>
  17 + <label><input type="checkbox" {{if spatialData.electronicFence}}checked{{/if}}> 电子围栏</label>
  18 + <label><input type="checkbox" {{if spatialData.carPark}}checked{{/if}}> 停车场</label>
  19 + </div>
  20 + </div>
  21 +
  22 + <div class="uk-form-row">
  23 + <span class="uk-form-label">异常警报输出</span>
  24 + <div class="uk-form-controls">
  25 + <label><input type="checkbox" {{if abnormalPrint.speeding}}checked{{/if}}> 超速</label>
  26 + <label><input type="checkbox" {{if abnormalPrint.outBounds}}checked{{/if}}> 越界</label>
  27 + <label><input type="checkbox" {{if abnormalPrint.largeMargin}}checked{{/if}}> 大间隔</label>
  28 + </div>
  29 + </div>
  30 +
  31 + <div class="uk-form-row">
  32 + <span class="uk-form-label">车辆图标</span>
  33 + <div class="uk-form-controls">
  34 + <label><input type="checkbox" {{if carIcon.angle}}checked{{/if}}> 标示角度</label>
  35 + <label><input type="checkbox" {{if carIcon.converge}}checked{{/if}}> 聚合</label>
  36 + </div>
  37 + </div>
  38 +
  39 + <div class="uk-form-row">
  40 + <span class="uk-form-label">车辆颜色</span>
  41 + <div class="uk-form-controls">
  42 + <div class="color_block">
  43 + 上行
  44 + <div class="sp-placeholder">
  45 + <div class="sp-placeholder-color" style="background: {{carIcon.color.up}}"></div>
  46 + </div>
  47 + </div>
  48 +
  49 + <div class="color_block">
  50 + 下行
  51 + <div class="sp-placeholder">
  52 + <div class="sp-placeholder-color" style="background: {{carIcon.color.down}}"></div>
  53 + </div>
  54 + </div>
  55 +
  56 + <div class="color_block">
  57 + 非营运
  58 + <div class="sp-placeholder">
  59 + <div class="sp-placeholder-color" style="background: {{carIcon.color.nonOperation}}"></div>
  60 + </div>
  61 + </div>
  62 + </div>
  63 + </div>
  64 +
  65 + <div class="uk-form-row">
  66 + <span class="uk-form-label">路段颜色</span>
  67 + <div class="uk-form-controls">
  68 + <div class="color_block">
  69 + 上行
  70 + <div class="sp-placeholder">
  71 + <div class="sp-placeholder-color" style="background: {{section.color.up}}"></div>
  72 + </div>
  73 + </div>
  74 +
  75 + <div class="color_block">
  76 + 下行
  77 + <div class="sp-placeholder">
  78 + <div class="sp-placeholder-color" style="background: {{section.color.down}}"></div>
  79 + </div>
  80 + </div>
  81 + </div>
  82 + </div>
  83 +
  84 + <br>
  85 + </form>
  86 + </script>
  87 +</div>
... ...
src/main/resources/static/real_control_v2/mapmonitor/fragments/map_infowindow.html 0 → 100644
  1 +<div>
  2 + <script id="map-win-gps-detail-temp" type="text/html">
  3 + <div class="gps_info_win">
  4 + <h5 style="color:#0E6AF9;">
  5 + {{if stationName!=null}}
  6 + {{stationName}}
  7 + {{else}}
  8 + 未知站点
  9 + {{/if}}
  10 + </h5>
  11 + <h4 style="margin: 5px 0 5px 0;">
  12 + <span style="color: #0E6AF9;">{{nbbm}}</span>
  13 + </h4>
  14 + <p>
  15 + 营运状态:{{if state==0}}营运{{else}}非营运{{/if}}
  16 + </p>
  17 + <p>
  18 + 走向:{{if upDown==0}}上行{{else if upDown==1}}下行{{else}}未知走向{{/if}}
  19 + </p>
  20 + <p>速度:{{speed}}</p>
  21 + <p>经度:{{lon}}</p>
  22 + <p>纬度:{{lat}}</p>
  23 +
  24 + <!--<p style="color: gray;">{{fromNow}} 更新</p>-->
  25 + <hr>
  26 + <p>
  27 + {{if currSch!=null}}
  28 + 路牌:{{currSch.lpName}}
  29 + {{/if}}
  30 + </p>
  31 + <p class="banci-info">
  32 + {{if currSch!=null}}开往 {{currSch.zdzName}}{{/if}}
  33 + </p>
  34 + <p class="banci-info">
  35 + {{if nextSch!=null}}
  36 + 下一班{{nextSch.qdzName}} {{nextSch.fcsj}} 发车
  37 + {{/if}}
  38 + </p>
  39 + <a href="javascript:lineGroup.toPlayBack('{{nbbm}}', '{{lineId}}')" class="link_to_pback"
  40 + style="color:#006600;font-size:12px;">轨迹回放</a>
  41 + </div>
  42 + </script>
  43 +</div>
... ...
src/main/resources/static/real_control_v2/mapmonitor/js/config.js 0 → 100644
  1 +/** 地图配置信息 */
  2 +
  3 +var gb_map_config=(function () {
  4 +
  5 + var defaultConfig={
  6 +
  7 + //地图类型
  8 + map_type: 'baidu',
  9 + //实时路况
  10 + traffic: false,
  11 + spatialData: {
  12 + station: false,
  13 + electronicFence: false,
  14 + carPark: false
  15 + },
  16 + abnormalPrint: {
  17 + speeding: true,
  18 + outBounds: true,
  19 + largeMargin: false
  20 + },
  21 + carIcon: {
  22 + angle: false,
  23 + converge: false,
  24 + color: {
  25 + up: 'rgba(94, 150, 210, 1)',
  26 + down: 'rgba(201, 33, 33, 1)',
  27 + nonOperation: 'rgba(136, 133, 133, 1)'
  28 + }
  29 + },
  30 + section:{
  31 + color: {
  32 + up: 'blue',
  33 + down: 'red'
  34 + }
  35 + }
  36 + };
  37 +
  38 + var temps;
  39 +
  40 + var init = function () {
  41 + $.get('/real_control_v2/mapmonitor/fragments/map_config.html', function (dom) {
  42 + temps = gb_common.compileTempByDom(dom, {compress: true});
  43 +
  44 + //渲染表单
  45 + var formHtml=temps['map-config-form-temp'](defaultConfig);
  46 + $('.map_config_wrap').html(formHtml);
  47 +
  48 + //颜色选择器
  49 + $('.map_config_wrap .color_block').each(function () {
  50 + var c=$('.sp-placeholder-color',this).css('background-color');
  51 + var that=this;
  52 + $(this).spectrum({
  53 + color: c,
  54 + showInput: true,
  55 + chooseText: "确定",
  56 + cancelText: "取消",
  57 + preferredFormat: "rgb",
  58 + showAlpha: true,
  59 + change: function (color) {
  60 + $('.sp-placeholder-color',that).css('background-color', color);
  61 + }
  62 + });
  63 + });
  64 +
  65 +
  66 + });
  67 + }
  68 +
  69 + return {
  70 + getConfig: function () {
  71 + return defaultConfig;
  72 + },
  73 + init: init
  74 + }
  75 +})();
0 76 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/mapmonitor/js/gps_tree.js 0 → 100644
  1 +var gb_map_gps_tree = (function () {
  2 +
  3 +
  4 + var treeObj;
  5 +
  6 + var jstreeChanged = function (e, node, event) {
  7 + gb_map_overlay_mge.refresh();
  8 + };
  9 +
  10 + var init = function (cb) {
  11 + //设备树
  12 + var treeData = gb_common.get_device_tree_data();
  13 + treeObj = $('.real_right_gps_panel .gps_tree_list')
  14 + //节点初始化完成
  15 + .on('ready.jstree', function () {
  16 + treeObj.jstree(true).open_all();
  17 + //删掉tree node a标签的 href值(避免鼠标悬停浏览器出现状态条)
  18 + $('.gps_tree_list .jstree-container-ul a.jstree-anchor').removeAttr('href');
  19 + })
  20 + //state插件 状态恢复完成
  21 + .on('state_ready.jstree', function () {
  22 + //绑定checkbox状态切换事件
  23 + treeObj.on('check_node.jstree uncheck_node.jstree', jstreeChanged);
  24 + cb && cb();
  25 + })
  26 + .on('activate_node.jstree', function (e, n) {
  27 + var node = n.node;
  28 + if(node.a_attr && node.a_attr.type=='device'){
  29 + var device = node.a_attr.device;
  30 + gb_map_overlay_mge._focus(device);
  31 + }
  32 + })
  33 + .jstree({
  34 + 'core': {
  35 + 'data': treeData
  36 + },
  37 + 'checkbox': {
  38 + 'keep_selected_style': false,
  39 + 'whole_node': false,
  40 + 'tie_selection': false
  41 + },
  42 + 'contextmenu': {
  43 + 'items': {
  44 + '轨迹回放': {
  45 + 'label': '轨迹回放',
  46 + 'action': function (data) {
  47 + console.log('action', data);
  48 + }
  49 + },
  50 + '发送指令': {
  51 + 'label': '发送指令',
  52 + 'action': function (data) {
  53 + console.log('action', data);
  54 + }
  55 + }
  56 + }
  57 + },
  58 + 'plugins': ['checkbox', 'contextmenu', 'state']
  59 + });
  60 + };
  61 +
  62 + return {
  63 + init: init,
  64 + getChecked: function () {
  65 + return treeObj.jstree(true).get_checked(true);
  66 + }
  67 + };
  68 +})();
0 69 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/mapmonitor/js/map/iMap.js 0 → 100644
  1 +/** 地图 api 代理 */
  2 +var gb_map_imap = (function () {
  3 +
  4 + var storage = window.localStorage;
  5 + // 地图DOM容器
  6 + var mapContainer = $('#mapContainer');
  7 + var maps = {};
  8 + //尝试从 localStorage 里获取默认的地图类型
  9 + var currentMap = storage.getItem('real_map');
  10 + var mapProxy = {
  11 + //添加一个地图实例
  12 + addMap: function (name, text, instance) {
  13 + maps[name] = {name: name, text: text, instance: instance};
  14 +
  15 + if (!currentMap)
  16 + currentMap = name;
  17 + return mapProxy;
  18 + },
  19 + changeDefault: function (mapName) {
  20 + if (mapName == currentMap)
  21 + return;
  22 + if (maps[mapName]) {
  23 + //原地图 destroy
  24 + var oldMap = maps[currentMap].instance;
  25 + oldMap.destroy && oldMap.destroy();
  26 + $(gb_map_consts.mapContainer).html('');
  27 + //解除实时路况按钮点击事件
  28 + $(gb_map_consts.trafficBtn).unbind('click');
  29 +
  30 + //新地图 INIT
  31 + var text = maps[mapName].text;
  32 + //layer.msg('正在切换到' + text + '...', {icon : 16,shade : [ 0.6, '#393D49' ],time : 0});
  33 + var newMap = maps[mapName].instance;
  34 + newMap.init();
  35 + setText(text);
  36 +
  37 + currentMap = mapName;
  38 + //收拢线路
  39 + $('.mapRightWrap .collapse.in').collapse('hide');
  40 + } else
  41 + alertErr('不存在的地图实例' + mapName);
  42 + },
  43 + createCarIcon: createCarIcon,
  44 + call: function (f, opts) {
  45 + if (f == 'init')
  46 + setText(maps[currentMap].text);
  47 +
  48 + var instance = maps[currentMap].instance;
  49 + if (instance[f])
  50 + instance[f](opts);
  51 + else
  52 + alertErr('当前地图实例不支持操作:' + f);
  53 + return mapProxy;
  54 + }
  55 + }
  56 +
  57 + //绘制车辆icon
  58 + function createCarIcon(gps, w) {
  59 + var canvas = $('<canvas></canvas>')[0];
  60 + var ctx = canvas.getContext('2d');
  61 +
  62 + var colours = color(gps);
  63 +
  64 + ctx.shadowOffsetX = 5; // 阴影Y轴偏移
  65 + ctx.shadowOffsetY = 5; // 阴影X轴偏移
  66 + ctx.shadowBlur = 1; // 模糊尺寸
  67 + ctx.shadowColor = colours.shadow; // 颜色
  68 +
  69 + //绘制背景
  70 + if (!w)
  71 + w = 70;
  72 +
  73 + ctx.roundRect(0, 0, w, 25, 5).stroke();
  74 + ctx.fillStyle = colours.bgColor;
  75 + ctx.fill();
  76 + //文字
  77 + ctx.font = "14px arial";
  78 + ctx.fillStyle = "#fff";
  79 + ctx.fillText(gps.nbbm, 8, 18);
  80 +
  81 + return canvas.toDataURL();
  82 + }
  83 +
  84 + function color(g) {
  85 + var colours = {};
  86 + switch (g.state) {
  87 + case 0:
  88 + if (g.upDown == 0) {
  89 + //营运上行
  90 + colours['bgColor'] = 'rgba(94, 150, 210, 1)';
  91 + colours['shadow'] = 'rgba(94, 150, 210, 0.3)';
  92 + }
  93 + else if (g.upDown == 1) {
  94 + //营运下行
  95 + colours['bgColor'] = 'rgba(201, 33, 33, 1)';
  96 + colours['shadow'] = 'rgba(201, 33, 33, 0.3)';
  97 + }
  98 + else {
  99 + //未知走向
  100 + colours['bgColor'] = 'rgba(0, 0, 0, 1)';
  101 + colours['shadow'] = 'rgba(0, 0, 0, 0.3)';
  102 + }
  103 + break;
  104 +
  105 + default:
  106 + //非营运
  107 + colours['bgColor'] = 'rgba(136, 133, 133, 1)';
  108 + colours['shadow'] = 'rgba(136, 133, 133, 0.3)';
  109 + break;
  110 + }
  111 +
  112 + return colours;
  113 + }
  114 +
  115 + function alertErr(text) {
  116 + notify_err('map -' + text);
  117 + }
  118 +
  119 + function setText(text) {
  120 + $('#curr_map_name').text(text);
  121 + }
  122 +
  123 + //文件载入完毕
  124 + mapmonitor_load_ep.emitLater('load_iMap');
  125 + return mapProxy;
  126 +})();
... ...
src/main/resources/static/real_control_v2/mapmonitor/js/map/platform/baidu.js 0 → 100644
  1 +/** 百度地图相关接口封装 */
  2 +var gb_map_baidu = (function(){
  3 +
  4 + var map;
  5 + var realMarkers = {};
  6 + var topMarker;
  7 + //实时路况是否打开
  8 + var traffVisible;
  9 + //线路 Polyline
  10 + var linePolyline;
  11 +
  12 + var polylines={};
  13 + var buffAreas = {};
  14 + var baiduInstance = {
  15 + //初始化
  16 + init: function(){
  17 + if(!window.BMap){
  18 + alert('地图没有加载成功,请确认是否能正常连接外网!!');
  19 + return;
  20 + }
  21 + map = new BMap.Map($(gb_map_consts.mapContainer)[0]);
  22 + //中心点和缩放级别
  23 + map.centerAndZoom(new BMap.Point(gb_map_consts.center_point.lng, gb_map_consts.center_point.lat), 12);
  24 + map.enableScrollWheelZoom();
  25 +
  26 + window.localStorage.setItem('real_map', 'baidu');
  27 +
  28 + // 路况控件
  29 +/* var ctrl = new BMapLib.TrafficControl();
  30 + map.addControl(ctrl);
  31 +
  32 + $(gb_map_consts.trafficBtn).on('click', function() {
  33 + if (traffVisible) {
  34 + ctrl.hide();
  35 + traffVisible = false;
  36 + showLinePolyline();
  37 + } else {
  38 + ctrl.show();
  39 + traffVisible = true;
  40 + hideLinePolyline();
  41 + }
  42 + });
  43 + //百度路况控件自身关闭按钮
  44 + $('.portlet-fullscreen').on('click', '.maplibTc .maplibTcClose', function(){
  45 + traffVisible = false;
  46 + showLinePolyline();
  47 + });*/
  48 +
  49 + //$('#tcWrap.maplibTc').addClass('animated bounceInLeft');
  50 + //$('.maplibTcBtn_deskTop.anchorTR').remove();
  51 + },
  52 + destroy: function(){
  53 + realMarkers = {};
  54 + linePolyline = [];
  55 + },
  56 + clear: function(){
  57 + realMarkers = {};
  58 + map.clearOverlays();
  59 + },
  60 + //画线路图层
  61 + drawLine: function(opt){
  62 + if(polylines[opt.id])
  63 + return;
  64 +
  65 + var pos = [], temps;
  66 + var route = opt.upDown==0?opt.route.up:opt.route.down;
  67 +
  68 + $.each(route.split(','), function(){
  69 + temps = this.split(' ');
  70 + pos.push(new BMap.Point(temps[0], temps[1]));
  71 + });
  72 +
  73 + var polyline = new BMap.Polyline(pos, opt.style);
  74 + //根据ID保存映射
  75 + polylines[opt.id]=polyline;
  76 + if(opt.hide)
  77 + polyline.hide();
  78 + map.addOverlay(polyline);
  79 + //居中
  80 + //centerToPolyline(polyline);
  81 + },
  82 + //根据id 显示polyline
  83 + refreshPolyline: function (opt) {
  84 + var idx = opt.idx;
  85 + for(var id in polylines){
  86 + if(idx.indexOf(id) != -1)
  87 + polylines[id].show();
  88 + else
  89 + polylines[id].hide();
  90 + }
  91 + },
  92 + //定位到线路中间点
  93 + centerToLine: function (opt) {
  94 + var pos=polylines[opt.id].getPath();
  95 + console.log('定位到中心,,,', pos[parseInt(pos.length / 2)]);
  96 + map.setCenter(pos[parseInt(pos.length / 2)]);
  97 + }/*,
  98 + removeLine: function(opts){
  99 + var polyline=polylines[opts.key];
  100 + if(polyline){
  101 + map.removeOverlay(polyline);
  102 + polylines[opts.key]=null;
  103 + delete polylines[opts.key];
  104 + }
  105 + }*/,
  106 + //绘制GPS信号
  107 + drawRealGpsMarker: function(opts){
  108 + var gpsArray = opts.gpsList;
  109 + var marker, coord;
  110 + $.each(gpsArray, function(i, gps){
  111 +
  112 + marker = realMarkers[gps.deviceId];
  113 + if(marker && gps.timestamp == marker.gpsData.timestamp)
  114 + return;
  115 + else{
  116 + //转换坐标
  117 + transCoord(gps);
  118 +
  119 + if(marker)
  120 + moveMarker(marker, gps);//移动marker
  121 + else {
  122 + //创建marker
  123 + marker = createBDMarkerByGps(gps);
  124 + map.addOverlay(marker);
  125 + //设备号和marker映射
  126 + realMarkers[gps.deviceId] = marker;
  127 + }
  128 + }
  129 + });
  130 + },
  131 + showGpsMarker:function (opt) {
  132 + var chs = opt.chs;
  133 + for(var device in realMarkers){
  134 + if(chs[device])
  135 + realMarkers[device].show();
  136 + else
  137 + realMarkers[device].hide();
  138 + }
  139 + },
  140 + removeGps: function(opts){
  141 + var deviceArr = opts.deviceArr;
  142 + $.each(deviceArr, function(){
  143 + if(realMarkers[this]){
  144 + map.removeOverlay(realMarkers[this]);
  145 + realMarkers[this]=null;
  146 + delete realMarkers[this];
  147 + }
  148 + });
  149 + },
  150 + //定位到marker
  151 + goToMarker: function(opts){
  152 + var deviceId = opts.deviceId
  153 + ,m = realMarkers[deviceId];
  154 + if(m){
  155 + map.panTo(m.point);
  156 + setTop(m);
  157 + }
  158 + },
  159 + //打开信息窗口
  160 + openWindow: function(opts){
  161 + var deviceId = opts.deviceId
  162 + ,m = realMarkers[deviceId];
  163 + bdOpenWindow(m);
  164 + },
  165 + //绘制圆形
  166 + drawCircle: function(opts){
  167 + var coord = TransGPS.wgsToBD(opts.lat, opts.lon);
  168 + var circle = new BMap.Circle(new BMap.Point(coord.lng, coord.lat), opts.radius);
  169 + if(opts.color)
  170 + circle.setStrokeColor(opts.color);
  171 + if(opts.weight)
  172 + circle.setStrokeWeight(opts.weight);
  173 +
  174 + map.addOverlay(circle);
  175 + buffAreas[opts.id] = circle;
  176 + },
  177 + //绘制多边形
  178 + drawPolygon: function(opts){
  179 + var wgs,coord, points = [];
  180 + $.each(opts.cds, function(){
  181 + wgs = this.split(' ');
  182 + coord = TransGPS.wgsToBD(parseFloat(wgs[1]), parseFloat(wgs[0]));
  183 + points.push(new BMap.Point(coord.lng, coord.lat));
  184 + });
  185 +
  186 + var polygon = new BMap.Polygon(points, {strokeColor: opts.color, strokeWeight: opts.weight, strokeOpacity: 0.7});
  187 + map.addOverlay(polygon);
  188 + buffAreas[opts.id] = polygon;
  189 + },
  190 + //删除缓冲区
  191 + clearBuffArea: function(code){
  192 + if(buffAreas[code]){
  193 + map.removeOverlay(buffAreas[code]);
  194 + delete buffAreas[code];
  195 + }
  196 + }
  197 + };
  198 +
  199 + function transCoord(gps) {
  200 + var coord = TransGPS.wgsToBD(gps.lat, gps.lon);
  201 + gps.bd_lat = coord.lat;
  202 + gps.bd_lon = coord.lng;
  203 + }
  204 +
  205 + var bd_gps_info_win_opts = {
  206 + width : 190,
  207 + height: 255,
  208 + enableMessage:true
  209 + };
  210 + function createBDMarkerByGps(gpsData){
  211 +
  212 + var point = new BMap.Point(gpsData.bd_lon, gpsData.bd_lat);
  213 + var marker = new BMap.Marker(point);
  214 +
  215 + //根据编码长度 计算marker 宽度
  216 + var w = gpsData.nbbm.length * 10;
  217 + marker.setIcon(new BMap.Icon(gb_map_imap.createCarIcon(gpsData, w), new BMap.Size(w,25)));
  218 +
  219 + marker.infoWindow = new BMap.InfoWindow(bd_gps_info_win_opts);
  220 + marker.gpsData = gpsData;
  221 + //click
  222 + /*marker.addEventListener('click', function(){
  223 + bdOpenWindow(this);
  224 + });*/
  225 + //mouseover
  226 + marker.addEventListener('mouseover', function(){
  227 + setTop(this);
  228 + });
  229 + return marker;
  230 + }
  231 +
  232 + //隐藏线路线条
  233 + function hideLinePolyline(){
  234 + if(!linePolyline || linePolyline.length == 0)
  235 + return;
  236 +
  237 + layer.msg('隐藏线路图层',{offset: 'ct', shift : 5});
  238 + $.each(linePolyline, function(){
  239 + this.setStrokeOpacity(0.1);
  240 + });
  241 + }
  242 +
  243 + //显示线路线条
  244 + function showLinePolyline(){
  245 + if(!linePolyline || linePolyline.length == 0)
  246 + return;
  247 +
  248 + layer.msg('显示线路图层',{offset: 'ct', shift : 5});
  249 + $.each(linePolyline, function(){
  250 + this.setStrokeOpacity(0.5);
  251 + });
  252 + }
  253 +
  254 + function moveMarker(m, gps){
  255 + m.setPosition(new BMap.Point(gps.bd_lon, gps.bd_lat));
  256 + m.gpsData = gps;
  257 + //重新设置icon
  258 + //根据编码长度 计算marker 宽度
  259 + var w = gps.nbbm.length * 10;
  260 + m.setIcon(new BMap.Icon(gb_map_imap.createCarIcon(gps, w), new BMap.Size(w,25)));
  261 +
  262 + //更新 infoWindow
  263 + if(m.infoWindow.isOpen()){
  264 + bdOpenWindow(m);
  265 + }
  266 + }
  267 +
  268 + function setTop(m){
  269 + if(topMarker)
  270 + topMarker.setTop(false);
  271 + m.setTop(true);
  272 + topMarker = m;
  273 + }
  274 +
  275 + function bdOpenWindow(marker){
  276 + marker.gpsData.fromNow = moment(marker.gpsData.timestamp).fromNow();
  277 +
  278 + marker.infoWindow.setContent(gb_map_overlay_mge.map_gps_win_temp(marker.gpsData));
  279 + map.openInfoWindow(marker.infoWindow, marker.point);
  280 + }
  281 +
  282 +/* function centerToPolyline(polyline){
  283 + var pos=polyline.getPath();
  284 + map.panTo(pos[parseInt(pos.length / 2)]);
  285 + }*/
  286 +
  287 + //文件载入完毕
  288 + mapmonitor_load_ep.emitLater('load_baidu');
  289 +
  290 + return baiduInstance;
  291 +})();
... ...
src/main/resources/static/real_control_v2/mapmonitor/js/map/platform/gaode.js 0 → 100644
  1 +/** 高德地图相关接口封装 */
  2 +var gb_map_gaode = (function() {
  3 +
  4 + var mapLoadAnim = '<div class="sk-cube-grid _center">'
  5 + + '<div class="sk-cube sk-cube1"></div>'
  6 + + '<div class="sk-cube sk-cube2"></div>'
  7 + + '<div class="sk-cube sk-cube3"></div>'
  8 + + '<div class="sk-cube sk-cube4"></div>'
  9 + + '<div class="sk-cube sk-cube5"></div>'
  10 + + '<div class="sk-cube sk-cube6"></div>'
  11 + + '<div class="sk-cube sk-cube7"></div>'
  12 + + '<div class="sk-cube sk-cube8"></div>'
  13 + + '<div class="sk-cube sk-cube9"></div>' + '</div>';
  14 +
  15 + var map;
  16 + var topMarkr;
  17 + var realMarkers = {};
  18 + //线路路由线条
  19 + var linePolyline;
  20 + //实时路况是否显示
  21 + var traffVisible;
  22 + var gaodeInstance = {
  23 + init : function() {
  24 + var $mapCon = $(gb_map_consts.mapContainer);
  25 + $mapCon.html(mapLoadAnim);
  26 + //设置样式
  27 + gaodeInstance.setStyle();
  28 +
  29 + map = new AMap.Map($mapCon[0]);
  30 + // 地图中心和缩放级别
  31 + map.setZoomAndCenter(14, [ gb_map_consts.center_point.lng, gb_map_consts.center_point.lat ]);
  32 + // 加载完成
  33 + AMap.event.addListener(map, 'complete', function() {
  34 + layer.closeAll();
  35 + window.localStorage.setItem('real_map', 'gaode');
  36 + /*storage.setItem('real_map', REAL_GAODE_TEXT);
  37 + $('.sk-cube-grid._center').remove();*/
  38 + });
  39 +
  40 + // 实时路况图层
  41 + var trafficLayer = new AMap.TileLayer.Traffic();
  42 + trafficLayer.setMap(map);
  43 + trafficLayer.hide();
  44 +
  45 + $(gb_map_consts.trafficBtn).on('click', function() {
  46 + if (traffVisible) {
  47 + trafficLayer.hide();
  48 + traffVisible = false;
  49 + $(this).removeClass('active');
  50 + showLinePolyline();
  51 + } else {
  52 + trafficLayer.show();
  53 + traffVisible = true;
  54 + $(this).addClass('active');
  55 + hideLinePolyline();
  56 + }
  57 + });
  58 + },
  59 + setStyle : function() {
  60 + $('.mapRightWrap').addClass('gaode');
  61 + $('.mapTools').addClass('gaode');
  62 + $('.leftUtils').addClass('gaode');
  63 + },
  64 + destroy:function(){
  65 + realMarkers = {};
  66 + $('.mapRightWrap').removeClass('gaode');
  67 + $('.mapTools').removeClass('gaode');
  68 + $('.leftUtils').removeClass('gaode');
  69 + },
  70 + clear: function(){
  71 + realMarkers = {};
  72 + map.clearMap();
  73 + linePolyline = [];
  74 + },
  75 + drawLine: function(opts){
  76 + linePolyline = [];
  77 +
  78 + map.clearMap();
  79 +
  80 + var upArr = [], downArr = [];
  81 + var upLineOps = {path: upArr, strokeColor:"blue", strokeWeight:6, strokeOpacity:0.5}
  82 + ,downLineOps = {path: downArr, strokeColor:"red", strokeWeight:6, strokeOpacity:0.5};
  83 + var route = opts.route;
  84 + //上行
  85 + if(route.up){
  86 + $.each(route.up_gcj.split(','), function(){
  87 + tempArray = this.split(' ');
  88 + upArr.push([tempArray[0], tempArray[1]]);
  89 + });
  90 + var upLine = new AMap.Polyline(upLineOps);
  91 + //保存线条引用
  92 + linePolyline.push(upLine);
  93 + upLine.setMap(map);
  94 + map.setCenter(upArr[parseInt(upArr.length / 2)]);
  95 +
  96 + }
  97 + //下行
  98 + if(route.down){
  99 + $.each(route.down_gcj.split(','), function(){
  100 + tempArray = this.split(' ');
  101 + downArr.push([tempArray[0], tempArray[1]]);
  102 + });
  103 + var downLine = new AMap.Polyline(downLineOps);
  104 + //保存线条引用
  105 + linePolyline.push(downLine);
  106 + downLine.setMap(map);
  107 + }
  108 + //实时路况下不显示
  109 + if(traffVisible)
  110 + hideLinePolyline();
  111 + },
  112 + drawRealGpsMarker: function(opts){
  113 + var gpsArray = opts.gpsList;
  114 + var coord;
  115 + $.each(gpsArray, function(i, gps){
  116 + if(opts.coordTransform){
  117 + coord = TransGPS.transformFromWGSToGCJ(gps.lat, gps.lon);
  118 + gps.gcj_lat = coord.lat;
  119 + gps.gcj_lon = coord.lng;
  120 + }
  121 +
  122 + marker = realMarkers[gps.deviceId];
  123 + if(marker){
  124 + if(gps.timestamp == marker.gpsData.timestamp)
  125 + return;
  126 + else
  127 + moveMarker(marker, gps);//移动marker
  128 + }
  129 + else{
  130 + var marker = createGDMarkerByGps(gps);
  131 + realMarkers[gps.deviceId] = marker
  132 + }
  133 + });
  134 + },
  135 + goToMarker: function(opts){
  136 + var deviceId = opts.deviceId
  137 + ,m = realMarkers[deviceId];
  138 + if(m){
  139 + map.setCenter(m.getPosition());
  140 + setTop(m);
  141 + }
  142 + },
  143 + openWindow: function(opts){
  144 + var deviceId = opts.deviceId
  145 + ,m = realMarkers[deviceId];
  146 + openWindow(m);
  147 + }
  148 + };
  149 +
  150 + function createGDMarkerByGps(gps){
  151 + //根据编码长度 计算marker 宽度
  152 + var w = gps.nbbm.length * 10;
  153 +
  154 + var marker = new AMap.Marker({
  155 + map: map,
  156 + position: [gps.gcj_lon, gps.gcj_lat],
  157 + icon: new AMap.Icon({
  158 + size: new AMap.Size(w, 25), //图标大小
  159 + image: iMap.createCarIcon(gps, w)
  160 + }),
  161 + offset: new AMap.Pixel(-35, -12)
  162 + });
  163 +
  164 + //绑定数据
  165 + marker.gpsData = gps;
  166 + marker.infoWindow = new AMap.InfoWindow();
  167 +
  168 + marker.on('mouseover', function(){
  169 + setTop(this);
  170 + });
  171 + //点击事件
  172 + marker.on('click', function(){
  173 + openWindow(this);
  174 + });
  175 +
  176 + return marker;
  177 + }
  178 +
  179 + function moveMarker(m, gps){
  180 + m.setPosition(new AMap.LngLat(gps.gcj_lon, gps.gcj_lat));
  181 + m.gpsData = gps;
  182 + //重新设置icon
  183 + //根据编码长度 计算marker 宽度
  184 + var w = gps.nbbm.length * 10;
  185 + m.setIcon(new AMap.Icon({
  186 + size: new AMap.Size(w, 25),
  187 + image: iMap.createCarIcon(gps, w)
  188 + }));
  189 +
  190 + if(m.infoWindow.getIsOpen())
  191 + openWindow(m);
  192 + }
  193 +
  194 + //隐藏线路线条
  195 + function hideLinePolyline(){
  196 + if(!linePolyline || linePolyline.length == 0)
  197 + return;
  198 + layer.msg('隐藏线路图层',{offset: 'ct', shift : 5});
  199 + $.each(linePolyline, function(){
  200 + this.setOptions({strokeOpacity: 0});
  201 + });
  202 + }
  203 +
  204 + //显示线路线条
  205 + function showLinePolyline(){
  206 + if(!linePolyline || linePolyline.length == 0)
  207 + return;
  208 +
  209 + layer.msg('显示线路图层',{offset: 'ct', shift : 5});
  210 + $.each(linePolyline, function(){
  211 + this.setOptions({strokeOpacity: 0.5});
  212 + });
  213 + }
  214 +
  215 + function openWindow(marker){
  216 + marker.gpsData.fromNow = moment(marker.gpsData.timestamp).fromNow();
  217 + /*var infoWindow = new AMap.InfoWindow({
  218 + content: template('gps_info_win_temp', marker.gpsData)
  219 + });*/
  220 + marker.infoWindow.setContent(template('gps_info_win_temp', marker.gpsData));
  221 + marker.infoWindow.open(map, marker.getPosition());
  222 + }
  223 +
  224 + function setTop(marker){
  225 + if(topMarkr)
  226 + topMarkr.setzIndex(1);
  227 + marker.setzIndex(2);
  228 + topMarkr = marker;
  229 + }
  230 +
  231 + //文件载入完毕
  232 + mapmonitor_load_ep.emitLater('load_gaode');
  233 +
  234 + return gaodeInstance;
  235 +})();
... ...
src/main/resources/static/real_control_v2/mapmonitor/js/map_overlay_manager.js 0 → 100644
  1 +var gb_map_overlay_mge = (function () {
  2 +
  3 + var storage = window.localStorage;
  4 +
  5 + var temps;
  6 + $.get('/real_control_v2/mapmonitor/fragments/map_infowindow.html', function (dom) {
  7 + temps = gb_common.compileTempByDom(dom, {compress: true});
  8 + });
  9 +
  10 + var gpsRefresh = function (addArr, upArr, upDownChange) {
  11 + var all = addArr.concat(upArr).concat(upDownChange);
  12 + gpsRefreshAll(all);
  13 +
  14 + };
  15 +
  16 + var gpsRefreshAll = function (allList) {
  17 + gb_map_imap.call('drawRealGpsMarker', {gpsList: allList});
  18 + };
  19 +
  20 + var deviceFilter = function (node) {
  21 + return node.a_attr && node.a_attr.type=='device';
  22 + };
  23 +
  24 + //绘制线路走向
  25 + var drawAllSection=function () {
  26 + //绘制线路走向
  27 + var lines=JSON.parse(storage.getItem('lineControlItems'));
  28 + $.each(lines, function () {
  29 + //从storage里获取路由数据
  30 + var lineCode=this.lineCode;
  31 + var route = JSON.parse(storage.getItem(lineCode + '_route'));
  32 + //上行
  33 + gb_map_imap.call('drawLine', {
  34 + route: route,
  35 + style: {strokeWeight:6, strokeColor: 'blue'},
  36 + id: lineCode+'_0',
  37 + upDown: 0,
  38 + hide: true
  39 + });
  40 + //下行
  41 + gb_map_imap.call('drawLine', {
  42 + route: route,
  43 + style: {strokeWeight:6, strokeColor: 'red'},
  44 + id: lineCode+'_1',
  45 + upDown: 1,
  46 + hide: true
  47 + });
  48 +
  49 + });
  50 + };
  51 +
  52 + //根据选中项显示路段
  53 + var showSection = function (chs) {
  54 + var idx = {};
  55 + $.each(chs, function () {
  56 + idx[this.data.lineId+'_'+this.data.upDown]=1;
  57 + });
  58 +
  59 + gb_map_imap.call('refreshPolyline', {idx: gb_common.get_keys(idx)});
  60 + };
  61 +
  62 + var init = function () {
  63 +
  64 + drawAllSection();
  65 + //初始绘制
  66 + gpsRefreshAll(gb_common.get_vals(gb_data_gps.allGps));
  67 +
  68 + showOverlayByChecks();
  69 + //显示路段
  70 + showSection(gb_map_gps_tree.getChecked().filter(deviceFilter));
  71 + //注册GPS刷新事件
  72 + gb_data_gps.registerCallback(gpsRefresh);
  73 + };
  74 +
  75 +
  76 + var showOverlayByChecks = function () {
  77 + var chs = gb_map_gps_tree.getChecked().filter(deviceFilter),chsMap={};
  78 + $.each(chs, function () {
  79 + chsMap[this.a_attr.device]=true;
  80 + });
  81 +
  82 + gb_map_imap.call('showGpsMarker', {chs: chsMap});
  83 +
  84 + //路段
  85 + showSection(chs);
  86 +
  87 + };
  88 +
  89 + var _focus = function (deviceId) {
  90 + gb_map_imap.call('goToMarker', {deviceId: deviceId});
  91 + //打开信息窗口
  92 + gb_map_imap.call('openWindow',{deviceId: deviceId});
  93 + };
  94 + return {
  95 + init: init,
  96 + refresh: showOverlayByChecks,
  97 + _focus: _focus,
  98 + map_gps_win_temp: function (data) {
  99 + return temps['map-win-gps-detail-temp'](data);
  100 + }
  101 + };
  102 +})();
0 103 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/mapmonitor/js/real.js 0 → 100644
  1 +var mapmonitor_load_ep = EventProxy.create('load_iMap', 'load_baidu', 'load_gaode', function () {
  2 + moment.locale('zh-cn');
  3 + //地图
  4 + gb_map_imap.addMap('baidu', '百度地图', gb_map_baidu)
  5 + .addMap('gaode', '高德地图', gb_map_gaode)
  6 + .call('init');
  7 +
  8 + //init config form
  9 + gb_map_config.init();
  10 +
  11 + //init tree
  12 + gb_map_gps_tree.init(gb_map_overlay_mge.init);
  13 +
  14 + $(".real_bottom_panel").resizable({
  15 + handles: {
  16 + 'n': '.real_bottom_panel #handle'
  17 + },
  18 + maxHeight: 650,
  19 + minHeight: 18
  20 + });
  21 +});
  22 +
  23 +var gb_map_consts = {
  24 + mapContainer: '#real_map_container',
  25 + center_point: {
  26 + lng: 121.544336,
  27 + lat: 31.221315
  28 + }
  29 +};
  30 +
  31 +//Canvas 带圆角的矩形
  32 +CanvasRenderingContext2D.prototype.roundRect = function (x, y, w, h, r) {
  33 + if (w < 2 * r) r = w / 2;
  34 + if (h < 2 * r) r = h / 2;
  35 + this.strokeStyle ='rgba(0,102,0,.1)';
  36 + this.beginPath();
  37 + this.moveTo(x+r, y);
  38 + this.arcTo(x+w, y, x+w, y+h, r);
  39 + this.arcTo(x+w, y+h, x, y+h, r);
  40 + this.arcTo(x, y+h, x, y, r);
  41 + this.arcTo(x, y, x+w, y, r);
  42 + this.closePath();
  43 + return this;
  44 +}
0 45 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/mapmonitor/real.html 0 → 100644
  1 +<link href="/assets/css/TrafficControl.css" rel="stylesheet"/>
  2 +<link rel="stylesheet" href="/real_control_v2/assets/plugins/jquery.ui/themes/base/all.css"/>
  3 +<link rel="stylesheet" href="/real_control_v2/assets/plugins/spectrum/spectrum.css"/>
  4 +<link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/form-advanced.gradient.min.css"/>
  5 +<link rel="stylesheet" href="/real_control_v2/mapmonitor/css/real.css"/>
  6 +
  7 +<div class="map-system-msg">
  8 + <a class="z-depth-2" href="/pages/mapmonitor/alone/wrap.html" target="_blank"><i style="transform: rotate(90deg);" class="uk-icon-hand-pointer-o"></i> 当前地图模块正在维护升级中,请点这里打开原版地图。</a>
  9 +</div>
  10 +
  11 +<div id="real_map_container"></div>
  12 +<div class="real_right_gps_panel">
  13 + <form class="uk-form" data-uk-margin="">
  14 + <div class="uk-form-icon">
  15 + <i class="uk-icon-search"></i>
  16 + <input type="text" placeholder="搜索..." >
  17 + </div>
  18 + </form>
  19 +
  20 + <div class="gps_tree_list"></div>
  21 +</div>
  22 +
  23 +<div class="real_bottom_panel">
  24 + <div id="handle" class="ui-resizable-handle ui-resizable-n"></div>
  25 + <div class="real_bl_cont">
  26 +
  27 + </div>
  28 + <div class="real_br_cont map_config_wrap">
  29 + </div>
  30 +</div>
  31 +
  32 +
  33 +<script src="/real_control_v2/mapmonitor/js/config.js"></script>
  34 +<script src="/real_control_v2/mapmonitor/js/gps_tree.js"></script>
  35 +<script src="/real_control_v2/mapmonitor/js/map_overlay_manager.js"></script>
  36 +<script src="/real_control_v2/mapmonitor/js/real.js"></script>
  37 +<script src="/real_control_v2/mapmonitor/js/map/iMap.js"></script>
  38 +<script src="/real_control_v2/mapmonitor/js/map/platform/baidu.js"></script>
  39 +<script src="/real_control_v2/mapmonitor/js/map/platform/gaode.js"></script>
  40 +<!-- jquery ui -->
  41 +<script src="/real_control_v2/assets/plugins/jquery.ui/core.js"></script>
  42 +<script src="/real_control_v2/assets/plugins/jquery.ui/widget.js"></script>
  43 +<script src="/real_control_v2/assets/plugins/jquery.ui/mouse.js"></script>
  44 +<script src="/real_control_v2/assets/plugins/jquery.ui/resizable.js"></script>
  45 +<!-- 颜色选择器 -->
  46 +<script src="/real_control_v2/assets/plugins/spectrum/spectrum.js"></script>
0 47 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/mapmonitor/real_monitor/css/real.css
... ... @@ -30,7 +30,7 @@
30 30 .map_rt_wrap .uk-tab {
31 31 background: white;
32 32 font-family: 华文细黑;
33   - border-radius: 5px
  33 + border-radius: 5px;
34 34 width: 350px;
35 35 float: right;
36 36 }
... ...