Commit e4fbf7eb96acc36ddd93968a69be77051bc444e5

Authored by 潘钊
2 parents 1fccb1ce 136a8f3a

Merge branch 'minhang' into pudong

# Conflicts:
#	src/main/resources/static/real_control_v2/assets/plugins/layer3.0.3/layer.js
Showing 29 changed files with 1173 additions and 796 deletions
src/main/java/com/bsth/XDApplication.java
@@ -6,6 +6,7 @@ import com.bsth.data.car_out_info.UpdateDBThread; @@ -6,6 +6,7 @@ import com.bsth.data.car_out_info.UpdateDBThread;
6 import com.bsth.data.directive.DirectivesPstThread; 6 import com.bsth.data.directive.DirectivesPstThread;
7 import com.bsth.data.gpsdata.thread.GpsDataLoaderThread; 7 import com.bsth.data.gpsdata.thread.GpsDataLoaderThread;
8 import com.bsth.data.gpsdata.thread.OfflineMonitorThread; 8 import com.bsth.data.gpsdata.thread.OfflineMonitorThread;
  9 +import com.bsth.data.schedule.edit_logs.SeiPstThread;
9 import com.bsth.data.schedule.late_adjust.ScheduleLateThread; 10 import com.bsth.data.schedule.late_adjust.ScheduleLateThread;
10 import com.bsth.data.schedule.thread.CalcOilThread; 11 import com.bsth.data.schedule.thread.CalcOilThread;
11 import com.bsth.data.schedule.thread.SchedulePstThread; 12 import com.bsth.data.schedule.thread.SchedulePstThread;
@@ -53,6 +54,8 @@ public class XDApplication implements CommandLineRunner { @@ -53,6 +54,8 @@ public class XDApplication implements CommandLineRunner {
53 DirectivesPstThread directivesPstThread; 54 DirectivesPstThread directivesPstThread;
54 @Autowired 55 @Autowired
55 ThreadMonotor threadMonotor; 56 ThreadMonotor threadMonotor;
  57 + @Autowired
  58 + SeiPstThread seiPstThread;
56 59
57 private static long timeDiff; 60 private static long timeDiff;
58 61
@@ -93,6 +96,8 @@ public class XDApplication implements CommandLineRunner { @@ -93,6 +96,8 @@ public class XDApplication implements CommandLineRunner {
93 //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); 96 //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
94 //实际排班延迟入库线程 97 //实际排班延迟入库线程
95 //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS); 98 //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS);
  99 + //班次修正日志延迟入库
  100 + //sexec.scheduleWithFixedDelay(seiPstThread, 60, 60, TimeUnit.SECONDS);
96 101
97 //线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作) 102 //线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作)
98 //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS); 103 //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS);
@@ -107,10 +112,12 @@ public class XDApplication implements CommandLineRunner { @@ -107,10 +112,12 @@ public class XDApplication implements CommandLineRunner {
107 sexec.scheduleWithFixedDelay(gpsDataLoader, 30, 2, TimeUnit.SECONDS); 112 sexec.scheduleWithFixedDelay(gpsDataLoader, 30, 2, TimeUnit.SECONDS);
108 //GPS设备掉离线 113 //GPS设备掉离线
109 sexec.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS); 114 sexec.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS);
110 - //实际排班更新线程 115 + //班次更新线程
111 sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); 116 sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
112 - //实际排班延迟入库线程 117 + //班次延迟入库线程
113 sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS); 118 sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS);
  119 + //班次修正日志延迟入库
  120 + sexec.scheduleWithFixedDelay(seiPstThread, 60, 60, TimeUnit.SECONDS);
114 //检查班次误点 121 //检查班次误点
115 sexec.scheduleWithFixedDelay(scheduleLateThread, 60, 30, TimeUnit.SECONDS); 122 sexec.scheduleWithFixedDelay(scheduleLateThread, 60, 30, TimeUnit.SECONDS);
116 //调度指令延迟入库 123 //调度指令延迟入库
src/main/java/com/bsth/controller/schedule/core/TTInfoDetailController.java
@@ -4,6 +4,7 @@ import com.bsth.common.ResponseCode; @@ -4,6 +4,7 @@ import com.bsth.common.ResponseCode;
4 import com.bsth.controller.schedule.BController; 4 import com.bsth.controller.schedule.BController;
5 import com.bsth.entity.schedule.TTInfoDetail; 5 import com.bsth.entity.schedule.TTInfoDetail;
6 import com.bsth.service.schedule.TTInfoDetailService; 6 import com.bsth.service.schedule.TTInfoDetailService;
  7 +import com.bsth.service.schedule.datatools.TTInfoDetailForEdit;
7 import org.springframework.beans.factory.annotation.Autowired; 8 import org.springframework.beans.factory.annotation.Autowired;
8 import org.springframework.web.bind.annotation.*; 9 import org.springframework.web.bind.annotation.*;
9 10
@@ -73,9 +74,13 @@ public class TTInfoDetailController extends BController<TTInfoDetail, Long> { @@ -73,9 +74,13 @@ public class TTInfoDetailController extends BController<TTInfoDetail, Long> {
73 @RequestMapping(value = "/edit/{xlid}/{ttid}", method = RequestMethod.GET) 74 @RequestMapping(value = "/edit/{xlid}/{ttid}", method = RequestMethod.GET)
74 public Map<String, Object> getEditInfo(@PathVariable("xlid") Integer xlid, 75 public Map<String, Object> getEditInfo(@PathVariable("xlid") Integer xlid,
75 @PathVariable("ttid") Long ttid) { 76 @PathVariable("ttid") Long ttid) {
  77 +
  78 + // 获取最大的发车数,用于输出数据的数量
  79 + Long maxfcno = ttInfoDetailService.findMaxFcno(xlid, ttid);
  80 +
76 Map<String, Object> rtn = new HashMap<>(); 81 Map<String, Object> rtn = new HashMap<>();
77 try { 82 try {
78 - TTInfoDetailService.EditInfo editInfo = ttInfoDetailService.getEditInfo(xlid, ttid); 83 + TTInfoDetailForEdit.EditInfo editInfo = ttInfoDetailService.getEditInfo(xlid, ttid, maxfcno);
79 rtn.put("status", ResponseCode.SUCCESS); 84 rtn.put("status", ResponseCode.SUCCESS);
80 rtn.put("data", editInfo); 85 rtn.put("data", editInfo);
81 } catch (Exception exp) { 86 } catch (Exception exp) {
src/main/java/com/bsth/data/safe_driv/SafeDrivCenter.java
1 package com.bsth.data.safe_driv; 1 package com.bsth.data.safe_driv;
2 2
3 -import com.bsth.Application;  
4 import com.bsth.websocket.handler.SendUtils; 3 import com.bsth.websocket.handler.SendUtils;
5 import org.joda.time.format.DateTimeFormat; 4 import org.joda.time.format.DateTimeFormat;
6 import org.joda.time.format.DateTimeFormatter; 5 import org.joda.time.format.DateTimeFormatter;
@@ -15,7 +14,6 @@ import java.util.HashMap; @@ -15,7 +14,6 @@ import java.util.HashMap;
15 import java.util.HashSet; 14 import java.util.HashSet;
16 import java.util.Map; 15 import java.util.Map;
17 import java.util.Set; 16 import java.util.Set;
18 -import java.util.concurrent.TimeUnit;  
19 17
20 /** 18 /**
21 * 安全驾驶 19 * 安全驾驶
@@ -69,7 +67,7 @@ public class SafeDrivCenter implements CommandLineRunner,ApplicationContextAware @@ -69,7 +67,7 @@ public class SafeDrivCenter implements CommandLineRunner,ApplicationContextAware
69 @Override 67 @Override
70 public void run(String... strings) throws Exception { 68 public void run(String... strings) throws Exception {
71 //定时加载安全驾驶数据 69 //定时加载安全驾驶数据
72 - Application.mainServices.scheduleWithFixedDelay(safeDrivDataLoadThread, 60, 7, TimeUnit.SECONDS); 70 + //Application.mainServices.scheduleWithFixedDelay(safeDrivDataLoadThread, 80, 7, TimeUnit.SECONDS);
73 } 71 }
74 72
75 @Override 73 @Override
src/main/java/com/bsth/data/schedule/edit_logs/FormLogger.java
1 -package com.bsth.data.schedule.edit_logs;  
2 -  
3 -import com.bsth.controller.realcontrol.dto.ChangePersonCar;  
4 -import com.bsth.entity.mcy_forms.Changetochange;  
5 -import com.bsth.entity.realcontrol.ScheduleRealInfo;  
6 -import com.bsth.entity.sys.SysUser;  
7 -import com.bsth.repository.form.ChangetochangeRepository;  
8 -import com.bsth.security.util.SecurityUtils;  
9 -import org.apache.commons.lang3.StringUtils;  
10 -import org.joda.time.format.DateTimeFormat;  
11 -import org.joda.time.format.DateTimeFormatter;  
12 -import org.slf4j.Logger;  
13 -import org.slf4j.LoggerFactory;  
14 -import org.springframework.beans.factory.annotation.Autowired;  
15 -import org.springframework.stereotype.Service;  
16 -  
17 -import java.util.Date;  
18 -  
19 -/**  
20 - * 为报表写入相关的班次修改记录  
21 - * Created by panzhao on 2017/5/7.  
22 - */  
23 -@Service  
24 -public class FormLogger {  
25 -  
26 - private static DateTimeFormatter fmtHHmm = DateTimeFormat.forPattern("HH:mm");  
27 -  
28 - Logger log = LoggerFactory.getLogger(this.getClass());  
29 -  
30 - @Autowired  
31 - ChangetochangeRepository changetochangeRepository;  
32 -  
33 - /**  
34 - * 换人换车情况表  
35 - */  
36 - public void saveChangetochange(ScheduleRealInfo sch, ChangePersonCar cpc){  
37 - try {  
38 - String newNbbm = cpc.getClZbh();  
39 - String newJsy = cpc.getJsy();  
40 - String oldJsy = sch.getjGh()+"/"+sch.getjName();  
41 -  
42 - if(newNbbm == null && newJsy == null)  
43 - return;  
44 -  
45 - if(newNbbm != null && newJsy != null  
46 - && newNbbm.equals(sch.getClZbh()) && newJsy.equals(oldJsy))  
47 - return;  
48 -  
49 - Date d = new Date();  
50 - SysUser user = SecurityUtils.getCurrentUser();  
51 - Changetochange cc = new Changetochange();  
52 - cc.setRq(sch.getScheduleDateStr());  
53 - cc.setGs(sch.getGsBm());  
54 - cc.setFgs(sch.getFgsBm());  
55 - cc.setXl(sch.getXlBm());  
56 - cc.setLp(sch.getLpName());  
57 - cc.setFssj(fmtHHmm.print(d.getTime()));  
58 - cc.setXgsj(fmtHHmm.print(d.getTime()));  
59 - if(user != null)  
60 - cc.setXgr(user.getUserName());  
61 -  
62 - cc.setPcch(sch.getClZbh());  
63 - cc.setPcry(oldJsy);  
64 - cc.setJhch(sch.getClZbh());  
65 - cc.setJhgh(sch.getjGh());  
66 -  
67 - if(StringUtils.isNotEmpty(newNbbm))  
68 - cc.setSjch(newNbbm);  
69 - if(StringUtils.isNotEmpty(newJsy))  
70 - cc.setSjgh(newJsy);  
71 -  
72 - changetochangeRepository.save(cc);  
73 - }catch (Exception e){  
74 - log.error("纪录换人换车情况表", e);  
75 - }  
76 - }  
77 -  
78 - public void saveChangetochange(ScheduleRealInfo sch, String nbbm, String jsy){  
79 - ChangePersonCar cpc = new ChangePersonCar();  
80 - cpc.setClZbh(nbbm);  
81 - cpc.setJsy(jsy);  
82 - saveChangetochange(sch, cpc);  
83 - }  
84 -} 1 +package com.bsth.data.schedule.edit_logs;
  2 +
  3 +import com.bsth.controller.realcontrol.dto.ChangePersonCar;
  4 +import com.bsth.entity.mcy_forms.Changetochange;
  5 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  6 +import com.bsth.entity.sys.SysUser;
  7 +import com.bsth.repository.form.ChangetochangeRepository;
  8 +import com.bsth.security.util.SecurityUtils;
  9 +import org.apache.commons.lang3.StringUtils;
  10 +import org.joda.time.format.DateTimeFormat;
  11 +import org.joda.time.format.DateTimeFormatter;
  12 +import org.slf4j.Logger;
  13 +import org.slf4j.LoggerFactory;
  14 +import org.springframework.beans.factory.annotation.Autowired;
  15 +import org.springframework.stereotype.Service;
  16 +
  17 +import java.util.Date;
  18 +
  19 +/**
  20 + * 为报表写入相关的班次修改记录
  21 + * Created by panzhao on 2017/5/7.
  22 + */
  23 +@Service
  24 +public class FormLogger {
  25 +
  26 + private static DateTimeFormatter fmtHHmm = DateTimeFormat.forPattern("HH:mm");
  27 +
  28 + Logger log = LoggerFactory.getLogger(this.getClass());
  29 +
  30 + @Autowired
  31 + ChangetochangeRepository changetochangeRepository;
  32 +
  33 + /**
  34 + * 换人换车情况表
  35 + */
  36 + public void saveChangetochange(ScheduleRealInfo sch, ChangePersonCar cpc){
  37 + try {
  38 + String newNbbm = cpc.getClZbh();
  39 + String newJsy = cpc.getJsy();
  40 + String oldJsy = sch.getjGh()+"/"+sch.getjName();
  41 +
  42 + if(newNbbm == null && newJsy == null)
  43 + return;
  44 +
  45 + if(newNbbm != null && newJsy != null
  46 + && newNbbm.equals(sch.getClZbh()) && newJsy.equals(oldJsy))
  47 + return;
  48 +
  49 + Date d = new Date();
  50 + SysUser user = SecurityUtils.getCurrentUser();
  51 + Changetochange cc = new Changetochange();
  52 + cc.setRq(sch.getScheduleDateStr());
  53 + cc.setGs(sch.getGsBm());
  54 + cc.setFgs(sch.getFgsBm());
  55 + cc.setXl(sch.getXlBm());
  56 + cc.setLp(sch.getLpName());
  57 + cc.setFssj(fmtHHmm.print(d.getTime()));
  58 + cc.setXgsj(fmtHHmm.print(d.getTime()));
  59 + if(user != null)
  60 + cc.setXgr(user.getUserName());
  61 +
  62 + cc.setPcch(sch.getClZbh());
  63 + cc.setPcry(oldJsy);
  64 + cc.setJhch(sch.getClZbh());
  65 + cc.setJhgh(sch.getjGh());
  66 +
  67 + if(StringUtils.isNotEmpty(newNbbm))
  68 + cc.setSjch(newNbbm);
  69 + if(StringUtils.isNotEmpty(newJsy))
  70 + cc.setSjgh(newJsy);
  71 +
  72 + changetochangeRepository.save(cc);
  73 + }catch (Exception e){
  74 + log.error("纪录换人换车情况表", e);
  75 + }
  76 + }
  77 +
  78 + public void saveChangetochange(ScheduleRealInfo sch, String nbbm, String jsy){
  79 + ChangePersonCar cpc = new ChangePersonCar();
  80 + cpc.setClZbh(nbbm);
  81 + cpc.setJsy(jsy);
  82 + saveChangetochange(sch, cpc);
  83 + }
  84 +}
src/main/java/com/bsth/data/schedule/edit_logs/ScheduleModifyLogger.java
1 package com.bsth.data.schedule.edit_logs; 1 package com.bsth.data.schedule.edit_logs;
2 2
  3 +import com.alibaba.fastjson.JSONArray;
  4 +import com.alibaba.fastjson.JSONObject;
  5 +import com.bsth.data.schedule.edit_logs.entity.EditType;
  6 +import com.bsth.data.schedule.edit_logs.entity.SchEditInfo;
  7 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  8 +import org.slf4j.Logger;
  9 +import org.slf4j.LoggerFactory;
  10 +
  11 +import java.util.LinkedList;
  12 +
3 /** 13 /**
4 * 班次修正记录 14 * 班次修正记录
5 * Created by panzhao on 2017/5/16. 15 * Created by panzhao on 2017/5/16.
6 */ 16 */
7 public class ScheduleModifyLogger { 17 public class ScheduleModifyLogger {
8 18
  19 + public static LinkedList<SchEditInfo> list;
  20 +
  21 + static {
  22 + list = new LinkedList<>();
  23 + }
  24 +
  25 + static Logger log = LoggerFactory.getLogger(ScheduleModifyLogger.class);
  26 +
9 /** 27 /**
10 * 待发调整 28 * 待发调整
  29 + * opType 0: 双击调整、 1:待发调整、2:批量待发调整、3:间隔调整
11 */ 30 */
12 - public static void dftz(Long id, String remarks, String dfsj, String bcType, String opType){ 31 + public static void dftz(ScheduleRealInfo sch, String opType, String oldDfsj, String nowDfsj, String remarks){
  32 + try {
  33 + if(oldDfsj.equals(nowDfsj))
  34 + return;
  35 +
  36 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  37 + sei.setType(EditType.DFTZ);
  38 + sei.setType2(opType);
  39 + sei.setRemarks(remarks==null?"":remarks);
  40 +
  41 + //detail
  42 + JSONObject jobj = new JSONObject();
  43 + jobj.put("old", oldDfsj);
  44 + jobj.put("now", nowDfsj);
  45 +
  46 + sei.setJsonArray(jobj.toJSONString());
  47 +
  48 + put(sei);
  49 + }catch (Exception e){
  50 + log.error("", e);
  51 + }
  52 + }
  53 +
  54 + /**
  55 + * 发车信息微调记录器
  56 + */
  57 + public static void fcxxwt(ScheduleRealInfo sch, String remarks, JSONArray jsonArray){
  58 +
  59 + try {
  60 + if(jsonArray == null || jsonArray.size() == 0)
  61 + return;
  62 +
  63 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  64 + sei.setRemarks(remarks);
  65 + sei.setJsonArray(jsonArray.toJSONString());
  66 + sei.setType(EditType.FCXXWT);
  67 +
  68 + put(sei);
  69 + }catch (Exception e){
  70 + log.error("", e);
  71 + }
  72 + }
  73 +
  74 + /**
  75 + * 计划烂班
  76 + * @param remarks
  77 + */
  78 + public static void jhlb(ScheduleRealInfo sch, String remarks){
  79 + try {
  80 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  81 + sei.setRemarks(remarks);
  82 + sei.setType(EditType.JHLB);
  83 +
  84 + put(sei);
  85 + }catch (Exception e){
  86 + log.error("", e);
  87 + }
  88 + }
13 89
  90 + public static void put(SchEditInfo sei){
  91 + list.add(sei);
14 } 92 }
15 } 93 }
16 \ No newline at end of file 94 \ No newline at end of file
src/main/java/com/bsth/data/schedule/edit_logs/SeiPstThread.java 0 → 100644
  1 +package com.bsth.data.schedule.edit_logs;
  2 +
  3 +import com.bsth.data.schedule.edit_logs.entity.SchEditInfo;
  4 +import com.bsth.data.schedule.edit_logs.repository.EditInfoRepository;
  5 +import org.slf4j.Logger;
  6 +import org.slf4j.LoggerFactory;
  7 +import org.springframework.beans.factory.annotation.Autowired;
  8 +import org.springframework.stereotype.Component;
  9 +
  10 +import java.util.LinkedList;
  11 +
  12 +/**
  13 + * 班次修正日志入库
  14 + * Created by panzhao on 2017/5/19.
  15 + */
  16 +@Component
  17 +public class SeiPstThread extends Thread{
  18 +
  19 + @Autowired
  20 + EditInfoRepository repository;
  21 +
  22 + Logger log = LoggerFactory.getLogger(this.getClass());
  23 +
  24 + @Override
  25 + public void run() {
  26 + try{
  27 + LinkedList<SchEditInfo> list = ScheduleModifyLogger.list;
  28 + SchEditInfo sei;
  29 + for(int i = 0; i < 1000; i ++){
  30 + sei = list.poll();
  31 + if(sei == null)
  32 + break;
  33 + else{
  34 + repository.save(sei);
  35 + }
  36 + }
  37 + }catch (Exception e){
  38 + log.error("", e);
  39 + }
  40 + }
  41 +}
src/main/java/com/bsth/data/schedule/edit_logs/entity/EditType.java 0 → 100644
  1 +package com.bsth.data.schedule.edit_logs.entity;
  2 +
  3 +/**
  4 + * Created by panzhao on 2017/5/18.
  5 + */
  6 +public enum EditType {
  7 +
  8 + DFTZ,SFTZ,FCXXWT,TZRC,LPDD,ZRW,JHLB
  9 +}
src/main/java/com/bsth/data/schedule/edit_logs/entity/SchEditInfo.java 0 → 100644
  1 +package com.bsth.data.schedule.edit_logs.entity;
  2 +
  3 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  4 +import com.bsth.entity.sys.SysUser;
  5 +import com.bsth.security.util.SecurityUtils;
  6 +import org.joda.time.format.DateTimeFormat;
  7 +import org.joda.time.format.DateTimeFormatter;
  8 +
  9 +import javax.persistence.*;
  10 +
  11 +/**
  12 + * Created by panzhao on 2017/5/18.
  13 + */
  14 +@Entity
  15 +@Table(name = "logger_sch_modify")
  16 +public class SchEditInfo {
  17 +
  18 + @Id
  19 + @GeneratedValue
  20 + private long id;
  21 + /**
  22 + * 日期 yyyy-MM-dd
  23 + */
  24 + private String rq;
  25 +
  26 + /**
  27 + * 时间 HH:mm
  28 + */
  29 + private String timeStr;
  30 +
  31 + private String lineCode;
  32 +
  33 + private String gsbm;
  34 +
  35 + private String fgsbm;
  36 +
  37 + /**
  38 + * 班次ID
  39 + */
  40 + private long schId;
  41 +
  42 + /**
  43 + * 类型
  44 + */
  45 + @Enumerated(EnumType.STRING)
  46 + private EditType type;
  47 +
  48 + private String type2;
  49 + /**
  50 + * 操作人 @system 系统/用户名
  51 + */
  52 + private String user;
  53 +
  54 + /**
  55 + * 操作明细
  56 + */
  57 + @Column(length = 2000)
  58 + private String jsonArray;
  59 +
  60 + private String remarks;
  61 +
  62 + public String getRq() {
  63 + return rq;
  64 + }
  65 +
  66 + public void setRq(String rq) {
  67 + this.rq = rq;
  68 + }
  69 +
  70 + public String getTimeStr() {
  71 + return timeStr;
  72 + }
  73 +
  74 + public void setTimeStr(String timeStr) {
  75 + this.timeStr = timeStr;
  76 + }
  77 +
  78 + public long getSchId() {
  79 + return schId;
  80 + }
  81 +
  82 + public void setSchId(long schId) {
  83 + this.schId = schId;
  84 + }
  85 +
  86 + public EditType getType() {
  87 + return type;
  88 + }
  89 +
  90 + public void setType(EditType type) {
  91 + this.type = type;
  92 + }
  93 +
  94 + public String getUser() {
  95 + return user;
  96 + }
  97 +
  98 + public void setUser(String user) {
  99 + this.user = user;
  100 + }
  101 +
  102 + public long getId() {
  103 + return id;
  104 + }
  105 +
  106 + public void setId(long id) {
  107 + this.id = id;
  108 + }
  109 +
  110 + public String getJsonArray() {
  111 + return jsonArray;
  112 + }
  113 +
  114 + public void setJsonArray(String jsonArray) {
  115 + this.jsonArray = jsonArray;
  116 + }
  117 +
  118 + public String getType2() {
  119 + return type2;
  120 + }
  121 +
  122 + public void setType2(String type2) {
  123 + this.type2 = type2;
  124 + }
  125 +
  126 + public String getRemarks() {
  127 + return remarks;
  128 + }
  129 +
  130 + public void setRemarks(String remarks) {
  131 + this.remarks = remarks;
  132 + }
  133 +
  134 +
  135 + @Transient
  136 + private static DateTimeFormatter fmtHHmm = DateTimeFormat.forPattern("HH:mm");
  137 + @Transient
  138 + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd");
  139 + public static SchEditInfo getInstance(ScheduleRealInfo sch){
  140 + SchEditInfo sei = new SchEditInfo();
  141 + long t = System.currentTimeMillis();
  142 +
  143 + sei.setRq(fmtyyyyMMdd.print(t));
  144 + sei.setTimeStr(fmtHHmm.print(t));
  145 +
  146 + SysUser user = SecurityUtils.getCurrentUser();
  147 + if(user != null)
  148 + sei.setUser(user.getUserName());
  149 +
  150 + if(sch != null){
  151 + sei.setSchId(sch.getId());
  152 + sei.setLineCode(sch.getXlBm());
  153 + sei.setGsbm(sch.getGsBm());
  154 + sei.setFgsbm(sch.getFgsBm());
  155 + }
  156 + return sei;
  157 + }
  158 +
  159 + public String getLineCode() {
  160 + return lineCode;
  161 + }
  162 +
  163 + public void setLineCode(String lineCode) {
  164 + this.lineCode = lineCode;
  165 + }
  166 +
  167 + public String getGsbm() {
  168 + return gsbm;
  169 + }
  170 +
  171 + public void setGsbm(String gsbm) {
  172 + this.gsbm = gsbm;
  173 + }
  174 +
  175 + public String getFgsbm() {
  176 + return fgsbm;
  177 + }
  178 +
  179 + public void setFgsbm(String fgsbm) {
  180 + this.fgsbm = fgsbm;
  181 + }
  182 +}
src/main/java/com/bsth/data/schedule/edit_logs/loggers/FcxxwtLogger.java 0 → 100644
  1 +package com.bsth.data.schedule.edit_logs.loggers;
  2 +
  3 +import com.alibaba.fastjson.JSONArray;
  4 +import com.alibaba.fastjson.JSONObject;
  5 +import com.bsth.data.schedule.edit_logs.ScheduleModifyLogger;
  6 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  7 +import org.slf4j.Logger;
  8 +import org.slf4j.LoggerFactory;
  9 +
  10 +/**
  11 + * 发车信息微调记录
  12 + * Created by panzhao on 2017/5/19.
  13 + */
  14 +public class FcxxwtLogger {
  15 +
  16 + static Logger log = LoggerFactory.getLogger(FcxxwtLogger.class);
  17 +
  18 + private JSONArray jsonArray = new JSONArray();
  19 + private String remarks;
  20 + private ScheduleRealInfo sch;
  21 +
  22 + public void log(String title, Object old, Object now){
  23 + try {
  24 +
  25 + JSONObject jsonObject = new JSONObject();
  26 + jsonObject.put("title", title);
  27 + jsonObject.put("old", old);
  28 + jsonObject.put("now", now);
  29 +
  30 + jsonArray.add(jsonObject);
  31 + }catch (Exception e){
  32 + log.error("", e);
  33 + }
  34 + }
  35 +
  36 + public void log(String text){
  37 + try {
  38 + JSONObject jsonObject = new JSONObject();
  39 + jsonObject.put("title", text);
  40 +
  41 + jsonArray.add(jsonObject);
  42 + }catch (Exception e){
  43 + log.error("", e);
  44 + }
  45 + }
  46 +
  47 + public static FcxxwtLogger start(ScheduleRealInfo sch, String remarks){
  48 + FcxxwtLogger fLog = new FcxxwtLogger();
  49 + fLog.setSch(sch);
  50 + fLog.setRemarks(remarks);
  51 + return fLog;
  52 + }
  53 +
  54 + public void end(){
  55 + ScheduleModifyLogger.fcxxwt(sch, this.remarks, jsonArray);
  56 + }
  57 +
  58 + public String getRemarks() {
  59 + return remarks;
  60 + }
  61 +
  62 + public void setRemarks(String remarks) {
  63 + this.remarks = remarks;
  64 + }
  65 +
  66 + public ScheduleRealInfo getSch() {
  67 + return sch;
  68 + }
  69 +
  70 + public void setSch(ScheduleRealInfo sch) {
  71 + this.sch = sch;
  72 + }
  73 +}
src/main/java/com/bsth/data/schedule/edit_logs/repository/EditInfoRepository.java 0 → 100644
  1 +package com.bsth.data.schedule.edit_logs.repository;
  2 +
  3 +import com.bsth.data.schedule.edit_logs.entity.SchEditInfo;
  4 +import com.bsth.repository.BaseRepository;
  5 +import org.springframework.stereotype.Repository;
  6 +
  7 +/**
  8 + * Created by panzhao on 2017/5/19.
  9 + */
  10 +@Repository
  11 +public interface EditInfoRepository extends BaseRepository<SchEditInfo, Long>{
  12 +}
src/main/java/com/bsth/service/oil/impl/YlbServiceImpl.java
@@ -1016,18 +1016,21 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -1016,18 +1016,21 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1016 if(nbbm.trim()!=""){ 1016 if(nbbm.trim()!=""){
1017 stringList.add(nbbm); 1017 stringList.add(nbbm);
1018 List<Object[]> objectLists=repository.checkNbmmNum(rq, gsbm, fgsbm, xlbm,nbbm); 1018 List<Object[]> objectLists=repository.checkNbmmNum(rq, gsbm, fgsbm, xlbm,nbbm);
1019 - int cs=Integer.parseInt(objectLists.get(0)[1].toString());  
1020 - if(sxtj.equals("1")){  
1021 - if(cs==1){ 1019 + if(objectLists.size()>0){
  1020 + int cs=Integer.parseInt(objectLists.get(0)[1].toString());
  1021 + if(sxtj.equals("1")){
  1022 + if(cs==1){
  1023 + listYlb=repository.listYlb(rq, gsbm, fgsbm, xlbm, stringList);
  1024 + }
  1025 + }else if(sxtj.equals("2")){
  1026 + if(cs>1){
  1027 + listYlb=repository.listYlb(rq, gsbm, fgsbm, xlbm, stringList);
  1028 + }
  1029 + }else{
1022 listYlb=repository.listYlb(rq, gsbm, fgsbm, xlbm, stringList); 1030 listYlb=repository.listYlb(rq, gsbm, fgsbm, xlbm, stringList);
1023 } 1031 }
1024 } 1032 }
1025 1033
1026 - if(sxtj.equals("2")){  
1027 - if(cs>1){  
1028 - listYlb=repository.listYlb(rq, gsbm, fgsbm, xlbm, stringList);  
1029 - }  
1030 - }  
1031 }else{ 1034 }else{
1032 //全部 1035 //全部
1033 if(sxtj.equals("0")){ 1036 if(sxtj.equals("0")){
@@ -1248,17 +1251,18 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS @@ -1248,17 +1251,18 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1248 if(zlc>0){ 1251 if(zlc>0){
1249 long l=0l; 1252 long l=0l;
1250 double ylxs=0.0; 1253 double ylxs=0.0;
1251 - if(i==iterator2.size()){ 1254 + if(i==iterator2.size()-1){
1252 ylxs=czyl; 1255 ylxs=czyl;
1253 }else{ 1256 }else{
1254 l=Math.round(nextJzyl); 1257 l=Math.round(nextJzyl);
1255 ylxs=l*100/100; 1258 ylxs=l*100/100;
1256 } 1259 }
1257 -// nextJzyl = Arith.add(nextJzyl,Arith.sub(nextJzyl,ylxs));  
1258 yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl)); 1260 yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl));
1259 t.setYh(yh); 1261 t.setYh(yh);
1260 t.setJzyl(ylxs); 1262 t.setJzyl(ylxs);
1261 nextJzyl=ylxs; 1263 nextJzyl=ylxs;
  1264 +
  1265 +
1262 }else{ 1266 }else{
1263 t.setYh(yh); 1267 t.setYh(yh);
1264 t.setJzyl(nextJzyl); 1268 t.setJzyl(nextJzyl);
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
@@ -15,6 +15,8 @@ import com.bsth.data.schedule.DayOfSchedule; @@ -15,6 +15,8 @@ import com.bsth.data.schedule.DayOfSchedule;
15 import com.bsth.data.schedule.SchAttrCalculator; 15 import com.bsth.data.schedule.SchAttrCalculator;
16 import com.bsth.data.schedule.edit_logs.FormLogger; 16 import com.bsth.data.schedule.edit_logs.FormLogger;
17 import com.bsth.data.schedule.ScheduleComparator; 17 import com.bsth.data.schedule.ScheduleComparator;
  18 +import com.bsth.data.schedule.edit_logs.ScheduleModifyLogger;
  19 +import com.bsth.data.schedule.edit_logs.loggers.FcxxwtLogger;
18 import com.bsth.data.schedule.late_adjust.LateAdjustHandle; 20 import com.bsth.data.schedule.late_adjust.LateAdjustHandle;
19 import com.bsth.entity.Cars; 21 import com.bsth.entity.Cars;
20 import com.bsth.entity.Line; 22 import com.bsth.entity.Line;
@@ -221,6 +223,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -221,6 +223,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
221 schedule.setRealExecDate(schedule.getScheduleDateStr()); 223 schedule.setRealExecDate(schedule.getScheduleDateStr());
222 } 224 }
223 225
  226 + //记录日志
  227 + ScheduleModifyLogger.dftz(schedule,opType, schedule.getDfsj(),dfsj,remarks);
  228 +
224 schedule.setDfsjAll(dfsj); 229 schedule.setDfsjAll(dfsj);
225 schedule.setDfAuto(false); 230 schedule.setDfAuto(false);
226 schedule.addRemarks(remarks); 231 schedule.addRemarks(remarks);
@@ -276,6 +281,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -276,6 +281,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
276 map.put("msg", "不必要的重复烂班!"); 281 map.put("msg", "不必要的重复烂班!");
277 return map; 282 return map;
278 } 283 }
  284 + //记录日志
  285 + ScheduleModifyLogger.jhlb(schedule, remarks);
279 286
280 schedule.setAdjustExps(reason); 287 schedule.setAdjustExps(reason);
281 schedule.destroy(); 288 schedule.destroy();
@@ -1163,7 +1170,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1163,7 +1170,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1163 sch = list.get(i); 1170 sch = list.get(i);
1164 1171
1165 //调整待发 1172 //调整待发
1166 - outgoAdjust(sch.getId(), null, fmtHHmm.print(st), null, "间隔调整"); 1173 + outgoAdjust(sch.getId(), null, fmtHHmm.print(st), null, "3");
1167 } 1174 }
1168 1175
1169 rs.put("status", ResponseCode.SUCCESS); 1176 rs.put("status", ResponseCode.SUCCESS);
@@ -1186,6 +1193,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1186,6 +1193,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1186 List<ScheduleRealInfo> ts = new ArrayList<>(); 1193 List<ScheduleRealInfo> ts = new ArrayList<>();
1187 try { 1194 try {
1188 Long id = Long.parseLong(map.get("id")); 1195 Long id = Long.parseLong(map.get("id"));
  1196 + String remarks = map.get("remarks");
  1197 +
1189 ScheduleRealInfo sch = dayOfSchedule.get(id); 1198 ScheduleRealInfo sch = dayOfSchedule.get(id);
1190 1199
1191 if(null == sch){ 1200 if(null == sch){
@@ -1194,6 +1203,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1194,6 +1203,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1194 return rs; 1203 return rs;
1195 } 1204 }
1196 1205
  1206 + //日志记录器
  1207 + FcxxwtLogger fLog = FcxxwtLogger.start(sch, remarks);
  1208 +
1197 String clZbh = map.get("clZbh"); 1209 String clZbh = map.get("clZbh");
1198 String jsy = map.get("jsy"); 1210 String jsy = map.get("jsy");
1199 if(!clZbh.equals(sch.getClZbh()) 1211 if(!clZbh.equals(sch.getClZbh())
@@ -1208,7 +1220,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1208,7 +1220,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1208 rs.put("status", ResponseCode.ERROR); 1220 rs.put("status", ResponseCode.ERROR);
1209 rs.put("msg", "车辆 " + clZbh + " 不存在!"); 1221 rs.put("msg", "车辆 " + clZbh + " 不存在!");
1210 return rs; 1222 return rs;
1211 - } else { 1223 + } else if(!clZbh.equals(sch.getClZbh())){
  1224 + fLog.log("换车", sch.getClZbh(), clZbh);
1212 dayOfSchedule.changeCar(sch, clZbh); 1225 dayOfSchedule.changeCar(sch, clZbh);
1213 } 1226 }
1214 } 1227 }
@@ -1224,7 +1237,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1224,7 +1237,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1224 rs.put("status", ResponseCode.ERROR); 1237 rs.put("status", ResponseCode.ERROR);
1225 return rs; 1238 return rs;
1226 } 1239 }
1227 - persoChange(sch, jGh); 1240 + else if(!jGh.equals(sch.getjGh())){
  1241 + fLog.log("换驾驶员", sch.getjGh() + "/" + sch.getjName(), jsy);
  1242 + persoChange(sch, jGh);
  1243 + }
1228 } 1244 }
1229 1245
1230 /** 1246 /**
@@ -1239,9 +1255,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1239,9 +1255,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1239 rs.put("status", ResponseCode.ERROR); 1255 rs.put("status", ResponseCode.ERROR);
1240 return rs; 1256 return rs;
1241 } 1257 }
1242 - persoChangeSPY(sch, sGh); 1258 + else if(!sGh.equals(sch.getsGh())){
  1259 + fLog.log("换售票员", sch.getsGh() + "/" + sch.getsName(), spy);
  1260 + persoChangeSPY(sch, sGh);
  1261 + }
1243 } 1262 }
1244 - else{ 1263 + else if(StringUtils.isNotEmpty(sch.getsGh())){
  1264 + fLog.log("撤销售票员");
1245 sch.setsGh(""); 1265 sch.setsGh("");
1246 sch.setsName(""); 1266 sch.setsName("");
1247 } 1267 }
@@ -1261,6 +1281,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1261,6 +1281,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1261 else 1281 else
1262 t = fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr() + fcsjActual); 1282 t = fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr() + fcsjActual);
1263 1283
  1284 + fLog.log("调整实发时间", sch.getFcsjActual(), fcsjActual);
1264 sch.setFcsjActualAll(t); 1285 sch.setFcsjActualAll(t);
1265 //取消应发未到标记 1286 //取消应发未到标记
1266 if(sch.isLate2()){ 1287 if(sch.isLate2()){
@@ -1268,6 +1289,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1268,6 +1289,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1268 LateAdjustHandle.remove(sch); 1289 LateAdjustHandle.remove(sch);
1269 } 1290 }
1270 } else if (StringUtils.isNotEmpty(sch.getFcsjActual()) && StringUtils.isEmpty(fcsjActual)){ 1291 } else if (StringUtils.isNotEmpty(sch.getFcsjActual()) && StringUtils.isEmpty(fcsjActual)){
  1292 + fLog.log("撤销实发时间", sch.getFcsjActual(), "");
1271 //撤销实发 1293 //撤销实发
1272 revokeRealOutgo(sch.getId()); 1294 revokeRealOutgo(sch.getId());
1273 } 1295 }
@@ -1280,6 +1302,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1280,6 +1302,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1280 && !zdsjActual.equals(sch.getZdsjActual())) { 1302 && !zdsjActual.equals(sch.getZdsjActual())) {
1281 1303
1282 //调整实达 1304 //调整实达
  1305 + fLog.log("调整实达时间", sch.getZdsjActual(), zdsjActual);
1283 sch.setZdsjActualAll(zdsjActual); 1306 sch.setZdsjActualAll(zdsjActual);
1284 //路牌下一班起点到达时间 1307 //路牌下一班起点到达时间
1285 ScheduleRealInfo next = dayOfSchedule.nextByLp(sch); 1308 ScheduleRealInfo next = dayOfSchedule.nextByLp(sch);
@@ -1294,7 +1317,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1294,7 +1317,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1294 ScheduleRealInfo carNext = dayOfSchedule.next(sch); 1317 ScheduleRealInfo carNext = dayOfSchedule.next(sch);
1295 if(carNext != null && !carNext.getXlBm().equals(sch.getXlBm())){ 1318 if(carNext != null && !carNext.getXlBm().equals(sch.getXlBm())){
1296 DirectivePushQueue.put64(carNext.getClZbh(), carNext.getXlBm(), "套跑@系统"); 1319 DirectivePushQueue.put64(carNext.getClZbh(), carNext.getXlBm(), "套跑@系统");
1297 - //directiveService.lineChange(carNext.getClZbh(), carNext.getXlBm(), "套跑@系统"); 1320 + fLog.log("下发线路切换指令", sch.getXlName(), carNext.getXlName());
1298 } 1321 }
1299 }catch (Exception e){logger.error("", e);} 1322 }catch (Exception e){logger.error("", e);}
1300 1323
@@ -1302,6 +1325,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1302,6 +1325,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1302 dayOfSchedule.reCalcExecPlan(sch.getClZbh()); 1325 dayOfSchedule.reCalcExecPlan(sch.getClZbh());
1303 } else if(StringUtils.isNotEmpty(sch.getZdsjActual()) && StringUtils.isEmpty(zdsjActual)){ 1326 } else if(StringUtils.isNotEmpty(sch.getZdsjActual()) && StringUtils.isEmpty(zdsjActual)){
1304 //清除实达时间 1327 //清除实达时间
  1328 + fLog.log("撤销实达时间", sch.getZdsjActual(), "");
1305 sch.clearZdsjActual(); 1329 sch.clearZdsjActual();
1306 //清除路牌下一班起点到达时间 1330 //清除路牌下一班起点到达时间
1307 ScheduleRealInfo next = dayOfSchedule.nextByLp(sch); 1331 ScheduleRealInfo next = dayOfSchedule.nextByLp(sch);
@@ -1316,7 +1340,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1316,7 +1340,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1316 /** 1340 /**
1317 * 备注 1341 * 备注
1318 */ 1342 */
1319 - sch.setRemarks(map.get("remarks")); 1343 + sch.setRemarks(remarks);
1320 1344
1321 /** 1345 /**
1322 * 烂班 1346 * 烂班
@@ -1324,6 +1348,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1324,6 +1348,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1324 if (map.get("status") != null 1348 if (map.get("status") != null
1325 && Integer.parseInt(map.get("status").toString()) == -1) { 1349 && Integer.parseInt(map.get("status").toString()) == -1) {
1326 destroy(sch.getId() + "", "", map.get("adjustExps").toString()); 1350 destroy(sch.getId() + "", "", map.get("adjustExps").toString());
  1351 + fLog.log("烂班");
1327 } 1352 }
1328 1353
1329 /** 1354 /**
@@ -1333,9 +1358,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1333,9 +1358,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1333 if (StringUtils.isNotEmpty(jhlc)) { 1358 if (StringUtils.isNotEmpty(jhlc)) {
1334 double jhlcNum = Double.parseDouble(jhlc); 1359 double jhlcNum = Double.parseDouble(jhlc);
1335 //烂班 1360 //烂班
1336 - if(jhlcNum == 0 && sch.getJhlcOrig() != 0 && !sch._isInout()) 1361 + if(jhlcNum == 0 && sch.getJhlcOrig() != 0 && !sch._isInout() && !sch.isDestroy()){
1337 destroy(sch.getId() + "", "", map.get("adjustExps").toString()); 1362 destroy(sch.getId() + "", "", map.get("adjustExps").toString());
  1363 + fLog.log("里程设置为0,自动烂班");
  1364 + }
1338 else if(jhlcNum != sch.getJhlc()){ 1365 else if(jhlcNum != sch.getJhlc()){
  1366 + fLog.log("设置里程", sch.getJhlc(), jhlcNum);
1339 sch.setJhlc(jhlcNum); 1367 sch.setJhlc(jhlcNum);
1340 //临加班次,实际计划一起改 1368 //临加班次,实际计划一起改
1341 if(sch.isSflj()) 1369 if(sch.isSflj())
@@ -1347,7 +1375,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1347,7 +1375,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1347 * 修改班次类型 1375 * 修改班次类型
1348 */ 1376 */
1349 String bcType = map.get("bcType"); 1377 String bcType = map.get("bcType");
1350 - if (StringUtils.isNotEmpty(bcType)) { 1378 + if (StringUtils.isNotEmpty(bcType) && !bcType.equals(sch.getBcType())) {
  1379 + fLog.log("修改班次类型", sch.getBcType(), bcType);
1351 sch.setBcType(bcType); 1380 sch.setBcType(bcType);
1352 } 1381 }
1353 1382
@@ -1359,6 +1388,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1359,6 +1388,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1359 1388
1360 rs.put("status", ResponseCode.SUCCESS); 1389 rs.put("status", ResponseCode.SUCCESS);
1361 rs.put("ts", ts); 1390 rs.put("ts", ts);
  1391 +
  1392 + //日志记录结束
  1393 + fLog.end();
