Commit 67a99dff157f7a0e348201570de4e7a5d29f146e

Authored by 徐烜
2 parents 33038a9b e12399e3

Merge branch 'minhang' of http://222.66.0.204:8090//panzhaov5/bsth_control into minhang

Showing 37 changed files with 3143 additions and 2778 deletions
src/main/java/com/bsth/controller/forms/ExportController.java
... ... @@ -82,7 +82,7 @@ public class ExportController {
82 82 }
83 83  
84 84 // 班次车辆人员日统计
85   - @RequestMapping(value = "/shifdayExport", method = RequestMethod.POST)
  85 + @RequestMapping(value = "/shifdayExport", method = RequestMethod.GET)
86 86 public List<Map<String, Object>> shifdayExport(@RequestParam Map<String, Object> map) {
87 87 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
88 88 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
... ... @@ -122,7 +122,7 @@ public class ExportController {
122 122 }
123 123  
124 124 // 班次车辆人员月统计
125   - @RequestMapping(value = "/shiftuehiclemanthExport", method = RequestMethod.POST)
  125 + @RequestMapping(value = "/shiftuehiclemanthExport", method = RequestMethod.GET)
126 126 public List<Map<String, Object>> shiftuehiclemanthExport(@RequestParam Map<String, Object> map) {
127 127 SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"), sdfSimple = new SimpleDateFormat("yyyyMMdd");
128 128 List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
... ... @@ -147,12 +147,18 @@ public class ExportController {
147 147 }
148 148  
149 149 try {
  150 + String mouldurl = null;
  151 + if(map.get("empnames").equals("驾驶员")){
  152 + mouldurl="mould/shiftuehiclemanth.xls";
  153 + }else if(map.get("empnames").equals("售票员")){
  154 + mouldurl="mould/shiftuehiclemanthspy.xls";
  155 + }else if(map.get("empnames").equals("路牌")){
  156 + mouldurl="mould/shiftuehiclemanthlp.xls";
  157 + }
150 158 listI.add(resList.iterator());
151   -
152 159 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
153   - ee.excelReplace(listI, new Object[] { map }, path + "mould/shiftuehiclemanth.xls", path
154   - + "export/班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
155   -
  160 + ee.excelReplace(listI, new Object[] { map }, path +mouldurl,
  161 + path + "export/班次车辆人员月报表" + sdfSimple.format(sdfMonth.parse(map.get("startDate").toString())) + ".xls");
156 162 } catch (Exception e) {
157 163 e.printStackTrace();
158 164 }
... ...
src/main/java/com/bsth/controller/forms/MCY_FormsController.java
... ... @@ -52,14 +52,14 @@ public class MCY_FormsController {
52 52 }
53 53  
54 54 // 班次车辆人员月报表
55   - @RequestMapping(value = "/shiftuehiclemanth", method = RequestMethod.POST)
  55 + @RequestMapping(value = "/shiftuehiclemanth", method = RequestMethod.GET)
56 56 public List<Shiftuehiclemanth> shiftuehiclemanth(@RequestParam Map<String, Object> map) {
57 57  
58 58 return formsService.shiftuehiclemanth(map);
59 59 }
60 60  
61 61 // 班次车辆人员日统计
62   - @RequestMapping(value = "/shifday", method = RequestMethod.POST)
  62 + @RequestMapping(value = "/shifday", method = RequestMethod.GET)
63 63 public List<Shifday> shifday(@RequestParam Map<String, Object> map) {
64 64  
65 65 return formsService.shifday(map);
... ...
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
... ... @@ -369,8 +369,35 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
369 369 }
370 370  
371 371 @RequestMapping(value="/statisticsDailyTj")
372   - public List<Map<String,Object>> statisticsDailyTj(@RequestParam String gsdm,@RequestParam String fgsdm, @RequestParam String line, @RequestParam String date,
373   - @RequestParam String date2,@RequestParam String xlName, @RequestParam String type){
  372 + public List<Map<String,Object>> statisticsDailyTj(@RequestParam Map<String, Object> map){
  373 + String gsdm="";
  374 + if(map.get("gsdm")!=null){
  375 + gsdm=map.get("gsdm").toString();
  376 + }
  377 + String fgsdm="";
  378 + if(map.get("fgsdm")!=null){
  379 + fgsdm=map.get("fgsdm").toString();
  380 + }
  381 + String line="";
  382 + if(map.get("line")!=null){
  383 + line=map.get("line").toString();
  384 + }
  385 + String date="";
  386 + if(map.get("date")!=null){
  387 + date=map.get("date").toString();
  388 + }
  389 + String date2="";
  390 + if(map.get("date2")!=null){
  391 + date2=map.get("date2").toString();
  392 + }
  393 + String xlName="";
  394 + if(map.get("xlName")!=null){
  395 + xlName=map.get("xlName").toString();
  396 + }
  397 + String type="";
  398 + if(map.get("type")!=null){
  399 + type=map.get("type").toString();
  400 + }
374 401 return scheduleRealInfoService.statisticsDailyTj(gsdm,fgsdm,line, date,date2, xlName, type);
375 402 }
376 403  
... ...
src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java
... ... @@ -155,12 +155,32 @@ public class InOutStationSignalHandle extends SignalHandle{
155 155 }
156 156 else if(sch.getBcType().equals("out")){
157 157 ScheduleRealInfo next = dayOfSchedule.nextSame(sch);
  158 + //如果下一个班次是区间,并且是环线
  159 + if(next != null && next.getBcType().equals("region")){
  160 + next = dayOfSchedule.nextSame(next);
  161 + if(next == null || !next.getQdzName().equals(next.getZdzName())){
  162 + return;
  163 + }
  164 + }
158 165 if(next != null && prev.getStopNo().equals(next.getQdzCode())){
159 166 //发下一个班次
160 167 dayOfSchedule.addExecPlan(next);
161 168 outStation(gps, prev);
162 169 }
163 170 }
  171 + //当前班次是区间
  172 + else if(sch.getBcType().equals("region")){
  173 + ScheduleRealInfo next = dayOfSchedule.nextSame(sch);
  174 + if(next==null || !next.getQdzName().equals(next.getZdzName())){
  175 + return;
  176 + }
  177 + //是环线
  178 + if(prev.getStopNo().equals(next.getQdzCode())){
  179 + //发下一个班次
  180 + dayOfSchedule.addExecPlan(next);
  181 + outStation(gps, prev);
  182 + }
  183 + }
164 184 }
165 185  
166 186  
... ...
src/main/java/com/bsth/data/gpsdata/recovery/GpsDataRecovery.java
... ... @@ -60,7 +60,7 @@ public class GpsDataRecovery implements ApplicationContextAware {
60 60 for (String nbbm : keys) {
61 61 Collections.sort(listMap.get(nbbm), comp);
62 62 threadPool.execute(new RecoveryThread(listMap.get(nbbm), count));
63   - /*if(nbbm.equals("SXC-YD012"))
  63 + /*if(nbbm.equals("W9G-013"))
64 64 new RecoveryThread(listMap.get(nbbm), count).run();*/
65 65 }
66 66  
... ... @@ -150,6 +150,8 @@ public class GpsDataRecovery implements ApplicationContextAware {
150 150 CircleQueue<GpsEntity> prevs;
151 151 boolean task;
152 152 for (GpsEntity gps : list) {
  153 + /*if(gps.getTimestamp() > 1491951840000L)
  154 + System.out.print("");*/
153 155  
154 156 //是否有任务
155 157  
... ...
src/main/java/com/bsth/data/safe_driv/SafeDrivCenter.java
... ... @@ -46,8 +46,8 @@ public class SafeDrivCenter implements CommandLineRunner,ApplicationContextAware
46 46 if(sd.getYczltype().indexOf("A") == -1)
47 47 sd.setYczltype("A" + sd.getYczltype());
48 48  
49   - SafeDriv old = safeMap.get(sd.getClzbh());
50   - if(old == null || sd.getTs() > old.getTs()){
  49 + //SafeDriv old = safeMap.get(sd.getClzbh());
  50 + if(!data.contains(sd)){
51 51 //通知客户端
52 52 sendUtils.sendSafeDriv(sd);
53 53 data.add(sd);
... ... @@ -67,7 +67,7 @@ public class SafeDrivCenter implements CommandLineRunner,ApplicationContextAware
67 67 @Override
68 68 public void run(String... strings) throws Exception {
69 69 //定时加载安全驾驶数据
70   - //Application.mainServices.scheduleWithFixedDelay(safeDrivDataLoadThread, 60, 60, TimeUnit.SECONDS);
  70 + //Application.mainServices.scheduleWithFixedDelay(safeDrivDataLoadThread, 60, 4, TimeUnit.SECONDS);
71 71 }
72 72  
73 73 @Override
... ...
src/main/java/com/bsth/data/schedule/thread/CalcOilThread.java
1 1 package com.bsth.data.schedule.thread;
2 2  
  3 +import com.bsth.service.oil.DlbService;
3 4 import com.bsth.data.safe_driv.SafeDrivCenter;
4 5 import com.bsth.service.oil.YlbService;
5 6 import org.slf4j.Logger;
... ... @@ -16,7 +17,8 @@ public class CalcOilThread extends Thread{
16 17  
17 18 @Autowired
18 19 YlbService ylbService;
19   -
  20 + @Autowired
  21 + DlbService dlbService;
20 22 Logger logger = LoggerFactory.getLogger(this.getClass());
21 23  
22 24 @Override
... ... @@ -24,6 +26,7 @@ public class CalcOilThread extends Thread{
24 26 try{
25 27 logger.info("开始计算路单里程加注量....");
26 28 ylbService.obtainDsq();
  29 + dlbService.obtainDsq();
27 30 logger.info("计算路单里程加注量结束!");
28 31  
29 32 //清除安全驾驶数据 先临时蹭这个线程
... ...
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
... ... @@ -155,8 +155,13 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
155 155 List<ScheduleRealInfo> scheduleByDateAndLineTj(String line,String date,String date2,String gsdm,String fgsdm);
156 156  
157 157 //按照时间段统计
158   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 and s.bcType not in ('in','out') order by s.xlBm")
159   - List<ScheduleRealInfo> scheduleByDateAndLineTj2(String line,String date,String date2);
  158 + @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
  159 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 and s.bcType not in ('in','out') order by s.xlBm")
  160 + List<ScheduleRealInfo> scheduleByDateAndLineTj2(String line,String date,String date2);
  161 + //月报表
  162 + @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
  163 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 order by s.xlBm")
  164 + List<ScheduleRealInfo> scheduleByDateAndLineYbb(String line,String date,String date2);
160 165  
161 166 @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,min(s.fcsj) as fcsj ) from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% GROUP BY xlBm,clZbh,jGh,scheduleDate,jGh ORDER BY clZbh,fcsj")
162 167 List<Map<String,Object>> yesterdayDataList(String line,String date,String gsbm,String fgsbm);
... ...
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
... ... @@ -147,59 +147,94 @@ public class FormsServiceImpl implements FormsService {
147 147  
148 148 @Override
149 149 public List<Shiftuehiclemanth> shiftuehiclemanth(Map<String, Object> map) {
150   - String sql = "select r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type "
  150 + final String empnames=map.get("empnames").toString();
  151 + String gsdmManth="";
  152 + String fgsdmManth="";
  153 + if(map.containsKey("gsdmManth")){
  154 + gsdmManth=map.get("gsdmManth").toString();
  155 + }
  156 + if(map.containsKey("fgsdmManth")){
  157 + fgsdmManth=map.get("fgsdmManth").toString();
  158 + }
  159 + String sql = "select r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type,r.s_name,r.lp_name "
151 160 + " from bsth_c_s_sp_info_real r "
152 161 + " where 1=1 ";
153   - if(map.get("startDate").toString()!=""){
  162 + if(map.get("startDate")!=null&&!map.get("startDate").equals("")){
154 163 sql+=" and to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') ";
155 164 }
156 165  
157   - if(map.get("endDate").toString()!=""){
  166 + if(map.get("endDate")!=null&&!map.get("endDate").equals("")){
158 167 sql+=" and to_days('" + map.get("endDate").toString() + "') ";
159 168 }
160   - if( map.get("line").toString()!=""){
  169 + if(map.get("line")!=null&&!map.get("line").equals("")){
161 170 sql+=" and r.xl_bm='"+ map.get("line").toString() + "' ";
162 171 }
163 172 sql+= " AND r.gs_bm is not null and r.bc_type not in('in','out')";
164   - if(map.get("gsdmManth").toString()!=""){
  173 + if(map.get("gsdmManth")!=null&&!map.get("gsdmManth").equals("")){
165 174 sql+=" and r.gs_bm='"+map.get("gsdmManth").toString()+"' ";
166 175 }
167   - if(map.get("fgsdmManth").toString()!=""){
  176 + if(map.get("fgsdmManth")!=null&&!map.get("fgsdmManth").equals("")){
168 177 sql+=" and r.fgs_bm='"+map.get("fgsdmManth").toString()+"' ";
169 178 }
  179 + if(empnames.equals("售票员")){
  180 + sql+="and r.s_name is not null AND r.s_name !=''";
  181 + }
170 182 sql += " GROUP BY r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type ";
171 183  
172   - startDate = map.get("startDate").toString();
173   - endDate = map.get("endDate").toString();
  184 +
174 185 List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() {
175   -
  186 +
176 187 @Override
177 188 public Shiftuehiclemanth mapRow(ResultSet arg0, int arg1) throws SQLException {
178 189 Shiftuehiclemanth shif = new Shiftuehiclemanth();
179   - shif.setjName(arg0.getString("j_name"));
  190 + if(empnames.equals("驾驶员")){
  191 + shif.setjName(arg0.getString("j_name"));
  192 + }else if(empnames.equals("售票员")){
  193 + shif.setjName(arg0.getString("s_name")==null ? "":arg0.getString("s_name"));
  194 + }else if(empnames.equals("路牌")){
  195 + shif.setjName(arg0.getString("lp_name"));
  196 + }
  197 +
180 198 shif.setJgh(arg0.getString("j_gh"));
181 199 shif.setZbh(arg0.getString("cl_zbh"));
182 200 return shif;
183 201 }
184 202 });
185 203  
  204 + List<ScheduleRealInfo> sList;
  205 + List<ScheduleRealInfo> lists=scheduleRealInfoRepository.scheduleByDateAndLineYbb(map.get("line").toString(), map.get("startDate").toString(), map.get("endDate").toString());
186 206 for(int i=0;i<list.size();i++){
187   - Shiftuehiclemanth s=list.get(i);
188   - Map<String, Object> maps = new HashMap<>();
189   -
190   - maps = commonService.findKMBC1(s.getjName(),s.getZbh(), startDate,
191   - endDate);
192   -
193   - s.setJhlc(maps.get("jhlc").toString());
194   - s.setEmptMileage(maps.get("ksgl").toString());
195   - s.setRemMileage(maps.get("remMileage").toString());
196   - s.setAddMileage(maps.get("addMileage").toString());
197   - s.setTotalm(maps.get("realMileage").toString());
198   - s.setCjbc(maps.get("cjbc").toString());
199   - s.setLjbc(maps.get("ljbc").toString());
200   - s.setSjbc(maps.get("sjbc").toString());
201   -
  207 + sList =new ArrayList<ScheduleRealInfo>();
  208 + Shiftuehiclemanth d=list.get(i);
  209 + for (int j = 0; j < lists.size(); j++) {
  210 + ScheduleRealInfo s=lists.get(j);
  211 + if(d.getJgh().equals(s.getjGh()) && d.getZbh().equals(s.getClZbh())){
  212 + sList.add(s);
  213 + }
  214 + }
  215 +
  216 + double ksgl=culateMileageService.culateKsgl(sList);
  217 + double jccgl=culateMileageService.culateJccgl(sList);
  218 + double zksgl=Arith.add(ksgl, jccgl);
  219 + double ljgl=culateMileageService.culateLjgl(sList);
  220 + double sjgl=culateMileageService.culateSjgl(sList);
  221 + double zyygl=Arith.add(ljgl, sjgl);
  222 + double cjbc=culateMileageService.culateLbbc(sList);
  223 + double Ljbc=culateMileageService.culateLjbc(sList,"");
  224 + double cjgl=culateMileageService.culateLbgl(sList);
  225 + double zjgl=culateMileageService.culateLjgl(sList);
  226 + d.setEmptMileage(String.valueOf(zksgl));//空驶公里
  227 + d.setTotalm(String.valueOf(Arith.add(zksgl, zyygl)));//总公里
  228 + d.setSjbc(String.valueOf(culateMileageService.culateSjbc(sList, "")+culateMileageService.culateLjbc(sList, "")));
  229 + d.setJhlc(String.valueOf(zyygl));//运营里程
  230 + d.setCjbc(String.valueOf(cjbc));//抽检班次
  231 + d.setLjbc(String.valueOf(Ljbc));//增加班次
  232 + d.setRemMileage(String.valueOf(cjgl));//抽检里程
  233 + d.setAddMileage(String.valueOf(zjgl));//增加里程
  234 +
202 235 }
  236 +
  237 +
203 238 return list;
204 239 }
205 240  
... ... @@ -207,32 +242,30 @@ public class FormsServiceImpl implements FormsService {
207 242 @Override
208 243 public List<Shifday> shifday(Map<String, Object> map) {
209 244  
210   - String sql ="select t.* from (select r.schedule_date,r.j_name,IFNULL(r.s_name,'')as s_name,"
211   - + " r.cl_zbh,r.xl_bm, r.j_gh,r.gs_bm,r.fgs_bm FROM bsth_c_s_sp_info_real r where 1=1 "
212   - + " and to_days(r.schedule_date)=to_days('"+ map.get("date").toString() + "') "
213   - + " and r.xl_bm like '%"+map.get("line").toString()+"%' "
214   - + " and r.gs_bm='"+map.get("gsdmShif").toString()+"' "
215   - + " and r.fgs_bm='"+map.get("fgsdmShif").toString()+"' ) t"
216   - + " GROUP BY t.schedule_date,t.j_name,t.s_name, t.cl_zbh,t.xl_bm,t.j_gh,t.gs_bm,t.fgs_bm ";
217   - /*String sql = " select r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,"
218   - + " r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name,r.bc_type "
219   - + " FROM bsth_c_s_sp_info_real r "
220   - + " where 1=1 ";
221   - if(map.get("date").toString()!=""){
222   - sql+=" and to_days(r.schedule_date)=to_days('"+ map.get("date").toString() + "') ";
  245 + String line="";
  246 + String date="";
  247 + String gsdmShif="";
  248 + String fgsdmShif="";
  249 + if(map.get("line")!=null&&!map.get("line").equals("")){
  250 + line =map.get("line").toString();
223 251 }
224   - if( map.get("line").toString()!=""){
225   - sql+=" and r.xl_bm=" + map.get("line").toString();
  252 + if(map.get("date")!=null&&!map.get("date").equals("")){
  253 + date =map.get("date").toString();
226 254 }
227   - sql+= " and r.bc_type not in('in','out')";
228   - if(map.get("gsdmShif").toString()!=""){
229   - sql+=" and r.gs_bm='"+map.get("gsdmShif").toString()+"'";
  255 + if(map.get("gsdmShif")!=null&&!map.get("gsdmShif").equals("")){
  256 + gsdmShif =map.get("gsdmShif").toString();
230 257 }
231   - if(map.get("fgsdmShif").toString()!=""){
232   - sql+=" and r.fgs_bm='"+map.get("fgsdmShif").toString()+"'";
233   - }
234   - sql += " GROUP BY r.schedule_date,r.lp_name,r.xl_name,r.j_name,r.s_name, r.cl_zbh,r.xl_bm,r.cl_zbh,r.j_gh,r.j_gh,r.gs_bm,r.gs_name,r.fgs_bm,r.fgs_name "
235   - + " ORDER BY r.lp_name asc";*/
  258 + if(map.get("fgsdmShif")!=null&&!map.get("fgsdmShif").equals("")){
  259 + fgsdmShif =map.get("fgsdmShif").toString();
  260 + }
  261 + String sql ="select t.* from (select r.schedule_date,r.j_name,IFNULL(r.s_name,'')as s_name,"
  262 + + " r.cl_zbh,r.xl_bm, r.j_gh,r.gs_bm,r.fgs_bm,r.lp_name FROM bsth_c_s_sp_info_real r where 1=1 "
  263 + + " and to_days(r.schedule_date)=to_days('"+date + "') "
  264 + + " and r.xl_bm like '%"+line+"%' "
  265 + + " and r.gs_bm like '%"+gsdmShif+"%' "
  266 + + " and r.fgs_bm like '%"+fgsdmShif+"%' ) t"
  267 + + " GROUP BY t.schedule_date,t.j_name,t.s_name, t.cl_zbh,t.xl_bm,t.j_gh,t.gs_bm,t.fgs_bm ";
  268 +
236 269  
237 270 List<Shifday> list = jdbcTemplate.query(sql, new RowMapper<Shifday>() {
238 271  
... ... @@ -244,31 +277,48 @@ public class FormsServiceImpl implements FormsService {
244 277 shifday.setsName(arg0.getString("s_name") == null ? "" : arg0.getString("s_name").toString());
245 278 shifday.setCarPlate(arg0.getString("cl_zbh").toString());
246 279 shifday.setJgh(arg0.getString("j_gh"));
  280 + shifday.setLpName(arg0.getString("lp_name")== null ? "" : arg0.getString("lp_name").toString());
247 281 return shifday;
248 282 }
249 283  
250 284 });
251   -
  285 + List<ScheduleRealInfo> sList;
  286 + List<ScheduleRealInfo> lists=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(map.get("line").toString(), map.get("date").toString());
252 287 for(int i=0;i<list.size();i++){
253   - Shifday shi=list.get(i);
254   - Map<String, Object> maps = new HashMap<>();
255   - maps = commonService.findKMBC2(shi.getJgh(), shi.getCarPlate(),
256   - shi.getRq());
257   - shi.setJhlc(maps.get("jhlc").toString());// 计划里程
258   - //shifday.setSjjhlc(map.get("remMileage").toString());//实际计划里程
259   - shi.setYygl(maps.get("yygl").toString());// 营运里程
260   - shi.setEmptMileage(maps.get("ksgl").toString());// 空驶里程
261   - shi.setRemMileage(maps.get("remMileage").toString());// 抽减里程
262   - shi.setAddMileage(maps.get("addMileage").toString());// 增加里程
263   - shi.setTotalm(maps.get("realMileage").toString());// 总里程
264   - shi.setJhbc(maps.get("jhbc").toString());// 计划班次
265   - //shifday.setSjjhbc(map.get("sjjhbc").toString());//实际计划班次
266   - shi.setCjbc(maps.get("cjbc").toString());// 抽减班次
267   - shi.setLjbc(maps.get("ljbc").toString());// 增加班次
268   - shi.setSjbc(maps.get("sjbc").toString());// 实际班次
269   -
270   - }
271   -
  288 + sList =new ArrayList<ScheduleRealInfo>();
  289 + Shifday d=list.get(i);
  290 + for (int j = 0; j < lists.size(); j++) {
  291 + ScheduleRealInfo s=lists.get(j);
  292 + if(d.getJgh().equals(s.getjGh()) && d.getCarPlate().equals(s.getClZbh())){
  293 + sList.add(s);
  294 + }
  295 + }
  296 +
  297 + double ksgl=culateMileageService.culateKsgl(sList);
  298 + double jccgl=culateMileageService.culateJccgl(sList);
  299 + double zksgl=Arith.add(ksgl, jccgl);
  300 + double ljgl=culateMileageService.culateLjgl(sList);
  301 + double sjgl=culateMileageService.culateSjgl(sList);
  302 + double zyygl=Arith.add(ljgl, sjgl);
  303 + double jhgl=culateMileageService.culateJhgl(sList);
  304 + double cjgl=culateMileageService.culateLbgl(sList);
  305 + double jhbc =culateMileageService.culateJhbc(sList,"");
  306 + double cjbc=culateMileageService.culateLbbc(sList);
  307 + double Ljbc=culateMileageService.culateLjbc(sList,"");
  308 + double zjgl=culateMileageService.culateLjgl(sList);
  309 + d.setEmptMileage(String.valueOf(zksgl));//空驶公里
  310 + d.setTotalm(String.valueOf(Arith.add(zksgl, zyygl)));//总公里
  311 + d.setSjbc(String.valueOf(culateMileageService.culateSjbc(sList, "")+culateMileageService.culateLjbc(sList, "")));
  312 + d.setJhlc(String.valueOf(jhgl));//计划里程
  313 + d.setYygl(String.valueOf(zyygl));//运营公里
  314 + d.setSjjhlc(String.valueOf(sjgl));//实际计划里程
  315 + d.setRemMileage(String.valueOf(cjgl));//抽减里程
  316 + d.setJhbc(String.valueOf(jhbc));//计划班次
  317 + d.setCjbc(String.valueOf(cjbc));//抽检班次
  318 + d.setLjbc(String.valueOf(Ljbc));//增加班次
  319 + d.setAddMileage(String.valueOf(zjgl));//增加公里
  320 + d.setSjjhbc(String.valueOf(culateMileageService.culateSjbc(sList, "")));//实际计划班次
  321 + }
272 322 return list;
273 323 }
274 324  
... ...
src/main/java/com/bsth/service/oil/DlbService.java
... ... @@ -18,4 +18,6 @@ public interface DlbService extends BaseService&lt;Dlb, Integer&gt;{
18 18 Map<String, Object> sumYlb(Map<String, Object> map);
19 19  
20 20 Map<String, Object> saveDlbList(Map<String, Object> map) throws Exception;
  21 +
  22 + String obtainDsq() throws Exception;
21 23 }
... ...
src/main/java/com/bsth/service/oil/impl/DlbServiceImpl.java
... ... @@ -6,6 +6,7 @@ import java.text.DecimalFormat;
6 6 import java.text.ParseException;
7 7 import java.text.SimpleDateFormat;
8 8 import java.util.ArrayList;
  9 +import java.util.Calendar;
9 10 import java.util.Date;
10 11 import java.util.HashMap;
11 12 import java.util.Iterator;
... ... @@ -70,8 +71,144 @@ public class DlbServiceImpl extends BaseServiceImpl&lt;Dlb,Integer&gt; implements DlbS
70 71 JdbcTemplate jdbcTemplate;
71 72  
72 73 Logger logger = LoggerFactory.getLogger(this.getClass());
  74 +
  75 + @Transactional
  76 + @Override
  77 + public String obtainDsq() throws Exception{
  78 + String result = "failure";
  79 + List<Cars> carsList=carsRepository.findCars();
  80 + Map<String, Boolean> carsMap=new HashMap<String, Boolean>();
  81 + for (int i = 0; i < carsList.size(); i++) {
  82 + Cars c=carsList.get(i);
  83 + carsMap.put(c.getInsideCode(), c.getSfdc());
  84 + }
  85 + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
  86 + Date dNow = new Date(); //当前时间
  87 + Date dBefore = new Date();
  88 + Calendar calendar = Calendar.getInstance(); //得到日历
  89 + calendar.setTime(dNow);//把当前时间赋给日历
  90 + calendar.add(Calendar.DAY_OF_MONTH, -1); //设置为前一天
  91 + dBefore = calendar.getTime(); //得到前一天的时间
  92 + String rq=sdf.format(dBefore);
  93 + String line="";
  94 + //保留两位小数
  95 + DecimalFormat df = new DecimalFormat("#.00");
  96 + // TODO Auto-generated method stub
  97 + Map<String, Object> newMap=new HashMap<String,Object>();
  98 + //当天DLB信息
  99 + List<Dlb> dlList=repository.obtainDl(rq, "", "", line, "", "nbbm");
  100 + //当天YLXXB信息
  101 + List<Ylxxb> ylxxList=ylxxbRepository.obtainYlxx(rq,1,"");
  102 + //当天加电信息表
  103 + List<Jdl> jdlList=jdlRepository.JdlList(rq);
  104 + //前一天所有车辆最后进场班次信息
  105 + List<Dlb> dlListBe=repository.obtainYlbefore(rq, "", "", "", "");
  106 + List<Cdl> cdyList=cdlRepository.obtainCdl();
  107 + //从排班表中计算出行驶的总里程
  108 + List<Map<String,Object>> listpb=scheduleRealInfoService.yesterdayDataList(line,rq,"","","","");
  109 + List<Ylb> addList=new ArrayList<Ylb>();
  110 + List<Ylb> updateList=new ArrayList<Ylb>();
  111 + for(int x=0;x<listpb.size();x++){
  112 + String type="add";
  113 + boolean sfdc=false;
  114 + Map<String, Object> map=listpb.get(x);
  115 + if (carsMap.get(map.get("clZbh").toString())!=null) {
  116 + sfdc= carsMap.get(map.get("clZbh").toString());
  117 + }else{
  118 + sfdc=false;
  119 + }
  120 + if(sfdc){
  121 + //判断驾驶员驾驶的该车辆是否已经存入了(查出的结果集中日期是相同的,根据驾驶员、内部编号、线路编码判断)
  122 + Dlb t=new Dlb();
  123 + for(int k=0;k<dlList.size();k++){
  124 + Dlb t1=dlList.get(k);
  125 + if(t1.getNbbm().equals(map.get("clZbh").toString())
  126 + &&t1.getJsy().equals(map.get("jGh").toString())
  127 + &&t1.getXlbm().equals(map.get("xlBm").toString()))
  128 + {
  129 + t=t1;
  130 + type="update";
  131 + }
  132 + }
  133 + try {
  134 + //当日的第一个班次,出场油量等于前一天的最后一个班次的进场油量
  135 + Double jzl=0.0;
  136 + if(map.get("seqNumber").toString().equals("1")){
  137 + boolean fage=true;
  138 + for (int i = 0; i < dlListBe.size(); i++) {
  139 + Dlb dlb=dlListBe.get(i);
  140 + if(map.get("clZbh").toString().equals(dlb.getNbbm())){
  141 + t.setCzcd(dlb.getJzcd());
  142 + fage=false;
  143 + break;
  144 + }
  145 + }
  146 + if(fage){
  147 + for (int y = 0; y < cdyList.size(); y++) {
  148 + Cdl cdl=cdyList.get(y);
  149 + if(map.get("clZbh").toString().equals(cdl.getNbbm())){
  150 + t.setCzcd(cdl.getClcd()==null?0:cdl.getClcd());
  151 + fage=false;
  152 + break;
  153 + }
  154 + }
  155 + }
  156 + if(fage){
  157 + t.setCzcd(0.0);
  158 + }
  159 +
  160 + //手动导入没有驾驶员工号
  161 + for (int i = 0; i < jdlList.size(); i++) {
  162 + Jdl jdl=jdlList.get(i);
  163 + if(map.get("clZbh").toString().equals(jdl.getNbbm()) ){
  164 + jzl+=jdl.getJdl();
  165 + }
  166 + }
  167 + }
  168 +
  169 +
  170 + //把当天的YLXXB的加注量设置为当天YLB的加注量(根据车号,驾驶员判断)
  171 + for(int j=0;j<ylxxList.size();j++){
  172 + Ylxxb ylxxb= ylxxList.get(j);
  173 + if(map.get("clZbh").toString().equals(ylxxb.getNbbm()) &&map.get("jGh").toString().equals(ylxxb.getJsy())){
  174 + jzl+=ylxxb.getJzl();
  175 + }
  176 + }
  177 +
  178 + t.setCdl(jzl);
  179 + if(type.equals("add")){
  180 + t.setHd(jzl);
  181 + t.setJzcd(t.getCzcd());
  182 + }
  183 +
  184 + t.setNbbm(map.get("clZbh").toString());
  185 + t.setJsy(map.get("jGh")==null?"":map.get("jGh").toString());
  186 + t.setZlc(map.get("totalKilometers")==null?0.0:Double.parseDouble(df.format(Double.parseDouble(map.get("totalKilometers").toString()))));
  187 + t.setXlbm(map.get("xlBm")==null?"":map.get("xlBm").toString());
  188 + t.setJcsx(Integer.parseInt(map.get("seqNumber").toString()));
  189 + t.setSsgsdm(map.get("company")==null?"":map.get("company").toString());
  190 + t.setFgsdm(map.get("bCompany")==null?"":map.get("bCompany").toString());
  191 + t.setJhsj(map.get("fcsj")==null?"":map.get("fcsj").toString());
  192 + t.setRq(sdf.parse(rq));
  193 + t.setCreatetime(new Date());
  194 + /*if(type.equals("add")){
  195 + addList.add(t);
  196 + }else{
  197 + updateList.add(t);
  198 + }*/
  199 + repository.save(t);
  200 + newMap.put("status", ResponseCode.SUCCESS);
  201 + } catch (ParseException e) {
  202 + // TODO Auto-generated catch block
  203 + newMap.put("status", ResponseCode.ERROR);
  204 + e.printStackTrace();
  205 + }
  206 + }
  207 + }
  208 + return result;
  209 + }
73 210 /**
74   - * 获取进存信息
  211 + * 获取进存信息
75 212 * @Transactional 回滚事物
76 213 */
77 214 @Transactional
... ...
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
... ... @@ -172,7 +172,7 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
172 172 t.setJzl(jzl);*/
173 173 t.setNbbm(map.get("clZbh").toString());
174 174 t.setJsy(map.get("jGh")==null?"":map.get("jGh").toString());
175   - t.setZlc(map.get("totalKilometers")==null?0.0:Double.parseDouble(df.format(Double.parseDouble(map.get("totalKilometers").toString()))));
  175 + t.setZlc(map.get("totalKilometers")==null?0.0:Double.parseDouble(map.get("totalKilometers").toString()));
176 176 t.setXlbm(map.get("xlBm")==null?"":map.get("xlBm").toString());
177 177 t.setJcsx(Integer.parseInt(map.get("seqNumber").toString()));
178 178 t.setSsgsdm(map.get("company")==null?"":map.get("company").toString());
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -581,62 +581,20 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
581 581 List<Iterator<?>> list = new ArrayList<Iterator<?>>();
582 582 List<ScheduleRealInfo> scheduleRealInfos = scheduleRealInfoRepository.queryListWaybill(jName, clZbh, lpName, date, line);
583 583 List<Map<String, Object>> listMap = new ArrayList<Map<String, Object>>();
584   -
  584 +// List<ScheduleRealInfo> scheduleRealInfos=scheduleRealInfoRepository.queryListWaybillXcld(jName, clZbh, lpName, date, line);
  585 + List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();
  586 + for (int i = 0; i < scheduleRealInfos.size(); i++) {
  587 + ScheduleRealInfo s=scheduleRealInfos.get(i);
  588 + if(s.getZdsjActual()!=null){
  589 + lists.add(s);
  590 + }
  591 + }
585 592 DecimalFormat format = new DecimalFormat("0.00");
586 593 // int cjbc = scheduleRealInfoRepository.findCjbc(jName, clZbh, lpName);
587 594 // int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName);
588   - int jhbc = 0, cjbc = 0, ljbc = 0;
589   - double jhlc = 0, yygl = 0, ksgl = 0, tempJhlc = 0;
590   - float addMileage = 0l, remMileage = 0l;
591 595  
592 596 Map<String, Object> map;
593 597 for (ScheduleRealInfo scheduleRealInfo : scheduleRealInfos) {
594   - if (scheduleRealInfo != null) {
595   - //计算计划里程(主任务过滤掉临加班次),烂班里程,临加里程,计划班次,烂班班次,增加班次
596   - if (scheduleRealInfo != null) {
597   - //计划里程(主任务过滤掉临加班次),
598   - //烂班里程(主任务烂班),
599   - //临加里程(主任务临加),
600   - //计划班次,烂班班次,增加班次
601   - tempJhlc = scheduleRealInfo.getJhlc() == null ? 0 : scheduleRealInfo.getJhlc();
602   - if (scheduleRealInfo.isSflj()) {
603   - ljbc++;
604   - } else {
605   - jhlc += tempJhlc;
606   - jhbc++;
607   - if (scheduleRealInfo.getStatus() == -1) {
608   - remMileage += tempJhlc;
609   - cjbc++;
610   - }
611   - }
612   - Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
613   - //计算营运里程,空驶里程
614   - if (childTaskPlans.isEmpty()) {
615   - if (scheduleRealInfo.getBcType().equals("in") || scheduleRealInfo.getBcType().equals("out")
616   - ) {
617   - ksgl += tempJhlc;
618   - } else {
619   - yygl += tempJhlc;
620   - }
621   - } else {
622   - Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
623   - while (it.hasNext()) {
624   - ChildTaskPlan childTaskPlan = it.next();
625   - if (childTaskPlan.getMileageType().equals("empty")) {
626   - if (scheduleRealInfo.isSflj()) {
627   - addMileage += tempJhlc;
628   - }
629   - ksgl += childTaskPlan.getMileage() == null ? 0 : childTaskPlan.getMileage();
630   - } else {
631   - if (scheduleRealInfo.isSflj()) {
632   - addMileage += tempJhlc;
633   - }
634   - yygl += childTaskPlan.getMileage() == null ? 0 : childTaskPlan.getMileage();
635   - }
636   - }
637   - }
638   - }
639   -
640 598 map = new HashMap<String, Object>();
641 599 try {
642 600 scheduleRealInfo.setjName(scheduleRealInfo.getjGh() + scheduleRealInfo.getjName());
... ... @@ -661,21 +619,23 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
661 619 } catch (Exception e) {
662 620 e.printStackTrace();
663 621 }
664   - }
665 622 }
666 623  
667 624 //计算里程和班次数,并放入Map里
668 625 map = new HashMap<String, Object>();
669   - map.put("jhlc", format.format(jhlc));
670   - map.put("remMileage", format.format(remMileage));
671   - map.put("addMileage", format.format(addMileage));
672   - map.put("yygl", format.format(yygl));
673   - map.put("ksgl", format.format(ksgl));
674   - map.put("realMileage", format.format(yygl + ksgl));
675   - map.put("jhbc", jhbc);
676   - map.put("cjbc", cjbc);
677   - map.put("ljbc", ljbc);
678   - map.put("sjbc", jhbc - cjbc + ljbc);
  626 + map.put("jhlc", culateMieageService.culateJhgl(scheduleRealInfos));
  627 + map.put("remMileage",culateMieageService.culateLbgl(lists));
  628 + map.put("addMileage", culateMieageService.culateLjgl(lists));
  629 + double yygl=Arith.add(culateMieageService.culateSjgl(lists),culateMieageService.culateLjgl(lists));
  630 + map.put("yygl", yygl);
  631 + double ksgl=Arith.add(culateMieageService.culateKsgl(lists),culateMieageService.culateJccgl(lists));
  632 + map.put("ksgl",ksgl);
  633 + map.put("realMileage", Arith.add(yygl ,ksgl));
  634 + map.put("jhbc", culateMieageService.culateJhgl(scheduleRealInfos));
  635 + map.put("cjbc", culateMieageService.culateLbbc(lists));
  636 + map.put("ljbc", culateMieageService.culateLjbc(lists, ""));
  637 + int sjbc =culateMieageService.culateLjbc(lists, "")+culateMieageService.culateSjbc(lists, "");
  638 + map.put("sjbc", sjbc);
679 639  
680 640 String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
681 641  
... ... @@ -1414,19 +1374,27 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1414 1374 public Map<String, Object> findKMBC(String jGh, String clZbh,
1415 1375 String lpName, String date, String line) {
1416 1376 Map<String, Object> map = new HashMap<String, Object>();
1417   - List<ScheduleRealInfo> lists=scheduleRealInfoRepository.queryListWaybillXcld(jGh, clZbh, lpName, date, line);
  1377 + List<ScheduleRealInfo> list=scheduleRealInfoRepository.queryListWaybillXcld(jGh, clZbh, lpName, date, line);
  1378 + List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();
  1379 + for (int i = 0; i < list.size(); i++) {
  1380 + ScheduleRealInfo s=list.get(i);
  1381 + if(s.getZdsjActual()!=null){
  1382 + lists.add(s);
  1383 + }
  1384 + }
1418 1385 double ksgl=culateService.culateKsgl(lists);
1419 1386 double sjgl=culateService.culateSjgl(lists);
1420 1387 double jccgl=culateService.culateJccgl(lists);
1421 1388 double ljgl=culateService.culateLjgl(lists);
1422   - map.put("jhlc", culateService.culateJhgl(lists)); //计划里程
  1389 +
  1390 + map.put("jhlc", culateService.culateJhgl(list)); //计划里程
1423 1391 map.put("remMileage", culateService.culateLbgl(lists)); //烂班公里
1424 1392 map.put("addMileage", ljgl); //临加公里
1425 1393 map.put("yygl",Arith.add(sjgl,ljgl)); //实际公里
1426 1394 map.put("ksgl", ksgl);//空驶公里
1427 1395 map.put("realMileage",Arith.add(Arith.add(ksgl,jccgl ),Arith.add(sjgl,ljgl)));
1428 1396 // map.put("realMileage", format.format(yygl + ksgl + jcclc+addMileage));
1429   - map.put("jhbc", culateService.culateJhbc(lists,""));
  1397 + map.put("jhbc", culateService.culateJhbc(list,""));
1430 1398 map.put("cjbc", culateService.culateLbbc(lists));
1431 1399 map.put("ljbc", culateService.culateLjbc(lists,""));
1432 1400 map.put("sjbc", culateService.culateJhbc(lists,"") - culateService.culateLbbc(lists) + culateService.culateLjbc(lists,""));
... ... @@ -1670,7 +1638,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1670 1638 map.put("ssgl_kx", culateService.culateCJLC(lists, "客稀"));
1671 1639 map.put("ssgl_qh", culateService.culateCJLC(lists, "气候"));
1672 1640 map.put("ssgl_yw", culateService.culateCJLC(lists, "援外"));
1673   - map.put("ssgl_other", culateService.culateCJLC(lists, "其他"));
  1641 + double ssgl_pc=culateService.culateCJLC(lists, "配车");
  1642 + double ssgl_by=culateService.culateCJLC(lists, "保养");
  1643 + double ssgl_cj=culateService.culateCJLC(lists, "抽减");
  1644 + double ssgl_qt=culateService.culateCJLC(lists, "其他");
  1645 + map.put("ssgl_other", Arith.add(Arith.add(ssgl_pc, ssgl_by),Arith.add(ssgl_cj, ssgl_qt)));
1674 1646 map.put("ssbc", culateService.culateLbbc(lists));
1675 1647 map.put("ljgl", culateService.culateLjgl(lists));
1676 1648 map.put("jhbc", culateService.culateJhbc(lists,""));
... ... @@ -3793,6 +3765,76 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3793 3765 return new ArrayList<Map<String, Object>>();
3794 3766 }
3795 3767  
  3768 + public List<ScheduleRealInfo> exportWaybill_pl(List<ScheduleRealInfo> listpl,String date,String jName, String clZbh,String lpName) {
  3769 + ReportUtils ee = new ReportUtils();
  3770 + ReportRelatedUtils rru = new ReportRelatedUtils();
  3771 + List<Iterator<?>> list = new ArrayList<Iterator<?>>();
  3772 + List<ScheduleRealInfo> scheduleRealInfos = listpl;
  3773 + List<Map<String, Object>> listMap = new ArrayList<Map<String, Object>>();
  3774 +// List<ScheduleRealInfo> scheduleRealInfos=scheduleRealInfoRepository.queryListWaybillXcld(jName, clZbh, lpName, date, line);
  3775 + List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();
  3776 + for (int i = 0; i < scheduleRealInfos.size(); i++) {
  3777 + ScheduleRealInfo s=scheduleRealInfos.get(i);
  3778 + if(s.getZdsjActual()!=null){
  3779 + lists.add(s);
  3780 + }
  3781 + }
  3782 + DecimalFormat format = new DecimalFormat("0.00");
  3783 +// int cjbc = scheduleRealInfoRepository.findCjbc(jName, clZbh, lpName);
  3784 +// int ljbc = scheduleRealInfoRepository.findLjbc(jName, clZbh, lpName);
  3785 +
  3786 + Map<String, Object> map;
  3787 + for (ScheduleRealInfo scheduleRealInfo : scheduleRealInfos) {
  3788 + map = new HashMap<String, Object>();
  3789 + try {
  3790 + scheduleRealInfo.setjName(scheduleRealInfo.getjGh() + scheduleRealInfo.getjName());
  3791 + scheduleRealInfo.setsName(scheduleRealInfo.getsGh() + scheduleRealInfo.getsName());
  3792 + map = rru.getMapValue(scheduleRealInfo);
  3793 + String zdsj = scheduleRealInfo.getZdsj();
  3794 + String zdsjActual = scheduleRealInfo.getZdsjActual();
  3795 + if (zdsj != null && zdsjActual != null &&
  3796 + !zdsj.equals(zdsjActual)) {
  3797 + if (zdsj.compareTo(zdsjActual) > 0) {
  3798 + map.put("fast", TimeUtils.getTimeDifference(zdsj, zdsjActual));
  3799 + map.put("slow", "");
  3800 + } else {
  3801 + map.put("fast", "");
  3802 + map.put("slow", TimeUtils.getTimeDifference(zdsj, zdsjActual));
  3803 + }
  3804 + } else {
  3805 + map.put("fast", "");
  3806 + map.put("slow", "");
  3807 + }
  3808 + listMap.add(map);
  3809 + } catch (Exception e) {
  3810 + e.printStackTrace();
  3811 + }
  3812 + }
  3813 +
  3814 + //计算里程和班次数,并放入Map里
  3815 + map = new HashMap<String, Object>();
  3816 + map.put("jhlc", culateMieageService.culateJhgl(scheduleRealInfos));
  3817 + map.put("remMileage",culateMieageService.culateLbgl(lists));
  3818 + map.put("addMileage", culateMieageService.culateLjgl(lists));
  3819 + double yygl=Arith.add(culateMieageService.culateSjgl(lists),culateMieageService.culateLjgl(lists));
  3820 + map.put("yygl", yygl);
  3821 + double ksgl=Arith.add(culateMieageService.culateKsgl(lists),culateMieageService.culateJccgl(lists));
  3822 + map.put("ksgl",ksgl);
  3823 + map.put("realMileage", Arith.add(yygl ,ksgl));
  3824 + map.put("jhbc", culateMieageService.culateJhgl(scheduleRealInfos));
  3825 + map.put("cjbc", culateMieageService.culateLbbc(lists));
  3826 + map.put("ljbc", culateMieageService.culateLjbc(lists, ""));
  3827 + int sjbc =culateMieageService.culateLjbc(lists, "")+culateMieageService.culateSjbc(lists, "");
  3828 + map.put("sjbc", sjbc);
  3829 +
  3830 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  3831 +
  3832 + list.add(listMap.iterator());
  3833 + ee.excelReplace(list, new Object[]{scheduleRealInfos.get(0), map}, path + "mould/waybill_minhang.xls",
  3834 + path + "export/" + date + "-" + jName + "-" + clZbh + "-" + lpName + "-行车路单.xls");
  3835 + return scheduleRealInfos;
  3836 + }
  3837 +
3796 3838 @Override
3797 3839 public Map<String, Object> exportWaybillMore(Map<String, Object> map) {
3798 3840 String date = map.get("date").toString();
... ... @@ -3814,12 +3856,19 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3814 3856 }
3815 3857 }
3816 3858 file.mkdirs();
3817   -
  3859 + List<ScheduleRealInfo> lists_line=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date);
3818 3860 for (List<String> list : lists) {
  3861 + List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
3819 3862 String jName = list.get(0);
3820 3863 String clZbh = list.get(1);
3821 3864 String lpName = list.get(2);
3822   - this.exportWaybill(jName, clZbh, lpName, date, line);
  3865 + for (int i = 0; i < lists_line.size(); i++) {
  3866 + ScheduleRealInfo s=lists_line.get(i);
  3867 + if(s.getjName().equals(jName) && s.getClZbh().equals(clZbh) && s.getLpName().equals(lpName)){
  3868 + newList.add(s);
  3869 + }
  3870 + }
  3871 + this.exportWaybill_pl(newList, date, jName, clZbh, lpName);
3823 3872 File temp = new File(path + date + "-" + jName + "-" + clZbh + "-" + lpName + "-行车路单.xls");
3824 3873 String fileName = file.getName();
3825 3874 temp.renameTo(new File(path + fileName + "/" + temp.getName()));
... ...
src/main/resources/datatools/ktrs/guideboardDataInput.ktr
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<transformation>
3   - <info>
4   - <name>&#x8def;&#x724c;&#x4fe1;&#x606f;&#x5bfc;&#x5165;</name>
5   - <description>&#x8def;&#x724c;&#x4fe1;&#x606f;&#x5bfc;&#x5165;</description>
6   - <extended_description>&#x7ebf;&#x8def;&#x8fd0;&#x8425;&#x7684;&#x8def;&#x724c;&#x4fe1;&#x606f;</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>erroroutputdir</name>
14   - <default_value/>
15   - <description>ktr step&#x914d;&#x7f6e;&#x7684;&#x9519;&#x8bef;&#x8f93;&#x51fa;&#x76ee;&#x5f55;</description>
16   - </parameter>
17   - <parameter>
18   - <name>filepath</name>
19   - <default_value/>
20   - <description>&#x5f85;&#x5904;&#x7406;&#x5bfc;&#x5165;&#x7684;excel&#x6587;&#x4ef6;</description>
21   - </parameter>
22   - </parameters>
23   - <log>
24   -<trans-log-table><connection/>
25   -<schema/>
26   -<table/>
27   -<size_limit_lines/>
28   -<interval/>
29   -<timeout_days/>
30   -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>
31   -<perf-log-table><connection/>
32   -<schema/>
33   -<table/>
34   -<interval/>
35   -<timeout_days/>
36   -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>
37   -<channel-log-table><connection/>
38   -<schema/>
39   -<table/>
40   -<timeout_days/>
41   -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>
42   -<step-log-table><connection/>
43   -<schema/>
44   -<table/>
45   -<timeout_days/>
46   -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>
47   -<metrics-log-table><connection/>
48   -<schema/>
49   -<table/>
50   -<timeout_days/>
51   -<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>
52   - </log>
53   - <maxdate>
54   - <connection/>
55   - <table/>
56   - <field/>
57   - <offset>0.0</offset>
58   - <maxdiff>0.0</maxdiff>
59   - </maxdate>
60   - <size_rowset>10000</size_rowset>
61   - <sleep_time_empty>50</sleep_time_empty>
62   - <sleep_time_full>50</sleep_time_full>
63   - <unique_connections>N</unique_connections>
64   - <feedback_shown>Y</feedback_shown>
65   - <feedback_size>50000</feedback_size>
66   - <using_thread_priorities>Y</using_thread_priorities>
67   - <shared_objects_file/>
68   - <capture_step_performance>N</capture_step_performance>
69   - <step_performance_capturing_delay>1000</step_performance_capturing_delay>
70   - <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
71   - <dependencies>
72   - </dependencies>
73   - <partitionschemas>
74   - </partitionschemas>
75   - <slaveservers>
76   - </slaveservers>
77   - <clusterschemas>
78   - </clusterschemas>
79   - <created_user>-</created_user>
80   - <created_date>2016&#x2f;06&#x2f;29 17&#x3a;00&#x3a;01.094</created_date>
81   - <modified_user>-</modified_user>
82   - <modified_date>2016&#x2f;06&#x2f;29 17&#x3a;00&#x3a;01.094</modified_date>
83   - <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>
84   - <is_key_private>N</is_key_private>
85   - </info>
86   - <notepads>
87   - <notepad>
88   - <note>&#x8def;&#x724c;&#x4fe1;&#x606f;&#x8f93;&#x5165;&#xff0c;&#x8def;&#x724c;&#x540d;&#x5b57;&#x662f;&#x4e0d;&#x80fd;&#x91cd;&#x590d;&#x7684;&#xa;&#x4e00;&#x822c;&#x6765;&#x8bf4;&#xff0c;&#x5e94;&#x8be5;&#x662f;&#x5bfc;&#x5165;&#x65f6;&#x523b;&#x6570;&#x636e;&#x81ea;&#x52a8;&#x751f;&#x6210;&#x7684;&#xff0c;&#x8fd9;&#x4e2a;&#x518d;&#x8bae;&#xa;&#xa;</note>
89   - <xloc>57</xloc>
90   - <yloc>291</yloc>
91   - <width>298</width>
92   - <heigth>74</heigth>
93   - <fontname>YaHei Consolas Hybrid</fontname>
94   - <fontsize>12</fontsize>
95   - <fontbold>N</fontbold>
96   - <fontitalic>N</fontitalic>
97   - <fontcolorred>0</fontcolorred>
98   - <fontcolorgreen>0</fontcolorgreen>
99   - <fontcolorblue>0</fontcolorblue>
100   - <backgroundcolorred>255</backgroundcolorred>
101   - <backgroundcolorgreen>205</backgroundcolorgreen>
102   - <backgroundcolorblue>112</backgroundcolorblue>
103   - <bordercolorred>100</bordercolorred>
104   - <bordercolorgreen>100</bordercolorgreen>
105   - <bordercolorblue>100</bordercolorblue>
106   - <drawshadow>Y</drawshadow>
107   - </notepad>
108   - </notepads>
109   - <connection>
110   - <name>bus_control_variable</name>
111   - <server>&#x24;&#x7b;v_db_ip&#x7d;</server>
112   - <type>MYSQL</type>
113   - <access>Native</access>
114   - <database>&#x24;&#x7b;v_db_dname&#x7d;</database>
115   - <port>3306</port>
116   - <username>&#x24;&#x7b;v_db_uname&#x7d;</username>
117   - <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>
118   - <servername/>
119   - <data_tablespace/>
120   - <index_tablespace/>
121   - <attributes>
122   - <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute>
123   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
124   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
125   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
126   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
127   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
128   - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
129   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
130   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
131   - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
132   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
133   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
134   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
135   - </attributes>
136   - </connection>
137   - <connection>
138   - <name>bus_control_&#x516c;&#x53f8;_201</name>
139   - <server>localhost</server>
140   - <type>MYSQL</type>
141   - <access>Native</access>
142   - <database>control</database>
143   - <port>3306</port>
144   - <username>root</username>
145   - <password>Encrypted </password>
146   - <servername/>
147   - <data_tablespace/>
148   - <index_tablespace/>
149   - <attributes>
150   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
151   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
152   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
153   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
154   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
155   - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
156   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
157   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
158   - <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
159   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
160   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
161   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
162   - </attributes>
163   - </connection>
164   - <connection>
165   - <name>bus_control_&#x672c;&#x673a;</name>
166   - <server>localhost</server>
167   - <type>MYSQL</type>
168   - <access>Native</access>
169   - <database>control</database>
170   - <port>3306</port>
171   - <username>root</username>
172   - <password>Encrypted </password>
173   - <servername/>
174   - <data_tablespace/>
175   - <index_tablespace/>
176   - <attributes>
177   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
178   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
179   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
180   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
181   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
182   - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
183   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
184   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
185   - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
186   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
187   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
188   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
189   - </attributes>
190   - </connection>
191   - <connection>
192   - <name>xlab_mysql_youle</name>
193   - <server>101.231.124.8</server>
194   - <type>MYSQL</type>
195   - <access>Native</access>
196   - <database>xlab_youle</database>
197   - <port>45687</port>
198   - <username>xlab-youle</username>
199   - <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>
200   - <servername/>
201   - <data_tablespace/>
202   - <index_tablespace/>
203   - <attributes>
204   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
205   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
206   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
207   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
208   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
209   - <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>
210   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
211   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
212   - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
213   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
214   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
215   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
216   - </attributes>
217   - </connection>
218   - <connection>
219   - <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>
220   - <server>localhost</server>
221   - <type>MYSQL</type>
222   - <access>Native</access>
223   - <database>xlab_youle</database>
224   - <port>3306</port>
225   - <username>root</username>
226   - <password>Encrypted </password>
227   - <servername/>
228   - <data_tablespace/>
229   - <index_tablespace/>
230   - <attributes>
231   - <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
232   - <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
233   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
234   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
235   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
236   - <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
237   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
238   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
239   - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
240   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
241   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
242   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
243   - </attributes>
244   - </connection>
245   - <connection>
246   - <name>xlab_youle</name>
247   - <server/>
248   - <type>MYSQL</type>
249   - <access>JNDI</access>
250   - <database>xlab_youle</database>
251   - <port>1521</port>
252   - <username/>
253   - <password>Encrypted </password>
254   - <servername/>
255   - <data_tablespace/>
256   - <index_tablespace/>
257   - <attributes>
258   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
259   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
260   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
261   - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
262   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
263   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
264   - <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
265   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
266   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
267   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
268   - </attributes>
269   - </connection>
270   - <order>
271   - <hop> <from>&#x5b57;&#x6bb5;&#x6539;&#x540d;</from><to>&#x67e5;&#x8be2;&#x7ebf;&#x8def;&#x5173;&#x8054;</to><enabled>Y</enabled> </hop>
272   - <hop> <from>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_s_gbi</from><to>&#x9519;&#x8bef;&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
273   - <hop> <from>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</from><to>&#x5b57;&#x6bb5;&#x6539;&#x540d;</to><enabled>Y</enabled> </hop>
274   - <hop> <from>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</from><to>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</to><enabled>Y</enabled> </hop>
275   - <hop> <from>&#x67e5;&#x8be2;&#x7ebf;&#x8def;&#x5173;&#x8054;</from><to>&#x542f;&#x7528;&#x88ab;&#x6570;&#x636e;flag</to><enabled>Y</enabled> </hop>
276   - <hop> <from>&#x542f;&#x7528;&#x88ab;&#x6570;&#x636e;flag</from><to>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_s_gbi</to><enabled>Y</enabled> </hop>
277   - </order>
278   - <step>
279   - <name>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</name>
280   - <type>ExcelInput</type>
281   - <description/>
282   - <distribute>Y</distribute>
283   - <custom_distribution/>
284   - <copies>1</copies>
285   - <partitioning>
286   - <method>none</method>
287   - <schema_name/>
288   - </partitioning>
289   - <header>Y</header>
290   - <noempty>Y</noempty>
291   - <stoponempty>N</stoponempty>
292   - <filefield/>
293   - <sheetfield/>
294   - <sheetrownumfield/>
295   - <rownumfield/>
296   - <sheetfield/>
297   - <filefield/>
298   - <limit>0</limit>
299   - <encoding/>
300   - <add_to_result_filenames>Y</add_to_result_filenames>
301   - <accept_filenames>Y</accept_filenames>
302   - <accept_field>filepath_</accept_field>
303   - <accept_stepname>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</accept_stepname>
304   - <file>
305   - <name/>
306   - <filemask/>
307   - <exclude_filemask/>
308   - <file_required>N</file_required>
309   - <include_subfolders>N</include_subfolders>
310   - </file>
311   - <fields>
312   - <field>
313   - <name>&#x7ebf;&#x8def;</name>
314   - <type>String</type>
315   - <length>-1</length>
316   - <precision>-1</precision>
317   - <trim_type>none</trim_type>
318   - <repeat>N</repeat>
319   - <format/>
320   - <currency/>
321   - <decimal/>
322   - <group/>
323   - </field>
324   - <field>
325   - <name>&#x8def;&#x724c;&#x7f16;&#x53f7;</name>
326   - <type>String</type>
327   - <length>-1</length>
328   - <precision>-1</precision>
329   - <trim_type>none</trim_type>
330   - <repeat>N</repeat>
331   - <format>&#x23;</format>
332   - <currency/>
333   - <decimal/>
334   - <group/>
335   - </field>
336   - <field>
337   - <name>&#x8def;&#x724c;&#x540d;&#x79f0;</name>
338   - <type>String</type>
339   - <length>-1</length>
340   - <precision>-1</precision>
341   - <trim_type>none</trim_type>
342   - <repeat>N</repeat>
343   - <format>&#x23;</format>
344   - <currency/>
345   - <decimal/>
346   - <group/>
347   - </field>
348   - <field>
349   - <name>&#x8def;&#x724c;&#x7c7b;&#x578b;</name>
350   - <type>String</type>
351   - <length>-1</length>
352   - <precision>-1</precision>
353   - <trim_type>none</trim_type>
354   - <repeat>N</repeat>
355   - <format/>
356   - <currency/>
357   - <decimal/>
358   - <group/>
359   - </field>
360   - </fields>
361   - <sheets>
362   - <sheet>
363   - <name>&#x5de5;&#x4f5c;&#x8868;1</name>
364   - <startrow>0</startrow>
365   - <startcol>0</startcol>
366   - </sheet>
367   - </sheets>
368   - <strict_types>N</strict_types>
369   - <error_ignored>N</error_ignored>
370   - <error_line_skipped>N</error_line_skipped>
371   - <bad_line_files_destination_directory/>
372   - <bad_line_files_extension>warning</bad_line_files_extension>
373   - <error_line_files_destination_directory/>
374   - <error_line_files_extension>error</error_line_files_extension>
375   - <line_number_files_destination_directory/>
376   - <line_number_files_extension>line</line_number_files_extension>
377   - <shortFileFieldName/>
378   - <pathFieldName/>
379   - <hiddenFieldName/>
380   - <lastModificationTimeFieldName/>
381   - <uriNameFieldName/>
382   - <rootUriNameFieldName/>
383   - <extensionFieldName/>
384   - <sizeFieldName/>
385   - <spreadsheet_type>JXL</spreadsheet_type>
386   - <cluster_schema/>
387   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
388   - <xloc>150</xloc>
389   - <yloc>68</yloc>
390   - <draw>Y</draw>
391   - </GUI>
392   - </step>
393   -
394   - <step>
395   - <name>&#x542f;&#x7528;&#x88ab;&#x6570;&#x636e;flag</name>
396   - <type>Constant</type>
397   - <description/>
398   - <distribute>Y</distribute>
399   - <custom_distribution/>
400   - <copies>1</copies>
401   - <partitioning>
402   - <method>none</method>
403   - <schema_name/>
404   - </partitioning>
405   - <fields>
406   - <field>
407   - <name>isCancel</name>
408   - <type>Integer</type>
409   - <format/>
410   - <currency/>
411   - <decimal/>
412   - <group/>
413   - <nullif>0</nullif>
414   - <length>-1</length>
415   - <precision>-1</precision>
416   - <set_empty_string>N</set_empty_string>
417   - </field>
418   - </fields>
419   - <cluster_schema/>
420   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
421   - <xloc>544</xloc>
422   - <yloc>70</yloc>
423   - <draw>Y</draw>
424   - </GUI>
425   - </step>
426   -
427   - <step>
428   - <name>&#x5b57;&#x6bb5;&#x6539;&#x540d;</name>
429   - <type>SelectValues</type>
430   - <description/>
431   - <distribute>Y</distribute>
432   - <custom_distribution/>
433   - <copies>1</copies>
434   - <partitioning>
435   - <method>none</method>
436   - <schema_name/>
437   - </partitioning>
438   - <fields> <select_unspecified>N</select_unspecified>
439   - <meta> <name>&#x7ebf;&#x8def;</name>
440   - <rename>xl</rename>
441   - <type>String</type>
442   - <length>-2</length>
443   - <precision>-2</precision>
444   - <conversion_mask/>
445   - <date_format_lenient>false</date_format_lenient>
446   - <date_format_locale/>
447   - <date_format_timezone/>
448   - <lenient_string_to_number>false</lenient_string_to_number>
449   - <encoding/>
450   - <decimal_symbol/>
451   - <grouping_symbol/>
452   - <currency_symbol/>
453   - <storage_type/>
454   - </meta> <meta> <name>&#x8def;&#x724c;&#x7f16;&#x53f7;</name>
455   - <rename>lpno</rename>
456   - <type>Integer</type>
457   - <length>-2</length>
458   - <precision>-2</precision>
459   - <conversion_mask/>
460   - <date_format_lenient>false</date_format_lenient>
461   - <date_format_locale/>
462   - <date_format_timezone/>
463   - <lenient_string_to_number>false</lenient_string_to_number>
464   - <encoding/>
465   - <decimal_symbol/>
466   - <grouping_symbol/>
467   - <currency_symbol/>
468   - <storage_type/>
469   - </meta> <meta> <name>&#x8def;&#x724c;&#x540d;&#x79f0;</name>
470   - <rename>lpname</rename>
471   - <type>String</type>
472   - <length>-2</length>
473   - <precision>-2</precision>
474   - <conversion_mask/>
475   - <date_format_lenient>false</date_format_lenient>
476   - <date_format_locale/>
477   - <date_format_timezone/>
478   - <lenient_string_to_number>false</lenient_string_to_number>
479   - <encoding/>
480   - <decimal_symbol/>
481   - <grouping_symbol/>
482   - <currency_symbol/>
483   - <storage_type/>
484   - </meta> <meta> <name>&#x8def;&#x724c;&#x7c7b;&#x578b;</name>
485   - <rename>lptype</rename>
486   - <type>String</type>
487   - <length>-2</length>
488   - <precision>-2</precision>
489   - <conversion_mask/>
490   - <date_format_lenient>false</date_format_lenient>
491   - <date_format_locale/>
492   - <date_format_timezone/>
493   - <lenient_string_to_number>false</lenient_string_to_number>
494   - <encoding/>
495   - <decimal_symbol/>
496   - <grouping_symbol/>
497   - <currency_symbol/>
498   - <storage_type/>
499   - </meta> </fields> <cluster_schema/>
500   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
501   - <xloc>295</xloc>
502   - <yloc>68</yloc>
503   - <draw>Y</draw>
504   - </GUI>
505   - </step>
506   -
507   - <step>
508   - <name>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_s_gbi</name>
509   - <type>InsertUpdate</type>
510   - <description/>
511   - <distribute>Y</distribute>
512   - <custom_distribution/>
513   - <copies>1</copies>
514   - <partitioning>
515   - <method>none</method>
516   - <schema_name/>
517   - </partitioning>
518   - <connection>bus_control_variable</connection>
519   - <commit>100</commit>
520   - <update_bypassed>N</update_bypassed>
521   - <lookup>
522   - <schema/>
523   - <table>bsth_c_s_gbi</table>
524   - <key>
525   - <name>xlid</name>
526   - <field>xl</field>
527   - <condition>&#x3d;</condition>
528   - <name2/>
529   - </key>
530   - <key>
531   - <name>lpname</name>
532   - <field>lp_name</field>
533   - <condition>&#x3d;</condition>
534   - <name2/>
535   - </key>
536   - <key>
537   - <name>isCancel</name>
538   - <field>is_cancel</field>
539   - <condition>&#x3d;</condition>
540   - <name2/>
541   - </key>
542   - <value>
543   - <name>xl</name>
544   - <rename>xlid</rename>
545   - <update>Y</update>
546   - </value>
547   - <value>
548   - <name>lp_no</name>
549   - <rename>lpno</rename>
550   - <update>Y</update>
551   - </value>
552   - <value>
553   - <name>lp_name</name>
554   - <rename>lpname</rename>
555   - <update>Y</update>
556   - </value>
557   - <value>
558   - <name>lp_type</name>
559   - <rename>lptype</rename>
560   - <update>Y</update>
561   - </value>
562   - <value>
563   - <name>is_cancel</name>
564   - <rename>isCancel</rename>
565   - <update>Y</update>
566   - </value>
567   - </lookup>
568   - <cluster_schema/>
569   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
570   - <xloc>545</xloc>
571   - <yloc>184</yloc>
572   - <draw>Y</draw>
573   - </GUI>
574   - </step>
575   -
576   - <step>
577   - <name>&#x67e5;&#x8be2;&#x7ebf;&#x8def;&#x5173;&#x8054;</name>
578   - <type>DBLookup</type>
579   - <description/>
580   - <distribute>Y</distribute>
581   - <custom_distribution/>
582   - <copies>1</copies>
583   - <partitioning>
584   - <method>none</method>
585   - <schema_name/>
586   - </partitioning>
587   - <connection>bus_control_variable</connection>
588   - <cache>Y</cache>
589   - <cache_load_all>Y</cache_load_all>
590   - <cache_size>0</cache_size>
591   - <lookup>
592   - <schema/>
593   - <table>bsth_c_line</table>
594   - <orderby/>
595   - <fail_on_multiple>N</fail_on_multiple>
596   - <eat_row_on_failure>N</eat_row_on_failure>
597   - <key>
598   - <name>xl</name>
599   - <field>name</field>
600   - <condition>&#x3d;</condition>
601   - <name2/>
602   - </key>
603   - <value>
604   - <name>id</name>
605   - <rename>xlid</rename>
606   - <default/>
607   - <type>Integer</type>
608   - </value>
609   - </lookup>
610   - <cluster_schema/>
611   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
612   - <xloc>428</xloc>
613   - <yloc>69</yloc>
614   - <draw>Y</draw>
615   - </GUI>
616   - </step>
617   -
618   - <step>
619   - <name>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</name>
620   - <type>GetVariable</type>
621   - <description/>
622   - <distribute>Y</distribute>
623   - <custom_distribution/>
624   - <copies>1</copies>
625   - <partitioning>
626   - <method>none</method>
627   - <schema_name/>
628   - </partitioning>
629   - <fields>
630   - <field>
631   - <name>filepath_</name>
632   - <variable>&#x24;&#x7b;filepath&#x7d;</variable>
633   - <type>String</type>
634   - <format/>
635   - <currency/>
636   - <decimal/>
637   - <group/>
638   - <length>-1</length>
639   - <precision>-1</precision>
640   - <trim_type>none</trim_type>
641   - </field>
642   - <field>
643   - <name>erroroutputdir_</name>
644   - <variable>&#x24;&#x7b;erroroutputdir&#x7d;</variable>
645   - <type>String</type>
646   - <format/>
647   - <currency/>
648   - <decimal/>
649   - <group/>
650   - <length>-1</length>
651   - <precision>-1</precision>
652   - <trim_type>none</trim_type>
653   - </field>
654   - </fields>
655   - <cluster_schema/>
656   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
657   - <xloc>152</xloc>
658   - <yloc>193</yloc>
659   - <draw>Y</draw>
660   - </GUI>
661   - </step>
662   -
663   - <step>
664   - <name>&#x9519;&#x8bef;&#x8f93;&#x51fa;</name>
665   - <type>ExcelOutput</type>
666   - <description/>
667   - <distribute>Y</distribute>
668   - <custom_distribution/>
669   - <copies>1</copies>
670   - <partitioning>
671   - <method>none</method>
672   - <schema_name/>
673   - </partitioning>
674   - <header>Y</header>
675   - <footer>N</footer>
676   - <encoding>UTF-8</encoding>
677   - <append>N</append>
678   - <add_to_result_filenames>Y</add_to_result_filenames>
679   - <file>
680   - <name>&#x24;&#x7b;erroroutputdir&#x7d;&#x2f;&#x8def;&#x724c;_&#x9519;&#x8bef;</name>
681   - <extention>xls</extention>
682   - <do_not_open_newfile_init>N</do_not_open_newfile_init>
683   - <create_parent_folder>N</create_parent_folder>
684   - <split>N</split>
685   - <add_date>N</add_date>
686   - <add_time>N</add_time>
687   - <SpecifyFormat>N</SpecifyFormat>
688   - <date_time_format/>
689   - <sheetname>Sheet1</sheetname>
690   - <autosizecolums>N</autosizecolums>
691   - <nullisblank>N</nullisblank>
692   - <protect_sheet>N</protect_sheet>
693   - <password>Encrypted </password>
694   - <splitevery>0</splitevery>
695   - <usetempfiles>N</usetempfiles>
696   - <tempdirectory/>
697   - </file>
698   - <template>
699   - <enabled>N</enabled>
700   - <append>N</append>
701   - <filename>template.xls</filename>
702   - </template>
703   - <fields>
704   - <field>
705   - <name>filepath_</name>
706   - <type>String</type>
707   - <format/>
708   - </field>
709   - <field>
710   - <name>erroroutputdir_</name>
711   - <type>String</type>
712   - <format/>
713   - </field>
714   - <field>
715   - <name>xl</name>
716   - <type>String</type>
717   - <format/>
718   - </field>
719   - <field>
720   - <name>lpno</name>
721   - <type>Integer</type>
722   - <format/>
723   - </field>
724   - <field>
725   - <name>lpname</name>
726   - <type>String</type>
727   - <format/>
728   - </field>
729   - <field>
730   - <name>lptype</name>
731   - <type>String</type>
732   - <format/>
733   - </field>
734   - <field>
735   - <name>xlid</name>
736   - <type>Integer</type>
737   - <format/>
738   - </field>
739   - <field>
740   - <name>isCancel</name>
741   - <type>Integer</type>
742   - <format/>
743   - </field>
744   - <field>
745   - <name>error_count</name>
746   - <type>Integer</type>
747   - <format/>
748   - </field>
749   - <field>
750   - <name>error_desc</name>
751   - <type>String</type>
752   - <format/>
753   - </field>
754   - <field>
755   - <name>error_column1</name>
756   - <type>String</type>
757   - <format/>
758   - </field>
759   - <field>
760   - <name>error_column2</name>
761   - <type>String</type>
762   - <format/>
763   - </field>
764   - </fields>
765   - <custom>
766   - <header_font_name>arial</header_font_name>
767   - <header_font_size>10</header_font_size>
768   - <header_font_bold>N</header_font_bold>
769   - <header_font_italic>N</header_font_italic>
770   - <header_font_underline>no</header_font_underline>
771   - <header_font_orientation>horizontal</header_font_orientation>
772   - <header_font_color>black</header_font_color>
773   - <header_background_color>none</header_background_color>
774   - <header_row_height>255</header_row_height>
775   - <header_alignment>left</header_alignment>
776   - <header_image/>
777   - <row_font_name>arial</row_font_name>
778   - <row_font_size>10</row_font_size>
779   - <row_font_color>black</row_font_color>
780   - <row_background_color>none</row_background_color>
781   - </custom>
782   - <cluster_schema/>
783   - <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
784   - <xloc>545</xloc>
785   - <yloc>307</yloc>
786   - <draw>Y</draw>
787   - </GUI>
788   - </step>
789   -
790   - <step_error_handling>
791   - <error>
792   - <source_step>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_s_gbi</source_step>
793   - <target_step>&#x9519;&#x8bef;&#x8f93;&#x51fa;</target_step>
794   - <is_enabled>Y</is_enabled>
795   - <nr_valuename>error_count</nr_valuename>
796   - <descriptions_valuename>error_desc</descriptions_valuename>
797   - <fields_valuename>error_column1</fields_valuename>
798   - <codes_valuename>error_column2</codes_valuename>
799   - <max_errors/>
800   - <max_pct_errors/>
801   - <min_pct_rows/>
802   - </error>
803   - </step_error_handling>
804   - <slave-step-copy-partition-distribution>
805   -</slave-step-copy-partition-distribution>
806   - <slave_transformation>N</slave_transformation>
807   -
808   -</transformation>
  1 +<?xml version="1.0" encoding="UTF-8"?>
  2 +<transformation>
  3 + <info>
  4 + <name>&#x8def;&#x724c;&#x4fe1;&#x606f;&#x5bfc;&#x5165;</name>
  5 + <description>&#x8def;&#x724c;&#x4fe1;&#x606f;&#x5bfc;&#x5165;</description>
  6 + <extended_description>&#x7ebf;&#x8def;&#x8fd0;&#x8425;&#x7684;&#x8def;&#x724c;&#x4fe1;&#x606f;</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>erroroutputdir</name>
  14 + <default_value/>
  15 + <description>ktr step&#x914d;&#x7f6e;&#x7684;&#x9519;&#x8bef;&#x8f93;&#x51fa;&#x76ee;&#x5f55;</description>
  16 + </parameter>
  17 + <parameter>
  18 + <name>filepath</name>
  19 + <default_value/>
  20 + <description>&#x5f85;&#x5904;&#x7406;&#x5bfc;&#x5165;&#x7684;excel&#x6587;&#x4ef6;</description>
  21 + </parameter>
  22 + </parameters>
  23 + <log>
  24 +<trans-log-table><connection/>
  25 +<schema/>
  26 +<table/>
  27 +<size_limit_lines/>
  28 +<interval/>
  29 +<timeout_days/>
  30 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STATUS</id><enabled>Y</enabled><name>STATUS</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name><subject/></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name><subject/></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name><subject/></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name><subject/></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name><subject/></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name><subject/></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>STARTDATE</id><enabled>Y</enabled><name>STARTDATE</name></field><field><id>ENDDATE</id><enabled>Y</enabled><name>ENDDATE</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>DEPDATE</id><enabled>Y</enabled><name>DEPDATE</name></field><field><id>REPLAYDATE</id><enabled>Y</enabled><name>REPLAYDATE</name></field><field><id>LOG_FIELD</id><enabled>Y</enabled><name>LOG_FIELD</name></field><field><id>EXECUTING_SERVER</id><enabled>N</enabled><name>EXECUTING_SERVER</name></field><field><id>EXECUTING_USER</id><enabled>N</enabled><name>EXECUTING_USER</name></field><field><id>CLIENT</id><enabled>N</enabled><name>CLIENT</name></field></trans-log-table>
  31 +<perf-log-table><connection/>
  32 +<schema/>
  33 +<table/>
  34 +<interval/>
  35 +<timeout_days/>
  36 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>SEQ_NR</id><enabled>Y</enabled><name>SEQ_NR</name></field><field><id>LOGDATE</id><enabled>Y</enabled><name>LOGDATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>INPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>INPUT_BUFFER_ROWS</name></field><field><id>OUTPUT_BUFFER_ROWS</id><enabled>Y</enabled><name>OUTPUT_BUFFER_ROWS</name></field></perf-log-table>
  37 +<channel-log-table><connection/>
  38 +<schema/>
  39 +<table/>
  40 +<timeout_days/>
  41 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>LOGGING_OBJECT_TYPE</id><enabled>Y</enabled><name>LOGGING_OBJECT_TYPE</name></field><field><id>OBJECT_NAME</id><enabled>Y</enabled><name>OBJECT_NAME</name></field><field><id>OBJECT_COPY</id><enabled>Y</enabled><name>OBJECT_COPY</name></field><field><id>REPOSITORY_DIRECTORY</id><enabled>Y</enabled><name>REPOSITORY_DIRECTORY</name></field><field><id>FILENAME</id><enabled>Y</enabled><name>FILENAME</name></field><field><id>OBJECT_ID</id><enabled>Y</enabled><name>OBJECT_ID</name></field><field><id>OBJECT_REVISION</id><enabled>Y</enabled><name>OBJECT_REVISION</name></field><field><id>PARENT_CHANNEL_ID</id><enabled>Y</enabled><name>PARENT_CHANNEL_ID</name></field><field><id>ROOT_CHANNEL_ID</id><enabled>Y</enabled><name>ROOT_CHANNEL_ID</name></field></channel-log-table>
  42 +<step-log-table><connection/>
  43 +<schema/>
  44 +<table/>
  45 +<timeout_days/>
  46 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>TRANSNAME</id><enabled>Y</enabled><name>TRANSNAME</name></field><field><id>STEPNAME</id><enabled>Y</enabled><name>STEPNAME</name></field><field><id>STEP_COPY</id><enabled>Y</enabled><name>STEP_COPY</name></field><field><id>LINES_READ</id><enabled>Y</enabled><name>LINES_READ</name></field><field><id>LINES_WRITTEN</id><enabled>Y</enabled><name>LINES_WRITTEN</name></field><field><id>LINES_UPDATED</id><enabled>Y</enabled><name>LINES_UPDATED</name></field><field><id>LINES_INPUT</id><enabled>Y</enabled><name>LINES_INPUT</name></field><field><id>LINES_OUTPUT</id><enabled>Y</enabled><name>LINES_OUTPUT</name></field><field><id>LINES_REJECTED</id><enabled>Y</enabled><name>LINES_REJECTED</name></field><field><id>ERRORS</id><enabled>Y</enabled><name>ERRORS</name></field><field><id>LOG_FIELD</id><enabled>N</enabled><name>LOG_FIELD</name></field></step-log-table>
  47 +<metrics-log-table><connection/>
  48 +<schema/>
  49 +<table/>
  50 +<timeout_days/>
  51 +<field><id>ID_BATCH</id><enabled>Y</enabled><name>ID_BATCH</name></field><field><id>CHANNEL_ID</id><enabled>Y</enabled><name>CHANNEL_ID</name></field><field><id>LOG_DATE</id><enabled>Y</enabled><name>LOG_DATE</name></field><field><id>METRICS_DATE</id><enabled>Y</enabled><name>METRICS_DATE</name></field><field><id>METRICS_CODE</id><enabled>Y</enabled><name>METRICS_CODE</name></field><field><id>METRICS_DESCRIPTION</id><enabled>Y</enabled><name>METRICS_DESCRIPTION</name></field><field><id>METRICS_SUBJECT</id><enabled>Y</enabled><name>METRICS_SUBJECT</name></field><field><id>METRICS_TYPE</id><enabled>Y</enabled><name>METRICS_TYPE</name></field><field><id>METRICS_VALUE</id><enabled>Y</enabled><name>METRICS_VALUE</name></field></metrics-log-table>
  52 + </log>
  53 + <maxdate>
  54 + <connection/>
  55 + <table/>
  56 + <field/>
  57 + <offset>0.0</offset>
  58 + <maxdiff>0.0</maxdiff>
  59 + </maxdate>
  60 + <size_rowset>10000</size_rowset>
  61 + <sleep_time_empty>50</sleep_time_empty>
  62 + <sleep_time_full>50</sleep_time_full>
  63 + <unique_connections>N</unique_connections>
  64 + <feedback_shown>Y</feedback_shown>
  65 + <feedback_size>50000</feedback_size>
  66 + <using_thread_priorities>Y</using_thread_priorities>
  67 + <shared_objects_file/>
  68 + <capture_step_performance>N</capture_step_performance>
  69 + <step_performance_capturing_delay>1000</step_performance_capturing_delay>
  70 + <step_performance_capturing_size_limit>100</step_performance_capturing_size_limit>
  71 + <dependencies>
  72 + </dependencies>
  73 + <partitionschemas>
  74 + </partitionschemas>
  75 + <slaveservers>
  76 + </slaveservers>
  77 + <clusterschemas>
  78 + </clusterschemas>
  79 + <created_user>-</created_user>
  80 + <created_date>2016&#x2f;06&#x2f;29 17&#x3a;00&#x3a;01.094</created_date>
  81 + <modified_user>-</modified_user>
  82 + <modified_date>2016&#x2f;06&#x2f;29 17&#x3a;00&#x3a;01.094</modified_date>
  83 + <key_for_session_key>H4sIAAAAAAAAAAMAAAAAAAAAAAA&#x3d;</key_for_session_key>
  84 + <is_key_private>N</is_key_private>
  85 + </info>
  86 + <notepads>
  87 + <notepad>
  88 + <note>&#x8def;&#x724c;&#x4fe1;&#x606f;&#x8f93;&#x5165;&#xff0c;&#x8def;&#x724c;&#x540d;&#x5b57;&#x662f;&#x4e0d;&#x80fd;&#x91cd;&#x590d;&#x7684;&#xa;&#x4e00;&#x822c;&#x6765;&#x8bf4;&#xff0c;&#x5e94;&#x8be5;&#x662f;&#x5bfc;&#x5165;&#x65f6;&#x523b;&#x6570;&#x636e;&#x81ea;&#x52a8;&#x751f;&#x6210;&#x7684;&#xff0c;&#x8fd9;&#x4e2a;&#x518d;&#x8bae;&#xa;&#xa;</note>
  89 + <xloc>57</xloc>
  90 + <yloc>291</yloc>
  91 + <width>298</width>
  92 + <heigth>74</heigth>
  93 + <fontname>YaHei Consolas Hybrid</fontname>
  94 + <fontsize>12</fontsize>
  95 + <fontbold>N</fontbold>
  96 + <fontitalic>N</fontitalic>
  97 + <fontcolorred>0</fontcolorred>
  98 + <fontcolorgreen>0</fontcolorgreen>
  99 + <fontcolorblue>0</fontcolorblue>
  100 + <backgroundcolorred>255</backgroundcolorred>
  101 + <backgroundcolorgreen>205</backgroundcolorgreen>
  102 + <backgroundcolorblue>112</backgroundcolorblue>
  103 + <bordercolorred>100</bordercolorred>
  104 + <bordercolorgreen>100</bordercolorgreen>
  105 + <bordercolorblue>100</bordercolorblue>
  106 + <drawshadow>Y</drawshadow>
  107 + </notepad>
  108 + </notepads>
  109 + <connection>
  110 + <name>bus_control_variable</name>
  111 + <server>&#x24;&#x7b;v_db_ip&#x7d;</server>
  112 + <type>MYSQL</type>
  113 + <access>Native</access>
  114 + <database>&#x24;&#x7b;v_db_dname&#x7d;</database>
  115 + <port>3306</port>
  116 + <username>&#x24;&#x7b;v_db_uname&#x7d;</username>
  117 + <password>&#x24;&#x7b;v_db_pwd&#x7d;</password>
  118 + <servername/>
  119 + <data_tablespace/>
  120 + <index_tablespace/>
  121 + <attributes>
  122 + <attribute><code>EXTRA_OPTION_MYSQL.characterEncoding</code><attribute>utf8</attribute></attribute>
  123 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  124 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  125 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  126 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  127 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  128 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  129 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  130 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  131 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  132 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  133 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  134 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  135 + </attributes>
  136 + </connection>
  137 + <connection>
  138 + <name>bus_control_&#x516c;&#x53f8;_201</name>
  139 + <server>localhost</server>
  140 + <type>MYSQL</type>
  141 + <access>Native</access>
  142 + <database>control</database>
  143 + <port>3306</port>
  144 + <username>root</username>
  145 + <password>Encrypted </password>
  146 + <servername/>
  147 + <data_tablespace/>
  148 + <index_tablespace/>
  149 + <attributes>
  150 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  151 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  152 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  153 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  154 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  155 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  156 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  157 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  158 + <attribute><code>STREAM_RESULTS</code><attribute>N</attribute></attribute>
  159 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  160 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  161 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  162 + </attributes>
  163 + </connection>
  164 + <connection>
  165 + <name>bus_control_&#x672c;&#x673a;</name>
  166 + <server>localhost</server>
  167 + <type>MYSQL</type>
  168 + <access>Native</access>
  169 + <database>control</database>
  170 + <port>3306</port>
  171 + <username>root</username>
  172 + <password>Encrypted </password>
  173 + <servername/>
  174 + <data_tablespace/>
  175 + <index_tablespace/>
  176 + <attributes>
  177 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  178 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  179 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  180 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  181 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  182 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  183 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  184 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  185 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  186 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  187 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  188 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  189 + </attributes>
  190 + </connection>
  191 + <connection>
  192 + <name>xlab_mysql_youle</name>
  193 + <server>101.231.124.8</server>
  194 + <type>MYSQL</type>
  195 + <access>Native</access>
  196 + <database>xlab_youle</database>
  197 + <port>45687</port>
  198 + <username>xlab-youle</username>
  199 + <password>Encrypted 2be98afc86aa78a88aa1be369d187a3df</password>
  200 + <servername/>
  201 + <data_tablespace/>
  202 + <index_tablespace/>
  203 + <attributes>
  204 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  205 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  206 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  207 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  208 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  209 + <attribute><code>PORT_NUMBER</code><attribute>45687</attribute></attribute>
  210 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  211 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  212 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  213 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  214 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  215 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  216 + </attributes>
  217 + </connection>
  218 + <connection>
  219 + <name>xlab_mysql_youle&#xff08;&#x672c;&#x673a;&#xff09;</name>
  220 + <server>localhost</server>
  221 + <type>MYSQL</type>
  222 + <access>Native</access>
  223 + <database>xlab_youle</database>
  224 + <port>3306</port>
  225 + <username>root</username>
  226 + <password>Encrypted </password>
  227 + <servername/>
  228 + <data_tablespace/>
  229 + <index_tablespace/>
  230 + <attributes>
  231 + <attribute><code>EXTRA_OPTION_MYSQL.defaultFetchSize</code><attribute>500</attribute></attribute>
  232 + <attribute><code>EXTRA_OPTION_MYSQL.useCursorFetch</code><attribute>true</attribute></attribute>
  233 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  234 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  235 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  236 + <attribute><code>PORT_NUMBER</code><attribute>3306</attribute></attribute>
  237 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  238 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  239 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  240 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>N</attribute></attribute>
  241 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>N</attribute></attribute>
  242 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  243 + </attributes>
  244 + </connection>
  245 + <connection>
  246 + <name>xlab_youle</name>
  247 + <server/>
  248 + <type>MYSQL</type>
  249 + <access>JNDI</access>
  250 + <database>xlab_youle</database>
  251 + <port>1521</port>
  252 + <username/>
  253 + <password>Encrypted </password>
  254 + <servername/>
  255 + <data_tablespace/>
  256 + <index_tablespace/>
  257 + <attributes>
  258 + <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
  259 + <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
  260 + <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
  261 + <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
  262 + <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
  263 + <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
  264 + <attribute><code>STREAM_RESULTS</code><attribute>Y</attribute></attribute>
  265 + <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
  266 + <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
  267 + <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
  268 + </attributes>
  269 + </connection>
  270 + <order>
  271 + <hop> <from>&#x5b57;&#x6bb5;&#x6539;&#x540d;</from><to>&#x67e5;&#x8be2;&#x7ebf;&#x8def;&#x5173;&#x8054;</to><enabled>Y</enabled> </hop>
  272 + <hop> <from>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_s_gbi</from><to>&#x9519;&#x8bef;&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
  273 + <hop> <from>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</from><to>&#x5b57;&#x6bb5;&#x6539;&#x540d;</to><enabled>Y</enabled> </hop>
  274 + <hop> <from>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</from><to>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</to><enabled>Y</enabled> </hop>
  275 + <hop> <from>&#x67e5;&#x8be2;&#x7ebf;&#x8def;&#x5173;&#x8054;</from><to>&#x542f;&#x7528;&#x88ab;&#x6570;&#x636e;flag</to><enabled>Y</enabled> </hop>
  276 + <hop> <from>&#x542f;&#x7528;&#x88ab;&#x6570;&#x636e;flag</from><to>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_s_gbi</to><enabled>Y</enabled> </hop>
  277 + </order>
  278 + <step>
  279 + <name>&#x539f;&#x59cb;&#x7cfb;&#x7edf;&#x5bfc;&#x51fa;&#x7684;Excel&#x8f93;&#x5165;</name>
  280 + <type>ExcelInput</type>
  281 + <description/>
  282 + <distribute>Y</distribute>
  283 + <custom_distribution/>
  284 + <copies>1</copies>
  285 + <partitioning>
  286 + <method>none</method>
  287 + <schema_name/>
  288 + </partitioning>
  289 + <header>Y</header>
  290 + <noempty>Y</noempty>
  291 + <stoponempty>N</stoponempty>
  292 + <filefield/>
  293 + <sheetfield/>
  294 + <sheetrownumfield/>
  295 + <rownumfield/>
  296 + <sheetfield/>
  297 + <filefield/>
  298 + <limit>0</limit>
  299 + <encoding/>
  300 + <add_to_result_filenames>Y</add_to_result_filenames>
  301 + <accept_filenames>Y</accept_filenames>
  302 + <accept_field>filepath_</accept_field>
  303 + <accept_stepname>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</accept_stepname>
  304 + <file>
  305 + <name/>
  306 + <filemask/>
  307 + <exclude_filemask/>
  308 + <file_required>N</file_required>
  309 + <include_subfolders>N</include_subfolders>
  310 + </file>
  311 + <fields>
  312 + <field>
  313 + <name>&#x7ebf;&#x8def;</name>
  314 + <type>String</type>
  315 + <length>-1</length>
  316 + <precision>-1</precision>
  317 + <trim_type>none</trim_type>
  318 + <repeat>N</repeat>
  319 + <format/>
  320 + <currency/>
  321 + <decimal/>
  322 + <group/>
  323 + </field>
  324 + <field>
  325 + <name>&#x8def;&#x724c;&#x7f16;&#x53f7;</name>
  326 + <type>String</type>
  327 + <length>-1</length>
  328 + <precision>-1</precision>
  329 + <trim_type>none</trim_type>
  330 + <repeat>N</repeat>
  331 + <format>&#x23;</format>
  332 + <currency/>
  333 + <decimal/>
  334 + <group/>
  335 + </field>
  336 + <field>
  337 + <name>&#x8def;&#x724c;&#x540d;&#x79f0;</name>
  338 + <type>String</type>
  339 + <length>-1</length>
  340 + <precision>-1</precision>
  341 + <trim_type>none</trim_type>
  342 + <repeat>N</repeat>
  343 + <format>&#x23;</format>
  344 + <currency/>
  345 + <decimal/>
  346 + <group/>
  347 + </field>
  348 + <field>
  349 + <name>&#x8def;&#x724c;&#x7c7b;&#x578b;</name>
  350 + <type>String</type>
  351 + <length>-1</length>
  352 + <precision>-1</precision>
  353 + <trim_type>none</trim_type>
  354 + <repeat>N</repeat>
  355 + <format/>
  356 + <currency/>
  357 + <decimal/>
  358 + <group/>
  359 + </field>
  360 + </fields>
  361 + <sheets>
  362 + <sheet>
  363 + <name>&#x5de5;&#x4f5c;&#x8868;1</name>
  364 + <startrow>0</startrow>
  365 + <startcol>0</startcol>
  366 + </sheet>
  367 + </sheets>
  368 + <strict_types>N</strict_types>
  369 + <error_ignored>N</error_ignored>
  370 + <error_line_skipped>N</error_line_skipped>
  371 + <bad_line_files_destination_directory/>
  372 + <bad_line_files_extension>warning</bad_line_files_extension>
  373 + <error_line_files_destination_directory/>
  374 + <error_line_files_extension>error</error_line_files_extension>
  375 + <line_number_files_destination_directory/>
  376 + <line_number_files_extension>line</line_number_files_extension>
  377 + <shortFileFieldName/>
  378 + <pathFieldName/>
  379 + <hiddenFieldName/>
  380 + <lastModificationTimeFieldName/>
  381 + <uriNameFieldName/>
  382 + <rootUriNameFieldName/>
  383 + <extensionFieldName/>
  384 + <sizeFieldName/>
  385 + <spreadsheet_type>JXL</spreadsheet_type>
  386 + <cluster_schema/>
  387 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  388 + <xloc>150</xloc>
  389 + <yloc>68</yloc>
  390 + <draw>Y</draw>
  391 + </GUI>
  392 + </step>
  393 +
  394 + <step>
  395 + <name>&#x542f;&#x7528;&#x88ab;&#x6570;&#x636e;flag</name>
  396 + <type>Constant</type>
  397 + <description/>
  398 + <distribute>Y</distribute>
  399 + <custom_distribution/>
  400 + <copies>1</copies>
  401 + <partitioning>
  402 + <method>none</method>
  403 + <schema_name/>
  404 + </partitioning>
  405 + <fields>
  406 + <field>
  407 + <name>isCancel</name>
  408 + <type>Integer</type>
  409 + <format/>
  410 + <currency/>
  411 + <decimal/>
  412 + <group/>
  413 + <nullif>0</nullif>
  414 + <length>-1</length>
  415 + <precision>-1</precision>
  416 + <set_empty_string>N</set_empty_string>
  417 + </field>
  418 + </fields>
  419 + <cluster_schema/>
  420 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  421 + <xloc>544</xloc>
  422 + <yloc>70</yloc>
  423 + <draw>Y</draw>
  424 + </GUI>
  425 + </step>
  426 +
  427 + <step>
  428 + <name>&#x5b57;&#x6bb5;&#x6539;&#x540d;</name>
  429 + <type>SelectValues</type>
  430 + <description/>
  431 + <distribute>Y</distribute>
  432 + <custom_distribution/>
  433 + <copies>1</copies>
  434 + <partitioning>
  435 + <method>none</method>
  436 + <schema_name/>
  437 + </partitioning>
  438 + <fields> <select_unspecified>N</select_unspecified>
  439 + <meta> <name>&#x7ebf;&#x8def;</name>
  440 + <rename>xl</rename>
  441 + <type>String</type>
  442 + <length>-2</length>
  443 + <precision>-2</precision>
  444 + <conversion_mask/>
  445 + <date_format_lenient>false</date_format_lenient>
  446 + <date_format_locale/>
  447 + <date_format_timezone/>
  448 + <lenient_string_to_number>false</lenient_string_to_number>
  449 + <encoding/>
  450 + <decimal_symbol/>
  451 + <grouping_symbol/>
  452 + <currency_symbol/>
  453 + <storage_type/>
  454 + </meta> <meta> <name>&#x8def;&#x724c;&#x7f16;&#x53f7;</name>
  455 + <rename>lpno</rename>
  456 + <type>Integer</type>
  457 + <length>-2</length>
  458 + <precision>-2</precision>
  459 + <conversion_mask/>
  460 + <date_format_lenient>false</date_format_lenient>
  461 + <date_format_locale/>
  462 + <date_format_timezone/>
  463 + <lenient_string_to_number>false</lenient_string_to_number>
  464 + <encoding/>
  465 + <decimal_symbol/>
  466 + <grouping_symbol/>
  467 + <currency_symbol/>
  468 + <storage_type/>
  469 + </meta> <meta> <name>&#x8def;&#x724c;&#x540d;&#x79f0;</name>
  470 + <rename>lpname</rename>
  471 + <type>String</type>
  472 + <length>-2</length>
  473 + <precision>-2</precision>
  474 + <conversion_mask/>
  475 + <date_format_lenient>false</date_format_lenient>
  476 + <date_format_locale/>
  477 + <date_format_timezone/>
  478 + <lenient_string_to_number>false</lenient_string_to_number>
  479 + <encoding/>
  480 + <decimal_symbol/>
  481 + <grouping_symbol/>
  482 + <currency_symbol/>
  483 + <storage_type/>
  484 + </meta> <meta> <name>&#x8def;&#x724c;&#x7c7b;&#x578b;</name>
  485 + <rename>lptype</rename>
  486 + <type>String</type>
  487 + <length>-2</length>
  488 + <precision>-2</precision>
  489 + <conversion_mask/>
  490 + <date_format_lenient>false</date_format_lenient>
  491 + <date_format_locale/>
  492 + <date_format_timezone/>
  493 + <lenient_string_to_number>false</lenient_string_to_number>
  494 + <encoding/>
  495 + <decimal_symbol/>
  496 + <grouping_symbol/>
  497 + <currency_symbol/>
  498 + <storage_type/>
  499 + </meta> </fields> <cluster_schema/>
  500 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  501 + <xloc>295</xloc>
  502 + <yloc>68</yloc>
  503 + <draw>Y</draw>
  504 + </GUI>
  505 + </step>
  506 +
  507 + <step>
  508 + <name>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_s_gbi</name>
  509 + <type>InsertUpdate</type>
  510 + <description/>
  511 + <distribute>Y</distribute>
  512 + <custom_distribution/>
  513 + <copies>1</copies>
  514 + <partitioning>
  515 + <method>none</method>
  516 + <schema_name/>
  517 + </partitioning>
  518 + <connection>bus_control_variable</connection>
  519 + <commit>100</commit>
  520 + <update_bypassed>N</update_bypassed>
  521 + <lookup>
  522 + <schema/>
  523 + <table>bsth_c_s_gbi</table>
  524 + <key>
  525 + <name>xlid</name>
  526 + <field>xl</field>
  527 + <condition>&#x3d;</condition>
  528 + <name2/>
  529 + </key>
  530 + <key>
  531 + <name>lpname</name>
  532 + <field>lp_name</field>
  533 + <condition>&#x3d;</condition>
  534 + <name2/>
  535 + </key>
  536 + <key>
  537 + <name>isCancel</name>
  538 + <field>is_cancel</field>
  539 + <condition>&#x3d;</condition>
  540 + <name2/>
  541 + </key>
  542 + <value>
  543 + <name>xl</name>
  544 + <rename>xlid</rename>
  545 + <update>Y</update>
  546 + </value>
  547 + <value>
  548 + <name>lp_no</name>
  549 + <rename>lpno</rename>
  550 + <update>Y</update>
  551 + </value>
  552 + <value>
  553 + <name>lp_name</name>
  554 + <rename>lpname</rename>
  555 + <update>Y</update>
  556 + </value>
  557 + <value>
  558 + <name>lp_type</name>
  559 + <rename>lptype</rename>
  560 + <update>Y</update>
  561 + </value>
  562 + <value>
  563 + <name>is_cancel</name>
  564 + <rename>isCancel</rename>
  565 + <update>Y</update>
  566 + </value>
  567 + </lookup>
  568 + <cluster_schema/>
  569 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  570 + <xloc>545</xloc>
  571 + <yloc>184</yloc>
  572 + <draw>Y</draw>
  573 + </GUI>
  574 + </step>
  575 +
  576 + <step>
  577 + <name>&#x67e5;&#x8be2;&#x7ebf;&#x8def;&#x5173;&#x8054;</name>
  578 + <type>DBLookup</type>
  579 + <description/>
  580 + <distribute>Y</distribute>
  581 + <custom_distribution/>
  582 + <copies>1</copies>
  583 + <partitioning>
  584 + <method>none</method>
  585 + <schema_name/>
  586 + </partitioning>
  587 + <connection>bus_control_variable</connection>
  588 + <cache>Y</cache>
  589 + <cache_load_all>Y</cache_load_all>
  590 + <cache_size>0</cache_size>
  591 + <lookup>
  592 + <schema/>
  593 + <table>bsth_c_line</table>
  594 + <orderby/>
  595 + <fail_on_multiple>N</fail_on_multiple>
  596 + <eat_row_on_failure>N</eat_row_on_failure>
  597 + <key>
  598 + <name>xl</name>
  599 + <field>name</field>
  600 + <condition>&#x3d;</condition>
  601 + <name2/>
  602 + </key>
  603 + <value>
  604 + <name>id</name>
  605 + <rename>xlid</rename>
  606 + <default/>
  607 + <type>Integer</type>
  608 + </value>
  609 + </lookup>
  610 + <cluster_schema/>
  611 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  612 + <xloc>428</xloc>
  613 + <yloc>69</yloc>
  614 + <draw>Y</draw>
  615 + </GUI>
  616 + </step>
  617 +
  618 + <step>
  619 + <name>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</name>
  620 + <type>GetVariable</type>
  621 + <description/>
  622 + <distribute>Y</distribute>
  623 + <custom_distribution/>
  624 + <copies>1</copies>
  625 + <partitioning>
  626 + <method>none</method>
  627 + <schema_name/>
  628 + </partitioning>
  629 + <fields>
  630 + <field>
  631 + <name>filepath_</name>
  632 + <variable>&#x24;&#x7b;filepath&#x7d;</variable>
  633 + <type>String</type>
  634 + <format/>
  635 + <currency/>
  636 + <decimal/>
  637 + <group/>
  638 + <length>-1</length>
  639 + <precision>-1</precision>
  640 + <trim_type>none</trim_type>
  641 + </field>
  642 + <field>
  643 + <name>erroroutputdir_</name>
  644 + <variable>&#x24;&#x7b;erroroutputdir&#x7d;</variable>
  645 + <type>String</type>
  646 + <format/>
  647 + <currency/>
  648 + <decimal/>
  649 + <group/>
  650 + <length>-1</length>
  651 + <precision>-1</precision>
  652 + <trim_type>none</trim_type>
  653 + </field>
  654 + </fields>
  655 + <cluster_schema/>
  656 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  657 + <xloc>152</xloc>
  658 + <yloc>193</yloc>
  659 + <draw>Y</draw>
  660 + </GUI>
  661 + </step>
  662 +
  663 + <step>
  664 + <name>&#x9519;&#x8bef;&#x8f93;&#x51fa;</name>
  665 + <type>ExcelOutput</type>
  666 + <description/>
  667 + <distribute>Y</distribute>
  668 + <custom_distribution/>
  669 + <copies>1</copies>
  670 + <partitioning>
  671 + <method>none</method>
  672 + <schema_name/>
  673 + </partitioning>
  674 + <header>Y</header>
  675 + <footer>N</footer>
  676 + <encoding>UTF-8</encoding>
  677 + <append>N</append>
  678 + <add_to_result_filenames>Y</add_to_result_filenames>
  679 + <file>
  680 + <name>&#x24;&#x7b;erroroutputdir&#x7d;&#x2f;&#x8def;&#x724c;_&#x9519;&#x8bef;</name>
  681 + <extention>xls</extention>
  682 + <do_not_open_newfile_init>N</do_not_open_newfile_init>
  683 + <create_parent_folder>N</create_parent_folder>
  684 + <split>N</split>
  685 + <add_date>N</add_date>
  686 + <add_time>N</add_time>
  687 + <SpecifyFormat>N</SpecifyFormat>
  688 + <date_time_format/>
  689 + <sheetname>Sheet1</sheetname>
  690 + <autosizecolums>N</autosizecolums>
  691 + <nullisblank>N</nullisblank>
  692 + <protect_sheet>N</protect_sheet>
  693 + <password>Encrypted </password>
  694 + <splitevery>0</splitevery>
  695 + <usetempfiles>N</usetempfiles>
  696 + <tempdirectory/>
  697 + </file>
  698 + <template>
  699 + <enabled>N</enabled>
  700 + <append>N</append>
  701 + <filename>template.xls</filename>
  702 + </template>
  703 + <fields>
  704 + <field>
  705 + <name>filepath_</name>
  706 + <type>String</type>
  707 + <format/>
  708 + </field>
  709 + <field>
  710 + <name>erroroutputdir_</name>
  711 + <type>String</type>
  712 + <format/>
  713 + </field>
  714 + <field>
  715 + <name>xl</name>
  716 + <type>String</type>
  717 + <format/>
  718 + </field>
  719 + <field>
  720 + <name>lpno</name>
  721 + <type>Integer</type>
  722 + <format/>
  723 + </field>
  724 + <field>
  725 + <name>lpname</name>
  726 + <type>String</type>
  727 + <format/>
  728 + </field>
  729 + <field>
  730 + <name>lptype</name>
  731 + <type>String</type>
  732 + <format/>
  733 + </field>
  734 + <field>
  735 + <name>xlid</name>
  736 + <type>Integer</type>
  737 + <format/>
  738 + </field>
  739 + <field>
  740 + <name>isCancel</name>
  741 + <type>Integer</type>
  742 + <format/>
  743 + </field>
  744 + <field>
  745 + <name>error_count</name>
  746 + <type>Integer</type>
  747 + <format/>
  748 + </field>
  749 + <field>
  750 + <name>error_desc</name>
  751 + <type>String</type>
  752 + <format/>
  753 + </field>
  754 + <field>
  755 + <name>error_column1</name>
  756 + <type>String</type>
  757 + <format/>
  758 + </field>
  759 + <field>
  760 + <name>error_column2</name>
  761 + <type>String</type>
  762 + <format/>
  763 + </field>
  764 + </fields>
  765 + <custom>
  766 + <header_font_name>arial</header_font_name>
  767 + <header_font_size>10</header_font_size>
  768 + <header_font_bold>N</header_font_bold>
  769 + <header_font_italic>N</header_font_italic>
  770 + <header_font_underline>no</header_font_underline>
  771 + <header_font_orientation>horizontal</header_font_orientation>
  772 + <header_font_color>black</header_font_color>
  773 + <header_background_color>none</header_background_color>
  774 + <header_row_height>255</header_row_height>
  775 + <header_alignment>left</header_alignment>
  776 + <header_image/>
  777 + <row_font_name>arial</row_font_name>
  778 + <row_font_size>10</row_font_size>
  779 + <row_font_color>black</row_font_color>
  780 + <row_background_color>none</row_background_color>
  781 + </custom>
  782 + <cluster_schema/>
  783 + <remotesteps> <input> </input> <output> </output> </remotesteps> <GUI>
  784 + <xloc>545</xloc>
  785 + <yloc>307</yloc>
  786 + <draw>Y</draw>
  787 + </GUI>
  788 + </step>
  789 +
  790 + <step_error_handling>
  791 + <error>
  792 + <source_step>&#x63d2;&#x5165;&#x2f;&#x66f4;&#x65b0;bsth_c_s_gbi</source_step>
  793 + <target_step>&#x9519;&#x8bef;&#x8f93;&#x51fa;</target_step>
  794 + <is_enabled>Y</is_enabled>
  795 + <nr_valuename>error_count</nr_valuename>
  796 + <descriptions_valuename>error_desc</descriptions_valuename>
  797 + <fields_valuename>error_column1</fields_valuename>
  798 + <codes_valuename>error_column2</codes_valuename>
  799 + <max_errors/>
  800 + <max_pct_errors/>
  801 + <min_pct_rows/>
  802 + </error>
  803 + </step_error_handling>
  804 + <slave-step-copy-partition-distribution>
  805 +</slave-step-copy-partition-distribution>
  806 + <slave_transformation>N</slave_transformation>
  807 +
  808 +</transformation>
... ...
src/main/resources/static/pages/base/timesmodel/js/raty/lib/jquery.raty.min.js
1   -/*!
2   - * jQuery Raty - A Star Rating Plugin
3   - *
4   - * Licensed under The MIT License
5   - *
6   - * @version 2.5.2
7   - * @author Washington Botelho
8   - * @documentation wbotelhos.com/raty
9   - *
10   - */
11   -
12   -;(function(b){var a={init:function(c){return this.each(function(){a.destroy.call(this);this.opt=b.extend(true,{},b.fn.raty.defaults,c);var e=b(this),g=["number","readOnly","score","scoreName"];a._callback.call(this,g);if(this.opt.precision){a._adjustPrecision.call(this);}this.opt.number=a._between(this.opt.number,0,this.opt.numberMax);this.opt.path=this.opt.path||"";if(this.opt.path&&this.opt.path.slice(this.opt.path.length-1,this.opt.path.length)!=="/"){this.opt.path+="/";}this.stars=a._createStars.call(this);this.score=a._createScore.call(this);a._apply.call(this,this.opt.score);var f=this.opt.space?4:0,d=this.opt.width||(this.opt.number*this.opt.size+this.opt.number*f);if(this.opt.cancel){this.cancel=a._createCancel.call(this);d+=(this.opt.size+f);}if(this.opt.readOnly){a._lock.call(this);}else{e.css("cursor","pointer");a._binds.call(this);}if(this.opt.width!==false){e.css("width",d);}a._target.call(this,this.opt.score);e.data({settings:this.opt,raty:true});});},_adjustPrecision:function(){this.opt.targetType="score";this.opt.half=true;},_apply:function(c){if(c&&c>0){c=a._between(c,0,this.opt.number);this.score.val(c);}a._fill.call(this,c);if(c){a._roundStars.call(this,c);}},_between:function(e,d,c){return Math.min(Math.max(parseFloat(e),d),c);},_binds:function(){if(this.cancel){a._bindCancel.call(this);}a._bindClick.call(this);a._bindOut.call(this);a._bindOver.call(this);},_bindCancel:function(){a._bindClickCancel.call(this);a._bindOutCancel.call(this);a._bindOverCancel.call(this);},_bindClick:function(){var c=this,d=b(c);c.stars.on("click.raty",function(e){c.score.val((c.opt.half||c.opt.precision)?d.data("score"):this.alt);if(c.opt.click){c.opt.click.call(c,parseFloat(c.score.val()),e);}});},_bindClickCancel:function(){var c=this;c.cancel.on("click.raty",function(d){c.score.removeAttr("value");if(c.opt.click){c.opt.click.call(c,null,d);}});},_bindOut:function(){var c=this;b(this).on("mouseleave.raty",function(d){var e=parseFloat(c.score.val())||undefined;a._apply.call(c,e);a._target.call(c,e,d);if(c.opt.mouseout){c.opt.mouseout.call(c,e,d);}});},_bindOutCancel:function(){var c=this;c.cancel.on("mouseleave.raty",function(d){b(this).attr("src",c.opt.path+c.opt.cancelOff);if(c.opt.mouseout){c.opt.mouseout.call(c,c.score.val()||null,d);}});},_bindOverCancel:function(){var c=this;c.cancel.on("mouseover.raty",function(d){b(this).attr("src",c.opt.path+c.opt.cancelOn);c.stars.attr("src",c.opt.path+c.opt.starOff);a._target.call(c,null,d);if(c.opt.mouseover){c.opt.mouseover.call(c,null);}});},_bindOver:function(){var c=this,d=b(c),e=c.opt.half?"mousemove.raty":"mouseover.raty";c.stars.on(e,function(g){var h=parseInt(this.alt,10);if(c.opt.half){var f=parseFloat((g.pageX-b(this).offset().left)/c.opt.size),j=(f>0.5)?1:0.5;h=h-1+j;a._fill.call(c,h);if(c.opt.precision){h=h-j+f;}a._roundStars.call(c,h);d.data("score",h);}else{a._fill.call(c,h);}a._target.call(c,h,g);if(c.opt.mouseover){c.opt.mouseover.call(c,h,g);}});},_callback:function(c){for(i in c){if(typeof this.opt[c[i]]==="function"){this.opt[c[i]]=this.opt[c[i]].call(this);}}},_createCancel:function(){var e=b(this),c=this.opt.path+this.opt.cancelOff,d=b("<img />",{src:c,alt:"x",title:this.opt.cancelHint,"class":"raty-cancel"});if(this.opt.cancelPlace=="left"){e.prepend("&#160;").prepend(d);}else{e.append("&#160;").append(d);}return d;},_createScore:function(){return b("<input />",{type:"hidden",name:this.opt.scoreName}).appendTo(this);},_createStars:function(){var e=b(this);for(var c=1;c<=this.opt.number;c++){var f=a._getHint.call(this,c),d=(this.opt.score&&this.opt.score>=c)?"starOn":"starOff";d=this.opt.path+this.opt[d];b("<img />",{src:d,alt:c,title:f}).appendTo(this);if(this.opt.space){e.append((c<this.opt.number)?"&#160;":"");}}return e.children("img");},_error:function(c){b(this).html(c);b.error(c);},_fill:function(d){var m=this,e=0;for(var f=1;f<=m.stars.length;f++){var g=m.stars.eq(f-1),l=m.opt.single?(f==d):(f<=d);if(m.opt.iconRange&&m.opt.iconRange.length>e){var j=m.opt.iconRange[e],h=j.on||m.opt.starOn,c=j.off||m.opt.starOff,k=l?h:c;if(f<=j.range){g.attr("src",m.opt.path+k);}if(f==j.range){e++;}}else{var k=l?"starOn":"starOff";g.attr("src",this.opt.path+this.opt[k]);}}},_getHint:function(d){var c=this.opt.hints[d-1];return(c==="")?"":(c||d);},_lock:function(){var d=parseInt(this.score.val(),10),c=d?a._getHint.call(this,d):this.opt.noRatedMsg;b(this).data("readonly",true).css("cursor","").attr("title",c);this.score.attr("readonly","readonly");this.stars.attr("title",c);if(this.cancel){this.cancel.hide();}},_roundStars:function(e){var d=(e-Math.floor(e)).toFixed(2);if(d>this.opt.round.down){var c="starOn";if(this.opt.halfShow&&d<this.opt.round.up){c="starHalf";}else{if(d<this.opt.round.full){c="starOff";}}this.stars.eq(Math.ceil(e)-1).attr("src",this.opt.path+this.opt[c]);}},_target:function(f,d){if(this.opt.target){var e=b(this.opt.target);if(e.length===0){a._error.call(this,"Target selector invalid or missing!");}if(this.opt.targetFormat.indexOf("{score}")<0){a._error.call(this,'Template "{score}" missing!');}var c=d&&d.type=="mouseover";if(f===undefined){f=this.opt.targetText;}else{if(f===null){f=c?this.opt.cancelHint:this.opt.targetText;}else{if(this.opt.targetType=="hint"){f=a._getHint.call(this,Math.ceil(f));}else{if(this.opt.precision){f=parseFloat(f).toFixed(1);}}if(!c&&!this.opt.targetKeep){f=this.opt.targetText;}}}if(f){f=this.opt.targetFormat.toString().replace("{score}",f);}if(e.is(":input")){e.val(f);}else{e.html(f);}}},_unlock:function(){b(this).data("readonly",false).css("cursor","pointer").removeAttr("title");this.score.removeAttr("readonly","readonly");for(var c=0;c<this.opt.number;c++){this.stars.eq(c).attr("title",a._getHint.call(this,c+1));}if(this.cancel){this.cancel.css("display","");}},cancel:function(c){return this.each(function(){if(b(this).data("readonly")!==true){a[c?"click":"score"].call(this,null);this.score.removeAttr("value");}});},click:function(c){return b(this).each(function(){if(b(this).data("readonly")!==true){a._apply.call(this,c);if(!this.opt.click){a._error.call(this,'You must add the "click: function(score, evt) { }" callback.');}this.opt.click.call(this,c,{type:"click"});a._target.call(this,c);}});},destroy:function(){return b(this).each(function(){var d=b(this),c=d.data("raw");if(c){d.off(".raty").empty().css({cursor:c.style.cursor,width:c.style.width}).removeData("readonly");}else{d.data("raw",d.clone()[0]);}});},getScore:function(){var d=[],c;b(this).each(function(){c=this.score.val();d.push(c?parseFloat(c):undefined);});return(d.length>1)?d:d[0];},readOnly:function(c){return this.each(function(){var d=b(this);if(d.data("readonly")!==c){if(c){d.off(".raty").children("img").off(".raty");a._lock.call(this);}else{a._binds.call(this);a._unlock.call(this);}d.data("readonly",c);}});},reload:function(){return a.set.call(this,{});},score:function(){return arguments.length?a.setScore.apply(this,arguments):a.getScore.call(this);},set:function(c){return this.each(function(){var e=b(this),f=e.data("settings"),d=b.extend({},f,c);e.raty(d);});},setScore:function(c){return b(this).each(function(){if(b(this).data("readonly")!==true){a._apply.call(this,c);a._target.call(this,c);}});}};b.fn.raty=function(c){if(a[c]){return a[c].apply(this,Array.prototype.slice.call(arguments,1));}else{if(typeof c==="object"||!c){return a.init.apply(this,arguments);}else{b.error("Method "+c+" does not exist!");}}};b.fn.raty.defaults={cancel:false,cancelHint:"Cancel this rating!",cancelOff:"cancel-off.png",cancelOn:"cancel-on.png",cancelPlace:"left",click:undefined,half:false,halfShow:true,hints:["bad","poor","regular","good","gorgeous"],iconRange:undefined,mouseout:undefined,mouseover:undefined,noRatedMsg:"Not rated yet!",number:5,numberMax:20,path:"",precision:false,readOnly:false,round:{down:0.25,full:0.6,up:0.76},score:undefined,scoreName:"score",single:false,size:16,space:true,starHalf:"star-half.png",starOff:"star-off.png",starOn:"star-on.png",target:undefined,targetFormat:"{score}",targetKeep:false,targetText:"",targetType:"hint",width:undefined};})(jQuery);
  1 +/*!
  2 + * jQuery Raty - A Star Rating Plugin
  3 + *
  4 + * Licensed under The MIT License
  5 + *
  6 + * @version 2.5.2
  7 + * @author Washington Botelho
  8 + * @documentation wbotelhos.com/raty
  9 + *
  10 + */
  11 +
  12 +;(function(b){var a={init:function(c){return this.each(function(){a.destroy.call(this);this.opt=b.extend(true,{},b.fn.raty.defaults,c);var e=b(this),g=["number","readOnly","score","scoreName"];a._callback.call(this,g);if(this.opt.precision){a._adjustPrecision.call(this);}this.opt.number=a._between(this.opt.number,0,this.opt.numberMax);this.opt.path=this.opt.path||"";if(this.opt.path&&this.opt.path.slice(this.opt.path.length-1,this.opt.path.length)!=="/"){this.opt.path+="/";}this.stars=a._createStars.call(this);this.score=a._createScore.call(this);a._apply.call(this,this.opt.score);var f=this.opt.space?4:0,d=this.opt.width||(this.opt.number*this.opt.size+this.opt.number*f);if(this.opt.cancel){this.cancel=a._createCancel.call(this);d+=(this.opt.size+f);}if(this.opt.readOnly){a._lock.call(this);}else{e.css("cursor","pointer");a._binds.call(this);}if(this.opt.width!==false){e.css("width",d);}a._target.call(this,this.opt.score);e.data({settings:this.opt,raty:true});});},_adjustPrecision:function(){this.opt.targetType="score";this.opt.half=true;},_apply:function(c){if(c&&c>0){c=a._between(c,0,this.opt.number);this.score.val(c);}a._fill.call(this,c);if(c){a._roundStars.call(this,c);}},_between:function(e,d,c){return Math.min(Math.max(parseFloat(e),d),c);},_binds:function(){if(this.cancel){a._bindCancel.call(this);}a._bindClick.call(this);a._bindOut.call(this);a._bindOver.call(this);},_bindCancel:function(){a._bindClickCancel.call(this);a._bindOutCancel.call(this);a._bindOverCancel.call(this);},_bindClick:function(){var c=this,d=b(c);c.stars.on("click.raty",function(e){c.score.val((c.opt.half||c.opt.precision)?d.data("score"):this.alt);if(c.opt.click){c.opt.click.call(c,parseFloat(c.score.val()),e);}});},_bindClickCancel:function(){var c=this;c.cancel.on("click.raty",function(d){c.score.removeAttr("value");if(c.opt.click){c.opt.click.call(c,null,d);}});},_bindOut:function(){var c=this;b(this).on("mouseleave.raty",function(d){var e=parseFloat(c.score.val())||undefined;a._apply.call(c,e);a._target.call(c,e,d);if(c.opt.mouseout){c.opt.mouseout.call(c,e,d);}});},_bindOutCancel:function(){var c=this;c.cancel.on("mouseleave.raty",function(d){b(this).attr("src",c.opt.path+c.opt.cancelOff);if(c.opt.mouseout){c.opt.mouseout.call(c,c.score.val()||null,d);}});},_bindOverCancel:function(){var c=this;c.cancel.on("mouseover.raty",function(d){b(this).attr("src",c.opt.path+c.opt.cancelOn);c.stars.attr("src",c.opt.path+c.opt.starOff);a._target.call(c,null,d);if(c.opt.mouseover){c.opt.mouseover.call(c,null);}});},_bindOver:function(){var c=this,d=b(c),e=c.opt.half?"mousemove.raty":"mouseover.raty";c.stars.on(e,function(g){var h=parseInt(this.alt,10);if(c.opt.half){var f=parseFloat((g.pageX-b(this).offset().left)/c.opt.size),j=(f>0.5)?1:0.5;h=h-1+j;a._fill.call(c,h);if(c.opt.precision){h=h-j+f;}a._roundStars.call(c,h);d.data("score",h);}else{a._fill.call(c,h);}a._target.call(c,h,g);if(c.opt.mouseover){c.opt.mouseover.call(c,h,g);}});},_callback:function(c){for(i in c){if(typeof this.opt[c[i]]==="function"){this.opt[c[i]]=this.opt[c[i]].call(this);}}},_createCancel:function(){var e=b(this),c=this.opt.path+this.opt.cancelOff,d=b("<img />",{src:c,alt:"x",title:this.opt.cancelHint,"class":"raty-cancel"});if(this.opt.cancelPlace=="left"){e.prepend("&#160;").prepend(d);}else{e.append("&#160;").append(d);}return d;},_createScore:function(){return b("<input />",{type:"hidden",name:this.opt.scoreName}).appendTo(this);},_createStars:function(){var e=b(this);for(var c=1;c<=this.opt.number;c++){var f=a._getHint.call(this,c),d=(this.opt.score&&this.opt.score>=c)?"starOn":"starOff";d=this.opt.path+this.opt[d];b("<img />",{src:d,alt:c,title:f}).appendTo(this);if(this.opt.space){e.append((c<this.opt.number)?"&#160;":"");}}return e.children("img");},_error:function(c){b(this).html(c);b.error(c);},_fill:function(d){var m=this,e=0;for(var f=1;f<=m.stars.length;f++){var g=m.stars.eq(f-1),l=m.opt.single?(f==d):(f<=d);if(m.opt.iconRange&&m.opt.iconRange.length>e){var j=m.opt.iconRange[e],h=j.on||m.opt.starOn,c=j.off||m.opt.starOff,k=l?h:c;if(f<=j.range){g.attr("src",m.opt.path+k);}if(f==j.range){e++;}}else{var k=l?"starOn":"starOff";g.attr("src",this.opt.path+this.opt[k]);}}},_getHint:function(d){var c=this.opt.hints[d-1];return(c==="")?"":(c||d);},_lock:function(){var d=parseInt(this.score.val(),10),c=d?a._getHint.call(this,d):this.opt.noRatedMsg;b(this).data("readonly",true).css("cursor","").attr("title",c);this.score.attr("readonly","readonly");this.stars.attr("title",c);if(this.cancel){this.cancel.hide();}},_roundStars:function(e){var d=(e-Math.floor(e)).toFixed(2);if(d>this.opt.round.down){var c="starOn";if(this.opt.halfShow&&d<this.opt.round.up){c="starHalf";}else{if(d<this.opt.round.full){c="starOff";}}this.stars.eq(Math.ceil(e)-1).attr("src",this.opt.path+this.opt[c]);}},_target:function(f,d){if(this.opt.target){var e=b(this.opt.target);if(e.length===0){a._error.call(this,"Target selector invalid or missing!");}if(this.opt.targetFormat.indexOf("{score}")<0){a._error.call(this,'Template "{score}" missing!');}var c=d&&d.type=="mouseover";if(f===undefined){f=this.opt.targetText;}else{if(f===null){f=c?this.opt.cancelHint:this.opt.targetText;}else{if(this.opt.targetType=="hint"){f=a._getHint.call(this,Math.ceil(f));}else{if(this.opt.precision){f=parseFloat(f).toFixed(1);}}if(!c&&!this.opt.targetKeep){f=this.opt.targetText;}}}if(f){f=this.opt.targetFormat.toString().replace("{score}",f);}if(e.is(":input")){e.val(f);}else{e.html(f);}}},_unlock:function(){b(this).data("readonly",false).css("cursor","pointer").removeAttr("title");this.score.removeAttr("readonly","readonly");for(var c=0;c<this.opt.number;c++){this.stars.eq(c).attr("title",a._getHint.call(this,c+1));}if(this.cancel){this.cancel.css("display","");}},cancel:function(c){return this.each(function(){if(b(this).data("readonly")!==true){a[c?"click":"score"].call(this,null);this.score.removeAttr("value");}});},click:function(c){return b(this).each(function(){if(b(this).data("readonly")!==true){a._apply.call(this,c);if(!this.opt.click){a._error.call(this,'You must add the "click: function(score, evt) { }" callback.');}this.opt.click.call(this,c,{type:"click"});a._target.call(this,c);}});},destroy:function(){return b(this).each(function(){var d=b(this),c=d.data("raw");if(c){d.off(".raty").empty().css({cursor:c.style.cursor,width:c.style.width}).removeData("readonly");}else{d.data("raw",d.clone()[0]);}});},getScore:function(){var d=[],c;b(this).each(function(){c=this.score.val();d.push(c?parseFloat(c):undefined);});return(d.length>1)?d:d[0];},readOnly:function(c){return this.each(function(){var d=b(this);if(d.data("readonly")!==c){if(c){d.off(".raty").children("img").off(".raty");a._lock.call(this);}else{a._binds.call(this);a._unlock.call(this);}d.data("readonly",c);}});},reload:function(){return a.set.call(this,{});},score:function(){return arguments.length?a.setScore.apply(this,arguments):a.getScore.call(this);},set:function(c){return this.each(function(){var e=b(this),f=e.data("settings"),d=b.extend({},f,c);e.raty(d);});},setScore:function(c){return b(this).each(function(){if(b(this).data("readonly")!==true){a._apply.call(this,c);a._target.call(this,c);}});}};b.fn.raty=function(c){if(a[c]){return a[c].apply(this,Array.prototype.slice.call(arguments,1));}else{if(typeof c==="object"||!c){return a.init.apply(this,arguments);}else{b.error("Method "+c+" does not exist!");}}};b.fn.raty.defaults={cancel:false,cancelHint:"Cancel this rating!",cancelOff:"cancel-off.png",cancelOn:"cancel-on.png",cancelPlace:"left",click:undefined,half:false,halfShow:true,hints:["bad","poor","regular","good","gorgeous"],iconRange:undefined,mouseout:undefined,mouseover:undefined,noRatedMsg:"Not rated yet!",number:5,numberMax:20,path:"",precision:false,readOnly:false,round:{down:0.25,full:0.6,up:0.76},score:undefined,scoreName:"score",single:false,size:16,space:true,starHalf:"star-half.png",starOff:"star-off.png",starOn:"star-on.png",target:undefined,targetFormat:"{score}",targetKeep:false,targetText:"",targetType:"hint",width:undefined};})(jQuery);
... ...
src/main/resources/static/pages/forms/mould/shiftuehiclemanthlp.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/shiftuehiclemanthspy.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/scheduleDaily.html
... ... @@ -401,7 +401,6 @@
401 401 $('#forms .scheduleDaily_1').html(scheduleDaily_1);
402 402 });
403 403 $.get('/realSchedule/queryUserInfo',{line:line,date:date,state:2,type:"query"},function(result){
404   - console.log(result);
405 404 var scheduleDaily_2 = template('scheduleDaily_2',{list:result});
406 405 $('#forms .scheduleDaily_2').html(scheduleDaily_2);
407 406 });
... ... @@ -541,9 +540,18 @@
541 540 <td>{{obj.fast}}</td>
542 541 <td>{{obj.slow}}</td>
543 542 <td>{{obj.fcsj}}</td>
544   - <td>{{obj.fcsjActual}}</td>
  543 + <td>{{obj.fcsjActual}}
  544 + {{if obj.bcType== "in"}}
  545 + (进)
  546 + {{/if}}
  547 + {{if obj.bcType== "out"}}
  548 + (出)
  549 + {{/if}}
  550 + </td>
545 551 <td>{{obj.fast0}}</td>
546   - <td>{{obj.slow0}}</td>
  552 + <td>{{obj.slow0}}
  553 +
  554 + </td>
547 555 <td colspan="2">{{obj.remarks}}</td>
548 556 {{if (i+1)%3 == 0}}
549 557 <td>&nbsp;</td>
... ...
src/main/resources/static/pages/forms/statement/statisticsDaily.html
... ... @@ -247,8 +247,15 @@
247 247 if(date==null || date =="" ||date2==null || date2 ==""){
248 248 layer.msg('请选择时间段.');
249 249 }else{
250   -
251   - $get('/realSchedule/statisticsDailyTj',{gsdm:gsdm,fgsdm:fgsdm,line:line,date:date,date2:date2,xlName:xlName,type:"query"},function(result){
  250 + var params = {};
  251 + params['gsdm'] = gsdm;
  252 + params['fgsdm'] =fgsdm ;
  253 + params['line'] = line;
  254 + params['date'] = date;
  255 + params['date2'] = date2;
  256 + params['xlName'] = xlName;
  257 + params['type'] = "query";
  258 + $get('/realSchedule/statisticsDailyTj',params,function(result){
252 259 // 把数据填充到模版中
253 260 var tbodyHtml = template('statisticsDaily',{list:result});
254 261 // 把渲染好的模版html文本追加到表格中
... ... @@ -264,7 +271,15 @@
264 271 });
265 272  
266 273 $("#export").on("click",function(){
267   - $get('/realSchedule/statisticsDailyTj',{gsdm:gsdm,fgsdm:fgsdm,line:line,date:date,date2:date2,xlName:xlName,type:"export"},function(result){
  274 + var params = {};
  275 + params['gsdm'] = gsdm;
  276 + params['fgsdm'] =fgsdm ;
  277 + params['line'] = line;
  278 + params['date'] = date;
  279 + params['date2'] = date2;
  280 + params['xlName'] = xlName;
  281 + params['type'] = "export";
  282 + $get('/realSchedule/statisticsDailyTj',params,function(result){
268 283 window.open("/downloadFile/download?fileName=统计日报"+moment(date).format("YYYYMMDD"));
269 284 });
270 285 });
... ...
src/main/resources/static/pages/forms/statement/waybill.html
... ... @@ -307,7 +307,7 @@
307 307 param[index][i] = $(this).text().split("\\")[0];
308 308 });
309 309 });
310   - $post('/realSchedule/exportWaybillMore',{date:date,line:line,strs:JSON.stringify(param)},function(result){
  310 + $get('/realSchedule/exportWaybillMore',{date:date,line:line,strs:JSON.stringify(param)},function(result){
311 311 window.open("/downloadFile/downloadList?fileName="+result.fileName);
312 312 });
313 313 });
... ... @@ -435,7 +435,7 @@
435 435 <td>{{obj.fast}}</td>
436 436 <td>{{obj.slow}}</td>
437 437 <td>
438   - {{if obj.fcsjActual !=null || obj.zdsjActual!=null}}
  438 + {{if obj.zdsjActual!=null}}
439 439 {{obj.jhlc}}
440 440 {{/if}}
441 441 </td>
... ...
src/main/resources/static/pages/mforms/shifdays/shifday.html
... ... @@ -27,7 +27,7 @@
27 27 <div class="col-md-12">
28 28 <div class="portlet light porttlet-fit bordered">
29 29 <div class="portlet-title">
30   - <form class="form-inline" action="" method="post">
  30 + <form class="form-inline" action="" method="get">
31 31 <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv_shif">
32 32 <span class="item-label" style="width: 80px;">公司: </span>
33 33 <select class="form-control" name="company" id="gsdmShif" style="width: 140px;"></select>
... ... @@ -104,8 +104,12 @@ $(function(){
104 104 format : 'YYYY-MM-DD',
105 105 locale : 'zh-cn'
106 106 });
107   -
  107 + var fage=false;
108 108 var obj = [];
  109 + var xlList;
  110 +
  111 + $.get('/report/lineList',function(result){
  112 + xlList=result;
109 113 $.get('/user/companyData', function(result){
110 114 obj = result;
111 115 var options = '';
... ... @@ -124,7 +128,7 @@ $(function(){
124 128 $('#gsdmShif').html(options);
125 129 updateCompany();
126 130 });
127   -
  131 + })
128 132 $("#gsdmShif").on("change",updateCompany);
129 133 function updateCompany(){
130 134 var company = $('#gsdmShif').val();
... ... @@ -138,28 +142,60 @@ $(function(){
138 142 }
139 143 }
140 144 $('#fgsdmShif').html(options);
  145 + initXl();
141 146 }
142 147  
143 148  
144   - $.get('/basic/lineCode2Name',function(result){
145   - var data=[];
  149 +// $.get('/basic/lineCode2Name',function(result){
  150 +// var data=[];
  151 +
  152 +// for(var code in result){
  153 +// data.push({id: code, text: result[code]});
  154 +// }
  155 +// initPinYinSelect2('#line',data,'');
146 156  
147   - for(var code in result){
148   - data.push({id: code, text: result[code]});
  157 +// })
  158 +
  159 + $("#fgsdmShif").on("change",initXl);
  160 + function initXl(){
  161 + var data=[];
  162 + if(fage){
  163 + $("#line").select2("destroy").html('');
  164 + }
  165 + var fgs=$('#fgsdmShif').val();
  166 + var gs=$('#gsdmShif').val();
  167 + for(var i=0;i<xlList.length;i++){
  168 + if(gs!=""){
  169 + if(fgs!=""){
  170 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  171 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  172 + }
  173 + }else{
  174 + if(xlList[i]["gsbm"]==gs){
  175 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  176 + }
  177 + }
  178 + }
149 179 }
150 180 initPinYinSelect2('#line',data,'');
151   -
152   - })
  181 + fage=true;
  182 + }
  183 +
153 184  
154 185 $("#query").on("click",function(){
155 186 var line = $("#line").val();
156 187 var date = $("#date").val();
157 188 var gsdmShif = $("#gsdmShif").val();
158 189 var fgsdmShif = $("#fgsdmShif").val();
  190 + var params = {};
  191 + params.fgsdmShif =fgsdmShif;
  192 + params.date =date;
  193 + params.gsdmShif =gsdmShif;
  194 + params.line =line;
159 195 if(date=="" || date ==null){
160 196 layer.msg('请选择日期.');
161 197 }else{
162   - $post('/mcy_forms/shifday',{gsdmShif:gsdmShif,fgsdmShif:fgsdmShif, line:line,date:date},function(result){
  198 + $get('/mcy_forms/shifday',params,function(result){
163 199 $.each(result, function(i, obj) {
164 200 obj.requestType = reqCodeMap[obj.requestType];
165 201 });
... ... @@ -175,8 +211,14 @@ $(function(){
175 211 var line = $("#line").val();
176 212 var date = $("#date").val();
177 213 var gsdmShif = $("#gsdmShif").val();
178   - var fgsdmShif = $("#fgsdmShif").val();
179   - $post('/mcy_export/shifdayExport',{gsdmShif:gsdmShif,fgsdmShif:fgsdmShif,line:line,date:date,type:'export'},function(result){
  214 + var fgsdmShif = $("#fgsdmShif").val();
  215 + var params = {};
  216 + params.fgsdmShif =fgsdmShif;
  217 + params.date =date;
  218 + params.gsdmShif =gsdmShif;
  219 + params.line =line;
  220 + params.type='export';
  221 + $get('/mcy_export/shifdayExport',params,function(result){
180 222 window.open("/downloadFile/download?fileName=班次车辆人员日报表"+moment(date).format("YYYYMMDD"));
181 223 });
182 224 });
... ...
src/main/resources/static/pages/mforms/shiftuehiclemanths/shiftuehiclemanth.html
... ... @@ -53,6 +53,11 @@
53 53 </div>
54 54 <div style="display: inline-block;margin-left: 15px">
55 55 <span class="item-label" style="width: 150px;">统计: </span>
  56 + <select class="form-control" style="width: 136px;" id='empnames'>
  57 + <option value="驾驶员">驾驶员</option>
  58 + <option value="售票员">售票员</option>
  59 + <option value="路牌">路牌</option>
  60 + </select>
56 61 </div>
57 62 <div class="form-group">
58 63 <input class="btn btn-default" type="button" id="query" value="筛选"/>
... ... @@ -66,7 +71,7 @@
66 71 <thead>
67 72 <tr>
68 73 <th>序号</th>
69   - <th>驾驶员</th>
  74 + <th id='empname'>驾驶员</th>
70 75 <th>运营里程</th>
71 76 <th>空驶里程</th>
72 77 <th>抽减里程</th>
... ... @@ -97,8 +102,11 @@
97 102 format : 'YYYY-MM-DD',
98 103 locale : 'zh-cn'
99 104 });
100   -
  105 + var fage=false;
101 106 var obj = [];
  107 + var xlList;
  108 + $.get('/report/lineList',function(result){
  109 + xlList=result;
102 110 $.get('/user/companyData', function(result){
103 111 obj = result;
104 112 var options = '';
... ... @@ -117,7 +125,7 @@
117 125 $('#gsdmManth').html(options);
118 126 updateCompany();
119 127 });
120   -
  128 + })
121 129 $("#gsdmManth").on("change",updateCompany);
122 130 function updateCompany(){
123 131 var company = $('#gsdmManth').val();
... ... @@ -131,64 +139,43 @@
131 139 }
132 140 }
133 141 $('#fgsdmManth').html(options);
  142 + initXl();
134 143 }
135   -
136   -
137   - $.get('/basic/lineCode2Name',function(result){
  144 + $("#fgsdmManth").on("change",initXl);
  145 + function initXl(){
138 146 var data=[];
139   -
140   - for(var code in result){
141   - data.push({id: code, text: result[code]});
  147 + if(fage){
  148 + $("#line").select2("destroy").html('');
  149 + }
  150 + var fgs=$('#fgsdmManth').val();
  151 + var gs=$('#gsdmManth').val();
  152 + for(var i=0;i<xlList.length;i++){
  153 + if(gs!=""){
  154 + if(fgs!=""){
  155 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  156 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  157 + }
  158 + }else{
  159 + if(xlList[i]["gsbm"]==gs){
  160 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  161 + }
  162 + }
  163 + }
142 164 }
143 165 initPinYinSelect2('#line',data,'');
144   -
145   - })
146   - $('#lpName').select2({
147   - ajax: {
148   - url: '/realSchedule/findLpName',
149   - type: 'post',
150   - dataType: 'json',
151   - delay: 150,
152   - data: function(params){
153   - return{lpName: params.term};
154   - },
155   - processResults: function (data) {
156   - return {
157   - results: data
158   - };
159   - },
160   - cache: true
161   - },
162   - templateResult: function(repo){
163   - if (repo.loading) return repo.text;
164   - var h = '<span>'+repo.text+'</span>';
165   - return h;
166   - },
167   - escapeMarkup: function (markup) { return markup; },
168   - minimumInputLength: 1,
169   - templateSelection: function(repo){
170   - return repo.text;
171   - },
172   - language: {
173   - noResults: function(){
174   - return '<span style="color:red;font-size: 12px;">没有搜索到路牌!</span>';
175   - },
176   - inputTooShort : function(e) {
177   - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入路牌搜索路牌</span>';
178   - },
179   - searching : function() {
180   - return '<span style="color:gray;font-size: 12px;"> 正在搜索路牌...</span>';
181   - }
182   - }
183   - });
  166 + fage=true;
  167 + }
184 168 $("#query").on("click",function(){
185   - var line = $("#line").val();
186   - var startDate = $("#startDate").val();
187   - var endDate = $("#endDate").val();
188   - var lpName = $("#lpName").val();
189   - var gsdmManth= $("#gsdmManth").val();
190   - var fgsdmManth= $("#fgsdmManth").val();
191   - $post("/mcy_forms/shiftuehiclemanth",{gsdmManth:gsdmManth,fgsdmManth:fgsdmManth, line:line,startDate:startDate,endDate:endDate ,lpName:lpName},function(result){
  169 + $("#empname").html($("#empnames").val())
  170 + var params={};
  171 + params.empnames=$("#empnames").val();
  172 + params.line = $("#line").val();
  173 + params.startDate = $("#startDate").val();
  174 + params.endDate = $("#endDate").val();
  175 + params.lpName = $("#lpName").val();
  176 + params.gsdmManth= $("#gsdmManth").val();
  177 + params.fgsdmManth= $("#fgsdmManth").val();
  178 + $get("/mcy_forms/shiftuehiclemanth",params,function(result){
192 179 $("#sDate").text(startDate);
193 180 $("#eDate").text(endDate);
194 181 var temp = {};
... ... @@ -209,18 +196,28 @@
209 196 });
210 197  
211 198 $("#export").on("click",function(){
212   - var line = $("#line").val();
213   - var startDate = $("#startDate").val();
214   - var endDate = $("#endDate").val();
215   - var lpName = $("#lpName").val();
216   - var gsdmManth= $("#gsdmManth").val();
217   - var fgsdmManth= $("#fgsdmManth").val();
218   - $post('/mcy_export/shiftuehiclemanthExport',{gsdmManth:gsdmManth,fgsdmManth:fgsdmManth,line:line,startDate:startDate,endDate:endDate,type:'export'},function(result){
219   - window.open("/downloadFile/download?fileName=班次车辆人员月报表"+moment(startDate).format("YYYYMMDD"));
  199 + var params={};
  200 + params.empnames=$("#empnames").val();
  201 + params.line = $("#line").val();
  202 + params.startDate = $("#startDate").val();
  203 + params.endDate = $("#endDate").val();
  204 + params.lpName = $("#lpName").val();
  205 + params.gsdmManth= $("#gsdmManth").val();
  206 + params.fgsdmManth= $("#fgsdmManth").val();
  207 + params.type='export';
  208 + $get('/mcy_export/shiftuehiclemanthExport',params,function(result){
  209 + window.open("/downloadFile/download?fileName=班次车辆人员月报表"+moment($("#startDate").val()).format("YYYYMMDD"));
220 210 });
221 211 });
222 212  
223   - });
  213 + });
  214 +
  215 +// $("#empnames").change(function(){
  216 +// $("#empname").html($("#empnames").val())
  217 +// // $("#query").click();
  218 +
  219 +// });
  220 +
224 221 </script>
225 222 <script type="text/html" id="list_shiftuehiclemanth">
226 223 {{each list as obj i}}
... ...
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/lightbox.min.js
1   -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
  1 +/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2 2 !function(i){var t;window.UIkit&&(t=i(UIkit)),"function"==typeof define&&define.amd&&define("uikit-lightbox",["uikit"],function(){return t||i(UIkit)})}(function(i){"use strict";function t(t){if(e)return e.lightbox=t,e;e=i.$(['<div class="uk-modal">','<div class="uk-modal-dialog uk-modal-dialog-lightbox uk-slidenav-position" style="margin-left:auto;margin-right:auto;width:200px;height:200px;top:'+Math.abs(window.innerHeight/2-200)+'px;">','<a href="#" class="uk-modal-close uk-close uk-close-alt"></a>','<div class="uk-lightbox-content"></div>','<div class="uk-modal-spinner uk-hidden"></div>',"</div>","</div>"].join("")).appendTo("body"),e.dialog=e.find(".uk-modal-dialog:first"),e.content=e.find(".uk-lightbox-content:first"),e.loader=e.find(".uk-modal-spinner:first"),e.closer=e.find(".uk-close.uk-close-alt"),e.modal=i.modal(e,{modal:!1}),e.on("swipeRight swipeLeft",function(i){e.lightbox["swipeLeft"==i.type?"next":"previous"]()}).on("click","[data-lightbox-previous], [data-lightbox-next]",function(t){t.preventDefault(),e.lightbox[i.$(this).is("[data-lightbox-next]")?"next":"previous"]()}),e.on("hide.uk.modal",function(){e.content.html("")});var o={w:window.innerWidth,h:window.innerHeight};return i.$win.on("load resize orientationchange",i.Utils.debounce(function(){o.w!==window.innerWidth&&e.is(":visible")&&!i.Utils.isFullscreen()&&e.lightbox.fitSize(),o={w:window.innerWidth,h:window.innerHeight}},100)),e.lightbox=t,e}var e,o={};return i.component("lightbox",{defaults:{allowfullscreen:!0,duration:400,group:!1,keyboard:!0},index:0,items:!1,boot:function(){i.$html.on("click","[data-uk-lightbox]",function(t){t.preventDefault();var e=i.$(this);e.data("lightbox")||i.lightbox(e,i.Utils.options(e.attr("data-uk-lightbox"))),e.data("lightbox").show(e)}),i.$doc.on("keyup",function(i){if(e&&e.is(":visible")&&e.lightbox.options.keyboard)switch(i.preventDefault(),i.keyCode){case 37:e.lightbox.previous();break;case 39:e.lightbox.next()}})},init:function(){var t=[];if(this.index=0,this.siblings=[],this.element&&this.element.length){var e=this.options.group?i.$(['[data-uk-lightbox*="'+this.options.group+'"]',"[data-uk-lightbox*='"+this.options.group+"']"].join(",")):this.element;e.each(function(){var e=i.$(this);t.push({source:e.attr("href"),title:e.attr("data-title")||e.attr("title"),type:e.attr("data-lightbox-type")||"auto",link:e})}),this.index=e.index(this.element),this.siblings=t}else this.options.group&&this.options.group.length&&(this.siblings=this.options.group);this.trigger("lightbox-init",[this])},show:function(e){this.modal=t(this),this.modal.dialog.stop(),this.modal.content.stop();var o,n,s=this,h=i.$.Deferred();e=e||0,"object"==typeof e&&this.siblings.forEach(function(i,t){e[0]===i.link[0]&&(e=t)}),0>e?e=this.siblings.length-e:this.siblings[e]||(e=0),n=this.siblings[e],o={lightbox:s,source:n.source,type:n.type,index:e,promise:h,title:n.title,item:n,meta:{content:"",width:null,height:null}},this.index=e,this.modal.content.empty(),this.modal.is(":visible")||(this.modal.content.css({width:"",height:""}).empty(),this.modal.modal.show()),this.modal.loader.removeClass("uk-hidden"),h.promise().done(function(){s.data=o,s.fitSize(o)}).fail(function(){o.meta.content='<div class="uk-position-cover uk-flex uk-flex-middle uk-flex-center"><strong>Loading resource failed!</strong></div>',o.meta.width=400,o.meta.height=300,s.data=o,s.fitSize(o)}),s.trigger("showitem.uk.lightbox",[o])},fitSize:function(){var t=this,e=this.data,o=this.modal.dialog.outerWidth()-this.modal.dialog.width(),n=parseInt(this.modal.dialog.css("margin-top"),10),s=parseInt(this.modal.dialog.css("margin-bottom"),10),h=n+s,a=e.meta.content,l=t.options.duration;this.siblings.length>1&&(a=[a,'<a href="#" class="uk-slidenav uk-slidenav-contrast uk-slidenav-previous uk-hidden-touch" data-lightbox-previous></a>','<a href="#" class="uk-slidenav uk-slidenav-contrast uk-slidenav-next uk-hidden-touch" data-lightbox-next></a>'].join(""));var d,r,u=i.$("<div>&nbsp;</div>").css({opacity:0,position:"absolute",top:0,left:0,width:"100%","max-width":t.modal.dialog.css("max-width"),padding:t.modal.dialog.css("padding"),margin:t.modal.dialog.css("margin")}),c=e.meta.width,g=e.meta.height;u.appendTo("body").width(),d=u.width(),r=window.innerHeight-h,u.remove(),this.modal.dialog.find(".uk-modal-caption").remove(),e.title&&(this.modal.dialog.append('<div class="uk-modal-caption">'+e.title+"</div>"),r-=this.modal.dialog.find(".uk-modal-caption").outerHeight()),d<e.meta.width&&(g=Math.floor(g*(d/c)),c=d),g>r&&(g=Math.floor(r),c=Math.ceil(e.meta.width*(r/e.meta.height))),this.modal.content.css("opacity",0).width(c).html(a),"iframe"==e.type&&this.modal.content.find("iframe:first").height(g);var m=g+o,p=Math.floor(window.innerHeight/2-m/2)-h;0>p&&(p=0),this.modal.closer.addClass("uk-hidden"),t.modal.data("mwidth")==c&&t.modal.data("mheight")==g&&(l=0),this.modal.dialog.animate({width:c+o,height:g+o,top:p},l,"swing",function(){t.modal.loader.addClass("uk-hidden"),t.modal.content.css({width:""}).animate({opacity:1},function(){t.modal.closer.removeClass("uk-hidden")}),t.modal.data({mwidth:c,mheight:g})})},next:function(){this.show(this.siblings[this.index+1]?this.index+1:0)},previous:function(){this.show(this.siblings[this.index-1]?this.index-1:this.siblings.length-1)}}),i.plugin("lightbox","image",{init:function(i){i.on("showitem.uk.lightbox",function(i,t){if("image"==t.type||t.source&&t.source.match(/\.(jpg|jpeg|png|gif|svg)$/i)){var e=function(i,e,o){t.meta={content:'<img class="uk-responsive-width" width="'+e+'" height="'+o+'" src ="'+i+'">',width:e,height:o},t.type="image",t.promise.resolve()};if(o[t.source])e(t.source,o[t.source].width,o[t.source].height);else{var n=new Image;n.onerror=function(){t.promise.reject("Loading image failed")},n.onload=function(){o[t.source]={width:n.width,height:n.height},e(t.source,o[t.source].width,o[t.source].height)},n.src=t.source}}})}}),i.plugin("lightbox","youtube",{init:function(i){var t=/(\/\/.*?youtube\.[a-z]+)\/watch\?v=([^&]+)&?(.*)/,n=/youtu\.be\/(.*)/;i.on("showitem.uk.lightbox",function(i,s){var h,a,l=function(i,t,o){s.meta={content:'<iframe src="//www.youtube.com/embed/'+i+'" width="'+t+'" height="'+o+'" style="max-width:100%;"'+(e.lightbox.options.allowfullscreen?" allowfullscreen":"")+"></iframe>",width:t,height:o},s.type="iframe",s.promise.resolve()};if((a=s.source.match(t))&&(h=a[2]),(a=s.source.match(n))&&(h=a[1]),h){if(o[h])l(h,o[h].width,o[h].height);else{var d=new Image,r=!1;d.onerror=function(){o[h]={width:640,height:320},l(h,o[h].width,o[h].height)},d.onload=function(){120==d.width&&90==d.height?r?(o[h]={width:640,height:320},l(h,o[h].width,o[h].height)):(r=!0,d.src="//img.youtube.com/vi/"+h+"/0.jpg"):(o[h]={width:d.width,height:d.height},l(h,d.width,d.height))},d.src="//img.youtube.com/vi/"+h+"/maxresdefault.jpg"}i.stopImmediatePropagation()}})}}),i.plugin("lightbox","vimeo",{init:function(t){var n,s=/(\/\/.*?)vimeo\.[a-z]+\/([0-9]+).*?/;t.on("showitem.uk.lightbox",function(t,h){var a,l=function(i,t,o){h.meta={content:'<iframe src="//player.vimeo.com/video/'+i+'" width="'+t+'" height="'+o+'" style="width:100%;box-sizing:border-box;"'+(e.lightbox.options.allowfullscreen?" allowfullscreen":"")+"></iframe>",width:t,height:o},h.type="iframe",h.promise.resolve()};(n=h.source.match(s))&&(a=n[2],o[a]?l(a,o[a].width,o[a].height):i.$.ajax({type:"GET",url:"//vimeo.com/api/oembed.json?url="+encodeURI(h.source),jsonp:"callback",dataType:"jsonp",success:function(i){o[a]={width:i.width,height:i.height},l(a,o[a].width,o[a].height)}}),t.stopImmediatePropagation())})}}),i.plugin("lightbox","video",{init:function(t){t.on("showitem.uk.lightbox",function(t,e){var n=function(i,t,o){e.meta={content:'<video class="uk-responsive-width" src="'+i+'" width="'+t+'" height="'+o+'" controls></video>',width:t,height:o},e.type="video",e.promise.resolve()};if("video"==e.type||e.source.match(/\.(mp4|webm|ogv)$/i))if(o[e.source])n(e.source,o[e.source].width,o[e.source].height);else var s=i.$('<video style="position:fixed;visibility:hidden;top:-10000px;"></video>').attr("src",e.source).appendTo("body"),h=setInterval(function(){s[0].videoWidth&&(clearInterval(h),o[e.source]={width:s[0].videoWidth,height:s[0].videoHeight},n(e.source,o[e.source].width,o[e.source].height),s.remove())},20)})}}),UIkit.plugin("lightbox","iframe",{init:function(i){i.on("showitem.uk.lightbox",function(t,o){var n=function(i,t,n){o.meta={content:'<iframe class="uk-responsive-width" src="'+i+'" width="'+t+'" height="'+n+'"'+(e.lightbox.options.allowfullscreen?" allowfullscreen":"")+"></iframe>",width:t,height:n},o.type="iframe",o.promise.resolve()};("iframe"===o.type||o.source.match(/\.(html|php)$/))&&n(o.source,i.options.width||800,i.options.height||600)})}}),i.lightbox.create=function(t,e){if(t){var o,n=[];return t.forEach(function(t){n.push(i.$.extend({source:"",title:"",type:"auto",link:!1},"string"==typeof t?{source:t}:t))}),o=i.lightbox(i.$.extend({},e,{group:n}))}},i.lightbox});
3 3 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/assets/plugins/uikit-2.27.1/components/slidenav.gradient.min.css
1   -/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
  1 +/*! UIkit 2.27.1 | http://www.getuikit.com | (c) 2014 YOOtheme | MIT License */
2 2 .uk-slidenav{display:inline-block;box-sizing:border-box;width:60px;height:60px;line-height:60px;color:rgba(50,50,50,.4);font-size:60px;text-align:center}.uk-slidenav:focus,.uk-slidenav:hover{outline:0;text-decoration:none;color:rgba(50,50,50,.7);cursor:pointer}.uk-slidenav:active{color:rgba(50,50,50,.9)}.uk-slidenav-previous:before{content:"\f104";font-family:FontAwesome}.uk-slidenav-next:before{content:"\f105";font-family:FontAwesome}.uk-slidenav-position{position:relative}.uk-slidenav-position .uk-slidenav{display:none;position:absolute;top:50%;z-index:1;margin-top:-30px}.uk-slidenav-position:hover .uk-slidenav{display:block}.uk-slidenav-position .uk-slidenav-previous{left:20px}.uk-slidenav-position .uk-slidenav-next{right:20px}.uk-slidenav-contrast{color:rgba(255,255,255,.5)}.uk-slidenav-contrast:focus,.uk-slidenav-contrast:hover{color:rgba(255,255,255,.7)}.uk-slidenav-contrast:active{color:rgba(255,255,255,.9)}
3 3 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/css/north.css
... ... @@ -291,7 +291,7 @@
291 291 }
292 292  
293 293 .uk-form-icon i{
294   - z-index: 999 !important;
  294 + z-index: 98 !important;
295 295 }
296 296  
297 297 .uk-form-icon .uk-autocomplete input{
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/lj_zrw.html
... ... @@ -424,7 +424,7 @@
424 424 name: '加油'
425 425 },
426 426 'add_sub_task_in': {
427   - name: '场'
  427 + name: '场'
428 428 },
429 429 'add_sub_task_out': {
430 430 name: '出场'
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/safeDriving.html
1   -<div class="uk-modal ct_move_modal" id="safe_dring_list-modal" style="z-index: 99;">
2   - <div class="uk-modal-dialog" style="width: 1100px;">
3   - <a href="" class="uk-modal-close uk-close"></a>
4   - <div class="uk-modal-header">
5   - <h2>安全驾驶图像信息(当日)</h2></div>
6   -
7   - <div class="uk-panel uk-panel-box uk-panel-box-primary">
8   - <form class="uk-form search-form">
9   - <fieldset data-uk-margin>
10   - <legend>
11   - 数据检索
12   - </legend>
13   - <span class="horizontal-field">车辆</span>
14   - <div class="uk-autocomplete uk-form autocomplete-cars" >
15   - <input type="text" name="clzbh" placeholder="车辆自编号">
16   - </div>
17   - <span class="horizontal-field">异常类型</span>
18   - <select name="yczltype">
19   - <option value="">全部</option>
20   - <option value="A1">手部离开方向盘</option>
21   - <option value="A2">摄像头异常</option>
22   - <option value="A3">未戴安全带</option>
23   - <option value="A4">未戴袖章</option>
24   - <option value="A5">眨眼/疲劳驾驶</option>
25   - <option value="A6">打哈欠/打瞌睡</option>
26   - <option value="A7">行驶中与人交谈</option>
27   - </select>
28   - <button class="uk-button">检索</button>
29   - </fieldset>
30   - </form>
31   - </div>
32   - <div style="height: 495px;margin:5px 0 -18px;">
33   - <table class="ct-fixed-table uk-table uk-table-hover">
34   - <thead>
35   - <tr>
36   - <th style="width: 12%;">线路</th>
37   - <th style="width: 13%;">车辆自编号</th>
38   - <th style="width: 13%;">设备</th>
39   - <th style="width: 13%;">异常类型</th>
40   - <th style="width: 17%;">时间</th>
41   - <th style="width: 11%;">检查属性</th>
42   - <th style="width: 11%;">图像</th>
43   - <th>视频</th>
44   - </tr>
45   - </thead>
46   - <tbody data-uk-observe>
47   - </tbody>
48   - </table>
49   - </div>
50   -
51   - <div class="uk-modal-footer uk-text-right pagination-wrap">
52   - </div>
53   - </div>
54   -
55   - <script id="all-safe_dring-table-temp" type="text/html">
56   - {{each array as sd i}}
57   - <tr>
58   - <td style="width: 14%;">{{sd.xlmc}}</td>
59   - <td style="width: 14%;">{{sd.clzbh}}</td>
60   - <td style="width: 13%;">{{sd.sbbh}}</td>
61   - <td style="width: 13%;">{{sd.yczlText}}</td>
62   - <td style="width: 10%;">{{sd.timeStr}}</td>
63   - <td style="width: 10%;">
64   - {{if sd.yczltype=='A1'}}
65   - {{if sd.jctype==0}}
66   - 双脱手
67   - {{else if sd.jctype==1}}
68   - 单脱手
69   - {{/if}}
70   - {{/if}}
71   - </td>
72   - <td style="width: 10%;">
73   - <a class="image_link" href="{{sd.url}}.jpg" data-uk-lightbox="{group:'jpg_group1'}" title="{{sd.title}}">JPG</a>
74   - </td>
75   - <td>
76   - <a class="image_link" href="{{sd.url}}.gif" data-uk-lightbox="{group:'gif_group2'}" title="{{sd.title}}">查看视频</a>
77   - </td>
78   - </tr>
79   - {{/each}}
80   - </script>
81   -
82   - <script>
83   - (function() {
84   - var modal = '#safe_dring_list-modal';
85   - var form = $('.search-form', modal);
86   - var page = 0;
87   - var pageSize = 12;
88   -
89   - $(modal).on('init', function(e, data) {
90   - e.stopPropagation();
91   -
92   - query();
93   - });
94   -
95   - //sumit event
96   - form.on('submit', function(e) {
97   - e.preventDefault();
98   - resetPagination = true;
99   - page=0;
100   - query();
101   - });
102   -
103   - var query = function() {
104   - scanFlag = false;
105   - var data = form.serializeJSON();
106   - data.page = page;
107   - data.size = pageSize;
108   -
109   - gb_common.$get('/gps/safeDriv', data, function (rs) {
110   - //数据转换
111   - var code2Name=gb_data_basic.lineCode2NameAll(), url,stm, p;
112   - $.each(rs.list, function(){
113   - if(this.xlbm)
114   - this.xlmc=code2Name[this.xlbm];
115   - else
116   - this.xlmc='';
117   - stm = moment(this.ts);
118   - this.timeStr = stm.format('YYYY-MM-DD HH:mm:ss');
119   - this.yczlText= gb_safe_driv.safeCode[this.yczltype];
120   - //拼接图片地址
121   - p = (this.sbbh+'_'+this.yczltype+'_'+stm.format('YYYYMMDDHHmmss'));
122   - url = stm.format('YYYYMMDD')+'/'+p+'/'+p;
123   - this.url = gb_safe_driv.urlPath + url;
124   - //title
125   - this.title = this.clzbh+' '+stm.format('HH时mm分ss秒')+' '+this.yczlText;
126   - });
127   -
128   - var bodyHtml = template('all-safe_dring-table-temp', {
129   - array: rs.list
130   - });
131   - $('table tbody', modal).html(bodyHtml);
132   - if (resetPagination)
133   - pagination(rs.totalPages + 1, rs.page);
134   -
135   - //扫描图片是否存在
136   - scanFlag = true;
137   - scanImgIsExist();
138   - });
139   - };
140   -
141   - var scanFlag;
142   - var scanImgIsExist = function () {
143   - var array = $('table tbody a.image_link', modal);
144   - var i = 0;
145   - //匿名函数递归
146   - (function () {
147   - //计数
148   - if(i >= array.length || !scanFlag){
149   - console.log('扫描图片结束');
150   - return;
151   - }
152   - var f = arguments.callee;
153   - var $a = $(array[i]);
154   - i ++;
155   - var img = new Image();
156   - img.onerror = function(){
157   - $a.removeAttr('href').removeAttr('data-uk-lightbox').text('无').css('color', '#b8b8b8');
158   - f();
159   - };
160   - img.onload = function(){
161   - f();
162   - };
163   - img.src=$a.attr('href');
164   - })();
165   - };
166   -
167   - var resetPagination = true;
168   - var pagination = function(pages, currentPage) {
169   - var wrap = $('.pagination-wrap', modal).empty()
170   - ,e = $('<ul class="uk-pagination"></ul>').appendTo(wrap);
171   -
172   - var pagination = UIkit.pagination(e, {
173   - pages: pages,
174   - currentPage: currentPage
175   - });
176   -
177   - e.on('select.uk.pagination', function(e, pageIndex){
178   - page = pageIndex;
179   - query();
180   - });
181   -
182   - resetPagination = false;
183   - };
184   - })();
185   - </script>
186   -</div>
  1 +<div class="uk-modal ct_move_modal" id="safe_dring_list-modal" style="z-index: 99;">
  2 + <div class="uk-modal-dialog" style="width: 1100px;">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>安全驾驶图像信息(当日)</h2></div>
  6 +
  7 + <div class="uk-panel uk-panel-box uk-panel-box-primary">
  8 + <form class="uk-form search-form">
  9 + <fieldset data-uk-margin>
  10 + <legend>
  11 + 数据检索
  12 + </legend>
  13 + <span class="horizontal-field">车辆</span>
  14 + <div class="uk-autocomplete uk-form autocomplete-cars" >
  15 + <input type="text" name="clzbh" placeholder="车辆自编号">
  16 + </div>
  17 + <span class="horizontal-field">异常类型</span>
  18 + <select name="yczltype">
  19 + <option value="">全部</option>
  20 + <option value="A1">手部离开方向盘</option>
  21 + <option value="A2">摄像头异常</option>
  22 + <option value="A3">未戴安全带</option>
  23 + <option value="A4">未戴袖章</option>
  24 + <option value="A5">眨眼/疲劳驾驶</option>
  25 + <option value="A6">打哈欠/打瞌睡</option>
  26 + <option value="A7">行驶中与人交谈</option>
  27 + </select>
  28 + <button class="uk-button">检索</button>
  29 + </fieldset>
  30 + </form>
  31 + </div>
  32 + <div style="height: 495px;margin:5px 0 -18px;">
  33 + <table class="ct-fixed-table uk-table uk-table-hover">
  34 + <thead>
  35 + <tr>
  36 + <th style="width: 12%;">线路</th>
  37 + <th style="width: 13%;">车辆自编号</th>
  38 + <th style="width: 13%;">设备</th>
  39 + <th style="width: 13%;">异常类型</th>
  40 + <th style="width: 17%;">时间</th>
  41 + <th style="width: 11%;">检查属性</th>
  42 + <th style="width: 11%;">图像</th>
  43 + <th>视频</th>
  44 + </tr>
  45 + </thead>
  46 + <tbody data-uk-observe>
  47 + </tbody>
  48 + </table>
  49 + </div>
  50 +
  51 + <div class="uk-modal-footer uk-text-right pagination-wrap">
  52 + </div>
  53 + </div>
  54 +
  55 + <script id="all-safe_dring-table-temp" type="text/html">
  56 + {{each array as sd i}}
  57 + <tr>
  58 + <td style="width: 14%;">{{sd.xlmc}}</td>
  59 + <td style="width: 14%;">{{sd.clzbh}}</td>
  60 + <td style="width: 13%;">{{sd.sbbh}}</td>
  61 + <td style="width: 13%;">{{sd.yczlText}}</td>
  62 + <td style="width: 10%;">{{sd.timeStr}}</td>
  63 + <td style="width: 10%;">
  64 + {{if sd.yczltype=='A1'}}
  65 + {{if sd.jctype==0}}
  66 + 双脱手
  67 + {{else if sd.jctype==1}}
  68 + 单脱手
  69 + {{/if}}
  70 + {{/if}}
  71 + </td>
  72 + <td style="width: 10%;">
  73 + <a class="image_link" href="{{sd.url}}.jpg" data-uk-lightbox="{group:'jpg_group1'}" title="{{sd.title}}">JPG</a>
  74 + </td>
  75 + <td>
  76 + <a class="image_link" href="{{sd.url}}.gif" data-uk-lightbox="{group:'gif_group2'}" title="{{sd.title}}">查看视频</a>
  77 + </td>
  78 + </tr>
  79 + {{/each}}
  80 + </script>
  81 +
  82 + <script>
  83 + (function() {
  84 + var modal = '#safe_dring_list-modal';
  85 + var form = $('.search-form', modal);
  86 + var page = 0;
  87 + var pageSize = 12;
  88 +
  89 + $(modal).on('init', function(e, data) {
  90 + e.stopPropagation();
  91 +
  92 + query();
  93 + });
  94 +
  95 + //sumit event
  96 + form.on('submit', function(e) {
  97 + e.preventDefault();
  98 + resetPagination = true;
  99 + page=0;
  100 + query();
  101 + });
  102 +
  103 + var query = function() {
  104 + scanFlag = false;
  105 + var data = form.serializeJSON();
  106 + data.page = page;
  107 + data.size = pageSize;
  108 +
  109 + gb_common.$get('/gps/safeDriv', data, function (rs) {
  110 + //数据转换
  111 + var code2Name=gb_data_basic.lineCode2NameAll(), url,stm, p;
  112 + $.each(rs.list, function(){
  113 + if(this.xlbm)
  114 + this.xlmc=code2Name[this.xlbm];
  115 + else
  116 + this.xlmc='';
  117 + stm = moment(this.ts);
  118 + this.timeStr = stm.format('YYYY-MM-DD HH:mm:ss');
  119 + this.yczlText= gb_safe_driv.safeCode[this.yczltype];
  120 + //拼接图片地址
  121 + p = (this.sbbh+'_'+this.yczltype+'_'+stm.format('YYYYMMDDHHmmss'));
  122 + url = stm.format('YYYYMMDD')+'/'+p+'/'+p;
  123 + this.url = gb_safe_driv.urlPath + url;
  124 + //title
  125 + this.title = this.clzbh+' '+stm.format('HH时mm分ss秒')+' '+this.yczlText;
  126 + });
  127 +
  128 + var bodyHtml = template('all-safe_dring-table-temp', {
  129 + array: rs.list
  130 + });
  131 + $('table tbody', modal).html(bodyHtml);
  132 + if (resetPagination)
  133 + pagination(rs.totalPages + 1, rs.page);
  134 +
  135 + //扫描图片是否存在
  136 + scanFlag = true;
  137 + scanImgIsExist();
  138 + });
  139 + };
  140 +
  141 + var scanFlag;
  142 + var scanImgIsExist = function () {
  143 + var array = $('table tbody a.image_link', modal);
  144 + var i = 0;
  145 + //匿名函数递归
  146 + (function () {
  147 + //计数
  148 + if(i >= array.length || !scanFlag){
  149 + console.log('扫描图片结束');
  150 + return;
  151 + }
  152 + var f = arguments.callee;
  153 + var $a = $(array[i]);
  154 + i ++;
  155 + var img = new Image();
  156 + img.onerror = function(){
  157 + $a.removeAttr('href').removeAttr('data-uk-lightbox').text('无').css('color', '#b8b8b8');
  158 + f();
  159 + };
  160 + img.onload = function(){
  161 + f();
  162 + };
  163 + img.src=$a.attr('href');
  164 + })();
  165 + };
  166 +
  167 + var resetPagination = true;
  168 + var pagination = function(pages, currentPage) {
  169 + var wrap = $('.pagination-wrap', modal).empty()
  170 + ,e = $('<ul class="uk-pagination"></ul>').appendTo(wrap);
  171 +
  172 + var pagination = UIkit.pagination(e, {
  173 + pages: pages,
  174 + currentPage: currentPage
  175 + });
  176 +
  177 + e.on('select.uk.pagination', function(e, pageIndex){
  178 + page = pageIndex;
  179 + query();
  180 + });
  181 +
  182 + resetPagination = false;
  183 + };
  184 + })();
  185 + </script>
  186 +</div>
... ...
src/main/resources/static/real_control_v2/js/line_schedule/context_menu.js
... ... @@ -227,7 +227,7 @@ var gb_schedule_context_menu = (function () {
227 227 name: '(子任务)加油'
228 228 },
229 229 'add_sub_task_in': {
230   - name: '(子任务)场'
  230 + name: '(子任务)场'
231 231 },
232 232 'add_sub_task_out': {
233 233 name: '(子任务)出场'
... ...
src/main/resources/static/real_control_v2/main.html
... ... @@ -5,27 +5,27 @@
5 5 <meta charset="UTF-8">
6 6 <title>线路调度 v2.0</title>
7 7 <!-- uikit core style-->
8   - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/css/uikit.gradient.min.css"/>
9   - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css"/>
10   - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css"/>
  8 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/css/uikit.gradient.min.css" merge="uikit"/>
  9 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.gradient.min.css" merge="uikit"/>
  10 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.gradient.min.css" merge="uikit"/>
11 11 <link rel="stylesheet"
12   - href="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css"/>
13   - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.gradient.min.css"/>
14   - <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/slidenav.gradient.min.css"/>
  12 + href="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.gradient.min.css" merge="uikit"/>
  13 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.gradient.min.css" merge="uikit"/>
  14 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/uikit-2.27.1/components/slidenav.gradient.min.css" merge="uikit"/>
15 15  
16 16 <!-- main style -->
17   - <link rel="stylesheet" href="/real_control_v2/css/main.css"/>
  17 + <link rel="stylesheet" href="/real_control_v2/css/main.css" merge="custom_style"/>
18 18 <!-- north style -->
19   - <link rel="stylesheet" href="/real_control_v2/css/north.css"/>
  19 + <link rel="stylesheet" href="/real_control_v2/css/north.css" merge="custom_style"/>
20 20 <!-- home style -->
21   - <link rel="stylesheet" href="/real_control_v2/css/home.css"/>
  21 + <link rel="stylesheet" href="/real_control_v2/css/home.css" merge="custom_style"/>
22 22 <!-- line style -->
23   - <link rel="stylesheet" href="/real_control_v2/css/line_schedule.css"/>
24   - <link rel="stylesheet" href="/real_control_v2/css/sch_autocomp_result.css"/>
  23 + <link rel="stylesheet" href="/real_control_v2/css/line_schedule.css" merge="custom_style"/>
  24 + <link rel="stylesheet" href="/real_control_v2/css/sch_autocomp_result.css" merge="custom_style"/>
25 25 <!-- custom table -->
26   - <link rel="stylesheet" href="/real_control_v2/css/ct_table.css"/>
  26 + <link rel="stylesheet" href="/real_control_v2/css/ct_table.css" merge="custom_style"/>
27 27 <!-- jquery contextMenu style -->
28   - <link rel="stylesheet" href="/real_control_v2/assets/css/jquery.contextMenu.min.css"/>
  28 + <link rel="stylesheet" href="/real_control_v2/assets/css/jquery.contextMenu.min.css" />
29 29 <!-- formvalidation style -->
30 30 <link rel="stylesheet" href="/real_control_v2/assets/plugins/formvalidation/formValidation.min.css"/>
31 31 <!-- js tree -->
... ... @@ -34,7 +34,7 @@
34 34 <link rel="stylesheet" href="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.css"/>
35 35 <link rel="stylesheet" href="/real_control_v2/css/pace.css"/>
36 36  
37   - <link rel="stylesheet" href="/real_control_v2/css/modal_extend.css"/>
  37 + <link rel="stylesheet" href="/real_control_v2/css/modal_extend.css" merge="custom_style"/>
38 38 </head>
39 39  
40 40 <body>
... ... @@ -116,14 +116,14 @@
116 116 <!-- main js -->
117 117 <script src="/real_control_v2/js/main.js"></script>
118 118 <!-- uikit core -->
119   -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/uikit.min.js"></script>
120   -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.min.js"></script>
121   -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/pagination.min.js"></script>
122   -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.min.js"></script>
123   -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.min.js"></script>
124   -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.min.js"></script>
125   -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/timepicker.min.js"></script>
126   -<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/lightbox.min.js"></script>
  119 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/uikit.min.js" merge="uikit_js"></script>
  120 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/notify.min.js" merge="uikit_js"></script>
  121 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/pagination.min.js" merge="uikit_js"></script>
  122 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/tooltip.min.js" merge="uikit_js"></script>
  123 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/autocomplete.min.js" merge="uikit_js"></script>
  124 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/accordion.min.js" merge="uikit_js"></script>
  125 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/timepicker.min.js" merge="uikit_js"></script>
  126 +<script src="/real_control_v2/assets/plugins/uikit-2.27.1/components/lightbox.min.js" merge="uikit_js"></script>
127 127  
128 128 <!-- jquery contextMenu -->
129 129 <script src="/real_control_v2/assets/js/jquery.contextMenu.min.js"></script>
... ... @@ -140,52 +140,52 @@
140 140 <script src="/real_control_v2/assets/plugins/qtip/jquery.qtip.min.js"></script>
141 141  
142 142 <!-- 数据 -->
143   -<script src="/real_control_v2/js/data/data_basic.js"></script>
144   -<script src="/real_control_v2/js/data/data_gps.js"></script>
145   -<script src="/real_control_v2/js/data/gps_abnormal.js"></script>
  143 +<script src="/real_control_v2/js/data/data_basic.js" merge="custom_js"></script>
  144 +<script src="/real_control_v2/js/data/data_gps.js" merge="custom_js"></script>
  145 +<script src="/real_control_v2/js/data/gps_abnormal.js" merge="custom_js"></script>
146 146 <!-- 线路模拟图 -->
147   -<script src="/real_control_v2/js/utils/svg_chart.js"></script>
148   -<script src="/real_control_v2/js/utils/svg_data_convert.js"></script>
149   -<script src="/real_control_v2/js/utils/svg_chart_tooltip.js"></script>
150   -<script src="/real_control_v2/js/utils/svg_chart_map.js"></script>
  147 +<script src="/real_control_v2/js/utils/svg_chart.js" merge="custom_js"></script>
  148 +<script src="/real_control_v2/js/utils/svg_data_convert.js" merge="custom_js"></script>
  149 +<script src="/real_control_v2/js/utils/svg_chart_tooltip.js" merge="custom_js"></script>
  150 +<script src="/real_control_v2/js/utils/svg_chart_map.js" merge="custom_js"></script>
151 151  
152 152 <!-- custom table js -->
153   -<script src="/real_control_v2/js/utils/ct_table.js"></script>
  153 +<script src="/real_control_v2/js/utils/ct_table.js" merge="custom_js"></script>
154 154 <!-- north js -->
155   -<script src="/real_control_v2/js/north/toolbar.js"></script>
156   -<script src="/real_control_v2/js/north/tabs.js"></script>
  155 +<script src="/real_control_v2/js/north/toolbar.js" merge="custom_js"></script>
  156 +<script src="/real_control_v2/js/north/tabs.js" merge="custom_js"></script>
157 157 <!-- home js -->
158   -<script src="/real_control_v2/js/home/layout.js"></script>
159   -<script src="/real_control_v2/js/home/line_panel.js"></script>
160   -<script src="/real_control_v2/js/home/context_menu.js"></script>
  158 +<script src="/real_control_v2/js/home/layout.js" merge="custom_js"></script>
  159 +<script src="/real_control_v2/js/home/line_panel.js" merge="custom_js"></script>
  160 +<script src="/real_control_v2/js/home/context_menu.js" merge="custom_js"></script>
161 161 <!-- line schedule js -->
162   -<script src="/real_control_v2/js/line_schedule/legend.js"></script>
163   -<script src="/real_control_v2/js/line_schedule/layout.js"></script>
164   -<script src="/real_control_v2/js/line_schedule/sch_table.js"></script>
165   -<script src="/real_control_v2/js/line_schedule/context_menu.js"></script>
166   -<script src="/real_control_v2/js/line_schedule/dbclick.js"></script>
167   -<script src="/real_control_v2/js/line_schedule/search.js"></script>
  162 +<script src="/real_control_v2/js/line_schedule/legend.js" merge="custom_js"></script>
  163 +<script src="/real_control_v2/js/line_schedule/layout.js" merge="custom_js"></script>
  164 +<script src="/real_control_v2/js/line_schedule/sch_table.js" merge="custom_js"></script>
  165 +<script src="/real_control_v2/js/line_schedule/context_menu.js" merge="custom_js"></script>
  166 +<script src="/real_control_v2/js/line_schedule/dbclick.js" merge="custom_js"></script>
  167 +<script src="/real_control_v2/js/line_schedule/search.js" merge="custom_js"></script>
168 168  
169 169 <!-- 字典相关 -->
170   -<script src="/assets/js/dictionary.js"></script>
  170 +<script src="/assets/js/dictionary.js" merge="custom_js"></script>
171 171 <!-- websocket -->
172 172 <script src="/assets/js/sockjs.min.js"></script>
173   -<script src="/real_control_v2/js/websocket/sch_websocket.js"></script>
  173 +<script src="/real_control_v2/js/websocket/sch_websocket.js" merge="custom_js"></script>
174 174 <!-- tts -->
175   -<script src="/real_control_v2/js/utils/tts.js"></script>
  175 +<script src="/real_control_v2/js/utils/tts.js" merge="custom_js"></script>
176 176  
177 177 <!-- echart -->
178 178 <script src="/real_control_v2/assets/echarts-3/echarts.js"></script>
179 179 <!-- Geolib -->
180 180 <script src="/real_control_v2/geolib/geolib.js"></script>
181 181  
182   -<script src="/real_control_v2/js/signal_state/signal_state.js"></script>
183   -<script src="/real_control_v2/js/utils/dispatch_pattern.js"></script>
  182 +<script src="/real_control_v2/js/signal_state/signal_state.js" merge="custom_js"></script>
  183 +<script src="/real_control_v2/js/utils/dispatch_pattern.js" merge="custom_js"></script>
184 184  
185 185 <!-- 处理表单片段嵌入问题 -->
186   -<script src="/real_control_v2/js/forms/form_embed.js"></script>
  186 +<script src="/real_control_v2/js/forms/form_embed.js" merge="custom_js"></script>
187 187 <!-- 模态框扩展 -->
188   -<script src="/real_control_v2/js/modal_extend.js"></script>
  188 +<script src="/real_control_v2/js/modal_extend.js" merge="custom_js"></script>
189 189  
190 190 <!-- #### 安全驾驶 start ### -->
191 191 <div class="safe_driv_pop_wrap" ></div>
... ... @@ -199,7 +199,7 @@
199 199 </div>
200 200 </script>
201 201  
202   -<script src="/real_control_v2/js/safe_driv/safeDriv.js" ></script>
  202 +<script src="/real_control_v2/js/safe_driv/safeDriv.js" merge="custom_js"></script>
203 203 <!-- #### 安全驾驶 end ### -->
204 204 </body>
205 205  
... ...
src/main/resources/static/real_control_v2/mapmonitor/fragments/playback_v2/main.html
1   -<div class="uk-modal" id="map-playback2-modal">
2   - <div class="uk-modal-dialog uk-modal-dialog-blank">
3   - <button class="uk-modal-close uk-close" type="button"></button>
4   - <div class="uk-grid uk-flex-middle" data-uk-grid-margin>
5   - <div class="uk-width-medium-1-10 uk-height-viewport z-depth-viewport">
6   - <h5 style="color: #868484;text-indent: 5px;">
7   - 线路配车
8   - </h5>
9   - <div class="uk-accordion cc_info_accordion" data-uk-accordion data-uk-observe>
10   - </div>
11   -
12   - </div>
13   - <div class="uk-width-medium-2-10 uk-height-viewport z-depth-viewport " style="position: relative;">
14   - <div class="play_back_form_shade uk-animation-scale"></div>
15   - <form class="uk-form uk-form-horizontal playBackForm">
16   - <div class="uk-grid">
17   - <div class="uk-width-1-1">
18   - <div class="uk-form-row">
19   - <label class="uk-form-label">车辆编码</label>
20   - <div class="uk-form-controls">
21   - <div class="uk-autocomplete uk-form autocomplete-nbbm">
22   - <div class="uk-autocomplete uk-form autocomplete-nbbm">
23   - <input name="nbbm" required/>
24   - </div>
25   - </div>
26   - </div>
27   - </div>
28   - </div>
29   - </div>
30   - <div class="uk-grid">
31   - <div class="uk-width-2-3">
32   - <div class="uk-form-row">
33   - <label class="uk-form-label">开始时间</label>
34   - <div class="uk-form-controls">
35   - <input name="sDate" type="date" required/>
36   - </div>
37   - </div>
38   - </div>
39   - <div class="uk-width-1-3" style="padding-left: 15px;">
40   - <div class="uk-form-row">
41   - <div class="uk-form-controls" style="margin-left: 0;">
42   - <input name="sTime" type="time" required/>
43   - </div>
44   - </div>
45   - </div>
46   - </div>
47   - <div class="uk-grid">
48   - <div class="uk-width-2-3">
49   - <div class="uk-form-row">
50   - <label class="uk-form-label">结束时间</label>
51   - <div class="uk-form-controls">
52   - <input name="eDate" type="date" required/>
53   - </div>
54   - </div>
55   - </div>
56   - <div class="uk-width-1-3" style="padding-left: 15px;">
57   - <div class="uk-form-row">
58   - <div class="uk-form-controls" style="margin-left: 0;">
59   - <input name="eTime" type="time" required/>
60   - </div>
61   - </div>
62   - </div>
63   - </div>
64   - <div class="uk-grid">
65   - <button class="uk-button uk-button-large uk-button-primary playBackButton" type="submit"><i
66   - class="uk-icon-search"> </i> 搜索轨迹
67   - </button>
68   - </div>
69   - </form>
70   - <!-- 异常警报 -->
71   - <div class="abnormal_table_wrap">
72   - <div class="abnormal_table_panel"
73   - style="height: calc(100% - 15px);margin-top: 15px;overflow: auto;">
74   - <div class="ct_table abnormal_table" style="height: calc(100% - 30px);">
75   - <div class="ct_table_head">
76   - <dl>
77   - <dt>异常状态</dt>
78   - <dt>开始时间</dt>
79   - <dt>结束时间</dt>
80   - <dt>图像</dt>
81   - </dl>
82   - </div>
83   - <div class="ct_table_body">
84   - </div>
85   - </div>
86   - </div>
87   - </div>
88   - <!-- 路段 和 到离站信息 -->
89   - <div class="uk-margin uk-grid other_info_table_wrap" data-uk-grid-margin>
90   - <div class="uk-width-medium-1-1" style="padding-left: 0;">
91   -
92   - <ul class="uk-tab" data-uk-tab="{connect:'#real_gps_info_tab_content'}"
93   - style="padding-left: 12px;">
94   - <li class="uk-active"><a>行车轨迹</a></li>
95   - <li><a>到离站信息</a></li>
96   - </ul>
97   -
98   - <ul id="real_gps_info_tab_content" class="uk-switcher uk-margin"
99   - style="height: calc(100% - 44px);margin-top: 7px;">
100   - <li class="uk-active" style="height: 100%;">
101   - <div class="road_table_wrap" style="height: 100%;overflow: auto;">
102   - <div class="ct_table gps-road-info"
103   - style="height: calc(100% - 30px);">
104   - <div class="ct_table_head">
105   - <dl>
106   - <dt>时间</dt>
107   - <dt>速度</dt>
108   - <dt>所在路段</dt>
109   - </dl>
110   - </div>
111   - <div class="ct_table_body">
112   - </div>
113   - </div>
114   - </div>
115   - </li>
116   - <!-- 到离站数据 -->
117   - <li style="height: 100%;">
118   - <div class="inout_table_wrap" style="height: 100%;overflow: auto;">
119   - <div class="ct_table" style="height: calc(100% - 30px);">
120   - <div class="ct_table_head">
121   - <dl>
122   - <dt>站点</dt>
123   - <dt>到站时间</dt>
124   - <dt>离站时间</dt>
125   - <dt>上客</dt>
126   - <dt>下客</dt>
127   - </dl>
128   - </div>
129   - <div class="ct_table_body">
130   - </div>
131   - </div>
132   - </div>
133   - </li>
134   - </ul>
135   -
136   - </div>
137   - </div>
138   - </div>
139   - <div class="uk-width-medium-7-10 uk-height-viewport map-wrap" style="padding-left: 0;position: relative;">
140   - <div class="map-wrap-tools uk-animation-slide-top">
141   - <div class="btns">
142   - <span class="ct_btn play_btn"></span>
143   - <span class="ct_btn clock"></span>
144   - <div class="multi-items">
145   - <form class="uk-form speed_form">
146   - <label>
147   - <input type="radio" name="playSpeed" value="1"> x1
148   - </label>
149   - <label>
150   - <input type="radio" name="playSpeed" value="5"> x5
151   - </label>
152   - <label>
153   - <input type="radio" name="playSpeed" value="10"> x10
154   - </label>
155   - <label>
156   - <input type="radio" name="playSpeed" value="20"> x20
157   - </label>
158   - </form>
159   - </div>
160   - <div class="multi-items">
161   - <form class="uk-form buffer_area_form">
162   - <label>
163   - <input type="checkbox" name="drawPoint"> 站点
164   - </label>
165   - <label>
166   - <input type="checkbox" name="drawBuffArea"> 缓冲区
167   - </label>
168   - <label>
169   - <input type="checkbox" name="stationName"> 站点名称
170   - </label>
171   - <label>
172   - <a>停车场 <i class="uk-icon-angle-down"></i></a>
173   - </label>
174   - </form>
175   - </div>
176   - <span class="ct_btn text-panel">
177   - <span>共约 <span class="sum_mileage"></span> 公里,<span class="count_point"></span> 个GPS点</span><br>
178   - <a class="export-excel"><i class="uk-icon-file-excel-o"></i> 导出轨迹</a>
179   - </span>
180   - </div>
181   - <div class="ct-progress-bar" >
182   - <div class="scale"></div>
183   - </div>
184   - </div>
185   - <div class="map-container"></div>
186   - </div>
187   - </div>
188   - </div>
189   -
190   - <script id="cc_info_accordion_cont_temp" type="text/html">
191   - {{each ccInfo as cc i}}
192   - <h3 class="uk-accordion-title">{{cc.name}}</h3>
193   - <div class="uk-accordion-content">
194   - <ul class="uk-list">
195   - {{each cc.cars as c j}}
196   - <li>{{c}}</li>
197   - {{/each}}
198   - </ul>
199   - </div>
200   - {{/each}}
201   - </script>
202   -
203   - <script id="gps_road_info_cont_temp" type="text/html">
204   - {{each array as gps i}}
205   - <dl data-code="{{gps.road.road_CODE}}">
206   - <dd>{{gps.timeStr}}</dd>
207   - <dd>{{gps.speed}}</dd>
208   - <dd>{{gps.road.road_NAME}}</dd>
209   - </dl>
210   - {{/each}}
211   - </script>
212   -
213   - <script id="multi_inout_info_cont_temp" type="text/html">
214   - {{each list as item i}}
215   - <dl data-id="{{item.id}}">
216   - <dd>{{item.stopName}}</dd>
217   - <dd>{{item.in_time_str}}</dd>
218   - <dd>{{item.out_time_str}}</dd>
219   - <dd></dd>
220   - <dd></dd>
221   - </dl>
222   - {{/each}}
223   - </script>
224   -
225   - <script id="inout_info_cont_temp" type="text/html">
226   - <dl data-id="{{id}}">
227   - <dd>{{stopName}}</dd>
228   - <dd>{{in_time_str}}</dd>
229   - <dd></dd>
230   - <dd></dd>
231   - <dd></dd>
232   - </dl>
233   - </script>
234   -
235   -
236   - <script id="abnormal_table_cont_temp" type="text/html">
237   - {{each array as item i}}
238   - <dl>
239   - <dd>
240   - {{if item.abnormalType == 'speed'}}
241   - 超速({{item.speed}})
242   - {{else if item.abnormalType == 'outbound'}}
243   - 越界
244   - {{/if}}
245   - </dd>
246   - <dd>{{item.st_str}}</dd>
247   - <dd>{{item.et_str}}</dd>
248   - <dd></dd>
249   - </dl>
250   - {{/each}}
251   - </script>
252   - <script>
253   - (function () {
254   - var modal = '#map-playback2-modal', gpsArray;
255   -
256   - $(modal).on('init', function (e, data) {
257   - //初始化地图
258   - mapObj.initMap();
259   -
260   - //固定表头
261   - gb_ct_table.fixedHead($('.road_table_wrap', modal));
262   - gb_ct_table.fixedHead($('.inout_table_wrap', modal));
263   - gb_ct_table.fixedHead($('.abnormal_table_panel', modal));
264   - //线路配车
265   - ccInfo.init();
266   -
267   - //表单初始值
268   - searchForm.init(data);
269   -
270   - //车辆 autocomplete
271   - $.get('/basic/cars', function (rs) {
272   - gb_common.carAutocomplete($('.autocomplete-nbbm', modal), rs);
273   - });
274   - });
275   -
276   - /**
277   - * 线路配车相关
278   - */
279   - var ccInfo = (function () {
280   -
281   - function init() {
282   - $.get('/basic/ccInfo', function (rs) {
283   - var ccInfo = [], lines = gb_data_basic.codeToLine;
284   - for (var code in lines) {
285   - ccInfo.push({
286   - name: lines[code].name,
287   - cars: carSort(rs[code])
288   - });
289   - }
290   -
291   - var htmlStr = template('cc_info_accordion_cont_temp', {ccInfo: ccInfo});
292   - $('.cc_info_accordion', modal).html(htmlStr)
293   - .find('.uk-list li').on('click', itemClick);
294   - });
295   - }
296   -
297   - function carSort(list) {
298   - if (!list)
299   - return [];
300   - return list.sort();
301   - }
302   -
303   - function itemClick() {
304   - $(this).parent().find('li.active').removeClass('active');
305   - $(this).addClass('active');
306   - searchForm.setNbbm($(this).text());
307   - }
308   -
309   - return {
310   - init: init
311   - };
312   - })();
313   -
314   - /**
315   - * 搜索表单相关
316   - */
317   - var searchForm = (function () {
318   -
319   - var f = $('.playBackForm', modal);
320   -
321   - var init = function (data) {
322   - //设置初始值
323   - /*if (data.nbbm)
324   - $('[name=nbbm]', f).val(data.nbbm);
325   - var st = moment().subtract(2, 'hour');
326   - if (data.st)
327   - st = moment(data.st, 'YYYY-MM-DD HH:mm');
328   - $('[name=sDate]', f).val(st.format('YYYY-MM-DD'));
329   - $('[name=sTime]', f).val(st.format('HH:mm'));
330   - var et = moment();
331   - if (data.et)
332   - et = moment(data.et, 'YYYY-MM-DD HH:mm');
333   - $('[name=eDate]', f).val(et.format('YYYY-MM-DD'));
334   - $('[name=eTime]', f).val(et.format('HH:mm'));*/
335   -
336   -
337   - $('[name=nbbm]', f).val('W0A-018');
338   - $('[name=sDate]', f).val('2017-04-06');
339   - $('[name=sTime]', f).val('04:49');
340   -
341   - $('[name=eDate]', f).val('2017-04-06');
342   - $('[name=eTime]', f).val('09:49');
343   - //搜索事件
344   - $('button[type=submit]', f).on('click', search);
345   - };
346   -
347   - var setNbbm = function (v) {
348   - $('[name=nbbm]', f).val(v);
349   - };
350   -
351   - var ONE_DAY = 60 * 60 * 24;
352   - var MIN_SPACE = 60;
353   - var search = function (e) {
354   - e.stopPropagation();
355   - var data = f.serializeJSON();
356   -
357   - //校验时间间隔
358   - var fs = 'YYYY-MM-DDHH:mm';
359   - var st = parseInt(moment(data.sDate + data.sTime, fs).format('X'));
360   - var et = parseInt(moment(data.eDate + data.eTime, fs).format('X'));
361   -
362   - if (et < st)
363   - notify_err('结束时间不能小于开始时间');
364   - else if ((et - st) > ONE_DAY)
365   - notify_err('最大间隔24小时!');
366   - else if ((et - st) < MIN_SPACE)
367   - notify_err('最小间隔1分钟!');
368   - else {
369   - show_wait_modal('搜索数据...');
370   - $.ajax({
371   - url: '/gps/history_v2/' + data.nbbm,
372   - traditional: true,
373   - data: {st: st, et: et},
374   - success: function (rs) {
375   - hide_wait_modal();
376   - //重置相关对象
377   - playObj.reset();
378   - mapObj.reset();
379   -
380   - gpsArray = rs.list;
381   - if (!gpsArray || gpsArray.length == 0) {
382   - notify_err('没有搜索到轨迹数据!');
383   - return;
384   - }
385   -
386   - //排序
387   - gpsArray.sort(function (a, b) {
388   - return parseInt((a.ts - b.ts) + '' + (a.stop_no - b.stop_no));
389   - });
390   - //行车轨迹
391   - trailTableObj.showInitData(gpsArray);
392   - //到离站信息
393   - inOutStationTableObj.showInitData(gpsArray);
394   - //异常信息
395   - abnormalTableObj.showInitData(rs['outboundList'], rs['speedList']);
396   - //show 工具条
397   - mapTools.show(rs);
398   - //地图
399   - mapObj.initData(rs);
400   - //play 对象
401   - playObj.init(rs);
402   - //设置导出文件名称
403   - mapTools.setExcelName();
404   - }
405   - });
406   - }
407   - return false;
408   - };
409   -
410   - //遮罩
411   - var shade = $('.play_back_form_shade', modal);
412   - var showShade = function () {
413   - shade.show();
414   - };
415   - var hideShade = function () {
416   - shade.hide();
417   - };
418   -
419   - return {
420   - init: init,
421   - setNbbm: setNbbm,
422   - showShade: showShade,
423   - hideShade: hideShade
424   - };
425   - })();
426   -
427   - /**
428   - * 行车轨迹表格
429   - */
430   - var trailTableObj = (function () {
431   -
432   - var $tbody = $('.gps-road-info .ct_table_body', modal);
433   - var $wrap = $('.road_table_wrap', modal);
434   - var initFlag, gpsArray;
435   - var showInitData = function (list) {
436   - var array = [];
437   - for (var i = 0, gps; gps = list[i++];) {
438   - //格式化时间
439   - gps.timeStr = moment(gps.timestamp).format('HH:mm.ss');
440   - try {
441   - if (i > 0 && array[array.length - 1].road.road_CODE == gps.road.road_CODE)
442   - array.pop();
443   - }
444   - catch (e) {
445   - }
446   -
447   - if (gps.road)
448   - array.push(gps);
449   - }
450   -
451   - var htmlStr = template('gps_road_info_cont_temp', {array: array});
452   - $tbody.html(htmlStr);
453   - initFlag = true;
454   - gpsArray = list;
455   - };
456   -
457   - var prev;
458   - var add = function (gps, i) {
459   - if(i == 0)
460   - return;
461   - if(initFlag){
462   - //清理初始化的数据
463   - $tbody.html('');
464   - initFlag = false;
465   - }
466   - if (!gps.road)
467   - return;
468   - var code = gps.road.road_CODE;
469   - if (!prev || code != prev.road.road_CODE) {
470   - $tbody.append(template('gps_road_info_cont_temp', {array: [gps]}));
471   - }
472   - else{
473   - var dds = $tbody.find('dl[data-code=' + code + ']').last().find('dd');
474   - $(dds[0]).text(gps.timeStr);
475   - $(dds[1]).text(gps.speed);
476   - }
477   - prev = gps;
478   - $wrap.scrollTop($wrap[0].scrollHeight);
479   - };
480   -
481   - return {
482   - showInitData: showInitData,
483   - add : add,
484   - gpsArray : function () {
485   - return gpsArray;
486   - }
487   - };
488   - })();
489   -
490   - /**
491   - * 到离站信息表格
492   - * @type {{}}
493   - */
494   - var inOutStationTableObj = (function () {
495   -
496   - var data, f, prev, initFlag;
497   - var $wrap = $('.inout_table_wrap', modal);
498   - var $tbody = $('.ct_table_body', $wrap);
499   - var showInitData = function (list) {
500   - clear();
501   - data = [];
502   - $.each(list, function (i, gps) {
503   - prev = data[data.length - 1];
504   - if (gps['inout_stop'] == -1)
505   - return true;
506   - if (gps['inout_stop'] == 0 && gps['inout_stop_info']) {
507   - //连续进站信号,取第一个
508   - if(prev && prev['out_ts'] == null
509   - && prev['stopName'] == gps['inout_stop_info'].stopName){
510   - return true;
511   - }
512   - data.push(createIn(gps));
513   - }
514   - else if (gps['inout_stop'] == 1) {
515   - f = matchOut(prev, gps);
516   - if(f)
517   - data.push(f);
518   - }
519   - });
520   - //格式化时间
521   - $.each(data, function (i) {
522   - if (this.in_ts)
523   - this.in_time_str = moment(this.in_ts).format('HH:mm.ss');
524   - if (this.out_ts)
525   - this.out_time_str = moment(this.out_ts).format('HH:mm.ss');
526   - //id
527   - this.id = 'in_out_' + i;
528   - });
529   - var htmlStr = template('multi_inout_info_cont_temp', {list: data});
530   - $tbody.html(htmlStr);
531   - initFlag = true;
532   - len = data.length;
533   - };
534   -
535   - var inoutIndex=0, len, item;
536   - var add = function (gps, i) {
537   - if(i == 0)
538   - return;
539   - if(initFlag)
540   - clear();
541   -
542   - var $dl;
543   - for(j = inoutIndex; j < len; j++){
544   - item = data[j];
545   - $dl = $tbody.find('dl[data-id='+item.id+']');
546   - if(gps.ts >= item.in_ts && $dl.length==0){
547   - $tbody.append(template('inout_info_cont_temp', item));
548   - inoutIndex = j;
549   - }
550   -
551   - if(gps.ts >= item.out_ts){
552   - var dds = $dl.find('dd');
553   - if($dl.length==0)
554   - $tbody.append(template('inout_info_cont_temp', item));
555   - else
556   - $(dds[2]).text(item.out_time_str);
557   - inoutIndex = j;
558   - }
559   - else {
560   - break;
561   - }
562   - }
563   - $wrap.scrollTop($wrap[0].scrollHeight);
564   - };
565   -
566   - var clear = function () {
567   - $tbody.html('');
568   - initFlag = false;
569   - };
570   -
571   - var createIn = function (gps) {
572   - var info = gps['inout_stop_info'];
573   - return {in_ts: info.ts, stopNo: info.stopNo, stopName: info.stopName}
574   - };
575   -
576   - var matchOut = function (prevInfo, gps) {
577   - var oi = gps['inout_stop_info'];
578   - if(prevInfo && prevInfo.stopName == oi.stopName){
579   - prevInfo['out_ts'] = oi.ts;
580   - return null;
581   - }
582   - else {
583   - return {out_ts: oi.ts,stopNo: oi.stopNo,stopName: oi.stopName}
584   - }
585   - };
586   -
587   - return {
588   - showInitData: showInitData,
589   - add: add
590   - };
591   - })();
592   -
593   - /**
594   - * 异常信息表格
595   - * @type {{showInitData}}
596   - */
597   - var abnormalTableObj = (function () {
598   -
599   - var showInitData = function () {
600   - var array = [];
601   - for(var i = 0; i < arguments.length; i ++){
602   - array = array.concat(arguments[i]);
603   - }
604   - //格式化时间
605   - $.each(array, function () {
606   - if(this.st)
607   - this.st_str = moment(this.st).format('HH:mm.ss');
608   - if(this.et)
609   - this.et_str = moment(this.et).format('HH:mm.ss');
610   - });
611   -
612   - //排序
613   - array.sort(function (a, b) {
614   - return a.st - b.st;
615   - });
616   -
617   - var htmlStr = template('abnormal_table_cont_temp', {array: array});
618   - $('.abnormal_table .ct_table_body', modal).html(htmlStr);
619   - };
620   -
621   - return {
622   - showInitData: showInitData
623   - }
624   - })();
625   -
626   - /**
627   - * 工具条相关
628   - */
629   - var mapTools = (function () {
630   -
631   - $('.map-wrap-tools .play_btn', modal).on('click', function () {
632   - if($(this).hasClass('play')){
633   - //暂停
634   - $(this).removeClass('play');
635   - playObj.pause();
636   - searchForm.hideShade();
637   - }
638   - else {
639   - //播放
640   - $(this).addClass('play');
641   - playObj.play();
642   - playObj.fixedToCenter();
643   - searchForm.showShade();
644   - }
645   - });
646   -
647   - //播放速度
648   - $('.speed_form input[name=playSpeed]', modal).on('click', function () {
649   - playObj.setConf('playSpeed', $(this).val());
650   - });
651   -
652   - //空间数据
653   - $('.buffer_area_form input[type=checkbox]', modal).on('click', function () {
654   - playObj.setConf($(this).attr('name'), $(this)[0].checked);
655   - mapObj.refreshOverlay();
656   - });
657   -
658   - //进度条
659   - var step, $scale = $('.ct-progress-bar .scale', modal);
660   - var upProgressBar = function (i) {
661   - $scale.css('width', step * (i + 1));
662   - };
663   -
664   - //导出
665   - $('.export-excel', modal).on('click', function () {
666   - var base64Str = gb_map_play_back.listToExcel(trailTableObj.gpsArray());
667   - $(this).attr('href', base64Str);
668   - });
669   -
670   - var setExcelName = function () {
671   - var f = $('.playBackForm', modal);
672   - var fileName = ($('[name=nbbm]', f).val() + '轨迹数据' + $('[name=sDate]', f).val() + $('[name=sTime]', f).val() + '至' + $('[name=eDate]', f).val() + $('[name=eTime]', f).val() + '.xls').replace(new RegExp(/-/g),'').replace(new RegExp(/:/g),'');
673   - $('.export-excel', modal).attr('download', fileName);
674   - };
675   -
676   - var gpsArray;
677   - var show = function (rs) {
678   - $('.map-wrap-tools').show();
679   - $('.map-container', modal).addClass('show_tools');
680   - //总里程
681   - $('.text-panel .sum_mileage', modal).text(rs.sumMileage);
682   -
683   - var size = rs.list.length;
684   - $('.text-panel .count_point', modal).text(size);
685   - step = $('.ct-progress-bar', modal).width() / size;
686   -
687   - //console.log('stepstep', step);
688   - };
689   -
690   - return {
691   - show: show,
692   - upProgressBar: upProgressBar,
693   - setExcelName: setExcelName
694   - }
695   - })();
696   -
697   - /**
698   - * 地图相关
699   - */
700   - var mapObj = (function () {
701   - var map;
702   - var initMap = function () {
703   - //初始化地图
704   - map = new BMap.Map($('.map-container', modal)[0]);
705   - //中心点和缩放级别
706   - map.centerAndZoom(new BMap.Point(gb_map_consts.center_point.lng, gb_map_consts.center_point.lat), 16);
707   - map.enableScrollWheelZoom();
708   - }
709   -
710   - var storage = window.localStorage;
711   - var routes;//路段
712   - var stations;//站点
713   - var parks;//停车场
714   -
715   - var initData = function (rs) {
716   - var gpsArray = rs.list;
717   - if(!gpsArray || gpsArray.length==0)
718   - return;
719   - var lineCode = gpsArray[0].lineId;
720   - //从地图模块获取站点数据
721   - stations = gb_map_spatial_data.getStationArray(lineCode);
722   - //从地图模块获取停车场数据
723   - parks = gb_map_spatial_data.carparkArray();
724   - //从localStorage 获取路段
725   - routes = JSON.parse(storage.getItem(lineCode + '_route'));
726   - routes = [routes.up_bd, routes.down_bd];
727   - };
728   -
729   -
730   - /**
731   - * 更新车辆位置
732   - */
733   - var gpsMarker;
734   - var updateCar = function (gps) {
735   - if(!gpsMarker){
736   - gpsMarker = new BMap.Marker(new BMap.Point(gps.bd_lon, gps.bd_lat));
737   - var width = gb_map_imap.calcGpsMarkerWidth(gps.nbbm);
738   - gpsMarker.setIcon(new BMap.Icon(gb_map_imap.createCarIconRotation(gps, width), new BMap.Size(width, 75)));
739   - gpsMarker.disableMassClear();//禁止marker被清除
740   - gpsMarker.setTop(true);
741   - map.addOverlay(gpsMarker);
742   - //居中
743   - map.panTo(gpsMarker.getPosition());
744   - }
745   - else{
746   - gpsMarker.setPosition(new BMap.Point(gps.bd_lon, gps.bd_lat));
747   - var width = gb_map_imap.calcGpsMarkerWidth(gps.nbbm);
748   - gpsMarker.setIcon(new BMap.Icon(gb_map_imap.createCarIconRotation(gps, width), new BMap.Size(width, 75)));
749   - }
750   -
751   - //更新路段底图
752   - if(gps.upDown!=roadUpdown){
753   - switchPolyline(gps.upDown);
754   - //清除轨迹线
755   - trailArray = [];
756   - }
757   - };
758   -
759   - /**
760   - * 绘制轨迹线
761   - */
762   - var trailArray=[], trailPolyline;
763   - var updateTrailLine = function () {
764   - trailArray.push(gpsMarker.getPosition());
765   - if(!trailPolyline){
766   - trailPolyline = new BMap.Polyline(trailArray, {strokeWeight: 3, strokeColor: '#000000'});
767   - trailPolyline.disableMassClear();//禁止trailPolyline被清除
768   - map.addOverlay(trailPolyline);
769   - }
770   - else{
771   - trailPolyline.setPath(trailArray);
772   - }
773   - };
774   -
775   - /**
776   - * 绘制路段底图(包括站点)
777   - */
778   - var roadUpdown=-1;
779   - var switchPolyline = function (upDown) {
780   - if(typeof(upDown) == "undefined")
781   - upDown = roadUpdown;
782   -
783   - map.clearOverlays();
784   - //路段
785   - drawRoadPolyline(upDown);
786   - //站点
787   - if(playObj.getConf().drawPoint)
788   - drawStationPoint(upDown);
789   - //缓冲区
790   - if(playObj.getConf().drawBuffArea)
791   - drawStationBfArea(upDown);
792   - //站点名称
793   - if(playObj.getConf().stationName)
794   - drawStationName(upDown);
795   - roadUpdown = upDown;
796   - };
797   -
798   - /**
799   - * 根据走向绘制路段
800   - */
801   - var drawRoadPolyline = function (upDown) {
802   - var colour = gb_map_config.getConfig().section.color;
803   - var plConfig = {strokeWeight: 12, strokeColor: upDown?colour.down:colour.up, strokeOpacity: .4}, pos;
804   - $.each(routes[upDown], function (i, item) {
805   - pos = [];
806   - $.each(item.split(','), function () {
807   - temps = this.split(' ');
808   - pos.push(new BMap.Point(temps[0], temps[1]));
809   - });
810   - map.addOverlay(new BMap.Polyline(pos, plConfig));
811   - });
812   - };
813   -
814   - /**
815   - * 根据走向绘制站点点位
816   - */
817   - var drawStationPoint = function (upDown) {
818   - var array = stations[upDown], psm;
819   - $.each(array, function () {
820   - //坐标转换
821   - var coord = TransGPS.wgsToBD(this.lat, this.lon);
822   - this.bd_lat = coord.lat;
823   - this.bd_lon = coord.lng;
824   - psm = new BMap.Marker(new BMap.Point(this.bd_lon, this.bd_lat));
825   - psm.setTitle(this.stationName);
826   - map.addOverlay(psm);
827   - psm.setIcon(new BMap.Icon(gb_map_imap.createStationPointIcon(), new BMap.Size(12, 12)));
828   - });
829   - };
830   -
831   - /**
832   - * 为站点绘制缓冲区
833   - */
834   - var drawStationBfArea = function (upDown) {
835   - var array = stations[upDown];
836   - $.each(array, function () {
837   - if(this.shapesType=='r')
838   - drawCircle(new BMap.Point(this.bd_lon, this.bd_lat), this.radius);
839   - else if(this.shapesType=='d')
840   - drawPolygon(this);
841   - });
842   - };
843   -
844   - /**
845   - * 绘制站点名称
846   - */
847   - var drawStationName = function (upDown) {
848   - var style = {backgroundColor: "rgba(255, 255, 255, 0.69)",color : "black", borderColor: "black", fontSize : "12px", height : "16px", lineHeight : "16px", fontFamily:"微软雅黑"}
849   - var array = stations[upDown];
850   - $.each(array, function () {
851   - var width = this.stationName.length * 12;
852   - var label = new BMap.Label(this.stationName, {
853   - position:new BMap.Point(this.bd_lon, this.bd_lat),
854   - offset: new BMap.Size(-(width / 2), -27)
855   - });
856   - label.setStyle(style);
857   - map.addOverlay(label);
858   - });
859   - };
860   - var drawCircle = function (point, radius) {
861   - var circle = new BMap.Circle(point, radius);
862   - circle.setStrokeColor('#000000');
863   - circle.setStrokeWeight(1);
864   - map.addOverlay(circle);
865   - };
866   -
867   - var drawPolygon = function () {
868   -
869   - };
870   -
871   - /**
872   - * 重置
873   - */
874   - var reset = function () {
875   - if(trailPolyline)
876   - trailPolyline.enableMassClear();
877   - if(gpsMarker)
878   - gpsMarker.enableMassClear();
879   - map.clearOverlays();
880   - roadUpdown = -1;
881   - trailArray=[];
882   - trailPolyline = null;
883   - gpsMarker = null;
884   - };
885   -
886   - /**
887   - * 居中车辆,超出边界时
888   - */
889   - var toCenterByBounds = function () {
890   - var markerIsVisible = BMapLib.GeoUtils.isPointInRect(gpsMarker.getPosition(),map.getBounds());
891   - if(!markerIsVisible)
892   - map.panTo(gpsMarker.getPosition());
893   - };
894   - return {
895   - initData: initData,
896   - updateCar: updateCar,
897   - initMap: initMap,
898   - updateTrailLine: updateTrailLine,
899   - refreshOverlay: switchPolyline,
900   - toCenterByBounds: toCenterByBounds,
901   - reset: reset
902   - }
903   - })();
904   -
905   - /**
906   - * 播放相关
907   - * @type {{}}
908   - */
909   - var playObj = (function () {
910   - var conf = {
911   - playSpeed: 1,//播放速度
912   - drawPoint: 1,//绘制站点
913   - drawBuffArea: 1 ,//缓冲区
914   - stationName: 0, //站点名称
915   - carPark: [] //停车场
916   - };
917   -
918   - var gpsArray;//gps点位集合
919   - var init = function (rs) {
920   - gpsArray = rs.list;
921   - if(!gpsArray || gpsArray.length==0)
922   - return;
923   -
924   - len = gpsArray.length;
925   - //渲染配置信息
926   - renderConfig();
927   - //播放第一个点
928   - run();
929   - };
930   -
931   - var renderConfig = function () {
932   - $('.speed_form [name=playSpeed][value='+conf.playSpeed+']', modal)[0].checked = true;
933   - $('.buffer_area_form input[type=checkbox]', modal).each(function () {
934   - var name = $(this).attr('name');
935   - $(this)[0].checked = conf[name];
936   - });
937   - };
938   -
939   - /**
940   - * 播放函数
941   - */
942   - var runTimer; //播放定时器
943   - var toCenterTimer;//居中定时器
944   - var index = 0; //gps下标
945   - var play = function () {
946   - if(!run())
947   - runTimer = setTimeout(play, 1000 / conf.playSpeed);
948   - };
949   -
950   - /**
951   - * 定时居中
952   - */
953   - var fixedToCenter = function () {
954   - toCenterTimer = setInterval(function () {
955   - mapObj.toCenterByBounds();
956   - }, 500);
957   - };
958   -
959   - var pause = function () {
960   - clearInterval(runTimer);
961   - runTimer = null;
962   - clearInterval(toCenterTimer);
963   - toCenterTimer = null;
964   - };
965   -
966   - var clock = $('.ct_btn.clock', modal), gps, len;
967   - var run = function () {
968   - if(index == len){
969   - $('.map-wrap-tools .play_btn', modal).removeClass('play');
970   - pause();
971   - notify_succ('本次轨迹回放已结束!');
972   - searchForm.hideShade();
973   - return true;
974   - }
975   - gps = gpsArray[index];
976   - //更新GPS点位
977   - mapObj.updateCar(gps);
978   - //绘制轨迹线
979   - mapObj.updateTrailLine();
980   - //时间文本
981   - clock.text(gps.timeStr);
982   - //输出行车轨迹
983   - trailTableObj.add(gps, index);
984   - //输出到离站信息
985   - inOutStationTableObj.add(gps, index);
986   - //进度条
987   - mapTools.upProgressBar(index);
988   - index ++;
989   - };
990   -
991   - /**
992   - * 重置
993   - */
994   - var reset = function () {
995   - index = 0;
996   - gpsArray = null;
997   - pause();
998   - };
999   - return {
1000   - init: init,
1001   - getConf: function () {
1002   - return conf;
1003   - },
1004   - setConf: function (k, v) {
1005   - conf[k] = v;
1006   - },
1007   - play: play,
1008   - fixedToCenter: fixedToCenter,
1009   - pause: pause,
1010   - reset: reset
1011   - }
1012   - })();
1013   - })();
1014   - </script>
  1 +<div class="uk-modal" id="map-playback2-modal">
  2 + <div class="uk-modal-dialog uk-modal-dialog-blank">
  3 + <button class="uk-modal-close uk-close" type="button"></button>
  4 + <div class="uk-grid uk-flex-middle" data-uk-grid-margin>
  5 + <div class="uk-width-medium-1-10 uk-height-viewport z-depth-viewport">
  6 + <h5 style="color: #868484;text-indent: 5px;">
  7 + 线路配车
  8 + </h5>
  9 + <div class="uk-accordion cc_info_accordion" data-uk-accordion data-uk-observe>
  10 + </div>
  11 +
  12 + </div>
  13 + <div class="uk-width-medium-2-10 uk-height-viewport z-depth-viewport " style="position: relative;">
  14 + <div class="play_back_form_shade uk-animation-scale"></div>
  15 + <form class="uk-form uk-form-horizontal playBackForm">
  16 + <div class="uk-grid">
  17 + <div class="uk-width-1-1">
  18 + <div class="uk-form-row">
  19 + <label class="uk-form-label">车辆编码</label>
  20 + <div class="uk-form-controls">
  21 + <div class="uk-autocomplete uk-form autocomplete-nbbm">
  22 + <div class="uk-autocomplete uk-form autocomplete-nbbm">
  23 + <input name="nbbm" required/>
  24 + </div>
  25 + </div>
  26 + </div>
  27 + </div>
  28 + </div>
  29 + </div>
  30 + <div class="uk-grid">
  31 + <div class="uk-width-2-3">
  32 + <div class="uk-form-row">
  33 + <label class="uk-form-label">开始时间</label>
  34 + <div class="uk-form-controls">
  35 + <input name="sDate" type="date" required/>
  36 + </div>
  37 + </div>
  38 + </div>
  39 + <div class="uk-width-1-3" style="padding-left: 15px;">
  40 + <div class="uk-form-row">
  41 + <div class="uk-form-controls" style="margin-left: 0;">
  42 + <input name="sTime" type="time" required/>
  43 + </div>
  44 + </div>
  45 + </div>
  46 + </div>
  47 + <div class="uk-grid">
  48 + <div class="uk-width-2-3">
  49 + <div class="uk-form-row">
  50 + <label class="uk-form-label">结束时间</label>
  51 + <div class="uk-form-controls">
  52 + <input name="eDate" type="date" required/>
  53 + </div>
  54 + </div>
  55 + </div>
  56 + <div class="uk-width-1-3" style="padding-left: 15px;">
  57 + <div class="uk-form-row">
  58 + <div class="uk-form-controls" style="margin-left: 0;">
  59 + <input name="eTime" type="time" required/>
  60 + </div>
  61 + </div>
  62 + </div>
  63 + </div>
  64 + <div class="uk-grid">
  65 + <button class="uk-button uk-button-large uk-button-primary playBackButton" type="submit"><i
  66 + class="uk-icon-search"> </i> 搜索轨迹
  67 + </button>
  68 + </div>
  69 + </form>
  70 + <!-- 异常警报 -->
  71 + <div class="abnormal_table_wrap">
  72 + <div class="abnormal_table_panel"
  73 + style="height: calc(100% - 15px);margin-top: 15px;overflow: auto;">
  74 + <div class="ct_table abnormal_table" style="height: calc(100% - 30px);">
  75 + <div class="ct_table_head">
  76 + <dl>
  77 + <dt>异常状态</dt>
  78 + <dt>开始时间</dt>
  79 + <dt>结束时间</dt>
  80 + <dt>图像</dt>
  81 + </dl>
  82 + </div>
  83 + <div class="ct_table_body">
  84 + </div>
  85 + </div>
  86 + </div>
  87 + </div>
  88 + <!-- 路段 和 到离站信息 -->
  89 + <div class="uk-margin uk-grid other_info_table_wrap" data-uk-grid-margin>
  90 + <div class="uk-width-medium-1-1" style="padding-left: 0;">
  91 +
  92 + <ul class="uk-tab" data-uk-tab="{connect:'#real_gps_info_tab_content'}"
  93 + style="padding-left: 12px;">
  94 + <li class="uk-active"><a>行车轨迹</a></li>
  95 + <li><a>到离站信息</a></li>
  96 + </ul>
  97 +
  98 + <ul id="real_gps_info_tab_content" class="uk-switcher uk-margin"
  99 + style="height: calc(100% - 44px);margin-top: 7px;">
  100 + <li class="uk-active" style="height: 100%;">
  101 + <div class="road_table_wrap" style="height: 100%;overflow: auto;">
  102 + <div class="ct_table gps-road-info"
  103 + style="height: calc(100% - 30px);">
  104 + <div class="ct_table_head">
  105 + <dl>
  106 + <dt>时间</dt>
  107 + <dt>速度</dt>
  108 + <dt>所在路段</dt>
  109 + </dl>
  110 + </div>
  111 + <div class="ct_table_body">
  112 + </div>
  113 + </div>
  114 + </div>
  115 + </li>
  116 + <!-- 到离站数据 -->
  117 + <li style="height: 100%;">
  118 + <div class="inout_table_wrap" style="height: 100%;overflow: auto;">
  119 + <div class="ct_table" style="height: calc(100% - 30px);">
  120 + <div class="ct_table_head">
  121 + <dl>
  122 + <dt>站点</dt>
  123 + <dt>到站时间</dt>
  124 + <dt>离站时间</dt>
  125 + <dt>上客</dt>
  126 + <dt>下客</dt>
  127 + </dl>
  128 + </div>
  129 + <div class="ct_table_body">
  130 + </div>
  131 + </div>
  132 + </div>
  133 + </li>
  134 + </ul>
  135 +
  136 + </div>
  137 + </div>
  138 + </div>
  139 + <div class="uk-width-medium-7-10 uk-height-viewport map-wrap" style="padding-left: 0;position: relative;">
  140 + <div class="map-wrap-tools uk-animation-slide-top">
  141 + <div class="btns">
  142 + <span class="ct_btn play_btn"></span>
  143 + <span class="ct_btn clock"></span>
  144 + <div class="multi-items">
  145 + <form class="uk-form speed_form">
  146 + <label>
  147 + <input type="radio" name="playSpeed" value="1"> x1
  148 + </label>
  149 + <label>
  150 + <input type="radio" name="playSpeed" value="5"> x5
  151 + </label>
  152 + <label>
  153 + <input type="radio" name="playSpeed" value="10"> x10
  154 + </label>
  155 + <label>
  156 + <input type="radio" name="playSpeed" value="20"> x20
  157 + </label>
  158 + </form>
  159 + </div>
  160 + <div class="multi-items">
  161 + <form class="uk-form buffer_area_form">
  162 + <label>
  163 + <input type="checkbox" name="drawPoint"> 站点
  164 + </label>
  165 + <label>
  166 + <input type="checkbox" name="drawBuffArea"> 缓冲区
  167 + </label>
  168 + <label>
  169 + <input type="checkbox" name="stationName"> 站点名称
  170 + </label>
  171 + <label>
  172 + <a>停车场 <i class="uk-icon-angle-down"></i></a>
  173 + </label>
  174 + </form>
  175 + </div>
  176 + <span class="ct_btn text-panel">
  177 + <span>共约 <span class="sum_mileage"></span> 公里,<span class="count_point"></span> 个GPS点</span><br>
  178 + <a class="export-excel"><i class="uk-icon-file-excel-o"></i> 导出轨迹</a>
  179 + </span>
  180 + </div>
  181 + <div class="ct-progress-bar" >
  182 + <div class="scale"></div>
  183 + </div>
  184 + </div>
  185 + <div class="map-container"></div>
  186 + </div>
  187 + </div>
  188 + </div>
  189 +
  190 + <script id="cc_info_accordion_cont_temp" type="text/html">
  191 + {{each ccInfo as cc i}}
  192 + <h3 class="uk-accordion-title">{{cc.name}}</h3>
  193 + <div class="uk-accordion-content">
  194 + <ul class="uk-list">
  195 + {{each cc.cars as c j}}
  196 + <li>{{c}}</li>
  197 + {{/each}}
  198 + </ul>
  199 + </div>
  200 + {{/each}}
  201 + </script>
  202 +
  203 + <script id="gps_road_info_cont_temp" type="text/html">
  204 + {{each array as gps i}}
  205 + <dl data-code="{{gps.road.road_CODE}}">
  206 + <dd>{{gps.timeStr}}</dd>
  207 + <dd>{{gps.speed}}</dd>
  208 + <dd>{{gps.road.road_NAME}}</dd>
  209 + </dl>
  210 + {{/each}}
  211 + </script>
  212 +
  213 + <script id="multi_inout_info_cont_temp" type="text/html">
  214 + {{each list as item i}}
  215 + <dl data-id="{{item.id}}">
  216 + <dd>{{item.stopName}}</dd>
  217 + <dd>{{item.in_time_str}}</dd>
  218 + <dd>{{item.out_time_str}}</dd>
  219 + <dd></dd>
  220 + <dd></dd>
  221 + </dl>
  222 + {{/each}}
  223 + </script>
  224 +
  225 + <script id="inout_info_cont_temp" type="text/html">
  226 + <dl data-id="{{id}}">
  227 + <dd>{{stopName}}</dd>
  228 + <dd>{{in_time_str}}</dd>
  229 + <dd></dd>
  230 + <dd></dd>
  231 + <dd></dd>
  232 + </dl>
  233 + </script>
  234 +
  235 +
  236 + <script id="abnormal_table_cont_temp" type="text/html">
  237 + {{each array as item i}}
  238 + <dl>
  239 + <dd>
  240 + {{if item.abnormalType == 'speed'}}
  241 + 超速({{item.speed}})
  242 + {{else if item.abnormalType == 'outbound'}}
  243 + 越界
  244 + {{/if}}
  245 + </dd>
  246 + <dd>{{item.st_str}}</dd>
  247 + <dd>{{item.et_str}}</dd>
  248 + <dd></dd>
  249 + </dl>
  250 + {{/each}}
  251 + </script>
  252 + <script>
  253 + (function () {
  254 + var modal = '#map-playback2-modal', gpsArray;
  255 +
  256 + $(modal).on('init', function (e, data) {
  257 + //初始化地图
  258 + mapObj.initMap();
  259 +
  260 + //固定表头
  261 + gb_ct_table.fixedHead($('.road_table_wrap', modal));
  262 + gb_ct_table.fixedHead($('.inout_table_wrap', modal));
  263 + gb_ct_table.fixedHead($('.abnormal_table_panel', modal));
  264 + //线路配车
  265 + ccInfo.init();
  266 +
  267 + //表单初始值
  268 + searchForm.init(data);
  269 +
  270 + //车辆 autocomplete
  271 + $.get('/basic/cars', function (rs) {
  272 + gb_common.carAutocomplete($('.autocomplete-nbbm', modal), rs);
  273 + });
  274 + });
  275 +
  276 + /**
  277 + * 线路配车相关
  278 + */
  279 + var ccInfo = (function () {
  280 +
  281 + function init() {
  282 + $.get('/basic/ccInfo', function (rs) {
  283 + var ccInfo = [], lines = gb_data_basic.codeToLine;
  284 + for (var code in lines) {
  285 + ccInfo.push({
  286 + name: lines[code].name,
  287 + cars: carSort(rs[code])
  288 + });
  289 + }
  290 +
  291 + var htmlStr = template('cc_info_accordion_cont_temp', {ccInfo: ccInfo});
  292 + $('.cc_info_accordion', modal).html(htmlStr)
  293 + .find('.uk-list li').on('click', itemClick);
  294 + });
  295 + }
  296 +
  297 + function carSort(list) {
  298 + if (!list)
  299 + return [];
  300 + return list.sort();
  301 + }
  302 +
  303 + function itemClick() {
  304 + $(this).parent().find('li.active').removeClass('active');
  305 + $(this).addClass('active');
  306 + searchForm.setNbbm($(this).text());
  307 + }
  308 +
  309 + return {
  310 + init: init
  311 + };
  312 + })();
  313 +
  314 + /**
  315 + * 搜索表单相关
  316 + */
  317 + var searchForm = (function () {
  318 +
  319 + var f = $('.playBackForm', modal);
  320 +
  321 + var init = function (data) {
  322 + //设置初始值
  323 + if (data.nbbm)
  324 + $('[name=nbbm]', f).val(data.nbbm);
  325 + var st = moment().subtract(2, 'hour');
  326 + if (data.st)
  327 + st = moment(data.st, 'YYYY-MM-DD HH:mm');
  328 + $('[name=sDate]', f).val(st.format('YYYY-MM-DD'));
  329 + $('[name=sTime]', f).val(st.format('HH:mm'));
  330 + var et = moment();
  331 + if (data.et)
  332 + et = moment(data.et, 'YYYY-MM-DD HH:mm');
  333 + $('[name=eDate]', f).val(et.format('YYYY-MM-DD'));
  334 + $('[name=eTime]', f).val(et.format('HH:mm'));
  335 +
  336 +
  337 + /*$('[name=nbbm]', f).val('W0A-018');
  338 + $('[name=sDate]', f).val('2017-04-06');
  339 + $('[name=sTime]', f).val('04:49');
  340 +
  341 + $('[name=eDate]', f).val('2017-04-06');
  342 + $('[name=eTime]', f).val('09:49');*/
  343 + //搜索事件
  344 + $('button[type=submit]', f).on('click', search);
  345 + };
  346 +
  347 + var setNbbm = function (v) {
  348 + $('[name=nbbm]', f).val(v);
  349 + };
  350 +
  351 + var ONE_DAY = 60 * 60 * 24;
  352 + var MIN_SPACE = 60;
  353 + var search = function (e) {
  354 + e.stopPropagation();
  355 + var data = f.serializeJSON();
  356 +
  357 + //校验时间间隔
  358 + var fs = 'YYYY-MM-DDHH:mm';
  359 + var st = parseInt(moment(data.sDate + data.sTime, fs).format('X'));
  360 + var et = parseInt(moment(data.eDate + data.eTime, fs).format('X'));
  361 +
  362 + if (et < st)
  363 + notify_err('结束时间不能小于开始时间');
  364 + else if ((et - st) > ONE_DAY)
  365 + notify_err('最大间隔24小时!');
  366 + else if ((et - st) < MIN_SPACE)
  367 + notify_err('最小间隔1分钟!');
  368 + else {
  369 + show_wait_modal('搜索数据...');
  370 + $.ajax({
  371 + url: '/gps/history_v2/' + data.nbbm,
  372 + traditional: true,
  373 + data: {st: st, et: et},
  374 + success: function (rs) {
  375 + hide_wait_modal();
  376 + //重置相关对象
  377 + playObj.reset();
  378 + mapObj.reset();
  379 +
  380 + gpsArray = rs.list;
  381 + if (!gpsArray || gpsArray.length == 0) {
  382 + notify_err('没有搜索到轨迹数据!');
  383 + return;
  384 + }
  385 +
  386 + //排序
  387 + gpsArray.sort(function (a, b) {
  388 + return parseInt((a.ts - b.ts) + '' + (a.stop_no - b.stop_no));
  389 + });
  390 + //行车轨迹
  391 + trailTableObj.showInitData(gpsArray);
  392 + //到离站信息
  393 + inOutStationTableObj.showInitData(gpsArray);
  394 + //异常信息
  395 + abnormalTableObj.showInitData(rs['outboundList'], rs['speedList']);
  396 + //show 工具条
  397 + mapTools.show(rs);
  398 + //地图
  399 + mapObj.initData(rs);
  400 + //play 对象
  401 + playObj.init(rs);
  402 + //设置导出文件名称
  403 + mapTools.setExcelName();
  404 + }
  405 + });
  406 + }
  407 + return false;
  408 + };
  409 +
  410 + //遮罩
  411 + var shade = $('.play_back_form_shade', modal);
  412 + var showShade = function () {
  413 + shade.show();
  414 + };
  415 + var hideShade = function () {
  416 + shade.hide();
  417 + };
  418 +
  419 + return {
  420 + init: init,
  421 + setNbbm: setNbbm,
  422 + showShade: showShade,
  423 + hideShade: hideShade
  424 + };
  425 + })();
  426 +
  427 + /**
  428 + * 行车轨迹表格
  429 + */
  430 + var trailTableObj = (function () {
  431 +
  432 + var $tbody = $('.gps-road-info .ct_table_body', modal);
  433 + var $wrap = $('.road_table_wrap', modal);
  434 + var initFlag, gpsArray;
  435 + var showInitData = function (list) {
  436 + var array = [];
  437 + for (var i = 0, gps; gps = list[i++];) {
  438 + //格式化时间
  439 + gps.timeStr = moment(gps.timestamp).format('HH:mm.ss');
  440 + try {
  441 + if (i > 0 && array[array.length - 1].road.road_CODE == gps.road.road_CODE)
  442 + array.pop();
  443 + }
  444 + catch (e) {
  445 + }
  446 +
  447 + if (gps.road)
  448 + array.push(gps);
  449 + }
  450 +
  451 + var htmlStr = template('gps_road_info_cont_temp', {array: array});
  452 + $tbody.html(htmlStr);
  453 + initFlag = true;
  454 + gpsArray = list;
  455 + };
  456 +
  457 + var prev;
  458 + var add = function (gps, i) {
  459 + if(i == 0)
  460 + return;
  461 + if(initFlag){
  462 + //清理初始化的数据
  463 + $tbody.html('');
  464 + initFlag = false;
  465 + }
  466 + if (!gps.road)
  467 + return;
  468 + var code = gps.road.road_CODE;
  469 + if (!prev || code != prev.road.road_CODE) {
  470 + $tbody.append(template('gps_road_info_cont_temp', {array: [gps]}));
  471 + }
  472 + else{
  473 + var dds = $tbody.find('dl[data-code=' + code + ']').last().find('dd');
  474 + $(dds[0]).text(gps.timeStr);
  475 + $(dds[1]).text(gps.speed);
  476 + }
  477 + prev = gps;
  478 + $wrap.scrollTop($wrap[0].scrollHeight);
  479 + };
  480 +
  481 + return {
  482 + showInitData: showInitData,
  483 + add : add,
  484 + gpsArray : function () {
  485 + return gpsArray;
  486 + }
  487 + };
  488 + })();
  489 +
  490 + /**
  491 + * 到离站信息表格
  492 + * @type {{}}
  493 + */
  494 + var inOutStationTableObj = (function () {
  495 +
  496 + var data, f, prev, initFlag;
  497 + var $wrap = $('.inout_table_wrap', modal);
  498 + var $tbody = $('.ct_table_body', $wrap);
  499 + var showInitData = function (list) {
  500 + clear();
  501 + data = [];
  502 + $.each(list, function (i, gps) {
  503 + prev = data[data.length - 1];
  504 + if (gps['inout_stop'] == -1)
  505 + return true;
  506 + if (gps['inout_stop'] == 0 && gps['inout_stop_info']) {
  507 + //连续进站信号,取第一个
  508 + if(prev && prev['out_ts'] == null
  509 + && prev['stopName'] == gps['inout_stop_info'].stopName){
  510 + return true;
  511 + }
  512 + data.push(createIn(gps));
  513 + }
  514 + else if (gps['inout_stop'] == 1) {
  515 + f = matchOut(prev, gps);
  516 + if(f)
  517 + data.push(f);
  518 + }
  519 + });
  520 + //格式化时间
  521 + $.each(data, function (i) {
  522 + if (this.in_ts)
  523 + this.in_time_str = moment(this.in_ts).format('HH:mm.ss');
  524 + if (this.out_ts)
  525 + this.out_time_str = moment(this.out_ts).format('HH:mm.ss');
  526 + //id
  527 + this.id = 'in_out_' + i;
  528 + });
  529 + var htmlStr = template('multi_inout_info_cont_temp', {list: data});
  530 + $tbody.html(htmlStr);
  531 + initFlag = true;
  532 + len = data.length;
  533 + };
  534 +
  535 + var inoutIndex=0, len, item;
  536 + var add = function (gps, i) {
  537 + if(i == 0)
  538 + return;
  539 + if(initFlag)
  540 + clear();
  541 +
  542 + var $dl;
  543 + for(j = inoutIndex; j < len; j++){
  544 + item = data[j];
  545 + $dl = $tbody.find('dl[data-id='+item.id+']');
  546 + if(gps.ts >= item.in_ts && $dl.length==0){
  547 + $tbody.append(template('inout_info_cont_temp', item));
  548 + inoutIndex = j;
  549 + }
  550 +
  551 + if(gps.ts >= item.out_ts){
  552 + var dds = $dl.find('dd');
  553 + if($dl.length==0)
  554 + $tbody.append(template('inout_info_cont_temp', item));
  555 + else
  556 + $(dds[2]).text(item.out_time_str);
  557 + inoutIndex = j;
  558 + }
  559 + else {
  560 + break;
  561 + }
  562 + }
  563 + $wrap.scrollTop($wrap[0].scrollHeight);
  564 + };
  565 +
  566 + var clear = function () {
  567 + $tbody.html('');
  568 + initFlag = false;
  569 + };
  570 +
  571 + var createIn = function (gps) {
  572 + var info = gps['inout_stop_info'];
  573 + return {in_ts: info.ts, stopNo: info.stopNo, stopName: info.stopName}
  574 + };
  575 +
  576 + var matchOut = function (prevInfo, gps) {
  577 + var oi = gps['inout_stop_info'];
  578 + if(!oi)
  579 + return;
  580 + if(prevInfo && prevInfo.stopName == oi.stopName){
  581 + prevInfo['out_ts'] = oi.ts;
  582 + return null;
  583 + }
  584 + else {
  585 + return {out_ts: oi.ts,stopNo: oi.stopNo,stopName: oi.stopName}
  586 + }
  587 + };
  588 +
  589 + return {
  590 + showInitData: showInitData,
  591 + add: add
  592 + };
  593 + })();
  594 +
  595 + /**
  596 + * 异常信息表格
  597 + * @type {{showInitData}}
  598 + */
  599 + var abnormalTableObj = (function () {
  600 +
  601 + var showInitData = function () {
  602 + var array = [];
  603 + for(var i = 0; i < arguments.length; i ++){
  604 + array = array.concat(arguments[i]);
  605 + }
  606 + //格式化时间
  607 + $.each(array, function () {
  608 + if(this.st)
  609 + this.st_str = moment(this.st).format('HH:mm.ss');
  610 + if(this.et)
  611 + this.et_str = moment(this.et).format('HH:mm.ss');
  612 + });
  613 +
  614 + //排序
  615 + array.sort(function (a, b) {
  616 + return a.st - b.st;
  617 + });
  618 +
  619 + var htmlStr = template('abnormal_table_cont_temp', {array: array});
  620 + $('.abnormal_table .ct_table_body', modal).html(htmlStr);
  621 + };
  622 +
  623 + return {
  624 + showInitData: showInitData
  625 + }
  626 + })();
  627 +
  628 + /**
  629 + * 工具条相关
  630 + */
  631 + var mapTools = (function () {
  632 +
  633 + $('.map-wrap-tools .play_btn', modal).on('click', function () {
  634 + if($(this).hasClass('play')){
  635 + //暂停
  636 + $(this).removeClass('play');
  637 + playObj.pause();
  638 + searchForm.hideShade();
  639 + }
  640 + else {
  641 + //播放
  642 + $(this).addClass('play');
  643 + playObj.play();
  644 + playObj.fixedToCenter();
  645 + searchForm.showShade();
  646 + }
  647 + });
  648 +
  649 + //播放速度
  650 + $('.speed_form input[name=playSpeed]', modal).on('click', function () {
  651 + playObj.setConf('playSpeed', $(this).val());
  652 + });
  653 +
  654 + //空间数据
  655 + $('.buffer_area_form input[type=checkbox]', modal).on('click', function () {
  656 + playObj.setConf($(this).attr('name'), $(this)[0].checked);
  657 + mapObj.refreshOverlay();
  658 + });
  659 +
  660 + //进度条
  661 + var step, $scale = $('.ct-progress-bar .scale', modal);
  662 + var upProgressBar = function (i) {
  663 + $scale.css('width', step * (i + 1));
  664 + };
  665 +
  666 + //导出
  667 + $('.export-excel', modal).on('click', function () {
  668 + var base64Str = gb_map_play_back.listToExcel(trailTableObj.gpsArray());
  669 + $(this).attr('href', base64Str);
  670 + });
  671 +
  672 + var setExcelName = function () {
  673 + var f = $('.playBackForm', modal);
  674 + var fileName = ($('[name=nbbm]', f).val() + '轨迹数据' + $('[name=sDate]', f).val() + $('[name=sTime]', f).val() + '至' + $('[name=eDate]', f).val() + $('[name=eTime]', f).val() + '.xls').replace(new RegExp(/-/g),'').replace(new RegExp(/:/g),'');
  675 + $('.export-excel', modal).attr('download', fileName);
  676 + };
  677 +
  678 + var gpsArray;
  679 + var show = function (rs) {
  680 + $('.map-wrap-tools').show();
  681 + $('.map-container', modal).addClass('show_tools');
  682 + //总里程
  683 + $('.text-panel .sum_mileage', modal).text(rs.sumMileage);
  684 +
  685 + var size = rs.list.length;
  686 + $('.text-panel .count_point', modal).text(size);
  687 + step = $('.ct-progress-bar', modal).width() / size;
  688 +
  689 + //console.log('stepstep', step);
  690 + };
  691 +
  692 + return {
  693 + show: show,
  694 + upProgressBar: upProgressBar,
  695 + setExcelName: setExcelName
  696 + }
  697 + })();
  698 +
  699 + /**
  700 + * 地图相关
  701 + */
  702 + var mapObj = (function () {
  703 + var map;
  704 + var initMap = function () {
  705 + //初始化地图
  706 + map = new BMap.Map($('.map-container', modal)[0]);
  707 + //中心点和缩放级别
  708 + map.centerAndZoom(new BMap.Point(gb_map_consts.center_point.lng, gb_map_consts.center_point.lat), 16);
  709 + map.enableScrollWheelZoom();
  710 + }
  711 +
  712 + var storage = window.localStorage;
  713 + var routes;//路段
  714 + var stations;//站点
  715 + var parks;//停车场
  716 +
  717 + var initData = function (rs) {
  718 + var gpsArray = rs.list;
  719 + if(!gpsArray || gpsArray.length==0)
  720 + return;
  721 + var lineCode = gpsArray[0].lineId;
  722 + //从地图模块获取站点数据
  723 + stations = gb_map_spatial_data.getStationArray(lineCode);
  724 + //从地图模块获取停车场数据
  725 + parks = gb_map_spatial_data.carparkArray();
  726 + //从localStorage 获取路段
  727 + routes = JSON.parse(storage.getItem(lineCode + '_route'));
  728 + routes = [routes.up_bd, routes.down_bd];
  729 + };
  730 +
  731 +
  732 + /**
  733 + * 更新车辆位置
  734 + */
  735 + var gpsMarker;
  736 + var updateCar = function (gps) {
  737 + if(!gpsMarker){
  738 + gpsMarker = new BMap.Marker(new BMap.Point(gps.bd_lon, gps.bd_lat));
  739 + var width = gb_map_imap.calcGpsMarkerWidth(gps.nbbm);
  740 + gpsMarker.setIcon(new BMap.Icon(gb_map_imap.createCarIconRotation(gps, width), new BMap.Size(width, 75)));
  741 + gpsMarker.disableMassClear();//禁止marker被清除
  742 + gpsMarker.setTop(true);
  743 + map.addOverlay(gpsMarker);
  744 + //居中
  745 + map.panTo(gpsMarker.getPosition());
  746 + }
  747 + else{
  748 + gpsMarker.setPosition(new BMap.Point(gps.bd_lon, gps.bd_lat));
  749 + var width = gb_map_imap.calcGpsMarkerWidth(gps.nbbm);
  750 + gpsMarker.setIcon(new BMap.Icon(gb_map_imap.createCarIconRotation(gps, width), new BMap.Size(width, 75)));
  751 + }
  752 +
  753 + //更新路段底图
  754 + if(gps.upDown!=roadUpdown){
  755 + switchPolyline(gps.upDown);
  756 + //清除轨迹线
  757 + trailArray = [];
  758 + }
  759 + };
  760 +
  761 + /**
  762 + * 绘制轨迹线
  763 + */
  764 + var trailArray=[], trailPolyline;
  765 + var updateTrailLine = function () {
  766 + trailArray.push(gpsMarker.getPosition());
  767 + if(!trailPolyline){
  768 + trailPolyline = new BMap.Polyline(trailArray, {strokeWeight: 3, strokeColor: '#000000'});
  769 + trailPolyline.disableMassClear();//禁止trailPolyline被清除
  770 + map.addOverlay(trailPolyline);
  771 + }
  772 + else{
  773 + trailPolyline.setPath(trailArray);
  774 + }
  775 + };
  776 +
  777 + /**
  778 + * 绘制路段底图(包括站点)
  779 + */
  780 + var roadUpdown=-1;
  781 + var switchPolyline = function (upDown) {
  782 + if(typeof(upDown) == "undefined")
  783 + upDown = roadUpdown;
  784 +
  785 + map.clearOverlays();
  786 + //路段
  787 + drawRoadPolyline(upDown);
  788 + //站点
  789 + if(playObj.getConf().drawPoint)
  790 + drawStationPoint(upDown);
  791 + //缓冲区
  792 + if(playObj.getConf().drawBuffArea)
  793 + drawStationBfArea(upDown);
  794 + //站点名称
  795 + if(playObj.getConf().stationName)
  796 + drawStationName(upDown);
  797 + roadUpdown = upDown;
  798 + };
  799 +
  800 + /**
  801 + * 根据走向绘制路段
  802 + */
  803 + var drawRoadPolyline = function (upDown) {
  804 + var colour = gb_map_config.getConfig().section.color;
  805 + var plConfig = {strokeWeight: 12, strokeColor: upDown?colour.down:colour.up, strokeOpacity: .4}, pos;
  806 + $.each(routes[upDown], function (i, item) {
  807 + pos = [];
  808 + $.each(item.split(','), function () {
  809 + temps = this.split(' ');
  810 + pos.push(new BMap.Point(temps[0], temps[1]));
  811 + });
  812 + map.addOverlay(new BMap.Polyline(pos, plConfig));
  813 + });
  814 + };
  815 +
  816 + /**
  817 + * 根据走向绘制站点点位
  818 + */
  819 + var drawStationPoint = function (upDown) {
  820 + var array = stations[upDown], psm;
  821 + $.each(array, function () {
  822 + //坐标转换
  823 + var coord = TransGPS.wgsToBD(this.lat, this.lon);
  824 + this.bd_lat = coord.lat;
  825 + this.bd_lon = coord.lng;
  826 + psm = new BMap.Marker(new BMap.Point(this.bd_lon, this.bd_lat));
  827 + psm.setTitle(this.stationName);
  828 + map.addOverlay(psm);
  829 + psm.setIcon(new BMap.Icon(gb_map_imap.createStationPointIcon(), new BMap.Size(12, 12)));
  830 + });
  831 + };
  832 +
  833 + /**
  834 + * 为站点绘制缓冲区
  835 + */
  836 + var drawStationBfArea = function (upDown) {
  837 + var array = stations[upDown];
  838 + $.each(array, function () {
  839 + if(this.shapesType=='r')
  840 + drawCircle(new BMap.Point(this.bd_lon, this.bd_lat), this.radius);
  841 + else if(this.shapesType=='d')
  842 + drawPolygon(this);
  843 + });
  844 + };
  845 +
  846 + /**
  847 + * 绘制站点名称
  848 + */
  849 + var drawStationName = function (upDown) {
  850 + var style = {backgroundColor: "rgba(255, 255, 255, 0.69)",color : "black", borderColor: "black", fontSize : "12px", height : "16px", lineHeight : "16px", fontFamily:"微软雅黑"}
  851 + var array = stations[upDown];
  852 + $.each(array, function () {
  853 + var width = this.stationName.length * 12;
  854 + var label = new BMap.Label(this.stationName, {
  855 + position:new BMap.Point(this.bd_lon, this.bd_lat),
  856 + offset: new BMap.Size(-(width / 2), -27)
  857 + });
  858 + label.setStyle(style);
  859 + map.addOverlay(label);
  860 + });
  861 + };
  862 + var drawCircle = function (point, radius) {
  863 + var circle = new BMap.Circle(point, radius);
  864 + circle.setStrokeColor('#000000');
  865 + circle.setStrokeWeight(1);
  866 + map.addOverlay(circle);
  867 + };
  868 +
  869 + var drawPolygon = function () {
  870 +
  871 + };
  872 +
  873 + /**
  874 + * 重置
  875 + */
  876 + var reset = function () {
  877 + if(trailPolyline)
  878 + trailPolyline.enableMassClear();
  879 + if(gpsMarker)
  880 + gpsMarker.enableMassClear();
  881 + map.clearOverlays();
  882 + roadUpdown = -1;
  883 + trailArray=[];
  884 + trailPolyline = null;
  885 + gpsMarker = null;
  886 + };
  887 +
  888 + /**
  889 + * 居中车辆,超出边界时
  890 + */
  891 + var toCenterByBounds = function () {
  892 + var markerIsVisible = BMapLib.GeoUtils.isPointInRect(gpsMarker.getPosition(),map.getBounds());
  893 + if(!markerIsVisible)
  894 + map.panTo(gpsMarker.getPosition());
  895 + };
  896 + return {
  897 + initData: initData,
  898 + updateCar: updateCar,
  899 + initMap: initMap,
  900 + updateTrailLine: updateTrailLine,
  901 + refreshOverlay: switchPolyline,
  902 + toCenterByBounds: toCenterByBounds,
  903 + reset: reset
  904 + }
  905 + })();
  906 +
  907 + /**
  908 + * 播放相关
  909 + * @type {{}}
  910 + */
  911 + var playObj = (function () {
  912 + var conf = {
  913 + playSpeed: 1,//播放速度
  914 + drawPoint: 1,//绘制站点
  915 + drawBuffArea: 1 ,//缓冲区
  916 + stationName: 0, //站点名称
  917 + carPark: [] //停车场
  918 + };
  919 +
  920 + var gpsArray;//gps点位集合
  921 + var init = function (rs) {
  922 + gpsArray = rs.list;
  923 + if(!gpsArray || gpsArray.length==0)
  924 + return;
  925 +
  926 + len = gpsArray.length;
  927 + //渲染配置信息
  928 + renderConfig();
  929 + //播放第一个点
  930 + run();
  931 + };
  932 +
  933 + var renderConfig = function () {
  934 + $('.speed_form [name=playSpeed][value='+conf.playSpeed+']', modal)[0].checked = true;
  935 + $('.buffer_area_form input[type=checkbox]', modal).each(function () {
  936 + var name = $(this).attr('name');
  937 + $(this)[0].checked = conf[name];
  938 + });
  939 + };
  940 +
  941 + /**
  942 + * 播放函数
  943 + */
  944 + var runTimer; //播放定时器
  945 + var toCenterTimer;//居中定时器
  946 + var index = 0; //gps下标
  947 + var play = function () {
  948 + if(!run())
  949 + runTimer = setTimeout(play, 1000 / conf.playSpeed);
  950 + };
  951 +
  952 + /**
  953 + * 定时居中
  954 + */
  955 + var fixedToCenter = function () {
  956 + toCenterTimer = setInterval(function () {
  957 + mapObj.toCenterByBounds();
  958 + }, 500);
  959 + };
  960 +
  961 + var pause = function () {
  962 + clearInterval(runTimer);
  963 + runTimer = null;
  964 + clearInterval(toCenterTimer);
  965 + toCenterTimer = null;
  966 + };
  967 +
  968 + var clock = $('.ct_btn.clock', modal), gps, len;
  969 + var run = function () {
  970 + if(index == len){
  971 + $('.map-wrap-tools .play_btn', modal).removeClass('play');
  972 + pause();
  973 + notify_succ('本次轨迹回放已结束!');
  974 + searchForm.hideShade();
  975 + return true;
  976 + }
  977 + gps = gpsArray[index];
  978 + //更新GPS点位
  979 + mapObj.updateCar(gps);
  980 + //绘制轨迹线
  981 + mapObj.updateTrailLine();
  982 + //时间文本
  983 + clock.text(gps.timeStr);
  984 + //输出行车轨迹
  985 + trailTableObj.add(gps, index);
  986 + //输出到离站信息
  987 + inOutStationTableObj.add(gps, index);
  988 + //进度条
  989 + mapTools.upProgressBar(index);
  990 + index ++;
  991 + };
  992 +
  993 + /**
  994 + * 重置
  995 + */
  996 + var reset = function () {
  997 + index = 0;
  998 + gpsArray = null;
  999 + pause();
  1000 + };
  1001 + return {
  1002 + init: init,
  1003 + getConf: function () {
  1004 + return conf;
  1005 + },
  1006 + setConf: function (k, v) {
  1007 + conf[k] = v;
  1008 + },
  1009 + play: play,
  1010 + fixedToCenter: fixedToCenter,
  1011 + pause: pause,
  1012 + reset: reset
  1013 + }
  1014 + })();
  1015 + })();
  1016 + </script>
1015 1017 </div>
1016 1018 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/mapmonitor/real.html
... ... @@ -51,14 +51,14 @@
51 51 </div>
52 52  
53 53 <script src="/real_control_v2/assets/js/GeoUtils_min.js"></script>
54   -<script src="/real_control_v2/mapmonitor/js/config.js"></script>
55   -<script src="/real_control_v2/mapmonitor/js/gps_tree.js"></script>
56   -<script src="/real_control_v2/mapmonitor/js/spatial_data.js"></script>
57   -<script src="/real_control_v2/mapmonitor/js/map_overlay_manager.js"></script>
58   -<script src="/real_control_v2/mapmonitor/js/real.js"></script>
59   -<script src="/real_control_v2/mapmonitor/js/map/iMap.js"></script>
60   -<script src="/real_control_v2/mapmonitor/js/map/platform/baidu.js"></script>
61   -<script src="/real_control_v2/mapmonitor/js/map/platform/gaode.js"></script>
  54 +<script src="/real_control_v2/mapmonitor/js/config.js" merge="custom_map_js"></script>
  55 +<script src="/real_control_v2/mapmonitor/js/gps_tree.js" merge="custom_map_js"></script>
  56 +<script src="/real_control_v2/mapmonitor/js/spatial_data.js" merge="custom_map_js"></script>
  57 +<script src="/real_control_v2/mapmonitor/js/map_overlay_manager.js" merge="custom_map_js"></script>
  58 +<script src="/real_control_v2/mapmonitor/js/real.js" merge="custom_map_js"></script>
  59 +<script src="/real_control_v2/mapmonitor/js/map/iMap.js" merge="custom_map_js"></script>
  60 +<script src="/real_control_v2/mapmonitor/js/map/platform/baidu.js" merge="custom_map_js"></script>
  61 +<script src="/real_control_v2/mapmonitor/js/map/platform/gaode.js" merge="custom_map_js"></script>
62 62 <!-- jquery ui -->
63 63 <script src="/real_control_v2/assets/plugins/jquery.ui/core.js"></script>
64 64 <script src="/real_control_v2/assets/plugins/jquery.ui/widget.js"></script>
... ... @@ -67,4 +67,4 @@
67 67 <!-- 颜色选择器 -->
68 68 <script src="/real_control_v2/assets/plugins/spectrum/spectrum.js"></script>
69 69 <!-- play back -->
70   -<script src="/real_control_v2/mapmonitor/js/playback.js"></script>
71 70 \ No newline at end of file
  71 +<script src="/real_control_v2/mapmonitor/js/playback.js" merge="custom_map_js"></script>
72 72 \ No newline at end of file
... ...
src/test/java/com/bsth/service/schedule/BaseTest.java
1   -package com.bsth.service.schedule;
2   -
3   -import org.junit.runner.RunWith;
4   -import org.springframework.boot.test.SpringApplicationConfiguration;
5   -import org.springframework.test.context.ActiveProfiles;
6   -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
7   -
8   -/**
9   - * 基础测试类。
10   - */
11   -@RunWith(SpringJUnit4ClassRunner.class)
12   -@SpringApplicationConfiguration(classes = ScheduleTestApp.class)
13   -@ActiveProfiles("scheduletest")
14   -//@WebIntegrationTest({"server.port=0","management.port=0"})
15   -public class BaseTest {
16   -}
  1 +package com.bsth.service.schedule;
  2 +
  3 +import org.junit.runner.RunWith;
  4 +import org.springframework.boot.test.SpringApplicationConfiguration;
  5 +import org.springframework.test.context.ActiveProfiles;
  6 +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
  7 +
  8 +/**
  9 + * 基础测试类。
  10 + */
  11 +@RunWith(SpringJUnit4ClassRunner.class)
  12 +@SpringApplicationConfiguration(classes = ScheduleTestApp.class)
  13 +@ActiveProfiles("scheduletest")
  14 +//@WebIntegrationTest({"server.port=0","management.port=0"})
  15 +public class BaseTest {
  16 +}
... ...
src/test/java/com/bsth/service/schedule/ScheduleTestApp.java
1   -package com.bsth.service.schedule;
2   -
3   -import com.bsth.service.schedule.impl.SchedulePlanRuleResultServiceImpl;
4   -import com.bsth.service.schedule.impl.SchedulePlanServiceImpl;
5   -import com.bsth.service.schedule.rules.MyDroolsConfiguration;
6   -import com.bsth.service.schedule.utils.DataToolsServiceImpl;
7   -import org.springframework.boot.autoconfigure.SpringBootApplication;
8   -import org.springframework.boot.orm.jpa.EntityScan;
9   -import org.springframework.context.annotation.ComponentScan;
10   -import org.springframework.context.annotation.Configuration;
11   -import org.springframework.context.annotation.FilterType;
12   -import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
13   -
14   -/**
15   - * 基础测试类(用于计划调度模块测试测试)。
16   - * 配置计划调度的模块的用到的entity,repository,service
17   - *
18   - * 注意:测试环境下测试类 TestApp 和springdata的类不在统一级包里,必须指定EnableJpaRepositories
19   - */
20   -@Configuration
21   -@EntityScan(
22   - basePackages = {"com.bsth.entity"}
23   -)
24   -@ComponentScan(
25   - basePackages = {"com.bsth.repository", "com.bsth.service"},
26   - useDefaultFilters = false,
27   - includeFilters = {
28   - @ComponentScan.Filter(
29   - type = FilterType.ASSIGNABLE_TYPE,
30   - value = SchedulePlanRuleResultServiceImpl.class
31   - ),
32   - @ComponentScan.Filter(
33   - type = FilterType.ASSIGNABLE_TYPE,
34   - value = SchedulePlanServiceImpl.class
35   - ),
36   - @ComponentScan.Filter(
37   - type = FilterType.ASSIGNABLE_TYPE,
38   - value = MyDroolsConfiguration.class
39   - ),
40   - @ComponentScan.Filter(
41   - type = FilterType.ASSIGNABLE_TYPE,
42   - value = DataToolsServiceImpl.class
43   - )
44   - }
45   -)
46   -@EnableJpaRepositories(
47   - basePackages = {"com.bsth.repository"}
48   -)
49   -@SpringBootApplication
50   -public class ScheduleTestApp {
51   -}
  1 +package com.bsth.service.schedule;
  2 +
  3 +import com.bsth.service.schedule.impl.SchedulePlanRuleResultServiceImpl;
  4 +import com.bsth.service.schedule.impl.SchedulePlanServiceImpl;
  5 +import com.bsth.service.schedule.rules.MyDroolsConfiguration;
  6 +import com.bsth.service.schedule.utils.DataToolsServiceImpl;
  7 +import org.springframework.boot.autoconfigure.SpringBootApplication;
  8 +import org.springframework.boot.orm.jpa.EntityScan;
  9 +import org.springframework.context.annotation.ComponentScan;
  10 +import org.springframework.context.annotation.Configuration;
  11 +import org.springframework.context.annotation.FilterType;
  12 +import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
  13 +
  14 +/**
  15 + * 基础测试类(用于计划调度模块测试测试)。
  16 + * 配置计划调度的模块的用到的entity,repository,service
  17 + *
  18 + * 注意:测试环境下测试类 TestApp 和springdata的类不在统一级包里,必须指定EnableJpaRepositories
  19 + */
  20 +@Configuration
  21 +@EntityScan(
  22 + basePackages = {"com.bsth.entity"}
  23 +)
  24 +@ComponentScan(
  25 + basePackages = {"com.bsth.repository", "com.bsth.service"},
  26 + useDefaultFilters = false,
  27 + includeFilters = {
  28 + @ComponentScan.Filter(
  29 + type = FilterType.ASSIGNABLE_TYPE,
  30 + value = SchedulePlanRuleResultServiceImpl.class
  31 + ),
  32 + @ComponentScan.Filter(
  33 + type = FilterType.ASSIGNABLE_TYPE,
  34 + value = SchedulePlanServiceImpl.class
  35 + ),
  36 + @ComponentScan.Filter(
  37 + type = FilterType.ASSIGNABLE_TYPE,
  38 + value = MyDroolsConfiguration.class
  39 + ),
  40 + @ComponentScan.Filter(
  41 + type = FilterType.ASSIGNABLE_TYPE,
  42 + value = DataToolsServiceImpl.class
  43 + )
  44 + }
  45 +)
  46 +@EnableJpaRepositories(
  47 + basePackages = {"com.bsth.repository"}
  48 +)
  49 +@SpringBootApplication
  50 +public class ScheduleTestApp {
  51 +}
... ...
src/test/java/com/bsth/service/schedule/rules/RuleTest1.java
1   -package com.bsth.service.schedule.rules;
2   -
3   -import com.bsth.entity.sys.SysUser;
4   -import com.bsth.repository.sys.SysUserRepository;
5   -import com.bsth.service.schedule.BaseTest;
6   -import com.vividsolutions.jts.util.Assert;
7   -import org.dbunit.database.DatabaseConnection;
8   -import org.dbunit.database.IDatabaseConnection;
9   -import org.dbunit.dataset.IDataSet;
10   -import org.dbunit.dataset.xml.FlatXmlDataSetBuilder;
11   -import org.dbunit.operation.DatabaseOperation;
12   -import org.junit.After;
13   -import org.junit.Before;
14   -import org.slf4j.Logger;
15   -import org.slf4j.LoggerFactory;
16   -import org.springframework.beans.factory.annotation.Autowired;
17   -import org.springframework.core.io.ClassPathResource;
18   -import org.springframework.core.io.Resource;
19   -
20   -import javax.sql.DataSource;
21   -
22   -public class RuleTest1 extends BaseTest {
23   - /** 日志记录器 */
24   - private static final Logger logger = LoggerFactory.getLogger(RuleTest1.class);
25   -
26   - @Autowired
27   - private DataSource dataSource;
28   -
29   - @Autowired
30   - private SysUserRepository sysUserRepository;
31   -
32   - /**
33   - * 初始化数据。
34   - */
35   - @Before
36   - public void initData() throws Exception {
37   - logger.info("载入数据......");
38   -
39   - // 获取数据库连接
40   - IDatabaseConnection iDatabaseConnection = new DatabaseConnection(dataSource.getConnection());
41   - // 获取Dbunit数据源
42   - Resource res = new ClassPathResource("testdata/d1.xml");
43   - FlatXmlDataSetBuilder flatXmlDataSetBuilder = new FlatXmlDataSetBuilder();
44   - flatXmlDataSetBuilder.setColumnSensing(false);
45   - flatXmlDataSetBuilder.setCaseSensitiveTableNames(false);
46   - IDataSet iDataSet = flatXmlDataSetBuilder.build(res.getInputStream());
47   -
48   - // 载入数据
49   - DatabaseOperation.CLEAN_INSERT.execute(iDatabaseConnection, iDataSet);
50   - }
51   -
52   - /**
53   - * 清除数据。
54   - */
55   - @After
56   - public void destoryData() throws Exception {
57   - logger.info("清除数据......");
58   - // 获取数据库连接
59   - IDatabaseConnection iDatabaseConnection = new DatabaseConnection(dataSource.getConnection());
60   - // 获取Dbunit数据源
61   - Resource res = new ClassPathResource("testdata/d1.xml");
62   - FlatXmlDataSetBuilder flatXmlDataSetBuilder = new FlatXmlDataSetBuilder();
63   - flatXmlDataSetBuilder.setColumnSensing(false);
64   - flatXmlDataSetBuilder.setCaseSensitiveTableNames(false);
65   - IDataSet iDataSet = flatXmlDataSetBuilder.build(res.getInputStream());
66   -
67   - // 清除数据
68   - DatabaseOperation.DELETE_ALL.execute(iDatabaseConnection, iDataSet);
69   - }
70   -
71   - @org.junit.Test
72   - public void t1() {
73   - logger.info("t1()测试......");
74   - SysUser sysUser = sysUserRepository.findOne(1);
75   - Assert.equals("admin", sysUser.getUserName());
76   - }
77   -}
78   -
79   -//
80   -//
81   -//package com.bsth.service.schedule.rules;
82   -//
83   -// import com.bsth.Application;
84   -// import com.bsth.service.schedule.rules.shiftloop.ScheduleCalcuParam_input;
85   -// import com.bsth.service.schedule.rules.shiftloop.ScheduleResults_output;
86   -// import com.bsth.service.schedule.rules.shiftloop.ScheduleRule_input;
87   -// import com.bsth.service.schedule.rules.ttinfo.TTInfoCalcuParam_input;
88   -// import com.bsth.service.schedule.rules.ttinfo.TTInfoResults_output;
89   -// import com.bsth.service.schedule.rules.ttinfo.TTInfo_input;
90   -// import org.joda.time.DateTime;
91   -// import org.junit.Test;
92   -// import org.junit.runner.RunWith;
93   -// import org.kie.api.KieBase;
94   -// import org.kie.api.runtime.KieSession;
95   -// import org.slf4j.Logger;
96   -// import org.slf4j.LoggerFactory;
97   -// import org.springframework.beans.factory.annotation.Autowired;
98   -// import org.springframework.boot.test.SpringApplicationConfiguration;
99   -// import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
100   -//
101   -// import java.util.Arrays;
102   -//
103   -//@RunWith(SpringJUnit4ClassRunner.class)
104   -//@SpringApplicationConfiguration(classes = {Application.class})
105   -//public class DroolsRulesTest {
106   -//
107   -// /** 日志记录器 */
108   -// private final static Logger logger = LoggerFactory.getLogger(DroolsRulesTest.class);
109   -//
110   -// @Autowired
111   -// private KieBase kieBase;
112   -//
113   -//// @Test
114   -//// public void helloWorldDrlTest() throws Exception {
115   -//// // 1、创建session,内部配置的是stateful
116   -//// KieSession session = kieBase.newKieSession();
117   -////
118   -//// // 1.1 设置gloable对象,在drl中通过别名使用
119   -//// List<String> gloableList = new ArrayList<String>();
120   -//// session.setGlobal("list", gloableList);
121   -////
122   -//// // 1.2 可以设置一些监听器,再议
123   -////
124   -//// // 2、创建fact对象
125   -//// Message message = new Message();
126   -//// message.setMessage("Hello World");
127   -//// message.setStatus(Message.HELLO);
128   -//// session.insert(message);
129   -////
130   -//// // 3、执行rule
131   -//// session.fireAllRules();
132   -////
133   -//// System.out.println(gloableList);
134   -////
135   -//// // 4、执行完毕销毁,有日志的也要关闭
136   -//// session.dispose();
137   -//// }
138   -//
139   -// // @Test
140   -// public void ttinfoDrlTest() throws Exception {
141   -// logger.info("------------ttinfoDrlTest 测试---------------");
142   -//
143   -// // 1、创建session,内部配置的是stateful
144   -// KieSession session = kieBase.newKieSession();
145   -//
146   -// // 1.1 设置gloable对象,在drl中通过别人使用
147   -// session.setGlobal("log", logger);
148   -// TTInfoResults_output ttInfoResults_output = new TTInfoResults_output();
149   -// session.setGlobal("results", ttInfoResults_output);
150   -//
151   -// // 1.2 可以设置一些监听器,再议
152   -//
153   -// // 2、创建fact对象
154   -// TTInfoCalcuParam_input ttInfoCalcuParam_input = new TTInfoCalcuParam_input(
155   -// new DateTime(2016, 8, 1, 0, 0),
156   -// new DateTime(2016, 8, 10, 0, 0),
157   -// "1"
158   -// );
159   -//
160   -//
161   -// TTInfo_input ttInfo_input1 = new TTInfo_input();
162   -// ttInfo_input1.setTtInfoId("1");
163   -// ttInfo_input1.setXlId("1");
164   -// ttInfo_input1.setWeekdays(Arrays.asList(true, true, true, true, true, false, false));
165   -// ttInfo_input1.getSpecialDays().add(new DateTime(2016, 8, 1, 0, 0));
166   -// ttInfo_input1.setUpdateDate(new DateTime(2016, 1, 1, 0, 0));
167   -// ttInfo_input1.setIsEnable(true);
168   -// ttInfo_input1.setQyDate(new DateTime(2016, 1, 1, 0, 0));
169   -//
170   -// TTInfo_input ttInfo_input1_2 = new TTInfo_input();
171   -// ttInfo_input1_2.setTtInfoId("2");
172   -// ttInfo_input1_2.setXlId("1");
173   -// ttInfo_input1_2.setWeekdays(Arrays.asList(true, false, false, false, false, true, false));
174   -// ttInfo_input1_2.getSpecialDays().add(new DateTime(2016, 8, 11, 0, 0));
175   -// ttInfo_input1_2.setUpdateDate(new DateTime(2015, 2, 1, 0, 0));
176   -// ttInfo_input1_2.setIsEnable(true);
177   -// ttInfo_input1_2.setQyDate(new DateTime(2016, 1, 1, 0, 0));
178   -//
179   -//
180   -// TTInfoCalcuParam_input ttInfoCalcuParam_inpu2 = new TTInfoCalcuParam_input(
181   -// new DateTime(2016, 8, 1, 0, 0),
182   -// new DateTime(2016, 8, 10, 0, 0),
183   -// "2"
184   -// );
185   -//
186   -// TTInfo_input ttInfo_input2 = new TTInfo_input();
187   -// ttInfo_input2.setTtInfoId("2");
188   -// ttInfo_input2.setXlId("2");
189   -// ttInfo_input2.setWeekdays(Arrays.asList(true, false, false, false, false, true, false));
190   -// ttInfo_input2.getSpecialDays().add(new DateTime(2016, 8, 11, 0, 0));
191   -// ttInfo_input2.setUpdateDate(new DateTime(2016, 1, 1, 0, 0));
192   -// ttInfo_input2.setIsEnable(true);
193   -// ttInfo_input2.setQyDate(new DateTime(2016, 1, 1, 0, 0));
194   -//
195   -// session.insert(ttInfoCalcuParam_input);
196   -// session.insert(ttInfo_input1);
197   -// session.insert(ttInfo_input1_2);
198   -// session.insert(ttInfoCalcuParam_inpu2);
199   -// session.insert(ttInfo_input2);
200   -//
201   -//
202   -//
203   -// // 3、执行rule
204   -// session.fireAllRules();
205   -//
206   -// // 4、执行完毕销毁,有日志的也要关闭
207   -// session.dispose();
208   -//
209   -// // 打印global结果
210   -// logger.info(ttInfoResults_output.showTTInfoDesc1());
211   -//
212   -// }
213   -//
214   -// @Test
215   -// public void shiftloopDrlTest() throws Exception {
216   -// // 1、创建session,内部配置的是stateful
217   -// KieSession session = kieBase.newKieSession();
218   -//
219   -// // 1.1 设置gloable对象,在drl中通过别名使用
220   -// ScheduleResults_output scheduleResults_output = new ScheduleResults_output();
221   -// session.setGlobal("scheduleResult", scheduleResults_output);
222   -//
223   -// // 1.2 可以设置一些监听器,再议
224   -//
225   -// // 2、创建fact对象
226   -//
227   -// ScheduleCalcuParam_input scheduleCalcuParam_input = new ScheduleCalcuParam_input();
228   -// scheduleCalcuParam_input.setFromDate(new DateTime(2016, 8, 1, 0, 0));
229   -// scheduleCalcuParam_input.setToDate(new DateTime(2016, 8, 10, 0, 0));
230   -//
231   -// ScheduleRule_input scheduleRule_input1 = new ScheduleRule_input();
232   -// scheduleRule_input1.setRuleId("1");
233   -// scheduleRule_input1.setQyrq(new DateTime(2016, 7, 22, 0, 0));
234   -// scheduleRule_input1.getGuideboardIds().addAll(Arrays.asList(
235   -// "9", "9" , "8" ,"8" ,"7" ,"7" ,"6" ,"6", "5", "5", "4", "4", "3", "3", "2", "2", "1", "1"));
236   -// scheduleRule_input1.setStartGbdIndex(3);
237   -// scheduleRule_input1.getEmployeeConfigIds().addAll(Arrays.asList("1", "2"));
238   -// scheduleRule_input1.setStartEIndex(1);
239   -// scheduleRule_input1.setCarConfigId("1");
240   -//
241   -//// ScheduleRule_input scheduleRule_input2 = new ScheduleRule_input();
242   -//// scheduleRule_input2.setRuleId(2L);
243   -//// scheduleRule_input2.setQyrq(new DateTime(2016, 7, 22, 0, 0));
244   -//// scheduleRule_input2.getGuideboardIds().addAll(Arrays.asList(
245   -//// 1L, 1L, 2L, 2L, 3L, 3L, 4L, 4L, 5L, 5L, 6L, 6L, 7L, 7L, 8L, 8L, 9L, 9L, 10L, 10L,
246   -//// 11L, 11L, 12L, 12L, 13L, 13L));
247   -//// scheduleRule_input2.setStartGbdIndex(7);
248   -//// scheduleRule_input2.getEmployeeConfigIds().addAll(Arrays.asList(11L, 12L));
249   -//// scheduleRule_input2.setStartEIndex(1);
250   -//// scheduleRule_input2.setCarConfigId(2L);
251   -//
252   -// session.insert(scheduleCalcuParam_input);
253   -// session.insert(scheduleRule_input1);
254   -//// session.insert(scheduleRule_input2);
255   -//
256   -//
257   -// // 3、执行rule
258   -// session.fireAllRules();
259   -//
260   -// // 4、执行完毕销毁,有日志的也要关闭
261   -// session.dispose();
262   -//
263   -// System.out.println(scheduleResults_output.showGuideboardDesc1());
264   -//
265   -// }
266   -//}
267   -
  1 +package com.bsth.service.schedule.rules;
  2 +
  3 +import com.bsth.entity.sys.SysUser;
  4 +import com.bsth.repository.sys.SysUserRepository;
  5 +import com.bsth.service.schedule.BaseTest;
  6 +import com.vividsolutions.jts.util.Assert;
  7 +import org.dbunit.database.DatabaseConnection;
  8 +import org.dbunit.database.IDatabaseConnection;
  9 +import org.dbunit.dataset.IDataSet;
  10 +import org.dbunit.dataset.xml.FlatXmlDataSetBuilder;
  11 +import org.dbunit.operation.DatabaseOperation;
  12 +import org.junit.After;
  13 +import org.junit.Before;
  14 +import org.slf4j.Logger;
  15 +import org.slf4j.LoggerFactory;
  16 +import org.springframework.beans.factory.annotation.Autowired;
  17 +import org.springframework.core.io.ClassPathResource;
  18 +import org.springframework.core.io.Resource;
  19 +
  20 +import javax.sql.DataSource;
  21 +
  22 +public class RuleTest1 extends BaseTest {
  23 + /** 日志记录器 */
  24 + private static final Logger logger = LoggerFactory.getLogger(RuleTest1.class);
  25 +
  26 + @Autowired
  27 + private DataSource dataSource;
  28 +
  29 + @Autowired
  30 + private SysUserRepository sysUserRepository;
  31 +
  32 + /**
  33 + * 初始化数据。
  34 + */
  35 + @Before
  36 + public void initData() throws Exception {
  37 + logger.info("载入数据......");
  38 +
  39 + // 获取数据库连接
  40 + IDatabaseConnection iDatabaseConnection = new DatabaseConnection(dataSource.getConnection());
  41 + // 获取Dbunit数据源
  42 + Resource res = new ClassPathResource("testdata/d1.xml");
  43 + FlatXmlDataSetBuilder flatXmlDataSetBuilder = new FlatXmlDataSetBuilder();
  44 + flatXmlDataSetBuilder.setColumnSensing(false);
  45 + flatXmlDataSetBuilder.setCaseSensitiveTableNames(false);
  46 + IDataSet iDataSet = flatXmlDataSetBuilder.build(res.getInputStream());
  47 +
  48 + // 载入数据
  49 + DatabaseOperation.CLEAN_INSERT.execute(iDatabaseConnection, iDataSet);
  50 + }
  51 +
  52 + /**
  53 + * 清除数据。
  54 + */
  55 + @After
  56 + public void destoryData() throws Exception {
  57 + logger.info("清除数据......");
  58 + // 获取数据库连接
  59 + IDatabaseConnection iDatabaseConnection = new DatabaseConnection(dataSource.getConnection());
  60 + // 获取Dbunit数据源
  61 + Resource res = new ClassPathResource("testdata/d1.xml");
  62 + FlatXmlDataSetBuilder flatXmlDataSetBuilder = new FlatXmlDataSetBuilder();
  63 + flatXmlDataSetBuilder.setColumnSensing(false);
  64 + flatXmlDataSetBuilder.setCaseSensitiveTableNames(false);
  65 + IDataSet iDataSet = flatXmlDataSetBuilder.build(res.getInputStream());
  66 +
  67 + // 清除数据
  68 + DatabaseOperation.DELETE_ALL.execute(iDatabaseConnection, iDataSet);
  69 + }
  70 +
  71 + @org.junit.Test
  72 + public void t1() {
  73 + logger.info("t1()测试......");
  74 + SysUser sysUser = sysUserRepository.findOne(1);
  75 + Assert.equals("admin", sysUser.getUserName());
  76 + }
  77 +}
  78 +
  79 +//
  80 +//
  81 +//package com.bsth.service.schedule.rules;
  82 +//
  83 +// import com.bsth.Application;
  84 +// import com.bsth.service.schedule.rules.shiftloop.ScheduleCalcuParam_input;
  85 +// import com.bsth.service.schedule.rules.shiftloop.ScheduleResults_output;
  86 +// import com.bsth.service.schedule.rules.shiftloop.ScheduleRule_input;
  87 +// import com.bsth.service.schedule.rules.ttinfo.TTInfoCalcuParam_input;
  88 +// import com.bsth.service.schedule.rules.ttinfo.TTInfoResults_output;
  89 +// import com.bsth.service.schedule.rules.ttinfo.TTInfo_input;
  90 +// import org.joda.time.DateTime;
  91 +// import org.junit.Test;
  92 +// import org.junit.runner.RunWith;
  93 +// import org.kie.api.KieBase;
  94 +// import org.kie.api.runtime.KieSession;
  95 +// import org.slf4j.Logger;
  96 +// import org.slf4j.LoggerFactory;
  97 +// import org.springframework.beans.factory.annotation.Autowired;
  98 +// import org.springframework.boot.test.SpringApplicationConfiguration;
  99 +// import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
  100 +//
  101 +// import java.util.Arrays;
  102 +//
  103 +//@RunWith(SpringJUnit4ClassRunner.class)
  104 +//@SpringApplicationConfiguration(classes = {Application.class})
  105 +//public class DroolsRulesTest {
  106 +//
  107 +// /** 日志记录器 */
  108 +// private final static Logger logger = LoggerFactory.getLogger(DroolsRulesTest.class);
  109 +//
  110 +// @Autowired
  111 +// private KieBase kieBase;
  112 +//
  113 +//// @Test
  114 +//// public void helloWorldDrlTest() throws Exception {
  115 +//// // 1、创建session,内部配置的是stateful
  116 +//// KieSession session = kieBase.newKieSession();
  117 +////
  118 +//// // 1.1 设置gloable对象,在drl中通过别名使用
  119 +//// List<String> gloableList = new ArrayList<String>();
  120 +//// session.setGlobal("list", gloableList);
  121 +////
  122 +//// // 1.2 可以设置一些监听器,再议
  123 +////
  124 +//// // 2、创建fact对象
  125 +//// Message message = new Message();
  126 +//// message.setMessage("Hello World");
  127 +//// message.setStatus(Message.HELLO);
  128 +//// session.insert(message);
  129 +////
  130 +//// // 3、执行rule
  131 +//// session.fireAllRules();
  132 +////
  133 +//// System.out.println(gloableList);
  134 +////
  135 +//// // 4、执行完毕销毁,有日志的也要关闭
  136 +//// session.dispose();
  137 +//// }
  138 +//
  139 +// // @Test
  140 +// public void ttinfoDrlTest() throws Exception {
  141 +// logger.info("------------ttinfoDrlTest 测试---------------");
  142 +//
  143 +// // 1、创建session,内部配置的是stateful
  144 +// KieSession session = kieBase.newKieSession();
  145 +//
  146 +// // 1.1 设置gloable对象,在drl中通过别人使用
  147 +// session.setGlobal("log", logger);
  148 +// TTInfoResults_output ttInfoResults_output = new TTInfoResults_output();
  149 +// session.setGlobal("results", ttInfoResults_output);
  150 +//
  151 +// // 1.2 可以设置一些监听器,再议
  152 +//
  153 +// // 2、创建fact对象
  154 +// TTInfoCalcuParam_input ttInfoCalcuParam_input = new TTInfoCalcuParam_input(
  155 +// new DateTime(2016, 8, 1, 0, 0),
  156 +// new DateTime(2016, 8, 10, 0, 0),
  157 +// "1"
  158 +// );
  159 +//
  160 +//
  161 +// TTInfo_input ttInfo_input1 = new TTInfo_input();
  162 +// ttInfo_input1.setTtInfoId("1");
  163 +// ttInfo_input1.setXlId("1");
  164 +// ttInfo_input1.setWeekdays(Arrays.asList(true, true, true, true, true, false, false));
  165 +// ttInfo_input1.getSpecialDays().add(new DateTime(2016, 8, 1, 0, 0));
  166 +// ttInfo_input1.setUpdateDate(new DateTime(2016, 1, 1, 0, 0));
  167 +// ttInfo_input1.setIsEnable(true);
  168 +// ttInfo_input1.setQyDate(new DateTime(2016, 1, 1, 0, 0));
  169 +//
  170 +// TTInfo_input ttInfo_input1_2 = new TTInfo_input();
  171 +// ttInfo_input1_2.setTtInfoId("2");
  172 +// ttInfo_input1_2.setXlId("1");
  173 +// ttInfo_input1_2.setWeekdays(Arrays.asList(true, false, false, false, false, true, false));
  174 +// ttInfo_input1_2.getSpecialDays().add(new DateTime(2016, 8, 11, 0, 0));
  175 +// ttInfo_input1_2.setUpdateDate(new DateTime(2015, 2, 1, 0, 0));
  176 +// ttInfo_input1_2.setIsEnable(true);
  177 +// ttInfo_input1_2.setQyDate(new DateTime(2016, 1, 1, 0, 0));
  178 +//
  179 +//
  180 +// TTInfoCalcuParam_input ttInfoCalcuParam_inpu2 = new TTInfoCalcuParam_input(
  181 +// new DateTime(2016, 8, 1, 0, 0),
  182 +// new DateTime(2016, 8, 10, 0, 0),
  183 +// "2"
  184 +// );
  185 +//
  186 +// TTInfo_input ttInfo_input2 = new TTInfo_input();
  187 +// ttInfo_input2.setTtInfoId("2");
  188 +// ttInfo_input2.setXlId("2");
  189 +// ttInfo_input2.setWeekdays(Arrays.asList(true, false, false, false, false, true, false));
  190 +// ttInfo_input2.getSpecialDays().add(new DateTime(2016, 8, 11, 0, 0));
  191 +// ttInfo_input2.setUpdateDate(new DateTime(2016, 1, 1, 0, 0));
  192 +// ttInfo_input2.setIsEnable(true);
  193 +// ttInfo_input2.setQyDate(new DateTime(2016, 1, 1, 0, 0));
  194 +//
  195 +// session.insert(ttInfoCalcuParam_input);
  196 +// session.insert(ttInfo_input1);
  197 +// session.insert(ttInfo_input1_2);
  198 +// session.insert(ttInfoCalcuParam_inpu2);
  199 +// session.insert(ttInfo_input2);
  200 +//
  201 +//
  202 +//
  203 +// // 3、执行rule
  204 +// session.fireAllRules();
  205 +//
  206 +// // 4、执行完毕销毁,有日志的也要关闭
  207 +// session.dispose();
  208 +//
  209 +// // 打印global结果
  210 +// logger.info(ttInfoResults_output.showTTInfoDesc1());
  211 +//
  212 +// }
  213 +//
  214 +// @Test
  215 +// public void shiftloopDrlTest() throws Exception {
  216 +// // 1、创建session,内部配置的是stateful
  217 +// KieSession session = kieBase.newKieSession();
  218 +//
  219 +// // 1.1 设置gloable对象,在drl中通过别名使用
  220 +// ScheduleResults_output scheduleResults_output = new ScheduleResults_output();
  221 +// session.setGlobal("scheduleResult", scheduleResults_output);
  222 +//
  223 +// // 1.2 可以设置一些监听器,再议
  224 +//
  225 +// // 2、创建fact对象
  226 +//
  227 +// ScheduleCalcuParam_input scheduleCalcuParam_input = new ScheduleCalcuParam_input();
  228 +// scheduleCalcuParam_input.setFromDate(new DateTime(2016, 8, 1, 0, 0));
  229 +// scheduleCalcuParam_input.setToDate(new DateTime(2016, 8, 10, 0, 0));
  230 +//
  231 +// ScheduleRule_input scheduleRule_input1 = new ScheduleRule_input();
  232 +// scheduleRule_input1.setRuleId("1");
  233 +// scheduleRule_input1.setQyrq(new DateTime(2016, 7, 22, 0, 0));
  234 +// scheduleRule_input1.getGuideboardIds().addAll(Arrays.asList(
  235 +// "9", "9" , "8" ,"8" ,"7" ,"7" ,"6" ,"6", "5", "5", "4", "4", "3", "3", "2", "2", "1", "1"));
  236 +// scheduleRule_input1.setStartGbdIndex(3);
  237 +// scheduleRule_input1.getEmployeeConfigIds().addAll(Arrays.asList("1", "2"));
  238 +// scheduleRule_input1.setStartEIndex(1);
  239 +// scheduleRule_input1.setCarConfigId("1");
  240 +//
  241 +//// ScheduleRule_input scheduleRule_input2 = new ScheduleRule_input();
  242 +//// scheduleRule_input2.setRuleId(2L);
  243 +//// scheduleRule_input2.setQyrq(new DateTime(2016, 7, 22, 0, 0));
  244 +//// scheduleRule_input2.getGuideboardIds().addAll(Arrays.asList(
  245 +//// 1L, 1L, 2L, 2L, 3L, 3L, 4L, 4L, 5L, 5L, 6L, 6L, 7L, 7L, 8L, 8L, 9L, 9L, 10L, 10L,
  246 +//// 11L, 11L, 12L, 12L, 13L, 13L));
  247 +//// scheduleRule_input2.setStartGbdIndex(7);
  248 +//// scheduleRule_input2.getEmployeeConfigIds().addAll(Arrays.asList(11L, 12L));
  249 +//// scheduleRule_input2.setStartEIndex(1);
  250 +//// scheduleRule_input2.setCarConfigId(2L);
  251 +//
  252 +// session.insert(scheduleCalcuParam_input);
  253 +// session.insert(scheduleRule_input1);
  254 +//// session.insert(scheduleRule_input2);
  255 +//
  256 +//
  257 +// // 3、执行rule
  258 +// session.fireAllRules();
  259 +//
  260 +// // 4、执行完毕销毁,有日志的也要关闭
  261 +// session.dispose();
  262 +//
  263 +// System.out.println(scheduleResults_output.showGuideboardDesc1());
  264 +//
  265 +// }
  266 +//}
  267 +
... ...
src/test/resources/application-scheduletest.properties
1   -#嵌入式tomcat配置
2   -#server.port=9088
3   -#management.port= 9001
4   -#management.address= 127.0.0.1
5   -
6   -#JPA配置
7   -spring.jpa.hibernate.ddl-auto= update
8   -spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
9   -spring.jpa.database= MYSQL
10   -spring.jpa.show-sql= true
11   -
12   -#数据库连接池配置
13   -spring.datasource.driver-class-name= com.mysql.jdbc.Driver
14   -spring.datasource.url= jdbc:mysql://127.0.0.1/test_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
15   -spring.datasource.username= root
16   -spring.datasource.password=
17   -
18   -#spring.datasource.driver-class-name= org.h2.Driver
19   -#spring.datasource.url= jdbc:h2:mem:bookstore;DB_CLOSE_ON_EXIT=FALSE
20   -#spring.datasource.username= sa
21   -#spring.datasource.password=
22   -
23   -spring.datasource.max-active=100
24   -spring.datasource.max-idle=8
25   -spring.datasource.min-idle=8
26   -spring.datasource.initial-size=5
27   -
28   -spring.datasource.test-on-borrow=true
29   -spring.datasource.test-on-connect=true
30   -spring.datasource.test-on-return=true
31   -spring.datasource.test-while-idle=true
32   -spring.datasource.validation-query=select 1
33   -
  1 +#嵌入式tomcat配置
  2 +#server.port=9088
  3 +#management.port= 9001
  4 +#management.address= 127.0.0.1
  5 +
  6 +#JPA配置
  7 +spring.jpa.hibernate.ddl-auto= update
  8 +spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
  9 +spring.jpa.database= MYSQL
  10 +spring.jpa.show-sql= true
  11 +
  12 +#数据库连接池配置
  13 +spring.datasource.driver-class-name= com.mysql.jdbc.Driver
  14 +spring.datasource.url= jdbc:mysql://127.0.0.1/test_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
  15 +spring.datasource.username= root
  16 +spring.datasource.password=
  17 +
  18 +#spring.datasource.driver-class-name= org.h2.Driver
  19 +#spring.datasource.url= jdbc:h2:mem:bookstore;DB_CLOSE_ON_EXIT=FALSE
  20 +#spring.datasource.username= sa
  21 +#spring.datasource.password=
  22 +
  23 +spring.datasource.max-active=100
  24 +spring.datasource.max-idle=8
  25 +spring.datasource.min-idle=8
  26 +spring.datasource.initial-size=5
  27 +
  28 +spring.datasource.test-on-borrow=true
  29 +spring.datasource.test-on-connect=true
  30 +spring.datasource.test-on-return=true
  31 +spring.datasource.test-while-idle=true
  32 +spring.datasource.validation-query=select 1
  33 +
... ...
src/test/resources/datatools/config-scheduletest.properties
1   -# 配置数据导入导出用到的配置信息
2   -
3   -# 1、kettle配置文件路径(类路径)
4   -datatools.kettle_properties=/datatools/kettle.properties
5   -# 2、ktr文件通用配置变量(数据库连接,根据不同的环境需要修正)
6   -#数据库ip地址
7   -datatools.kvars_dbip=127.0.0.1
8   -#数据库用户名
9   -datatools.kvars_dbuname=root
10   -#数据库密码
11   -datatools.kvars_dbpwd=
12   -#数据库库名
13   -datatools.kvars_dbdname=qp_control
14   -
15   -# 3、上传数据配置信息
16   -# 上传文件目录配置(根据不同的环境需要修正)
17   -datatools.fileupload_dir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files
18   -# ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正)
19   -datatools.trans_errordir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/erroroutput
20   -# 临时输出文件目录
21   -datatools.trans_tempdir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/temp
22   -# 模版文件目录
23   -datatools.trans_templatedir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/template
24   -
25   -##---------------------------- 导入数据ktr ----------------------------##
26   -# 车辆信息导入ktr转换
27   -datatools.cars_datainputktr=/datatools/ktrs/carsDataInput.ktr
28   -# 人员信息导入
29   -datatools.employees_datainputktr=/datatools/ktrs/employeesDataInput.ktr
30   -# 路牌信息导入
31   -datatools.guideboards_datainputktr=/datatools/ktrs/guideboardDataInput.ktr
32   -# 时刻表基础信息导入
33   -datatools.ttinfo_datainputktr=/datatools/ktrs/ttinfoDataInput.ktr
34   -# 时刻表明细信息导入(元数据)
35   -datatools.ttinfodetail_metadatainputktr=/datatools/ktrs/ttinfodetailDataInputMetaData.ktr
36   -# 时刻表明细编辑用数据
37   -datatools.ttinfodetail_foreditktr=/datatools/ktrs/ttinfodetailoutputforedit.ktr
38   -# 时刻表明细信息导入
39   -datatools.ttinfodetail_datainputktr=/datatools/ktrs/ttinfodetailDataInput.ktr
40   -# 时刻表明细信息导入2
41   -datatools.ttinfodetail_datainputktr2=/datatools/ktrs/ttinfodetailDataInput2.ktr
42   -
43   -# 车辆配置信息导入
44   -datatools.carsconfig_datainputktr=/datatools/ktrs/carsConfigDataInput.ktr
45   -# 人员配置信息导入
46   -datatools.employeesconfig_datainputktr=/datatools/ktrs/employeesConfigDataInput.ktr
47   -
48   -# 排版规则信息导入
49   -datatools.schedulerule_datainputktr=/datatools/ktrs/scheduleRuleDataInput.ktr
50   -
51   -# 4、数据导出配置信息
52   -# 导出数据文件目录配置(根据不同的环境需要修正)
53   -datatools.fileoutput_dir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files
54   -
55   -##---------------------------- 导出数据ktr -----------------------------##
56   -# 车辆信息导出ktr转换
57   -datatools.cars_dataoutputktr=/datatools/ktrs/carsDataOutput.ktr
58   -# 人员信息导出ktr转换
59   -datatools.employees_dataoutputktr=/datatools/ktrs/employeesDataOutput.ktr
60   -# 时刻表导出元数据ktr转换
61   -datatools.ttinfodetail_metaoutput=/datatools/ktrs/ttinfodetailDataOutputMetaData.ktr
62   -# 时刻表导出数据ktr转换
63   -datatools.ttinfodetail_output=/datatools/ktrs/ttinfodetailDataOutput.ktr
64   -# 排版规则导出数据ktr转换
65   -datatools.schedulerule_output=/datatools/ktrs/scheduleRuleDataOutput.ktr
66   -
67   -# 车辆配置信息导出ktr转换
68   -datatools.carsconfig_dataoutputktr=/datatools/ktrs/carsConfigDataOutput.ktr
69   -# 人员配置信息导出ktr转换
70   -datatools.employeesconfig_dataoutputktr=/datatools/ktrs/employeesConfigDataOutput.ktr
71   -
72   -# 路牌信息导出
73   -datatools.guideboards_dataoutputktr=/datatools/ktrs/guideboardDataOutput.ktr
74   -
75   -
76   -# TODO:
77   -
78   -
79   -
80   -
81   -
82   -
83   -
84   -
  1 +# 配置数据导入导出用到的配置信息
  2 +
  3 +# 1、kettle配置文件路径(类路径)
  4 +datatools.kettle_properties=/datatools/kettle.properties
  5 +# 2、ktr文件通用配置变量(数据库连接,根据不同的环境需要修正)
  6 +#数据库ip地址
  7 +datatools.kvars_dbip=127.0.0.1
  8 +#数据库用户名
  9 +datatools.kvars_dbuname=root
  10 +#数据库密码
  11 +datatools.kvars_dbpwd=
  12 +#数据库库名
  13 +datatools.kvars_dbdname=qp_control
  14 +
  15 +# 3、上传数据配置信息
  16 +# 上传文件目录配置(根据不同的环境需要修正)
  17 +datatools.fileupload_dir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files
  18 +# ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正)
  19 +datatools.trans_errordir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/erroroutput
  20 +# 临时输出文件目录
  21 +datatools.trans_tempdir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/temp
  22 +# 模版文件目录
  23 +datatools.trans_templatedir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files/template
  24 +
  25 +##---------------------------- 导入数据ktr ----------------------------##
  26 +# 车辆信息导入ktr转换
  27 +datatools.cars_datainputktr=/datatools/ktrs/carsDataInput.ktr
  28 +# 人员信息导入
  29 +datatools.employees_datainputktr=/datatools/ktrs/employeesDataInput.ktr
  30 +# 路牌信息导入
  31 +datatools.guideboards_datainputktr=/datatools/ktrs/guideboardDataInput.ktr
  32 +# 时刻表基础信息导入
  33 +datatools.ttinfo_datainputktr=/datatools/ktrs/ttinfoDataInput.ktr
  34 +# 时刻表明细信息导入(元数据)
  35 +datatools.ttinfodetail_metadatainputktr=/datatools/ktrs/ttinfodetailDataInputMetaData.ktr
  36 +# 时刻表明细编辑用数据
  37 +datatools.ttinfodetail_foreditktr=/datatools/ktrs/ttinfodetailoutputforedit.ktr
  38 +# 时刻表明细信息导入
  39 +datatools.ttinfodetail_datainputktr=/datatools/ktrs/ttinfodetailDataInput.ktr
  40 +# 时刻表明细信息导入2
  41 +datatools.ttinfodetail_datainputktr2=/datatools/ktrs/ttinfodetailDataInput2.ktr
  42 +
  43 +# 车辆配置信息导入
  44 +datatools.carsconfig_datainputktr=/datatools/ktrs/carsConfigDataInput.ktr
  45 +# 人员配置信息导入
  46 +datatools.employeesconfig_datainputktr=/datatools/ktrs/employeesConfigDataInput.ktr
  47 +
  48 +# 排版规则信息导入
  49 +datatools.schedulerule_datainputktr=/datatools/ktrs/scheduleRuleDataInput.ktr
  50 +
  51 +# 4、数据导出配置信息
  52 +# 导出数据文件目录配置(根据不同的环境需要修正)
  53 +datatools.fileoutput_dir=/Users/xu/resource/project_code/runtime_temp/bsth_control_u_d_files
  54 +
  55 +##---------------------------- 导出数据ktr -----------------------------##
  56 +# 车辆信息导出ktr转换
  57 +datatools.cars_dataoutputktr=/datatools/ktrs/carsDataOutput.ktr
  58 +# 人员信息导出ktr转换
  59 +datatools.employees_dataoutputktr=/datatools/ktrs/employeesDataOutput.ktr
  60 +# 时刻表导出元数据ktr转换
  61 +datatools.ttinfodetail_metaoutput=/datatools/ktrs/ttinfodetailDataOutputMetaData.ktr
  62 +# 时刻表导出数据ktr转换
  63 +datatools.ttinfodetail_output=/datatools/ktrs/ttinfodetailDataOutput.ktr
  64 +# 排版规则导出数据ktr转换
  65 +datatools.schedulerule_output=/datatools/ktrs/scheduleRuleDataOutput.ktr
  66 +
  67 +# 车辆配置信息导出ktr转换
  68 +datatools.carsconfig_dataoutputktr=/datatools/ktrs/carsConfigDataOutput.ktr
  69 +# 人员配置信息导出ktr转换
  70 +datatools.employeesconfig_dataoutputktr=/datatools/ktrs/employeesConfigDataOutput.ktr
  71 +
  72 +# 路牌信息导出
  73 +datatools.guideboards_dataoutputktr=/datatools/ktrs/guideboardDataOutput.ktr
  74 +
  75 +
  76 +# TODO:
  77 +
  78 +
  79 +
  80 +
  81 +
  82 +
  83 +
  84 +
... ...
src/test/resources/testdata/d1.xml
1   -<?xml version='1.0' encoding='UTF-8'?>
2   -<dataset>
3   - <!-- 用户数据 -->
4   - <bsth_c_sys_user id="1" user_name="admin" name="系统管理员" create_date="2000-01-01" enabled="1" last_login_date="2000-01-01" />
5   -
  1 +<?xml version='1.0' encoding='UTF-8'?>
  2 +<dataset>
  3 + <!-- 用户数据 -->
  4 + <bsth_c_sys_user id="1" user_name="admin" name="系统管理员" create_date="2000-01-01" enabled="1" last_login_date="2000-01-01" />
  5 +
6 6 </dataset>
7 7 \ No newline at end of file
... ...