1362 } catch (Exception e) { 1394 } catch (Exception e) {
1363 logger.error("", e); 1395 logger.error("", e);
1364 rs.put("status", ResponseCode.ERROR); 1396 rs.put("status", ResponseCode.ERROR);
@@ -1383,7 +1415,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -1383,7 +1415,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1383 schedule = dayOfSchedule.get(id); 1415 schedule = dayOfSchedule.get(id);
1384 1416
1385 if(schedule != null) 1417 if(schedule != null)
1386 - outgoAdjust(id, null, dfsj, null, "批量调整"); 1418 + outgoAdjust(id, null, dfsj, null, "2");
1387 } 1419 }
1388 1420
1389 rs.put("status", ResponseCode.SUCCESS); 1421 rs.put("status", ResponseCode.SUCCESS);
@@ -3144,7 +3176,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3144,7 +3176,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3144 Set<ScheduleRealInfo> set = new HashSet<>(); 3176 Set<ScheduleRealInfo> set = new HashSet<>();
3145 3177
3146 ScheduleRealInfo sch; 3178 ScheduleRealInfo sch;
3147 - //BiMap<String, String> map = BasicData.deviceId2NbbmMap.inverse();  
3148 3179
3149 String jGh = null,jName,sGh,sName; 3180 String jGh = null,jName,sGh,sName;
3150 for (ChangePersonCar cpc : cpcs) { 3181 for (ChangePersonCar cpc : cpcs) {
@@ -3257,7 +3288,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf @@ -3257,7 +3288,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3257 if (StringUtils.isEmpty(dc.getOld_dfsj()) || StringUtils.isEmpty(dc.getNew_dfsj())) 3288 if (StringUtils.isEmpty(dc.getOld_dfsj()) || StringUtils.isEmpty(dc.getNew_dfsj()))
3258 continue; 3289 continue;
3259 3290
3260 - tempMap = outgoAdjust(dc.getSchId(), "", dc.getNew_dfsj(), null, "批量调整"); 3291 + tempMap = outgoAdjust(dc.getSchId(), "", dc.getNew_dfsj(), null, "2");
3261 3292
3262 if (tempMap.get("status").equals(ResponseCode.SUCCESS)) { 3293 if (tempMap.get("status").equals(ResponseCode.SUCCESS)) {
3263 list.addAll((Collection<? extends ScheduleRealInfo>) tempMap.get("ts")); 3294 list.addAll((Collection<? extends ScheduleRealInfo>) tempMap.get("ts"));
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
@@ -573,191 +573,77 @@ public class ReportServiceImpl implements ReportService{ @@ -573,191 +573,77 @@ public class ReportServiceImpl implements ReportService{
573 573
574 //查询全程 574 //查询全程
575 String sqlqc="select t.*,x.station_name as qdz_name from ( " 575 String sqlqc="select t.*,x.station_name as qdz_name from ( "
576 - + "(SELECT fcsj,qdz,2 as xh,xl_dir FROM bsth_c_s_ttinfo_detail "  
577 - + " where ttinfo ='"+ttinfo+"' and bc_type='normal' and fcsj <='"+minfcsj+"' ) " 576 + + " (SELECT bc_type, fcsj,qdz,2 as xh,xl_dir FROM bsth_c_s_ttinfo_detail "
  577 + + " where ttinfo ='"+ttinfo+"' and (bc_type='normal' || bc_type='region') "
  578 + + " and fcsj <='"+minfcsj+"') "
578 + " union " 579 + " union "
579 - + " (SELECT fcsj,qdz,1 as xh,xl_dir FROM bsth_c_s_ttinfo_detail "  
580 - + " where ttinfo ='"+ttinfo+"' and bc_type='normal' and fcsj > '"+minfcsj+"') "  
581 - + "order by xl_dir,xh,fcsj ) t left join bsth_c_station x on t.qdz=x.id"; 580 + + " (SELECT bc_type, fcsj,qdz,1 as xh,xl_dir FROM bsth_c_s_ttinfo_detail "
  581 + + " where ttinfo ='"+ttinfo+"' and (bc_type='normal' || bc_type='region') "
  582 + + " and fcsj > '"+minfcsj+"') "
  583 + + "order by xl_dir,xh,fcsj ) t left join bsth_c_station x on t.qdz=x.id";
582 List<Map<String, String>> qclist= jdbcTemplate.query(sqlqc, 584 List<Map<String, String>> qclist= jdbcTemplate.query(sqlqc,
583 new RowMapper<Map<String, String>>(){ 585 new RowMapper<Map<String, String>>(){
584 @Override 586 @Override
585 - public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException {  
586 - Map<String, String> m=new HashMap<String,String>();  
587 - m.put("qdz_name", rs.getString("qdz_name"));  
588 - m.put("fcsj", rs.getString("fcsj"));  
589 - m.put("xl", rs.getString("xl_dir"));  
590 - return m;  
591 - } 587 + public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException {
  588 + Map<String, String> m=new HashMap<String,String>();
  589 + m.put("qdz_name", rs.getString("qdz_name"));
  590 + m.put("bcType", rs.getString("bc_type"));
  591 + m.put("fcsj", rs.getString("fcsj"));
  592 + m.put("xl", rs.getString("xl_dir"));
  593 + m.put("xh", rs.getString("xh"));
  594 + return m;
  595 + }
592 596
593 }); 597 });
594 -  
595 - Map<String, Object> qcMap=new HashMap<String,Object>();  
596 - int num=0;  
597 - String sxfcsj="";  
598 - String xxfcsj="";  
599 - String sxzd="";  
600 - String xxzd="";  
601 - for (int i = 0; i < qclist.size(); i++) {  
602 - Map<String, String> map=qclist.get(i);  
603 - if(map.get("xl").equals("0")){  
604 - if(sxzd.equals("")){  
605 - sxzd=map.get("qdz_name").toString();  
606 - qcMap.put("sxzm", sxzd);  
607 - sxfcsj +=map.get("fcsj").toString()+"-";  
608 - }  
609 - if(!(qclist.get(i+1).get("xl").equals("0"))){  
610 - sxfcsj +=map.get("fcsj").toString();  
611 - qcMap.put("sxsj",sxfcsj);  
612 - qcMap.put("sxbc", i+1);  
613 - num=i+1;  
614 - }  
615 - }  
616 - if(map.get("xl").equals("1")){  
617 - if(xxzd.equals("")){  
618 - xxzd=map.get("qdz_name").toString();  
619 - xxfcsj+=map.get("fcsj").toString()+"-";  
620 - qcMap.put("xxzm", xxzd);  
621 - } 598 +
  599 + List<List<Map<String, String>>> mapList = new ArrayList<List<Map<String,String>>>();
  600 + mapList.add(new ArrayList<Map<String, String>>());
  601 + mapList.add(new ArrayList<Map<String, String>>());
  602 + for(Map<String, String> m : qclist){
  603 + String bcType = m.get("bcType");
  604 + if(bcType.equals("normal")){
  605 + mapList.get(0).add(m);
  606 + } else {
  607 + mapList.get(1).add(m);
622 } 608 }
623 } 609 }
624 - xxfcsj +=qclist.get(qclist.size()-1).get("fcsj").toString();  
625 - qcMap.put("xxsj", xxfcsj);  
626 - qcMap.put("xxbc", qclist.size()-num);  
627 - list.add(qcMap);  
628 610
629 -  
630 - //查询区间  
631 - String sqlqj="select t.*,x.station_name as qdz_name from ( "  
632 - + "(SELECT fcsj,qdz,'1' as gf,xl_dir FROM bsth_c_s_ttinfo_detail "  
633 - + "where ttinfo ='"+ttinfo+"' and bc_type='region' and fcsj >='06:31'"  
634 - + "and fcsj <'08:30')"  
635 - + " union ( SELECT fcsj,qdz,'2' as gf,xl_dir FROM bsth_c_s_ttinfo_detail "  
636 - + "where ttinfo ='"+ttinfo+"' and bc_type='region' "  
637 - + "and fcsj > '16:01' and fcsj < '18:00') order by xl_dir,gf,fcsj ) t "  
638 - + "left join bsth_c_station x on t.qdz=x.id";  
639 -  
640 - List<Map<String, String>> qjlist= jdbcTemplate.query(sqlqj,  
641 - new RowMapper<Map<String, String>>(){  
642 - @Override  
643 - public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException {  
644 - Map<String, String> m=new HashMap<String,String>();  
645 - m.put("qdz_name", rs.getString("qdz_name"));  
646 - m.put("fcsj", rs.getString("fcsj"));  
647 - m.put("xl", rs.getString("xl_dir"));  
648 - m.put("gf", rs.getString("gf"));  
649 - return m;  
650 - }  
651 - });  
652 -  
653 - Map<String, Object> qjzMap=new HashMap<String,Object>();  
654 - Map<String, Object> qjwMap=new HashMap<String,Object>();  
655 - int numqj=0;  
656 - String sxfcsjqj="";  
657 - String xxfcsjqj="";  
658 - String sxzdqj="";  
659 - String xxzdqj="";  
660 - for(int i=0;i<qjlist.size();i++){  
661 - Map<String, String> map=qjlist.get(i);  
662 - if(map.get("xl").toString().equals("0")){  
663 - if(map.get("gf").toString().equals("1")){  
664 - if(sxzdqj.equals("")){  
665 - sxzdqj =map.get("qdz_name").toString();  
666 - qjzMap.put("sxzm", sxzdqj);  
667 - sxfcsjqj +=map.get("fcsj").toString()+"-";  
668 - }  
669 - if(i<qjlist.size()-1){  
670 - if(!(qjlist.get(i+1).get("gf").equals("1"))){  
671 - sxfcsjqj +=map.get("fcsj").toString();  
672 - qjzMap.put("sxsj",sxfcsjqj);  
673 - qjzMap.put("sxbc", i+1);  
674 - numqj=i+1;  
675 - sxzdqj ="";  
676 - sxfcsjqj="";  
677 - }  
678 - }else{  
679 - qjzMap.put("sxsj",sxfcsjqj+"-"+map.get("fcsj").toString());  
680 - qjzMap.put("sxbc", i+1);  
681 - numqj=i+1;  
682 - sxzdqj ="";  
683 - sxfcsjqj="";  
684 - }  
685 - }  
686 - if(map.get("gf").toString().equals("2")){  
687 - if(sxzdqj.equals("")){  
688 - sxzdqj =map.get("qdz_name").toString();  
689 - qjwMap.put("sxzm", sxzdqj);  
690 - sxfcsjqj +=map.get("fcsj").toString()+"-";  
691 - }  
692 - if(i<qjlist.size()-1){  
693 - if(!(qjlist.get(i+1).get("xl").equals("0"))){  
694 - sxfcsjqj +=map.get("fcsj").toString();  
695 - qjwMap.put("sxsj",sxfcsjqj);  
696 - qjwMap.put("sxbc", i+1-numqj);  
697 - numqj=i+1;  
698 - }  
699 - }else{  
700 - qjwMap.put("sxsj",sxfcsjqj+"-"+map.get("fcsj").toString());  
701 - qjwMap.put("sxbc", i+1-numqj);  
702 - numqj=i+1;  
703 - }  
704 - }  
705 -  
706 - }else{  
707 - if(map.get("gf").toString().equals("1")){  
708 - if(xxzdqj.equals("")){  
709 - xxzdqj =map.get("qdz_name").toString();  
710 - qjzMap.put("xxzm", xxzdqj);  
711 - xxfcsjqj +=map.get("fcsj").toString()+"-";  
712 - }  
713 - if(i<qjlist.size()-1){  
714 - if(!(qjlist.get(i+1).get("gf").equals("1"))){  
715 - xxfcsjqj +=map.get("fcsj").toString();  
716 - qjzMap.put("xxsj",xxfcsjqj);  
717 - qjzMap.put("xxbc", i+1-numqj);  
718 - numqj=i+1;  
719 - xxzdqj ="";  
720 - xxfcsjqj="";  
721 - }  
722 - }else{  
723 - qjzMap.put("xxsj",xxfcsjqj+"-"+map.get("fcsj").toString());  
724 - qjzMap.put("xxbc", i+1-numqj);  
725 - numqj=i+1;  
726 - xxzdqj ="";  
727 - xxfcsjqj="";  
728 - }  
729 - }  
730 - if(map.get("gf").toString().equals("2")){  
731 - if(xxzdqj.equals("")){  
732 - xxzdqj =map.get("qdz_name").toString();  
733 - qjwMap.put("xxzm", xxzdqj);  
734 - xxfcsjqj +=map.get("fcsj").toString()+"-";  
735 - }  
736 - if(i<qjlist.size()){  
737 - if(i==qjlist.size()-1){  
738 - xxfcsjqj +=map.get("fcsj").toString();  
739 - qjwMap.put("xxsj",xxfcsjqj);  
740 - qjwMap.put("xxbc", i+1-numqj);  
741 - numqj=i+1;  
742 - }  
743 - }else{  
744 - qjwMap.put("xxsj",xxfcsjqj+"-"+xxfcsjqj);  
745 - qjwMap.put("xxbc", i+1-numqj);  
746 - numqj=i+1;  
747 - } 611 + for(int i = 0; i < mapList.size(); i++){
  612 + List<Map<String, String>> l = mapList.get(i);
  613 + Map<String, Object> tempMap = new HashMap<String, Object>();
  614 + List<String> upfcsj = new ArrayList<String>();
  615 + List<String> downfcsj = new ArrayList<String>();
  616 + String sxqdz = "", xxqdz = "";
  617 + String sxfcsj = "", xxfcsj = "";
  618 + int sxbc = 0, xxbc = 0;
  619 + for(Map<String, String> m : l){
  620 + if(m.get("xl").equals("0")){
  621 + sxbc++;
  622 + upfcsj.add(m.get("fcsj"));
  623 + if(sxqdz.length() == 0 && m.containsKey("qdz_name"))
  624 + sxqdz = m.get("qdz_name");
  625 + } else {
  626 + xxbc++;
  627 + downfcsj.add(m.get("fcsj"));
  628 + if(xxqdz.length() == 0 && m.containsKey("qdz_name"))
  629 + xxqdz = m.get("qdz_name");
748 } 630 }
749 -  
750 -  
751 } 631 }
  632 + if(upfcsj.size() != 0)
  633 + sxfcsj = upfcsj.get(0) + "-" + upfcsj.get(upfcsj.size() - 1);
  634 + if(downfcsj.size() != 0)
  635 + xxfcsj = downfcsj.get(0) + "-" + downfcsj.get(downfcsj.size() - 1);
  636 + tempMap.put("sxqdz", sxqdz);
  637 + tempMap.put("sxfcsj", i==0?sxfcsj:"");
  638 + tempMap.put("sxbc", sxbc!=0?sxbc:"");
  639 + tempMap.put("xxqdz", xxqdz);
  640 + tempMap.put("xxfcsj", i==0?xxfcsj:"");
  641 + tempMap.put("xxbc", xxbc!=0?xxbc:"");
  642 + tempMap.put("bcType", i);
  643 + if(sxqdz.length()!=0 || xxqdz.length()!=0)
  644 + list.add(tempMap);
752 } 645 }
753 646
754 - if(!qjzMap.isEmpty()){  
755 - list.add(qjzMap);  
756 - }  
757 - if(!qjwMap.isEmpty()){  
758 - list.add(qjwMap);  
759 -  
760 - }  
761 return list; 647 return list;
762 } 648 }
763 @Override 649 @Override
@@ -769,15 +655,14 @@ public class ReportServiceImpl implements ReportService{ @@ -769,15 +655,14 @@ public class ReportServiceImpl implements ReportService{
769 String[] minSjs = minfcsj.split(":"); 655 String[] minSjs = minfcsj.split(":");
770 int minSj=Integer.parseInt(minSjs[0])*60+Integer.parseInt(minSjs[1]); 656 int minSj=Integer.parseInt(minSjs[0])*60+Integer.parseInt(minSjs[1]);
771 //查询时间里程 657 //查询时间里程
772 - String sqlPc=" (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,2 as xh FROM " 658 + String sqlPc=" (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,ists,2 as xh FROM "
773 + " bsth_c_s_ttinfo_detail where ttinfo ='"+ttinfo+"' and " 659 + " bsth_c_s_ttinfo_detail where ttinfo ='"+ttinfo+"' and "
774 - + " fcsj <='"+minfcsj+"' and bc_type = 'normal') " 660 + + " fcsj <='"+minfcsj+"' and bc_type!='in' and bc_type!='out' and bc_type!='ldks') "
775 + " union " 661 + " union "
776 - + " (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,1 as xh FROM " 662 + + " (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,ists,1 as xh FROM "
777 + " bsth_c_s_ttinfo_detail where ttinfo ='"+ttinfo+"' and " 663 + " bsth_c_s_ttinfo_detail where ttinfo ='"+ttinfo+"' and "
778 - + " fcsj >'"+minfcsj+"' and bc_type ='normal') " 664 + + " fcsj > '"+minfcsj+"' and bc_type!='in' and bc_type!='out' and bc_type!='ldks') "
779 + " order by xl_dir, xh,fcsj"; 665 + " order by xl_dir, xh,fcsj";
780 -  
781 Map<String, Object> map=new HashMap<String,Object>(); 666 Map<String, Object> map=new HashMap<String,Object>();
782 List<Map<String, Object>> list= jdbcTemplate.query(sqlPc, 667 List<Map<String, Object>> list= jdbcTemplate.query(sqlPc,
783 new RowMapper<Map<String, Object>>(){ 668 new RowMapper<Map<String, Object>>(){
@@ -790,9 +675,10 @@ public class ReportServiceImpl implements ReportService{ @@ -790,9 +675,10 @@ public class ReportServiceImpl implements ReportService{
790 m.put("bcType", rs.getString("bc_type")); 675 m.put("bcType", rs.getString("bc_type"));
791 m.put("lp", rs.getString("lp")); 676 m.put("lp", rs.getString("lp"));
792 m.put("dir", rs.getString("xl_dir")); 677 m.put("dir", rs.getString("xl_dir"));
  678 + m.put("ists", rs.getString("ists")!=null?rs.getString("ists"):"");
793 return m; 679 return m;
794 } 680 }
795 - }); 681 + });
796 682
797 List<Map<String, Object>> newList=new ArrayList<Map<String,Object>>(); 683 List<Map<String, Object>> newList=new ArrayList<Map<String,Object>>();
798 Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>(); 684 Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>();
@@ -824,8 +710,9 @@ public class ReportServiceImpl implements ReportService{ @@ -824,8 +710,9 @@ public class ReportServiceImpl implements ReportService{
824 Map<String, Object> tempMap = new HashMap<String, Object>(); 710 Map<String, Object> tempMap = new HashMap<String, Object>();
825 List<Map<String, Object>> list2 = keyMap.get(key); 711 List<Map<String, Object>> list2 = keyMap.get(key);
826 List<Integer> cjs = new ArrayList<Integer>(); 712 List<Integer> cjs = new ArrayList<Integer>();
827 - int sxsj = 0, xxsj = 0, zcj = 0; 713 + int sxsj = 0, xxsj = 0, zcj = 0, tssj = 0;
828 int temp = 24*60+1; 714 int temp = 24*60+1;
  715 + boolean ists = false;
829 for(Map<String, Object> m : list2){ 716 for(Map<String, Object> m : list2){
830 String[] split = m.get("fcsj").toString().split(":"); 717 String[] split = m.get("fcsj").toString().split(":");
831 int fcsj = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]); 718 int fcsj = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
@@ -838,9 +725,18 @@ public class ReportServiceImpl implements ReportService{ @@ -838,9 +725,18 @@ public class ReportServiceImpl implements ReportService{
838 } 725 }
839 if(temp >= fcsj){ 726 if(temp >= fcsj){
840 temp = fcsj; 727 temp = fcsj;
  728 + ists = false;
841 } else { 729 } else {
842 - cjs.add(fcsj - temp); 730 + if(ists){
  731 + tssj += fcsj - temp;
  732 + ists = false;
  733 + } else {
  734 + cjs.add(fcsj - temp);
  735 + }
843 temp = fcsj; 736 temp = fcsj;
  737 + if(m.get("ists").equals("1")){
  738 + ists = true;
  739 + }
844 } 740 }
845 } 741 }
846 Collections.sort(cjs); 742 Collections.sort(cjs);
@@ -852,7 +748,8 @@ public class ReportServiceImpl implements ReportService{ @@ -852,7 +748,8 @@ public class ReportServiceImpl implements ReportService{
852 tempMap.put("xxsj", xxsj); 748 tempMap.put("xxsj", xxsj);
853 tempMap.put("fqsj", sxsj + xxsj); 749 tempMap.put("fqsj", sxsj + xxsj);
854 tempMap.put("cjqj", cjs.size()>0?cjs.get(0)+"——"+cjs.get(cjs.size()-1):"——"); 750 tempMap.put("cjqj", cjs.size()>0?cjs.get(0)+"——"+cjs.get(cjs.size()-1):"——");
855 - tempMap.put("pjcj", cjs.size()>0?zcj/(cjs.size()-1):"/"); 751 + tempMap.put("pjcj", cjs.size()>0?zcj/cjs.size():"/");
  752 + tempMap.put("tssj", tssj);
856 maps.put(key, tempMap); 753 maps.put(key, tempMap);
857 } 754 }
858 newList.add(maps.get("(首)——6:30")); 755 newList.add(maps.get("(首)——6:30"));
src/main/java/com/bsth/service/schedule/TTInfoDetailService.java
1 package com.bsth.service.schedule; 1 package com.bsth.service.schedule;
2 2
3 import com.bsth.entity.schedule.TTInfoDetail; 3 import com.bsth.entity.schedule.TTInfoDetail;
  4 +import com.bsth.service.schedule.datatools.TTInfoDetailForEdit;
4 import com.bsth.service.schedule.exception.ScheduleException; 5 import com.bsth.service.schedule.exception.ScheduleException;
5 -import org.apache.commons.lang3.StringUtils;  
6 6
7 -import java.util.ArrayList;  
8 import java.util.List; 7 import java.util.List;
9 import java.util.Map; 8 import java.util.Map;
10 9
@@ -14,157 +13,21 @@ import java.util.Map; @@ -14,157 +13,21 @@ import java.util.Map;
14 public interface TTInfoDetailService extends BService<TTInfoDetail, Long> { 13 public interface TTInfoDetailService extends BService<TTInfoDetail, Long> {
15 14
16 /** 15 /**
17 - * 发车信息内部类。  
18 - */  
19 - public static class FcInfo {  
20 - /** 时刻明细id */  
21 - private Long ttdid;  
22 - /** 发车时间 */  
23 - private String fcsj;  
24 - /** 班次类型 */  
25 - private String bc_type;  
26 - /** 线路上下行 */  
27 - private String xldir;  
28 - /** 是偶分班 */  
29 - private Boolean isfb;  
30 -  
31 - /** 起点站code */  
32 - private String qdzCode;  
33 - /** 终点站code */  
34 - private String zdzCode;  
35 -  
36 - public FcInfo() {  
37 - }  
38 -  
39 - public FcInfo(  
40 - String ttdid_str,  
41 - String bc_type,  
42 - String fcsj,  
43 - String xldir,  
44 - String isfb,  
45 - String qdzCode,  
46 - String zdzCode) {  
47 - this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str);  
48 - this.bc_type = bc_type;  
49 - this.fcsj = fcsj;  
50 - this.xldir = xldir;  
51 - if ("N".equals(isfb))  
52 - this.isfb = false;  
53 - else if ("Y".equals(isfb) || "true".equals(isfb))  
54 - this.isfb = true;  
55 - else  
56 - this.isfb = false;  
57 -  
58 - if (StringUtils.isNotEmpty(qdzCode) && !"null".equals(qdzCode)) {  
59 - this.qdzCode = qdzCode;  
60 - }  
61 - if (StringUtils.isNotEmpty(zdzCode) && !"null".equals(zdzCode)) {  
62 - this.zdzCode = zdzCode;  
63 - }  
64 -  
65 - }  
66 -  
67 - public Long getTtdid() {  
68 - return ttdid;  
69 - }  
70 -  
71 - public void setTtdid(Long ttdid) {  
72 - this.ttdid = ttdid;  
73 - }  
74 -  
75 - public String getFcsj() {  
76 - return fcsj;  
77 - }  
78 -  
79 - public void setFcsj(String fcsj) {  
80 - this.fcsj = fcsj;  
81 - }  
82 -  
83 - public String getBc_type() {  
84 - return bc_type;  
85 - }  
86 -  
87 - public void setBc_type(String bc_type) {  
88 - this.bc_type = bc_type;  
89 - }  
90 -  
91 - public String getXldir() {  
92 - return xldir;  
93 - }  
94 -  
95 - public void setXldir(String xldir) {  
96 - this.xldir = xldir;  
97 - }  
98 -  
99 - public Boolean getIsfb() {  
100 - return isfb;  
101 - }  
102 -  
103 - public void setIsfb(Boolean isfb) {  
104 - this.isfb = isfb;  
105 - }  
106 -  
107 - public String getQdzCode() {  
108 - return qdzCode;  
109 - }  
110 -  
111 - public void setQdzCode(String qdzCode) {  
112 - this.qdzCode = qdzCode;  
113 - }  
114 -  
115 - public String getZdzCode() {  
116 - return zdzCode;  
117 - }  
118 -  
119 - public void setZdzCode(String zdzCode) {  
120 - this.zdzCode = zdzCode;  
121 - }  
122 - }  
123 -  
124 - /**  
125 - * 时刻表编辑用的返回数据。 16 + * 获取待编辑的数据。
  17 + * @param xlid 线路id
  18 + * @param ttid 时刻表id
  19 + * @param maxfcno 最大发车顺序号
  20 + * @return
126 */ 21 */
127 - public static class EditInfo {  
128 - /** 标题数据 */  
129 - private List<String> header = new ArrayList<>();  
130 - /** 内容数据 */  
131 - private List<List<FcInfo>> contents = new ArrayList<>();  
132 -  
133 - /** 营运描述 */  
134 - private String yy_desc;  
135 -  
136 - public List<String> getHeader() {  
137 - return header;  
138 - }  
139 -  
140 - public void setHeader(List<String> header) {  
141 - this.header = header;  
142 - }  
143 -  
144 - public List<List<FcInfo>> getContents() {  
145 - return contents;  
146 - }  
147 -  
148 - public void setContents(List<List<FcInfo>> contents) {  
149 - this.contents = contents;  
150 - }  
151 -  
152 - public String getYy_desc() {  
153 - return yy_desc;  
154 - }  
155 -  
156 - public void setYy_desc(String yy_desc) {  
157 - this.yy_desc = yy_desc;  
158 - }  
159 - } 22 + TTInfoDetailForEdit.EditInfo getEditInfo(Integer xlid, Long ttid, Long maxfcno) throws ScheduleException;
160 23
161 /** 24 /**
162 - * 获取待编辑的数据。 25 + * 获取时刻表最大发车顺序号
163 * @param xlid 线路id 26 * @param xlid 线路id
164 - * @param ttid 时刻表id 27 + * @param ttinfoid 时刻表id
165 * @return 28 * @return
166 */ 29 */
167 - EditInfo getEditInfo(Integer xlid, Long ttid) throws ScheduleException; 30 + Long findMaxFcno(Integer xlid, Long ttinfoid);
168 31
169 /** 32 /**
170 * 验证sheet(以后放到规则引擎里去做)。 33 * 验证sheet(以后放到规则引擎里去做)。
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailDataToolsImpl.java
@@ -21,10 +21,7 @@ import org.springframework.stereotype.Service; @@ -21,10 +21,7 @@ import org.springframework.stereotype.Service;
21 import java.io.File; 21 import java.io.File;
22 import java.io.PrintWriter; 22 import java.io.PrintWriter;
23 import java.io.StringWriter; 23 import java.io.StringWriter;
24 -import java.util.ArrayList;  
25 -import java.util.HashMap;  
26 -import java.util.List;  
27 -import java.util.Map; 24 +import java.util.*;
28 25
29 /** 26 /**
30 * Created by xu on 17/5/16. 27 * Created by xu on 17/5/16.
@@ -206,8 +203,10 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail @@ -206,8 +203,10 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
206 } 203 }
207 204
208 @Override 205 @Override
209 - public File exportDataForEdit(Integer xlid, Long ttid) throws ScheduleException { 206 + public EditInfo getEditInfo(Integer xlid, Long ttid, Long maxfcno) throws ScheduleException {
210 try { 207 try {
  208 + LOGGER.info("//---------------- 时刻表编辑用数据输出 start... ----------------//");
  209 +
211 // 创建ktr转换所需参数 210 // 创建ktr转换所需参数
212 Map<String, Object> ktrParms = new HashMap<>(); 211 Map<String, Object> ktrParms = new HashMap<>();
213 File ktrFile = new File(this.getClass().getResource( 212 File ktrFile = new File(this.getClass().getResource(
@@ -225,9 +224,115 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail @@ -225,9 +224,115 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
225 ktrParms.put("xlid", String.valueOf(xlid)); 224 ktrParms.put("xlid", String.valueOf(xlid));
226 ktrParms.put("ttid", String.valueOf(ttid)); 225 ktrParms.put("ttid", String.valueOf(ttid));
227 226
228 - return dataToolsService.exportData(ktrParms); 227 + dataToolsService.exportData(ktrParms);
  228 +
  229 + EditInfo editInfo = new EditInfo(); // 输出数据
  230 +
  231 +
  232 + // 1.6、获取最大的发车数,用于输出数据的数量
  233 + LOGGER.info("最大发车顺序号={}", maxfcno);
  234 + if (maxfcno != null) {
  235 + // 2、读取ktr生成的excel数据,组织编辑用数据返回
  236 + // 2-1、读取Excel文件
  237 + Workbook book = Workbook.getWorkbook(new File(dataToolsProperties.getTransTempdir() +
  238 + File.separator + outputFilePath + ".xls"));
  239 + Sheet sheet = book.getSheet(0);
  240 +
  241 + // 2-2、处理数据
  242 + int all_bc_ks = 0; // 总空驶班次
  243 + int all_bc_yy = 0; // 总营运班次
  244 + double all_lc_ks = 0; // 总空驶里程
  245 + double all_lc_yy = 0; // 总营运里程
  246 +
  247 + String[] headarrays = new String[maxfcno.intValue() + 3];
  248 + headarrays[0] = "路牌";
  249 + headarrays[maxfcno.intValue() + 1] = "空驶班次/空驶里程";
  250 + headarrays[maxfcno.intValue() + 2] = "运营班次/运营里程";
  251 +
  252 + for (int r = 1; r < sheet.getRows(); r++) {
  253 + List<FcInfo> fcInfos = new ArrayList<>();
  254 + // 每行第一列都是路牌
  255 + fcInfos.add(new FcInfo(null, null, sheet.getCell(0, r).getContents(), null, null, null, null)); // 用fcsj放置路牌显示
  256 +
  257 + int bc_ks = 0; // 空驶班次
  258 + int bc_yy = 0; // 营运班次
  259 + double lc_ks = 0; // 空驶里程
  260 + double lc_yy = 0; // 营运里程
  261 +
  262 + for (int c = 1; c <= maxfcno; c++) {
  263 + String content_str = sheet.getCell(c, r).getContents();
  264 + try {
  265 + String[] content = StringUtils.isEmpty(content_str) ? null : content_str.split(","); // 总的内容
  266 +
  267 + String ttdid_str = content == null ? "" : content[0]; // 时刻表明细id
  268 + String fcsj = content == null ? "" : content[1]; // 发车时间
  269 + String jhlc = content == null ? "" : content[2]; // 计划里程
  270 + String fzdname = content == null ? "" : content[3]; // 发车站点名称
  271 + String bctype = content == null ? "" : content[4]; // 班次类型
  272 + String xldir = content == null ? "" : content[5]; // 线路上下行
  273 + String isfb = content == null ? "" : content[6]; // 是否分班
  274 +
  275 + String qdzCode = content == null ? "" : content[7]; // 起点站编码
  276 + String zdzCode = content == null ? "" : content[8]; // 终点站编码
  277 +
  278 + FcInfo fcInfo = new FcInfo(ttdid_str, bctype, fcsj, xldir, isfb, qdzCode, zdzCode);
  279 +
  280 + if (StringUtils.isNotEmpty(fzdname))
  281 + headarrays[c] = fzdname;
  282 + fcInfos.add(fcInfo);
  283 +
  284 +
  285 + // 计算班次里程
  286 + if (StringUtils.isNotEmpty(jhlc)) {
  287 + if ("in".equals(bctype) || "out".equals(bctype) || "ldks".equals(bctype)) {
  288 + bc_ks += 1;
  289 + lc_ks += Double.valueOf(jhlc);
  290 +
  291 + all_bc_ks += 1;
  292 + all_lc_ks += Double.valueOf(jhlc);
  293 +
  294 + } else {
  295 + bc_yy += 1;
  296 + lc_yy += Double.valueOf(jhlc);
  297 +
  298 + all_bc_yy += 1;
  299 + all_lc_yy += Double.valueOf(jhlc);
  300 + }
  301 + }
  302 +
  303 + } catch (Exception exp) {
  304 + exp.printStackTrace();
  305 + LOGGER.info("第{}行,第{}列数据有问题,数据={},异常message={}", r, c, content_str, exp.getCause());
  306 + break;
  307 + }
  308 +
  309 + }
  310 +
  311 + // 添加一列 空驶班次/空驶里程,fcsj放置数据
  312 + fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_ks, lc_ks), null, null, null, null));
  313 +
  314 + // 添加一列 营运班次/营运里程,fcsj放置数据
  315 + fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_yy, lc_yy), null, null, null, null));
  316 +
  317 + editInfo.getContents().add(fcInfos);
  318 + }
  319 + editInfo.getHeader().addAll(Arrays.asList(headarrays));
  320 +
  321 + editInfo.setYy_desc(String.format("空驶班次=%d,营运班次=%d,空驶里程=%.3f,营运里程=%.3f,总里程=%.3f", all_bc_ks, all_bc_yy, all_lc_ks, all_lc_yy, all_lc_ks + all_lc_yy));
  322 + }
  323 +
  324 + LOGGER.info("//---------------- 时刻表编辑用数据输出 success... ----------------//");
  325 +
  326 + return editInfo;
229 } catch (Exception exp) { 327 } catch (Exception exp) {
230 - throw new ScheduleException(exp); 328 + LOGGER.info("//---------------- 时刻表编辑用数据输出 failed... ----------------//");
  329 +
  330 + StringWriter sw = new StringWriter();
  331 + exp.printStackTrace(new PrintWriter(sw));
  332 + LOGGER.info(sw.toString());
  333 +
  334 + throw new ScheduleException(exp.getMessage());
231 } 335 }
232 } 336 }
  337 +
233 } 338 }
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailForEdit.java
1 package com.bsth.service.schedule.datatools; 1 package com.bsth.service.schedule.datatools;
2 2
3 import com.bsth.service.schedule.exception.ScheduleException; 3 import com.bsth.service.schedule.exception.ScheduleException;
  4 +import org.apache.commons.lang3.StringUtils;
4 5
5 -import java.io.File; 6 +import java.util.ArrayList;
  7 +import java.util.List;
6 8
7 /** 9 /**
8 * Created by xu on 17/5/16. 10 * Created by xu on 17/5/16.
9 */ 11 */
10 public interface TTInfoDetailForEdit { 12 public interface TTInfoDetailForEdit {
11 - File exportDataForEdit(Integer xlid, Long ttid) throws ScheduleException; 13 + /**
  14 + * 发车信息内部类。
  15 + */
  16 + public static class FcInfo {
  17 + /** 时刻明细id */
  18 + private Long ttdid;
  19 + /** 发车时间 */
  20 + private String fcsj;
  21 + /** 班次类型 */
  22 + private String bc_type;
  23 + /** 线路上下行 */
  24 + private String xldir;
  25 + /** 是偶分班 */
  26 + private Boolean isfb;
  27 +
  28 + /** 起点站code */
  29 + private String qdzCode;
  30 + /** 终点站code */
  31 + private String zdzCode;
  32 +
  33 + public FcInfo() {
  34 + }
  35 +
  36 + public FcInfo(
  37 + String ttdid_str,
  38 + String bc_type,
  39 + String fcsj,
  40 + String xldir,
  41 + String isfb,
  42 + String qdzCode,
  43 + String zdzCode) {
  44 + this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str);
  45 + this.bc_type = bc_type;
  46 + this.fcsj = fcsj;
  47 + this.xldir = xldir;
  48 + if ("N".equals(isfb))
  49 + this.isfb = false;
  50 + else if ("Y".equals(isfb) || "true".equals(isfb))
  51 + this.isfb = true;
  52 + else
  53 + this.isfb = false;
  54 +
  55 + if (StringUtils.isNotEmpty(qdzCode) && !"null".equals(qdzCode)) {
  56 + this.qdzCode = qdzCode;
  57 + }
  58 + if (StringUtils.isNotEmpty(zdzCode) && !"null".equals(zdzCode)) {
  59 + this.zdzCode = zdzCode;
  60 + }
  61 +
  62 + }
  63 +
  64 + public Long getTtdid() {
  65 + return ttdid;
  66 + }
  67 +
  68 + public void setTtdid(Long ttdid) {
  69 + this.ttdid = ttdid;
  70 + }
  71 +
  72 + public String getFcsj() {
  73 + return fcsj;
  74 + }
  75 +
  76 + public void setFcsj(String fcsj) {
  77 + this.fcsj = fcsj;
  78 + }
  79 +
  80 + public String getBc_type() {
  81 + return bc_type;
  82 + }
  83 +
  84 + public void setBc_type(String bc_type) {
  85 + this.bc_type = bc_type;
  86 + }
  87 +
  88 + public String getXldir() {
  89 + return xldir;
  90 + }
  91 +
  92 + public void setXldir(String xldir) {
  93 + this.xldir = xldir;
  94 + }
  95 +
  96 + public Boolean getIsfb() {
  97 + return isfb;
  98 + }
  99 +
  100 + public void setIsfb(Boolean isfb) {
  101 + this.isfb = isfb;
  102 + }
  103 +
  104 + public String getQdzCode() {
  105 + return qdzCode;
  106 + }
  107 +
  108 + public void setQdzCode(String qdzCode) {
  109 + this.qdzCode = qdzCode;
  110 + }
  111 +
  112 + public String getZdzCode() {
  113 + return zdzCode;
  114 + }
  115 +
  116 + public void setZdzCode(String zdzCode) {
  117 + this.zdzCode = zdzCode;
  118 + }
  119 + }
  120 +
  121 + /**
  122 + * 时刻表编辑用的返回数据。
  123 + */
  124 + public static class EditInfo {
  125 + /** 标题数据 */
  126 + private List<String> header = new ArrayList<>();
  127 + /** 内容数据 */
  128 + private List<List<FcInfo>> contents = new ArrayList<>();
  129 +
  130 + /** 营运描述 */
  131 + private String yy_desc;
  132 +
  133 + public List<String> getHeader() {
  134 + return header;
  135 + }
  136 +
  137 + public void setHeader(List<String> header) {
  138 + this.header = header;
  139 + }
  140 +
  141 + public List<List<FcInfo>> getContents() {
  142 + return contents;
  143 + }
  144 +
  145 + public void setContents(List<List<FcInfo>> contents) {
  146 + this.contents = contents;
  147 + }
  148 +
  149 + public String getYy_desc() {
  150 + return yy_desc;
  151 + }
  152 +
  153 + public void setYy_desc(String yy_desc) {
  154 + this.yy_desc = yy_desc;
  155 + }
  156 + }
  157 +
  158 + /**
  159 + * 获取待编辑的数据。
  160 + * @param xlid 线路id
  161 + * @param ttid 时刻表id
  162 + * @param maxfcno 最大发车顺序号
  163 + * @return
  164 + */
  165 + EditInfo getEditInfo(Integer xlid, Long ttid, Long maxfcno) throws ScheduleException;
  166 +
12 } 167 }
  168 +
src/main/java/com/bsth/service/schedule/impl/TTInfoDetailServiceImpl.java
@@ -69,8 +69,6 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im @@ -69,8 +69,6 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
69 @Autowired 69 @Autowired
70 private TTInfoDetailRepository ttInfoDetailRepository; 70 private TTInfoDetailRepository ttInfoDetailRepository;
71 @Autowired 71 @Autowired
72 - private DataToolsProperties dataToolsProperties;  
73 - @Autowired  
74 private LineRepository lineRepository; 72 private LineRepository lineRepository;
75 @Autowired 73 @Autowired
76 private TTInfoRepository infoRepository; 74 private TTInfoRepository infoRepository;
@@ -114,6 +112,11 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im @@ -114,6 +112,11 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
114 } 112 }
115 113
116 @Override 114 @Override
  115 + public Long findMaxFcno(Integer xlid, Long ttinfoid) {
  116 + return ttInfoDetailRepository.findMaxFcno(xlid, ttinfoid);
  117 + }
  118 +
  119 + @Override
117 public TTInfoDetail findById(Long aLong) { 120 public TTInfoDetail findById(Long aLong) {
118 return ttInfoDetailRepository.findOneExtend(aLong); 121 return ttInfoDetailRepository.findOneExtend(aLong);
119 } 122 }
@@ -135,128 +138,12 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im @@ -135,128 +138,12 @@ public class TTInfoDetailServiceImpl extends BServiceImpl&lt;TTInfoDetail, Long&gt; im
135 return dataToolsService.exportData(params); 138 return dataToolsService.exportData(params);
136 } 139 }
137 140
138 - @Override  
139 - public TTInfoDetailService.EditInfo getEditInfo(Integer xlid, Long ttid) throws ScheduleException {  
140 - try {  
141 - LOGGER.info("//---------------- 时刻表编辑用数据输出 start... ----------------//");  
142 -  
143 - // 附加参数  
144 - String outputFilePath = String.format("ttinfodetail_(id=%s)_foredit-%s",  
145 - String.valueOf(ttid), new DateTime().toString("yyyyMMddHHmmss"));  
146 -  
147 - ttInfoDetailForEdit.exportDataForEdit(xlid, ttid);  
148 -  
149 - TTInfoDetailService.EditInfo editInfo = new TTInfoDetailService.EditInfo(); // 输出数据  
150 -  
151 - // 1.6、获取最大的发车数,用于输出数据的数量  
152 - Long maxfcno = ttInfoDetailRepository.findMaxFcno(xlid, ttid);  
153 - LOGGER.info("最大发车顺序号={}", maxfcno);  
154 - if (maxfcno != null) {  
155 - // 2、读取ktr生成的excel数据,组织编辑用数据返回  
156 - // 2-1、读取Excel文件  
157 - Workbook book = Workbook.getWorkbook(new File(dataToolsProperties.getTransTempdir() +  
158 - File.separator + outputFilePath + ".xls"));  
159 - Sheet sheet = book.getSheet(0);  
160 -  
161 - // 2-2、处理数据  
162 - int all_bc_ks = 0; // 总空驶班次  
163 - int all_bc_yy = 0; // 总营运班次  
164 - double all_lc_ks = 0; // 总空驶里程  
165 - double all_lc_yy = 0; // 总营运里程  
166 -  
167 - String[] headarrays = new String[maxfcno.intValue() + 3];  
168 - headarrays[0] = "路牌";  
169 - headarrays[maxfcno.intValue() + 1] = "空驶班次/空驶里程";  
170 - headarrays[maxfcno.intValue() + 2] = "运营班次/运营里程";  
171 -  
172 - for (int r = 1; r < sheet.getRows(); r++) {  
173 - List<TTInfoDetailService.FcInfo> fcInfos = new ArrayList<>();  
174 - // 每行第一列都是路牌  
175 - fcInfos.add(new TTInfoDetailService.FcInfo(null, null, sheet.getCell(0, r).getContents(), null, null, null, null)); // 用fcsj放置路牌显示  
176 -  
177 - int bc_ks = 0; // 空驶班次  
178 - int bc_yy = 0; // 营运班次  
179 - double lc_ks = 0; // 空驶里程  
180 - double lc_yy = 0; // 营运里程  
181 -  
182 - for (int c = 1; c <= maxfcno; c++) {  
183 - String content_str = sheet.getCell(c, r).getContents();  
184 - try {  
185 - String[] content = StringUtils.isEmpty(content_str) ? null : content_str.split(","); // 总的内容  
186 -  
187 - String ttdid_str = content == null ? "" : content[0]; // 时刻表明细id  
188 - String fcsj = content == null ? "" : content[1]; // 发车时间  
189 - String jhlc = content == null ? "" : content[2]; // 计划里程  
190 - String fzdname = content == null ? "" : content[3]; // 发车站点名称  
191 - String bctype = content == null ? "" : content[4]; // 班次类型  
192 - String xldir = content == null ? "" : content[5]; // 线路上下行  
193 - String isfb = content == null ? "" : content[6]; // 是否分班  
194 -  
195 - String qdzCode = content == null ? "" : content[7]; // 起点站编码  
196 - String zdzCode = content == null ? "" : content[8]; // 终点站编码  
197 -  
198 - TTInfoDetailService.FcInfo fcInfo = new TTInfoDetailService.FcInfo(ttdid_str, bctype, fcsj, xldir, isfb, qdzCode, zdzCode);  
199 -  
200 - if (StringUtils.isNotEmpty(fzdname))  
201 - headarrays[c] = fzdname;  
202 - fcInfos.add(fcInfo);  
203 -  
204 -  
205 - // 计算班次里程  
206 - if (StringUtils.isNotEmpty(jhlc)) {  
207 - if ("in".equals(bctype) || "out".equals(bctype) || "ldks".equals(bctype)) {  
208 - bc_ks += 1;  
209 - lc_ks += Double.valueOf(jhlc);  
210 -  
211 - all_bc_ks += 1;  
212 - all_lc_ks += Double.valueOf(jhlc);  
213 -  
214 - } else {  
215 - bc_yy += 1;  
216 - lc_yy += Double.valueOf(jhlc);  
217 -  
218 - all_bc_yy += 1;  
219 - all_lc_yy += Double.valueOf(jhlc);  
220 - }  
221 - }  
222 -  
223 - } catch (Exception exp) {  
224 - exp.printStackTrace();  
225 - LOGGER.info("第{}行,第{}列数据有问题,数据={},异常message={}", r, c, content_str, exp.getCause());  
226 - break;  
227 - }  
228 -  
229 - }  
230 -  
231 - // 添加一列 空驶班次/空驶里程,fcsj放置数据  
232 - fcInfos.add(new TTInfoDetailService.FcInfo(null, null, String.format("%d/%.3f", bc_ks, lc_ks), null, null, null, null));  
233 -  
234 - // 添加一列 营运班次/营运里程,fcsj放置数据  
235 - fcInfos.add(new TTInfoDetailService.FcInfo(null, null, String.format("%d/%.3f", bc_yy, lc_yy), null, null, null, null));  
236 141
237 - editInfo.getContents().add(fcInfos);  
238 - }  
239 - editInfo.getHeader().addAll(Arrays.asList(headarrays));  
240 -  
241 - editInfo.setYy_desc(String.format("空驶班次=%d,营运班次=%d,空驶里程=%.3f,营运里程=%.3f,总里程=%.3f", all_bc_ks, all_bc_yy, all_lc_ks, all_lc_yy, all_lc_ks + all_lc_yy));  
242 - }  
243 -  
244 - LOGGER.info("//---------------- 时刻表编辑用数据输出 success... ----------------//");  
245 -  
246 - return editInfo;  
247 - } catch (Exception exp) {  
248 - LOGGER.info("//---------------- 时刻表编辑用数据输出 failed... ----------------//");  
249 -  
250 - StringWriter sw = new StringWriter();  
251 - exp.printStackTrace(new PrintWriter(sw));  
252 - LOGGER.info(sw.toString());  
253 -  
254 - throw new ScheduleException(exp.getMessage());  
255 - } 142 + @Override
  143 + public TTInfoDetailForEdit.EditInfo getEditInfo(Integer xlid, Long ttid, Long maxfcno) throws ScheduleException {
  144 + return ttInfoDetailForEdit.getEditInfo(xlid, ttid, maxfcno);
256 } 145 }
257 146
258 -  
259 -  
260 @Override 147 @Override
261 public void validateExcelSheet(String filename, String sheetname, Integer lineid, String linename) throws ScheduleException { 148 public void validateExcelSheet(String filename, String sheetname, Integer lineid, String linename) throws ScheduleException {
262 try { 149 try {
src/main/java/com/bsth/service/schedule/utils/DataToolsServiceImpl.java
@@ -125,7 +125,7 @@ public class DataToolsServiceImpl implements DataToolsService { @@ -125,7 +125,7 @@ public class DataToolsServiceImpl implements DataToolsService {
125 exp.printStackTrace(new PrintWriter(sw)); 125 exp.printStackTrace(new PrintWriter(sw));
126 LOGGER.info(sw.toString()); 126 LOGGER.info(sw.toString());
127 127
128 - throw new ScheduleException("上传文件错误!"); 128 + throw new ScheduleException(exp);
129 } 129 }
130 } 130 }
131 131
@@ -184,7 +184,7 @@ public class DataToolsServiceImpl implements DataToolsService { @@ -184,7 +184,7 @@ public class DataToolsServiceImpl implements DataToolsService {
184 exp.printStackTrace(new PrintWriter(sw)); 184 exp.printStackTrace(new PrintWriter(sw));
185 LOGGER.info(sw.toString()); 185 LOGGER.info(sw.toString());
186 186
187 - throw new ScheduleException("导入数据错误!"); 187 + throw new ScheduleException(exp);
188 } finally { 188 } finally {
189 // 清除日志操作 189 // 清除日志操作
190 KettleLogStore.discardLines(transLogId, true); 190 KettleLogStore.discardLines(transLogId, true);
@@ -259,7 +259,7 @@ public class DataToolsServiceImpl implements DataToolsService { @@ -259,7 +259,7 @@ public class DataToolsServiceImpl implements DataToolsService {
259 exp.printStackTrace(new PrintWriter(sw)); 259 exp.printStackTrace(new PrintWriter(sw));
260 LOGGER.info(sw.toString()); 260 LOGGER.info(sw.toString());
261 261
262 - throw new ScheduleException("导出数据错误!"); 262 + throw new ScheduleException(exp);
263 } finally { 263 } finally {
264 // 清除日志操作 264 // 清除日志操作
265 KettleLogStore.discardLines(transLogId, true); 265 KettleLogStore.discardLines(transLogId, true);
src/main/resources/application-dev.properties
@@ -6,7 +6,7 @@ spring.jpa.hibernate.ddl-auto= update @@ -6,7 +6,7 @@ spring.jpa.hibernate.ddl-auto= update
6 spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy 6 spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
7 #DATABASE 7 #DATABASE
8 spring.jpa.database= MYSQL 8 spring.jpa.database= MYSQL
9 -spring.jpa.show-sql= true 9 +spring.jpa.show-sql= false
10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver 10 spring.datasource.driver-class-name= com.mysql.jdbc.Driver
11 spring.datasource.url= jdbc:mysql://127.0.0.1/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false 11 spring.datasource.url= jdbc:mysql://127.0.0.1/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
12 spring.datasource.username= root 12 spring.datasource.username= root
src/main/resources/static/pages/report/timetable/timetable.html
@@ -45,7 +45,7 @@ @@ -45,7 +45,7 @@
45 </div> 45 </div>
46 <div class="form-group"> 46 <div class="form-group">
47 <input class="btn btn-default" type="button" id="query" value="查询"/> 47 <input class="btn btn-default" type="button" id="query" value="查询"/>
48 - <input class="btn btn-default" type="button" id="export" value="导出"/> 48 +<!-- <input class="btn btn-default" type="button" id="export" value="导出"/> -->
49 </div> 49 </div>
50 </form> 50 </form>
51 </div> 51 </div>
@@ -165,18 +165,19 @@ @@ -165,18 +165,19 @@
165 <div class="col-md-6" > 165 <div class="col-md-6" >
166 <table class="table table-bordered table-checkable" id="formsTime5"> 166 <table class="table table-bordered table-checkable" id="formsTime5">
167 <tr> 167 <tr>
168 - <td colspan="6">全日分组行驶时间(区间除外)</td> 168 + <td colspan="7">全日分组行驶时间(区间除外)</td>
169 </tr> 169 </tr>
170 <tr> 170 <tr>
171 <td width="20%" rowspan="2" style="text-align:center;vertical-align:middle;">分组 时间</td> 171 <td width="20%" rowspan="2" style="text-align:center;vertical-align:middle;">分组 时间</td>
172 - <td width="25%" colspan="2" style="text-align:center;vertical-align:middle;">计划行驶(分)</td>  
173 - <td width="20%" rowspan="2" style="text-align:center;vertical-align:middle;">分圈 时间</td>  
174 - <td width="20%" rowspan="2" style="text-align:center;vertical-align:middle;">车距区间</td>  
175 - <td width="15%" rowspan="2" style="text-align:center;vertical-align:middle;">平均车距</td> 172 + <td width="23%" colspan="2" style="text-align:center;vertical-align:middle;">计划行驶(分)</td>
  173 + <td width="15%" rowspan="2" style="text-align:center;vertical-align:middle;">分圈时间</td>
  174 + <td width="15%" rowspan="2" style="text-align:center;vertical-align:middle;">停驶时间</td>
  175 + <td width="15%" rowspan="2" style="text-align:center;vertical-align:middle;">车距区间</td>
  176 + <td width="12%" rowspan="2" style="text-align:center;vertical-align:middle;">平均车距</td>
176 </tr> 177 </tr>
177 <tr> 178 <tr>
178 <td>上行</td> 179 <td>上行</td>
179 - <td>下行</td> 180 + <td style="text-align:center;">下行</td>
180 </tr> 181 </tr>
181 <tbody class="tbody_time_5"> 182 <tbody class="tbody_time_5">
182 183
@@ -313,8 +314,8 @@ @@ -313,8 +314,8 @@
313 }); 314 });
314 315
315 $.get('/report/tbodyTime4',{line:line,ttinfo:ttinfo},function(result){ 316 $.get('/report/tbodyTime4',{line:line,ttinfo:ttinfo},function(result){
316 - $("#skb_sxzd").html(result[0].sxzm);  
317 - $("#skb_xxzd").html(result[0].xxzm); 317 + $("#skb_sxzd").html(result[0].sxqdz);
  318 + $("#skb_xxzd").html(result[0].xxqdz);
318 var tbodyTime4 = template('tbodyTime4',{list:result}); 319 var tbodyTime4 = template('tbodyTime4',{list:result});
319 $('#formsTime4 .tbody_time_4').html(tbodyTime4); 320 $('#formsTime4 .tbody_time_4').html(tbodyTime4);
320 }); 321 });
@@ -377,11 +378,11 @@ @@ -377,11 +378,11 @@
377 {{each list as result i}} 378 {{each list as result i}}
378 379
379 <tr> 380 <tr>
380 - <td align="center">{{result.sxzm}}</td>  
381 - <td align="center">{{result.sxsj}}</td> 381 + <td align="center">{{result.sxqdz}}</td>
  382 + <td align="center">{{result.sxfcsj}}</td>
382 <td align="center">{{result.sxbc}}</td> 383 <td align="center">{{result.sxbc}}</td>
383 - <td align="center">{{result.xxzm}}</td>  
384 - <td align="center">{{result.xxsj}}</td> 384 + <td align="center">{{result.xxqdz}}</td>
  385 + <td align="center">{{result.xxfcsj}}</td>
385 <td align="center">{{result.xxbc}}</td> 386 <td align="center">{{result.xxbc}}</td>
386 </tr> 387 </tr>
387 {{/each}} 388 {{/each}}
@@ -399,13 +400,14 @@ @@ -399,13 +400,14 @@
399 <td align="center">{{result.sxsj}}</td> 400 <td align="center">{{result.sxsj}}</td>
400 <td align="center">{{result.xxsj}}</td> 401 <td align="center">{{result.xxsj}}</td>
401 <td align="center">{{result.fqsj}}</td> 402 <td align="center">{{result.fqsj}}</td>
  403 + <td align="center">{{result.tssj}}</td>
402 <td align="center">{{result.cjqj}}</td> 404 <td align="center">{{result.cjqj}}</td>
403 <td align="center">{{result.pjcj}}</td> 405 <td align="center">{{result.pjcj}}</td>
404 </tr> 406 </tr>
405 {{/each}} 407 {{/each}}
406 {{if list.length == 0}} 408 {{if list.length == 0}}
407 <tr> 409 <tr>
408 - <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td> 410 + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
409 </tr> 411 </tr>
410 {{/if}} 412 {{/if}}
411 </script> 413 </script>
src/main/resources/static/real_control_v2/assets/plugins/layer3.0.3/layer.js
1 -/** 1 +/**
2 2
3 @Name:layer v3.0.3 Web弹层组件 3 @Name:layer v3.0.3 Web弹层组件
4 @Author:贤心 4 @Author:贤心
@@ -1267,4 +1267,4 @@ @@ -1267,4 +1267,4 @@
1267 }() 1267 }()
1268 ); 1268 );
1269 1269
1270 -}(window); 1270 -}(window);
  1271 +}(window);
1271 \ No newline at end of file 1272 \ No newline at end of file
src/main/resources/static/real_control_v2/assets/plugins/layer3.0.3/skin/default/layer.css
1 -/**  
2 -  
3 - @Name: layer  
4 - @Author: 贤心  
5 -  
6 - **/  
7 -  
8 -*html{background-image: url(about:blank); background-attachment: fixed;}  
9 -html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;}  
10 -  
11 -/* common */  
12 -.layui-layer-shade, .layui-layer{position:fixed; _position:absolute; pointer-events: auto;}  
13 -.layui-layer-shade{top:0; left:0; width:100%; height:100%; _height:expression(document.body.offsetHeight+"px");}  
14 -.layui-layer{-webkit-overflow-scrolling: touch;}  
15 -.layui-layer{top:150px; left: 0; margin:0; padding:0; background-color:#fff; -webkit-background-clip: content; box-shadow: 1px 1px 50px rgba(0,0,0,.3);}  
16 -.layui-layer-close{position:absolute;}  
17 -.layui-layer-content{position:relative;}  
18 -.layui-layer-border{border: 1px solid #B2B2B2; border: 1px solid rgba(0,0,0,.1); box-shadow: 1px 1px 5px rgba(0,0,0,.2);}  
19 -.layui-layer-load{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-1.gif") #eee center center no-repeat;}  
20 -.layui-layer-ico{ background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/icon.png") no-repeat;}  
21 -.layui-layer-dialog .layui-layer-ico,  
22 -.layui-layer-setwin a,  
23 -.layui-layer-btn a{display:inline-block; *display:inline; *zoom:1; vertical-align:top;}  
24 -  
25 -.layui-layer-move{display: none; position: fixed; *position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; cursor: move; opacity: 0; filter:alpha(opacity=0); background-color: #fff; z-index: 2147483647;}  
26 -.layui-layer-resize{position: absolute; width: 15px; height: 15px; right: 0; bottom: 0; cursor: se-resize;}  
27 -  
28 -/* 动画 */  
29 -.layui-layer{border-radius: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-duration:.3s; animation-duration:.3s;}  
30 -  
31 -@-webkit-keyframes layer-bounceIn { /* 默认 */  
32 - 0% {opacity: 0; -webkit-transform: scale(.5); transform: scale(.5)}  
33 - 100% {opacity: 1; -webkit-transform: scale(1); transform: scale(1)}  
34 -}  
35 -@keyframes layer-bounceIn {  
36 - 0% {opacity: 0; -webkit-transform: scale(.5); -ms-transform: scale(.5); transform: scale(.5)}  
37 - 100% {opacity: 1; -webkit-transform: scale(1); -ms-transform: scale(1); transform: scale(1)}  
38 -}  
39 -.layer-anim{-webkit-animation-name: layer-bounceIn;animation-name: layer-bounceIn}  
40 -  
41 -@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}  
42 -  
43 -@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}  
44 -  
45 -@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}  
46 -  
47 -@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg);transform:translateX(0px) rotate(0deg)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg);-ms-transform:translateX(0px) rotate(0deg);transform:translateX(0px) rotate(0deg)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}  
48 -  
49 -@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}  
50 -  
51 -@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}  
52 -  
53 -/* 标题栏 */  
54 -.layui-layer-title{padding:0 80px 0 20px; height:42px; line-height:42px; border-bottom:1px solid #eee; font-size:14px; color:#333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background-color: #F8F8F8; border-radius: 2px 2px 0 0;}  
55 -.layui-layer-setwin{position:absolute; right:15px; *right:0; top:15px; font-size:0; line-height: initial;}  
56 -.layui-layer-setwin a{position:relative; width: 16px; height:16px; margin-left:10px; font-size:12px; _overflow:hidden;}  
57 -.layui-layer-setwin .layui-layer-min cite{position:absolute; width:14px; height:2px; left:0; top:50%; margin-top:-1px; background-color:#2E2D3C; cursor:pointer; _overflow:hidden;}  
58 -.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA; }  
59 -.layui-layer-setwin .layui-layer-max{background-position:-32px -40px;}  
60 -.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px;}  
61 -.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px;}  
62 -.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px;}  
63 -.layui-layer-setwin .layui-layer-close1{background-position: 1px -40px; cursor: pointer;}  
64 -.layui-layer-setwin .layui-layer-close1:hover{opacity:0.7;}  
65 -.layui-layer-setwin .layui-layer-close2{position:absolute; right:-28px; top:-28px; width:30px; height:30px; margin-left:0; background-position:-149px -31px; *right:-18px; _display:none;}  
66 -.layui-layer-setwin .layui-layer-close2:hover{ background-position:-180px -31px;}  
67 -  
68 -/* 按钮栏 */  
69 -.layui-layer-btn{text-align: right; padding:0 10px 12px; pointer-events: auto; user-select: none; -webkit-user-select: none;}  
70 -.layui-layer-btn a{height: 28px; line-height: 28px; margin: 6px 6px 0; padding: 0 15px; border:1px #dedede solid; background-color:#f1f1f1; color: #333; border-radius: 2px; font-weight:400; cursor:pointer; text-decoration: none;}  
71 -.layui-layer-btn a:hover{opacity: 0.9; text-decoration: none;}  
72 -.layui-layer-btn a:active{opacity: 0.8;}  
73 -.layui-layer-btn .layui-layer-btn0{border-color: #4898d5; background-color: #2e8ded; color:#fff;}  
74 -.layui-layer-btn-l{text-align: left;}  
75 -.layui-layer-btn-c{text-align: center;}  
76 -  
77 -/* 定制化 */  
78 -.layui-layer-dialog{min-width:260px;}  
79 -.layui-layer-dialog .layui-layer-content{position: relative; padding:20px; line-height:24px; word-break: break-all; overflow:hidden; font-size:14px; overflow-x: hidden; overflow-y:auto;}  
80 -.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute; top:16px; left:15px; _left:-40px; width:30px; height:30px;}  
81 -.layui-layer-ico1{background-position:-30px 0 }  
82 -.layui-layer-ico2{background-position:-60px 0;}  
83 -.layui-layer-ico3{background-position:-90px 0;}  
84 -.layui-layer-ico4{background-position:-120px 0;}  
85 -.layui-layer-ico5{background-position:-150px 0;}  
86 -.layui-layer-ico6{background-position:-180px 0;}  
87 -.layui-layer-rim{border:6px solid #8D8D8D; border:6px solid rgba(0,0,0,.3); border-radius:5px; box-shadow: none;}  
88 -.layui-layer-msg{min-width:180px; border:1px solid #D3D4D3; box-shadow: none;}  
89 -.layui-layer-hui{min-width:100px; background-color: #000; filter:alpha(opacity=60); background-color: rgba(0,0,0,0.6); color: #fff; border:none;}  
90 -.layui-layer-hui .layui-layer-content{padding:12px 25px; text-align:center;}  
91 -.layui-layer-dialog .layui-layer-padding{padding: 20px 20px 20px 55px; text-align: left;}  
92 -.layui-layer-page .layui-layer-content{position:relative; overflow:auto;}  
93 -.layui-layer-page .layui-layer-btn,.layui-layer-iframe .layui-layer-btn{padding-top:10px;}  
94 -.layui-layer-nobg{background:none;}  
95 -.layui-layer-iframe iframe{display: block; width: 100%;}  
96 -  
97 -.layui-layer-loading{border-radius:100%; background:none; box-shadow:none; border:none;}  
98 -.layui-layer-loading .layui-layer-content{width:60px; height:24px; background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-0.gif") no-repeat;}  
99 -.layui-layer-loading .layui-layer-loading1{width:37px; height:37px; background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-1.gif") no-repeat;}  
100 -.layui-layer-loading .layui-layer-loading2, .layui-layer-ico16{width:32px; height:32px; background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-2.gif") no-repeat;}  
101 -.layui-layer-tips{background: none; box-shadow:none; border:none;}  
102 -.layui-layer-tips .layui-layer-content{position: relative; line-height: 22px; min-width: 12px; padding: 5px 10px; font-size: 12px; _float:left; border-radius: 2px; box-shadow: 1px 1px 3px rgba(0,0,0,.2); background-color: #000; color: #fff;}  
103 -.layui-layer-tips .layui-layer-close{right:-2px; top:-1px;}  
104 -.layui-layer-tips i.layui-layer-TipsG{ position:absolute; width:0; height:0; border-width:8px; border-color:transparent; border-style:dashed; *overflow:hidden;}  
105 -.layui-layer-tips i.layui-layer-TipsT, .layui-layer-tips i.layui-layer-TipsB{left:5px; border-right-style:solid; border-right-color: #000;}  
106 -.layui-layer-tips i.layui-layer-TipsT{bottom:-8px;}  
107 -.layui-layer-tips i.layui-layer-TipsB{top:-8px;}  
108 -.layui-layer-tips i.layui-layer-TipsR, .layui-layer-tips i.layui-layer-TipsL{top:1px; border-bottom-style:solid; border-bottom-color: #000;}  
109 -.layui-layer-tips i.layui-layer-TipsR{left:-8px;}  
110 -.layui-layer-tips i.layui-layer-TipsL{right:-8px;}  
111 -  
112 -/* skin */  
113 -.layui-layer-lan[type="dialog"]{min-width:280px;}  
114 -.layui-layer-lan .layui-layer-title{background:#4476A7; color:#fff; border: none;}  
115 -.layui-layer-lan .layui-layer-btn{padding: 5px 10px 10px; text-align: right; border-top:1px solid #E9E7E7}  
116 -.layui-layer-lan .layui-layer-btn a{background:#BBB5B5; border:none;}  
117 -.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5;}  
118 -.layui-layer-molv .layui-layer-title{background:#009f95; color:#fff; border: none;}  
119 -.layui-layer-molv .layui-layer-btn a{background:#009f95;}  
120 -.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1;}  
121 -  
122 -  
123 -  
124 -/**  
125 -  
126 - @Name: layer拓展样式  
127 -  
128 - */  
129 -  
130 -.layui-layer-iconext{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/icon-ext.png") no-repeat;}  
131 -  
132 -/* prompt模式 */  
133 -.layui-layer-prompt .layui-layer-input{display:block; width:220px; height:30px; margin:0 auto; line-height:30px; padding: 0 5px; border: 1px solid #ccc; box-shadow: 1px 1px 5px rgba(0,0,0,.1) inset; color:#333;}  
134 -.layui-layer-prompt textarea.layui-layer-input{width:300px; height:100px; line-height:20px;}  
135 -.layui-layer-prompt .layui-layer-content{padding: 20px;}  
136 -.layui-layer-prompt .layui-layer-btn{padding-top: 0;}  
137 -  
138 -/* tab模式 */  
139 -.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4);}  
140 -.layui-layer-tab .layui-layer-title{padding-left:0; border-bottom:1px solid #ccc; background-color:#eee; overflow: visible;}  
141 -.layui-layer-tab .layui-layer-title span{position:relative; float:left; min-width:80px; max-width:260px; padding:0 20px; text-align:center; cursor:default; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}  
142 -.layui-layer-tab .layui-layer-title span.layui-layer-tabnow{height:43px; border-left:1px solid #ccc; border-right:1px solid #ccc; background-color:#fff; z-index:10;}  
143 -.layui-layer-tab .layui-layer-title span:first-child{border-left:none;}  
144 -.layui-layer-tabmain{line-height:24px; clear:both;}  
145 -.layui-layer-tabmain .layui-layer-tabli{display:none;}  
146 -.layui-layer-tabmain .layui-layer-tabli.xubox_tab_layer{display:block;}  
147 -.xubox_tabclose{position:absolute; right:10px; top:5px; cursor:pointer;}  
148 -  
149 -/* photo模式 */  
150 -.layui-layer-photos{-webkit-animation-duration: .8s; animation-duration: .8s;}  
151 -.layui-layer-photos .layui-layer-content{overflow:hidden; text-align: center;}  
152 -.layui-layer-photos .layui-layer-phimg img{position: relative; width:100%; display: inline-block; *display:inline; *zoom:1; vertical-align:top;}  
153 -.layui-layer-imguide,.layui-layer-imgbar{display:none;}  
154 -.layui-layer-imgprev, .layui-layer-imgnext{position:absolute; top:50%; width:27px; _width:44px; height:44px; margin-top:-22px; outline:none;blr:expression(this.onFocus=this.blur());}  
155 -.layui-layer-imgprev{left:10px; background-position:-5px -5px; _background-position:-70px -5px;}  
156 -.layui-layer-imgprev:hover{background-position:-33px -5px; _background-position:-120px -5px;}  
157 -.layui-layer-imgnext{right:10px; _right:8px; background-position:-5px -50px; _background-position:-70px -50px;}  
158 -.layui-layer-imgnext:hover{background-position:-33px -50px; _background-position:-120px -50px;}  
159 -.layui-layer-imgbar{position:absolute; left:0; bottom:0; width:100%; height:32px; line-height:32px; background-color:rgba(0,0,0,.8); background-color:#000\9; filter:Alpha(opacity=80); color:#fff; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-size:0;}  
160 -.layui-layer-imgtit{/*position:absolute; left:20px;*/}  
161 -.layui-layer-imgtit *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; font-size:12px;}  
162 -.layui-layer-imgtit a{max-width:65%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; color:#fff;}  
163 -.layui-layer-imgtit a:hover{color:#fff; text-decoration:underline;}  
164 -.layui-layer-imgtit em{padding-left:10px; font-style: normal;}  
165 -  
166 -/* 关闭动画 */  
167 -@-webkit-keyframes layer-bounceOut {  
168 - 100% {opacity: 0; -webkit-transform: scale(.7); transform: scale(.7)}  
169 - 30% {-webkit-transform: scale(1.05); transform: scale(1.05)}  
170 - 0% {-webkit-transform: scale(1); transform: scale(1);}  
171 -}  
172 -@keyframes layer-bounceOut {  
173 - 100% {opacity: 0; -webkit-transform: scale(.7); -ms-transform: scale(.7); transform: scale(.7);}  
174 - 30% {-webkit-transform: scale(1.05); -ms-transform: scale(1.05); transform: scale(1.05);}  
175 - 0% {-webkit-transform: scale(1); -ms-transform: scale(1);transform: scale(1);}  
176 -}  
177 -.layer-anim-close{-webkit-animation-name: layer-bounceOut;animation-name: layer-bounceOut; -webkit-animation-duration:.2s; animation-duration:.2s;}  
178 -  
179 -@media screen and (max-width: 1100px) {  
180 - .layui-layer-iframe{overflow-y: auto; -webkit-overflow-scrolling: touch;}  
181 -}  
182 -  
183 - 1 +/**
  2 +
  3 + @Name: layer
  4 + @Author: 贤心
  5 +
  6 + **/
  7 +
  8 +*html{background-image: url(about:blank); background-attachment: fixed;}
  9 +html #layuicss-skinlayercss{display: none; position: absolute; width: 1989px;}
  10 +
  11 +/* common */
  12 +.layui-layer-shade, .layui-layer{position:fixed; _position:absolute; pointer-events: auto;}
  13 +.layui-layer-shade{top:0; left:0; width:100%; height:100%; _height:expression(document.body.offsetHeight+"px");}
  14 +.layui-layer{-webkit-overflow-scrolling: touch;}
  15 +.layui-layer{top:150px; left: 0; margin:0; padding:0; background-color:#fff; -webkit-background-clip: content; box-shadow: 1px 1px 50px rgba(0,0,0,.3);}
  16 +.layui-layer-close{position:absolute;}
  17 +.layui-layer-content{position:relative;}
  18 +.layui-layer-border{border: 1px solid #B2B2B2; border: 1px solid rgba(0,0,0,.1); box-shadow: 1px 1px 5px rgba(0,0,0,.2);}
  19 +.layui-layer-load{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-1.gif") #eee center center no-repeat;}
  20 +.layui-layer-ico{ background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/icon.png") no-repeat;}
  21 +.layui-layer-dialog .layui-layer-ico,
  22 +.layui-layer-setwin a,
  23 +.layui-layer-btn a{display:inline-block; *display:inline; *zoom:1; vertical-align:top;}
  24 +
  25 +.layui-layer-move{display: none; position: fixed; *position: absolute; left: 0px; top: 0px; width: 100%; height: 100%; cursor: move; opacity: 0; filter:alpha(opacity=0); background-color: #fff; z-index: 2147483647;}
  26 +.layui-layer-resize{position: absolute; width: 15px; height: 15px; right: 0; bottom: 0; cursor: se-resize;}
  27 +
  28 +/* 动画 */
  29 +.layui-layer{border-radius: 2px; -webkit-animation-fill-mode: both; animation-fill-mode: both; -webkit-animation-duration:.3s; animation-duration:.3s;}
  30 +
  31 +@-webkit-keyframes layer-bounceIn { /* 默认 */
  32 + 0% {opacity: 0; -webkit-transform: scale(.5); transform: scale(.5)}
  33 + 100% {opacity: 1; -webkit-transform: scale(1); transform: scale(1)}
  34 +}
  35 +@keyframes layer-bounceIn {
  36 + 0% {opacity: 0; -webkit-transform: scale(.5); -ms-transform: scale(.5); transform: scale(.5)}
  37 + 100% {opacity: 1; -webkit-transform: scale(1); -ms-transform: scale(1); transform: scale(1)}
  38 +}
  39 +.layer-anim{-webkit-animation-name: layer-bounceIn;animation-name: layer-bounceIn}
  40 +
  41 +@-webkit-keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInDown{0%{opacity:0;-webkit-transform:scale(.1) translateY(-2000px);-ms-transform:scale(.1) translateY(-2000px);transform:scale(.1) translateY(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateY(60px);-ms-transform:scale(.475) translateY(60px);transform:scale(.475) translateY(60px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-01{-webkit-animation-name:layer-zoomInDown;animation-name:layer-zoomInDown}
  42 +
  43 +@-webkit-keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);transform:translateY(0)}}@keyframes layer-fadeInUpBig{0%{opacity:0;-webkit-transform:translateY(2000px);-ms-transform:translateY(2000px);transform:translateY(2000px)}100%{opacity:1;-webkit-transform:translateY(0);-ms-transform:translateY(0);transform:translateY(0)}}.layer-anim-02{-webkit-animation-name:layer-fadeInUpBig;animation-name:layer-fadeInUpBig}
  44 +
  45 +@-webkit-keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}@keyframes layer-zoomInLeft{0%{opacity:0;-webkit-transform:scale(.1) translateX(-2000px);-ms-transform:scale(.1) translateX(-2000px);transform:scale(.1) translateX(-2000px);-webkit-animation-timing-function:ease-in-out;animation-timing-function:ease-in-out}60%{opacity:1;-webkit-transform:scale(.475) translateX(48px);-ms-transform:scale(.475) translateX(48px);transform:scale(.475) translateX(48px);-webkit-animation-timing-function:ease-out;animation-timing-function:ease-out}}.layer-anim-03{-webkit-animation-name:layer-zoomInLeft;animation-name:layer-zoomInLeft}
  46 +
  47 +@-webkit-keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg);transform:translateX(0px) rotate(0deg)}}@keyframes layer-rollIn{0%{opacity:0;-webkit-transform:translateX(-100%) rotate(-120deg);-ms-transform:translateX(-100%) rotate(-120deg);transform:translateX(-100%) rotate(-120deg)}100%{opacity:1;-webkit-transform:translateX(0px) rotate(0deg);-ms-transform:translateX(0px) rotate(0deg);transform:translateX(0px) rotate(0deg)}}.layer-anim-04{-webkit-animation-name:layer-rollIn;animation-name:layer-rollIn}
  48 +
  49 +@keyframes layer-fadeIn{0%{opacity:0}100%{opacity:1}}.layer-anim-05{-webkit-animation-name:layer-fadeIn;animation-name:layer-fadeIn}
  50 +
  51 +@-webkit-keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);transform:translateX(10px)}}@keyframes layer-shake{0%,100%{-webkit-transform:translateX(0);-ms-transform:translateX(0);transform:translateX(0)}10%,30%,50%,70%,90%{-webkit-transform:translateX(-10px);-ms-transform:translateX(-10px);transform:translateX(-10px)}20%,40%,60%,80%{-webkit-transform:translateX(10px);-ms-transform:translateX(10px);transform:translateX(10px)}}.layer-anim-06{-webkit-animation-name:layer-shake;animation-name:layer-shake}@-webkit-keyframes fadeIn{0%{opacity:0}100%{opacity:1}}
  52 +
  53 +/* 标题栏 */
  54 +.layui-layer-title{padding:0 80px 0 20px; height:42px; line-height:42px; border-bottom:1px solid #eee; font-size:14px; color:#333; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; background-color: #F8F8F8; border-radius: 2px 2px 0 0;}
  55 +.layui-layer-setwin{position:absolute; right:15px; *right:0; top:15px; font-size:0; line-height: initial;}
  56 +.layui-layer-setwin a{position:relative; width: 16px; height:16px; margin-left:10px; font-size:12px; _overflow:hidden;}
  57 +.layui-layer-setwin .layui-layer-min cite{position:absolute; width:14px; height:2px; left:0; top:50%; margin-top:-1px; background-color:#2E2D3C; cursor:pointer; _overflow:hidden;}
  58 +.layui-layer-setwin .layui-layer-min:hover cite{background-color:#2D93CA; }
  59 +.layui-layer-setwin .layui-layer-max{background-position:-32px -40px;}
  60 +.layui-layer-setwin .layui-layer-max:hover{background-position:-16px -40px;}
  61 +.layui-layer-setwin .layui-layer-maxmin{background-position:-65px -40px;}
  62 +.layui-layer-setwin .layui-layer-maxmin:hover{background-position:-49px -40px;}
  63 +.layui-layer-setwin .layui-layer-close1{background-position: 1px -40px; cursor: pointer;}
  64 +.layui-layer-setwin .layui-layer-close1:hover{opacity:0.7;}
  65 +.layui-layer-setwin .layui-layer-close2{position:absolute; right:-28px; top:-28px; width:30px; height:30px; margin-left:0; background-position:-149px -31px; *right:-18px; _display:none;}
  66 +.layui-layer-setwin .layui-layer-close2:hover{ background-position:-180px -31px;}
  67 +
  68 +/* 按钮栏 */
  69 +.layui-layer-btn{text-align: right; padding:0 10px 12px; pointer-events: auto; user-select: none; -webkit-user-select: none;}
  70 +.layui-layer-btn a{height: 28px; line-height: 28px; margin: 6px 6px 0; padding: 0 15px; border:1px #dedede solid; background-color:#f1f1f1; color: #333; border-radius: 2px; font-weight:400; cursor:pointer; text-decoration: none;}
  71 +.layui-layer-btn a:hover{opacity: 0.9; text-decoration: none;}
  72 +.layui-layer-btn a:active{opacity: 0.8;}
  73 +.layui-layer-btn .layui-layer-btn0{border-color: #4898d5; background-color: #2e8ded; color:#fff;}
  74 +.layui-layer-btn-l{text-align: left;}
  75 +.layui-layer-btn-c{text-align: center;}
  76 +
  77 +/* 定制化 */
  78 +.layui-layer-dialog{min-width:260px;}
  79 +.layui-layer-dialog .layui-layer-content{position: relative; padding:20px; line-height:24px; word-break: break-all; overflow:hidden; font-size:14px; overflow-x: hidden; overflow-y:auto;}
  80 +.layui-layer-dialog .layui-layer-content .layui-layer-ico{position:absolute; top:16px; left:15px; _left:-40px; width:30px; height:30px;}
  81 +.layui-layer-ico1{background-position:-30px 0 }
  82 +.layui-layer-ico2{background-position:-60px 0;}
  83 +.layui-layer-ico3{background-position:-90px 0;}
  84 +.layui-layer-ico4{background-position:-120px 0;}
  85 +.layui-layer-ico5{background-position:-150px 0;}
  86 +.layui-layer-ico6{background-position:-180px 0;}
  87 +.layui-layer-rim{border:6px solid #8D8D8D; border:6px solid rgba(0,0,0,.3); border-radius:5px; box-shadow: none;}
  88 +.layui-layer-msg{min-width:180px; border:1px solid #D3D4D3; box-shadow: none;}
  89 +.layui-layer-hui{min-width:100px; background-color: #000; filter:alpha(opacity=60); background-color: rgba(0,0,0,0.6); color: #fff; border:none;}
  90 +.layui-layer-hui .layui-layer-content{padding:12px 25px; text-align:center;}
  91 +.layui-layer-dialog .layui-layer-padding{padding: 20px 20px 20px 55px; text-align: left;}
  92 +.layui-layer-page .layui-layer-content{position:relative; overflow:auto;}
  93 +.layui-layer-page .layui-layer-btn,.layui-layer-iframe .layui-layer-btn{padding-top:10px;}
  94 +.layui-layer-nobg{background:none;}
  95 +.layui-layer-iframe iframe{display: block; width: 100%;}
  96 +
  97 +.layui-layer-loading{border-radius:100%; background:none; box-shadow:none; border:none;}
  98 +.layui-layer-loading .layui-layer-content{width:60px; height:24px; background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-0.gif") no-repeat;}
  99 +.layui-layer-loading .layui-layer-loading1{width:37px; height:37px; background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-1.gif") no-repeat;}
  100 +.layui-layer-loading .layui-layer-loading2, .layui-layer-ico16{width:32px; height:32px; background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/loading-2.gif") no-repeat;}
  101 +.layui-layer-tips{background: none; box-shadow:none; border:none;}
  102 +.layui-layer-tips .layui-layer-content{position: relative; line-height: 22px; min-width: 12px; padding: 5px 10px; font-size: 12px; _float:left; border-radius: 2px; box-shadow: 1px 1px 3px rgba(0,0,0,.2); background-color: #000; color: #fff;}
  103 +.layui-layer-tips .layui-layer-close{right:-2px; top:-1px;}
  104 +.layui-layer-tips i.layui-layer-TipsG{ position:absolute; width:0; height:0; border-width:8px; border-color:transparent; border-style:dashed; *overflow:hidden;}
  105 +.layui-layer-tips i.layui-layer-TipsT, .layui-layer-tips i.layui-layer-TipsB{left:5px; border-right-style:solid; border-right-color: #000;}
  106 +.layui-layer-tips i.layui-layer-TipsT{bottom:-8px;}
  107 +.layui-layer-tips i.layui-layer-TipsB{top:-8px;}
  108 +.layui-layer-tips i.layui-layer-TipsR, .layui-layer-tips i.layui-layer-TipsL{top:1px; border-bottom-style:solid; border-bottom-color: #000;}
  109 +.layui-layer-tips i.layui-layer-TipsR{left:-8px;}
  110 +.layui-layer-tips i.layui-layer-TipsL{right:-8px;}
  111 +
  112 +/* skin */
  113 +.layui-layer-lan[type="dialog"]{min-width:280px;}
  114 +.layui-layer-lan .layui-layer-title{background:#4476A7; color:#fff; border: none;}
  115 +.layui-layer-lan .layui-layer-btn{padding: 5px 10px 10px; text-align: right; border-top:1px solid #E9E7E7}
  116 +.layui-layer-lan .layui-layer-btn a{background:#BBB5B5; border:none;}
  117 +.layui-layer-lan .layui-layer-btn .layui-layer-btn1{background:#C9C5C5;}
  118 +.layui-layer-molv .layui-layer-title{background:#009f95; color:#fff; border: none;}
  119 +.layui-layer-molv .layui-layer-btn a{background:#009f95;}
  120 +.layui-layer-molv .layui-layer-btn .layui-layer-btn1{background:#92B8B1;}
  121 +
  122 +
  123 +
  124 +/**
  125 +
  126 + @Name: layer拓展样式
  127 +
  128 + */
  129 +
  130 +.layui-layer-iconext{background:url("/real_control_v2/assets/plugins/layer3.0.3/skin/default/icon-ext.png") no-repeat;}
  131 +
  132 +/* prompt模式 */
  133 +.layui-layer-prompt .layui-layer-input{display:block; width:220px; height:30px; margin:0 auto; line-height:30px; padding: 0 5px; border: 1px solid #ccc; box-shadow: 1px 1px 5px rgba(0,0,0,.1) inset; color:#333;}
  134 +.layui-layer-prompt textarea.layui-layer-input{width:300px; height:100px; line-height:20px;}
  135 +.layui-layer-prompt .layui-layer-content{padding: 20px;}
  136 +.layui-layer-prompt .layui-layer-btn{padding-top: 0;}
  137 +
  138 +/* tab模式 */
  139 +.layui-layer-tab{box-shadow:1px 1px 50px rgba(0,0,0,.4);}
  140 +.layui-layer-tab .layui-layer-title{padding-left:0; border-bottom:1px solid #ccc; background-color:#eee; overflow: visible;}
  141 +.layui-layer-tab .layui-layer-title span{position:relative; float:left; min-width:80px; max-width:260px; padding:0 20px; text-align:center; cursor:default; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;}
  142 +.layui-layer-tab .layui-layer-title span.layui-layer-tabnow{height:43px; border-left:1px solid #ccc; border-right:1px solid #ccc; background-color:#fff; z-index:10;}
  143 +.layui-layer-tab .layui-layer-title span:first-child{border-left:none;}
  144 +.layui-layer-tabmain{line-height:24px; clear:both;}
  145 +.layui-layer-tabmain .layui-layer-tabli{display:none;}
  146 +.layui-layer-tabmain .layui-layer-tabli.xubox_tab_layer{display:block;}
  147 +.xubox_tabclose{position:absolute; right:10px; top:5px; cursor:pointer;}
  148 +
  149 +/* photo模式 */
  150 +.layui-layer-photos{-webkit-animation-duration: .8s; animation-duration: .8s;}
  151 +.layui-layer-photos .layui-layer-content{overflow:hidden; text-align: center;}
  152 +.layui-layer-photos .layui-layer-phimg img{position: relative; width:100%; display: inline-block; *display:inline; *zoom:1; vertical-align:top;}
  153 +.layui-layer-imguide,.layui-layer-imgbar{display:none;}
  154 +.layui-layer-imgprev, .layui-layer-imgnext{position:absolute; top:50%; width:27px; _width:44px; height:44px; margin-top:-22px; outline:none;blr:expression(this.onFocus=this.blur());}
  155 +.layui-layer-imgprev{left:10px; background-position:-5px -5px; _background-position:-70px -5px;}
  156 +.layui-layer-imgprev:hover{background-position:-33px -5px; _background-position:-120px -5px;}
  157 +.layui-layer-imgnext{right:10px; _right:8px; background-position:-5px -50px; _background-position:-70px -50px;}
  158 +.layui-layer-imgnext:hover{background-position:-33px -50px; _background-position:-120px -50px;}
  159 +.layui-layer-imgbar{position:absolute; left:0; bottom:0; width:100%; height:32px; line-height:32px; background-color:rgba(0,0,0,.8); background-color:#000\9; filter:Alpha(opacity=80); color:#fff; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; font-size:0;}
  160 +.layui-layer-imgtit{/*position:absolute; left:20px;*/}
  161 +.layui-layer-imgtit *{display:inline-block; *display:inline; *zoom:1; vertical-align:top; font-size:12px;}
  162 +.layui-layer-imgtit a{max-width:65%; text-overflow: ellipsis; overflow: hidden; white-space: nowrap; color:#fff;}
  163 +.layui-layer-imgtit a:hover{color:#fff; text-decoration:underline;}
  164 +.layui-layer-imgtit em{padding-left:10px; font-style: normal;}
  165 +
  166 +/* 关闭动画 */
  167 +@-webkit-keyframes layer-bounceOut {
  168 + 100% {opacity: 0; -webkit-transform: scale(.7); transform: scale(.7)}
  169 + 30% {-webkit-transform: scale(1.05); transform: scale(1.05)}
  170 + 0% {-webkit-transform: scale(1); transform: scale(1);}
  171 +}
  172 +@keyframes layer-bounceOut {
  173 + 100% {opacity: 0; -webkit-transform: scale(.7); -ms-transform: scale(.7); transform: scale(.7);}
  174 + 30% {-webkit-transform: scale(1.05); -ms-transform: scale(1.05); transform: scale(1.05);}
  175 + 0% {-webkit-transform: scale(1); -ms-transform: scale(1);transform: scale(1);}
  176 +}
  177 +.layer-anim-close{-webkit-animation-name: layer-bounceOut;animation-name: layer-bounceOut; -webkit-animation-duration:.2s; animation-duration:.2s;}
  178 +
  179 +@media screen and (max-width: 1100px) {
  180 + .layui-layer-iframe{overflow-y: auto; -webkit-overflow-scrolling: touch;}
  181 +}
  182 +
  183 +
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/dftz.html
@@ -9,6 +9,7 @@ @@ -9,6 +9,7 @@
9 9
10 <script id="schedule-dftz-form-temp" type="text/html"> 10 <script id="schedule-dftz-form-temp" type="text/html">
11 <input type="hidden" name="id" value="{{id}}"/> 11 <input type="hidden" name="id" value="{{id}}"/>
  12 + <input type="hidden" name="opType" value="1"/>
12 <div class="uk-grid"> 13 <div class="uk-grid">
13 <div class="uk-width-1-2"> 14 <div class="uk-width-1-2">
14 <div class="uk-form-row"> 15 <div class="uk-form-row">
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/fcxxwt.html
@@ -191,8 +191,9 @@ @@ -191,8 +191,9 @@
191 e.preventDefault(); 191 e.preventDefault();
192 var data = $(this).serializeJSON(); 192 var data = $(this).serializeJSON();
193 193
194 - if(data.status==-1 && !data.adjustExps){  
195 - notify_err("烂班需要选择调整原因!"); 194 + if(!data.adjustExps && (data.status==-1
  195 + || (data.jhlc==0 && sch.bcType != 'in' && sch.bcType != 'out'))){
  196 + notify_err("当前操作需要选择调整原因!");
196 return; 197 return;
197 } 198 }
198 199
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;"> 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;"> 2 + <div class="uk-modal-dialog" style="width: 1150px;">
3 <a href="" class="uk-modal-close uk-close"></a> 3 <a href="" class="uk-modal-close uk-close"></a>
4 <div class="uk-modal-header"> 4 <div class="uk-modal-header">
5 <h2>安全驾驶图像信息(当日)</h2></div> 5 <h2>安全驾驶图像信息(当日)</h2></div>
@@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
26 <option value="A7">行驶中与人交谈</option> 26 <option value="A7">行驶中与人交谈</option>
27 </select> 27 </select>
28 <button class="uk-button">检索</button> 28 <button class="uk-button">检索</button>
29 - <a id="showSSSpVedioModal" style="color: red;float: right;font-size: 12px;">查看实时视频</a> 29 + <!--<a id="showSSSpVedioModal" style="color: red;float: right;font-size: 12px;">查看实时视频</a>-->
30 </fieldset> 30 </fieldset>
31 </form> 31 </form>
32 </div> 32 </div>
@@ -34,14 +34,15 @@ @@ -34,14 +34,15 @@
34 <table class="ct-fixed-table uk-table uk-table-hover"> 34 <table class="ct-fixed-table uk-table uk-table-hover">
35 <thead> 35 <thead>
36 <tr> 36 <tr>
37 - <th style="width: 12%;">线路</th>  
38 - <th style="width: 13%;">车辆自编号</th>  
39 - <th style="width: 13%;">设备</th>  
40 - <th style="width: 13%;">异常类型</th>  
41 - <th style="width: 17%;">时间</th>  
42 - <th style="width: 11%;">检查属性</th>  
43 - <th style="width: 11%;">图像</th> 37 + <th style="width: 10%;">线路</th>
  38 + <th style="width: 11%;">车辆自编号</th>
  39 + <th style="width: 12%;">设备</th>
  40 + <th style="width: 12%;">异常类型</th>
  41 + <th style="width: 16%;">时间</th>
  42 + <th style="width: 10%;">检查属性</th>
  43 + <th style="width: 10%;">图像</th>
44 <th>视频</th> 44 <th>视频</th>
  45 + <th style="width: 8%;">实时视频</th>
45 </tr> 46 </tr>
46 </thead> 47 </thead>
47 <tbody data-uk-observe> 48 <tbody data-uk-observe>
@@ -75,7 +76,10 @@ @@ -75,7 +76,10 @@
75 <a class="image_link" href="{{sd.url}}.jpg" data-uk-lightbox="{group:'jpg_group1'}" title="{{sd.title}}">JPG</a> 76 <a class="image_link" href="{{sd.url}}.jpg" data-uk-lightbox="{group:'jpg_group1'}" title="{{sd.title}}">JPG</a>
76 </td> 77 </td>
77 <td> 78 <td>
78 - <a class="image_link" href="{{sd.url}}.gif" data-uk-lightbox="{group:'gif_group2'}" title="{{sd.title}}">查看视频</a> 79 + <a class="image_link" href="{{sd.url}}.gif" data-uk-lightbox="{group:'gif_group2'}" title="{{sd.title}}">查看</a>
  80 + </td>
  81 + <td>
  82 + <a data-type="{{sd.yczltype}}" class="show_vedio_modal">DVR</a>
79 </td> 83 </td>
80 </tr> 84 </tr>
81 {{/each}} 85 {{/each}}
@@ -88,9 +92,14 @@ @@ -88,9 +92,14 @@
88 var page = 0; 92 var page = 0;
89 var pageSize = 12; 93 var pageSize = 12;
90 94
91 - $('#showSSSpVedioModal', modal).on('click', function () { 95 + /*$('#showSSSpVedioModal', modal).on('click', function () {
92 gb_safe_driv.showVedioModal(); 96 gb_safe_driv.showVedioModal();
  97 + });*/
  98 + //show_vedio_modal
  99 + $(modal).on('click', '.show_vedio_modal', function () {
  100 + gb_safe_driv.showVedioModal($(this).data('type'));
93 }); 101 });
  102 +
94 $(modal).on('init', function(e, data) { 103 $(modal).on('init', function(e, data) {
95 e.stopPropagation(); 104 e.stopPropagation();
96 105
src/main/resources/static/real_control_v2/js/line_schedule/dbclick.js
@@ -18,7 +18,8 @@ var gb_schedule_table_dbclick = (function() { @@ -18,7 +18,8 @@ var gb_schedule_table_dbclick = (function() {
18 gb_common.$post('/realSchedule/outgoAdjust', { 18 gb_common.$post('/realSchedule/outgoAdjust', {
19 id: id, 19 id: id,
20 dfsj: val, 20 dfsj: val,
21 - remarks: '' 21 + remarks: '',
  22 + opType: '0'
22 }, function(rs) { 23 }, function(rs) {
23 gb_schedule_table.updateSchedule(rs.ts); 24 gb_schedule_table.updateSchedule(rs.ts);
24 notify_succ('待发调整成功!'); 25 notify_succ('待发调整成功!');
src/main/resources/static/real_control_v2/js/safe_driv/safeDriv.js
@@ -10,7 +10,8 @@ var gb_safe_driv = (function () { @@ -10,7 +10,8 @@ var gb_safe_driv = (function () {
10 'A4': '未戴袖章', 10 'A4': '未戴袖章',
11 'A5': '眨眼/疲劳驾驶', 11 'A5': '眨眼/疲劳驾驶',
12 'A6': '打哈欠/打瞌睡', 12 'A6': '打哈欠/打瞌睡',
13 - 'A7': '与人交谈' 13 + 'A7': '与人交谈',
  14 + 'A9': '玩手机'
14 }; 15 };
15 16
16 var path = 'http://118.178.187.115/CurrentSafeDriving/'; 17 var path = 'http://118.178.187.115/CurrentSafeDriving/';
@@ -32,7 +33,7 @@ var gb_safe_driv = (function () { @@ -32,7 +33,7 @@ var gb_safe_driv = (function () {
32 //图片地址 33 //图片地址
33 var p = (sd.sbbh+'_'+sd.yczltype+'_'+stm.format('YYYYMMDDHHmmss')); 34 var p = (sd.sbbh+'_'+sd.yczltype+'_'+stm.format('YYYYMMDDHHmmss'));
34 var url = stm.format('YYYYMMDD')+'/'+p+'/'+p; 35 var url = stm.format('YYYYMMDD')+'/'+p+'/'+p;
35 - sd.url = path + url + '.jpg'; 36 + sd.url = path + url + '.gif';
36 37
37 var htmlStr = template('safe_driv_item-temp', sd); 38 var htmlStr = template('safe_driv_item-temp', sd);
38 var items = $wrap.find('.safe_driv_pop'), len = items.length; 39 var items = $wrap.find('.safe_driv_pop'), len = items.length;
@@ -46,12 +47,12 @@ var gb_safe_driv = (function () { @@ -46,12 +47,12 @@ var gb_safe_driv = (function () {
46 '<div class="uk-modal-dialog uk-modal-dialog-large">' + 47 '<div class="uk-modal-dialog uk-modal-dialog-large">' +
47 '<button type="button" class="uk-modal-close uk-close"></button>' + 48 '<button type="button" class="uk-modal-close uk-close"></button>' +
48 '<div class="uk-modal-header"> <h2>实时视频</h2> </div> '+ 49 '<div class="uk-modal-header"> <h2>实时视频</h2> </div> '+
49 - '<p class="loading"><i class="uk-icon-spinner uk-icon-spin"></i> 载入资源...</p><iframe id="vedioIframe" src="http://222.66.0.204:8910/transport_server/dvr_monitor1.jsp?deviceId=229L0650&channel=0"></iframe>' + 50 + '<p class="loading"><i class="uk-icon-spinner uk-icon-spin"></i> 载入资源...</p><iframe id="vedioIframe" src="http://222.66.0.204:8910/transport_server/dvr_monitor1.jsp?deviceId=229L0650&channel=^^channel^^"></iframe>' +
50 '</div>' + 51 '</div>' +
51 '</div>'; 52 '</div>';
52 53
53 $wrap.on('click', '.safe_driv_pop', function () { 54 $wrap.on('click', '.safe_driv_pop', function () {
54 - var title = $(this).data('title') + '&nbsp;<button class="uk-button uk-button-mini uk-button-primary" id="openVedioModalBtn" type="button">查看实时视频</button>'; 55 + var title = $(this).data('title') + '&nbsp;<button data-type="'+$(this).data('type')+'" class="uk-button uk-button-mini uk-button-primary" id="openVedioModalBtn" type="button">查看实时视频</button>';
55 var url = $(this).data('url'); 56 var url = $(this).data('url');
56 $(this).remove(); 57 $(this).remove();
57 var lightbox = UIkit.lightbox.create([ 58 var lightbox = UIkit.lightbox.create([
@@ -61,8 +62,19 @@ var gb_safe_driv = (function () { @@ -61,8 +62,19 @@ var gb_safe_driv = (function () {
61 lightbox.show(); 62 lightbox.show();
62 }); 63 });
63 64
64 - var showVedioModal = function () {  
65 - open_modal_dom(vedioModal ,{}, {modal: false}); 65 + var channelMap = {
  66 + 'A1': 1,
  67 + 'A2': 1,
  68 + 'A3': 1,
  69 + 'A9': 1,
  70 + 'A4': 2,
  71 + 'A5': 2,
  72 + 'A6': 2,
  73 + 'A7': 2
  74 + };
  75 + var showVedioModal = function (type) {
  76 + var channel = channelMap[type]?channelMap[type]:1;
  77 + open_modal_dom(vedioModal.replace('^^channel^^', channel) ,{}, {modal: false});
66 $('#ssspVedioModal #vedioIframe').on('load', function () { 78 $('#ssspVedioModal #vedioIframe').on('load', function () {
67 var that = this; 79 var that = this;
68 setTimeout(function () { 80 setTimeout(function () {
@@ -72,7 +84,9 @@ var gb_safe_driv = (function () { @@ -72,7 +84,9 @@ var gb_safe_driv = (function () {
72 }); 84 });
73 }; 85 };
74 86
75 - $(document).on('click', '#openVedioModalBtn', showVedioModal); 87 + $(document).on('click', '#openVedioModalBtn', function () {
  88 + showVedioModal($(this).data('type'));
  89 + });
76 90
77 91
78 return { 92 return {
src/main/resources/static/real_control_v2/main.html
@@ -206,7 +206,7 @@ @@ -206,7 +206,7 @@
206 <!-- #### 安全驾驶 start ### --> 206 <!-- #### 安全驾驶 start ### -->
207 <div class="safe_driv_pop_wrap" ></div> 207 <div class="safe_driv_pop_wrap" ></div>
208 <script id="safe_driv_item-temp" type="text/html"> 208 <script id="safe_driv_item-temp" type="text/html">
209 - <div class="safe_driv_pop uk-animation-slide-bottom" data-title="{{clzbh}} {{timeStr}} {{ycztText}}" data-url="{{url}}"> 209 + <div class="safe_driv_pop uk-animation-slide-bottom" data-type="{{yczltype}}" data-title="{{clzbh}} {{timeStr}} {{ycztText}}" data-url="{{url}}">
210 <div> 210 <div>
211 <span class="title">异常&nbsp;{{clzbh}}</span> 211 <span class="title">异常&nbsp;{{clzbh}}</span>
212 <span class="text"> {{timeStr}} 出现违规驾驶({{ycztText}})</span> 212 <span class="text"> {{timeStr}} 出现违规驾驶({{ycztText}})</span>
src/test/resources/testdata/problem.properties
@@ -20,7 +20,7 @@ @@ -20,7 +20,7 @@
20 20=排班规则备注 20 20=排班规则备注
21 ##21=时刻表,两点间空驶,算空驶 21 ##21=时刻表,两点间空驶,算空驶
22 22=搭班编码自动生成 22 22=搭班编码自动生成
23 -23=时刻表明细修改终点站停驶(停止1个半小时以上) 23 +##23=时刻表明细修改终点站停驶(停止1个半小时以上)
24 ##24=线路标准里如果里程是0,用标准里程 24 ##24=线路标准里如果里程是0,用标准里程
25 ##25=规则导出的日期格式修正 25 ##25=规则导出的日期格式修正
26 ##26=人员录入,工号规则前加 "{公司编码}-" 26 ##26=人员录入,工号规则前加 "{公司编码}-"