Commit 81631d6d0446f30731b71a293b9b043e5461a0eb

Authored by 徐烜
2 parents f70c07fa c42739f4

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

Showing 52 changed files with 6267 additions and 2832 deletions
src/main/java/com/bsth/XDApplication.java
... ... @@ -6,6 +6,7 @@ import com.bsth.data.car_out_info.UpdateDBThread;
6 6 import com.bsth.data.directive.DirectivesPstThread;
7 7 import com.bsth.data.gpsdata.thread.GpsDataLoaderThread;
8 8 import com.bsth.data.gpsdata.thread.OfflineMonitorThread;
  9 +import com.bsth.data.schedule.edit_logs.SeiPstThread;
9 10 import com.bsth.data.schedule.late_adjust.ScheduleLateThread;
10 11 import com.bsth.data.schedule.thread.CalcOilThread;
11 12 import com.bsth.data.schedule.thread.SchedulePstThread;
... ... @@ -53,6 +54,8 @@ public class XDApplication implements CommandLineRunner {
53 54 DirectivesPstThread directivesPstThread;
54 55 @Autowired
55 56 ThreadMonotor threadMonotor;
  57 + @Autowired
  58 + SeiPstThread seiPstThread;
56 59  
57 60 private static long timeDiff;
58 61  
... ... @@ -93,6 +96,8 @@ public class XDApplication implements CommandLineRunner {
93 96 //sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
94 97 //实际排班延迟入库线程
95 98 //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS);
  99 + //班次修正日志延迟入库
  100 + //sexec.scheduleWithFixedDelay(seiPstThread, 60, 30, TimeUnit.SECONDS);
96 101  
97 102 //线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作)
98 103 //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS);
... ... @@ -107,10 +112,12 @@ public class XDApplication implements CommandLineRunner {
107 112 sexec.scheduleWithFixedDelay(gpsDataLoader, 30, 2, TimeUnit.SECONDS);
108 113 //GPS设备掉离线
109 114 sexec.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS);
110   - //实际排班更新线程
  115 + //班次更新线程
111 116 sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS);
112   - //实际排班延迟入库线程
113   - sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS);
  117 + //班次延迟入库线程
  118 + sexec.scheduleWithFixedDelay(schedulePstThread, 60, 10, TimeUnit.SECONDS);
  119 + //班次修正日志延迟入库
  120 + sexec.scheduleWithFixedDelay(seiPstThread, 60, 60, TimeUnit.SECONDS);
114 121 //检查班次误点
115 122 sexec.scheduleWithFixedDelay(scheduleLateThread, 60, 30, TimeUnit.SECONDS);
116 123 //调度指令延迟入库
... ...
src/main/java/com/bsth/controller/realcontrol/SchEditInfoController.java 0 → 100644
  1 +package com.bsth.controller.realcontrol;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.data.schedule.edit_logs.entity.SchEditInfo;
  5 +import com.bsth.data.schedule.edit_logs.service.SchEditInfoService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.bind.annotation.RequestMethod;
  9 +import org.springframework.web.bind.annotation.RequestParam;
  10 +import org.springframework.web.bind.annotation.RestController;
  11 +
  12 +import java.util.Map;
  13 +
  14 +/**
  15 + * 班次修正记录
  16 + * Created by panzhao on 2017/5/22.
  17 + */
  18 +@RestController
  19 +@RequestMapping("schEditInfo")
  20 +public class SchEditInfoController extends BaseController<SchEditInfo, Long>{
  21 +
  22 + @Autowired
  23 + SchEditInfoService editInfoService;
  24 +
  25 + @RequestMapping(value = "/_list", method = RequestMethod.GET)
  26 + public Map<String, Object> _list(@RequestParam String rq, @RequestParam String lineCode,@RequestParam Map<String, String> map) {
  27 + return editInfoService._list(rq, lineCode, map);
  28 + }
  29 +}
... ...
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
... ... @@ -433,10 +433,12 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
433 433 * @return
434 434 */
435 435 @RequestMapping("dateArray")
436   - public List<String> dateArray(){
  436 + public List<String> dateArray(@RequestParam(defaultValue = "0") int c){
437 437 List<String> rs = new ArrayList<>();
438 438  
439   - long t = new Date().getTime() - ONE_DAY - (1000 * 60 * 60 * 2);
  439 + long t = new Date().getTime();
  440 + if(c != 1)
  441 + t -= ONE_DAY - (1000 * 60 * 60 * 2);
440 442 for(int i = 0; i < 10; i ++){
441 443 rs.add(fmtyyyyMMdd.print(t));
442 444 t -= ONE_DAY;
... ...
src/main/java/com/bsth/controller/report/SheetController.java 0 → 100644
  1 +package com.bsth.controller.report;
  2 +
  3 +import java.util.List;
  4 +import java.util.Map;
  5 +
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.bind.annotation.RequestMethod;
  9 +import org.springframework.web.bind.annotation.RequestParam;
  10 +import org.springframework.web.bind.annotation.RestController;
  11 +
  12 +import com.bsth.controller.BaseController;
  13 +import com.bsth.entity.sheet.Sheet;
  14 +import com.bsth.service.report.SheetService;
  15 +
  16 +@RestController
  17 +@RequestMapping("sheet")
  18 +public class SheetController extends BaseController<Sheet, Integer>{
  19 + @Autowired
  20 + SheetService sheetService;
  21 + @RequestMapping(value = "/saveListSheet",method = RequestMethod.POST)
  22 + public String saveListSheet(){
  23 + String result="";
  24 + try {
  25 + result = sheetService.saveSheetList();
  26 + } catch (Exception e) {
  27 + // TODO Auto-generated catch block
  28 + e.printStackTrace();
  29 + }
  30 + return result;
  31 + }
  32 +
  33 +
  34 + @RequestMapping(value = "/sheetList",method = RequestMethod.GET)
  35 + public List<Sheet> sheetList(@RequestParam Integer id){
  36 + List<Sheet> list=sheetService.sheetList(id);
  37 + return list;
  38 + }
  39 + @RequestMapping(value = "/countList",method = RequestMethod.GET)
  40 + public List<Map<String, Object>> countList(@RequestParam Map<String, Object> map){
  41 + List<Map<String, Object>> list=sheetService.countList(map);
  42 + return list;
  43 + }
  44 +}
... ...
src/main/java/com/bsth/data/safe_driv/SafeDrivCenter.java
1 1 package com.bsth.data.safe_driv;
2 2  
3   -import com.bsth.Application;
4 3 import com.bsth.websocket.handler.SendUtils;
5 4 import org.joda.time.format.DateTimeFormat;
6 5 import org.joda.time.format.DateTimeFormatter;
... ... @@ -15,7 +14,6 @@ import java.util.HashMap;
15 14 import java.util.HashSet;
16 15 import java.util.Map;
17 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 67 @Override
70 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 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;
2   -
3   -/**
4   - * 班次修正记录
5   - * Created by panzhao on 2017/5/16.
6   - */
7   -public class ScheduleModifyLogger {
8   -
9   - /**
10   - * 待发调整
11   - */
12   - public static void dftz(Long id, String remarks, String dfsj, String bcType, String opType){
13   -
14   - }
15   -}
16 1 \ No newline at end of file
  2 +package com.bsth.data.schedule.edit_logs;
  3 +
  4 +import com.alibaba.fastjson.JSONArray;
  5 +import com.alibaba.fastjson.JSONObject;
  6 +import com.bsth.controller.realcontrol.dto.ChangePersonCar;
  7 +import com.bsth.data.schedule.edit_logs.entity.EditType;
  8 +import com.bsth.data.schedule.edit_logs.entity.SchEditInfo;
  9 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  10 +import org.apache.commons.lang3.StringUtils;
  11 +import org.slf4j.Logger;
  12 +import org.slf4j.LoggerFactory;
  13 +
  14 +import java.util.LinkedList;
  15 +
  16 +/**
  17 + * 班次修正记录
  18 + * Created by panzhao on 2017/5/16.
  19 + */
  20 +public class ScheduleModifyLogger {
  21 +
  22 + public static LinkedList<SchEditInfo> list;
  23 +
  24 + static {
  25 + list = new LinkedList<>();
  26 + }
  27 +
  28 + static Logger log = LoggerFactory.getLogger(ScheduleModifyLogger.class);
  29 +
  30 + /**
  31 + * 待发调整
  32 + * opType 0: 双击调整、 1:待发调整、2:批量待发调整、3:间隔调整
  33 + */
  34 + public static void dftz(ScheduleRealInfo sch, String opType, String oldDfsj, String nowDfsj, String remarks) {
  35 + try {
  36 + if (oldDfsj.equals(nowDfsj))
  37 + return;
  38 +
  39 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  40 + sei.setType(EditType.DFTZ);
  41 + sei.setType2(opType);
  42 + sei.setRemarks(remarks == null ? "" : remarks);
  43 +
  44 + //detail
  45 + JSONObject jobj = new JSONObject();
  46 + jobj.put("old", oldDfsj);
  47 + jobj.put("now", nowDfsj);
  48 +
  49 + sei.setJsonArray(jobj.toJSONString());
  50 +
  51 + put(sei);
  52 + } catch (Exception e) {
  53 + log.error("", e);
  54 + }
  55 + }
  56 +
  57 + /**
  58 + * 发车信息微调记录器
  59 + */
  60 + public static void fcxxwt(ScheduleRealInfo sch, String remarks, JSONArray jsonArray) {
  61 +
  62 + try {
  63 + if (jsonArray == null || jsonArray.size() == 0)
  64 + return;
  65 +
  66 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  67 + sei.setRemarks(remarks);
  68 + sei.setJsonArray(jsonArray.toJSONString());
  69 + sei.setType(EditType.FCXXWT);
  70 +
  71 + put(sei);
  72 + } catch (Exception e) {
  73 + log.error("", e);
  74 + }
  75 + }
  76 +
  77 + /**
  78 + * 计划烂班
  79 + *
  80 + * @param remarks
  81 + */
  82 + public static void jhlb(ScheduleRealInfo sch, String remarks) {
  83 + try {
  84 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  85 + sei.setRemarks(remarks);
  86 + sei.setType(EditType.JHLB);
  87 +
  88 + put(sei);
  89 + } catch (Exception e) {
  90 + log.error("", e);
  91 + }
  92 + }
  93 +
  94 + /**
  95 + * 实发调整
  96 + *
  97 + * @param sch
  98 + * @param nowSfsj
  99 + * @param remarks
  100 + */
  101 + public static void sftz(ScheduleRealInfo sch, String nowSfsj, String remarks) {
  102 + try {
  103 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  104 + sei.setRemarks(remarks);
  105 + sei.setType(EditType.SFTZ);
  106 + //detail
  107 + JSONObject jobj = new JSONObject();
  108 + jobj.put("old", sch.getFcsjActual());
  109 + jobj.put("now", nowSfsj);
  110 +
  111 + sei.setJsonArray(jobj.toJSONString());
  112 + put(sei);
  113 + } catch (Exception e) {
  114 + log.error("", e);
  115 + }
  116 + }
  117 +
  118 + /**
  119 + * 撤销烂班
  120 + *
  121 + * @param sch
  122 + */
  123 + public static void cxlb(ScheduleRealInfo sch) {
  124 + try {
  125 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  126 + sei.setType(EditType.CXLB);
  127 +
  128 + put(sei);
  129 + } catch (Exception e) {
  130 + log.error("", e);
  131 + }
  132 + }
  133 +
  134 + /**
  135 + * 撤销执行
  136 + *
  137 + * @param sch
  138 + */
  139 + public static void cxzx(ScheduleRealInfo sch) {
  140 + try {
  141 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  142 + sei.setType(EditType.CXZX);
  143 +
  144 + //detail
  145 + JSONObject obj = new JSONObject();
  146 + if (StringUtils.isNotEmpty(sch.getFcsjActual()))
  147 + obj.put("old_sfsj", sch.getFcsjActual());
  148 +
  149 + if (StringUtils.isNotEmpty(sch.getZdsjActual()))
  150 + obj.put("old_sdsj", sch.getZdsjActual());
  151 +
  152 + sei.setJsonArray(obj.toJSONString());
  153 + put(sei);
  154 + } catch (Exception e) {
  155 + log.error("", e);
  156 + }
  157 + }
  158 +
  159 + /**
  160 + * 撤销实发
  161 + *
  162 + * @param sch
  163 + */
  164 + public static void cxsf(ScheduleRealInfo sch) {
  165 + try {
  166 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  167 + sei.setType(EditType.CXSF);
  168 +
  169 + //detail
  170 + JSONObject obj = new JSONObject();
  171 + obj.put("old_sfsj", sch.getFcsjActual());
  172 +
  173 + sei.setJsonArray(obj.toJSONString());
  174 + put(sei);
  175 + } catch (Exception e) {
  176 + log.error("", e);
  177 + }
  178 + }
  179 +
  180 + /**
  181 + * 调整人车
  182 + *
  183 + * @param sch
  184 + * @param cpc
  185 + */
  186 + public static void tzrc(ScheduleRealInfo sch, ChangePersonCar cpc) {
  187 + try {
  188 + String newNbbm = cpc.getClZbh();
  189 + String newJsy = cpc.getJsy();
  190 + String newSpy = cpc.getSpy();
  191 + //String oldJsy = sch.getjGh() + "/" + sch.getjName();
  192 +
  193 + if (newNbbm == null && newJsy == null && newSpy==null)
  194 + return;
  195 + /*if (newNbbm != null && newJsy != null
  196 + && newNbbm.equals(sch.getClZbh()) && newJsy.equals(oldJsy))
  197 + return;*/
  198 +
  199 +
  200 + SchEditInfo sei = SchEditInfo.getInstance(sch);
  201 + sei.setType(EditType.TZRC);
  202 +
  203 + //detail
  204 + JSONObject jobj = new JSONObject();
  205 + if (StringUtils.isNotEmpty(newNbbm) && !newNbbm.equals(sch.getClZbh())) {
  206 + jobj.put("old_nbbm", sch.getClZbh());
  207 + jobj.put("now_nbbm", newNbbm);
  208 + }
  209 +
  210 + String oldJsy = sch.getjGh() + "/" + sch.getjName();
  211 + if (StringUtils.isNotEmpty(newJsy) && !newJsy.equals(oldJsy)) {
  212 + jobj.put("old_jsy", oldJsy);
  213 + jobj.put("now_jsy", newJsy);
  214 + }
  215 +
  216 + String oldSpy = sch.getsGh() + "/" + sch.getsName();
  217 + if (StringUtils.isNotEmpty(newSpy) && !newSpy.equals(oldSpy)) {
  218 + jobj.put("old_spy", oldSpy);
  219 + jobj.put("now_spy", cpc.getSpy());
  220 + }
  221 +
  222 + sei.setJsonArray(jobj.toJSONString());
  223 + put(sei);
  224 + } catch (Exception e) {
  225 + log.error("", e);
  226 + }
  227 + }
  228 +
  229 + public static void put(SchEditInfo sei) {
  230 + list.add(sei);
  231 + }
  232 +}
... ...
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.ArrayList;
  11 +import java.util.LinkedList;
  12 +import java.util.List;
  13 +
  14 +/**
  15 + * 班次修正日志入库
  16 + * Created by panzhao on 2017/5/19.
  17 + */
  18 +@Component
  19 +public class SeiPstThread extends Thread{
  20 +
  21 + @Autowired
  22 + EditInfoRepository repository;
  23 +
  24 + Logger log = LoggerFactory.getLogger(this.getClass());
  25 +
  26 + @Override
  27 + public void run() {
  28 + try{
  29 + List<SchEditInfo> pstList = new ArrayList<>();
  30 + LinkedList<SchEditInfo> list = ScheduleModifyLogger.list;
  31 + SchEditInfo sei;
  32 + for(int i = 0; i < 1000; i ++){
  33 + sei = list.poll();
  34 + if(sei == null)
  35 + break;
  36 + else{
  37 + //repository.save(sei);
  38 + pstList.add(sei);
  39 + }
  40 + }
  41 +
  42 + repository.save(pstList);
  43 + }catch (Exception e){
  44 + log.error("", e);
  45 + }
  46 + }
  47 +}
0 48 \ No newline at end of file
... ...
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,CXLB, CXSF, CXZX
  9 +}
0 10 \ No newline at end of file
... ...
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 + /** 时间戳 */
  32 + private long ts;
  33 +
  34 + private String lineCode;
  35 +
  36 + private String gsbm;
  37 +
  38 + private String fgsbm;
  39 +
  40 + /**
  41 + * 班次ID
  42 + */
  43 + private long schId;
  44 +
  45 + /**
  46 + * 类型
  47 + */
  48 + @Enumerated(EnumType.STRING)
  49 + private EditType type;
  50 +
  51 + private String type2;
  52 + /**
  53 + * 操作人 @system 系统/用户名
  54 + */
  55 + private String user;
  56 +
  57 + /**
  58 + * 操作明细
  59 + */
  60 + @Column(length = 2000)
  61 + private String jsonArray;
  62 +
  63 + private String remarks;
  64 +
  65 + public String getRq() {
  66 + return rq;
  67 + }
  68 +
  69 + public void setRq(String rq) {
  70 + this.rq = rq;
  71 + }
  72 +
  73 + public String getTimeStr() {
  74 + return timeStr;
  75 + }
  76 +
  77 + public void setTimeStr(String timeStr) {
  78 + this.timeStr = timeStr;
  79 + }
  80 +
  81 + public long getSchId() {
  82 + return schId;
  83 + }
  84 +
  85 + public void setSchId(long schId) {
  86 + this.schId = schId;
  87 + }
  88 +
  89 + public EditType getType() {
  90 + return type;
  91 + }
  92 +
  93 + public void setType(EditType type) {
  94 + this.type = type;
  95 + }
  96 +
  97 + public String getUser() {
  98 + return user;
  99 + }
  100 +
  101 + public void setUser(String user) {
  102 + this.user = user;
  103 + }
  104 +
  105 + public long getId() {
  106 + return id;
  107 + }
  108 +
  109 + public void setId(long id) {
  110 + this.id = id;
  111 + }
  112 +
  113 + public String getJsonArray() {
  114 + return jsonArray;
  115 + }
  116 +
  117 + public void setJsonArray(String jsonArray) {
  118 + this.jsonArray = jsonArray;
  119 + }
  120 +
  121 + public String getType2() {
  122 + return type2;
  123 + }
  124 +
  125 + public void setType2(String type2) {
  126 + this.type2 = type2;
  127 + }
  128 +
  129 + public String getRemarks() {
  130 + return remarks;
  131 + }
  132 +
  133 + public void setRemarks(String remarks) {
  134 + this.remarks = remarks;
  135 + }
  136 +
  137 +
  138 + @Transient
  139 + private static DateTimeFormatter fmtHHmm = DateTimeFormat.forPattern("HH:mm");
  140 + /* @Transient
  141 + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd");*/
  142 + public static SchEditInfo getInstance(ScheduleRealInfo sch){
  143 + SchEditInfo sei = new SchEditInfo();
  144 + long t = System.currentTimeMillis();
  145 +
  146 + sei.setTs(t);
  147 + sei.setTimeStr(fmtHHmm.print(t));
  148 +
  149 + SysUser user = SecurityUtils.getCurrentUser();
  150 + if(user != null)
  151 + sei.setUser(user.getUserName());
  152 +
  153 + if(sch != null){
  154 + sei.setRq(sch.getScheduleDateStr());
  155 + sei.setSchId(sch.getId());
  156 + sei.setLineCode(sch.getXlBm());
  157 + sei.setGsbm(sch.getGsBm());
  158 + sei.setFgsbm(sch.getFgsBm());
  159 + }
  160 + return sei;
  161 + }
  162 +
  163 + public String getLineCode() {
  164 + return lineCode;
  165 + }
  166 +
  167 + public void setLineCode(String lineCode) {
  168 + this.lineCode = lineCode;
  169 + }
  170 +
  171 + public String getGsbm() {
  172 + return gsbm;
  173 + }
  174 +
  175 + public void setGsbm(String gsbm) {
  176 + this.gsbm = gsbm;
  177 + }
  178 +
  179 + public String getFgsbm() {
  180 + return fgsbm;
  181 + }
  182 +
  183 + public void setFgsbm(String fgsbm) {
  184 + this.fgsbm = fgsbm;
  185 + }
  186 +
  187 + public long getTs() {
  188 + return ts;
  189 + }
  190 +
  191 + public void setTs(long ts) {
  192 + this.ts = ts;
  193 + }
  194 +}
0 195 \ No newline at end of file
... ...
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/data/schedule/edit_logs/service/SchEditInfoService.java 0 → 100644
  1 +package com.bsth.data.schedule.edit_logs.service;
  2 +
  3 +import com.bsth.data.schedule.edit_logs.entity.SchEditInfo;
  4 +import com.bsth.service.BaseService;
  5 +
  6 +import java.util.Map;
  7 +
  8 +/**
  9 + * Created by panzhao on 2017/5/22.
  10 + */
  11 +public interface SchEditInfoService extends BaseService<SchEditInfo, Long> {
  12 +
  13 + Map<String, Object> _list(String rq, String lineCode, Map<String, String> map);
  14 +}
... ...
src/main/java/com/bsth/data/schedule/edit_logs/service/SchEditInfoServiceImpl.java 0 → 100644
  1 +package com.bsth.data.schedule.edit_logs.service;
  2 +
  3 +import com.bsth.common.ResponseCode;
  4 +import com.bsth.data.schedule.edit_logs.entity.SchEditInfo;
  5 +import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto;
  6 +import com.bsth.service.impl.BaseServiceImpl;
  7 +import com.bsth.util.BatchSaveUtils;
  8 +import org.apache.commons.lang3.StringUtils;
  9 +import org.slf4j.Logger;
  10 +import org.slf4j.LoggerFactory;
  11 +import org.springframework.beans.factory.annotation.Autowired;
  12 +import org.springframework.jdbc.core.BeanPropertyRowMapper;
  13 +import org.springframework.jdbc.core.JdbcTemplate;
  14 +import org.springframework.stereotype.Service;
  15 +
  16 +import java.util.HashMap;
  17 +import java.util.List;
  18 +import java.util.Map;
  19 +import java.util.Set;
  20 +
  21 +/**
  22 + * Created by panzhao on 2017/5/22.
  23 + */
  24 +@Service
  25 +public class SchEditInfoServiceImpl extends BaseServiceImpl<SchEditInfo, Long> implements SchEditInfoService{
  26 +
  27 + Logger log = LoggerFactory.getLogger(this.getClass());
  28 +
  29 + @Autowired
  30 + JdbcTemplate jdbcTemplate;
  31 +
  32 + public Map<String, Object> _list(String rq, String lineCode, Map<String, String> map) {
  33 +
  34 + Map<String, Object> rs = new HashMap();
  35 + try {
  36 + //拼接除rq、lineCode 外的其他where 条件
  37 + map.remove("rq");
  38 + map.remove("lineCode");
  39 + String cont = "", v;
  40 + Set<String> ks = map.keySet();
  41 + for(String k : ks){
  42 + v =map.get(k);
  43 + if(StringUtils.isNotEmpty(v))
  44 + cont += " and t2." + BatchSaveUtils.propertyToField(k) + "='" + v + "'";
  45 + }
  46 + String sql = "select t1.*, t2.fcsj,t2.lp_name,t2.cl_zbh,t2.j_gh,t2.j_name,t2.xl_dir,t2.real_exec_date from (select * from logger_sch_modify where rq=? and line_code=? ) t1 INNER JOIN bsth_c_s_sp_info_real t2 on t1.sch_id=t2.id where 1=1 " + cont;
  47 +
  48 + List<SchEditInfoDto> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(SchEditInfoDto.class), rq, lineCode);
  49 +
  50 + rs.put("status", ResponseCode.SUCCESS);
  51 + rs.put("list", list);
  52 + }catch (Exception e){
  53 + log.error("", e);
  54 + rs.put("status", ResponseCode.ERROR);
  55 + rs.put("msg", e.getMessage());
  56 + }
  57 + return rs;
  58 + }
  59 +}
... ...
src/main/java/com/bsth/data/schedule/edit_logs/service/dto/SchEditInfoDto.java 0 → 100644
  1 +package com.bsth.data.schedule.edit_logs.service.dto;
  2 +
  3 +/**
  4 + * Created by panzhao on 2017/5/22.
  5 + */
  6 +public class SchEditInfoDto {
  7 +
  8 + private long id;
  9 + /*** 日期 yyyy-MM-dd*/
  10 + private String rq;
  11 +
  12 + /*** 时间 HH:mm*/
  13 + private String timeStr;
  14 +
  15 + private String lineCode;
  16 +
  17 + private String gsbm;
  18 +
  19 + private String fgsbm;
  20 +
  21 + /*** 班次ID*/
  22 + private long schId;
  23 +
  24 + /*** 类型*/
  25 + private String type;
  26 +
  27 + private String type2;
  28 + /*** 操作人 @system 系统/用户名*/
  29 + private String user;
  30 +
  31 + /*** 操作明细*/
  32 + private String jsonArray;
  33 +
  34 + private String remarks;
  35 +
  36 + /** 路牌 */
  37 + private String lpName;
  38 +
  39 + /** 驾驶员工号 */
  40 + private String jGh;
  41 +
  42 + /** 驾驶员姓名 */
  43 + private String jName;
  44 +
  45 + /** 车辆自编号 */
  46 + private String clZbh;
  47 +
  48 + /** 计发时间 */
  49 + private String fcsj;
  50 +
  51 + /** 上下行 */
  52 + private int xlDir;
  53 +
  54 + /** 实际执行日期 */
  55 + private String realExecDate;
  56 +
  57 + public long getId() {
  58 + return id;
  59 + }
  60 +
  61 + public void setId(long id) {
  62 + this.id = id;
  63 + }
  64 +
  65 + public String getRq() {
  66 + return rq;
  67 + }
  68 +
  69 + public void setRq(String rq) {
  70 + this.rq = rq;
  71 + }
  72 +
  73 + public String getTimeStr() {
  74 + return timeStr;
  75 + }
  76 +
  77 + public void setTimeStr(String timeStr) {
  78 + this.timeStr = timeStr;
  79 + }
  80 +
  81 + public String getLineCode() {
  82 + return lineCode;
  83 + }
  84 +
  85 + public void setLineCode(String lineCode) {
  86 + this.lineCode = lineCode;
  87 + }
  88 +
  89 + public String getGsbm() {
  90 + return gsbm;
  91 + }
  92 +
  93 + public void setGsbm(String gsbm) {
  94 + this.gsbm = gsbm;
  95 + }
  96 +
  97 + public String getFgsbm() {
  98 + return fgsbm;
  99 + }
  100 +
  101 + public void setFgsbm(String fgsbm) {
  102 + this.fgsbm = fgsbm;
  103 + }
  104 +
  105 + public long getSchId() {
  106 + return schId;
  107 + }
  108 +
  109 + public void setSchId(long schId) {
  110 + this.schId = schId;
  111 + }
  112 +
  113 + public String getType2() {
  114 + return type2;
  115 + }
  116 +
  117 + public void setType2(String type2) {
  118 + this.type2 = type2;
  119 + }
  120 +
  121 + public String getUser() {
  122 + return user;
  123 + }
  124 +
  125 + public void setUser(String user) {
  126 + this.user = user;
  127 + }
  128 +
  129 + public String getJsonArray() {
  130 + return jsonArray;
  131 + }
  132 +
  133 + public void setJsonArray(String jsonArray) {
  134 + this.jsonArray = jsonArray;
  135 + }
  136 +
  137 + public String getRemarks() {
  138 + return remarks;
  139 + }
  140 +
  141 + public void setRemarks(String remarks) {
  142 + this.remarks = remarks;
  143 + }
  144 +
  145 + public String getLpName() {
  146 + return lpName;
  147 + }
  148 +
  149 + public void setLpName(String lpName) {
  150 + this.lpName = lpName;
  151 + }
  152 +
  153 + public String getjGh() {
  154 + return jGh;
  155 + }
  156 +
  157 + public void setjGh(String jGh) {
  158 + this.jGh = jGh;
  159 + }
  160 +
  161 + public String getjName() {
  162 + return jName;
  163 + }
  164 +
  165 + public void setjName(String jName) {
  166 + this.jName = jName;
  167 + }
  168 +
  169 +
  170 + public String getRealExecDate() {
  171 + return realExecDate;
  172 + }
  173 +
  174 + public void setRealExecDate(String realExecDate) {
  175 + this.realExecDate = realExecDate;
  176 + }
  177 +
  178 + public String getType() {
  179 + return type;
  180 + }
  181 +
  182 + public void setType(String type) {
  183 + this.type = type;
  184 + }
  185 +
  186 + public String getClZbh() {
  187 + return clZbh;
  188 + }
  189 +
  190 + public void setClZbh(String clZbh) {
  191 + this.clZbh = clZbh;
  192 + }
  193 +
  194 + public String getFcsj() {
  195 + return fcsj;
  196 + }
  197 +
  198 + public void setFcsj(String fcsj) {
  199 + this.fcsj = fcsj;
  200 + }
  201 +
  202 + public int getXlDir() {
  203 + return xlDir;
  204 + }
  205 +
  206 + public void setXlDir(int xlDir) {
  207 + this.xlDir = xlDir;
  208 + }
  209 +}
... ...
src/main/java/com/bsth/data/schedule/thread/CalcOilThread.java
... ... @@ -3,6 +3,8 @@ package com.bsth.data.schedule.thread;
3 3 import com.bsth.service.oil.DlbService;
4 4 import com.bsth.data.safe_driv.SafeDrivCenter;
5 5 import com.bsth.service.oil.YlbService;
  6 +import com.bsth.service.report.SheetService;
  7 +
6 8 import org.slf4j.Logger;
7 9 import org.slf4j.LoggerFactory;
8 10 import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -19,6 +21,9 @@ public class CalcOilThread extends Thread{
19 21 YlbService ylbService;
20 22 @Autowired
21 23 DlbService dlbService;
  24 +
  25 + @Autowired
  26 + SheetService sheetService;
22 27 Logger logger = LoggerFactory.getLogger(this.getClass());
23 28  
24 29 @Override
... ... @@ -28,7 +33,9 @@ public class CalcOilThread extends Thread{
28 33 ylbService.obtainDsq();
29 34 dlbService.obtainDsq();
30 35 logger.info("计算路单里程加注量结束!");
31   -
  36 + logger.info("开始计算班次准点率....");
  37 + sheetService.saveSheetList();
  38 + logger.info("计算班次准点率结束!");
32 39 //清除安全驾驶数据 先临时蹭这个线程
33 40 SafeDrivCenter.clear();
34 41 } catch(Exception e){
... ...
src/main/java/com/bsth/entity/sheet/Sheet.java 0 → 100644
  1 +package com.bsth.entity.sheet;
  2 +
  3 +import java.util.Date;
  4 +
  5 +import javax.persistence.Entity;
  6 +import javax.persistence.GeneratedValue;
  7 +import javax.persistence.Id;
  8 +import javax.persistence.Table;
  9 +import javax.persistence.Transient;
  10 +@Entity
  11 +@Table(name = "bsth_c_sheet")
  12 +public class Sheet {
  13 + @Id
  14 + @GeneratedValue
  15 + private Integer id;
  16 + private String gs;
  17 + private String fgs;
  18 + private String line;
  19 + private String date;
  20 + private String realDate;
  21 + private String jhsj;
  22 + private Long jhsjt;
  23 + private String sjsj;
  24 + private Long sjsjt;
  25 + private String xlDir;
  26 + private Date createDate;
  27 + private String zdname;
  28 +
  29 + @Transient
  30 + private String sfzd;
  31 +
  32 + public Integer getId() {
  33 + return id;
  34 + }
  35 + public void setId(Integer id) {
  36 + this.id = id;
  37 + }
  38 + public String getGs() {
  39 + return gs;
  40 + }
  41 + public void setGs(String gs) {
  42 + this.gs = gs;
  43 + }
  44 + public String getFgs() {
  45 + return fgs;
  46 + }
  47 + public void setFgs(String fgs) {
  48 + this.fgs = fgs;
  49 + }
  50 + public String getLine() {
  51 + return line;
  52 + }
  53 + public void setLine(String line) {
  54 + this.line = line;
  55 + }
  56 + public String getDate() {
  57 + return date;
  58 + }
  59 + public void setDate(String date) {
  60 + this.date = date;
  61 + }
  62 + public String getRealDate() {
  63 + return realDate;
  64 + }
  65 + public void setRealDate(String realDate) {
  66 + this.realDate = realDate;
  67 + }
  68 + public String getJhsj() {
  69 + return jhsj;
  70 + }
  71 + public void setJhsj(String jhsj) {
  72 + this.jhsj = jhsj;
  73 + }
  74 + public String getSjsj() {
  75 + return sjsj;
  76 + }
  77 + public void setSjsj(String sjsj) {
  78 + this.sjsj = sjsj;
  79 + }
  80 +
  81 + public Long getJhsjt() {
  82 + return jhsjt;
  83 + }
  84 + public void setJhsjt(Long jhsjt) {
  85 + this.jhsjt = jhsjt;
  86 + }
  87 + public Long getSjsjt() {
  88 + return sjsjt;
  89 + }
  90 + public void setSjsjt(Long sjsjt) {
  91 + this.sjsjt = sjsjt;
  92 + }
  93 + public String getXlDir() {
  94 + return xlDir;
  95 + }
  96 + public void setXlDir(String xlDir) {
  97 + this.xlDir = xlDir;
  98 + }
  99 + public Date getCreateDate() {
  100 + return createDate;
  101 + }
  102 + public void setCreateDate(Date createDate) {
  103 + this.createDate = createDate;
  104 + }
  105 +
  106 + public String getZdname() {
  107 + return zdname;
  108 + }
  109 + public void setZdname(String zdname) {
  110 + this.zdname = zdname;
  111 + }
  112 + public String getSfzd() {
  113 + return sfzd;
  114 + }
  115 + public void setSfzd(String sfzd) {
  116 + this.sfzd = sfzd;
  117 + }
  118 +
  119 +
  120 +
  121 +}
... ...
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
... ... @@ -147,6 +147,10 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
147 147 List<ScheduleRealInfo> scheduleByDateAndLineQp(String line,String date);
148 148  
149 149 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
  150 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by s.xlDir,s.realExecDate,s.dfsj, (s.lpName+1)")
  151 + List<ScheduleRealInfo> scheduleByDateAndLineQp2(String line,String date);
  152 +
  153 + @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
150 154 @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.bcType not in ('in','out') order by s.xlBm,s.adjustExps,s.fcsj")
151 155 List<ScheduleRealInfo> scheduleByDateAndLine2(String line,String date);
152 156  
... ...
src/main/java/com/bsth/repository/sheet/SheetRepository.java 0 → 100644
  1 +package com.bsth.repository.sheet;
  2 +
  3 +import com.bsth.entity.sheet.Sheet;
  4 +import com.bsth.repository.BaseRepository;
  5 +import org.springframework.stereotype.Repository;
  6 +
  7 +/**
  8 + *
  9 + */
  10 +@Repository
  11 +public interface SheetRepository extends BaseRepository<Sheet, Integer>{
  12 +}
... ...
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
... ... @@ -28,10 +28,12 @@ import com.bsth.entity.mcy_forms.Singledata;
28 28 import com.bsth.entity.mcy_forms.Turnoutrate;
29 29 import com.bsth.entity.mcy_forms.Vehicleloading;
30 30 import com.bsth.entity.mcy_forms.Waybillday;
  31 +import com.bsth.entity.oil.Dlb;
31 32 import com.bsth.entity.oil.Ylb;
32 33 import com.bsth.entity.realcontrol.ScheduleRealInfo;
33 34 import com.bsth.entity.schedule.SchedulePlanInfo;
34 35 import com.bsth.repository.LineRepository;
  36 +import com.bsth.repository.oil.DlbRepository;
35 37 import com.bsth.repository.oil.YlbRepository;
36 38 import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
37 39 import com.bsth.data.BasicData;
... ... @@ -67,6 +69,9 @@ public class FormsServiceImpl implements FormsService {
67 69 YlbRepository ylbRepository;
68 70  
69 71 @Autowired
  72 + DlbRepository dlbRepository;
  73 +
  74 + @Autowired
70 75 LineRepository lineRepository;
71 76  
72 77  
... ... @@ -98,6 +103,7 @@ public class FormsServiceImpl implements FormsService {
98 103 });
99 104 List<ScheduleRealInfo> realList= scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date);
100 105 List<Ylb> listYlb= ylbRepository.obtainYl(date, "", "", line, "", "xlbm");
  106 + List<Dlb> listDlb= dlbRepository.obtainDl(date, "", "", line, "", "xlbm");
101 107 double jzl=0.0,sh=0.0,yh=0.0;
102 108 for (int i = 0; i < list.size(); i++) {
103 109 Waybillday w=list.get(i);
... ... @@ -132,6 +138,14 @@ public class FormsServiceImpl implements FormsService {
132 138 }
133 139 }
134 140  
  141 + for (int j = 0; j < listDlb.size(); j++) {
  142 + Dlb d=listDlb.get(j);
  143 + if(w.getNbbm().equals(d.getNbbm()) && w.getJgh().equals(d.getJsy())){
  144 + jzl=Arith.add(jzl, d.getCdl());
  145 + sh=Arith.add(sh, d.getSh());
  146 + yh=Arith.add(yh, d.getHd());
  147 + }
  148 + }
135 149 w.setJzl(String.valueOf(jzl));
136 150 w.setYh(String.valueOf(yh));
137 151 w.setSh(String.valueOf(sh));
... ... @@ -1087,7 +1101,10 @@ public class FormsServiceImpl implements FormsService {
1087 1101  
1088 1102 @Override
1089 1103 public List<Daily> daily(Map<String, Object> map) {
1090   -
  1104 + String xlbm="";;
  1105 + if(map.get("line")!=null){
  1106 + xlbm=map.get("line").toString().trim();
  1107 + }
1091 1108 String gsbm="";
1092 1109 if(map.get("gsdmDaily")!=null){
1093 1110 gsbm=map.get("gsdmDaily").toString();
... ... @@ -1098,7 +1115,7 @@ public class FormsServiceImpl implements FormsService {
1098 1115 fgsbm=map.get("fgsdmDaily").toString();
1099 1116 }
1100 1117  
1101   - String sql="select t.schedule_date_str,"
  1118 + /*String sql="select t.schedule_date_str,"
1102 1119 + " t.cl_zbh,t.j_gh,t.j_name,x.yh from (select r.schedule_date_str,r.xl_bm,"
1103 1120 + " r.cl_zbh,r.j_gh,r.j_name from bsth_c_s_sp_info_real r WHERE "
1104 1121 + " r.xl_bm='" + map.get("line").toString() + "' "
... ... @@ -1112,7 +1129,20 @@ public class FormsServiceImpl implements FormsService {
1112 1129 + " and y.ssgsdm like '%"+gsbm+"%' "
1113 1130 + " and y.fgsdm like '%"+fgsbm+"%'"
1114 1131 + " ) x"
1115   - + " on t.cl_zbh = x.nbbm and t.j_gh=x.jsy";
  1132 + + " on t.cl_zbh = x.nbbm and t.j_gh=x.jsy";*/
  1133 +
  1134 + String sql="select r.schedule_date_str, "
  1135 + + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm"
  1136 + + " from bsth_c_s_sp_info_real r where "
  1137 + + "r.schedule_date_str = '"+map.get("date").toString()+"'";
  1138 + if(xlbm.equals("")){
  1139 + sql +="and r.gs_bm='"+gsbm+"' "
  1140 + + " and r.fgs_bm='"+fgsbm+"'";
  1141 + }else{
  1142 + sql += " and r.xl_bm = '"+xlbm+"'";
  1143 + }
  1144 + sql += " group by r.schedule_date_str,"
  1145 + + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm order by r.xl_bm,r.cl_zbh";
1116 1146  
1117 1147 List<Daily> list = jdbcTemplate.query(sql, new RowMapper<Daily>() {
1118 1148 @Override
... ... @@ -1122,21 +1152,31 @@ public class FormsServiceImpl implements FormsService {
1122 1152 daily.setZbh(arg0.getString("cl_zbh"));
1123 1153 daily.setJgh(arg0.getString("j_gh"));
1124 1154 daily.setjName(arg0.getString("j_name"));
1125   - daily.setYh(arg0.getString("yh"));
1126 1155 return daily;
1127 1156 }
1128 1157 });
  1158 + List<Ylb> listYlb= ylbRepository.obtainYl(map.get("date").toString(), "", "", xlbm, "", "xlbm");
  1159 + List<Dlb> listDlb= dlbRepository.obtainDl(map.get("date").toString(), "", "", xlbm, "", "xlbm");
1129 1160 List<ScheduleRealInfo> sList;
1130 1161 List<ScheduleRealInfo> lists=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(map.get("line").toString(), map.get("date").toString());
1131 1162 for(int i=0;i<list.size();i++){
1132 1163 sList =new ArrayList<ScheduleRealInfo>();
1133 1164 Daily d=list.get(i);
1134   - if(d.getYh()==null){
1135   - d.setYh("0");
1136   - }else{
1137   - if(d.getYh().equals(""))
1138   - d.setYh("0");
  1165 + Double yh=0.0;
  1166 + for (int j = 0; j < listYlb.size(); j++) {
  1167 + Ylb y=listYlb.get(j);
  1168 + if(y.getNbbm().equals(d.getZbh())&& y.getJsy().equals(d.getJgh())){
  1169 + yh=Arith.add(yh, y.getYh());
  1170 + }
  1171 + }
  1172 +
  1173 + for (int j = 0; j < listDlb.size(); j++) {
  1174 + Dlb b=listDlb.get(j);
  1175 + if(b.getNbbm().equals(d.getZbh())&& b.getJsy().equals(d.getJgh())){
  1176 + yh=Arith.add(yh, b.getHd());
  1177 + }
1139 1178 }
  1179 + d.setYh(String.valueOf(yh));
1140 1180 for (int j = 0; j < lists.size(); j++) {
1141 1181 ScheduleRealInfo s=lists.get(j);
1142 1182 if(d.getJgh().equals(s.getjGh()) && d.getZbh().equals(s.getClZbh())){
... ...
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
... ... @@ -11,6 +11,7 @@ import java.util.Collections;
11 11 import java.util.Comparator;
12 12 import java.util.Date;
13 13 import java.util.HashMap;
  14 +import java.util.HashSet;
14 15 import java.util.Iterator;
15 16 import java.util.List;
16 17 import java.util.Map;
... ... @@ -585,7 +586,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
585 586  
586 587 @Override
587 588 public Map<String, Object> timeAndSpeed(Map<String, Object> map) {
588   - List<Long> ttList = new ArrayList<Long>();
  589 + List<Map<String, Object>> ttList = new ArrayList<Map<String, Object>>();
589 590 List<ChildTaskPlan> cList = new ArrayList<ChildTaskPlan>();
590 591 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
591 592 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
... ... @@ -593,6 +594,7 @@ public class BusIntervalServiceImpl implements BusIntervalService {
593 594 Map<String, List<ScheduleRealInfo>> keyMap = new HashMap<String, List<ScheduleRealInfo>>();
594 595 Map<String, List<ChildTaskPlan>> cMap = new HashMap<String, List<ChildTaskPlan>>();
595 596 Map<String, Object> modelMap = new HashMap<String, Object>();
  597 + Set<Long> tsSet = new HashSet<Long>();
596 598  
597 599 String company = map.get("company").toString();
598 600 String subCompany = map.get("subCompany").toString();
... ... @@ -616,20 +618,23 @@ public class BusIntervalServiceImpl implements BusIntervalService {
616 618  
617 619 try {
618 620  
619   - String sql = "select * from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"' and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'";
  621 + String where = "";
620 622 if(line.length() != 0 && statu.equals("1")){
621   - sql += " and xl_bm = '"+line+"'";
  623 + where += " and xl_bm = '"+line+"'";
622 624 }
623 625 if(lp.length() != 0 && statu.equals("1")){
624   - sql += " and lp_name = '"+lp+"'";
  626 + where += " and lp_name = '"+lp+"'";
625 627 }
626 628 if(company.length() != 0){
627   - sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  629 + where += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
628 630 }
629 631 if(sfqr == 1){
630   - sql += " and zdsj >= '"+times1+"' and fcsj <= '"+times2+"'";
  632 + where += " and zdsj >= '"+times1+"' and fcsj <= '"+times2+"'";
631 633 }
632   - sql += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks' order by fcsj";
  634 + where += " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
  635 +
  636 + String sql = "select * from bsth_c_s_sp_info_real where DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"'"
  637 + + " and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"'"+where+"";
633 638  
634 639 list = jdbcTemplate.query(sql,
635 640 new RowMapper<ScheduleRealInfo>(){
... ... @@ -704,6 +709,65 @@ public class BusIntervalServiceImpl implements BusIntervalService {
704 709 return schedule;
705 710 }
706 711 });
  712 +
  713 + {
  714 + List<Map<String, String>> temp1 = new ArrayList<Map<String, String>>();
  715 + List<Map<String, String>> temp2 = new ArrayList<Map<String, String>>();
  716 + sql = "select * from bsth_c_s_sp_info where bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
  717 +
  718 + if(startDate.equals(endDate)){
  719 + sql += " and schedule_date = '"+startDate+"'";
  720 + } else {
  721 + sql += " and schedule_date >= '"+startDate+"' and schedule_date <= '"+endDate+"'";
  722 + }
  723 + if(line.length() != 0 && statu.equals("1")){
  724 + sql += " and xl_bm = '"+line+"'";
  725 + }
  726 + if(company.length() != 0){
  727 + sql += " and gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"'";
  728 + }
  729 + temp1 = jdbcTemplate.query(sql,
  730 + new RowMapper<Map<String, String>>(){
  731 + @Override
  732 + public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException {
  733 + Map<String, String> m = new HashMap<String, String>();
  734 + m.put("id", rs.getString("id"));
  735 + m.put("lp", rs.getString("lp"));
  736 + m.put("fcsj", rs.getString("fcsj"));
  737 + m.put("xl_bm", rs.getString("xl_bm"));
  738 + m.put("tt_info", rs.getString("tt_info"));
  739 + return m;
  740 + }
  741 + });
  742 + sql = "select * from bsth_c_s_ttinfo_detail where ists = 1"
  743 + + " and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
  744 +
  745 + if(line.length() != 0 && statu.equals("1")){
  746 + sql += " and xl = '"+line+"'";
  747 + }
  748 + temp2 = jdbcTemplate.query(sql,
  749 + new RowMapper<Map<String, String>>(){
  750 + @Override
  751 + public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException {
  752 + Map<String, String> m = new HashMap<String, String>();
  753 + m.put("id", rs.getString("id"));
  754 + m.put("lp", rs.getString("lp"));
  755 + m.put("xl", rs.getString("xl"));
  756 + m.put("fcsj", rs.getString("fcsj"));
  757 + m.put("ttinfo", rs.getString("ttinfo"));
  758 + return m;
  759 + }
  760 + });
  761 +
  762 + for(Map<String, String> m2 : temp2){
  763 + for(Map<String, String> m1 : temp1){
  764 + if(m2.get("ttinfo").equals(m1.get("tt_info")) && m2.get("xl").equals(m1.get("xl_bm"))
  765 + && m2.get("lp").equals(m1.get("lp")) && m2.get("fcsj").equals(m1.get("fcsj"))){
  766 + tsSet.add(Long.valueOf(m1.get("id")));
  767 + }
  768 + }
  769 + }
  770 + }
707 771  
708 772 sql = "select * from bsth_c_s_child_task order by start_date";
709 773  
... ... @@ -723,13 +787,17 @@ public class BusIntervalServiceImpl implements BusIntervalService {
723 787 });
724 788  
725 789 if(model.length() != 0){
726   - sql = "select id from bsth_c_s_sp_info where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
  790 + sql = "select sp.id from bsth_c_s_sp_info sp left join bsth_c_s_ttinfo_detail tt on sp.tt_info = tt.ttinfo and sp.xl_bm = tt.xl and sp.lp = tt.lp and sp.fcsj = tt.fcsj "
  791 + + "where tt_info = '" + model + "' and bc_type != 'in' and bc_type != 'out' and bc_type != 'ldks'";
727 792  
728 793 ttList = jdbcTemplate.query(sql,
729   - new RowMapper<Long>(){
  794 + new RowMapper<Map<String, Object>>(){
730 795 @Override
731   - public Long mapRow(ResultSet rs, int rowNum) throws SQLException {
732   - return rs.getLong("id");
  796 + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
  797 + Map<String, Object> m = new HashMap<String, Object>();
  798 + m.put("id", rs.getString("id"));
  799 + m.put("ists", rs.getString("ists")!=null?rs.getString("ists"):"0");
  800 + return m;
733 801 }
734 802 });
735 803 }
... ... @@ -771,13 +839,15 @@ public class BusIntervalServiceImpl implements BusIntervalService {
771 839 if(schedule.getXlName()==null || schedule.getXlName().trim().length()==0)
772 840 continue;
773 841 if(model.length() != 0){
774   - for(Long tt : ttList)
775   - if((long) tt == (long)schedule.getSpId()){
  842 + for(Map<String, Object> tt : ttList){
  843 + long id = Long.valueOf(tt.get("id").toString());
  844 + if(id == (long)schedule.getSpId()){
776 845 String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName();
777 846 if(!keyMap.containsKey(key))
778 847 keyMap.put(key, new ArrayList<ScheduleRealInfo>());
779 848 keyMap.get(key).add(schedule);
780 849 }
  850 + }
781 851 }else{
782 852 String key = schedule.getScheduleDateStr() + "/" + schedule.getXlName() + "/" + schedule.getLpName();
783 853 if(!keyMap.containsKey(key))
... ... @@ -821,14 +891,16 @@ public class BusIntervalServiceImpl implements BusIntervalService {
821 891 for(int i = 1; i < keyList.size(); i++){
822 892 ScheduleRealInfo schedule1 = sortMap.get(keyList.get(i - 1));
823 893 ScheduleRealInfo schedule2 = sortMap.get(keyList.get(i));
824   - if(sfqr == 1 && time1 > schedule1.getFcsjT()){
825   - jhyysj += schedule2.getFcsjT() - time1;
826   - }else if(sfqr == 1 && time2 < schedule2.getFcsjT()){
827   - jhyysj += time2 - schedule1.getFcsjT();
828   - }else{
829   - jhyysj += schedule2.getFcsjT() - schedule1.getFcsjT();
  894 + if(!tsSet.contains(schedule1.getId())){
  895 + if(sfqr == 1 && time1 > schedule1.getFcsjT()){
  896 + jhyysj += schedule2.getFcsjT() - time1;
  897 + }else if(sfqr == 1 && time2 < schedule2.getFcsjT()){
  898 + jhyysj += time2 - schedule1.getFcsjT();
  899 + }else{
  900 + jhyysj += schedule2.getFcsjT() - schedule1.getFcsjT();
  901 + }
  902 + jhyysj1 += schedule2.getFcsjT() - schedule1.getFcsjT();
830 903 }
831   - jhyysj1 += schedule2.getFcsjT() - schedule1.getFcsjT();
832 904 long zdsj2 = schedule2.getZdsjT();
833 905 long fcsj2 = schedule2.getFcsjT();
834 906 if(fcsj2 > zdsj2)
... ...
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 1016 if(nbbm.trim()!=""){
1017 1017 stringList.add(nbbm);
1018 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 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 1034 }else{
1032 1035 //全部
1033 1036 if(sxtj.equals("0")){
... ... @@ -1248,17 +1251,18 @@ public class YlbServiceImpl extends BaseServiceImpl&lt;Ylb,Integer&gt; implements YlbS
1248 1251 if(zlc>0){
1249 1252 long l=0l;
1250 1253 double ylxs=0.0;
1251   - if(i==iterator2.size()){
  1254 + if(i==iterator2.size()-1){
1252 1255 ylxs=czyl;
1253 1256 }else{
1254 1257 l=Math.round(nextJzyl);
1255 1258 ylxs=l*100/100;
1256 1259 }
1257   -// nextJzyl = Arith.add(nextJzyl,Arith.sub(nextJzyl,ylxs));
1258 1260 yh=Arith.add(yh, Arith.sub(ylxs,nextJzyl));
1259 1261 t.setYh(yh);
1260 1262 t.setJzyl(ylxs);
1261 1263 nextJzyl=ylxs;
  1264 +
  1265 +
1262 1266 }else{
1263 1267 t.setYh(yh);
1264 1268 t.setJzyl(nextJzyl);
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -10,11 +10,12 @@ import com.bsth.controller.realcontrol.dto.DfsjChange;
10 10 import com.bsth.controller.realcontrol.dto.LpData;
11 11 import com.bsth.data.BasicData;
12 12 import com.bsth.data.LineConfigData;
13   -import com.bsth.data.msg_queue.DirectivePushQueue;
14 13 import com.bsth.data.schedule.DayOfSchedule;
15 14 import com.bsth.data.schedule.SchAttrCalculator;
16   -import com.bsth.data.schedule.edit_logs.FormLogger;
17 15 import com.bsth.data.schedule.ScheduleComparator;
  16 +import com.bsth.data.schedule.edit_logs.FormLogger;
  17 +import com.bsth.data.schedule.edit_logs.ScheduleModifyLogger;
  18 +import com.bsth.data.schedule.edit_logs.loggers.FcxxwtLogger;
18 19 import com.bsth.data.schedule.late_adjust.LateAdjustHandle;
19 20 import com.bsth.entity.Cars;
20 21 import com.bsth.entity.Line;
... ... @@ -221,6 +222,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
221 222 schedule.setRealExecDate(schedule.getScheduleDateStr());
222 223 }
223 224  
  225 + //记录日志
  226 + ScheduleModifyLogger.dftz(schedule,opType, schedule.getDfsj(),dfsj,remarks);
  227 +
224 228 schedule.setDfsjAll(dfsj);
225 229 schedule.setDfAuto(false);
226 230 schedule.addRemarks(remarks);
... ... @@ -276,6 +280,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
276 280 map.put("msg", "不必要的重复烂班!");
277 281 return map;
278 282 }
  283 + //记录日志
  284 + ScheduleModifyLogger.jhlb(schedule, remarks);
279 285  
280 286 schedule.setAdjustExps(reason);
281 287 schedule.destroy();
... ... @@ -1043,6 +1049,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1043 1049 sch.setRealExecDate(sch.getScheduleDateStr());
1044 1050 }
1045 1051  
  1052 + //日志记录
  1053 + ScheduleModifyLogger.sftz(sch, fcsjActual, remarks);
  1054 +
1046 1055 sch.setFcsjActualAll(fcsjActual);
1047 1056 sch.addRemarks(remarks);
1048 1057 sch.calcStatus();
... ... @@ -1078,6 +1087,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1078 1087 rs.put("status", ResponseCode.ERROR);
1079 1088 rs.put("msg", "未烂班,无法撤销!");
1080 1089 } else {
  1090 + //日志记录
  1091 + ScheduleModifyLogger.cxlb(sch);
  1092 +
1081 1093 sch.setStatus(0);
1082 1094 sch.setRemarks("");//清空备注
1083 1095 sch.setJhlc(sch.getJhlcOrig());
... ... @@ -1117,6 +1129,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1117 1129 break;
1118 1130 }
1119 1131 }*/
  1132 + //日志记录
  1133 + ScheduleModifyLogger.cxsf(sch);
1120 1134  
1121 1135 sch.clearFcsjActual();
1122 1136 rs.put("status", ResponseCode.SUCCESS);
... ... @@ -1163,7 +1177,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1163 1177 sch = list.get(i);
1164 1178  
1165 1179 //调整待发
1166   - outgoAdjust(sch.getId(), null, fmtHHmm.print(st), null, "间隔调整");
  1180 + outgoAdjust(sch.getId(), null, fmtHHmm.print(st), null, "3");
1167 1181 }
1168 1182  
1169 1183 rs.put("status", ResponseCode.SUCCESS);
... ... @@ -1186,6 +1200,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1186 1200 List<ScheduleRealInfo> ts = new ArrayList<>();
1187 1201 try {
1188 1202 Long id = Long.parseLong(map.get("id"));
  1203 + String remarks = map.get("remarks");
  1204 +
1189 1205 ScheduleRealInfo sch = dayOfSchedule.get(id);
1190 1206  
1191 1207 if(null == sch){
... ... @@ -1194,6 +1210,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1194 1210 return rs;
1195 1211 }
1196 1212  
  1213 + //日志记录器
  1214 + FcxxwtLogger fLog = FcxxwtLogger.start(sch, remarks);
  1215 +
1197 1216 String clZbh = map.get("clZbh");
1198 1217 String jsy = map.get("jsy");
1199 1218 if(!clZbh.equals(sch.getClZbh())
... ... @@ -1208,7 +1227,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1208 1227 rs.put("status", ResponseCode.ERROR);
1209 1228 rs.put("msg", "车辆 " + clZbh + " 不存在!");
1210 1229 return rs;
1211   - } else {
  1230 + } else if(!clZbh.equals(sch.getClZbh())){
  1231 + fLog.log("换车", sch.getClZbh(), clZbh);
1212 1232 dayOfSchedule.changeCar(sch, clZbh);
1213 1233 }
1214 1234 }
... ... @@ -1224,7 +1244,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1224 1244 rs.put("status", ResponseCode.ERROR);
1225 1245 return rs;
1226 1246 }
1227   - persoChange(sch, jGh);
  1247 + else if(!jGh.equals(sch.getjGh())){
  1248 + fLog.log("换驾驶员", sch.getjGh() + "/" + sch.getjName(), jsy);
  1249 + persoChange(sch, jGh);
  1250 + }
1228 1251 }
1229 1252  
1230 1253 /**
... ... @@ -1239,9 +1262,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1239 1262 rs.put("status", ResponseCode.ERROR);
1240 1263 return rs;
1241 1264 }
1242   - persoChangeSPY(sch, sGh);
  1265 + else if(!sGh.equals(sch.getsGh())){
  1266 + fLog.log("换售票员", sch.getsGh() + "/" + sch.getsName(), spy);
  1267 + persoChangeSPY(sch, sGh);
  1268 + }
1243 1269 }
1244   - else{
  1270 + else if(StringUtils.isNotEmpty(sch.getsGh())){
  1271 + fLog.log("撤销售票员");
1245 1272 sch.setsGh("");
1246 1273 sch.setsName("");
1247 1274 }
... ... @@ -1261,6 +1288,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1261 1288 else
1262 1289 t = fmtyyyyMMddHHmm.parseMillis(sch.getScheduleDateStr() + fcsjActual);
1263 1290  
  1291 + fLog.log("调整实发时间", sch.getFcsjActual(), fcsjActual);
1264 1292 sch.setFcsjActualAll(t);
1265 1293 //取消应发未到标记
1266 1294 if(sch.isLate2()){
... ... @@ -1268,6 +1296,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1268 1296 LateAdjustHandle.remove(sch);
1269 1297 }
1270 1298 } else if (StringUtils.isNotEmpty(sch.getFcsjActual()) && StringUtils.isEmpty(fcsjActual)){
  1299 + fLog.log("撤销实发时间", sch.getFcsjActual(), "");
1271 1300 //撤销实发
1272 1301 revokeRealOutgo(sch.getId());
1273 1302 }
... ... @@ -1280,6 +1309,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1280 1309 && !zdsjActual.equals(sch.getZdsjActual())) {
1281 1310  
1282 1311 //调整实达
  1312 + fLog.log("调整实达时间", sch.getZdsjActual(), zdsjActual);
1283 1313 sch.setZdsjActualAll(zdsjActual);
1284 1314 //路牌下一班起点到达时间
1285 1315 ScheduleRealInfo next = dayOfSchedule.nextByLp(sch);
... ... @@ -1289,19 +1319,20 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1289 1319 ts.add(next);
1290 1320 }
1291 1321  
1292   - try{
  1322 +/* try{
1293 1323 //车辆下一个要执行的班次
1294 1324 ScheduleRealInfo carNext = dayOfSchedule.next(sch);
1295 1325 if(carNext != null && !carNext.getXlBm().equals(sch.getXlBm())){
1296 1326 DirectivePushQueue.put64(carNext.getClZbh(), carNext.getXlBm(), "套跑@系统");
1297   - //directiveService.lineChange(carNext.getClZbh(), carNext.getXlBm(), "套跑@系统");
  1327 + fLog.log("下发线路切换指令", sch.getXlName(), carNext.getXlName());
1298 1328 }
1299   - }catch (Exception e){logger.error("", e);}
  1329 + }catch (Exception e){logger.error("", e);}*/
1300 1330  
1301 1331 //重新计算车辆执行班次
1302 1332 dayOfSchedule.reCalcExecPlan(sch.getClZbh());
1303 1333 } else if(StringUtils.isNotEmpty(sch.getZdsjActual()) && StringUtils.isEmpty(zdsjActual)){
1304 1334 //清除实达时间
  1335 + fLog.log("撤销实达时间", sch.getZdsjActual(), "");
1305 1336 sch.clearZdsjActual();
1306 1337 //清除路牌下一班起点到达时间
1307 1338 ScheduleRealInfo next = dayOfSchedule.nextByLp(sch);
... ... @@ -1316,7 +1347,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1316 1347 /**
1317 1348 * 备注
1318 1349 */
1319   - sch.setRemarks(map.get("remarks"));
  1350 + sch.setRemarks(remarks);
1320 1351  
1321 1352 /**
1322 1353 * 烂班
... ... @@ -1324,6 +1355,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1324 1355 if (map.get("status") != null
1325 1356 && Integer.parseInt(map.get("status").toString()) == -1) {
1326 1357 destroy(sch.getId() + "", "", map.get("adjustExps").toString());
  1358 + fLog.log("烂班");
1327 1359 }
1328 1360  
1329 1361 /**
... ... @@ -1333,9 +1365,12 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1333 1365 if (StringUtils.isNotEmpty(jhlc)) {
1334 1366 double jhlcNum = Double.parseDouble(jhlc);
1335 1367 //烂班
1336   - if(jhlcNum == 0 && sch.getJhlcOrig() != 0 && !sch._isInout())
  1368 + if(jhlcNum == 0 && sch.getJhlcOrig() != 0 && !sch._isInout() && !sch.isDestroy()){
1337 1369 destroy(sch.getId() + "", "", map.get("adjustExps").toString());
  1370 + fLog.log("里程设置为0,自动烂班");
  1371 + }
1338 1372 else if(jhlcNum != sch.getJhlc()){
  1373 + fLog.log("设置里程", sch.getJhlc(), jhlcNum);
1339 1374 sch.setJhlc(jhlcNum);
1340 1375 //临加班次,实际计划一起改
1341 1376 if(sch.isSflj())
... ... @@ -1347,7 +1382,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1347 1382 * 修改班次类型
1348 1383 */
1349 1384 String bcType = map.get("bcType");
1350   - if (StringUtils.isNotEmpty(bcType)) {
  1385 + if (StringUtils.isNotEmpty(bcType) && !bcType.equals(sch.getBcType())) {
  1386 + fLog.log("修改班次类型", sch.getBcType(), bcType);
1351 1387 sch.setBcType(bcType);
1352 1388 }
1353 1389  
... ... @@ -1359,6 +1395,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1359 1395  
1360 1396 rs.put("status", ResponseCode.SUCCESS);
1361 1397 rs.put("ts", ts);
  1398 +
  1399 + //日志记录结束
  1400 + fLog.end();
1362 1401 } catch (Exception e) {
1363 1402 logger.error("", e);
1364 1403 rs.put("status", ResponseCode.ERROR);
... ... @@ -1383,7 +1422,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
1383 1422 schedule = dayOfSchedule.get(id);
1384 1423  
1385 1424 if(schedule != null)
1386   - outgoAdjust(id, null, dfsj, null, "批量调整");
  1425 + outgoAdjust(id, null, dfsj, null, "2");
1387 1426 }
1388 1427  
1389 1428 rs.put("status", ResponseCode.SUCCESS);
... ... @@ -2894,7 +2933,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2894 2933 list.add(t);
2895 2934 }
2896 2935  
2897   - List<ScheduleRealInfo> listInfo2 = scheduleRealInfoRepository.scheduleByDateAndLine(line, date);
  2936 + List<ScheduleRealInfo> listInfo2 = scheduleRealInfoRepository.scheduleByDateAndLineQp2(line, date);
2898 2937 List<ScheduleRealInfo> xList = new ArrayList<ScheduleRealInfo>();
2899 2938 List<ScheduleRealInfo> yList = new ArrayList<ScheduleRealInfo>();
2900 2939 List<ScheduleRealInfo> zList = new ArrayList<ScheduleRealInfo>();
... ... @@ -3117,9 +3156,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3117 3156 Double jccgl=culateMieageService.culateJccgl(listS);
3118 3157 Double zyygl=Arith.add(sjgl, ljgl);
3119 3158 Double zksgl=Arith.add(ksgl, jccgl);
3120   - yesterdayDataList.get(x).put("totalKilometers", Arith.add(zyygl, zksgl));
  3159 + Double zlc=Arith.add(zyygl, zksgl);
  3160 + yesterdayDataList.get(x).put("totalKilometers", zlc);
3121 3161  
3122 3162 }
  3163 + for (int i = 0; i < yesterdayDataList.size(); i++) {
  3164 + Map<String, Object> map=yesterdayDataList.get(i);
  3165 + Double zlc=map.get("totalKilometers")==null?0.0:Double.parseDouble(map.get("totalKilometers").toString());
  3166 + if(zlc<=0){
  3167 + yesterdayDataList.remove(map);
  3168 + }
  3169 + }
3123 3170 //增加顺序号
3124 3171 for (int i = 0; i < yesterdayDataList.size(); i++) {
3125 3172 if (i == 0) {
... ... @@ -3144,7 +3191,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3144 3191 Set<ScheduleRealInfo> set = new HashSet<>();
3145 3192  
3146 3193 ScheduleRealInfo sch;
3147   - //BiMap<String, String> map = BasicData.deviceId2NbbmMap.inverse();
3148 3194  
3149 3195 String jGh = null,jName,sGh,sName;
3150 3196 for (ChangePersonCar cpc : cpcs) {
... ... @@ -3171,6 +3217,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3171 3217  
3172 3218 //为换人换车情况表写入数据
3173 3219 schModifyLog.saveChangetochange(sch, cpc);
  3220 + //日志记录
  3221 + ScheduleModifyLogger.tzrc(sch, cpc);
3174 3222  
3175 3223 if (StringUtils.isNotEmpty(cpc.getJsy())) {
3176 3224 //换驾驶员
... ... @@ -3257,7 +3305,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3257 3305 if (StringUtils.isEmpty(dc.getOld_dfsj()) || StringUtils.isEmpty(dc.getNew_dfsj()))
3258 3306 continue;
3259 3307  
3260   - tempMap = outgoAdjust(dc.getSchId(), "", dc.getNew_dfsj(), null, "批量调整");
  3308 + tempMap = outgoAdjust(dc.getSchId(), "", dc.getNew_dfsj(), null, "2");
3261 3309  
3262 3310 if (tempMap.get("status").equals(ResponseCode.SUCCESS)) {
3263 3311 list.addAll((Collection<? extends ScheduleRealInfo>) tempMap.get("ts"));
... ... @@ -4534,6 +4582,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
4534 4582 rs.put("status", ResponseCode.ERROR);
4535 4583 rs.put("msg", "班次未执行,无法撤销!");
4536 4584 } else {
  4585 + //日志记录
  4586 + ScheduleModifyLogger.cxzx(sch);
4537 4587  
4538 4588 sch.clearFcsjActual();
4539 4589 sch.clearZdsjActual();
... ...
src/main/java/com/bsth/service/report/SheetService.java 0 → 100644
  1 +package com.bsth.service.report;
  2 +
  3 +import java.util.List;
  4 +import java.util.Map;
  5 +
  6 +import com.bsth.entity.sheet.Sheet;
  7 +import com.bsth.service.BaseService;
  8 +
  9 +public interface SheetService extends BaseService<Sheet, Integer>{
  10 + public List<Map<String, Object>> bcPunctual(Map<String, Object> map);
  11 + public String saveSheetList() throws Exception;
  12 + public List<Map<String, Object>> countList(Map<String, Object> map);
  13 +
  14 + public List<Sheet> sheetList(Integer id);
  15 +}
... ...
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -375,11 +375,11 @@ public class ReportServiceImpl implements ReportService{
375 375 String[] minSjs = minfcsj.split(":");
376 376 int minSj=Integer.parseInt(minSjs[0])*60+Integer.parseInt(minSjs[1]);
377 377 //查询时间里程
378   - String sqlPc=" (SELECT jhlc,fcsj,bc_type,lp,2 as xh FROM bsth_c_s_ttinfo_detail "
  378 + String sqlPc=" (SELECT jhlc,fcsj,bc_type,lp,2 as xh, ists FROM bsth_c_s_ttinfo_detail "
379 379 + " where ttinfo ='"+ttinfo+"' and fcsj <='"+minfcsj+"' ) "
380 380 + " union "
381   - + " (SELECT jhlc,fcsj,bc_type,lp,1 as xh FROM bsth_c_s_ttinfo_detail "
382   - + " where ttinfo ='"+ttinfo+"' and fcsj > '"+minfcsj+"') order by lp,xh,fcsj";
  381 + + " (SELECT jhlc,fcsj,bc_type,lp,1 as xh, ists FROM bsth_c_s_ttinfo_detail "
  382 + + " where ttinfo ='"+ttinfo+"' and fcsj > '"+minfcsj+"') order by lp,xh,fcsj";
383 383  
384 384 Map<String, Object> map=new HashMap<String,Object>();
385 385 List<Map<String, Object>> list= jdbcTemplate.query(sqlPc,
... ... @@ -391,6 +391,7 @@ public class ReportServiceImpl implements ReportService{
391 391 m.put("yygl", rs.getString("jhlc")==null?"0":rs.getString("jhlc"));
392 392 m.put("bcType", rs.getString("bc_type"));
393 393 m.put("lp", rs.getString("lp"));
  394 + m.put("ists", rs.getObject("ists")==null?"0":rs.getString("ists"));
394 395 return m;
395 396 }
396 397 });
... ... @@ -451,6 +452,9 @@ public class ReportServiceImpl implements ReportService{
451 452 lp=m.get("lp").toString();
452 453  
453 454 }
  455 + if(m.containsKey("ists") && m.get("ists").equals("1")){
  456 + sj = 0;
  457 + }
454 458 }
455 459 if(yysj>0){
456 460 yycs =yygl/(yysj*1.0/60);
... ... @@ -573,191 +577,77 @@ public class ReportServiceImpl implements ReportService{
573 577  
574 578 //查询全程
575 579 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+"' ) "
  580 + + " (SELECT bc_type, fcsj,qdz,2 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+"') "
578 583 + " 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";
  584 + + " (SELECT bc_type, fcsj,qdz,1 as xh,xl_dir FROM bsth_c_s_ttinfo_detail "
  585 + + " where ttinfo ='"+ttinfo+"' and (bc_type='normal' || bc_type='region') "
  586 + + " and fcsj > '"+minfcsj+"') "
  587 + + "order by xl_dir,xh,fcsj ) t left join bsth_c_station x on t.qdz=x.id";
582 588 List<Map<String, String>> qclist= jdbcTemplate.query(sqlqc,
583 589 new RowMapper<Map<String, String>>(){
584 590 @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   - }
  591 + public Map<String, String> mapRow(ResultSet rs, int rowNum) throws SQLException {
  592 + Map<String, String> m=new HashMap<String,String>();
  593 + m.put("qdz_name", rs.getString("qdz_name"));
  594 + m.put("bcType", rs.getString("bc_type"));
  595 + m.put("fcsj", rs.getString("fcsj"));
  596 + m.put("xl", rs.getString("xl_dir"));
  597 + m.put("xh", rs.getString("xh"));
  598 + return m;
  599 + }
592 600  
593 601 });
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   - }
  602 +
  603 + List<List<Map<String, String>>> mapList = new ArrayList<List<Map<String,String>>>();
  604 + mapList.add(new ArrayList<Map<String, String>>());
  605 + mapList.add(new ArrayList<Map<String, String>>());
  606 + for(Map<String, String> m : qclist){
  607 + String bcType = m.get("bcType");
  608 + if(bcType.equals("normal")){
  609 + mapList.get(0).add(m);
  610 + } else {
  611 + mapList.get(1).add(m);
622 612 }
623 613 }
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   -
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 614  
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   - }
  615 + for(int i = 0; i < mapList.size(); i++){
  616 + List<Map<String, String>> l = mapList.get(i);
  617 + Map<String, Object> tempMap = new HashMap<String, Object>();
  618 + List<String> upfcsj = new ArrayList<String>();
  619 + List<String> downfcsj = new ArrayList<String>();
  620 + String sxqdz = "", xxqdz = "";
  621 + String sxfcsj = "", xxfcsj = "";
  622 + int sxbc = 0, xxbc = 0;
  623 + for(Map<String, String> m : l){
  624 + if(m.get("xl").equals("0")){
  625 + sxbc++;
  626 + upfcsj.add(m.get("fcsj"));
  627 + if(sxqdz.length() == 0 && m.containsKey("qdz_name"))
  628 + sxqdz = m.get("qdz_name");
  629 + } else {
  630 + xxbc++;
  631 + downfcsj.add(m.get("fcsj"));
  632 + if(xxqdz.length() == 0 && m.containsKey("qdz_name"))
  633 + xxqdz = m.get("qdz_name");
748 634 }
749   -
750   -
751 635 }
  636 + if(upfcsj.size() != 0)
  637 + sxfcsj = upfcsj.get(0) + "-" + upfcsj.get(upfcsj.size() - 1);
  638 + if(downfcsj.size() != 0)
  639 + xxfcsj = downfcsj.get(0) + "-" + downfcsj.get(downfcsj.size() - 1);
  640 + tempMap.put("sxqdz", sxqdz);
  641 + tempMap.put("sxfcsj", i==0?sxfcsj:"");
  642 + tempMap.put("sxbc", sxbc!=0?sxbc:"");
  643 + tempMap.put("xxqdz", xxqdz);
  644 + tempMap.put("xxfcsj", i==0?xxfcsj:"");
  645 + tempMap.put("xxbc", xxbc!=0?xxbc:"");
  646 + tempMap.put("bcType", i);
  647 + if(sxqdz.length()!=0 || xxqdz.length()!=0)
  648 + list.add(tempMap);
752 649 }
753 650  
754   - if(!qjzMap.isEmpty()){
755   - list.add(qjzMap);
756   - }
757   - if(!qjwMap.isEmpty()){
758   - list.add(qjwMap);
759   -
760   - }
761 651 return list;
762 652 }
763 653 @Override
... ... @@ -769,30 +659,36 @@ public class ReportServiceImpl implements ReportService{
769 659 String[] minSjs = minfcsj.split(":");
770 660 int minSj=Integer.parseInt(minSjs[0])*60+Integer.parseInt(minSjs[1]);
771 661 //查询时间里程
772   - String sqlPc=" (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,2 as xh FROM "
  662 + String sqlPc=" (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,ists,2 as xh FROM "
773 663 + " bsth_c_s_ttinfo_detail where ttinfo ='"+ttinfo+"' and "
774   - + " fcsj <='"+minfcsj+"' and bc_type = 'normal') "
  664 + + " fcsj <='"+minfcsj+"' and bc_type!='in' and bc_type!='out' and bc_type!='ldks') "
775 665 + " union "
776   - + " (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,1 as xh FROM "
  666 + + " (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,ists,1 as xh FROM "
777 667 + " bsth_c_s_ttinfo_detail where ttinfo ='"+ttinfo+"' and "
778   - + " fcsj >'"+minfcsj+"' and bc_type ='normal') "
779   - + " order by xl_dir, xh,fcsj";
780   -
  668 + + " fcsj > '"+minfcsj+"' and bc_type!='in' and bc_type!='out' and bc_type!='ldks') "
  669 + + " order by xl_dir, xh, fcsj";
781 670 Map<String, Object> map=new HashMap<String,Object>();
782 671 List<Map<String, Object>> list= jdbcTemplate.query(sqlPc,
783   - new RowMapper<Map<String, Object>>(){
784   - @Override
785   - public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
786   - Map<String, Object> m=new HashMap<String,Object>();
787   - m.put("fcsj", rs.getString("fcsj"));
788   - m.put("yygl", rs.getString("jhlc")==null?"0":rs.getString("jhlc"));
789   - m.put("bcsj", rs.getString("bcsj"));
790   - m.put("bcType", rs.getString("bc_type"));
791   - m.put("lp", rs.getString("lp"));
792   - m.put("dir", rs.getString("xl_dir"));
793   - return m;
794   - }
795   - });
  672 + new RowMapper<Map<String, Object>>(){
  673 + @Override
  674 + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
  675 + Map<String, Object> m=new HashMap<String,Object>();
  676 + m.put("fcsj", rs.getString("fcsj"));
  677 + m.put("yygl", rs.getString("jhlc")==null?"0":rs.getString("jhlc"));
  678 + m.put("bcsj", rs.getString("bcsj"));
  679 + m.put("bcType", rs.getString("bc_type"));
  680 + m.put("lp", rs.getString("lp"));
  681 + m.put("dir", rs.getString("xl_dir"));
  682 + m.put("ists", rs.getString("ists")!=null?rs.getString("ists"):"");
  683 +
  684 + if(rs.getString("xh").equals("2")){
  685 + String[] split = m.get("fcsj").toString().split(":");
  686 + m.put("fcsj", Integer.valueOf(split[0]) + 24 + ":"+split[1]);
  687 + }
  688 +
  689 + return m;
  690 + }
  691 + });
796 692  
797 693 List<Map<String, Object>> newList=new ArrayList<Map<String,Object>>();
798 694 Map<String, List<Map<String, Object>>> keyMap = new HashMap<String, List<Map<String, Object>>>();
... ... @@ -824,8 +720,10 @@ public class ReportServiceImpl implements ReportService{
824 720 Map<String, Object> tempMap = new HashMap<String, Object>();
825 721 List<Map<String, Object>> list2 = keyMap.get(key);
826 722 List<Integer> cjs = new ArrayList<Integer>();
827   - int sxsj = 0, xxsj = 0, zcj = 0;
  723 + int sxsj = 0, xxsj = 0, zcj = 0, tssj = 0;
  724 + int sxbc = 0, xxbc = 0;
828 725 int temp = 24*60+1;
  726 + boolean ists = false;
829 727 for(Map<String, Object> m : list2){
830 728 String[] split = m.get("fcsj").toString().split(":");
831 729 int fcsj = Integer.valueOf(split[0])*60 + Integer.valueOf(split[1]);
... ... @@ -833,14 +731,25 @@ public class ReportServiceImpl implements ReportService{
833 731 int bcsj = Integer.valueOf(m.get("bcsj").toString());
834 732 if(xlDir == 0){
835 733 sxsj += bcsj;
  734 + sxbc ++;
836 735 } else {
837 736 xxsj += bcsj;
  737 + xxbc ++;
838 738 }
839 739 if(temp >= fcsj){
840 740 temp = fcsj;
  741 + ists = false;
841 742 } else {
842   - cjs.add(fcsj - temp);
  743 + if(ists){
  744 + tssj += fcsj - temp;
  745 + ists = false;
  746 + } else {
  747 + cjs.add(fcsj - temp);
  748 + }
843 749 temp = fcsj;
  750 + if(m.get("ists").equals("1")){
  751 + ists = true;
  752 + }
844 753 }
845 754 }
846 755 Collections.sort(cjs);
... ... @@ -848,11 +757,12 @@ public class ReportServiceImpl implements ReportService{
848 757 zcj += i;
849 758 }
850 759 tempMap.put("sjd", key);
851   - tempMap.put("sxsj", sxsj);
852   - tempMap.put("xxsj", xxsj);
853   - tempMap.put("fqsj", sxsj + xxsj);
  760 + tempMap.put("sxsj", sxsj / sxbc);
  761 + tempMap.put("xxsj", xxsj / xxbc);
  762 + tempMap.put("fqsj", (sxsj + xxsj) / list2.size());
854 763 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):"/");
  764 + tempMap.put("pjcj", cjs.size()>0?zcj/cjs.size():"/");
  765 + tempMap.put("tssj", tssj);
856 766 maps.put(key, tempMap);
857 767 }
858 768 newList.add(maps.get("(首)——6:30"));
... ...
src/main/java/com/bsth/service/report/impl/SheetServiceImpl.java 0 → 100644
  1 +package com.bsth.service.report.impl;
  2 +
  3 +import java.sql.ResultSet;
  4 +import java.sql.SQLException;
  5 +import java.text.DecimalFormat;
  6 +import java.text.ParseException;
  7 +import java.text.SimpleDateFormat;
  8 +import java.util.ArrayList;
  9 +import java.util.Calendar;
  10 +import java.util.Collections;
  11 +import java.util.Comparator;
  12 +import java.util.Date;
  13 +import java.util.GregorianCalendar;
  14 +import java.util.HashMap;
  15 +import java.util.Iterator;
  16 +import java.util.List;
  17 +import java.util.Map;
  18 +import java.util.Set;
  19 +
  20 +import javax.transaction.Transactional;
  21 +
  22 +import org.apache.poi.hssf.eventusermodel.EventWorkbookBuilder.SheetRecordCollectingListener;
  23 +import org.slf4j.Logger;
  24 +import org.slf4j.LoggerFactory;
  25 +import org.springframework.beans.factory.annotation.Autowired;
  26 +import org.springframework.jdbc.core.JdbcTemplate;
  27 +import org.springframework.jdbc.core.RowMapper;
  28 +import org.springframework.scheduling.commonj.ScheduledTimerListener;
  29 +import org.springframework.stereotype.Service;
  30 +
  31 +import com.bsth.data.BasicData;
  32 +import com.bsth.entity.Line;
  33 +import com.bsth.entity.oil.Ylb;
  34 +import com.bsth.entity.realcontrol.ChildTaskPlan;
  35 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  36 +import com.bsth.entity.sheet.Sheet;
  37 +import com.bsth.repository.LineRepository;
  38 +import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
  39 +import com.bsth.repository.sheet.SheetRepository;
  40 +import com.bsth.service.impl.BaseServiceImpl;
  41 +import com.bsth.service.report.SheetService;
  42 +import com.bsth.util.BatchSaveUtils;
  43 +import com.bsth.util.ComparableChild;
  44 +import com.bsth.util.ComparableReal;
  45 +import com.google.common.util.concurrent.AbstractScheduledService.Scheduler;
  46 +
  47 +@Service
  48 +public class SheetServiceImpl extends BaseServiceImpl<Sheet, Integer> implements SheetService {
  49 + Logger logger = LoggerFactory.getLogger(this.getClass());
  50 + @Autowired
  51 + ScheduleRealInfoRepository scheduleRealInfoRepository;
  52 + @Autowired
  53 + LineRepository lineRepository;
  54 + @Autowired
  55 + JdbcTemplate jdbcTemplate;
  56 + @Autowired
  57 + SheetRepository sheetRepository;
  58 + /**
  59 + * 班次准点率
  60 + */
  61 + @Override
  62 + public List<Map<String, Object>> bcPunctual(Map<String, Object> map) {
  63 + // TODO Auto-generated method stub
  64 + String line =map.get("line").toString();
  65 + String date =map.get("date").toString();
  66 + List<ScheduleRealInfo> realList=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date);
  67 +
  68 + return null;
  69 + }
  70 + public static boolean isInOut(ScheduleRealInfo s){
  71 + boolean fage=false;
  72 + if(s.getBcType().equals("in")){
  73 + fage=true;
  74 + }
  75 + if(s.getBcType().equals("out")){
  76 + fage=true;
  77 + }
  78 + if(s.getBcType().equals("ldks")){
  79 + fage=true;
  80 + }
  81 +
  82 + return fage;
  83 + }
  84 + @Override
  85 + public String saveSheetList() throws Exception{
  86 + Map<String, Object> map=new HashMap<String,Object>();
  87 + String result = "failure";
  88 + try {
  89 + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd");
  90 + Date dNow = new Date(); //当前时间
  91 + Calendar calendar = Calendar.getInstance(); //得到日历
  92 + calendar.setTime(dNow);//把当前时间赋给日历
  93 + calendar.add(Calendar.DAY_OF_MONTH, -3); //设置为前三天
  94 +
  95 + String rq=sdf.format(calendar.getTime());
  96 +// String rq="2017-05-16";
  97 +
  98 + List<Line> lineList = (List<Line>) lineRepository.findAll();
  99 +
  100 + List<ScheduleRealInfo> lists= scheduleRealInfoRepository.findByDate(rq);
  101 + List<Sheet> listAdds=new ArrayList<Sheet>();
  102 + for (int i = 0; i < lineList.size(); i++) {
  103 + List<ScheduleRealInfo> list=new ArrayList<ScheduleRealInfo>();
  104 + String line=lineList.get(i).getLineCode();
  105 + for (int j = 0; j < lists.size(); j++) {
  106 + ScheduleRealInfo s=lists.get(j);
  107 + if(!isInOut(s)){
  108 + if(s.getXlBm().equals(line)){
  109 + list.add(s);
  110 + }
  111 + }
  112 +
  113 + }
  114 + if(list.size()>0){
  115 + List<Sheet> listAdd=punctualByLine(line,list);
  116 + if(listAdd.size()>0){
  117 + listAdds.addAll(listAdd);
  118 + }
  119 + }
  120 +
  121 + }
  122 +
  123 + if(listAdds.size()>0){
  124 + new BatchSaveUtils<Sheet>().saveList(listAdds, Sheet.class);
  125 + }
  126 + result = "success";
  127 + }catch (Exception e) {
  128 + // TODO Auto-generated catch block
  129 + throw e;
  130 + }finally{
  131 + logger.info("setDDRB:"+result);
  132 + }
  133 +
  134 + return result;
  135 + }
  136 +
  137 + public List<Sheet> punctualByLine(String line,List<ScheduleRealInfo> list){
  138 + List<Sheet> listAdd=new ArrayList<Sheet>();
  139 +// String line =map.get("line").toString();
  140 +// String date =map.get("date").toString();
  141 + SimpleDateFormat sdf=new SimpleDateFormat("yyyy-MM-dd HH:mm");
  142 + String sqlMinYysj="select start_opt from bsth_c_line_config where "
  143 + + " id = ("
  144 + + "select max(id) from bsth_c_line_config where line ='"+BasicData.lineId2CodeMap.inverse().get(line) +"'"
  145 + + ")";
  146 + List<String> listMin=jdbcTemplate.query(sqlMinYysj,
  147 + new RowMapper<String>(){
  148 + @Override
  149 + public String mapRow(ResultSet rs, int rowNum) throws SQLException {
  150 + String s=rs.getString("start_opt");
  151 + return s;
  152 + }
  153 + });
  154 + if(listMin.size()>0){
  155 + String minfcsj=listMin.get(0);
  156 + String[] minSjs = minfcsj.split(":");
  157 + //车辆最早发车时间 用了过滤超第二天0点的数据
  158 + Long minSj=Long.parseLong(minSjs[0])*60+Long.parseLong(minSjs[1]);
  159 + //0 上行 1下行
  160 + List<ScheduleRealInfo> listJhsj0=new ArrayList<ScheduleRealInfo>();
  161 +
  162 + List<ScheduleRealInfo> listJhsj1=new ArrayList<ScheduleRealInfo>();
  163 +
  164 + List<ScheduleRealInfo> listReal0=new ArrayList<ScheduleRealInfo>();
  165 +
  166 + List<ScheduleRealInfo> listReal1=new ArrayList<ScheduleRealInfo>();
  167 + //排除所有进出场班次
  168 +// List<ScheduleRealInfo> list=scheduleRealInfoRepository.scheduleByDateAndLine2(line, date);
  169 + /* for (int i = 0; i < list.size(); i++) {
  170 + //排除所有烂班的班次
  171 + ScheduleRealInfo s=list.get(i);
  172 + Set<ChildTaskPlan> cts=s.getcTasks();
  173 + if(cts!=null && cts.size() > 0){
  174 +
  175 + }
  176 + ScheduleRealInfo r=checkBc(s);
  177 + String[] fcsj= r.getFcsj().split(":");
  178 + Long fcsjL=Long.parseLong(fcsj[0])*60+Long.parseLong(fcsj[1]);
  179 + Long fscjT=0L;
  180 + if(fcsjL<minSj){
  181 + Calendar calendar = new GregorianCalendar();
  182 + calendar.setTime(r.getScheduleDate());
  183 + calendar.add(calendar.DATE,1);
  184 + r.setScheduleDate(calendar.getTime());
  185 + try {
  186 + fscjT = sdf.parse(sdf.format(r.getScheduleDate())+" "+r.getFcsj()).getTime();
  187 + } catch (ParseException e) {
  188 + // TODO Auto-generated catch block
  189 + e.printStackTrace();
  190 + }
  191 +
  192 + }else{
  193 + try {
  194 + fscjT =sdf.parse(r.getScheduleDateStr()+" "+r.getFcsj()).getTime();
  195 + } catch (ParseException e) {
  196 + // TODO Auto-generated catch block
  197 + e.printStackTrace();
  198 + };
  199 + }
  200 +
  201 + Sheet sheet=new Sheet();
  202 + Long fcsjAcual=0L;
  203 + if (r.getFcsjActual()!=null) {
  204 + if(!r.getFcsjActual().equals("")){
  205 + try {
  206 + fcsjAcual =sdf.parse(r.getRealExecDate()+" "+r.getFcsjActual()).getTime();
  207 + } catch (ParseException e) {
  208 + // TODO Auto-generated catch block
  209 + e.printStackTrace();
  210 + }
  211 +
  212 +
  213 + Long sjc=fscjT-fcsjAcual;
  214 + //在快慢五分钟内直接添加
  215 + if(sjc>= 3*60*1000*-1 && sjc <=3*60*1000){
  216 +
  217 + sheet.setDate(r.getScheduleDateStr());
  218 + sheet.setRealDate(r.getRealExecDate());
  219 + sheet.setJhsjt(fscjT);
  220 + sheet.setJhsj(r.getFcsj());
  221 + sheet.setSjsjt(fcsjAcual);
  222 + sheet.setSjsj(r.getFcsjActual());
  223 + sheet.setGs(r.getGsBm());
  224 + sheet.setFgs(r.getFgsBm());
  225 + sheet.setLine(r.getXlBm());
  226 + sheet.setXlDir(r.getXlDir());
  227 + sheet.setZdname(r.getQdzName());
  228 + sheet.setCreateDate(new Date());
  229 + listAdd.add(sheet);
  230 + }else{
  231 + r.setFcsjActualTime(fcsjAcual);
  232 + r.setFcsjT(fscjT);
  233 + if(r.getXlDir().equals("0")){
  234 + listJhsj0.add(r);
  235 + listReal0.add(r);
  236 + }else{
  237 + listJhsj1.add(r);
  238 + listReal1.add(r);
  239 + }
  240 + }
  241 + }else{
  242 + sheet.setDate(r.getScheduleDateStr());
  243 + sheet.setRealDate(r.getRealExecDate());
  244 + sheet.setJhsjt(fscjT);
  245 + sheet.setJhsj(r.getFcsj());
  246 + sheet.setSjsjt(0L);
  247 + sheet.setSjsj("烂班");
  248 + sheet.setGs(r.getGsBm());
  249 + sheet.setFgs(r.getFgsBm());
  250 + sheet.setLine(r.getXlBm());
  251 + sheet.setXlDir(r.getXlDir());
  252 + sheet.setZdname(r.getQdzName());
  253 + sheet.setCreateDate(new Date());
  254 + listAdd.add(sheet);
  255 + }
  256 + }else{
  257 + sheet.setDate(r.getScheduleDateStr());
  258 + sheet.setRealDate(r.getRealExecDate());
  259 + sheet.setJhsjt(fscjT);
  260 + sheet.setJhsj(r.getFcsj());
  261 + sheet.setSjsjt(0L);
  262 + sheet.setSjsj("烂班");
  263 + sheet.setGs(r.getGsBm());
  264 + sheet.setFgs(r.getFgsBm());
  265 + sheet.setLine(r.getXlBm());
  266 + sheet.setXlDir(r.getXlDir());
  267 + sheet.setZdname(r.getQdzName());
  268 + sheet.setCreateDate(new Date());
  269 + listAdd.add(sheet);
  270 + }
  271 + }*/
  272 + for (int i = 0; i < list.size(); i++) {
  273 + ScheduleRealInfo s=list.get(i);
  274 + ScheduleRealInfo r=checkBc(s);
  275 + String[] fcsj= r.getFcsj().split(":");
  276 + Long fcsjL=Long.parseLong(fcsj[0])*60+Long.parseLong(fcsj[1]);
  277 + Long fscjT=0L;
  278 + if(fcsjL<minSj){
  279 + Calendar calendar = new GregorianCalendar();
  280 + calendar.setTime(r.getScheduleDate());
  281 + calendar.add(calendar.DATE,1);
  282 + r.setScheduleDate(calendar.getTime());
  283 + try {
  284 + fscjT = sdf.parse(sdf.format(r.getScheduleDate())+" "+r.getFcsj()).getTime();
  285 + } catch (ParseException e) {
  286 + // TODO Auto-generated catch block
  287 + e.printStackTrace();
  288 + }
  289 +
  290 + }else{
  291 + try {
  292 + fscjT =sdf.parse(r.getScheduleDateStr()+" "+r.getFcsj()).getTime();
  293 + } catch (ParseException e) {
  294 + // TODO Auto-generated catch block
  295 + e.printStackTrace();
  296 + };
  297 + }
  298 + r.setFcsjT(fscjT);
  299 + Sheet sheet=new Sheet();
  300 + if (s.getFcsjActual() != null) {
  301 + Long fcsjAcual = 0L;
  302 + try {
  303 + fcsjAcual = sdf.parse(r.getRealExecDate() + " " + r.getFcsjActual()).getTime();
  304 + r.setFcsjActualTime(fcsjAcual);
  305 + r.setFcsjT(fscjT);
  306 + } catch (ParseException e) {
  307 + // TODO Auto-generated catch block
  308 + e.printStackTrace();
  309 + }
  310 + if (r.isSflj()) {
  311 + if (s.getXlDir().equals("0")) {
  312 + listReal0.add(r);
  313 + } else {
  314 + listReal1.add(r);
  315 + }
  316 +
  317 + } else {
  318 + if (s.getFcsjActual() != null) {
  319 + Long sjc = fcsjAcual - fscjT;
  320 + // 在快慢五分钟内直接添加
  321 + if (sjc >= 1 * 60 * 1000 * -1 && sjc <= 3 * 60 * 1000) {
  322 + sheet.setDate(r.getScheduleDateStr());
  323 + sheet.setRealDate(r.getRealExecDate());
  324 + sheet.setJhsjt(fscjT);
  325 + sheet.setJhsj(r.getFcsj());
  326 + sheet.setSjsjt(fcsjAcual);
  327 + sheet.setSjsj(r.getFcsjActual());
  328 + sheet.setGs(r.getGsBm());
  329 + sheet.setFgs(r.getFgsBm());
  330 + sheet.setLine(r.getXlBm());
  331 + sheet.setXlDir(r.getXlDir());
  332 + sheet.setZdname(r.getQdzName());
  333 + sheet.setCreateDate(new Date());
  334 + listAdd.add(sheet);
  335 + } else {
  336 + if (r.getXlDir().equals("0")) {
  337 + listJhsj0.add(r);
  338 + listReal0.add(r);
  339 + } else {
  340 + listJhsj1.add(r);
  341 + listReal1.add(r);
  342 + }
  343 + }
  344 + }
  345 + }
  346 + } else {
  347 + /*sheet.setDate(r.getScheduleDateStr());
  348 + sheet.setRealDate(r.getRealExecDate());
  349 + sheet.setJhsjt(fscjT);
  350 + sheet.setJhsj(r.getFcsj());
  351 + sheet.setSjsjt(0L);
  352 + sheet.setSjsj("烂班");
  353 + sheet.setGs(r.getGsBm());
  354 + sheet.setFgs(r.getFgsBm());
  355 + sheet.setLine(r.getXlBm());
  356 + sheet.setXlDir(r.getXlDir());
  357 + sheet.setZdname(r.getQdzName());
  358 + sheet.setCreateDate(new Date());
  359 + listAdd.add(sheet);*/
  360 + r.setFcsjActualTime(0L);
  361 + r.setFcsjT(fscjT);
  362 + r.setFcsjActual("烂班");
  363 + if (r.getXlDir().equals("0")) {
  364 + listJhsj0.add(r);
  365 + listReal0.add(r);
  366 + } else {
  367 + listJhsj1.add(r);
  368 + listReal1.add(r);
  369 + }
  370 +
  371 + }
  372 +
  373 + }
  374 + //计发排序
  375 + Collections.sort(listJhsj0, new ComparableReal());
  376 + Collections.sort(listJhsj1, new ComparableReal());
  377 + //实发排序
  378 + Collections.sort(listReal0,new ComparableAcual());
  379 + Collections.sort(listReal1,new ComparableAcual());
  380 +
  381 + //计划发车时间和实际发车时间比较计算准点率
  382 +
  383 +
  384 +
  385 + int no=listJhsj0.size()*2;
  386 + boolean fage=true;
  387 +// for (int p = no; p > 0; p--) {
  388 + while(fage){
  389 + //查询所有的实发 对应最接近的 计发
  390 + List<Map<String, Object>> list_map=new ArrayList<Map<String,Object>>();
  391 + for (int i = 0; i < listReal0.size(); i++) {
  392 + Map<String, Object> m_=new HashMap<String,Object>();
  393 + ScheduleRealInfo s1=listReal0.get(i);
  394 + Long sjsj=s1.getFcsjActualTime();
  395 + ScheduleRealInfo absInfo=new ScheduleRealInfo();
  396 + int next_j=listJhsj0.size();
  397 + for (int j = 0; j < listJhsj0.size(); j++) {
  398 + ScheduleRealInfo s2=listJhsj0.get(j);
  399 + if(j==0){
  400 + absInfo=s2;
  401 + }else{
  402 + //计发实发时间绝对值比较 取到最接近的值
  403 + Long abs1 = Math.abs(sjsj - s2.getFcsjT());
  404 + Long abs2 = Math.abs(sjsj -absInfo.getFcsjT());
  405 + if(abs2-abs1>0){
  406 + absInfo=s2;
  407 + next_j=j;
  408 + }
  409 + }
  410 + }
  411 + if(next_j<=0){
  412 + break;
  413 + }else{
  414 + m_.put("s", s1.getId());
  415 + m_.put("j", absInfo.getId());
  416 + m_.put("s_list", s1);
  417 + m_.put("j_list", absInfo);
  418 + m_.put("abs", Math.abs(sjsj-absInfo.getFcsjT()));
  419 + list_map.add(m_);
  420 + }
  421 + }
  422 + Collections.sort(list_map,new ComparableMap());
  423 + Map<String, Object> m_s=new HashMap<String,Object>();
  424 + List<Map<String, Object>> list_m_s=new ArrayList<Map<String,Object>>();
  425 +
  426 + for (int i = 0; i < list_map.size(); i++) {
  427 + Map<String, Object> m_=list_map.get(i);
  428 + Map<String, Object> m_l=new HashMap<String,Object>();
  429 + if(m_s.get(m_.get("j").toString())==null){
  430 + m_s.put(m_.get("s").toString(), m_.get("s"));
  431 + m_s.put(m_.get("j").toString(), m_.get("j"));
  432 + m_l.put("s", m_.get("s"));
  433 + m_l.put("j", m_.get("j"));
  434 + m_l.put("s_l",m_.get("s_list"));
  435 + m_l.put("j_l",m_.get("j_list"));
  436 + list_m_s.add(m_l);
  437 + }
  438 + }
  439 + for (int i = 0; i < list_m_s.size(); i++) {
  440 + Map<String, Object> m_l=list_m_s.get(i);
  441 + Long s=Long.parseLong(m_l.get("s").toString());
  442 + boolean s_bool=false;
  443 + for (int k = 0; k < listReal0.size(); k++) {
  444 + ScheduleRealInfo s0=listReal0.get(k);
  445 + if(s0.getId()-s==0){
  446 + listReal0.remove(s0);
  447 + s_bool=true;
  448 + }
  449 + }
  450 +
  451 + Long j=Long.parseLong(m_l.get("j").toString());
  452 + boolean j_bool=false;
  453 + for (int j2 = 0; j2 < listJhsj0.size(); j2++) {
  454 + ScheduleRealInfo j0=listJhsj0.get(j2);
  455 + if(j0.getId()-j==0){
  456 + listJhsj0.remove(j0);
  457 + j_bool=true;
  458 + }
  459 + }
  460 +
  461 + if(s_bool&&j_bool){
  462 + ScheduleRealInfo sf=(ScheduleRealInfo)m_l.get("s_l");
  463 + ScheduleRealInfo jf=(ScheduleRealInfo)m_l.get("j_l");
  464 + Sheet sheet=new Sheet();
  465 + sheet.setDate(sf.getScheduleDateStr());
  466 + sheet.setRealDate(sf.getRealExecDate());
  467 + sheet.setJhsjt(jf.getFcsjT());
  468 + sheet.setJhsj(jf.getFcsj());
  469 + sheet.setSjsjt(sf.getFcsjActualTime());
  470 + sheet.setSjsj(sf.getFcsjActual());
  471 + sheet.setGs(sf.getGsBm());
  472 + sheet.setFgs(sf.getFgsBm());
  473 + sheet.setLine(sf.getXlBm());
  474 + sheet.setXlDir(sf.getXlDir());
  475 + sheet.setZdname(sf.getQdzName());
  476 + sheet.setCreateDate(new Date());
  477 + listAdd.add(sheet);
  478 + }
  479 + }
  480 +
  481 + if(listJhsj0.size()<=0){
  482 + fage=false;
  483 + }
  484 + no--;
  485 + if(no<0){
  486 + fage=false;
  487 + }
  488 + }
  489 +
  490 +
  491 + int nos=listJhsj1.size()*2;
  492 + fage=true;
  493 + while(fage){
  494 + //查询所有的实发 对应最接近的 计发
  495 + List<Map<String, Object>> list_map=new ArrayList<Map<String,Object>>();
  496 + for (int i = 0; i < listReal1.size(); i++) {
  497 + Map<String, Object> m_=new HashMap<String,Object>();
  498 + ScheduleRealInfo s1=listReal1.get(i);
  499 + Long sjsj=s1.getFcsjActualTime();
  500 + ScheduleRealInfo absInfo=new ScheduleRealInfo();
  501 + int next_j=listJhsj1.size();
  502 + for (int j = 0; j < listJhsj1.size(); j++) {
  503 + ScheduleRealInfo s2=listJhsj1.get(j);
  504 + if(j==0){
  505 + absInfo=s2;
  506 + }else{
  507 + //计发实发时间绝对值比较 取到最接近的值
  508 + Long abs1 = Math.abs(sjsj - s2.getFcsjT());
  509 + Long abs2 = Math.abs(sjsj -absInfo.getFcsjT());
  510 + if(abs2-abs1>0){
  511 + absInfo=s2;
  512 + next_j=j;
  513 + }
  514 + }
  515 + }
  516 + if(next_j<=0){
  517 + break;
  518 + }else{
  519 + m_.put("s", s1.getId());
  520 + m_.put("j", absInfo.getId());
  521 + m_.put("s_list", s1);
  522 + m_.put("j_list", absInfo);
  523 + m_.put("abs", Math.abs(sjsj-absInfo.getFcsjT()));
  524 + list_map.add(m_);
  525 + }
  526 +
  527 + }
  528 + Collections.sort(list_map,new ComparableMap());
  529 + Map<String, Object> m_s=new HashMap<String,Object>();
  530 + List<Map<String, Object>> list_m_s=new ArrayList<Map<String,Object>>();
  531 +
  532 + for (int i = 0; i < list_map.size(); i++) {
  533 + Map<String, Object> m_=list_map.get(i);
  534 + Map<String, Object> m_l=new HashMap<String,Object>();
  535 + if(m_s.get(m_.get("j").toString())==null){
  536 + m_s.put(m_.get("s").toString(), m_.get("s"));
  537 + m_s.put(m_.get("j").toString(), m_.get("j"));
  538 + m_l.put("s", m_.get("s"));
  539 + m_l.put("j", m_.get("j"));
  540 + m_l.put("s_l",m_.get("s_list"));
  541 + m_l.put("j_l",m_.get("j_list"));
  542 + list_m_s.add(m_l);
  543 + }
  544 + }
  545 + for (int i = 0; i < list_m_s.size(); i++) {
  546 + Map<String, Object> m_l=list_m_s.get(i);
  547 + Long s=Long.parseLong(m_l.get("s").toString());
  548 + boolean s_bool=false;
  549 + for (int k = 0; k < listReal1.size(); k++) {
  550 + ScheduleRealInfo s0=listReal1.get(k);
  551 + if(s0.getId()-s==0){
  552 + listReal1.remove(s0);
  553 + s_bool=true;
  554 + }
  555 + }
  556 +
  557 + Long j=Long.parseLong(m_l.get("j").toString());
  558 + boolean j_bool=false;
  559 + for (int j2 = 0; j2 < listJhsj1.size(); j2++) {
  560 + ScheduleRealInfo j0=listJhsj1.get(j2);
  561 + if(j0.getId()-j==0){
  562 + listJhsj1.remove(j0);
  563 + j_bool=true;
  564 + }
  565 + }
  566 +
  567 + if(s_bool&&j_bool){
  568 + ScheduleRealInfo sf=(ScheduleRealInfo)m_l.get("s_l");
  569 + ScheduleRealInfo jf=(ScheduleRealInfo)m_l.get("j_l");
  570 + Sheet sheet=new Sheet();
  571 + sheet.setDate(sf.getScheduleDateStr());
  572 + sheet.setRealDate(sf.getRealExecDate());
  573 + sheet.setJhsjt(jf.getFcsjT());
  574 + sheet.setJhsj(jf.getFcsj());
  575 + sheet.setSjsjt(sf.getFcsjActualTime());
  576 + sheet.setSjsj(sf.getFcsjActual());
  577 + sheet.setGs(sf.getGsBm());
  578 + sheet.setFgs(sf.getFgsBm());
  579 + sheet.setLine(sf.getXlBm());
  580 + sheet.setXlDir(sf.getXlDir());
  581 + sheet.setZdname(sf.getQdzName());
  582 + sheet.setCreateDate(new Date());
  583 + listAdd.add(sheet);
  584 + }
  585 + }
  586 +
  587 + if(listJhsj1.size()<=0){
  588 + fage=false;
  589 + }
  590 + nos--;
  591 + if(nos<0){
  592 + fage=false;
  593 + }
  594 + }
  595 + }
  596 + return listAdd;
  597 + }
  598 +
  599 + public ScheduleRealInfo checkBc(ScheduleRealInfo s){
  600 + //如果班次有子任务 且 子任务中有属于营运的。把该子任务的发车时间设置成班次的发车时间
  601 + Set<ChildTaskPlan> childTaskPlans = s.getcTasks();
  602 + if(!childTaskPlans.isEmpty()){
  603 + List<ChildTaskPlan> listit=new ArrayList<ChildTaskPlan>(childTaskPlans);
  604 + Collections.sort(listit, new ComparableChild());
  605 + for (int i = 0; i < listit.size(); i++) {
  606 + ChildTaskPlan c=listit.get(i);
  607 + if(!c.isDestroy()){
  608 + if(c.getMileageType().equals("service")){
  609 + s.setFcsjActual(c.getStartDate());
  610 + break;
  611 + }
  612 +
  613 + }
  614 + }
  615 + }
  616 + return s;
  617 + }
  618 +
  619 + public Long abs_js(List<ScheduleRealInfo> list,ScheduleRealInfo t){
  620 + Long jhsj=t.getFcsjT();
  621 + ScheduleRealInfo absInfo=new ScheduleRealInfo();
  622 + for (int j = 0; j < list.size(); j++) {
  623 + ScheduleRealInfo s =list.get(j);
  624 + if(j==0){
  625 + absInfo=s;
  626 + }else{
  627 + //计发实发时间绝对值比较 取到最接近的值
  628 + Long abs1 = Math.abs(jhsj - s.getFcsjActualTime());
  629 + Long abs2 = Math.abs(absInfo.getFcsjActualTime());
  630 + if(abs2-abs1>0){
  631 + absInfo=s;
  632 + }
  633 + }
  634 + }
  635 + return absInfo.getId();
  636 +
  637 + }
  638 +
  639 + @Override
  640 + public List<Map<String, Object>> countList(Map<String, Object> map) {
  641 + // TODO Auto-generated method stub
  642 + List<Map<String, Object>> listmap=new ArrayList<Map<String,Object>>();
  643 + String line="";
  644 + if(map.get("line")!=null){
  645 + line =map.get("line").toString();
  646 + }
  647 + String gs="";
  648 + if(map.get("gs")!=null){
  649 + gs=map.get("gs").toString();
  650 + }
  651 + String fgs="";
  652 + if(map.get("fgs")!=null){
  653 + fgs=map.get("fgs").toString();
  654 + }
  655 + String date=map.get("date").toString();
  656 + String sql="select * from bsth_c_sheet where date='"+date+"'";
  657 + if(line.trim().equals("")){
  658 + sql +=" and gs like '%"+gs+"%' and fgs like '%"+fgs+"%'";
  659 + }else{
  660 + sql +=" and line ='"+line+"'";
  661 + }
  662 + sql +=" order by line ";
  663 + List<Sheet> list=jdbcTemplate.query(sql,
  664 + new RowMapper<Sheet>(){
  665 + @Override
  666 + public Sheet mapRow(ResultSet rs, int rowNum) throws SQLException {
  667 + Sheet s=new Sheet();
  668 + s.setGs(rs.getString("gs"));
  669 + s.setFgs(rs.getString("fgs"));
  670 + s.setLine(rs.getString("line"));
  671 + s.setDate(rs.getString("date"));
  672 + s.setJhsj(rs.getString("jhsj"));
  673 + s.setJhsjt(rs.getLong("jhsjt"));
  674 + s.setSjsj(rs.getString("sjsj"));
  675 + s.setSjsjt(rs.getLong("sjsjt"));
  676 + s.setId(rs.getInt("id"));
  677 + return s;
  678 + }
  679 + });
  680 +
  681 + String sqlByLine="select line from bsth_c_sheet where date='"+date+"'";
  682 + if(line.trim().equals("")){
  683 + sqlByLine +=" and gs like '%"+gs+"%' and fgs like '%"+fgs+"%'";
  684 + }else{
  685 + sqlByLine +=" and line ='"+line+"'";
  686 + }
  687 + sqlByLine +=" group by line ";
  688 + List<String> listLine=jdbcTemplate.query(sqlByLine,
  689 + new RowMapper<String>(){
  690 + @Override
  691 + public String mapRow(ResultSet rs, int rowNum) throws SQLException {
  692 + String line=rs.getString("line");
  693 + return line;
  694 + }
  695 + });
  696 + for (int i = 0; i < listLine.size(); i++) {
  697 + String xlbm=listLine.get(i);
  698 + List<Sheet> newList=new ArrayList<Sheet>();
  699 + for (int j = 0; j < list.size(); j++) {
  700 + if(xlbm.equals(list.get(j).getLine())){
  701 + newList.add(list.get(j));
  702 + }
  703 + }
  704 +
  705 + if(newList.size()>0){
  706 + Map<String, Object> newmap=culateByLine(newList);
  707 + listmap.add(newmap);
  708 + }
  709 +
  710 + }
  711 + return listmap;
  712 + }
  713 +
  714 + public Map<String, Object> culateByLine(List<Sheet> list){
  715 + Map<String, Object> map=new HashMap<String,Object>();
  716 + String gs=BasicData.businessCodeNameMap.get(list.get(0).getGs());
  717 + String fgs=BasicData.businessFgsCodeNameMap.get(list.get(0).getFgs()+"_"+list.get(0).getGs());
  718 + String line=BasicData.lineCode2NameMap.get(list.get(0).getLine());
  719 + Integer id=list.get(0).getId();
  720 + int bcs=list.size();
  721 + int zdbcs=0;
  722 + for (int i = 0; i < list.size(); i++) {
  723 + Sheet s=list.get(i);
  724 + Long sjc=s.getJhsjt()-s.getSjsjt();
  725 + if(sjc>= 3*60*1000*-1 && sjc <=1*60*1000){
  726 + zdbcs++;
  727 + }
  728 + }
  729 + double zdlv =(zdbcs*1.0/bcs)*100;
  730 + DecimalFormat df = new DecimalFormat("0.00");
  731 + map.put("gs", gs);
  732 + map.put("fgs", fgs);
  733 + map.put("line", line);
  734 + map.put("bcs", bcs);
  735 + map.put("zdbcs", zdbcs);
  736 + map.put("zdlv", df.format(zdlv)+"%");
  737 + map.put("id", id);
  738 + return map;
  739 + }
  740 + @Override
  741 + public List<Sheet> sheetList(Integer id) {
  742 + // TODO Auto-generated method stub
  743 + Sheet sheet=sheetRepository.findOne(id);
  744 + String sql="select * from bsth_c_sheet where date='"+sheet.getDate()+"' and line = '"+sheet.getLine()+"'"
  745 + + " order by xl_dir,jhsj";
  746 +
  747 + List<Sheet> list=jdbcTemplate.query(sql,
  748 + new RowMapper<Sheet>(){
  749 + @Override
  750 + public Sheet mapRow(ResultSet rs, int rowNum) throws SQLException {
  751 + Sheet s=new Sheet();
  752 + s.setId(rs.getInt("id"));
  753 + s.setGs(rs.getString("gs"));
  754 + s.setFgs(rs.getString("fgs"));
  755 + s.setLine(rs.getString("line"));
  756 + s.setDate(rs.getString("date"));
  757 + s.setJhsj(rs.getString("jhsj"));
  758 + s.setJhsjt(rs.getLong("jhsjt"));
  759 + s.setSjsj(rs.getString("sjsj"));
  760 + s.setSjsjt(rs.getLong("sjsjt"));
  761 + s.setZdname(rs.getString("zdname"));
  762 + return s;
  763 + }
  764 + });
  765 + for (int i = 0; i < list.size(); i++) {
  766 + Sheet t=list.get(i);
  767 + t.setLine(BasicData.lineCode2NameMap.get(t.getLine()));
  768 + Long sjc=t.getJhsjt()-t.getSjsjt();
  769 + if(sjc>= 3*60*1000*-1 && sjc <=1*60*1000){
  770 + t.setSfzd("Y");
  771 + }else{
  772 + t.setSfzd("N");
  773 + }
  774 + }
  775 +
  776 + return list;
  777 + }
  778 +
  779 +
  780 +}
  781 + class ComparableAcual implements Comparator<ScheduleRealInfo>{
  782 +
  783 + @Override
  784 + public int compare(ScheduleRealInfo o1, ScheduleRealInfo o2) {
  785 + // TODO Auto-generated method stub
  786 + return o1.getFcsjActualTime().compareTo(o2.getFcsjActualTime());
  787 + }
  788 +
  789 +}
  790 +
  791 + class ComparableMap implements Comparator<Map<String, Object>>{
  792 + @Override
  793 + public int compare(Map<String, Object> o1, Map<String, Object> o2) {
  794 + // TODO Auto-generated method stub
  795 + return (int) (Long.parseLong(o1.get("abs").toString())-Long.parseLong((o2.get("abs").toString())));
  796 + }
  797 + }
... ...
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailDataToolsImpl.java
1   -package com.bsth.service.schedule.datatools;
2   -
3   -import com.bsth.service.schedule.exception.ScheduleException;
4   -import com.bsth.service.schedule.utils.DataToolsProperties;
5   -import com.bsth.service.schedule.utils.DataToolsService;
6   -import jxl.Cell;
7   -import jxl.Sheet;
8   -import jxl.Workbook;
9   -import jxl.write.Label;
10   -import jxl.write.WritableSheet;
11   -import jxl.write.WritableWorkbook;
12   -import org.apache.commons.lang3.StringUtils;
13   -import org.joda.time.DateTime;
14   -import org.slf4j.Logger;
15   -import org.slf4j.LoggerFactory;
16   -import org.springframework.beans.factory.annotation.Autowired;
17   -import org.springframework.beans.factory.annotation.Qualifier;
18   -import org.springframework.boot.context.properties.EnableConfigurationProperties;
19   -import org.springframework.stereotype.Service;
20   -
21   -import java.io.File;
22   -import java.io.PrintWriter;
23   -import java.io.StringWriter;
24   -import java.util.*;
25   -
26   -/**
27   - * Created by xu on 17/5/16.
28   - */
29   -@EnableConfigurationProperties(DataToolsProperties.class)
30   -@Service(value = "ttInfoDetail_dataTool")
31   -public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetailForEdit {
32   - /** 日志记录器 */
33   - private final static Logger LOGGER = LoggerFactory.getLogger(TTInfoDetailDataToolsImpl.class);
34   -
35   - @Autowired
36   - @Qualifier(value = "dataToolsServiceImpl")
37   - private DataToolsService dataToolsService;
38   -
39   - @Autowired
40   - private DataToolsProperties dataToolsProperties;
41   -
42   - @Override
43   - public File uploadFile(String filename, byte[] filedata) throws ScheduleException {
44   - try {
45   - // 对上传的excel文件做处理,将第一个sheet名字设定为工作表1
46   - File file = dataToolsService.uploadFile(filename, filedata);
47   - Workbook workbook = Workbook.getWorkbook(file);
48   - Sheet sheet = workbook.getSheet(0);
49   -
50   - File fileCal = new File(file.getAbsolutePath() + "_sheetChange.xls");
51   - WritableWorkbook writableWorkbook = Workbook.createWorkbook(fileCal);
52   - WritableSheet writableSheet = writableWorkbook.createSheet("工作表1", 0);
53   - for (int i = 0; i < sheet.getRows(); i++) {
54   - Cell[] cells = sheet.getRow(i);
55   - for (int j = 0; j < cells.length; j++) {
56   - writableSheet.addCell(new Label(j, i, cells[j].getContents()));
57   - }
58   - }
59   - writableWorkbook.write();
60   - writableWorkbook.close();
61   -
62   - return fileCal;
63   -
64   - } catch (Exception exp) {
65   - throw new ScheduleException(exp);
66   - }
67   - }
68   -
69   - @Override
70   - public void importData(File file, Map<String, Object> params) throws ScheduleException {
71   - try {
72   - LOGGER.info("//---------------- 导入时刻表明细 start... ----------------//");
73   -
74   - String filename = file.getAbsolutePath(); // xls文件名
75   - String sheetname = String.valueOf(params.get("sheetname")); // sheet名字
76   - Long ttid = Long.valueOf(String.valueOf(params.get("ttid"))); // 时刻表id
77   - Long xlid = Long.valueOf(String.valueOf(params.get("xlid"))); // 线路id
78   - Integer lineid = Integer.valueOf(String.valueOf(params.get("lineinfo"))); // 线路标准id
79   - String xlname = String.valueOf(params.get("xlname")); // 线路名字
80   - String ttname = String.valueOf(params.get("ttname")); // 时刻表名字
81   -
82   - LOGGER.info("参数1, xls文件名={},sheet名字={}", filename, sheetname);
83   - LOGGER.info("参数2, 线路id={},线路名字={}", xlid, xlname);
84   - LOGGER.info("参数3, 时刻表id={},时刻表名字={}", ttid, ttname);
85   -
86   - LOGGER.info("转换xls文件格式成文本格式...");
87   - // 1、修改已经上传的excel文件,在每个起点站后标示数字,表示第几个班次
88   - // 2、由于格式问题,需要把内容都转换成字符串
89   - List<String> colList = new ArrayList<>();
90   - Workbook workbook = Workbook.getWorkbook(new File(filename));
91   - Sheet sheet = workbook.getSheet(sheetname);
92   - Cell[] cells = sheet.getRow(0);
93   - for (int i = 0; i < cells.length; i++) {
94   - if (i == 0) {
95   - colList.add(cells[i].getContents().trim());
96   - } else {
97   - colList.add(cells[i].getContents() + i);
98   - }
99   - }
100   -
101   - File fileCal = new File(filename + "_stringType.xls");
102   - WritableWorkbook writableWorkbook = Workbook.createWorkbook(fileCal, workbook);
103   - WritableSheet sheet1 = writableWorkbook.getSheet(sheetname);
104   - for (int i = 0; i < sheet1.getColumns(); i++) { // 第一行数据
105   - sheet1.addCell(new Label(i, 0, colList.get(i)));
106   - }
107   - for (int i = 1; i < sheet1.getRows(); i++) { // 第二行开始
108   - Cell[] cells1 = sheet.getRow(i);
109   - for (int j = 0; j < cells1.length; j++) {
110   - sheet1.addCell(new Label(j, i, cells1[j].getContents()));
111   - }
112   - }
113   - writableWorkbook.write();
114   - writableWorkbook.close();
115   -
116   - // 2、删除原有数据
117   - // 操作在ktr内部执行
118   -
119   - // 3、导入时刻表
120   -
121   - // 计算表头参数
122   - Workbook book = Workbook.getWorkbook(fileCal);
123   - Sheet sheet_exp = book.getSheet(sheetname);
124   - List<String> columnames = new ArrayList<>();
125   - for (int i = 0; i < sheet_exp.getColumns(); i++) { // 获取第一行,数据,作为列名
126   - columnames.add(sheet_exp.getCell(i, 0).getContents());
127   - }
128   - LOGGER.info("表头={}", StringUtils.join(columnames.toArray(), ","));
129   -
130   - // 创建ktr转换所需参数
131   - Map<String, Object> ktrParms = new HashMap<>();
132   - File ktrFile = new File(this.getClass().getResource(
133   - dataToolsProperties.getTtinfodetailMetadatainputktr()).toURI());
134   -// File ktrFile2 = new File(this.getClass().getResource(
135   -// dataToolsProperties.getTtinfodetailDatainputktr()).toURI());
136   - File ktrFile2 = new File(this.getClass().getResource(
137   - dataToolsProperties.getTtinfodetailDatainputktr2()).toURI());
138   -
139   - // 通用参数,转换文件路径,excel输入文件路径,错误输出文件路径
140   - ktrParms.put("transpath", ktrFile.getAbsolutePath());
141   - ktrParms.put("filepath", fileCal.getAbsolutePath());
142   - ktrParms.put("erroroutputdir", dataToolsProperties.getTransErrordir());
143   -
144   - // 附加参数
145   - ktrParms.put("injectktrfile", ktrFile2.getAbsolutePath()); // 注入元数据的ktr文件
146   - ktrParms.put("sheetname", sheetname); // sheet工作区的名字
147   - ktrParms.put("lineinfoid", lineid); // 线路标准id
148   - ktrParms.put("xlname", xlname); // 线路名称
149   - ktrParms.put("ttinfoname", ttname); // 时刻表名称
150   - ktrParms.put("ttid", ttid.intValue()); // 时刻表id
151   - ktrParms.put("excelfieldnames", StringUtils.join(columnames.toArray(), ",")); // 时刻表excel输入字段名,以逗号连接
152   - columnames.remove(0);
153   - ktrParms.put("normalizefieldnames", StringUtils.join(columnames.toArray(), ",")); // 数据范式化字段名,以逗号连接
154   -
155   - dataToolsService.importData(fileCal, ktrParms);
156   -
157   - LOGGER.info("//---------------- 导入时刻表明细 success... ----------------//");
158   - } catch (Exception exp) {
159   - LOGGER.info("//---------------- 导入时刻表明细 failed... ----------------//");
160   -
161   - StringWriter sw = new StringWriter();
162   - exp.printStackTrace(new PrintWriter(sw));
163   - LOGGER.info(sw.toString());
164   -
165   - throw new ScheduleException(exp.getMessage());
166   - }
167   - }
168   -
169   - @Override
170   - public File exportData(Map<String, Object> params) throws ScheduleException {
171   - try {
172   - LOGGER.info("//---------------- 导出时刻表明细 start... ----------------//");
173   -
174   - // 创建ktr转换所需参数
175   - Map<String, Object> ktrParms = new HashMap<>();
176   - File ktrFile = new File(this.getClass().getResource(
177   - dataToolsProperties.getTtinfodetailMetaoutput()).toURI());
178   - File ktrFile2 = new File(this.getClass().getResource(
179   - dataToolsProperties.getTtinfodetailOutput()).toURI());
180   -
181   - // 通用参数,转换文件路径,excel输出文件名
182   - ktrParms.put("transpath", ktrFile.getAbsolutePath());
183   - ktrParms.put("filename", String.format("时刻表_(id=%s)_download-", String.valueOf(params.get("ttinfoid"))));
184   -
185   - // 附加参数
186   - ktrParms.put("injectktrfile", ktrFile2.getAbsolutePath()); // 注入元数据的ktr文件
187   - ktrParms.put("ttinfoid", String.valueOf(params.get("ttinfoid")));
188   -
189   - File file = dataToolsService.exportData(ktrParms);
190   -
191   - LOGGER.info("//---------------- 导出时刻表明细 success... ----------------//");
192   -
193   - return file;
194   - } catch (Exception exp) {
195   - LOGGER.info("//---------------- 导出时刻表明细 failed... ----------------//");
196   -
197   - StringWriter sw = new StringWriter();
198   - exp.printStackTrace(new PrintWriter(sw));
199   - LOGGER.info(sw.toString());
200   -
201   - throw new ScheduleException(exp.getMessage());
202   - }
203   - }
204   -
205   - @Override
206   - public EditInfo getEditInfo(Integer xlid, Long ttid, Long maxfcno) throws ScheduleException {
207   - try {
208   - LOGGER.info("//---------------- 时刻表编辑用数据输出 start... ----------------//");
209   -
210   - // 创建ktr转换所需参数
211   - Map<String, Object> ktrParms = new HashMap<>();
212   - File ktrFile = new File(this.getClass().getResource(
213   - dataToolsProperties.getTtinfodetailForeditktr()).toURI());
214   -
215   - // 通用参数,转换文件路径,excel输出文件名,错误输出文件路径
216   - ktrParms.put("transpath", ktrFile.getAbsolutePath());
217   - ktrParms.put("filename", "todo");
218   -
219   - // 附加参数
220   - String outputFilePath = String.format("ttinfodetail_(id=%s)_foredit-%s",
221   - String.valueOf(ttid), new DateTime().toString("yyyyMMddHHmmss"));
222   -
223   - ktrParms.put("tempfilepath", dataToolsProperties.getTransTempdir() + File.separator + outputFilePath); // 数据输出文件路径
224   - ktrParms.put("xlid", String.valueOf(xlid));
225   - ktrParms.put("ttid", String.valueOf(ttid));
226   -
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;
327   - } catch (Exception 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());
335   - }
336   - }
337   -
338   -}
  1 +package com.bsth.service.schedule.datatools;
  2 +
  3 +import com.bsth.service.schedule.exception.ScheduleException;
  4 +import com.bsth.service.schedule.utils.DataToolsProperties;
  5 +import com.bsth.service.schedule.utils.DataToolsService;
  6 +import jxl.Cell;
  7 +import jxl.Sheet;
  8 +import jxl.Workbook;
  9 +import jxl.write.Label;
  10 +import jxl.write.WritableSheet;
  11 +import jxl.write.WritableWorkbook;
  12 +import org.apache.commons.lang3.StringUtils;
  13 +import org.joda.time.DateTime;
  14 +import org.slf4j.Logger;
  15 +import org.slf4j.LoggerFactory;
  16 +import org.springframework.beans.factory.annotation.Autowired;
  17 +import org.springframework.beans.factory.annotation.Qualifier;
  18 +import org.springframework.boot.context.properties.EnableConfigurationProperties;
  19 +import org.springframework.stereotype.Service;
  20 +
  21 +import java.io.File;
  22 +import java.io.PrintWriter;
  23 +import java.io.StringWriter;
  24 +import java.util.*;
  25 +
  26 +/**
  27 + * Created by xu on 17/5/16.
  28 + */
  29 +@EnableConfigurationProperties(DataToolsProperties.class)
  30 +@Service(value = "ttInfoDetail_dataTool")
  31 +public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetailForEdit {
  32 + /** 日志记录器 */
  33 + private final static Logger LOGGER = LoggerFactory.getLogger(TTInfoDetailDataToolsImpl.class);
  34 +
  35 + @Autowired
  36 + @Qualifier(value = "dataToolsServiceImpl")
  37 + private DataToolsService dataToolsService;
  38 +
  39 + @Autowired
  40 + private DataToolsProperties dataToolsProperties;
  41 +
  42 + @Override
  43 + public File uploadFile(String filename, byte[] filedata) throws ScheduleException {
  44 + try {
  45 + // 对上传的excel文件做处理,将第一个sheet名字设定为工作表1
  46 + File file = dataToolsService.uploadFile(filename, filedata);
  47 + Workbook workbook = Workbook.getWorkbook(file);
  48 + Sheet sheet = workbook.getSheet(0);
  49 +
  50 + File fileCal = new File(file.getAbsolutePath() + "_sheetChange.xls");
  51 + WritableWorkbook writableWorkbook = Workbook.createWorkbook(fileCal);
  52 + WritableSheet writableSheet = writableWorkbook.createSheet("工作表1", 0);
  53 + for (int i = 0; i < sheet.getRows(); i++) {
  54 + Cell[] cells = sheet.getRow(i);
  55 + for (int j = 0; j < cells.length; j++) {
  56 + writableSheet.addCell(new Label(j, i, cells[j].getContents()));
  57 + }
  58 + }
  59 + writableWorkbook.write();
  60 + writableWorkbook.close();
  61 +
  62 + return fileCal;
  63 +
  64 + } catch (Exception exp) {
  65 + throw new ScheduleException(exp);
  66 + }
  67 + }
  68 +
  69 + @Override
  70 + public void importData(File file, Map<String, Object> params) throws ScheduleException {
  71 + try {
  72 + LOGGER.info("//---------------- 导入时刻表明细 start... ----------------//");
  73 +
  74 + String filename = file.getAbsolutePath(); // xls文件名
  75 + String sheetname = String.valueOf(params.get("sheetname")); // sheet名字
  76 + Long ttid = Long.valueOf(String.valueOf(params.get("ttid"))); // 时刻表id
  77 + Long xlid = Long.valueOf(String.valueOf(params.get("xlid"))); // 线路id
  78 + Integer lineid = Integer.valueOf(String.valueOf(params.get("lineinfo"))); // 线路标准id
  79 + String xlname = String.valueOf(params.get("xlname")); // 线路名字
  80 + String ttname = String.valueOf(params.get("ttname")); // 时刻表名字
  81 +
  82 + LOGGER.info("参数1, xls文件名={},sheet名字={}", filename, sheetname);
  83 + LOGGER.info("参数2, 线路id={},线路名字={}", xlid, xlname);
  84 + LOGGER.info("参数3, 时刻表id={},时刻表名字={}", ttid, ttname);
  85 +
  86 + LOGGER.info("转换xls文件格式成文本格式...");
  87 + // 1、修改已经上传的excel文件,在每个起点站后标示数字,表示第几个班次
  88 + // 2、由于格式问题,需要把内容都转换成字符串
  89 + List<String> colList = new ArrayList<>();
  90 + Workbook workbook = Workbook.getWorkbook(new File(filename));
  91 + Sheet sheet = workbook.getSheet(sheetname);
  92 + Cell[] cells = sheet.getRow(0);
  93 + for (int i = 0; i < cells.length; i++) {
  94 + if (i == 0) {
  95 + colList.add(cells[i].getContents().trim());
  96 + } else {
  97 + colList.add(cells[i].getContents() + i);
  98 + }
  99 + }
  100 +
  101 + File fileCal = new File(filename + "_stringType.xls");
  102 + WritableWorkbook writableWorkbook = Workbook.createWorkbook(fileCal, workbook);
  103 + WritableSheet sheet1 = writableWorkbook.getSheet(sheetname);
  104 + for (int i = 0; i < sheet1.getColumns(); i++) { // 第一行数据
  105 + sheet1.addCell(new Label(i, 0, colList.get(i)));
  106 + }
  107 + for (int i = 1; i < sheet1.getRows(); i++) { // 第二行开始
  108 + Cell[] cells1 = sheet.getRow(i);
  109 + for (int j = 0; j < cells1.length; j++) {
  110 + sheet1.addCell(new Label(j, i, cells1[j].getContents()));
  111 + }
  112 + }
  113 + writableWorkbook.write();
  114 + writableWorkbook.close();
  115 +
  116 + // 2、删除原有数据
  117 + // 操作在ktr内部执行
  118 +
  119 + // 3、导入时刻表
  120 +
  121 + // 计算表头参数
  122 + Workbook book = Workbook.getWorkbook(fileCal);
  123 + Sheet sheet_exp = book.getSheet(sheetname);
  124 + List<String> columnames = new ArrayList<>();
  125 + for (int i = 0; i < sheet_exp.getColumns(); i++) { // 获取第一行,数据,作为列名
  126 + columnames.add(sheet_exp.getCell(i, 0).getContents());
  127 + }
  128 + LOGGER.info("表头={}", StringUtils.join(columnames.toArray(), ","));
  129 +
  130 + // 创建ktr转换所需参数
  131 + Map<String, Object> ktrParms = new HashMap<>();
  132 + File ktrFile = new File(this.getClass().getResource(
  133 + dataToolsProperties.getTtinfodetailMetadatainputktr()).toURI());
  134 +// File ktrFile2 = new File(this.getClass().getResource(
  135 +// dataToolsProperties.getTtinfodetailDatainputktr()).toURI());
  136 + File ktrFile2 = new File(this.getClass().getResource(
  137 + dataToolsProperties.getTtinfodetailDatainputktr2()).toURI());
  138 +
  139 + // 通用参数,转换文件路径,excel输入文件路径,错误输出文件路径
  140 + ktrParms.put("transpath", ktrFile.getAbsolutePath());
  141 + ktrParms.put("filepath", fileCal.getAbsolutePath());
  142 + ktrParms.put("erroroutputdir", dataToolsProperties.getTransErrordir());
  143 +
  144 + // 附加参数
  145 + ktrParms.put("injectktrfile", ktrFile2.getAbsolutePath()); // 注入元数据的ktr文件
  146 + ktrParms.put("sheetname", sheetname); // sheet工作区的名字
  147 + ktrParms.put("lineinfoid", lineid); // 线路标准id
  148 + ktrParms.put("xlname", xlname); // 线路名称
  149 + ktrParms.put("ttinfoname", ttname); // 时刻表名称
  150 + ktrParms.put("ttid", ttid.intValue()); // 时刻表id
  151 + ktrParms.put("excelfieldnames", StringUtils.join(columnames.toArray(), ",")); // 时刻表excel输入字段名,以逗号连接
  152 + columnames.remove(0);
  153 + ktrParms.put("normalizefieldnames", StringUtils.join(columnames.toArray(), ",")); // 数据范式化字段名,以逗号连接
  154 +
  155 + dataToolsService.importData(fileCal, ktrParms);
  156 +
  157 + LOGGER.info("//---------------- 导入时刻表明细 success... ----------------//");
  158 + } catch (Exception exp) {
  159 + LOGGER.info("//---------------- 导入时刻表明细 failed... ----------------//");
  160 +
  161 + StringWriter sw = new StringWriter();
  162 + exp.printStackTrace(new PrintWriter(sw));
  163 + LOGGER.info(sw.toString());
  164 +
  165 + throw new ScheduleException(exp.getMessage());
  166 + }
  167 + }
  168 +
  169 + @Override
  170 + public File exportData(Map<String, Object> params) throws ScheduleException {
  171 + try {
  172 + LOGGER.info("//---------------- 导出时刻表明细 start... ----------------//");
  173 +
  174 + // 创建ktr转换所需参数
  175 + Map<String, Object> ktrParms = new HashMap<>();
  176 + File ktrFile = new File(this.getClass().getResource(
  177 + dataToolsProperties.getTtinfodetailMetaoutput()).toURI());
  178 + File ktrFile2 = new File(this.getClass().getResource(
  179 + dataToolsProperties.getTtinfodetailOutput()).toURI());
  180 +
  181 + // 通用参数,转换文件路径,excel输出文件名
  182 + ktrParms.put("transpath", ktrFile.getAbsolutePath());
  183 + ktrParms.put("filename", String.format("时刻表_(id=%s)_download-", String.valueOf(params.get("ttinfoid"))));
  184 +
  185 + // 附加参数
  186 + ktrParms.put("injectktrfile", ktrFile2.getAbsolutePath()); // 注入元数据的ktr文件
  187 + ktrParms.put("ttinfoid", String.valueOf(params.get("ttinfoid")));
  188 +
  189 + File file = dataToolsService.exportData(ktrParms);
  190 +
  191 + LOGGER.info("//---------------- 导出时刻表明细 success... ----------------//");
  192 +
  193 + return file;
  194 + } catch (Exception exp) {
  195 + LOGGER.info("//---------------- 导出时刻表明细 failed... ----------------//");
  196 +
  197 + StringWriter sw = new StringWriter();
  198 + exp.printStackTrace(new PrintWriter(sw));
  199 + LOGGER.info(sw.toString());
  200 +
  201 + throw new ScheduleException(exp.getMessage());
  202 + }
  203 + }
  204 +
  205 + @Override
  206 + public EditInfo getEditInfo(Integer xlid, Long ttid, Long maxfcno) throws ScheduleException {
  207 + try {
  208 + LOGGER.info("//---------------- 时刻表编辑用数据输出 start... ----------------//");
  209 +
  210 + // 创建ktr转换所需参数
  211 + Map<String, Object> ktrParms = new HashMap<>();
  212 + File ktrFile = new File(this.getClass().getResource(
  213 + dataToolsProperties.getTtinfodetailForeditktr()).toURI());
  214 +
  215 + // 通用参数,转换文件路径,excel输出文件名,错误输出文件路径
  216 + ktrParms.put("transpath", ktrFile.getAbsolutePath());
  217 + ktrParms.put("filename", "todo");
  218 +
  219 + // 附加参数
  220 + String outputFilePath = String.format("ttinfodetail_(id=%s)_foredit-%s",
  221 + String.valueOf(ttid), new DateTime().toString("yyyyMMddHHmmss"));
  222 +
  223 + ktrParms.put("tempfilepath", dataToolsProperties.getTransTempdir() + File.separator + outputFilePath); // 数据输出文件路径
  224 + ktrParms.put("xlid", String.valueOf(xlid));
  225 + ktrParms.put("ttid", String.valueOf(ttid));
  226 +
  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;
  327 + } catch (Exception 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());
  335 + }
  336 + }
  337 +
  338 +}
... ...
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailForEdit.java
1   -package com.bsth.service.schedule.datatools;
2   -
3   -import com.bsth.service.schedule.exception.ScheduleException;
4   -import org.apache.commons.lang3.StringUtils;
5   -
6   -import java.util.ArrayList;
7   -import java.util.List;
8   -
9   -/**
10   - * Created by xu on 17/5/16.
11   - */
12   -public interface TTInfoDetailForEdit {
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   -
167   -}
168   -
  1 +package com.bsth.service.schedule.datatools;
  2 +
  3 +import com.bsth.service.schedule.exception.ScheduleException;
  4 +import org.apache.commons.lang3.StringUtils;
  5 +
  6 +import java.util.ArrayList;
  7 +import java.util.List;
  8 +
  9 +/**
  10 + * Created by xu on 17/5/16.
  11 + */
  12 +public interface TTInfoDetailForEdit {
  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 +
  167 +}
  168 +
... ...
src/main/resources/static/pages/base/timesmodel/add.html
... ... @@ -4,9 +4,9 @@
4 4 }
5 5 .tagsDiv {
6 6 border: 1px solid #c2cad8;
7   - margin-left: 50px;
  7 + margin-left: 15px;
8 8 padding: 4px 15px 4px 15px;
9   - width: 69%;
  9 + width: 50%;
10 10 }
11 11 </style>
12 12 <!-- 片段标题 START -->
... ... @@ -58,7 +58,7 @@
58 58 <a href="#tab2" data-toggle="tab" class="step">
59 59 <span class="number"> 2 </span>
60 60 <span class="desc">
61   - <i class="fa fa-check"></i> 获取参数方式 </span>
  61 + <i class="fa fa-check"></i> 选择参数方案 </span>
62 62 </a>
63 63 </li>
64 64 <li>
... ... @@ -121,28 +121,28 @@
121 121 </div>
122 122 <!-- 获取参数 -->
123 123 <div class="tab-pane" id="tab2">
124   - <h3 class="block"> 获取参数方式 </h3>
  124 + <h3 class="block"> 参数方案 </h3>
125 125 <!-- 获取参数 -->
126 126 <div class="form-group">
127   - <label class="col-md-3 control-label"> <span class="required"> * </span> 获取参数方式:</label>
  127 + <label class="col-md-3 control-label"> <span class="required"> * </span> 选择参数方案:</label>
128 128 <div class="col-md-9">
129 129 <div class="icheck-list">
130 130 <label >
131   - <input type="radio" class="icheck" name="baseRes" value=1 > 手动输入
  131 + <input type="radio" class="icheck" name="baseRes" value=1 checked> 班型/人次/车辆
132 132 </label>
133 133 <label>
134   - <input type="radio" class="icheck" name="baseRes" value=0 checked> 客流大数据分析
  134 + <input type="radio" class="icheck" name="baseRes" value=0> 客流大数据分析
135 135 </label>
136 136 </div>
137 137 </div>
138 138 </div>
139 139 <!-- 客容总量 -->
140   - <div class="form-group" id="krlGroup">
  140 + <!-- <div class="form-group" id="krlGroup">
141 141 <label class="col-md-3 control-label"><span class="required"> * </span>客容总量&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
142 142 <div class="col-md-9">
143 143 <input type="text" class="form-control input-medium" name="krl" id="krlInput" placeholder="客容总量">
144 144 </div>
145   - </div>
  145 + </div> -->
146 146 </div>
147 147 <!-- 参数详情 -->
148 148 <div class="tab-pane" id="tab3">
... ...
src/main/resources/static/pages/base/timesmodel/js/add-form-wizard.js
... ... @@ -328,10 +328,10 @@ var SKBFormWizard = function() {
328 328 map.lb = 15;// 定义例保时间.
329 329 map.workeLunch = 20;// 定义午餐时间.
330 330 map.workeDinner = 20;// 定义晚餐时间.
331   - map.mixstopTime = 8;// 定义最小停站间隙
332   - map.maxstopTime = 20;// 定义最大停站间隙.
333   - map.upStopTime = 10;// 定义上行停站时间.
334   - map.downStopTime = 10;// 定义下行停站时间.
  331 + //map.mixstopTime = 8;// 定义最小停站间隙
  332 + //map.maxstopTime = 20;// 定义最大停站间隙.
  333 + //map.upStopTime = 10;// 定义上行停站时间.
  334 + //map.downStopTime = 10;// 定义下行停站时间.
335 335 if(n==0) {
336 336 // 定义一个周转时间.
337 337 var zzsj = parseInt(map.upTravelTime) + 10*2 + parseInt(map.downTravelTime);
... ... @@ -456,7 +456,7 @@ var SKBFormWizard = function() {
456 456 rules : {
457 457 'skbName' : {required : true,},// 时刻表名称,必填项.
458 458 'lineName' : {required : true,},// 线路名称,必填项.
459   - 'krl' : {isBaseRes : true,number : true,digits : true,},// 客容量,当选择为客流方式时必填项、整数
  459 + // 'krl' : {isBaseRes : true,number : true,digits : true,},// 客容量,当选择为客流方式时必填项、整数
460 460 'startStationFirstTime' : {required : true}, // 起始站首班时间,必填项.
461 461 'startStationEndTime' : {required : true}, // 起始站末班时间 ,必填项.
462 462 'endStationFirstTime' : {required : true}, // 终点站首班时间 ,必填项.
... ... @@ -502,6 +502,7 @@ var SKBFormWizard = function() {
502 502 'clzs':{required : true,number : true,digits : true, isBcType : true},// 车辆总数,必填项、必须为整数.
503 503 'bxrc' : {required : true},// 班型人次,必填项
504 504 'linePlayType' : {required : true},// 线路规划类型,必填项
  505 + 'zdzcrl' : {number : true,digits : true},
505 506 },
506 507  
507 508 /**
... ... @@ -557,7 +558,7 @@ var SKBFormWizard = function() {
557 558 var argus = form.serializeJSON();
558 559 console.log(argus);
559 560 // 获取站点路由.
560   - $get('/stationroute/all',{'line.id_eq':argus.lineName.split('_')[0]},function(result) {
  561 + $get('/stationroute/all',{'line.id_eq':argus.lineName.split('_')[0],'destroy_eq':0},function(result) {
561 562 // 判断.
562 563 if(result) {
563 564 // 定义上行起点站,上行终点站,下行起点站,下行终点站.
... ... @@ -652,7 +653,7 @@ var SKBFormWizard = function() {
652 653 },function(){return '高峰时段配车数必须高于其它时段配车数!';});
653 654  
654 655 // 验证客流数据分析时客容量为必填项.
655   - $.validator.addMethod("isBaseRes", function(value,element) {
  656 + /*$.validator.addMethod("isBaseRes", function(value,element) {
656 657 // 定义返回值.
657 658 var tag = true;
658 659 // 定义选择获取参数方式值
... ... @@ -662,7 +663,7 @@ var SKBFormWizard = function() {
662 663 tag = false;
663 664 return tag;
664 665 }, '客流大数据分析,客流总量为必填项!');
665   -
  666 + */
666 667 // 验证配车总数与班型人次搭配
667 668 $.validator.addMethod('isBcType', function(value,element) {
668 669 // 定义返回值.
... ... @@ -673,6 +674,14 @@ var SKBFormWizard = function() {
673 674 // 判断.
674 675 if(bxrc=='' || bxrc==null || clzs=='' || clzs==0)
675 676 return false;
  677 + var bxrcAr = bxrc.split(','),pczs = 0;
  678 + for(var s = 0 ; s< bxrcAr.length;s++) {
  679 + // 切割单个班型人次.
  680 + pczs = pczs + parseInt(bxrcAr[s].split('/')[2]);
  681 + }
  682 + if(pczs!=clzs)
  683 + tag = false;
  684 + /**
676 685 // 定义首末班次开始结束时间集合.
677 686 var map = {'line':{'startStationFirstTime':$('#qdzsbsjInput').val(),
678 687 'startStationEndTime':$('#qdzmbsjInput').val(),
... ... @@ -706,19 +715,20 @@ var SKBFormWizard = function() {
706 715 // 判断
707 716 if(parseFloat(countGs.toFixed(2))>maxGs || (bxrcAr.length==1 && countRc > parseInt(clzs)) )
708 717 tag = false;
  718 + */
709 719 return tag;
710   - },function(){return '配车总数与班型人次搭配不合理!'; });
  720 + },function(){return '配车总数与【班型/人次/车辆】搭配不合理!'; });
711 721  
712 722 /**
713 723 * @description : (TODO) 监听获取参数方式值改变事件.
714 724 *
715 725 * */
716   - $('input:radio[name="baseRes"]').on('change',function(v) {
  726 + /*$('input:radio[name="baseRes"]').on('change',function(v) {
717 727 if($(this).val()=='1')
718 728 $('#krlGroup').hide();
719 729 else if($(this).val()=='0')
720 730 $('#krlGroup').show();
721   - });
  731 + });*/
722 732  
723 733 // 确认提交信息
724 734 var displayConfirm = function() {
... ... @@ -794,14 +804,17 @@ var SKBFormWizard = function() {
794 804 if (form.valid() == false) {
795 805 return false;
796 806 }
797   - if(index==1) {
  807 + /*if(index==1) {
798 808 // 初始化客容量值.
799 809 if($('#krlInput').val() == '')
800 810 $('#krlInput').val(50);
801   - }else if(index == 2) {
  811 + }else */if(index == 2) {
802 812 var baseRes = $('#submit_argus_form input[name="baseRes"]:checked').val(),// 获取参数方式值.
803 813 lineId = $('#lineSelect').val().split('_')[0],// 线路ID.
804   - krl = $('#krlInput').val();// 客容量
  814 + krl = 50;
  815 + // krl = $('#krlInput').val();// 客容量
  816 + // 弹出正在加载层
  817 + var i = layer.load(2);
805 818 getLineInfo(lineId,function(r) {
806 819 getHtmlTemp(baseRes,r.content[0],lineId,krl,function(htlMap) {
807 820 $('#tab3').html(htlMap.forminput);
... ... @@ -831,6 +844,8 @@ var SKBFormWizard = function() {
831 844 options += '</optgroup>';
832 845 $('#carParkSelect').html(options).select2();
833 846 $('#carParkSelect').select2("val",r.content[0].carPark);
  847 + // 关闭弹出加载层
  848 + layer.close(i);
834 849 });
835 850 });
836 851 });
... ...
src/main/resources/static/pages/base/timesmodel/js/base-fun.js
... ... @@ -324,6 +324,220 @@ var BaseFun = function() {
324 324 'bxrcgs':null};
325 325 },
326 326  
  327 + BXPplaceClassesTime01 : function(saa,cara,map,seMap,dataMap,lpNoA) {
  328 + var allJsonD = baseF.plgfbc(saa,cara,map,seMap,dataMap);
  329 + var jsonArray = baseF.tzsmbcsj01(baseF.setbcsAndfcno(allJsonD),dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,saa[0].lbsj),lpNoA,dataMap;
  330 + var list = baseF.splitBxRc(map.bxrc);
  331 + baseF.fprclp01(list,cara);
  332 + console.log(list);
  333 + var bxrclist = list.data;
  334 + var rs = new Array(),bxrcgs= new Array();
  335 + // 遍历已分配好路牌的班型人次数组.
  336 + for(var x = 0 ; x < bxrclist.length; x++) {
  337 + // 定义当前班型人次下的路牌数组.
  338 + var cla = bxrclist[x].sslp;
  339 + var dsdnmb = bxrclist[x].rs/bxrclist[x].fpcls;
  340 + // 定义当前班型人次下的工时.
  341 + var hoursV = bxrclist[x].hoursV*dsdnmb;
  342 + // 遍历路牌
  343 + for(var s = 0 ; s < cla.length; s++) {
  344 + //cla[s].lpName = bxrclist[x].type;
  345 + // 获取路牌编号.
  346 + var lpNo = cla[s].lpNo;
  347 + // 定义路牌下的所有班次.
  348 + var lpbc = new Array();
  349 + bxrcgs.push({'lpNo':lpNo,'hoursV':hoursV,'type':bxrclist[x].type});
  350 + // 遍历班次数.
  351 + for(var i =0 ; i <jsonArray.length; i++) {
  352 + // 判断当期遍历的班次是否属于当前的路牌.
  353 + if(jsonArray[i].lpNo == lpNo)
  354 + lpbc.push(jsonArray[i]);
  355 + }
  356 + // 按照发车序号顺序排序.
  357 + lpbc.sort(function(a,b){return b.fcno-a.fcno});
  358 + // 调整班次数.也就是说调整工时.
  359 + baseF.tzlpgs01(lpbc,hoursV,map,dataMap,lpNo,saa);
  360 + rs = rs.concat(lpbc);
  361 + }
  362 + }
  363 + var jar = baseF.tzsmbcsj01(baseF.setbcsAndfcno(rs),dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,saa[0].lbsj),lpNoA,dataMap;
  364 + //var jar = baseF.tzsmbcsj(baseF.setbcsAndfcno(rs),dataMap.smbcsjArr,dataMap.ccsjArr,dataMap.cclcArr,dataMap.qdzArr,saa[0].lbsj),lpNoA,dataMap;
  365 + var resultJA = new Array();
  366 + for(var m = 0 ; m < cara.length; m++) {
  367 + // 获取路牌编号.
  368 + var lpNo_ = cara[m].lpNo;
  369 + // 定义路牌下的所有班次.
  370 + var lpbc_ = new Array();
  371 + // 遍历班次数.
  372 + for(var j =0 ; j <jar.length; j++) {
  373 + // 判断当期遍历的班次是否属于当前的路牌.
  374 + if(jar[j].lpNo == lpNo_)
  375 + lpbc_.push(jar[j]);
  376 + }
  377 + // 按照发车序号顺序排序.
  378 + lpbc_.sort(function(a,b){return a.fcno-b.fcno});
  379 + resultJA = resultJA.concat(baseF.addjclbbc01(lpbc_,dataMap,saa[0].lbsj,map));
  380 + // resultJA = resultJA.concat(lpbc_);
  381 + }
  382 + return {'json':resultJA,'bxrcgs':null};
  383 + },
  384 +
  385 + /**
  386 + * @description : (TODO) 添加进出场班次、早晚例保班次.
  387 + *
  388 + * @param [bc--路牌下的所有班次;dataMap--参数信息;lbsj--例保时间]
  389 + *
  390 + */
  391 + addjclbbc01 : function(bc,dataMap,lbsj,gatps) {
  392 + if(bc.length>0)
  393 + bc[bc.length-1].STOPTIME = 0;
  394 + var result = new Array();
  395 + var fcno = 0,dxfno = 0,stas = false;
  396 + for(var b = 0 ; b < bc.length;b++) {
  397 + var fxdm = baseF.dirDmToIndex(bc[b].xlDir);
  398 + var car = {'lp':bc[b].lp, 'lpNo':bc[b].lpNo, 'lpName':bc[b].lpName, 'lpType':bc[b].lpType};
  399 + if(b==0) {
  400 + var dqbcfcsj = baseF.getDateTime(bc[b].fcsj);
  401 + result.push(baseF.getbcObj(
  402 + dqbcfcsj,dataMap.ccsjArr[fxdm],car,dataMap.bcTypeArr.bd,
  403 + dataMap.dira[fxdm],1,0,gatps,0,null,null,null,0,lbsj));// 早行例保班次
  404 + result.push(baseF.getbcObj(
  405 + dqbcfcsj,dataMap.ccsjArr[fxdm],car,dataMap.bcTypeArr.out,
  406 + dataMap.dira[fxdm],2,dataMap.cclcArr[fxdm],gatps,0,dataMap.qdzArr[fxdm],null,null,0,0));// 出场班次
  407 + fcno ++;
  408 + }else if(b==bc.length-1){
  409 + var fcno_ = dxfno + 2;
  410 + var qdbcddsj = baseF.getDateTime(bc[b].ARRIVALTIME);
  411 + result.push(baseF.getbcObj(
  412 + qdbcddsj,dataMap.jcsjArr[fxdm],car,dataMap.bcTypeArr.in_,
  413 + dataMap.dira[fxdm],fcno_++,dataMap.jclcArr[fxdm],gatps,0,dataMap.qdzArr[fxdm],null,null,0,0));// 进场班次
  414 + result.push(baseF.getbcObj(
  415 + qdbcddsj,dataMap.jcsjArr[fxdm],car,dataMap.bcTypeArr.lc,
  416 + dataMap.dira[fxdm],fcno_++,0,gatps,0,null,null,null,0,lbsj));// 晚班例保班次
  417 + }
  418 + dxfno = bc[b].fcno + fcno;
  419 + bc[b].fcno = dxfno;
  420 + if(stas) {
  421 + fcno ++;
  422 + stas = false;
  423 + }
  424 + result.push(bc[b]);
  425 + }
  426 + return result;
  427 + },
  428 +
  429 + /**
  430 + * @description : (TODO) 调整某路牌下的工时.
  431 + *
  432 + * @param [arr--当前路牌下的班次数组;gs--当前路牌的总工时;dataMap--参数信息;lpNo--路牌编码;saa--参数信息]
  433 + *
  434 + * */
  435 + tzlpgs01 : function(arr,gs,map,dataMap,lpNo,saa) {
  436 + // 定义当前路牌的进场时间、早晚例保时间.
  437 + var jczwsj = saa[0].lbsj*2 + dataMap.ccsjArr[baseF.dirDmToIndex(arr[0].xlDir)] +
  438 + dataMap.jcsjArr[baseF.dirDmToIndex(arr[arr.length-1].xlDir)];
  439 + // 定义开始、结束时间.
  440 + //var st = null , ed = null;
  441 + // 根据路牌编码依次轮流取高峰之间和晚高峰之后的时间段.
  442 + /*if(lpNo%2!=0) {
  443 + st = dataMap.gfzjsjd[0].st;
  444 + ed = dataMap.gfzjsjd[0].ed;
  445 + }else {
  446 + st = dataMap.wgfzhsjd[0].st;
  447 + ed = dataMap.wgfzhsjd[0].ed;
  448 + }*/
  449 + // 定义路牌总工时.第一次切高峰之间和晚高峰之后的班次.
  450 + var lpdqzgs = parseFloat(((baseF.getlpzgs(arr) + jczwsj)/60).toFixed(2));
  451 + while(lpdqzgs>gs) {
  452 + for(var t = 0 ; t<arr.length;t++) {
  453 + // 得到当前路牌下的发车时间.
  454 + var dqbcfcsj = baseF.getDateTime(arr[t].fcsj);
  455 + // 判断时间范围.
  456 + if(!baseF.isgfsjd01(dqbcfcsj,dataMap)) {
  457 + arr.splice(t,1);
  458 + break;
  459 + }
  460 + }
  461 + lpdqzgs = parseFloat(((baseF.getlpzgs(arr) + jczwsj)/60).toFixed(2));
  462 + }
  463 + // 判断总工时是否大于班型对应的工时.
  464 + /*if(lpdqzgs>gs) {
  465 + // 定义相差值.
  466 + var dx = parseFloat((lpdqzgs - gs).toFixed(2));
  467 + // 定义圈数.
  468 + var qs = Math.round(dx*60/70);
  469 + for(var t = 0 ; t<arr.length;t++) {
  470 + // 得到当前路牌下的发车时间.
  471 + var dqbcfcsj = baseF.getDateTime(arr[t].fcsj);
  472 + // 判断时间范围.
  473 + if(dqbcfcsj>st && dqbcfcsj<ed) {
  474 + arr[t-1].STOPTIME = 0;
  475 + // 切割.
  476 + arr.splice(t,qs*2);
  477 + break;
  478 + }
  479 + }
  480 + }*/
  481 + },
  482 +
  483 + /**
  484 + * @description (TODO) 把班型人次合理的分配到不同的路牌上.
  485 + *
  486 + * @param [bxgs--班型人次数组长度;list--班型人次数组集合;clzs--路牌数组]
  487 + *
  488 + * @return 返回一个把路牌合理的分配到班型人次下组成的数据集合.
  489 + * */
  490 + fprclp01 : function(list,clzs) {
  491 + var bxgs = list.data.length;
  492 + // 定义总车数.
  493 + var dxcount = clzs.length;
  494 + /*for(var t = 1 ; t<bxgs ; t++) {
  495 + dxcount = dxcount + list.data[t].rs;
  496 + }*/
  497 + // 最多车次与总车次的比例.
  498 + var blnum = Math.round(dxcount/list.data[0].fpcls);
  499 + var rs = new Array();
  500 + // 遍历
  501 + for(var r = 0 ; r<bxgs ;r++) {
  502 + // 得到没有分配出去的路牌.
  503 + var dxa = baseF.chaji_array(clzs,rs);
  504 + // 定义当前车次数.
  505 + var rsnum = list.data[r].fpcls;
  506 + // 定义记录当前分割路牌的次数下标.分配到班型车次下的路牌数组.
  507 + var index = 0,sslp = new Array();
  508 + // 当前车次所有占比例.
  509 + var tempint = parseInt(rsnum/blnum);
  510 + // 判断如果比例小1 则为当前车次数.
  511 + blnum = tempint <=1 ? rsnum : blnum;
  512 + // 判断当前班型车次数组下标值.如果为倒数第二个或者之前
  513 + if(r<bxgs-1) {
  514 + // 遍历
  515 + for(var c = 0 ; c<tempint;c++) {
  516 + // 创建新的没有分配出去的路牌数组.
  517 + var temp = dxa.concat();
  518 + // 创建切割路牌数组.
  519 + var tagA = new Array();
  520 + // 判断切割的下标值是否小于等于路牌数组的倒数第二个或者之前.
  521 + if(index<=dxa.length-blnum) {
  522 + tagA = temp.splice(index,blnum);
  523 + }else {
  524 + tagA = temp.splice(dxa.length-blnum,blnum);
  525 + }
  526 + // 组合切割路牌数组.赋值给已分配出去的路牌.
  527 + rs = rs.concat(tagA);
  528 + // 赋值给分配到班型车次下的路牌数组.
  529 + sslp = sslp.concat(tagA);
  530 + // 记录切割下标.
  531 + index = index + 1 + blnum;
  532 + }
  533 + // 分配到班型车次下的路牌数组.
  534 + list.data[r].sslp = sslp;
  535 + }else {
  536 + list.data[r].sslp = dxa;
  537 + }
  538 + }
  539 + },
  540 +
327 541 /**
328 542 * @description : (TODO) 根据班型人次与车辆总数排列班次时刻数据.
329 543 *
... ... @@ -758,7 +972,7 @@ var BaseFun = function() {
758 972 for(var c = 0 ; c<len ; c++) {
759 973 // 铺出所有的班次
760 974 var _mmstartTime = baseF.getDateTime(map.earlyStartTime);// 获取早高峰开始时间点,并转为时间对象.
761   - var tempTime = new Date(_mmstartTime.setMinutes(_mmstartTime.getMinutes()-(len - cara[c].lpNo)*saa[0].fcjx));
  975 + var tempTime = new Date(_mmstartTime.setMinutes(_mmstartTime.getMinutes()-(len - cara[c].lpNo)*saa[0].fcjx.gffcjx));
762 976 var kssj = dataMap.zgfsjd[0].st;
763 977 var cctag = map.linePlayType=='1' ? 0 : baseF.getdefaultDir(dataMap.smbcsjArr);// 获取出场类型 [0--上行出场;1--下行出场]
764 978 var sjAndDir = baseF.getBeganTime(tempTime,kssj,null, saa,dataMap.zgfsjd,dataMap.wgfsjd,dataMap.pcxssjArr,dataMap.gfxxsjArr,cctag, dataMap.ztjxA);// 计算当前路牌第一个首班时间点.
... ... @@ -781,9 +995,10 @@ var BaseFun = function() {
781 995 kssj,dataMap.zwcArr[1],cara[c],dataMap.bcTypeArr.cf,
782 996 dataMap.dira[cctag],xhNo++,0,map,0,null,null,null,0,0));// 晚餐班次
783 997 }
784   - var tzsj = dataMap.ztjxA[cctag];
  998 + var tzsj = baseF.isgfsjd01(kssj,dataMap) ? dataMap.gftzsj[cctag] : dataMap.dgtzsj[cctag];
  999 + // var tzsj = dataMap.ztjxA[cctag];
785 1000 var _xxsj = baseF.getxssj(dataMap.zgfsjd,dataMap.wgfsjd,kssj,dataMap.pcxssjArr,dataMap.gfxxsjArr,cctag);// 获取行驶时间
786   - var tzsj = baseF.isLastbc(kssj,endTime,tzsj,_xxsj) ? 0 : tzsj;
  1001 + tzsj = baseF.isLastbc(kssj,endTime,tzsj,_xxsj) ? 0 : tzsj;
787 1002 rs.push(baseF.getbcObj(
788 1003 kssj,_xxsj,cara[c],dataMap.bcTypeArr.normal,
789 1004 dataMap.dira[cctag],xhNo++,dataMap.pcxslcArr[cctag],map,0,
... ... @@ -794,6 +1009,15 @@ var BaseFun = function() {
794 1009 return rs;
795 1010 },
796 1011  
  1012 + isgfsjd01 : function(kssj,dataMap) {
  1013 +
  1014 + var tag = false;
  1015 + if((dataMap.zgfsjd[0].st <=kssj && kssj<= dataMap.zgfsjd[0].ed ) || ( dataMap.wgfsjd[0].st <= kssj && kssj <= dataMap.wgfsjd[0].ed))
  1016 + tag = true;
  1017 + return tag;
  1018 + },
  1019 +
  1020 +
797 1021 /**
798 1022 * @description : (TODO) 该方法可去除.
799 1023 *
... ... @@ -836,6 +1060,7 @@ var BaseFun = function() {
836 1060 for(var s = 0 ; s< bxrcAr.length;s++) {
837 1061 var s1a = bxrcAr[s].split('/');
838 1062 var rs = parseInt(s1a[1]);
  1063 + var fpcls = parseInt(s1a[2]);
839 1064 var gsgdIndex = 0,hoursV = 0.0,minueV='' ;
840 1065 for(var g = 0 ; g < gsgd.length; g++) {
841 1066 if(gsgd[g].type == s1a[0]) {
... ... @@ -846,6 +1071,7 @@ var BaseFun = function() {
846 1071 }
847 1072 list.push({'type':s1a[0],
848 1073 'rs':rs,
  1074 + 'fpcls':fpcls,
849 1075 'hoursV':hoursV,
850 1076 'minueV':minueV});
851 1077 rsa.push(rs);
... ... @@ -945,12 +1171,49 @@ var BaseFun = function() {
945 1171 baseF.tzqtbc(_obj.xxbc,_obj.qt,sj,cl,zd,lbsj);
946 1172 return _obj.sxbc.concat(_obj.xxbc).concat(_obj.qt);
947 1173 },
948   - tcbc : function(ar,kssj,jssj) {
  1174 + /**
  1175 + * @discription : (TODO) 调整首末班车时间点
  1176 + *
  1177 + * @params : [list--时刻表明细数组;smbcsj--首末班车时间]
  1178 + *
  1179 + * @return : 返回一个数组对象。这里返回的是时刻表明细数据
  1180 + **/
  1181 + tzsmbcsj01 : function(list,smbcsj,sj,cl,zd,lbsj) {
  1182 + var _obj = baseF.getsxAndxxbc(list);
  1183 + baseF.tcbc(_obj.sxbc,smbcsj[0].kssj,smbcsj[0].jssj ,_obj.xxbc);// 剔除上行不在时间范围内的班次
  1184 + baseF.tcbc(_obj.xxbc,smbcsj[1].kssj,smbcsj[1].jssj,_obj.sxbc);// 剔除下行不在时间范围内的班次
  1185 + baseF.dzsmsj(_obj.sxbc,smbcsj[0].kssj,smbcsj[0].jssj,_obj.xxbc);// 调整上行首末班车时间
  1186 + baseF.dzsmsj(_obj.xxbc,smbcsj[1].kssj,smbcsj[1].jssj,_obj.sxbc);// 调整下行首末班车时间
  1187 + return _obj.sxbc.concat(_obj.xxbc).concat(_obj.qt);
  1188 + },
  1189 + tcbc : function(ar,kssj,jssj,ppar) {
949 1190 for(var s = 0 ; s<ar.length;s++) {
950 1191 if(baseF.isDelete(baseF.getDateTime(kssj),
951 1192 baseF.getDateTime(jssj),
952 1193 baseF.getDateTime(ar[s].fcsj))) {
  1194 + var tempa = ar.concat(ppar),sslpA = new Array();
  1195 + for(var r = 0 ; r<tempa.length;r++) {
  1196 + if(tempa[r].lpNo == ar[s].lpNo)
  1197 + sslpA.push(tempa[r]);
  1198 + }
  1199 + sslpA.sort(function(a,b){return a.fcno-b.fcno});
  1200 + var lastBc = null;
  1201 + for(var p = 0 ; p<sslpA.length;p++) {
  1202 + if(sslpA[p].fcno == ar[s].fcno && sslpA[p].xlDir ==ar[s].xlDir && sslpA[p].fcsj == ar[s].fcsj ) {
  1203 + lastBc = sslpA[p-1];
  1204 + break;
  1205 + }
  1206 + }
  1207 + if(lastBc !=null) {
  1208 + for(var t = 0 ;t < ppar.length;t++) {
  1209 + if(ppar[t].fcno == lastBc.fcno && ppar[t].xlDir == lastBc.xlDir && ppar[t].fcsj == lastBc.fcsj ) {
  1210 + ppar.splice(t, 1);
  1211 + break;
  1212 + }
  1213 + }
  1214 + }
953 1215 ar.splice(s, 1);
  1216 + s--;
954 1217 }
955 1218 }
956 1219 },
... ...
src/main/resources/static/pages/base/timesmodel/js/gantt.js
... ... @@ -32,13 +32,15 @@
32 32 });
33 33 $('.tipso-animation').tipso('show');
34 34 setTimeout(function(){$('.tipso-animation').tipso('hide');},4000);
  35 + console.log(map);
  36 + //debugger;
35 37 // 1、定义开始与结束时间点字符串.
36 38 var seMap = getStartAndEndDate(map);
37 39 // 2、获取开始与结束时间对象.
38 40 /*var seDate = getksjssj(null,seMap.s.split('-')[0]);*/
39 41 var seDate = getksjssj(null,seMap.s);
40 42 // 3、定义周转时间.
41   - map.zzsj = parseInt(getzzsj(map));
  43 + map.zzsj = getzzsj(map);
42 44 // 5、方向代码.
43 45 var dirA = getsxxDM();
44 46 // 6、班次类型.
... ... @@ -53,7 +55,7 @@
53 55 CSMap = getMaxCarAndStopSpace1(map);
54 56 }
55 57 // 发车间隙
56   - map.stopSpace = CSMap.stopSpace;
  58 + map.fcjx = CSMap.fcjx;
57 59 // 定义时间参数.
58 60 var stopAraay = getsj(map);
59 61 if(isNull(objD)) {
... ... @@ -62,7 +64,8 @@
62 64 data = BaseFun.KLplaceClassesTime(CSMap.gattA,stopAraay,CSMap.maxCar,map,seMap,dataMap);
63 65 }else if(map.baseRes== '1') {
64 66 // 采用班型人次数据获取渲染时刻表明细图形的配置参数数据.
65   - data = BaseFun.BXPplaceClassesTime(stopAraay,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA);
  67 + // data = BaseFun.BXPplaceClassesTime(stopAraay,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA);
  68 + data = BaseFun.BXPplaceClassesTime01(stopAraay,CSMap.maxCar,map,seMap,dataMap,getylp(CSMap.maxCar).lpNoA);
66 69 }
67 70  
68 71 }else {
... ... @@ -107,7 +110,7 @@
107 110 * @returns 返回一个分装发车间隙、车辆数的最大值集合.
108 111 * */
109 112 function getMaxCarAndStopSpace1(map) {
110   - return {'gattA':null,'stopSpace': Math.round(map.zzsj/map.clzs),'maxCar':BaseFun.getYAxisCarArray(parseInt(map.clzs))};
  113 + return {'gattA':null,'fcjx': {'gffcjx': Math.round(map.zzsj.gfzzsj/map.clzs) , 'dgfcjx': Math.round(map.zzsj.dgzzsj/map.clzs)},'maxCar':BaseFun.getYAxisCarArray(parseInt(map.clzs))};
111 114 }
112 115  
113 116 /**
... ... @@ -143,9 +146,11 @@
143 146 'dira' : dira,// 方向集合 [下标0代表上;下标1代表下]
144 147 'bcTypeArr' : bcTypeArr,// 班次类型
145 148 'lbsj' : gatps.lb=='' ? 0:parseInt(gatps.lb),// 例保时间.
146   - 'minztjx' : parseInt(gatps.mixstopTime), // 最小停站时间.
147   - 'ztjxA' : BaseFun.formatPairing(gatps.upStopTime,gatps.downStopTime), // 停站时间.
148   - 'maxztjx' : parseInt(gatps.maxstopTime), // 最大停站时间.
  149 + // 'minztjx' : parseInt(gatps.mixstopTime), // 最小停站时间.
  150 + // 'ztjxA' : BaseFun.formatPairing(gatps.upStopTime,gatps.downStopTime), // 停站时间.
  151 + // 'maxztjx' : parseInt(gatps.maxstopTime), // 最大停站时间.
  152 + 'gftzsj': BaseFun.formatPairing(gatps.gfupStopTime,gatps.gfdownStopTime),// 高峰停站时间.
  153 + 'dgtzsj' : BaseFun.formatPairing(gatps.dgupStopTime,gatps.dgdownStopTime),// 低谷停站时间.
149 154 'map' : gatps,
150 155 'zzsj':gatps.zzsj,// 周转时间.
151 156 };
... ... @@ -160,7 +165,14 @@
160 165 * */
161 166 function getzzsj(map) {
162 167 // 一圈所用时间 (上行+下行+停歇时间)
163   - return parseInt(map.upTravelTime) + parseInt(map.upStopTime) + parseInt(map.downStopTime) + parseInt(map.downTravelTime);
  168 + return {
  169 + 'gfzzsj': parseInt(map.earlyUpTime =='' ? map.upTravelTime : map.earlyUpTime) +
  170 + parseInt(map.gfupStopTime) + parseInt(map.gfdownStopTime) +
  171 + parseInt(map.earlyDownTime =='' ? map.downTravelTime : map.earlyDownTime ), // 高峰周转时间
  172 + 'dgzzsj': parseInt(map.troughUpTime==''? map.upTravelTime : map.troughUpTime) +
  173 + parseInt(map.dgupStopTime) + parseInt(map.dgdownStopTime) +
  174 + parseInt(map.troughDownTime==''? map.downTravelTime: map.troughDownTime),// 低谷周转时间
  175 + };
164 176 }
165 177  
166 178 /**
... ... @@ -171,8 +183,8 @@
171 183 * @return 返回开始与结束时间字符串集合.
172 184 * */
173 185 function getStartAndEndDate(map) {
174   - return {'s': map.linePlayType=='1'? map.startStationFirstTime : getMinDate(map.startStationFirstTime,map.endStationFirstTime),
175   - 'e': map.linePlayType=='1'? map.startStationEndTime : getMaxDate(map.startStationEndTime,map.endStationEndTime)}
  186 + return {'s': map.linePlayType == '1' ? map.startStationFirstTime : getMinDate(map.startStationFirstTime,map.endStationFirstTime),
  187 + 'e': map.linePlayType == '1' ? map.startStationEndTime : getMaxDate(map.startStationEndTime,map.endStationEndTime)}
176 188 }
177 189  
178 190 /**
... ... @@ -259,7 +271,6 @@
259 271 year = newDate.getFullYear();
260 272 var jssj = BaseFun.getEndDate(year + '-' + month + '-' + dt + ' ' + '00:00');
261 273 return {'kssj' : kssj, 'jssj' : jssj};
262   -
263 274 }
264 275  
265 276 /**
... ... @@ -272,9 +283,11 @@
272 283 function getsj(map) {
273 284 var sxsj = parseInt(map.upTravelTime);// 上行时间.
274 285 var xxsj = parseInt(map.downTravelTime);// 下行时间.
275   - return [{'sxtzjx':parseInt(map.upStopTime), // 上行停站间隙.
276   - 'xxtzjx':parseInt(map.downStopTime), // 下行停站间隙.
277   - 'fcjx':parseInt(map.stopSpace),// 发车间隙.
  286 + return [{'gfsxtzjx':parseInt(map.gfupStopTime), // 高峰上行停站间隙.
  287 + 'gfxxtzjx':parseInt(map.gfdownStopTime), // 高峰下行停站间隙.
  288 + 'dgsxtzjx':parseInt(map.dgupStopTime), // 低谷上行停站间隙.
  289 + 'dgxxtzjx':parseInt(map.dgdownStopTime),// 低谷下行停站间隙.
  290 + 'fcjx':map.fcjx,// 发车间隙.
278 291 'sxsj':sxsj,// 上行时间.
279 292 'xxsj':xxsj,// 下行时间.
280 293 'zzsj':map.zzsj,// 周转时间.
... ...
src/main/resources/static/pages/base/timesmodel/js/tagsinput.js
... ... @@ -28,7 +28,7 @@ var ComponentsBootstrapTagsinput = function() {
28 28  
29 29 $('#state_tagsinput').on('beforeItemAdd', function(event) {
30 30 var bctypeValue = $('#state_tagsinput_bctype').val();
31   - var rcnum = $('#state_tagsinput_value').val();
  31 + var rcnum = $('#state_tagsinput_rcsvalue').val();
32 32 var bxrcAr = $('#state_tagsinput').val().split(',');
33 33 for(var s = 0 ; s< bxrcAr.length;s++) {
34 34 var s1a = bxrcAr[s].split('/');
... ... @@ -40,28 +40,38 @@ var ComponentsBootstrapTagsinput = function() {
40 40  
41 41 $('#state_tagsinput_add').on('click', function(){
42 42 var bctypeValue = $('#state_tagsinput_bctype').val();
43   - var rcnum = $('#state_tagsinput_value').val();
44   - if(isNull(bctypeValue,rcnum)) {
  43 + var rcnum = $('#state_tagsinput_rcsvalue').val();
  44 + var clnum = $('#state_tagsinput_clsvalue').val();
  45 + if(isNull(bctypeValue,rcnum,clnum)) {
  46 + if(!Number.isInteger(parseInt(rcnum)/parseInt(clnum))) {
  47 + layer.msg('当前算法只支持【单/双挡】!请您重新输入!');
  48 + $('#state_tagsinput_bctype').val(null);
  49 + $('#state_tagsinput_rcsvalue').val(null);
  50 + $('#state_tagsinput_clsvalue').val(null);
  51 + return false;
  52 + }
45 53 var bxrcAr = $('#state_tagsinput').val().split(',');
46 54 for(var s = 0 ; s< bxrcAr.length;s++) {
47 55 var s1a = bxrcAr[s].split('/');
48 56 if(s1a[0]==bctypeValue) {
49 57 rcnum = parseInt(rcnum) + parseInt(s1a[1]);
  58 + clnum = parseInt(clnum) + parseInt(s1a[2]);
50 59 }
51 60 }
52 61 elt.tagsinput('add', {
53   - "value": bctypeValue + '/' + rcnum,
54   - "text": bctypeValue + '/' + rcnum,
  62 + "value": bctypeValue + '/' + rcnum + '/' + clnum,
  63 + "text": bctypeValue + '/' + rcnum + '/' + clnum,
55 64 "continent": bctypeValue,
56 65 });
57 66 $('#state_tagsinput_bctype').val(null);
58   - $('#state_tagsinput_value').val(null);
  67 + $('#state_tagsinput_rcsvalue').val(null);
  68 + $('#state_tagsinput_clsvalue').val(null);
59 69 }
60 70 });
61 71  
62   - var isNull = function(v1,v2) {
  72 + var isNull = function(v1,v2,v3) {
63 73 var tag = true;
64   - if(v1==''|| v2=='')
  74 + if(v1==''|| v2=='' || v3=='')
65 75 tag = false;
66 76 return tag;
67 77 }
... ...
src/main/resources/static/pages/base/timesmodel/tepms/bctype_temp.html
1 1 <script type="text/html" id = "bctype_temp">
  2 +
2 3 <!-- 表单分组组件 form-group START -->
3 4 <div class="form-group">
4   - <!-- 线路规划类型 (* 必填项) START -->
5   - <div class="col-md-4">
6   - <label class="control-label col-md-5">
7   - <span class="required"> * </span> 线路规划类型&nbsp;&nbsp;&nbsp;:
8   - </label>
9   - <div class="col-md-5">
10   - <select name="linePlayType" class="form-control" id="linePlayTypeSelect">
11   - <option value="">-- 请选择线路类型 --</option>
12   - <option value="0">双向</option>
13   - <option value="1">环线</option>
14   - </select>
15   - </div>
16   - </div>
17   - <!-- 线路规划类型 (* 必填项) END -->
18   -
19 5 <!-- 起始站首班时间 (* 必填项) START -->
20   - <div class="col-md-4">
  6 + <div class="col-md-6">
21 7 <label class="control-label col-md-5">
22   - <span class="required"> * </span> 起始站首班时间:
  8 + <span class="required"> * </span> 起始站首班时间 :
23 9 </label>
24 10 <div class="col-md-5">
25 11 <input type="text" class="form-control" name="startStationFirstTime" value="{{map.line.startStationFirstTime}}" id="qdzsbsjInput"
... ... @@ -29,9 +15,9 @@
29 15 <!-- 起始站首班时间 (* 必填项) END -->
30 16  
31 17 <!-- 起始站末班时间 (* 必填项) START -->
32   - <div class="col-md-4">
  18 + <div class="col-md-6">
33 19 <label class="control-label col-md-5">
34   - <span class="required"> * </span> 起始站末班时间:
  20 + <span class="required"> * </span> 起始站末班时间 :
35 21 </label>
36 22 <div class="col-md-5">
37 23 <input type="text" class="form-control" name="startStationEndTime" value="{{map.line.startStationEndTime}}" id="qdzmbsjInput"
... ... @@ -45,9 +31,9 @@
45 31 <!-- 表单分组组件 form-group START -->
46 32 <div class="form-group">
47 33 <!-- 终点站首班时间 (* 必填项) START -->
48   - <div class="col-md-4">
  34 + <div class="col-md-6">
49 35 <label class="control-label col-md-5">
50   - <span class="required"> * </span> 终点站首班时间:
  36 + <span class="required"> * </span> 终点站首班时间 :
51 37 </label>
52 38 <div class="col-md-5">
53 39 <input type="text" class="form-control" name="endStationFirstTime" value="{{map.line.endStationFirstTime}}" id="zdzsbsjInput"
... ... @@ -57,9 +43,9 @@
57 43 <!-- 终点站首班时间 (* 必填项) END -->
58 44  
59 45 <!-- 终点站末班时间 (* 必填项) START -->
60   - <div class="col-md-4">
  46 + <div class="col-md-6">
61 47 <label class="control-label col-md-5">
62   - <span class="required"> * </span> 终点站末班时间:
  48 + <span class="required"> * </span> 终点站末班时间 :
63 49 </label>
64 50 <div class="col-md-5">
65 51 <input type="text" class="form-control" name="endStationEndTime" value="{{map.line.endStationEndTime}}" id="zdzmbsjInput"
... ... @@ -67,10 +53,15 @@
67 53 </div>
68 54 </div>
69 55 <!-- 终点站末班时间 (* 必填项) END -->
  56 +</div>
  57 +<!-- 表单分组组件 form-group END -->
  58 +
  59 +<!-- 表单分组组件 form-group START -->
  60 +<div class="form-group">
70 61 <!-- 早高峰开始时间 (* 必填项) START -->
71   - <div class="col-md-4">
  62 + <div class="col-md-6">
72 63 <label class="control-label col-md-5">
73   - <span class="required"> * </span> 早高峰开始时间:
  64 + <span class="required"> * </span> 早高峰开始时间 :
74 65 </label>
75 66 <div class="col-md-5">
76 67 <input type="text" class="form-control" name="earlyStartTime" value="{{map.earlyStartTime}}" id="zgfkssjInput"
... ... @@ -78,15 +69,11 @@
78 69 </div>
79 70 </div>
80 71 <!-- 早高峰开始时间 (* 必填项) END -->
81   -</div>
82   -<!-- 表单分组组件 form-group END -->
83 72  
84   -<!-- 表单分组组件 form-group START -->
85   -<div class="form-group">
86 73 <!-- 早高峰结束时间 (* 必填项) START -->
87   - <div class="col-md-4">
  74 + <div class="col-md-6">
88 75 <label class="control-label col-md-5">
89   - <span class="required"> * </span> 早高峰结束时间:
  76 + <span class="required"> * </span> 早高峰结束时间 :
90 77 </label>
91 78 <div class="col-md-5">
92 79 <input type="text" class="form-control" name="earlyEndTime" value="{{map.earlyEndTime}}" id="zgfjssjInput"
... ... @@ -94,11 +81,15 @@
94 81 </div>
95 82 </div>
96 83 <!-- 早高峰结束时间 (* 必填项) END -->
  84 +</div>
  85 +<!-- 表单分组组件 form-group END -->
97 86  
  87 +<!-- 表单分组组件 form-group START -->
  88 +<div class="form-group">
98 89 <!-- 晚高峰开始时间 (* 必填项) START -->
99   - <div class="col-md-4">
  90 + <div class="col-md-6">
100 91 <label class="control-label col-md-5">
101   - <span class="required"> * </span> 晚高峰开始时间:
  92 + <span class="required"> * </span> 晚高峰开始时间 :
102 93 </label>
103 94 <div class="col-md-5">
104 95 <input type="text" class="form-control" name="lateStartTime" value="{{map.lateStartTime}}" id="wgfkssjInput"
... ... @@ -108,9 +99,9 @@
108 99 <!-- 晚高峰开始时间 (* 必填项) END -->
109 100  
110 101 <!-- 晚高峰结束 (* 必填项) START -->
111   - <div class="col-md-4">
  102 + <div class="col-md-6">
112 103 <label class="control-label col-md-5">
113   - <span class="required"> * </span> 晚高峰结束时间:
  104 + <span class="required"> * </span> 晚高峰结束时间 :
114 105 </label>
115 106 <div class="col-md-5">
116 107 <input type="text" class="form-control" name="lateEndTime" value="{{map.lateEndTime}}" id="wgfjssjInput"
... ... @@ -121,12 +112,13 @@
121 112 </div>
122 113 <!-- 表单分组组件 form-group END -->
123 114  
  115 +
124 116 <!-- 表单分组组件 form-group START -->
125 117 <div class="form-group">
126 118 <!-- 上行行驶时间(* 必填项) START -->
127   - <div class="col-md-4">
  119 + <div class="col-md-6">
128 120 <label class="control-label col-md-5">
129   - <span class="required"> * </span> 上行行驶时间&nbsp;&nbsp;&nbsp;:
  121 + <span class="required"> * </span> 上行行驶时间  :
130 122 </label>
131 123 <div class="col-md-5">
132 124 <input type="text" class="form-control" name="upTravelTime" value="{{map.upTravelTime}}" id="upTravelTimeInput"
... ... @@ -136,9 +128,9 @@
136 128 <!-- 上行行驶时间 (* 必填项) END -->
137 129  
138 130 <!-- 下行行驶时间 (* 必填项) START -->
139   - <div class="col-md-4">
  131 + <div class="col-md-6">
140 132 <label class="control-label col-md-5">
141   - <span class="required"> * </span> 下行行驶时间&nbsp;&nbsp;&nbsp;:
  133 + <span class="required"> * </span> 下行行驶时间  :
142 134 </label>
143 135 <div class="col-md-5">
144 136 <input type="text" class="form-control" name="downTravelTime" value="{{map.downTravelTime}}" id="downTravelTimeInput"
... ... @@ -146,11 +138,15 @@
146 138 </div>
147 139 </div>
148 140 <!-- 下行行驶时间(* 必填项) END -->
  141 +</div>
  142 +<!-- 表单分组组件 form-group END -->
149 143  
  144 +<!-- 表单分组组件 form-group START -->
  145 +<div class="form-group">
150 146 <!-- 上行里程(* 必填项) START -->
151   - <div class="col-md-4">
  147 + <div class="col-md-6">
152 148 <label class="control-label col-md-5">
153   - <span class="required"> * </span> 上行行驶里程&nbsp;&nbsp;&nbsp;:
  149 + <span class="required"> * </span> 上行行驶里程  :
154 150 </label>
155 151 <div class="col-md-5">
156 152 <input type="text" class="form-control" name="upMileage" value="{{map.upMileage}}" id="upMileageInput"
... ... @@ -158,15 +154,10 @@
158 154 </div>
159 155 </div>
160 156 <!-- 上行里程 (* 必填项) END -->
161   -</div>
162   -<!-- 表单分组组件 form-group END -->
163   -
164   -<!-- 表单分组组件 form-group START -->
165   -<div class="form-group">
166 157 <!-- 下行里程 (* 必填项) START -->
167   - <div class="col-md-4">
  158 + <div class="col-md-6">
168 159 <label class="control-label col-md-5">
169   - <span class="required"> * </span> 下行行驶里程&nbsp;&nbsp;&nbsp;:
  160 + <span class="required"> * </span> 下行行驶里程  :
170 161 </label>
171 162 <div class="col-md-5">
172 163 <input type="text" class="form-control" name="downMileage" value="{{map.downMileage}}" id="downMileageInput"
... ... @@ -174,62 +165,83 @@
174 165 </div>
175 166 </div>
176 167 <!-- 下行里程(* 必填项) END -->
  168 +</div>
  169 +<!-- 表单分组组件 form-group END -->
177 170  
178   - <!-- 上行停站间隙 (* 必填项) START -->
179   - <div class="col-md-4">
  171 +<!-- 表单分组组件 form-group START -->
  172 +<div class="form-group">
  173 + <!-- 高峰上行停站间隙 (* 必填项) START -->
  174 + <div class="col-md-6">
180 175 <label class="control-label col-md-5">
181   - <span class="required"> * </span> 上行停站间隙&nbsp;&nbsp;&nbsp;:
  176 + <span class="required"> * </span> 高峰上行停站间隙:
182 177 </label>
183 178 <div class="col-md-5">
184   - <input type="text" class="form-control" name="upStopTime" value="{{map.upStopTime}}" id="upStopTimeInput"
185   - placeholder="请输入上行停站间隙">
  179 + <input type="text" class="form-control" name="gfupStopTime" id="gfupStopTimeInput"
  180 + placeholder="请输入高峰上行停站间隙">
186 181 </div>
187 182 </div>
188 183 <!-- 上行停站间隙 (* 必填项) END -->
189 184  
190   - <!-- 下行停站间隙 (* 必填项) START -->
191   - <div class="col-md-4">
  185 + <!-- 高峰下行停站间隙 (* 必填项) START -->
  186 + <div class="col-md-6">
192 187 <label class="control-label col-md-5">
193   - <span class="required"> * </span> 下行停站间隙&nbsp;&nbsp;&nbsp;:
  188 + <span class="required"> * </span> 高峰下行停站间隙:
194 189 </label>
195 190 <div class="col-md-5">
196   - <input type="text" class="form-control" name="downStopTime" value="{{map.downStopTime}}" id="downStopTimeInput"
197   - placeholder="请输入下行停站间隙">
  191 + <input type="text" class="form-control" name="gfdownStopTime" id="gfdownStopTimeInput"
  192 + placeholder="请输入高峰下行停站间隙">
198 193 </div>
199 194 </div>
200   - <!-- 下行停站间隙 (* 必填项) END -->
201   -
  195 + <!-- 高峰下行停站间隙 (* 必填项) END -->
202 196 </div>
203 197 <!-- 表单分组组件 form-group END -->
204 198  
205 199 <!-- 表单分组组件 form-group START -->
206 200 <div class="form-group">
207   - <!-- 最大停站间隙(* 必填项) START -->
208   - <div class="col-md-4">
  201 + <!-- 低谷上行停站间隙(* 必填项) START -->
  202 + <div class="col-md-6">
209 203 <label class="control-label col-md-5">
210   - <span class="required"> * </span> 最大停站间隙&nbsp;&nbsp;&nbsp;:
  204 + <span class="required"> * </span> 低谷上行停站间隙:
211 205 </label>
212 206 <div class="col-md-5">
213   - <input type="text" class="form-control" name="maxstopTime" value="{{map.maxstopTime}}" id="maxstopTimeInput"
214   - placeholder="请输入最大停站间隙">
  207 + <input type="text" class="form-control" name="dgupStopTime" id="dgupStopTimeInput" placeholder="请输入低谷上行停站间隙">
215 208 </div>
216 209 </div>
217   - <!-- 最大停站间隙 (* 必填项) END -->
218   -
219   - <!-- 最小停站间隙(* 必填项) START -->
220   - <div class="col-md-4">
  210 + <!-- 低谷上行停站间隙(* 必填项) END -->
  211 +
  212 + <!-- 低谷下行停站间隙(* 必填项) START -->
  213 + <div class="col-md-6">
221 214 <label class="control-label col-md-5">
222   - <span class="required"> * </span> 最小停站间隙&nbsp;&nbsp;&nbsp;:
  215 + <span class="required"> * </span> 低谷下行停站间隙:
223 216 </label>
224 217 <div class="col-md-5">
225   - <input type="text" class="form-control" name="mixstopTime" value="{{map.mixstopTime}}" id="mixstopTimeInput" placeholder="最小停站间隙">
  218 + <input type="text" class="form-control" name="dgdownStopTime" id="dgdownStopTimeInput"
  219 + placeholder="请输入低谷下行停站间隙">
226 220 </div>
227 221 </div>
228   - <!-- 最小停站间隙(* 必填项) END -->
  222 + <!-- 低谷停站间隙 (* 必填项) END -->
  223 +</div>
  224 +<!-- 表单分组组件 form-group END -->
229 225  
  226 +<!-- 表单分组组件 form-group START -->
  227 +<div class="form-group">
  228 + <!-- 线路规划类型 (* 必填项) START -->
  229 + <div class="col-md-6">
  230 + <label class="control-label col-md-5">
  231 + <span class="required"> * </span> 线路规划类型  :
  232 + </label>
  233 + <div class="col-md-5">
  234 + <select name="linePlayType" class="form-control" id="linePlayTypeSelect">
  235 + <option value="">-- 请选择线路类型 --</option>
  236 + <option value="0">双向</option>
  237 + <option value="1">环线</option>
  238 + </select>
  239 + </div>
  240 + </div>
  241 + <!-- 线路规划类型 (* 必填项) END -->
230 242 <!-- 停车场(* 必填项) START -->
231   - <div class="col-md-4">
232   - <label class="control-label col-md-5">停车场&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
  243 + <div class="col-md-6">
  244 + <label class="control-label col-md-5">停车场     :</label>
233 245 <div class="col-md-5">
234 246 <select name="carPark" class="form-control" id="carParkSelect" style="width:100%"></select>
235 247 </div>
... ... @@ -240,9 +252,36 @@
240 252  
241 253 <!-- 表单分组组件 form-group START -->
242 254 <div class="form-group">
  255 + <!-- 终点站车容量 START -->
  256 + <div class="col-md-6">
  257 + <label class="control-label col-md-5">终点站车容量  :</label>
  258 + <div class="col-md-5">
  259 + <input type="text" class="form-control" name="zdzcrl" id="zdzcrlInput"
  260 + placeholder="请输入终点站车容量">
  261 + </div>
  262 + </div>
  263 + <!-- 终点站车容量 END -->
  264 + <!-- 吃饭地点 START -->
  265 + <div class="col-md-6">
  266 + <label class="control-label col-md-5">吃饭地点    :</label>
  267 + <div class="col-md-5">
  268 + <select type="text" class="form-control" name="cfdd" id="cfddSelect">
  269 + <option value="">请选择...</option>
  270 + <option value="{{map.line.startStationName}}">{{map.line.startStationName}}</option>
  271 + <option value="{{map.line.endStationName}}">{{map.line.endStationName}}</option>
  272 + <option value="allYes">起终点站都可以</option>
  273 + </select>
  274 + </div>
  275 + </div>
  276 + <!-- 空放行驶时间 END -->
  277 +</div>
  278 +<!-- 表单分组组件 form-group END -->
  279 +
  280 +<!-- 表单分组组件 form-group START -->
  281 +<div class="form-group">
243 282 <!-- 早高峰上行时间(* 必填项) START -->
244   - <div class="col-md-4">
245   - <label class="control-label col-md-5">早高峰上行时间:</label>
  283 + <div class="col-md-6">
  284 + <label class="control-label col-md-5">早高峰上行时间 :</label>
246 285 <div class="col-md-5">
247 286 <input type="text" class="form-control" name="earlyUpTime" value="{{map.earlyUpTime}}" id="earlyUpTimeInput"
248 287 placeholder="请输入早高峰上行时间">
... ... @@ -251,42 +290,45 @@
251 290 <!-- 早高峰上行时间(* 必填项) END -->
252 291  
253 292 <!-- 早高峰下行时间(* 必填项) START -->
254   - <div class="col-md-4">
255   - <label class="control-label col-md-5">早高峰下行时间:</label>
  293 + <div class="col-md-6">
  294 + <label class="control-label col-md-5">早高峰下行时间 :</label>
256 295 <div class="col-md-5">
257 296 <input type="text" class="form-control" name="earlyDownTime" value="{{map.earlyDownTime}}" id="earlyDownTimeInput"
258 297 placeholder="请输入早高峰下行时间">
259 298 </div>
260 299 </div>
261 300 <!-- 早高峰下行时间(* 必填项) END -->
  301 +</div>
  302 +<!-- 表单分组组件 form-group END -->
262 303  
  304 +<!-- 表单分组组件 form-group START -->
  305 +<div class="form-group">
263 306 <!-- 晚高峰上行时间 (* 必填项) START -->
264   - <div class="col-md-4">
265   - <label class="control-label col-md-5">晚高峰上行时间:</label>
  307 + <div class="col-md-6">
  308 + <label class="control-label col-md-5">晚高峰上行时间 :</label>
266 309 <div class="col-md-5">
267 310 <input type="text" class="form-control" name="lateUpTime" value="{{map.lateUpTime}}" id="lateUpTimeInput"
268 311 placeholder="请输入晚高峰上行时间">
269 312 </div>
270 313 </div>
271 314 <!-- 晚高峰上行时间(* 必填项) END -->
272   -</div>
273   -<!-- 表单分组组件 form-group END -->
274   -
275   -<!-- 表单分组组件 form-group START -->
276   -<div class="form-group">
277 315 <!-- 晚高峰下行时间 (* 必填项) START -->
278   - <div class="col-md-4">
279   - <label class="control-label col-md-5">晚高峰下行时间:</label>
  316 + <div class="col-md-6">
  317 + <label class="control-label col-md-5">晚高峰下行时间 :</label>
280 318 <div class="col-md-5">
281 319 <input type="text" class="form-control" name="lateDownTime" value="{{map.lateDownTime}}" id="lateDownTimeInput"
282 320 placeholder="请输入晚高峰下行时间">
283 321 </div>
284 322 </div>
285 323 <!-- 晚高峰下行时间(* 必填项) END -->
  324 +</div>
  325 +<!-- 表单分组组件 form-group END -->
286 326  
  327 +<!-- 表单分组组件 form-group START -->
  328 +<div class="form-group">
287 329 <!-- 低谷上行时间 START -->
288   - <div class="col-md-4">
289   - <label class="control-label col-md-5">低谷上行时间&nbsp;&nbsp;&nbsp;:</label>
  330 + <div class="col-md-6">
  331 + <label class="control-label col-md-5">低谷上行时间  :</label>
290 332 <div class="col-md-5">
291 333 <input type="text" class="form-control" name="troughUpTime" value="{{map.troughUpTime}}" id="troughUpTimeInput"
292 334 placeholder="请输入低谷上行时间">
... ... @@ -295,8 +337,8 @@
295 337 <!-- 低谷上行时间 END -->
296 338  
297 339 <!-- 低谷下行时间 START -->
298   - <div class="col-md-4">
299   - <label class="control-label col-md-5">低谷下行时间&nbsp;&nbsp;&nbsp;:</label>
  340 + <div class="col-md-6">
  341 + <label class="control-label col-md-5">低谷下行时间  :</label>
300 342 <div class="col-md-5">
301 343 <input type="text" class="form-control" name="troughDownTime" value="{{map.troughDownTime}}" id="troughDownTimeInput"
302 344 placeholder="请输入低谷下行时间">
... ... @@ -309,8 +351,8 @@
309 351 <!-- 表单分组组件 form-group START -->
310 352 <div class="form-group">
311 353 <!-- 区间上行时间 START -->
312   - <div class="col-md-4">
313   - <label class="control-label col-md-5">区间上行时间&nbsp;&nbsp;&nbsp;:</label>
  354 + <div class="col-md-6">
  355 + <label class="control-label col-md-5">区间上行时间  :</label>
314 356 <div class="col-md-5">
315 357 <input type="text" class="form-control" name="qjUpTime" id="qjUpTimeInput"
316 358 placeholder="请输入区间上行时间">
... ... @@ -319,18 +361,31 @@
319 361 <!-- 区间上行时间 END -->
320 362  
321 363 <!-- 区间下行时间 START -->
322   - <div class="col-md-4">
323   - <label class="control-label col-md-5">区间下行时间&nbsp;&nbsp;&nbsp;:</label>
  364 + <div class="col-md-6">
  365 + <label class="control-label col-md-5">区间下行时间  :</label>
324 366 <div class="col-md-5">
325 367 <input type="text" class="form-control" name="qjDownTime" id="qjDownTimeInput"
326 368 placeholder="请输入区间下行时间">
327 369 </div>
328 370 </div>
329 371 <!-- 区间下行时间 END -->
  372 +</div>
  373 +<!-- 表单分组组件 form-group END -->
330 374  
  375 +<!-- 表单分组组件 form-group START -->
  376 +<div class="form-group">
  377 + <!-- 早晚例行保养 START -->
  378 + <div class="col-md-6">
  379 + <label class="control-label col-md-5">早晚例行保养  :</label>
  380 + <div class="col-md-5">
  381 + <input type="text" class="form-control" name="lb" value="{{map.lb}}" id="lbInput"
  382 + placeholder="请输入早晚例行保养">
  383 + </div>
  384 + </div>
  385 + <!-- 早晚例行保养 END -->
331 386 <!-- 空放行驶时间 START -->
332   - <div class="col-md-4">
333   - <label class="control-label col-md-5">空放行驶时间&nbsp;&nbsp;&nbsp;:</label>
  387 + <div class="col-md-6">
  388 + <label class="control-label col-md-5">空放行驶时间  :</label>
334 389 <div class="col-md-5">
335 390 <input type="text" class="form-control" name="kfsj" id="kfsjInput"
336 391 placeholder="请输入空放行驶时间">
... ... @@ -343,8 +398,8 @@
343 398 <!-- 表单分组组件 form-group START -->
344 399 <div class="form-group">
345 400 <!-- 工作餐午餐时间 START -->
346   - <div class="col-md-4">
347   - <label class="control-label col-md-5">工作餐午餐时间:</label>
  401 + <div class="col-md-6">
  402 + <label class="control-label col-md-5">工作餐午餐时间 :</label>
348 403 <div class="col-md-5">
349 404 <input type="text" class="form-control" name="workeLunch" value="{{map.workeLunch}}" id="workeLunchInput"
350 405 placeholder="请输入工作餐午餐时间">
... ... @@ -353,42 +408,46 @@
353 408 <!-- 工作餐午餐时间 END -->
354 409  
355 410 <!-- 工作餐晚餐时间 START -->
356   - <div class="col-md-4">
357   - <label class="control-label col-md-5">工作餐晚餐时间:</label>
  411 + <div class="col-md-6">
  412 + <label class="control-label col-md-5">工作餐晚餐时间 :</label>
358 413 <div class="col-md-5">
359 414 <input type="text" class="form-control" name="workeDinner" value="{{map.workeDinner}}" id="workeDinnerInput"
360 415 placeholder="请输入工作餐晚餐时间">
361 416 </div>
362 417 </div>
363 418 <!-- 工作餐晚餐时间 END -->
  419 +</div>
  420 +<!-- 表单分组组件 form-group END -->
364 421  
  422 +<!-- 表单分组组件 form-group START -->
  423 +<div class="form-group">
365 424 <!-- 上行进场时间 START -->
366   - <div class="col-md-4">
367   - <label class="control-label col-md-5">上行进场时间&nbsp;&nbsp;&nbsp;:</label>
  425 + <div class="col-md-6">
  426 + <label class="control-label col-md-5">上行进场时间  :</label>
368 427 <div class="col-md-5">
369 428 <input type="text" class="form-control" name="upInTimer" value="{{map.upInTimer}}" id="upInTimerInput"
370 429 placeholder="请输入上行进场时间">
371 430 </div>
372 431 </div>
373 432 <!-- 上行进场时间 END -->
374   -</div>
375   -<!-- 表单分组组件 form-group END -->
376   -
377   -<!-- 表单分组组件 form-group START -->
378   -<div class="form-group">
379 433 <!-- 上行出场时间 START -->
380   - <div class="col-md-4">
381   - <label class="control-label col-md-5">上行出场时间&nbsp;&nbsp;&nbsp;:</label>
  434 + <div class="col-md-6">
  435 + <label class="control-label col-md-5">上行出场时间  :</label>
382 436 <div class="col-md-5">
383 437 <input type="text" class="form-control" name="upOutTimer" value="{{map.upOutTimer}}" id="upOutTimerInput"
384 438 placeholder="请输入上行出场时间">
385 439 </div>
386 440 </div>
387 441 <!-- 上行出场时间 END -->
  442 +</div>
  443 +<!-- 表单分组组件 form-group END -->
  444 +
388 445  
  446 +<!-- 表单分组组件 form-group START -->
  447 +<div class="form-group">
389 448 <!-- 下行进场时间 START -->
390   - <div class="col-md-4">
391   - <label class="control-label col-md-5">下行进场时间&nbsp;&nbsp;&nbsp;:</label>
  449 + <div class="col-md-6">
  450 + <label class="control-label col-md-5">下行进场时间  :</label>
392 451 <div class="col-md-5">
393 452 <input type="text" class="form-control" name="downInTimer" value="{{map.downInTimer}}" id="downInTimerInput"
394 453 placeholder="请输入下行进场时间">
... ... @@ -397,8 +456,8 @@
397 456 <!-- 下行进场时间 END -->
398 457  
399 458 <!-- 下行出场时间 START -->
400   - <div class="col-md-4">
401   - <label class="control-label col-md-5">下行出场时间&nbsp;&nbsp;&nbsp;:</label>
  459 + <div class="col-md-6">
  460 + <label class="control-label col-md-5">下行出场时间  :</label>
402 461 <div class="col-md-5">
403 462 <input type="text" class="form-control" name="downOutTimer" value="{{map.downOutTimer}}" id="downOutTimerInput"
404 463 placeholder="请输入下行出场时间">
... ... @@ -408,11 +467,12 @@
408 467 </div>
409 468 <!-- 表单分组组件 form-group END -->
410 469  
  470 +
411 471 <!-- 表单分组组件 form-group START -->
412 472 <div class="form-group">
413 473 <!-- 上行进场里程 START -->
414   - <div class="col-md-4">
415   - <label class="control-label col-md-5">上行进场里程&nbsp;&nbsp;&nbsp;:</label>
  474 + <div class="col-md-6">
  475 + <label class="control-label col-md-5">上行进场里程  :</label>
416 476 <div class="col-md-5">
417 477 <input type="text" class="form-control" name="upInMileage" value="{{map.upInMileage}}" id="upInlcInput"
418 478 placeholder="请输入上行进场里程">
... ... @@ -421,71 +481,51 @@
421 481 <!-- 上行进场里程 END -->
422 482  
423 483 <!-- 上行出场里程 START -->
424   - <div class="col-md-4">
425   - <label class="control-label col-md-5">上行出场里程&nbsp;&nbsp;&nbsp;:</label>
  484 + <div class="col-md-6">
  485 + <label class="control-label col-md-5">上行出场里程  :</label>
426 486 <div class="col-md-5">
427 487 <input type="text" class="form-control" name="upOutMileage" value="{{map.upOutMileage}}" id="upOutlcInput"
428 488 placeholder="请输入上行出场里程">
429 489 </div>
430 490 </div>
431 491 <!-- 上行出场里程 END -->
  492 +</div>
  493 +<!-- 表单分组组件 form-group END -->
432 494  
  495 +<!-- 表单分组组件 form-group START -->
  496 +<div class="form-group">
433 497 <!-- 下行进场里程 START -->
434   - <div class="col-md-4">
435   - <label class="control-label col-md-5">下行进场里程&nbsp;&nbsp;&nbsp;:</label>
  498 + <div class="col-md-6">
  499 + <label class="control-label col-md-5">下行进场里程  :</label>
436 500 <div class="col-md-5">
437 501 <input type="text" class="form-control" name="downInMileage" value="{{map.downInMileage}}" id="downInlcInput"
438 502 placeholder="请输入下行进场里程">
439 503 </div>
440 504 </div>
441 505 <!-- 下行进场里程 END -->
442   -</div>
443   -<!-- 表单分组组件 form-group END -->
444   -
445   -<!-- 表单分组组件 form-group START -->
446   -<div class="form-group">
  506 +
447 507 <!-- 下行出场里程 START -->
448   - <div class="col-md-4">
449   - <label class="control-label col-md-5">下行出场里程&nbsp;&nbsp;&nbsp;:</label>
  508 + <div class="col-md-6">
  509 + <label class="control-label col-md-5">下行出场里程  :</label>
450 510 <div class="col-md-5">
451 511 <input type="text" class="form-control" name="downOutMileage" value="{{map.downOutMileage}}" id="downOutlcInput"
452 512 placeholder="请输入下行出场里程">
453 513 </div>
454 514 </div>
455 515 <!-- 下行出场里程 END -->
456   - <!-- 早晚例行保养 START -->
457   - <div class="col-md-4">
458   - <label class="control-label col-md-5">早晚例行保养&nbsp;&nbsp;&nbsp;:</label>
459   - <div class="col-md-5">
460   - <input type="text" class="form-control" name="lb" value="{{map.lb}}" id="lbInput"
461   - placeholder="请输入早晚例行保养">
462   - </div>
463   - </div>
464   - <!-- 早晚例行保养 END -->
465   - <!-- 车辆总数 (* 必填项) START -->
466   - <div class="col-md-4">
467   - <label class="control-label col-md-5">
468   - <span class="required"> * </span>
469   - 车辆总数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
470   - <div class="col-md-5">
471   - <input type="text" class="form-control" name="clzs" id="clzsInput"
472   - placeholder="请输入车辆总数">
473   - </div>
474   - </div>
475   - <!-- 车辆总数(* 必填项) END -->
476 516 </div>
477 517 <!-- 表单分组组件 form-group END -->
478   -
  518 +
479 519  
480 520 <!-- 表单分组组件 form-group START -->
481 521 <div class="form-group">
482 522 <!-- 班型与人次 (* 必填项) START -->
483   - <div class="col-md-8 ">
484   - <label class="control-label col-md-2"><span class="required"> * </span>班型与人次</label>
485   - <div class="col-md-9 tagsDiv">
  523 + <div class="col-md-6 ">
  524 + <label class="control-label col-md-5"><span class="required"> * </span>班型/人次/车辆 :</label>
  525 + <div class="col-md-5 tagsDiv">
486 526 <input type="text" value="" name="bxrc" id="state_tagsinput" style="display: none;">
487 527 <div class="margin-top-10">
488   - <select class="form-control input-large" id="state_tagsinput_bctype">
  528 + <select class="form-control" id="state_tagsinput_bctype">
489 529 <option value="">请选择工休类型...</option>
490 530 <option value="六工一休">六工一休</option>
491 531 <option value="五工一休">五工一休</option>
... ... @@ -498,7 +538,10 @@
498 538 </select>
499 539 </div>
500 540 <div class="margin-top-10">
501   - <input type="number" class="form-control input-large" placeholder="请输入分配人次数" id="state_tagsinput_value">
  541 + <input type="number" class="form-control" placeholder="请输入分配人次数" id="state_tagsinput_rcsvalue">
  542 + </div>
  543 + <div class="margin-top-10">
  544 + <input type="number" class="form-control" placeholder="请输入分配车辆数" id="state_tagsinput_clsvalue">
502 545 </div>
503 546 <div class="margin-top-10">
504 547 <a href="javascript:;" class="btn red" id="state_tagsinput_add">添加</a>
... ... @@ -506,6 +549,17 @@
506 549 </div>
507 550 </div>
508 551 <!-- 班型与人次 (* 必填项) END -->
  552 + <!-- 车辆总数 (* 必填项) START -->
  553 + <div class="col-md-6">
  554 + <label class="control-label col-md-5">
  555 + <span class="required"> * </span>
  556 + 车辆总数    :</label>
  557 + <div class="col-md-5">
  558 + <input type="text" class="form-control" name="clzs" id="clzsInput"
  559 + placeholder="请输入车辆总数">
  560 + </div>
  561 + </div>
  562 + <!-- 车辆总数(* 必填项) END -->
509 563 </div>
510 564 <!-- 表单分组组件 form-group END -->
511 565 </script>
... ... @@ -513,14 +567,14 @@
513 567 <script type="text/html" id="bctype_tempconfig">
514 568 <h4 class="form-section"> 时刻表与线路名称 </h4>
515 569 <div class="form-group">
516   - <div class="col-md-4">
517   - <label class="control-label col-md-5"> 时刻表名称&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;: </label>
  570 + <div class="col-md-6">
  571 + <label class="control-label col-md-5"> 时刻表名称   : </label>
518 572 <div class="col-md-7">
519 573 <p class="form-control-static" data-display="skbName"> </p>
520 574 </div>
521 575 </div>
522   - <div class="col-md-4">
523   - <label class="control-label col-md-5"> 线路名称&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
  576 + <div class="col-md-6">
  577 + <label class="control-label col-md-5"> 线路名称    :</label>
524 578 <div class="col-md-4">
525 579 <p class="form-control-static" data-display="lineName"> </p>
526 580 </div>
... ... @@ -529,25 +583,18 @@
529 583 <h4 class="form-section"> 参数详情 </h4>
530 584 <!-- 表单分组组件 form-group START -->
531 585 <div class="form-group">
532   - <!-- 线路规划类型 (* 必填项) START -->
533   - <div class="col-md-4">
534   - <label class="control-label col-md-5"> 线路规划类型: </label>
535   - <div class="col-md-4">
536   - <p class="form-control-static" data-display="linePlayType"> </p>
537   - </div>
538   - </div>
539 586 <!-- 线路规划类型 (* 必填项) END -->
540 587 <!-- 起始站首班时间 (* 必填项) START -->
541   - <div class="col-md-4">
542   - <label class="control-label col-md-5"> 起始站首班时间: </label>
  588 + <div class="col-md-6">
  589 + <label class="control-label col-md-5"> 起始站首班时间 : </label>
543 590 <div class="col-md-4">
544 591 <p class="form-control-static" data-display="startStationFirstTime"> </p>
545 592 </div>
546 593 </div>
547 594 <!-- 起始站首班时间 (* 必填项) END -->
548 595 <!-- 起始站末班时间 (* 必填项) START -->
549   - <div class="col-md-4">
550   - <label class="control-label col-md-5"> 起始站末班时间: </label>
  596 + <div class="col-md-6">
  597 + <label class="control-label col-md-5"> 起始站末班时间 : </label>
551 598 <div class="col-md-4">
552 599 <p class="form-control-static" data-display="startStationEndTime"> </p>
553 600 </div>
... ... @@ -559,53 +606,58 @@
559 606 <!-- 表单分组组件 form-group START -->
560 607 <div class="form-group">
561 608 <!-- 终点站首班时间 (* 必填项) START -->
562   - <div class="col-md-4">
563   - <label class="control-label col-md-5"> 终点站首班时间: </label>
  609 + <div class="col-md-6">
  610 + <label class="control-label col-md-5"> 终点站首班时间 : </label>
564 611 <div class="col-md-4">
565 612 <p class="form-control-static" data-display="endStationFirstTime"> </p>
566 613 </div>
567 614 </div>
568 615 <!-- 终点站首班时间 (* 必填项) END -->
569 616 <!-- 终点站末班时间 (* 必填项) START -->
570   - <div class="col-md-4">
571   - <label class="control-label col-md-5"> 终点站末班时间: </label>
  617 + <div class="col-md-6">
  618 + <label class="control-label col-md-5"> 终点站末班时间 : </label>
572 619 <div class="col-md-4">
573 620 <p class="form-control-static" data-display="endStationEndTime"> </p>
574 621 </div>
575 622 </div>
576 623 <!-- 终点站末班时间 (* 必填项) END -->
577   - <!-- 早高峰开始时间(* 必填项) START -->
578   - <div class="col-md-4">
579   - <label class="control-label col-md-5"> 早高峰开始时间: </label>
580   - <div class="col-md-4">
581   - <p class="form-control-static" data-display="earlyStartTime"> </p>
582   - </div>
583   - </div>
584   - <!-- 早高峰开始时间 (* 必填项) END -->
585 624 </div>
586 625 <!-- 表单分组组件 form-group END -->
587 626  
588 627 <!-- 表单分组组件 form-group START -->
589 628 <div class="form-group">
  629 + <!-- 早高峰开始时间(* 必填项) START -->
  630 + <div class="col-md-6">
  631 + <label class="control-label col-md-5"> 早高峰开始时间 : </label>
  632 + <div class="col-md-4">
  633 + <p class="form-control-static" data-display="earlyStartTime"> </p>
  634 + </div>
  635 + </div>
  636 + <!-- 早高峰开始时间 (* 必填项) END -->
590 637 <!-- 早高峰结束时间 (* 必填项) START -->
591   - <div class="col-md-4">
592   - <label class="control-label col-md-5"> 早高峰结束时间: </label>
  638 + <div class="col-md-6">
  639 + <label class="control-label col-md-5"> 早高峰结束时间 : </label>
593 640 <div class="col-md-4">
594 641 <p class="form-control-static" data-display="earlyEndTime"> </p>
595 642 </div>
596 643 </div>
597 644 <!-- 早高峰结束时间 (* 必填项) END -->
  645 +</div>
  646 +<!-- 表单分组组件 form-group END -->
  647 +
  648 +<!-- 表单分组组件 form-group START -->
  649 +<div class="form-group">
598 650 <!-- 晚高峰开始时间(* 必填项) START -->
599   - <div class="col-md-4">
600   - <label class="control-label col-md-5"> 晚高峰开始时间: </label>
  651 + <div class="col-md-6">
  652 + <label class="control-label col-md-5"> 晚高峰开始时间 : </label>
601 653 <div class="col-md-4">
602 654 <p class="form-control-static" data-display="lateStartTime"> </p>
603 655 </div>
604 656 </div>
605 657 <!-- 晚高峰开始时间(* 必填项) END -->
606 658 <!-- 晚高峰结束时间(* 必填项) START -->
607   - <div class="col-md-4">
608   - <label class="control-label col-md-5"> 晚高峰结束时间: </label>
  659 + <div class="col-md-6">
  660 + <label class="control-label col-md-5"> 晚高峰结束时间 : </label>
609 661 <div class="col-md-4">
610 662 <p class="form-control-static" data-display="lateEndTime"> </p>
611 663 </div>
... ... @@ -614,86 +666,102 @@
614 666 </div>
615 667 <!-- 表单分组组件 form-group END -->
616 668  
617   -
618 669 <!-- 表单分组组件 form-group START -->
619 670 <div class="form-group">
620 671 <!-- 上行行驶时间(* 必填项) START -->
621   - <div class="col-md-4">
622   - <label class="control-label col-md-5"> 上行行驶时间&nbsp;&nbsp;&nbsp;: </label>
  672 + <div class="col-md-6">
  673 + <label class="control-label col-md-5"> 上行行驶时间  : </label>
623 674 <div class="col-md-4">
624 675 <p class="form-control-static" data-display="upTravelTime"> </p>
625 676 </div>
626 677 </div>
627 678 <!-- 上行行驶时间(* 必填项) END -->
628 679 <!-- 下行行驶时间(* 必填项) START -->
629   - <div class="col-md-4">
630   - <label class="control-label col-md-5"> 下行行驶时间&nbsp;&nbsp;&nbsp;: </label>
  680 + <div class="col-md-6">
  681 + <label class="control-label col-md-5"> 下行行驶时间  : </label>
631 682 <div class="col-md-4">
632 683 <p class="form-control-static" data-display="downTravelTime"> </p>
633 684 </div>
634 685 </div>
635 686 <!-- 下行行驶时间(* 必填项) END -->
  687 +</div>
  688 +<!-- 表单分组组件 form-group END -->
  689 +
  690 +<!-- 表单分组组件 form-group START -->
  691 +<div class="form-group">
636 692 <!-- 上行行驶里程(* 必填项) START -->
637   - <div class="col-md-4">
638   - <label class="control-label col-md-5"> 上行行驶里程&nbsp;&nbsp;&nbsp;: </label>
  693 + <div class="col-md-6">
  694 + <label class="control-label col-md-5"> 上行行驶里程  : </label>
639 695 <div class="col-md-4">
640 696 <p class="form-control-static" data-display="upMileage"> </p>
641 697 </div>
642 698 </div>
643 699 <!-- 上行行驶里程(* 必填项) END-->
644   -</div>
645   -<!-- 表单分组组件 form-group END -->
646   -
647   -<!-- 表单分组组件 form-group START -->
648   -<div class="form-group">
649 700 <!-- 下行行驶里程(* 必填项) START -->
650   - <div class="col-md-4">
651   - <label class="control-label col-md-5"> 下行行驶里程&nbsp;&nbsp;&nbsp;: </label>
  701 + <div class="col-md-6">
  702 + <label class="control-label col-md-5"> 下行行驶里程  : </label>
652 703 <div class="col-md-4">
653 704 <p class="form-control-static" data-display="downMileage"> </p>
654 705 </div>
655 706 </div>
656 707 <!-- 下行行驶里程(* 必填项) END -->
657   - <!-- 上行停站间隙(* 必填项) START -->
658   - <div class="col-md-4">
659   - <label class="control-label col-md-5"> 上行停站间隙&nbsp;&nbsp;&nbsp;: </label>
  708 +</div>
  709 +<!-- 表单分组组件 form-group END -->
  710 +
  711 +<!-- 表单分组组件 form-group START -->
  712 +<div class="form-group">
  713 + <!-- 高峰上行停站间隙(* 必填项) START -->
  714 + <div class="col-md-6">
  715 + <label class="control-label col-md-5"> 高峰上行停站间隙: </label>
660 716 <div class="col-md-4">
661   - <p class="form-control-static" data-display="upStopTime"> </p>
  717 + <p class="form-control-static" data-display="gfupStopTime"> </p>
662 718 </div>
663 719 </div>
664   - <!-- 上行停站间隙(* 必填项) END -->
665   - <!-- 下行停站间隙(* 必填项) START -->
666   - <div class="col-md-4">
667   - <label class="control-label col-md-5"> 下行停站间隙&nbsp;&nbsp;&nbsp;: </label>
  720 + <!-- 高峰上行停站间隙(* 必填项) END -->
  721 + <!-- 高峰下行停站间隙(* 必填项) START -->
  722 + <div class="col-md-6">
  723 + <label class="control-label col-md-5"> 高峰下行停站间隙: </label>
668 724 <div class="col-md-4">
669   - <p class="form-control-static" data-display="downStopTime"> </p>
  725 + <p class="form-control-static" data-display="gfdownStopTime"> </p>
670 726 </div>
671 727 </div>
672   - <!-- 下行停站间隙(* 必填项) END -->
  728 + <!-- 高峰下行停站间隙(* 必填项) END -->
673 729 </div>
674 730 <!-- 表单分组组件 form-group END -->
675 731  
676 732 <!-- 表单分组组件 form-group START -->
677 733 <div class="form-group">
678   - <!-- 最大停站间隙(* 必填项) START -->
679   - <div class="col-md-4">
680   - <label class="control-label col-md-5"> 最大停站间隙&nbsp;&nbsp;&nbsp;: </label>
  734 + <!-- 低谷上行停站间隙(* 必填项) START -->
  735 + <div class="col-md-6">
  736 + <label class="control-label col-md-5"> 低谷上行停站间隙: </label>
  737 + <div class="col-md-4">
  738 + <p class="form-control-static" data-display="dgupStopTime"> </p>
  739 + </div>
  740 + </div>
  741 + <!-- 低谷上行停站间隙(* 必填项) END -->
  742 + <!-- 低谷下行停站间隙(* 必填项) START -->
  743 + <div class="col-md-6">
  744 + <label class="control-label col-md-5"> 低谷下行停站间隙: </label>
681 745 <div class="col-md-4">
682   - <p class="form-control-static" data-display="maxstopTime"> </p>
  746 + <p class="form-control-static" data-display="dgdownStopTime"> </p>
683 747 </div>
684 748 </div>
685   - <!-- 最大停站间隙(* 必填项) END -->
686   - <!-- 最小停站间隙(* 必填项) START -->
687   - <div class="col-md-4">
688   - <label class="control-label col-md-5"> 最小停站间隙&nbsp;&nbsp;&nbsp;: </label>
689   - <div class="col-md-4">
690   - <p class="form-control-static" data-display="mixstopTime"> </p>
691   - </div>
  749 + <!-- 低谷下行停站间隙(* 必填项) END -->
  750 +</div>
  751 +<!-- 表单分组组件 form-group END -->
  752 +
  753 +<!-- 表单分组组件 form-group START -->
  754 +<div class="form-group">
  755 + <!-- 线路规划类型 (* 必填项) START -->
  756 + <div class="col-md-6">
  757 + <label class="control-label col-md-5"> 线路规划类型  : </label>
  758 + <div class="col-md-4">
  759 + <p class="form-control-static" data-display="linePlayType"> </p>
  760 + </div>
692 761 </div>
693   - <!-- 最小停站间隙(* 必填项) END -->
694 762 <!-- 停车场 START -->
695   - <div class="col-md-4">
696   - <label class="control-label col-md-5">停车场&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
  763 + <div class="col-md-6">
  764 + <label class="control-label col-md-5">停车场     :</label>
697 765 <div class="col-md-7">
698 766 <p class="form-control-static" data-display="carPark"> </p>
699 767 </div>
... ... @@ -704,58 +772,83 @@
704 772  
705 773 <!-- 表单分组组件 form-group START -->
706 774 <div class="form-group">
  775 + <!-- 终点站车容量 START -->
  776 + <div class="col-md-6">
  777 + <label class="control-label col-md-5"> 终点站车容量  : </label>
  778 + <div class="col-md-4">
  779 + <p class="form-control-static" data-display="zdzcrl"> </p>
  780 + </div>
  781 + </div>
  782 + <!-- 吃饭地点 START -->
  783 + <div class="col-md-6">
  784 + <label class="control-label col-md-5">吃饭地点    :</label>
  785 + <div class="col-md-7">
  786 + <p class="form-control-static" data-display="cfdd"> </p>
  787 + </div>
  788 + </div>
  789 + <!-- 吃饭地点 START -->
  790 +</div>
  791 +<!-- 表单分组组件 form-group END -->
  792 +
  793 +<!-- 表单分组组件 form-group START -->
  794 +<div class="form-group">
707 795 <!-- 早高峰上行时间 START -->
708   - <div class="col-md-4">
709   - <label class="control-label col-md-5"> 早高峰上行时间: </label>
  796 + <div class="col-md-6">
  797 + <label class="control-label col-md-5"> 早高峰上行时间 : </label>
710 798 <div class="col-md-6">
711 799 <p class="form-control-static" data-display="earlyUpTime"> </p>
712 800 </div>
713 801 </div>
714 802 <!-- 早高峰上行时间 END -->
715 803 <!-- 早高峰下行时间 START -->
716   - <div class="col-md-4">
717   - <label class="control-label col-md-5"> 早高峰下行时间: </label>
  804 + <div class="col-md-6">
  805 + <label class="control-label col-md-5"> 早高峰下行时间 : </label>
718 806 <div class="col-md-4">
719 807 <p class="form-control-static" data-display="earlyDownTime"> </p>
720 808 </div>
721 809 </div>
722 810 <!-- 早高峰下行时间 END -->
  811 +</div>
  812 +<!-- 表单分组组件 form-group END -->
  813 +
  814 +<!-- 表单分组组件 form-group START -->
  815 +<div class="form-group">
723 816 <!-- 晚高峰上行时间 START -->
724   - <div class="col-md-4">
725   - <label class="control-label col-md-5"> 晚高峰上行时间: </label>
  817 + <div class="col-md-6">
  818 + <label class="control-label col-md-5"> 晚高峰上行时间 : </label>
726 819 <div class="col-md-4">
727 820 <p class="form-control-static" data-display="lateUpTime"> </p>
728 821 </div>
729 822 </div>
730 823 <!-- 晚高峰上行时间 END -->
731   -</div>
732   -<!-- 表单分组组件 form-group END -->
733   -
734   -<!-- 表单分组组件 form-group START -->
735   -<div class="form-group">
736 824 <!-- 晚高峰下行时间 START -->
737   - <div class="col-md-4">
738   - <label class="control-label col-md-5"> 晚高峰下行时间:</label>
  825 + <div class="col-md-6">
  826 + <label class="control-label col-md-5"> 晚高峰下行时间 :</label>
739 827 <div class="col-md-4">
740 828 <p class="form-control-static" data-display="lateDownTime"> </p>
741 829 </div>
742 830 </div>
743 831 <!-- 晚高峰下行时间 END -->
  832 +</div>
  833 +<!-- 表单分组组件 form-group END -->
  834 +
  835 +<!-- 表单分组组件 form-group START -->
  836 +<div class="form-group">
744 837 <!-- 低谷上行时间 START -->
745   - <div class="col-md-4">
746   - <label class="control-label col-md-5">低谷上行时间&nbsp;&nbsp;&nbsp;: </label>
  838 + <div class="col-md-6">
  839 + <label class="control-label col-md-5">低谷上行时间  : </label>
747 840 <div class="col-md-4">
748 841 <p class="form-control-static" data-display="troughUpTime"> </p>
749 842 </div>
750 843 </div>
751 844 <!-- 低谷上行时间 END -->
752 845 <!-- 低谷下行时间 START -->
753   - <div class="col-md-4">
754   - <label class="control-label col-md-5"> 低谷下行时间&nbsp;&nbsp;&nbsp;: </label>
  846 + <div class="col-md-6">
  847 + <label class="control-label col-md-5"> 低谷下行时间  : </label>
755 848 <div class="col-md-4">
756 849 <p class="form-control-static" data-display="troughDownTime"> </p>
757 850 </div>
758   - </div>
  851 + </div>
759 852 <!-- 低谷下行时间 END -->
760 853 </div>
761 854 <!-- 表单分组组件 form-group END -->
... ... @@ -763,24 +856,37 @@
763 856 <!-- 表单分组组件 form-group START -->
764 857 <div class="form-group">
765 858 <!-- 区间上行时间 START -->
766   - <div class="col-md-4">
767   - <label class="control-label col-md-5"> 区间上行时间&nbsp;&nbsp;&nbsp;:</label>
  859 + <div class="col-md-6">
  860 + <label class="control-label col-md-5"> 区间上行时间  :</label>
768 861 <div class="col-md-4">
769 862 <p class="form-control-static" data-display="qjUpTime"> </p>
770 863 </div>
771 864 </div>
772 865 <!-- 区间上行时间 END -->
773 866 <!-- 区间下行时间 START -->
774   - <div class="col-md-4">
775   - <label class="control-label col-md-5">区间下行时间&nbsp;&nbsp;&nbsp;: </label>
  867 + <div class="col-md-6">
  868 + <label class="control-label col-md-5">区间下行时间  : </label>
776 869 <div class="col-md-4">
777 870 <p class="form-control-static" data-display="qjDownTime"> </p>
778 871 </div>
779 872 </div>
780 873 <!-- 区间下行时间 END -->
  874 +</div>
  875 +<!-- 表单分组组件 form-group END -->
  876 +
  877 +<!-- 表单分组组件 form-group START -->
  878 +<div class="form-group">
  879 + <!-- 早晚例行保养 START -->
  880 + <div class="col-md-6">
  881 + <label class="control-label col-md-5">早晚例行保养  :</label>
  882 + <div class="col-md-4">
  883 + <p class="form-control-static" data-display="lb"> </p>
  884 + </div>
  885 + </div>
  886 + <!-- 早晚例行保养 END -->
781 887 <!-- 空放行驶时间 START -->
782   - <div class="col-md-4">
783   - <label class="control-label col-md-5"> 空放行驶时间&nbsp;&nbsp;&nbsp;: </label>
  888 + <div class="col-md-6">
  889 + <label class="control-label col-md-5"> 空放行驶时间  : </label>
784 890 <div class="col-md-4">
785 891 <p class="form-control-static" data-display="kfsj"> </p>
786 892 </div>
... ... @@ -792,53 +898,58 @@
792 898 <!-- 表单分组组件 form-group START -->
793 899 <div class="form-group">
794 900 <!-- 工作餐午餐时间 START -->
795   - <div class="col-md-4">
796   - <label class="control-label col-md-5"> 工作餐午餐时间: </label>
  901 + <div class="col-md-6">
  902 + <label class="control-label col-md-5"> 工作餐午餐时间 : </label>
797 903 <div class="col-md-4">
798 904 <p class="form-control-static" data-display="workeLunch"> </p>
799 905 </div>
800 906 </div>
801 907 <!-- 工作餐午餐时间 END -->
802 908 <!-- 工作餐晚餐时间 START -->
803   - <div class="col-md-4">
804   - <label class="control-label col-md-5"> 工作餐晚餐时间: </label>
  909 + <div class="col-md-6">
  910 + <label class="control-label col-md-5"> 工作餐晚餐时间 : </label>
805 911 <div class="col-md-4">
806 912 <p class="form-control-static" data-display="workeDinner"> </p>
807 913 </div>
808 914 </div>
809 915 <!-- 空放行驶时间 END -->
  916 +</div>
  917 +<!-- 表单分组组件 form-group END -->
  918 +
  919 +<!-- 表单分组组件 form-group START -->
  920 +<div class="form-group">
810 921 <!-- 上行进场时间 START -->
811   - <div class="col-md-4">
812   - <label class="control-label col-md-5"> 上行进场时间&nbsp;&nbsp;&nbsp;:</label>
  922 + <div class="col-md-6">
  923 + <label class="control-label col-md-5"> 上行进场时间  :</label>
813 924 <div class="col-md-4">
814 925 <p class="form-control-static" data-display="upInTimer"> </p>
815 926 </div>
816 927 </div>
817 928 <!-- 上行进场时间 END -->
818   -</div>
819   -<!-- 表单分组组件 form-group END -->
820   -
821   -<!-- 表单分组组件 form-group START -->
822   -<div class="form-group">
823 929 <!-- 上行出场时间 START -->
824   - <div class="col-md-4">
825   - <label class="control-label col-md-5"> 上行出场时间&nbsp;&nbsp;&nbsp;: </label>
  930 + <div class="col-md-6">
  931 + <label class="control-label col-md-5"> 上行出场时间  : </label>
826 932 <div class="col-md-4">
827 933 <p class="form-control-static" data-display="upOutTimer"> </p>
828 934 </div>
829 935 </div>
830 936 <!-- 上行出场时间 END -->
  937 +</div>
  938 +<!-- 表单分组组件 form-group END -->
  939 +
  940 +<!-- 表单分组组件 form-group START -->
  941 +<div class="form-group">
831 942 <!-- 下行进场时间 START -->
832   - <div class="col-md-4">
833   - <label class="control-label col-md-5"> 下行进场时间&nbsp;&nbsp;&nbsp;: </label>
  943 + <div class="col-md-6">
  944 + <label class="control-label col-md-5"> 下行进场时间  : </label>
834 945 <div class="col-md-4">
835 946 <p class="form-control-static" data-display="downInTimer"> </p>
836 947 </div>
837 948 </div>
838 949 <!-- 下行进场时间 END -->
839 950 <!-- 下行出场时间 START -->
840   - <div class="col-md-4">
841   - <label class="control-label col-md-5"> 下行出场时间&nbsp;&nbsp;&nbsp;: </label>
  951 + <div class="col-md-6">
  952 + <label class="control-label col-md-5"> 下行出场时间  : </label>
842 953 <div class="col-md-4">
843 954 <p class="form-control-static" data-display="downOutTimer"> </p>
844 955 </div>
... ... @@ -850,66 +961,59 @@
850 961 <!-- 表单分组组件 form-group START -->
851 962 <div class="form-group">
852 963 <!-- 上行进场里程 START -->
853   - <div class="col-md-4">
854   - <label class="control-label col-md-5"> 上行进场里程&nbsp;&nbsp;&nbsp;: </label>
  964 + <div class="col-md-6">
  965 + <label class="control-label col-md-5"> 上行进场里程  : </label>
855 966 <div class="col-md-4">
856 967 <p class="form-control-static" data-display="upInMileage"> </p>
857 968 </div>
858 969 </div>
859 970 <!-- 上行进场里程 END -->
860 971 <!-- 上行出场里程 START -->
861   - <div class="col-md-4">
862   - <label class="control-label col-md-5">上行出场里程&nbsp;&nbsp;&nbsp;:</label>
  972 + <div class="col-md-6">
  973 + <label class="control-label col-md-5">上行出场里程  :</label>
863 974 <div class="col-md-4">
864 975 <p class="form-control-static" data-display="upOutMileage"> </p>
865 976 </div>
866 977 </div>
867 978 <!-- 上行出场里程 END -->
  979 +</div>
  980 +<!-- 表单分组组件 form-group END -->
  981 +
  982 +<!-- 表单分组组件 form-group START -->
  983 +<div class="form-group">
868 984 <!-- 下行进场里程 START -->
869   - <div class="col-md-4">
870   - <label class="control-label col-md-5">下行进场里程&nbsp;&nbsp;&nbsp;: </label>
  985 + <div class="col-md-6">
  986 + <label class="control-label col-md-5">下行进场里程  : </label>
871 987 <div class="col-md-4">
872 988 <p class="form-control-static" data-display="downInMileage"> </p>
873 989 </div>
874 990 </div>
875 991 <!-- 下行进场里程 END -->
876   -</div>
877   -<!-- 表单分组组件 form-group END -->
878   -
879   -<!-- 表单分组组件 form-group START -->
880   -<div class="form-group">
881 992 <!-- 下行出场里程 START -->
882   - <div class="col-md-4">
883   - <label class="control-label col-md-5"> 下行出场里程&nbsp;&nbsp;&nbsp;:</label>
  993 + <div class="col-md-6">
  994 + <label class="control-label col-md-5"> 下行出场里程  :</label>
884 995 <div class="col-md-4">
885 996 <p class="form-control-static" data-display="downOutMileage"> </p>
886 997 </div>
887 998 </div>
888 999 <!-- 下行出场里程 END -->
889   - <!-- 早晚例行保养 START -->
890   - <div class="col-md-4">
891   - <label class="control-label col-md-5">早晚例行保养&nbsp;&nbsp;&nbsp;:</label>
892   - <div class="col-md-4">
893   - <p class="form-control-static" data-display="lb"> </p>
894   - </div>
895   - </div>
896   - <!-- 早晚例行保养 END -->
  1000 +</div>
  1001 +<!-- 表单分组组件 form-group END -->
  1002 +
  1003 +
  1004 +<!-- 表单分组组件 form-group START -->
  1005 +<div class="form-group">
897 1006 <!-- 班型与人次 START -->
898 1007 <div class="col-md-6">
899   - <label class="control-label col-md-3">班型与人次&nbsp;&nbsp;&nbsp;:</label>
900   - <div class="col-md-9">
  1008 + <label class="control-label col-md-5">班型/人次/车辆 :</label>
  1009 + <div class="col-md-4">
901 1010 <p class="form-control-static" data-display="bxrc"> </p>
902 1011 </div>
903 1012 </div>
904 1013 <!-- 班型与人次 END -->
905   -</div>
906   -<!-- 表单分组组件 form-group END -->
907   -
908   -<!-- 表单分组组件 form-group START -->
909   -<div class="form-group">
910 1014 <!-- 车辆总数 START -->
911   - <div class="col-md-4">
912   - <label class="control-label col-md-5"> 车辆总数&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
  1015 + <div class="col-md-6">
  1016 + <label class="control-label col-md-5"> 车辆总数    :</label>
913 1017 <div class="col-md-4">
914 1018 <p class="form-control-static" data-display="clzs"> </p>
915 1019 </div>
... ...
src/main/resources/static/pages/base/timesmodel/tepms/carnum_temp.html
1 1 <script type="text/html" id = "carnum_temp">
2 2 <!-- 表单分组组件 form-group START -->
3 3 <div class="form-group">
4   - <!-- 线路规划类型 (* 必填项) START -->
5   - <div class="col-md-4">
6   - <label class="control-label col-md-5">
7   - <span class="required"> * </span> 线路规划类型&nbsp;&nbsp;&nbsp;:
8   - </label>
9   - <div class="col-md-5">
10   - <select name="linePlayType" class="form-control" id="linePlayTypeSelect">
11   - <option value="">-- 请选择线路类型 --</option>
12   - <option value="0">双向</option>
13   - <option value="1">环线</option>
14   - </select>
15   - </div>
16   - </div>
17   - <!-- 线路规划类型 (* 必填项) END -->
18 4 <!-- 起始站首班时间 (* 必填项) START -->
19   - <div class="col-md-4">
  5 + <div class="col-md-6">
20 6 <label class="control-label col-md-5">
21 7 <span class="required"> * </span> 起始站首班时间:
22 8 </label>
... ... @@ -27,7 +13,7 @@
27 13 </div>
28 14 <!-- 起始站首班时间 (* 必填项) END -->
29 15 <!-- 起始站末班时间 (* 必填项) START -->
30   - <div class="col-md-4">
  16 + <div class="col-md-6">
31 17 <label class="control-label col-md-5">
32 18 <span class="required"> * </span> 起始站末班时间:
33 19 </label>
... ... @@ -43,7 +29,7 @@
43 29 <!-- 表单分组组件 form-group START -->
44 30 <div class="form-group">
45 31 <!-- 终点站首班时间 (* 必填项) START -->
46   - <div class="col-md-4">
  32 + <div class="col-md-6">
47 33 <label class="control-label col-md-5">
48 34 <span class="required"> * </span> 终点站首班时间:
49 35 </label>
... ... @@ -54,7 +40,7 @@
54 40 </div>
55 41 <!-- 终点站首班时间 (* 必填项) END -->
56 42 <!-- 终点站末班时间 (* 必填项) START -->
57   - <div class="col-md-4">
  43 + <div class="col-md-6">
58 44 <label class="control-label col-md-5">
59 45 <span class="required"> * </span> 终点站末班时间:
60 46 </label>
... ... @@ -64,8 +50,13 @@
64 50 </div>
65 51 </div>
66 52 <!-- 终点站末班时间 (* 必填项) END -->
  53 +</div>
  54 +<!-- 表单分组组件 form-group END -->
  55 +
  56 +<!-- 表单分组组件 form-group START -->
  57 +<div class="form-group">
67 58 <!-- 早高峰开始时间 (* 必填项) START -->
68   - <div class="col-md-4">
  59 + <div class="col-md-6">
69 60 <label class="control-label col-md-5">
70 61 <span class="required"> * </span> 早高峰开始时间:
71 62 </label>
... ... @@ -75,13 +66,8 @@
75 66 </div>
76 67 </div>
77 68 <!-- 早高峰开始时间 (* 必填项) END -->
78   -</div>
79   -<!-- 表单分组组件 form-group END -->
80   -
81   -<!-- 表单分组组件 form-group START -->
82   -<div class="form-group">
83 69 <!-- 早高峰结束时间 (* 必填项) START -->
84   - <div class="col-md-4">
  70 + <div class="col-md-6">
85 71 <label class="control-label col-md-5">
86 72 <span class="required"> * </span> 早高峰结束时间:
87 73 </label>
... ... @@ -91,8 +77,13 @@
91 77 </div>
92 78 </div>
93 79 <!-- 早高峰结束时间 (* 必填项) END -->
  80 +</div>
  81 +<!-- 表单分组组件 form-group END -->
  82 +
  83 +<!-- 表单分组组件 form-group START -->
  84 +<div class="form-group">
94 85 <!-- 晚高峰开始时间 (* 必填项) START -->
95   - <div class="col-md-4">
  86 + <div class="col-md-6">
96 87 <label class="control-label col-md-5">
97 88 <span class="required"> * </span> 晚高峰开始时间:
98 89 </label>
... ... @@ -103,7 +94,7 @@
103 94 </div>
104 95 <!-- 晚高峰开始时间 (* 必填项) END -->
105 96 <!-- 晚高峰结束 (* 必填项) START -->
106   - <div class="col-md-4">
  97 + <div class="col-md-6">
107 98 <label class="control-label col-md-5">
108 99 <span class="required"> * </span> 晚高峰结束时间:
109 100 </label>
... ... @@ -114,12 +105,12 @@
114 105 </div>
115 106 <!-- 晚高峰结束 (* 必填项) END -->
116 107 </div>
117   -<!-- 表单分组组件 form-group END -->
  108 + <!-- 表单分组组件 form-group END -->
118 109  
119 110 <!-- 表单分组组件 form-group START -->
120 111 <div class="form-group">
121 112 <!-- 早高峰前配车数 (* 必填项) START -->
122   - <div class="col-md-4">
  113 + <div class="col-md-6">
123 114 <label class="control-label col-md-5">
124 115 <span class="required"> * </span> 早高峰前配车数:
125 116 </label>
... ... @@ -130,7 +121,7 @@
130 121 </div>
131 122 <!-- 营运开始配车数 (* 必填项) END -->
132 123 <!-- 早高峰配车数 (* 必填项) START -->
133   - <div class="col-md-4">
  124 + <div class="col-md-6">
134 125 <label class="control-label col-md-5">
135 126 <span class="required"> * </span> 早高峰配车数&nbsp;&nbsp;&nbsp;:
136 127 </label>
... ... @@ -140,8 +131,13 @@
140 131 </div>
141 132 </div>
142 133 <!-- 早高峰配车数 (* 必填项) END -->
  134 +</div>
  135 + <!-- 表单分组组件 form-group END -->
  136 +
  137 +<!-- 表单分组组件 form-group START -->
  138 +<div class="form-group">
143 139 <!-- 高峰之间配车数(* 必填项) START -->
144   - <div class="col-md-4">
  140 + <div class="col-md-6">
145 141 <label class="control-label col-md-5">
146 142 <span class="required"> * </span> 高峰之间配车数:
147 143 </label>
... ... @@ -151,13 +147,8 @@
151 147 </div>
152 148 </div>
153 149 <!-- 高峰之间配车数 (* 必填项) END -->
154   -</div>
155   - <!-- 表单分组组件 form-group END -->
156   -
157   -<!-- 表单分组组件 form-group START -->
158   -<div class="form-group">
159 150 <!-- 晚高峰配车数 (* 必填项) START -->
160   - <div class="col-md-4">
  151 + <div class="col-md-6">
161 152 <label class="control-label col-md-5">
162 153 <span class="required"> * </span> 晚高峰配车数&nbsp;&nbsp;&nbsp;:
163 154 </label>
... ... @@ -167,8 +158,13 @@
167 158 </div>
168 159 </div>
169 160 <!-- 晚高峰配车数 (* 必填项) END -->
  161 +</div>
  162 +<!-- 表单分组组件 form-group END -->
  163 +
  164 +<!-- 表单分组组件 form-group START -->
  165 +<div class="form-group">
170 166 <!-- 晚高峰后配车数 (* 必填项) START -->
171   - <div class="col-md-4">
  167 + <div class="col-md-6">
172 168 <label class="control-label col-md-5">
173 169 <span class="required"> * </span> 晚高峰后配车数:
174 170 </label>
... ... @@ -178,8 +174,27 @@
178 174 </div>
179 175 </div>
180 176 <!-- 晚高峰后配车数 (* 必填项) END -->
  177 + <!-- 线路规划类型 (* 必填项) START -->
  178 + <div class="col-md-6">
  179 + <label class="control-label col-md-5">
  180 + <span class="required"> * </span> 线路规划类型&nbsp;&nbsp;&nbsp;:
  181 + </label>
  182 + <div class="col-md-5">
  183 + <select name="linePlayType" class="form-control" id="linePlayTypeSelect">
  184 + <option value="">-- 请选择线路类型 --</option>
  185 + <option value="0">双向</option>
  186 + <option value="1">环线</option>
  187 + </select>
  188 + </div>
  189 + </div>
  190 + <!-- 线路规划类型 (* 必填项) END -->
  191 +</div>
  192 +<!-- 表单分组组件 form-group END -->
  193 +
  194 +<!-- 表单分组组件 form-group START -->
  195 +<div class="form-group">
181 196 <!-- 上行行驶时间(* 必填项) START -->
182   - <div class="col-md-4">
  197 + <div class="col-md-6">
183 198 <label class="control-label col-md-5">
184 199 <span class="required"> * </span> 上行行驶时间&nbsp;&nbsp;&nbsp;:
185 200 </label>
... ... @@ -189,13 +204,8 @@
189 204 </div>
190 205 </div>
191 206 <!-- 上行行驶时间 (* 必填项) END -->
192   -</div>
193   -<!-- 表单分组组件 form-group END -->
194   -
195   -<!-- 表单分组组件 form-group START -->
196   -<div class="form-group">
197 207 <!-- 下行行驶时间 (* 必填项) START -->
198   - <div class="col-md-4">
  208 + <div class="col-md-6">
199 209 <label class="control-label col-md-5">
200 210 <span class="required"> * </span> 下行行驶时间&nbsp;&nbsp;&nbsp;:
201 211 </label>
... ... @@ -205,8 +215,13 @@
205 215 </div>
206 216 </div>
207 217 <!-- 下行行驶时间(* 必填项) END -->
  218 +</div>
  219 +<!-- 表单分组组件 form-group END -->
  220 +
  221 +<!-- 表单分组组件 form-group START -->
  222 +<div class="form-group">
208 223 <!-- 上行里程(* 必填项) START -->
209   - <div class="col-md-4">
  224 + <div class="col-md-6">
210 225 <label class="control-label col-md-5">
211 226 <span class="required"> * </span> 上行行驶里程&nbsp;&nbsp;&nbsp;:
212 227 </label>
... ... @@ -217,7 +232,7 @@
217 232 </div>
218 233 <!-- 上行里程 (* 必填项) END -->
219 234 <!-- 下行里程 (* 必填项) START -->
220   - <div class="col-md-4">
  235 + <div class="col-md-6">
221 236 <label class="control-label col-md-5">
222 237 <span class="required"> * </span> 下行行驶里程&nbsp;&nbsp;&nbsp;:
223 238 </label>
... ... @@ -230,81 +245,118 @@
230 245 </div>
231 246 <!-- 表单分组组件 form-group END -->
232 247  
  248 +
233 249 <!-- 表单分组组件 form-group START -->
234 250 <div class="form-group">
235 251 <!-- 上行停站间隙 (* 必填项) START -->
236   - <div class="col-md-4">
  252 + <div class="col-md-6">
237 253 <label class="control-label col-md-5">
238 254 <span class="required"> * </span> 上行停站间隙&nbsp;&nbsp;&nbsp;:
239 255 </label>
240 256 <div class="col-md-5">
241   - <input type="text" class="form-control" name="upStopTime" value="{{map.upStopTime}}" id="upStopTimeInput"
  257 + <input type="text" class="form-control" name="upStopTime" id="upStopTimeInput"
242 258 placeholder="请输入上行停站间隙">
243 259 </div>
244 260 </div>
245 261 <!-- 上行停站间隙 (* 必填项) END -->
246   -
247 262 <!-- 下行停站间隙 (* 必填项) START -->
248   - <div class="col-md-4">
  263 + <div class="col-md-6">
249 264 <label class="control-label col-md-5">
250 265 <span class="required"> * </span> 下行停站间隙&nbsp;&nbsp;&nbsp;:
251 266 </label>
252 267 <div class="col-md-5">
253   - <input type="text" class="form-control" name="downStopTime" value="{{map.downStopTime}}" id="downStopTimeInput"
  268 + <input type="text" class="form-control" name="downStopTime" id="downStopTimeInput"
254 269 placeholder="请输入下行停站间隙">
255 270 </div>
256 271 </div>
257 272 <!-- 下行停站间隙 (* 必填项) END -->
258   - <!-- 最大停站间隙(* 必填项) START -->
259   - <div class="col-md-4">
260   - <label class="control-label col-md-5">
261   - <span class="required"> * </span> 最大停站间隙&nbsp;&nbsp;&nbsp;:
262   - </label>
263   - <div class="col-md-5">
264   - <input type="text" class="form-control" name="maxstopTime" value="{{map.maxstopTime}}" id="maxstopTimeInput"
265   - placeholder="请输入最大停站间隙">
266   - </div>
267   - </div>
268   - <!-- 最大停站间隙 (* 必填项) END -->
269 273 </div>
270 274 <!-- 表单分组组件 form-group END -->
271 275  
272 276 <!-- 表单分组组件 form-group START -->
273 277 <div class="form-group">
274   - <!-- 最小停站间隙(* 必填项) START -->
275   - <div class="col-md-4">
  278 + <!-- 高峰停站间隙(* 必填项) START -->
  279 + <div class="col-md-6">
276 280 <label class="control-label col-md-5">
277   - <span class="required"> * </span> 最小停站间隙&nbsp;&nbsp;&nbsp;:
  281 + <span class="required"> * </span> 高峰停站间隙&nbsp;&nbsp;&nbsp;:
278 282 </label>
279 283 <div class="col-md-5">
280   - <input type="text" class="form-control" name="mixstopTime" value="{{map.mixstopTime}}" id="mixstopTimeInput" placeholder="最小停站间隙">
  284 + <input type="text" class="form-control" name="mixstopTime" value="{{map.mixstopTime}}" id="mixstopTimeInput" placeholder="高峰停站间隙">
281 285 </div>
282 286 </div>
283   - <!-- 最小停站间隙(* 必填项) END -->
  287 + <!-- 高峰停站间隙(* 必填项) END -->
  288 + <!-- 低谷停站间隙(* 必填项) START -->
  289 + <div class="col-md-6">
  290 + <label class="control-label col-md-5">
  291 + <span class="required"> * </span> 低谷停站间隙&nbsp;&nbsp;&nbsp;:
  292 + </label>
  293 + <div class="col-md-5">
  294 + <input type="text" class="form-control" name="maxstopTime" value="{{map.maxstopTime}}" id="maxstopTimeInput"
  295 + placeholder="请输入低谷停站间隙">
  296 + </div>
  297 + </div>
  298 + <!-- 低谷停站间隙 (* 必填项) END -->
  299 +</div>
  300 +<!-- 表单分组组件 form-group END -->
  301 +
  302 +<!-- 表单分组组件 form-group START -->
  303 +<div class="form-group">
284 304 <!-- 停车场(* 必填项) START -->
285   - <div class="col-md-4">
  305 + <div class="col-md-6">
286 306 <label class="control-label col-md-5">停车场&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
287 307 <div class="col-md-5">
288 308 <select name="carPark" class="form-control" id="carParkSelect" style="width:100%"></select>
289 309 </div>
290 310 </div>
291 311 <!-- 停车场(* 必填项) END -->
292   - <!-- 早高峰上行时间(* 必填项) START -->
293   - <div class="col-md-4">
294   - <label class="control-label col-md-5">早高峰上行时间:</label>
  312 + <!-- 空放行驶时间 START -->
  313 + <div class="col-md-6">
  314 + <label class="control-label col-md-5">空放行驶时间&nbsp;&nbsp;&nbsp;:</label>
295 315 <div class="col-md-5">
296   - <input type="text" class="form-control" name="earlyUpTime" value="{{map.earlyUpTime}}" id="earlyUpTimeInput"
297   - placeholder="请输入早高峰上行时间">
  316 + <input type="text" class="form-control" name="kfsj" id="kfsjInput"
  317 + placeholder="请输入空放行驶时间">
298 318 </div>
299 319 </div>
300   - <!-- 早高峰上行时间(* 必填项) END -->
  320 + <!-- 空放行驶时间 END -->
  321 +</div>
  322 +<!-- 表单分组组件 form-group END -->
  323 +
  324 +<!-- 表单分组组件 form-group START -->
  325 +<div class="form-group">
  326 + <!-- 终点站车容量 START -->
  327 + <div class="col-md-6">
  328 + <label class="control-label col-md-5">终点站车容量&nbsp;&nbsp;&nbsp;:</label>
  329 + <div class="col-md-5">
  330 + <input type="text" class="form-control" name="zdzcrl" id="zdzcrlInput"
  331 + placeholder="请输入终点站车容量">
  332 + </div>
  333 + </div>
  334 + <!-- 终点站车容量 END -->
  335 + <!-- 吃饭地点 START -->
  336 + <div class="col-md-6">
  337 + <label class="control-label col-md-5">吃饭地点&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
  338 + <div class="col-md-5">
  339 + <input type="text" class="form-control" name="cfdd" id="cfddSelect"
  340 + placeholder="请输入吃饭地点">
  341 + </div>
  342 + </div>
  343 + <!-- 空放行驶时间 END -->
301 344 </div>
302 345 <!-- 表单分组组件 form-group END -->
303 346  
304 347 <!-- 表单分组组件 form-group START -->
305 348 <div class="form-group">
  349 + <!-- 早高峰上行时间(* 必填项) START -->
  350 + <div class="col-md-6">
  351 + <label class="control-label col-md-5">早高峰上行时间:</label>
  352 + <div class="col-md-5">
  353 + <input type="text" class="form-control" name="earlyUpTime" value="{{map.earlyUpTime}}" id="earlyUpTimeInput"
  354 + placeholder="请输入早高峰上行时间">
  355 + </div>
  356 + </div>
  357 + <!-- 早高峰上行时间(* 必填项) END -->
306 358 <!-- 早高峰下行时间(* 必填项) START -->
307   - <div class="col-md-4">
  359 + <div class="col-md-6">
308 360 <label class="control-label col-md-5">早高峰下行时间:</label>
309 361 <div class="col-md-5">
310 362 <input type="text" class="form-control" name="earlyDownTime" value="{{map.earlyDownTime}}" id="earlyDownTimeInput"
... ... @@ -312,8 +364,13 @@
312 364 </div>
313 365 </div>
314 366 <!-- 早高峰下行时间(* 必填项) END -->
  367 +</div>
  368 +<!-- 表单分组组件 form-group END -->
  369 +
  370 +<!-- 表单分组组件 form-group START -->
  371 +<div class="form-group">
315 372 <!-- 晚高峰上行时间 (* 必填项) START -->
316   - <div class="col-md-4">
  373 + <div class="col-md-6">
317 374 <label class="control-label col-md-5">晚高峰上行时间:</label>
318 375 <div class="col-md-5">
319 376 <input type="text" class="form-control" name="lateUpTime" value="{{map.lateUpTime}}" id="lateUpTimeInput"
... ... @@ -322,7 +379,7 @@
322 379 </div>
323 380 <!-- 晚高峰上行时间(* 必填项) END -->
324 381 <!-- 晚高峰下行时间 (* 必填项) START -->
325   - <div class="col-md-4">
  382 + <div class="col-md-6">
326 383 <label class="control-label col-md-5">晚高峰下行时间:</label>
327 384 <div class="col-md-5">
328 385 <input type="text" class="form-control" name="lateDownTime" value="{{map.lateDownTime}}" id="lateDownTimeInput"
... ... @@ -333,10 +390,11 @@
333 390 </div>
334 391 <!-- 表单分组组件 form-group END -->
335 392  
  393 +
336 394 <!-- 表单分组组件 form-group START -->
337 395 <div class="form-group">
338 396 <!-- 低谷上行时间 START -->
339   - <div class="col-md-4">
  397 + <div class="col-md-6">
340 398 <label class="control-label col-md-5">低谷上行时间&nbsp;&nbsp;&nbsp;:</label>
341 399 <div class="col-md-5">
342 400 <input type="text" class="form-control" name="troughUpTime" value="{{map.troughUpTime}}" id="troughUpTimeInput"
... ... @@ -345,7 +403,7 @@
345 403 </div>
346 404 <!-- 低谷上行时间 END -->
347 405 <!-- 低谷下行时间 START -->
348   - <div class="col-md-4">
  406 + <div class="col-md-6">
349 407 <label class="control-label col-md-5">低谷下行时间&nbsp;&nbsp;&nbsp;:</label>
350 408 <div class="col-md-5">
351 409 <input type="text" class="form-control" name="troughDownTime" value="{{map.troughDownTime}}" id="troughDownTimeInput"
... ... @@ -353,8 +411,14 @@
353 411 </div>
354 412 </div>
355 413 <!-- 低谷下行时间 END -->
  414 +
  415 +</div>
  416 +<!-- 表单分组组件 form-group END -->
  417 +
  418 +<!-- 表单分组组件 form-group START -->
  419 +<div class="form-group">
356 420 <!-- 区间上行时间 START -->
357   - <div class="col-md-4">
  421 + <div class="col-md-6">
358 422 <label class="control-label col-md-5">区间上行时间&nbsp;&nbsp;&nbsp;:</label>
359 423 <div class="col-md-5">
360 424 <input type="text" class="form-control" name="qjUpTime" id="qjUpTimeInput"
... ... @@ -362,13 +426,8 @@
362 426 </div>
363 427 </div>
364 428 <!-- 区间上行时间 END -->
365   -</div>
366   -<!-- 表单分组组件 form-group END -->
367   -
368   -<!-- 表单分组组件 form-group START -->
369   -<div class="form-group">
370 429 <!-- 区间下行时间 START -->
371   - <div class="col-md-4">
  430 + <div class="col-md-6">
372 431 <label class="control-label col-md-5">区间下行时间&nbsp;&nbsp;&nbsp;:</label>
373 432 <div class="col-md-5">
374 433 <input type="text" class="form-control" name="qjDownTime" id="qjDownTimeInput"
... ... @@ -376,17 +435,13 @@
376 435 </div>
377 436 </div>
378 437 <!-- 区间下行时间 END -->
379   - <!-- 空放行驶时间 START -->
380   - <div class="col-md-4">
381   - <label class="control-label col-md-5">空放行驶时间&nbsp;&nbsp;&nbsp;:</label>
382   - <div class="col-md-5">
383   - <input type="text" class="form-control" name="kfsj" id="kfsjInput"
384   - placeholder="请输入空放行驶时间">
385   - </div>
386   - </div>
387   - <!-- 空放行驶时间 END -->
  438 +</div>
  439 +<!-- 表单分组组件 form-group END -->
  440 +
  441 +<!-- 表单分组组件 form-group START -->
  442 +<div class="form-group">
388 443 <!-- 工作餐午餐时间 START -->
389   - <div class="col-md-4">
  444 + <div class="col-md-6">
390 445 <label class="control-label col-md-5">工作餐午餐时间:</label>
391 446 <div class="col-md-5">
392 447 <input type="text" class="form-control" name="workeLunch" value="{{map.workeLunch}}" id="workeLunchInput"
... ... @@ -394,13 +449,8 @@
394 449 </div>
395 450 </div>
396 451 <!-- 工作餐午餐时间 END -->
397   -</div>
398   -<!-- 表单分组组件 form-group END -->
399   -
400   -<!-- 表单分组组件 form-group START -->
401   -<div class="form-group">
402 452 <!-- 工作餐晚餐时间 START -->
403   - <div class="col-md-4">
  453 + <div class="col-md-6">
404 454 <label class="control-label col-md-5">工作餐晚餐时间:</label>
405 455 <div class="col-md-5">
406 456 <input type="text" class="form-control" name="workeDinner" value="{{map.workeDinner}}" id="workeDinnerInput"
... ... @@ -408,8 +458,13 @@
408 458 </div>
409 459 </div>
410 460 <!-- 工作餐晚餐时间 END -->
  461 +</div>
  462 +<!-- 表单分组组件 form-group END -->
  463 +
  464 +<!-- 表单分组组件 form-group START -->
  465 +<div class="form-group">
411 466 <!-- 上行进场时间 START -->
412   - <div class="col-md-4">
  467 + <div class="col-md-6">
413 468 <label class="control-label col-md-5">上行进场时间&nbsp;&nbsp;&nbsp;:</label>
414 469 <div class="col-md-5">
415 470 <input type="text" class="form-control" name="upInTimer" value="{{map.upInTimer}}" id="upInTimerInput"
... ... @@ -418,7 +473,7 @@
418 473 </div>
419 474 <!-- 上行进场时间 END -->
420 475 <!-- 上行出场时间 START -->
421   - <div class="col-md-4">
  476 + <div class="col-md-6">
422 477 <label class="control-label col-md-5">上行出场时间&nbsp;&nbsp;&nbsp;:</label>
423 478 <div class="col-md-5">
424 479 <input type="text" class="form-control" name="upOutTimer" value="{{map.upOutTimer}}" id="upOutTimerInput"
... ... @@ -432,7 +487,7 @@
432 487 <!-- 表单分组组件 form-group START -->
433 488 <div class="form-group">
434 489 <!-- 下行进场时间 START -->
435   - <div class="col-md-4">
  490 + <div class="col-md-6">
436 491 <label class="control-label col-md-5">下行进场时间&nbsp;&nbsp;&nbsp;:</label>
437 492 <div class="col-md-5">
438 493 <input type="text" class="form-control" name="downInTimer" value="{{map.downInTimer}}" id="downInTimerInput"
... ... @@ -441,7 +496,7 @@
441 496 </div>
442 497 <!-- 下行进场时间 END -->
443 498 <!-- 下行出场时间 START -->
444   - <div class="col-md-4">
  499 + <div class="col-md-6">
445 500 <label class="control-label col-md-5">下行出场时间&nbsp;&nbsp;&nbsp;:</label>
446 501 <div class="col-md-5">
447 502 <input type="text" class="form-control" name="downOutTimer" value="{{map.downOutTimer}}" id="downOutTimerInput"
... ... @@ -449,8 +504,13 @@
449 504 </div>
450 505 </div>
451 506 <!-- 下行出场时间 END -->
  507 +</div>
  508 +<!-- 表单分组组件 form-group END -->
  509 +
  510 +<!-- 表单分组组件 form-group START -->
  511 +<div class="form-group">
452 512 <!-- 上行进场里程 START -->
453   - <div class="col-md-4">
  513 + <div class="col-md-6">
454 514 <label class="control-label col-md-5">上行进场里程&nbsp;&nbsp;&nbsp;:</label>
455 515 <div class="col-md-5">
456 516 <input type="text" class="form-control" name="upInMileage" value="{{map.upInMileage}}" id="upInlcInput"
... ... @@ -458,13 +518,8 @@
458 518 </div>
459 519 </div>
460 520 <!-- 上行进场里程 END -->
461   -</div>
462   -<!-- 表单分组组件 form-group END -->
463   -
464   -<!-- 表单分组组件 form-group START -->
465   -<div class="form-group">
466 521 <!-- 上行出场里程 START -->
467   - <div class="col-md-4">
  522 + <div class="col-md-6">
468 523 <label class="control-label col-md-5">上行出场里程&nbsp;&nbsp;&nbsp;:</label>
469 524 <div class="col-md-5">
470 525 <input type="text" class="form-control" name="upOutMileage" value="{{map.upOutMileage}}" id="upOutlcInput"
... ... @@ -472,8 +527,13 @@
472 527 </div>
473 528 </div>
474 529 <!-- 上行出场里程 END -->
  530 +</div>
  531 +<!-- 表单分组组件 form-group END -->
  532 +
  533 +<!-- 表单分组组件 form-group START -->
  534 +<div class="form-group">
475 535 <!-- 下行进场里程 START -->
476   - <div class="col-md-4">
  536 + <div class="col-md-6">
477 537 <label class="control-label col-md-5">下行进场里程&nbsp;&nbsp;&nbsp;:</label>
478 538 <div class="col-md-5">
479 539 <input type="text" class="form-control" name="downInMileage" value="{{map.downInMileage}}" id="downInlcInput"
... ... @@ -482,7 +542,7 @@
482 542 </div>
483 543 <!-- 下行进场里程 END -->
484 544 <!-- 下行出场里程 START -->
485   - <div class="col-md-4">
  545 + <div class="col-md-6">
486 546 <label class="control-label col-md-5">下行出场里程&nbsp;&nbsp;&nbsp;:</label>
487 547 <div class="col-md-5">
488 548 <input type="text" class="form-control" name="downOutMileage" value="{{map.downOutMileage}}" id="downOutlcInput"
... ... @@ -496,7 +556,7 @@
496 556 <!-- 表单分组组件 form-group START -->
497 557 <div class="form-group">
498 558 <!-- 早晚例行保养 START -->
499   - <div class="col-md-4">
  559 + <div class="col-md-6">
500 560 <label class="control-label col-md-5">早晚例行保养&nbsp;&nbsp;&nbsp;:</label>
501 561 <div class="col-md-5">
502 562 <input type="text" class="form-control" name="lb" value="{{map.lb}}" id="lbInput"
... ... @@ -722,27 +782,27 @@
722 782 </div>
723 783 </div>
724 784 <!-- 下行停站间隙(* 必填项) END -->
725   - <!-- 最大停站间隙(* 必填项) START -->
  785 + <!-- 低谷停站间隙(* 必填项) START -->
726 786 <div class="col-md-4">
727   - <label class="control-label col-md-5"> 最大停站间隙&nbsp;&nbsp;&nbsp;: </label>
  787 + <label class="control-label col-md-5"> 低谷停站间隙&nbsp;&nbsp;&nbsp;: </label>
728 788 <div class="col-md-4">
729 789 <p class="form-control-static" data-display="maxstopTime"> </p>
730 790 </div>
731 791 </div>
732   - <!-- 最大停站间隙(* 必填项) END -->
  792 + <!-- 低谷停站间隙(* 必填项) END -->
733 793 </div>
734 794 <!-- 表单分组组件 form-group END -->
735 795  
736 796 <!-- 表单分组组件 form-group START -->
737 797 <div class="form-group">
738   - <!-- 最小停站间隙(* 必填项) START -->
  798 + <!-- 高峰停站间隙(* 必填项) START -->
739 799 <div class="col-md-4">
740   - <label class="control-label col-md-5"> 最小停站间隙&nbsp;&nbsp;&nbsp;: </label>
  800 + <label class="control-label col-md-5"> 高峰停站间隙&nbsp;&nbsp;&nbsp;: </label>
741 801 <div class="col-md-4">
742 802 <p class="form-control-static" data-display="mixstopTime"> </p>
743 803 </div>
744 804 </div>
745   - <!-- 最小停站间隙(* 必填项) END -->
  805 + <!-- 高峰停站间隙(* 必填项) END -->
746 806 <!-- 停车场 START -->
747 807 <div class="col-md-4">
748 808 <label class="control-label col-md-5">停车场&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:</label>
... ...
src/main/resources/static/pages/report/sheet/list.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title" style="margin-left: 20px">
  21 + <button>数据导出</button>
  22 + </div>
  23 +</div>
  24 +
  25 +<div class="row" id="sheetList">
  26 + <div class="col-md-12">
  27 + <div class="portlet light porttlet-fit bordered">
  28 + <div class="portlet-body">
  29 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 600px">
  30 + <table class="table table-bordered table-hover table-checkable" id="forms_1">
  31 + <thead>
  32 + <tr>
  33 + <td></td>
  34 + <td>日期</td>
  35 + <td>线路</td>
  36 + <td>站点</td>
  37 + <td>计划时间</td>
  38 + <td>实际时间</td>
  39 + <td>是否准点</td>
  40 + </tr>
  41 + </thead>
  42 +
  43 + <tbody >
  44 +
  45 + </tbody>
  46 + </table>
  47 + </div>
  48 + </div>
  49 + </div>
  50 + </div>
  51 +</div>
  52 +
  53 +<script>
  54 + $(function(){
  55 + // 关闭左侧栏
  56 + if (!$('body').hasClass('page-sidebar-closed'))
  57 + $('.menu-toggler.sidebar-toggler').click();
  58 +
  59 + $("#sheetList").on('init', function (e, id) {
  60 + $get('/sheet/sheetList',{id:id},function(result){
  61 + var sheetList_1 = template('sheetList_1',{list:result});
  62 + $('#forms_1 tbody').html(sheetList_1);
  63 + });
  64 + })
  65 + /* $("#query").on('click',function(){
  66 + var line = $("#line").val();
  67 + var date = $("#date").val();
  68 + var fgs=$('#fgsdm').val();
  69 + var gs=$('#gsdm').val();
  70 + $get('/sheet/countList',{line:line,date:date,gs:gs,fgs:fgs},function(result){
  71 + var sheetList = template('sheetList',{list:result});
  72 + $('#forms tbody').html(sheetList);
  73 + $('.btn-sheetList').on('click', openSheetList);
  74 + });
  75 + }); */
  76 +
  77 +
  78 + });
  79 +</script>
  80 +<script type="text/html" id="sheetList_1">
  81 + {{each list as obj i}}
  82 + <tr {{if obj.sfzd!="Y"}}style="color: red" {{/if}}>
  83 + <td>{{i}}</td>
  84 + <td>{{obj.date}}</td>
  85 + <td>{{obj.line}}</td>
  86 + <td>{{obj.zdname}}</td>
  87 + <td>{{obj.jhsj}}</td>
  88 + <td>{{obj.sjsj}}</td>
  89 + <td>
  90 + {{if obj.sfzd=="Y"}}准点{{else}}不准点{{/if}}
  91 + </td>
  92 + </tr>
  93 + {{/each}}
  94 + {{if list.length == 0}}
  95 + <tr>
  96 + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
  97 + </tr>
  98 + {{/if}}
  99 +</script>
0 100 \ No newline at end of file
... ...
src/main/resources/static/pages/report/sheet/sheetList.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title">
  21 + <h1>发车准点率</h1>
  22 + </div>
  23 +</div>
  24 +
  25 +<div class="row">
  26 + <div class="col-md-12">
  27 + <div class="portlet light porttlet-fit bordered">
  28 + <div class="portlet-title">
  29 + <form class="form-inline" action="">
  30 + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 24px;" id="fgsdmDiv">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select>
  37 + </div>
  38 + <div style="display: inline-block;margin-left: 15px;">
  39 + <span class="item-label" style="width: 80px;">线路: </span>
  40 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  41 + </div>
  42 + <div style="display: inline-block;">
  43 + <span class="item-label" style="width: 80px;">时间: </span>
  44 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  45 + </div>
  46 +
  47 + <div class="form-group">
  48 + <input class="btn btn-default" type="button" id="query" value="查询"/>
  49 +<!-- <input class="btn btn-default" type="button" id="export" value="导出"/> -->
  50 + </div>
  51 + </form>
  52 + </div>
  53 + <div class="portlet-body">
  54 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  55 + <table class="table table-bordered table-hover table-checkable" id="forms">
  56 + <thead>
  57 + <tr>
  58 + <td>公司</td>
  59 + <td>分公司</td>
  60 + <td>线路</td>
  61 + <td>班次数</td>
  62 + <td>准点班次数</td>
  63 + <td>准点率</td>
  64 + <td>查看</td>
  65 + </tr>
  66 + </thead>
  67 +
  68 + <tbody >
  69 +
  70 + </tbody>
  71 + </table>
  72 + </div>
  73 + </div>
  74 + </div>
  75 + </div>
  76 +</div>
  77 +
  78 +<script>
  79 + $(function(){
  80 + // 关闭左侧栏
  81 + if (!$('body').hasClass('page-sidebar-closed'))
  82 + $('.menu-toggler.sidebar-toggler').click();
  83 +
  84 + $("#date").datetimepicker({
  85 + format : 'YYYY-MM-DD',
  86 + locale : 'zh-cn'
  87 + });
  88 + var d = new Date();
  89 + var year = d.getFullYear();
  90 + var month = d.getMonth() + 1;
  91 + var day = d.getDate();
  92 + if(day < 10)
  93 + day = "0"+day;
  94 + if(month > 9){
  95 + $("#date").val(year + "-" + month + "-" + day);
  96 + } else {
  97 + $("#date").val(year + "-0" + month + "-" + day);
  98 + }
  99 +
  100 + var fage=false;
  101 + var obj = [];
  102 + var xlList;
  103 + $.get('/report/lineList',function(result){
  104 + xlList=result;
  105 +
  106 + $.get('/user/companyData', function(result){
  107 + obj = result;
  108 + console.log(obj);
  109 + var options = '';
  110 + for(var i = 0; i < obj.length; i++){
  111 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  112 + }
  113 +
  114 + if(obj.length ==0){
  115 + $("#gsdmDiv").css('display','none');
  116 + }else if(obj.length ==1){
  117 + $("#gsdmDiv").css('display','none');
  118 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  119 + $('#fgsdmDiv').css('display','none');
  120 + }
  121 + $('#gsdm').html(options);
  122 +
  123 + updateCompany();
  124 + });
  125 + });
  126 +
  127 + $("#gsdm").on("change",updateCompany);
  128 + function updateCompany(){
  129 + var company = $('#gsdm').val();
  130 + var options = '';
  131 + for(var i = 0; i < obj.length; i++){
  132 + if(obj[i].companyCode == company){
  133 + var children = obj[i].children;
  134 + for(var j = 0; j < children.length; j++){
  135 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  136 + }
  137 + }
  138 + }
  139 + $('#fgsdm').html(options);
  140 + initXl();
  141 + }
  142 +
  143 +
  144 +
  145 +
  146 + $("#fgsdm").on("change",initXl);
  147 + function initXl(){
  148 + var data=[];
  149 + if(fage){
  150 + $("#line").select2("destroy").html('');
  151 + }
  152 + data.push({id: " ", text: "请选择"});
  153 + var fgs=$('#fgsdm').val();
  154 + var gs=$('#gsdm').val();
  155 + for(var i=0;i<xlList.length;i++){
  156 + if(gs!=""){
  157 + if(fgs!=""){
  158 + if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){
  159 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  160 + }
  161 + }else{
  162 + if(xlList[i]["gsbm"]==gs){
  163 + data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]});
  164 + }
  165 + }
  166 + }
  167 + }
  168 + initPinYinSelect2('#line',data,'');
  169 + fage=true;
  170 + }
  171 + //查询
  172 + $("#query").on('click',function(){
  173 + var line = $("#line").val();
  174 + var date = $("#date").val();
  175 + var fgs=$('#fgsdm').val();
  176 + var gs=$('#gsdm').val();
  177 + $get('/sheet/countList',{line:line,date:date,gs:gs,fgs:fgs},function(result){
  178 + var sheetList = template('sheetList',{list:result});
  179 + $('#forms tbody').html(sheetList);
  180 + $('.btn-sheetList').on('click', openSheetList);
  181 + });
  182 +// $post('/sheet/saveListSheet',function(result){
  183 +// });
  184 + });
  185 +
  186 + function openSheetList(){
  187 + var id = $(this).data('id');
  188 + $.get('/pages/report/sheet/list.html', function (content) {
  189 + layer.open({
  190 + type: 1,
  191 + area: ['800px', '600px'],
  192 + content: content,
  193 + title: '线路准点率详细',
  194 + shift: 5,
  195 + scrollbar: false,
  196 + success: function () {
  197 + $('#sheetList').trigger('init', id);
  198 + }
  199 + });
  200 + });
  201 + }
  202 + });
  203 +</script>
  204 +<script type="text/html" id="sheetList">
  205 + {{each list as obj i}}
  206 + <tr>
  207 + <td>{{obj.gs}}</td>
  208 + <td>{{obj.fgs}}</td>
  209 + <td>{{obj.line}}</td>
  210 + <td>{{obj.bcs}}</td>
  211 + <td>{{obj.zdbcs}}</td>
  212 + <td>{{obj.zdlv}}</td>
  213 + <td>
  214 + <button type="button" class="btn btn-sm blue btn-sheetList"
  215 + data-id="{{obj.id}}">查看</button>
  216 + </td>
  217 + </tr>
  218 + {{/each}}
  219 + {{if list.length == 0}}
  220 + <tr>
  221 + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
  222 + </tr>
  223 + {{/if}}
  224 +</script>
0 225 \ No newline at end of file
... ...
src/main/resources/static/pages/report/timetable/timetable.html
... ... @@ -45,7 +45,7 @@
45 45 </div>
46 46 <div class="form-group">
47 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 49 </div>
50 50 </form>
51 51 </div>
... ... @@ -165,18 +165,19 @@
165 165 <div class="col-md-6" >
166 166 <table class="table table-bordered table-checkable" id="formsTime5">
167 167 <tr>
168   - <td colspan="6">全日分组行驶时间(区间除外)</td>
  168 + <td colspan="7">全日分组行驶时间(区间除外)</td>
169 169 </tr>
170 170 <tr>
171 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 177 </tr>
177 178 <tr>
178 179 <td>上行</td>
179   - <td>下行</td>
  180 + <td style="text-align:center;">下行</td>
180 181 </tr>
181 182 <tbody class="tbody_time_5">
182 183  
... ... @@ -260,6 +261,9 @@
260 261 }
261 262 initPinYinSelect2('#line',data,'');
262 263 fage=true;
  264 +
  265 + line = data[0].id;
  266 + updateTtinfo();
263 267 }
264 268  
265 269  
... ... @@ -270,7 +274,7 @@
270 274 flag = 1;
271 275 var treeData = [];
272 276 var params = {};
273   - params['line'] = $("#line").val();
  277 + params['line'] = line;
274 278 $get('/report/getTtinfo', params, function(result){
275 279 treeData = createTreeData(result);
276 280 var options = '<option value="">请选择...</option>';
... ... @@ -283,12 +287,15 @@
283 287 }
284 288  
285 289 $("#line").on("change", function(){
  290 + line = $("#line").val();
286 291 updateTtinfo();
287 292 })
288 293  
  294 + var line = $("#line").val();
  295 +
289 296 //查询
290 297 $("#query").on('click',function(){
291   - var line = $("#line").val();
  298 + line = $("#line").val();
292 299 var xlName = $("#select2-line-container").html();
293 300 var ttinfo = $("#ttinfo").val();
294 301 if(line==null || line ==""){
... ... @@ -313,8 +320,8 @@
313 320 });
314 321  
315 322 $.get('/report/tbodyTime4',{line:line,ttinfo:ttinfo},function(result){
316   - $("#skb_sxzd").html(result[0].sxzm);
317   - $("#skb_xxzd").html(result[0].xxzm);
  323 + $("#skb_sxzd").html(result[0].sxqdz);
  324 + $("#skb_xxzd").html(result[0].xxqdz);
318 325 var tbodyTime4 = template('tbodyTime4',{list:result});
319 326 $('#formsTime4 .tbody_time_4').html(tbodyTime4);
320 327 });
... ... @@ -377,11 +384,11 @@
377 384 {{each list as result i}}
378 385  
379 386 <tr>
380   - <td align="center">{{result.sxzm}}</td>
381   - <td align="center">{{result.sxsj}}</td>
  387 + <td align="center">{{result.sxqdz}}</td>
  388 + <td align="center">{{result.sxfcsj}}</td>
382 389 <td align="center">{{result.sxbc}}</td>
383   - <td align="center">{{result.xxzm}}</td>
384   - <td align="center">{{result.xxsj}}</td>
  390 + <td align="center">{{result.xxqdz}}</td>
  391 + <td align="center">{{result.xxfcsj}}</td>
385 392 <td align="center">{{result.xxbc}}</td>
386 393 </tr>
387 394 {{/each}}
... ... @@ -399,13 +406,14 @@
399 406 <td align="center">{{result.sxsj}}</td>
400 407 <td align="center">{{result.xxsj}}</td>
401 408 <td align="center">{{result.fqsj}}</td>
  409 + <td align="center">{{result.tssj}}</td>
402 410 <td align="center">{{result.cjqj}}</td>
403 411 <td align="center">{{result.pjcj}}</td>
404 412 </tr>
405 413 {{/each}}
406 414 {{if list.length == 0}}
407 415 <tr>
408   - <td colspan="6"><h6 class="muted">没有找到相关数据</h6></td>
  416 + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
409 417 </tr>
410 418 {{/if}}
411 419 </script>
... ...
src/main/resources/static/real_control_v2/assets/plugins/layer3.0.3/layer.js
1   -/**
2   -
3   - @Name:layer v3.0.3 Web弹层组件
4   - @Author:贤心
5   - @Site:http://layer.layui.com
6   - @License:MIT
7   -
8   - */
9   -
10   -;!function(window, undefined){
11   -"use strict";
12   -
13   -var isLayui = window.layui && layui.define, $, win, ready = {
14   - getPath: function(){
15   - var js = document.scripts, script = js[js.length - 1], jsPath = script.src;
16   - if(script.getAttribute('merge')) return;
17   - return jsPath.substring(0, jsPath.lastIndexOf("/") + 1);
18   - }(),
19   -
20   - config: {}, end: {}, minIndex: 0, minLeft: [],
21   - btn: ['&#x786E;&#x5B9A;', '&#x53D6;&#x6D88;'],
22   -
23   - //五种原始层模式
24   - type: ['dialog', 'page', 'iframe', 'loading', 'tips']
25   -};
26   -
27   -//默认内置方法。
28   -var layer = {
29   - v: '3.0.3',
30   - ie: function(){ //ie版本
31   - var agent = navigator.userAgent.toLowerCase();
32   - return (!!window.ActiveXObject || "ActiveXObject" in window) ? (
33   - (agent.match(/msie\s(\d+)/) || [])[1] || '11' //由于ie11并没有msie的标识
34   - ) : false;
35   - }(),
36   - index: (window.layer && window.layer.v) ? 100000 : 0,
37   - path: ready.getPath,
38   - config: function(options, fn){
39   - options = options || {};
40   - layer.cache = ready.config = $.extend({}, ready.config, options);
41   - layer.path = ready.config.path || layer.path;
42   - typeof options.extend === 'string' && (options.extend = [options.extend]);
43   -
44   - if(ready.config.path) layer.ready();
45   -
46   - if(!options.extend) return this;
47   -
48   - isLayui
49   - ? layui.addcss('modules/layer/' + options.extend)
50   - : layer.link('skin/' + options.extend);
51   -
52   - return this;
53   - },
54   -
55   - //载入CSS配件
56   - link: function(href, fn, cssname){
57   -
58   - //未设置路径,则不主动加载css
59   - if(!layer.path) return;
60   -
61   - var head = $('head')[0], link = document.createElement('link');
62   - if(typeof fn === 'string') cssname = fn;
63   - var app = (cssname || href).replace(/\.|\//g, '');
64   - var id = 'layuicss-'+app, timeout = 0;
65   -
66   - link.rel = 'stylesheet';
67   - link.href = layer.path + href;
68   - link.id = id;
69   -
70   - if(!$('#'+ id)[0]){
71   - head.appendChild(link);
72   - }
73   -
74   - if(typeof fn !== 'function') return;
75   -
76   - //轮询css是否加载完毕
77   -/* (function poll() {
78   - if(++timeout > 8 * 1000 / 100){
79   - return window.console && console.error('layer.css: Invalid');
80   - };
81   - parseInt($('#'+id).css('width')) === 1989 ? fn() : setTimeout(poll, 100);
82   - }());*/
83   - },
84   -
85   - ready: function(callback){
86   - /*var cssname = 'skinlayercss', ver = '303';
87   - isLayui ? layui.addcss('modules/layer/default/layer.css?v='+layer.v+ver, callback, cssname)
88   - : layer.link('skin/default/layer.css?v='+layer.v+ver, callback, cssname);*/
89   - return this;
90   - },
91   -
92   - //各种快捷引用
93   - alert: function(content, options, yes){
94   - var type = typeof options === 'function';
95   - if(type) yes = options;
96   - return layer.open($.extend({
97   - content: content,
98   - yes: yes
99   - }, type ? {} : options));
100   - },
101   -
102   - confirm: function(content, options, yes, cancel){
103   - var type = typeof options === 'function';
104   - if(type){
105   - cancel = yes;
106   - yes = options;
107   - }
108   - return layer.open($.extend({
109   - content: content,
110   - btn: ready.btn,
111   - yes: yes,
112   - btn2: cancel
113   - }, type ? {} : options));
114   - },
115   -
116   - msg: function(content, options, end){ //最常用提示层
117   - var type = typeof options === 'function', rskin = ready.config.skin;
118   - var skin = (rskin ? rskin + ' ' + rskin + '-msg' : '')||'layui-layer-msg';
119   - var anim = doms.anim.length - 1;
120   - if(type) end = options;
121   - return layer.open($.extend({
122   - content: content,
123   - time: 3000,
124   - shade: false,
125   - skin: skin,
126   - title: false,
127   - closeBtn: false,
128   - btn: false,
129   - resize: false,
130   - end: end
131   - }, (type && !ready.config.skin) ? {
132   - skin: skin + ' layui-layer-hui',
133   - anim: anim
134   - } : function(){
135   - options = options || {};
136   - if(options.icon === -1 || options.icon === undefined && !ready.config.skin){
137   - options.skin = skin + ' ' + (options.skin||'layui-layer-hui');
138   - }
139   - return options;
140   - }()));
141   - },
142   -
143   - load: function(icon, options){
144   - return layer.open($.extend({
145   - type: 3,
146   - icon: icon || 0,
147   - resize: false,
148   - shade: 0.01
149   - }, options));
150   - },
151   -
152   - tips: function(content, follow, options){
153   - return layer.open($.extend({
154   - type: 4,
155   - content: [content, follow],
156   - closeBtn: false,
157   - time: 3000,
158   - shade: false,
159   - resize: false,
160   - fixed: false,
161   - maxWidth: 210
162   - }, options));
163   - }
164   -};
165   -
166   -var Class = function(setings){
167   - var that = this;
168   - that.index = ++layer.index;
169   - that.config = $.extend({}, that.config, ready.config, setings);
170   - document.body ? that.creat() : setTimeout(function(){
171   - that.creat();
172   - }, 30);
173   -};
174   -
175   -Class.pt = Class.prototype;
176   -
177   -//缓存常用字符
178   -var doms = ['layui-layer', '.layui-layer-title', '.layui-layer-main', '.layui-layer-dialog', 'layui-layer-iframe', 'layui-layer-content', 'layui-layer-btn', 'layui-layer-close'];
179   -doms.anim = ['layer-anim', 'layer-anim-01', 'layer-anim-02', 'layer-anim-03', 'layer-anim-04', 'layer-anim-05', 'layer-anim-06'];
180   -
181   -//默认配置
182   -Class.pt.config = {
183   - type: 0,
184   - shade: 0.3,
185   - fixed: true,
186   - move: doms[1],
187   - title: '&#x4FE1;&#x606F;',
188   - offset: 'auto',
189   - area: 'auto',
190   - closeBtn: 1,
191   - time: 0, //0表示不自动关闭
192   - zIndex: 19891014,
193   - maxWidth: 360,
194   - anim: 0,
195   - isOutAnim: true,
196   - icon: -1,
197   - moveType: 1,
198   - resize: true,
199   - scrollbar: true, //是否允许浏览器滚动条
200   - tips: 2
201   -};
202   -
203   -//容器
204   -Class.pt.vessel = function(conType, callback){
205   - var that = this, times = that.index, config = that.config;
206   - var zIndex = config.zIndex + times, titype = typeof config.title === 'object';
207   - var ismax = config.maxmin && (config.type === 1 || config.type === 2);
208   - var titleHTML = (config.title ? '<div class="layui-layer-title" style="'+ (titype ? config.title[1] : '') +'">'
209   - + (titype ? config.title[0] : config.title)
210   - + '</div>' : '');
211   -
212   - config.zIndex = zIndex;
213   - callback([
214   - //遮罩
215   - config.shade ? ('<div class="layui-layer-shade" id="layui-layer-shade'+ times +'" times="'+ times +'" style="'+ ('z-index:'+ (zIndex-1) +'; background-color:'+ (config.shade[1]||'#000') +'; opacity:'+ (config.shade[0]||config.shade) +'; filter:alpha(opacity='+ (config.shade[0]*100||config.shade*100) +');') +'"></div>') : '',
216   -
217   - //主体
218   - '<div class="'+ doms[0] + (' layui-layer-'+ready.type[config.type]) + (((config.type == 0 || config.type == 2) && !config.shade) ? ' layui-layer-border' : '') + ' ' + (config.skin||'') +'" id="'+ doms[0] + times +'" type="'+ ready.type[config.type] +'" times="'+ times +'" showtime="'+ config.time +'" conType="'+ (conType ? 'object' : 'string') +'" style="z-index: '+ zIndex +'; width:'+ config.area[0] + ';height:' + config.area[1] + (config.fixed ? '' : ';position:absolute;') +'">'
219   - + (conType && config.type != 2 ? '' : titleHTML)
220   - + '<div id="'+ (config.id||'') +'" class="layui-layer-content'+ ((config.type == 0 && config.icon !== -1) ? ' layui-layer-padding' :'') + (config.type == 3 ? ' layui-layer-loading'+config.icon : '') +'">'
221   - + (config.type == 0 && config.icon !== -1 ? '<i class="layui-layer-ico layui-layer-ico'+ config.icon +'"></i>' : '')
222   - + (config.type == 1 && conType ? '' : (config.content||''))
223   - + '</div>'
224   - + '<span class="layui-layer-setwin">'+ function(){
225   - var closebtn = ismax ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : '';
226   - config.closeBtn && (closebtn += '<a class="layui-layer-ico '+ doms[7] +' '+ doms[7] + (config.title ? config.closeBtn : (config.type == 4 ? '1' : '2')) +'" href="javascript:;"></a>');
227   - return closebtn;
228   - }() + '</span>'
229   - + (config.btn ? function(){
230   - var button = '';
231   - typeof config.btn === 'string' && (config.btn = [config.btn]);
232   - for(var i = 0, len = config.btn.length; i < len; i++){
233   - button += '<a class="'+ doms[6] +''+ i +'">'+ config.btn[i] +'</a>'
234   - }
235   - return '<div class="'+ doms[6] + (config.btnAlign ? (' layui-layer-btn-' + config.btnAlign) : '') +'">'+ button +'</div>'
236   - }() : '')
237   - + (config.resize ? '<span class="layui-layer-resize"></span>' : '')
238   - + '</div>'
239   - ], titleHTML, $('<div class="layui-layer-move"></div>'));
240   - return that;
241   -};
242   -
243   -//创建骨架
244   -Class.pt.creat = function(){
245   - var that = this
246   - ,config = that.config
247   - ,times = that.index, nodeIndex
248   - ,content = config.content
249   - ,conType = typeof content === 'object'
250   - ,body = $('body');
251   -
252   - if(config.id && $('#'+config.id)[0]) return;
253   -
254   - if(typeof config.area === 'string'){
255   - config.area = config.area === 'auto' ? ['', ''] : [config.area, ''];
256   - }
257   -
258   - //anim兼容旧版shift
259   - if(config.shift){
260   - config.anim = config.shift;
261   - }
262   -
263   - if(layer.ie == 6){
264   - config.fixed = false;
265   - }
266   -
267   - switch(config.type){
268   - case 0:
269   - config.btn = ('btn' in config) ? config.btn : ready.btn[0];
270   - layer.closeAll('dialog');
271   - break;
272   - case 2:
273   - var content = config.content = conType ? config.content : [config.content, 'auto'];
274   - config.content = '<iframe scrolling="'+ (config.content[1]||'auto') +'" allowtransparency="true" id="'+ doms[4] +''+ times +'" name="'+ doms[4] +''+ times +'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' + config.content[0] + '"></iframe>';
275   - break;
276   - case 3:
277   - delete config.title;
278   - delete config.closeBtn;
279   - config.icon === -1 && (config.icon === 0);
280   - layer.closeAll('loading');
281   - break;
282   - case 4:
283   - conType || (config.content = [config.content, 'body']);
284   - config.follow = config.content[1];
285   - config.content = config.content[0] + '<i class="layui-layer-TipsG"></i>';
286   - delete config.title;
287   - config.tips = typeof config.tips === 'object' ? config.tips : [config.tips, true];
288   - config.tipsMore || layer.closeAll('tips');
289   - break;
290   - }
291   -
292   - //建立容器
293   - that.vessel(conType, function(html, titleHTML, moveElem){
294   - body.append(html[0]);
295   - conType ? function(){
296   - (config.type == 2 || config.type == 4) ? function(){
297   - $('body').append(html[1]);
298   - }() : function(){
299   - if(!content.parents('.'+doms[0])[0]){
300   - content.data('display', content.css('display')).show().addClass('layui-layer-wrap').wrap(html[1]);
301   - $('#'+ doms[0] + times).find('.'+doms[5]).before(titleHTML);
302   - }
303   - }();
304   - }() : body.append(html[1]);
305   - $('.layui-layer-move')[0] || body.append(ready.moveElem = moveElem);
306   - that.layero = $('#'+ doms[0] + times);
307   - config.scrollbar || doms.html.css('overflow', 'hidden').attr('layer-full', times);
308   - }).auto(times);
309   -
310   - config.type == 2 && layer.ie == 6 && that.layero.find('iframe').attr('src', content[0]);
311   -
312   - //坐标自适应浏览器窗口尺寸
313   - config.type == 4 ? that.tips() : that.offset();
314   - if(config.fixed){
315   - win.on('resize', function(){
316   - that.offset();
317   - (/^\d+%$/.test(config.area[0]) || /^\d+%$/.test(config.area[1])) && that.auto(times);
318   - config.type == 4 && that.tips();
319   - });
320   - }
321   -
322   - config.time <= 0 || setTimeout(function(){
323   - layer.close(that.index)
324   - }, config.time);
325   - that.move().callback();
326   -
327   - //为兼容jQuery3.0的css动画影响元素尺寸计算
328   - if(doms.anim[config.anim]){
329   - that.layero.addClass(doms.anim[config.anim]);
330   - };
331   -
332   - //记录关闭动画
333   - if(config.isOutAnim){
334   - that.layero.data('isOutAnim', true);
335   - }
336   -};
337   -
338   -//自适应
339   -Class.pt.auto = function(index){
340   - var that = this, config = that.config, layero = $('#'+ doms[0] + index);
341   - if(config.area[0] === '' && config.maxWidth > 0){
342   - //为了修复IE7下一个让人难以理解的bug
343   - if(layer.ie && layer.ie < 8 && config.btn){
344   - layero.width(layero.innerWidth());
345   - }
346   - layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth);
347   - }
348   - var area = [layero.innerWidth(), layero.innerHeight()];
349   - var titHeight = layero.find(doms[1]).outerHeight() || 0;
350   - var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
351   - function setHeight(elem){
352   - elem = layero.find(elem);
353   - elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding-top'))|0));
354   - }
355   - switch(config.type){
356   - case 2:
357   - setHeight('iframe');
358   - break;
359   - default:
360   - if(config.area[1] === ''){
361   - if(config.fixed && area[1] >= win.height()){
362   - area[1] = win.height();
363   - setHeight('.'+doms[5]);
364   - }
365   - } else {
366   - setHeight('.'+doms[5]);
367   - }
368   - break;
369   - }
370   - return that;
371   -};
372   -
373   -//计算坐标
374   -Class.pt.offset = function(){
375   - var that = this, config = that.config, layero = that.layero;
376   - var area = [layero.outerWidth(), layero.outerHeight()];
377   - var type = typeof config.offset === 'object';
378   - that.offsetTop = (win.height() - area[1])/2;
379   - that.offsetLeft = (win.width() - area[0])/2;
380   -
381   - if(type){
382   - that.offsetTop = config.offset[0];
383   - that.offsetLeft = config.offset[1]||that.offsetLeft;
384   - } else if(config.offset !== 'auto'){
385   -
386   - if(config.offset === 't'){ //上
387   - that.offsetTop = 0;
388   - } else if(config.offset === 'r'){ //右
389   - that.offsetLeft = win.width() - area[0];
390   - } else if(config.offset === 'b'){ //下
391   - that.offsetTop = win.height() - area[1];
392   - } else if(config.offset === 'l'){ //左
393   - that.offsetLeft = 0;
394   - } else if(config.offset === 'lt'){ //左上角
395   - that.offsetTop = 0;
396   - that.offsetLeft = 0;
397   - } else if(config.offset === 'lb'){ //左下角
398   - that.offsetTop = win.height() - area[1];
399   - that.offsetLeft = 0;
400   - } else if(config.offset === 'rt'){ //右上角
401   - that.offsetTop = 0;
402   - that.offsetLeft = win.width() - area[0];
403   - } else if(config.offset === 'rb'){ //右下角
404   - that.offsetTop = win.height() - area[1];
405   - that.offsetLeft = win.width() - area[0];
406   - } else {
407   - that.offsetTop = config.offset;
408   - }
409   -
410   - }
411   -
412   - if(!config.fixed){
413   - that.offsetTop = /%$/.test(that.offsetTop) ?
414   - win.height()*parseFloat(that.offsetTop)/100
415   - : parseFloat(that.offsetTop);
416   - that.offsetLeft = /%$/.test(that.offsetLeft) ?
417   - win.width()*parseFloat(that.offsetLeft)/100
418   - : parseFloat(that.offsetLeft);
419   - that.offsetTop += win.scrollTop();
420   - that.offsetLeft += win.scrollLeft();
421   - }
422   -
423   - if(layero.attr('minLeft')){
424   - that.offsetTop = win.height() - (layero.find(doms[1]).outerHeight() || 0);
425   - that.offsetLeft = layero.css('left');
426   - }
427   -
428   - layero.css({top: that.offsetTop, left: that.offsetLeft});
429   -};
430   -
431   -//Tips
432   -Class.pt.tips = function(){
433   - var that = this, config = that.config, layero = that.layero;
434   - var layArea = [layero.outerWidth(), layero.outerHeight()], follow = $(config.follow);
435   - if(!follow[0]) follow = $('body');
436   - var goal = {
437   - width: follow.outerWidth(),
438   - height: follow.outerHeight(),
439   - top: follow.offset().top,
440   - left: follow.offset().left
441   - }, tipsG = layero.find('.layui-layer-TipsG');
442   -
443   - var guide = config.tips[0];
444   - config.tips[1] || tipsG.remove();
445   -
446   - goal.autoLeft = function(){
447   - if(goal.left + layArea[0] - win.width() > 0){
448   - goal.tipLeft = goal.left + goal.width - layArea[0];
449   - tipsG.css({right: 12, left: 'auto'});
450   - } else {
451   - goal.tipLeft = goal.left;
452   - };
453   - };
454   -
455   - //辨别tips的方位
456   - goal.where = [function(){ //上
457   - goal.autoLeft();
458   - goal.tipTop = goal.top - layArea[1] - 10;
459   - tipsG.removeClass('layui-layer-TipsB').addClass('layui-layer-TipsT').css('border-right-color', config.tips[1]);
460   - }, function(){ //右
461   - goal.tipLeft = goal.left + goal.width + 10;
462   - goal.tipTop = goal.top;
463   - tipsG.removeClass('layui-layer-TipsL').addClass('layui-layer-TipsR').css('border-bottom-color', config.tips[1]);
464   - }, function(){ //下
465   - goal.autoLeft();
466   - goal.tipTop = goal.top + goal.height + 10;
467   - tipsG.removeClass('layui-layer-TipsT').addClass('layui-layer-TipsB').css('border-right-color', config.tips[1]);
468   - }, function(){ //左
469   - goal.tipLeft = goal.left - layArea[0] - 10;
470   - goal.tipTop = goal.top;
471   - tipsG.removeClass('layui-layer-TipsR').addClass('layui-layer-TipsL').css('border-bottom-color', config.tips[1]);
472   - }];
473   - goal.where[guide-1]();
474   -
475   - /* 8*2为小三角形占据的空间 */
476   - if(guide === 1){
477   - goal.top - (win.scrollTop() + layArea[1] + 8*2) < 0 && goal.where[2]();
478   - } else if(guide === 2){
479   - win.width() - (goal.left + goal.width + layArea[0] + 8*2) > 0 || goal.where[3]()
480   - } else if(guide === 3){
481   - (goal.top - win.scrollTop() + goal.height + layArea[1] + 8*2) - win.height() > 0 && goal.where[0]();
482   - } else if(guide === 4){
483   - layArea[0] + 8*2 - goal.left > 0 && goal.where[1]()
484   - }
485   -
486   - layero.find('.'+doms[5]).css({
487   - 'background-color': config.tips[1],
488   - 'padding-right': (config.closeBtn ? '30px' : '')
489   - });
490   - layero.css({
491   - left: goal.tipLeft - (config.fixed ? win.scrollLeft() : 0),
492   - top: goal.tipTop - (config.fixed ? win.scrollTop() : 0)
493   - });
494   -}
495   -
496   -//拖拽层
497   -Class.pt.move = function(){
498   - var that = this
499   - ,config = that.config
500   - ,_DOC = $(document)
501   - ,layero = that.layero
502   - ,moveElem = layero.find(config.move)
503   - ,resizeElem = layero.find('.layui-layer-resize')
504   - ,dict = {};
505   -
506   - if(config.move){
507   - moveElem.css('cursor', 'move');
508   - }
509   -
510   - moveElem.on('mousedown', function(e){
511   - e.preventDefault();
512   - if(config.move){
513   - dict.moveStart = true;
514   - dict.offset = [
515   - e.clientX - parseFloat(layero.css('left'))
516   - ,e.clientY - parseFloat(layero.css('top'))
517   - ];
518   - ready.moveElem.css('cursor', 'move').show();
519   - }
520   - });
521   -
522   - resizeElem.on('mousedown', function(e){
523   - e.preventDefault();
524   - dict.resizeStart = true;
525   - dict.offset = [e.clientX, e.clientY];
526   - dict.area = [
527   - layero.outerWidth()
528   - ,layero.outerHeight()
529   - ];
530   - ready.moveElem.css('cursor', 'se-resize').show();
531   - });
532   -
533   - _DOC.on('mousemove', function(e){
534   -
535   - //拖拽移动
536   - if(dict.moveStart){
537   - var X = e.clientX - dict.offset[0]
538   - ,Y = e.clientY - dict.offset[1]
539   - ,fixed = layero.css('position') === 'fixed';
540   -
541   - e.preventDefault();
542   -
543   - dict.stX = fixed ? 0 : win.scrollLeft();
544   - dict.stY = fixed ? 0 : win.scrollTop();
545   -
546   - //控制元素不被拖出窗口外
547   - if(!config.moveOut){
548   - var setRig = win.width() - layero.outerWidth() + dict.stX
549   - ,setBot = win.height() - layero.outerHeight() + dict.stY;
550   - X < dict.stX && (X = dict.stX);
551   - X > setRig && (X = setRig);
552   - Y < dict.stY && (Y = dict.stY);
553   - Y > setBot && (Y = setBot);
554   - }
555   -
556   - layero.css({
557   - left: X
558   - ,top: Y
559   - });
560   - }
561   -
562   - //Resize
563   - if(config.resize && dict.resizeStart){
564   - var X = e.clientX - dict.offset[0]
565   - ,Y = e.clientY - dict.offset[1];
566   -
567   - e.preventDefault();
568   -
569   - layer.style(that.index, {
570   - width: dict.area[0] + X
571   - ,height: dict.area[1] + Y
572   - })
573   - dict.isResize = true;
574   - config.resizing && config.resizing(layero);
575   - }
576   - }).on('mouseup', function(e){
577   - if(dict.moveStart){
578   - delete dict.moveStart;
579   - ready.moveElem.hide();
580   - config.moveEnd && config.moveEnd(layero);
581   - }
582   - if(dict.resizeStart){
583   - delete dict.resizeStart;
584   - ready.moveElem.hide();
585   - }
586   - });
587   -
588   - return that;
589   -};
590   -
591   -Class.pt.callback = function(){
592   - var that = this, layero = that.layero, config = that.config;
593   - that.openLayer();
594   - if(config.success){
595   - if(config.type == 2){
596   - layero.find('iframe').on('load', function(){
597   - config.success(layero, that.index);
598   - });
599   - } else {
600   - config.success(layero, that.index);
601   - }
602   - }
603   - layer.ie == 6 && that.IE6(layero);
604   -
605   - //按钮
606   - layero.find('.'+ doms[6]).children('a').on('click', function(){
607   - var index = $(this).index();
608   - if(index === 0){
609   - if(config.yes){
610   - config.yes(that.index, layero)
611   - } else if(config['btn1']){
612   - config['btn1'](that.index, layero)
613   - } else {
614   - layer.close(that.index);
615   - }
616   - } else {
617   - var close = config['btn'+(index+1)] && config['btn'+(index+1)](that.index, layero);
618   - close === false || layer.close(that.index);
619   - }
620   - });
621   -
622   - //取消
623   - function cancel(){
624   - var close = config.cancel && config.cancel(that.index, layero);
625   - close === false || layer.close(that.index);
626   - }
627   -
628   - //右上角关闭回调
629   - layero.find('.'+ doms[7]).on('click', cancel);
630   -
631   - //点遮罩关闭
632   - if(config.shadeClose){
633   - $('#layui-layer-shade'+ that.index).on('click', function(){
634   - layer.close(that.index);
635   - });
636   - }
637   -
638   - //最小化
639   - layero.find('.layui-layer-min').on('click', function(){
640   - var min = config.min && config.min(layero);
641   - min === false || layer.min(that.index, config);
642   - });
643   -
644   - //全屏/还原
645   - layero.find('.layui-layer-max').on('click', function(){
646   - if($(this).hasClass('layui-layer-maxmin')){
647   - layer.restore(that.index);
648   - config.restore && config.restore(layero);
649   - } else {
650   - layer.full(that.index, config);
651   - setTimeout(function(){
652   - config.full && config.full(layero);
653   - }, 100);
654   - }
655   - });
656   -
657   - config.end && (ready.end[that.index] = config.end);
658   -};
659   -
660   -//for ie6 恢复select
661   -ready.reselect = function(){
662   - $.each($('select'), function(index , value){
663   - var sthis = $(this);
664   - if(!sthis.parents('.'+doms[0])[0]){
665   - (sthis.attr('layer') == 1 && $('.'+doms[0]).length < 1) && sthis.removeAttr('layer').show();
666   - }
667   - sthis = null;
668   - });
669   -};
670   -
671   -Class.pt.IE6 = function(layero){
672   - //隐藏select
673   - $('select').each(function(index , value){
674   - var sthis = $(this);
675   - if(!sthis.parents('.'+doms[0])[0]){
676   - sthis.css('display') === 'none' || sthis.attr({'layer' : '1'}).hide();
677   - }
678   - sthis = null;
679   - });
680   -};
681   -
682   -//需依赖原型的对外方法
683   -Class.pt.openLayer = function(){
684   - var that = this;
685   -
686   - //置顶当前窗口
687   - layer.zIndex = that.config.zIndex;
688   - layer.setTop = function(layero){
689   - var setZindex = function(){
690   - layer.zIndex++;
691   - layero.css('z-index', layer.zIndex + 1);
692   - };
693   - layer.zIndex = parseInt(layero[0].style.zIndex);
694   - layero.on('mousedown', setZindex);
695   - return layer.zIndex;
696   - };
697   -};
698   -
699   -ready.record = function(layero){
700   - var area = [
701   - layero.width(),
702   - layero.height(),
703   - layero.position().top,
704   - layero.position().left + parseFloat(layero.css('margin-left'))
705   - ];
706   - layero.find('.layui-layer-max').addClass('layui-layer-maxmin');
707   - layero.attr({area: area});
708   -};
709   -
710   -ready.rescollbar = function(index){
711   - if(doms.html.attr('layer-full') == index){
712   - if(doms.html[0].style.removeProperty){
713   - doms.html[0].style.removeProperty('overflow');
714   - } else {
715   - doms.html[0].style.removeAttribute('overflow');
716   - }
717   - doms.html.removeAttr('layer-full');
718   - }
719   -};
720   -
721   -/** 内置成员 */
722   -
723   -window.layer = layer;
724   -
725   -//获取子iframe的DOM
726   -layer.getChildFrame = function(selector, index){
727   - index = index || $('.'+doms[4]).attr('times');
728   - return $('#'+ doms[0] + index).find('iframe').contents().find(selector);
729   -};
730   -
731   -//得到当前iframe层的索引,子iframe时使用
732   -layer.getFrameIndex = function(name){
733   - return $('#'+ name).parents('.'+doms[4]).attr('times');
734   -};
735   -
736   -//iframe层自适应宽高
737   -layer.iframeAuto = function(index){
738   - if(!index) return;
739   - var heg = layer.getChildFrame('html', index).outerHeight();
740   - var layero = $('#'+ doms[0] + index);
741   - var titHeight = layero.find(doms[1]).outerHeight() || 0;
742   - var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
743   - layero.css({height: heg + titHeight + btnHeight});
744   - layero.find('iframe').css({height: heg});
745   -};
746   -
747   -//重置iframe url
748   -layer.iframeSrc = function(index, url){
749   - $('#'+ doms[0] + index).find('iframe').attr('src', url);
750   -};
751   -
752   -//设定层的样式
753   -layer.style = function(index, options, limit){
754   - var layero = $('#'+ doms[0] + index)
755   - ,contElem = layero.find('.layui-layer-content')
756   - ,type = layero.attr('type')
757   - ,titHeight = layero.find(doms[1]).outerHeight() || 0
758   - ,btnHeight = layero.find('.'+doms[6]).outerHeight() || 0
759   - ,minLeft = layero.attr('minLeft');
760   -
761   - if(type === ready.type[3] || type === ready.type[4]){
762   - return;
763   - }
764   -
765   - if(!limit){
766   - if(parseFloat(options.width) <= 260){
767   - options.width = 260;
768   - };
769   -
770   - if(parseFloat(options.height) - titHeight - btnHeight <= 64){
771   - options.height = 64 + titHeight + btnHeight;
772   - };
773   - }
774   -
775   - layero.css(options);
776   - btnHeight = layero.find('.'+doms[6]).outerHeight();
777   -
778   - if(type === ready.type[2]){
779   - layero.find('iframe').css({
780   - height: parseFloat(options.height) - titHeight - btnHeight
781   - });
782   - } else {
783   - contElem.css({
784   - height: parseFloat(options.height) - titHeight - btnHeight
785   - - parseFloat(contElem.css('padding-top'))
786   - - parseFloat(contElem.css('padding-bottom'))
787   - })
788   - }
789   -};
790   -
791   -//最小化
792   -layer.min = function(index, options){
793   - var layero = $('#'+ doms[0] + index)
794   - ,titHeight = layero.find(doms[1]).outerHeight() || 0
795   - ,left = layero.attr('minLeft') || (181*ready.minIndex)+'px'
796   - ,position = layero.css('position');
797   -
798   - ready.record(layero);
799   -
800   - if(ready.minLeft[0]){
801   - left = ready.minLeft[0];
802   - ready.minLeft.shift();
803   - }
804   -
805   - layero.attr('position', position);
806   -
807   - layer.style(index, {
808   - width: 180
809   - ,height: titHeight
810   - ,left: left
811   - ,top: win.height() - titHeight
812   - ,position: 'fixed'
813   - ,overflow: 'hidden'
814   - }, true);
815   -
816   - layero.find('.layui-layer-min').hide();
817   - layero.attr('type') === 'page' && layero.find(doms[4]).hide();
818   - ready.rescollbar(index);
819   -
820   - if(!layero.attr('minLeft')){
821   - ready.minIndex++;
822   - }
823   - layero.attr('minLeft', left);
824   -};
825   -
826   -//还原
827   -layer.restore = function(index){
828   - var layero = $('#'+ doms[0] + index), area = layero.attr('area').split(',');
829   - var type = layero.attr('type');
830   - layer.style(index, {
831   - width: parseFloat(area[0]),
832   - height: parseFloat(area[1]),
833   - top: parseFloat(area[2]),
834   - left: parseFloat(area[3]),
835   - position: layero.attr('position'),
836   - overflow: 'visible'
837   - }, true);
838   - layero.find('.layui-layer-max').removeClass('layui-layer-maxmin');
839   - layero.find('.layui-layer-min').show();
840   - layero.attr('type') === 'page' && layero.find(doms[4]).show();
841   - ready.rescollbar(index);
842   -};
843   -
844   -//全屏
845   -layer.full = function(index){
846   - var layero = $('#'+ doms[0] + index), timer;
847   - ready.record(layero);
848   - if(!doms.html.attr('layer-full')){
849   - doms.html.css('overflow','hidden').attr('layer-full', index);
850   - }
851   - clearTimeout(timer);
852   - timer = setTimeout(function(){
853   - var isfix = layero.css('position') === 'fixed';
854   - layer.style(index, {
855   - top: isfix ? 0 : win.scrollTop(),
856   - left: isfix ? 0 : win.scrollLeft(),
857   - width: win.width(),
858   - height: win.height()
859   - }, true);
860   - layero.find('.layui-layer-min').hide();
861   - }, 100);
862   -};
863   -
864   -//改变title
865   -layer.title = function(name, index){
866   - var title = $('#'+ doms[0] + (index||layer.index)).find(doms[1]);
867   - title.html(name);
868   -};
869   -
870   -//关闭layer总方法
871   -layer.close = function(index){
872   - var layero = $('#'+ doms[0] + index), type = layero.attr('type'), closeAnim = 'layer-anim-close';
873   - if(!layero[0]) return;
874   - var WRAP = 'layui-layer-wrap', remove = function(){
875   - if(type === ready.type[1] && layero.attr('conType') === 'object'){
876   - layero.children(':not(.'+ doms[5] +')').remove();
877   - var wrap = layero.find('.'+WRAP);
878   - for(var i = 0; i < 2; i++){
879   - wrap.unwrap();
880   - }
881   - wrap.css('display', wrap.data('display')).removeClass(WRAP);
882   - } else {
883   - //低版本IE 回收 iframe
884   - if(type === ready.type[2]){
885   - try {
886   - var iframe = $('#'+doms[4]+index)[0];
887   - iframe.contentWindow.document.write('');
888   - iframe.contentWindow.close();
889   - layero.find('.'+doms[5])[0].removeChild(iframe);
890   - } catch(e){}
891   - }
892   - layero[0].innerHTML = '';
893   - layero.remove();
894   - }
895   - typeof ready.end[index] === 'function' && ready.end[index]();
896   - delete ready.end[index];
897   - };
898   -
899   - if(layero.data('isOutAnim')){
900   - layero.addClass(closeAnim);
901   - }
902   -
903   - $('#layui-layer-moves, #layui-layer-shade' + index).remove();
904   - layer.ie == 6 && ready.reselect();
905   - ready.rescollbar(index);
906   - if(layero.attr('minLeft')){
907   - ready.minIndex--;
908   - ready.minLeft.push(layero.attr('minLeft'));
909   - }
910   -
911   - if((layer.ie && layer.ie < 10) || !layero.data('isOutAnim')){
912   - remove()
913   - } else {
914   - setTimeout(function(){
915   - remove();
916   - }, 200);
917   - }
918   -};
919   -
920   -//关闭所有层
921   -layer.closeAll = function(type){
922   - $.each($('.'+doms[0]), function(){
923   - var othis = $(this);
924   - var is = type ? (othis.attr('type') === type) : 1;
925   - is && layer.close(othis.attr('times'));
926   - is = null;
927   - });
928   -};
929   -
930   -/**
931   -
932   - 拓展模块,layui开始合并在一起
933   -
934   - */
935   -
936   -var cache = layer.cache||{}, skin = function(type){
937   - return (cache.skin ? (' ' + cache.skin + ' ' + cache.skin + '-'+type) : '');
938   -};
939   -
940   -//仿系统prompt
941   -layer.prompt = function(options, yes){
942   - var style = '';
943   - options = options || {};
944   -
945   - if(typeof options === 'function') yes = options;
946   -
947   - if(options.area){
948   - var area = options.area;
949   - style = 'style="width: '+ area[0] +'; height: '+ area[1] + ';"';
950   - delete options.area;
951   - }
952   - var prompt, content = options.formType == 2 ? '<textarea class="layui-layer-input"' + style +'>' + (options.value||'') +'</textarea>' : function(){
953   - return '<input type="'+ (options.formType == 1 ? 'password' : 'text') +'" class="layui-layer-input" value="'+ (options.value||'') +'">';
954   - }();
955   -
956   - var success = options.success;
957   - delete options.success;
958   -
959   - return layer.open($.extend({
960   - type: 1
961   - ,btn: ['&#x786E;&#x5B9A;','&#x53D6;&#x6D88;']
962   - ,content: content
963   - ,skin: 'layui-layer-prompt' + skin('prompt')
964   - ,maxWidth: win.width()
965   - ,success: function(layero){
966   - prompt = layero.find('.layui-layer-input');
967   - prompt.focus();
968   - typeof success === 'function' && success(layero);
969   - }
970   - ,resize: false
971   - ,yes: function(index){
972   - var value = prompt.val();
973   - if(value === ''){
974   - prompt.focus();
975   - } else if(value.length > (options.maxlength||500)) {
976   - layer.tips('&#x6700;&#x591A;&#x8F93;&#x5165;'+ (options.maxlength || 500) +'&#x4E2A;&#x5B57;&#x6570;', prompt, {tips: 1});
977   - } else {
978   - yes && yes(value, index, prompt);
979   - }
980   - }
981   - }, options));
982   -};
983   -
984   -//tab层
985   -layer.tab = function(options){
986   - options = options || {};
987   -
988   - var tab = options.tab || {}
989   - ,success = options.success;
990   -
991   - delete options.success;
992   -
993   - return layer.open($.extend({
994   - type: 1,
995   - skin: 'layui-layer-tab' + skin('tab'),
996   - resize: false,
997   - title: function(){
998   - var len = tab.length, ii = 1, str = '';
999   - if(len > 0){
1000   - str = '<span class="layui-layer-tabnow">'+ tab[0].title +'</span>';
1001   - for(; ii < len; ii++){
1002   - str += '<span>'+ tab[ii].title +'</span>';
1003   - }
1004   - }
1005   - return str;
1006   - }(),
1007   - content: '<ul class="layui-layer-tabmain">'+ function(){
1008   - var len = tab.length, ii = 1, str = '';
1009   - if(len > 0){
1010   - str = '<li class="layui-layer-tabli xubox_tab_layer">'+ (tab[0].content || 'no content') +'</li>';
1011   - for(; ii < len; ii++){
1012   - str += '<li class="layui-layer-tabli">'+ (tab[ii].content || 'no content') +'</li>';
1013   - }
1014   - }
1015   - return str;
1016   - }() +'</ul>',
1017   - success: function(layero){
1018   - var btn = layero.find('.layui-layer-title').children();
1019   - var main = layero.find('.layui-layer-tabmain').children();
1020   - btn.on('mousedown', function(e){
1021   - e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
1022   - var othis = $(this), index = othis.index();
1023   - othis.addClass('layui-layer-tabnow').siblings().removeClass('layui-layer-tabnow');
1024   - main.eq(index).show().siblings().hide();
1025   - typeof options.change === 'function' && options.change(index);
1026   - });
1027   - typeof success === 'function' && success(layero);
1028   - }
1029   - }, options));
1030   -};
1031   -
1032   -//相册层
1033   -layer.photos = function(options, loop, key){
1034   - var dict = {};
1035   - options = options || {};
1036   - if(!options.photos) return;
1037   - var type = options.photos.constructor === Object;
1038   - var photos = type ? options.photos : {}, data = photos.data || [];
1039   - var start = photos.start || 0;
1040   - dict.imgIndex = (start|0) + 1;
1041   -
1042   - options.img = options.img || 'img';
1043   -
1044   - var success = options.success;
1045   - delete options.success;
1046   -
1047   - if(!type){ //页面直接获取
1048   - var parent = $(options.photos), pushData = function(){
1049   - data = [];
1050   - parent.find(options.img).each(function(index){
1051   - var othis = $(this);
1052   - othis.attr('layer-index', index);
1053   - data.push({
1054   - alt: othis.attr('alt'),
1055   - pid: othis.attr('layer-pid'),
1056   - src: othis.attr('layer-src') || othis.attr('src'),
1057   - thumb: othis.attr('src')
1058   - });
1059   - })
1060   - };
1061   -
1062   - pushData();
1063   -
1064   - if (data.length === 0) return;
1065   -
1066   - loop || parent.on('click', options.img, function(){
1067   - var othis = $(this), index = othis.attr('layer-index');
1068   - layer.photos($.extend(options, {
1069   - photos: {
1070   - start: index,
1071   - data: data,
1072   - tab: options.tab
1073   - },
1074   - full: options.full
1075   - }), true);
1076   - pushData();
1077   - })
1078   -
1079   - //不直接弹出
1080   - if(!loop) return;
1081   -
1082   - } else if (data.length === 0){
1083   - return layer.msg('&#x6CA1;&#x6709;&#x56FE;&#x7247;');
1084   - }
1085   -
1086   - //上一张
1087   - dict.imgprev = function(key){
1088   - dict.imgIndex--;
1089   - if(dict.imgIndex < 1){
1090   - dict.imgIndex = data.length;
1091   - }
1092   - dict.tabimg(key);
1093   - };
1094   -
1095   - //下一张
1096   - dict.imgnext = function(key,errorMsg){
1097   - dict.imgIndex++;
1098   - if(dict.imgIndex > data.length){
1099   - dict.imgIndex = 1;
1100   - if (errorMsg) {return};
1101   - }
1102   - dict.tabimg(key)
1103   - };
1104   -
1105   - //方向键
1106   - dict.keyup = function(event){
1107   - if(!dict.end){
1108   - var code = event.keyCode;
1109   - event.preventDefault();
1110   - if(code === 37){
1111   - dict.imgprev(true);
1112   - } else if(code === 39) {
1113   - dict.imgnext(true);
1114   - } else if(code === 27) {
1115   - layer.close(dict.index);
1116   - }
1117   - }
1118   - }
1119   -
1120   - //切换
1121   - dict.tabimg = function(key){
1122   - if(data.length <= 1) return;
1123   - photos.start = dict.imgIndex - 1;
1124   - layer.close(dict.index);
1125   - return layer.photos(options, true, key);
1126   - setTimeout(function(){
1127   - layer.photos(options, true, key);
1128   - }, 200);
1129   - }
1130   -
1131   - //一些动作
1132   - dict.event = function(){
1133   - dict.bigimg.hover(function(){
1134   - dict.imgsee.show();
1135   - }, function(){
1136   - dict.imgsee.hide();
1137   - });
1138   -
1139   - dict.bigimg.find('.layui-layer-imgprev').on('click', function(event){
1140   - event.preventDefault();
1141   - dict.imgprev();
1142   - });
1143   -
1144   - dict.bigimg.find('.layui-layer-imgnext').on('click', function(event){
1145   - event.preventDefault();
1146   - dict.imgnext();
1147   - });
1148   -
1149   - $(document).on('keyup', dict.keyup);
1150   - };
1151   -
1152   - //图片预加载
1153   - function loadImage(url, callback, error) {
1154   - var img = new Image();
1155   - img.src = url;
1156   - if(img.complete){
1157   - return callback(img);
1158   - }
1159   - img.onload = function(){
1160   - img.onload = null;
1161   - callback(img);
1162   - };
1163   - img.onerror = function(e){
1164   - img.onerror = null;
1165   - error(e);
1166   - };
1167   - };
1168   -
1169   - dict.loadi = layer.load(1, {
1170   - shade: 'shade' in options ? false : 0.9,
1171   - scrollbar: false
1172   - });
1173   -
1174   - loadImage(data[start].src, function(img){
1175   - layer.close(dict.loadi);
1176   - dict.index = layer.open($.extend({
1177   - type: 1,
1178   - id: 'layui-layer-photos',
1179   - area: function(){
1180   - var imgarea = [img.width, img.height];
1181   - var winarea = [$(window).width() - 100, $(window).height() - 100];
1182   -
1183   - //如果 实际图片的宽或者高比 屏幕大(那么进行缩放)
1184   - if(!options.full && (imgarea[0]>winarea[0]||imgarea[1]>winarea[1])){
1185   - var wh = [imgarea[0]/winarea[0],imgarea[1]/winarea[1]];//取宽度缩放比例、高度缩放比例
1186   - if(wh[0] > wh[1]){//取缩放比例最大的进行缩放
1187   - imgarea[0] = imgarea[0]/wh[0];
1188   - imgarea[1] = imgarea[1]/wh[0];
1189   - } else if(wh[0] < wh[1]){
1190   - imgarea[0] = imgarea[0]/wh[1];
1191   - imgarea[1] = imgarea[1]/wh[1];
1192   - }
1193   - }
1194   -
1195   - return [imgarea[0]+'px', imgarea[1]+'px'];
1196   - }(),
1197   - title: false,
1198   - shade: 0.9,
1199   - shadeClose: true,
1200   - closeBtn: false,
1201   - move: '.layui-layer-phimg img',
1202   - moveType: 1,
1203   - scrollbar: false,
1204   - moveOut: true,
1205   - //anim: Math.random()*5|0,
1206   - isOutAnim: false,
1207   - skin: 'layui-layer-photos' + skin('photos'),
1208   - content: '<div class="layui-layer-phimg">'
1209   - +'<img src="'+ data[start].src +'" alt="'+ (data[start].alt||'') +'" layer-pid="'+ data[start].pid +'">'
1210   - +'<div class="layui-layer-imgsee">'
1211   - +(data.length > 1 ? '<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>' : '')
1212   - +'<div class="layui-layer-imgbar" style="display:'+ (key ? 'block' : '') +'"><span class="layui-layer-imgtit"><a href="javascript:;">'+ (data[start].alt||'') +'</a><em>'+ dict.imgIndex +'/'+ data.length +'</em></span></div>'
1213   - +'</div>'
1214   - +'</div>',
1215   - success: function(layero, index){
1216   - dict.bigimg = layero.find('.layui-layer-phimg');
1217   - dict.imgsee = layero.find('.layui-layer-imguide,.layui-layer-imgbar');
1218   - dict.event(layero);
1219   - options.tab && options.tab(data[start], layero);
1220   - typeof success === 'function' && success(layero);
1221   - }, end: function(){
1222   - dict.end = true;
1223   - $(document).off('keyup', dict.keyup);
1224   - }
1225   - }, options));
1226   - }, function(){
1227   - layer.close(dict.loadi);
1228   - layer.msg('&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;', {
1229   - time: 30000,
1230   - btn: ['&#x4E0B;&#x4E00;&#x5F20;', '&#x4E0D;&#x770B;&#x4E86;'],
1231   - yes: function(){
1232   - data.length > 1 && dict.imgnext(true,true);
1233   - }
1234   - });
1235   - });
1236   -};
1237   -
1238   -//主入口
1239   -ready.run = function(_$){
1240   - $ = _$;
1241   - win = $(window);
1242   - doms.html = $('html');
1243   - layer.open = function(deliver){
1244   - var o = new Class(deliver);
1245   - return o.index;
1246   - };
1247   -};
1248   -
1249   -//加载方式
1250   -window.layui && layui.define ? (
1251   - layer.ready()
1252   - ,layui.define('jquery', function(exports){ //layui加载
1253   - layer.path = layui.cache.dir;
1254   - ready.run(layui.jquery);
1255   -
1256   - //暴露模块
1257   - window.layer = layer;
1258   - exports('layer', layer);
1259   - })
1260   -) : (
1261   - (typeof define === 'function' && define.amd) ? define(['jquery'], function(){ //requirejs加载
1262   - ready.run(window.jQuery);
1263   - return layer;
1264   - }) : function(){ //普通script标签加载
1265   - ready.run(window.jQuery);
1266   - layer.ready();
1267   - }()
1268   -);
1269   -
1270   -}(window);
  1 +/**
  2 +
  3 + @Name:layer v3.0.3 Web弹层组件
  4 + @Author:贤心
  5 + @Site:http://layer.layui.com
  6 + @License:MIT
  7 +
  8 + */
  9 +
  10 +;!function(window, undefined){
  11 +"use strict";
  12 +
  13 +var isLayui = window.layui && layui.define, $, win, ready = {
  14 + getPath: function(){
  15 + var js = document.scripts, script = js[js.length - 1], jsPath = script.src;
  16 + if(script.getAttribute('merge')) return;
  17 + return jsPath.substring(0, jsPath.lastIndexOf("/") + 1);
  18 + }(),
  19 +
  20 + config: {}, end: {}, minIndex: 0, minLeft: [],
  21 + btn: ['&#x786E;&#x5B9A;', '&#x53D6;&#x6D88;'],
  22 +
  23 + //五种原始层模式
  24 + type: ['dialog', 'page', 'iframe', 'loading', 'tips']
  25 +};
  26 +
  27 +//默认内置方法。
  28 +var layer = {
  29 + v: '3.0.3',
  30 + ie: function(){ //ie版本
  31 + var agent = navigator.userAgent.toLowerCase();
  32 + return (!!window.ActiveXObject || "ActiveXObject" in window) ? (
  33 + (agent.match(/msie\s(\d+)/) || [])[1] || '11' //由于ie11并没有msie的标识
  34 + ) : false;
  35 + }(),
  36 + index: (window.layer && window.layer.v) ? 100000 : 0,
  37 + path: ready.getPath,
  38 + config: function(options, fn){
  39 + options = options || {};
  40 + layer.cache = ready.config = $.extend({}, ready.config, options);
  41 + layer.path = ready.config.path || layer.path;
  42 + typeof options.extend === 'string' && (options.extend = [options.extend]);
  43 +
  44 + if(ready.config.path) layer.ready();
  45 +
  46 + if(!options.extend) return this;
  47 +
  48 + isLayui
  49 + ? layui.addcss('modules/layer/' + options.extend)
  50 + : layer.link('skin/' + options.extend);
  51 +
  52 + return this;
  53 + },
  54 +
  55 + //载入CSS配件
  56 + link: function(href, fn, cssname){
  57 +
  58 + //未设置路径,则不主动加载css
  59 + if(!layer.path) return;
  60 +
  61 + var head = $('head')[0], link = document.createElement('link');
  62 + if(typeof fn === 'string') cssname = fn;
  63 + var app = (cssname || href).replace(/\.|\//g, '');
  64 + var id = 'layuicss-'+app, timeout = 0;
  65 +
  66 + link.rel = 'stylesheet';
  67 + link.href = layer.path + href;
  68 + link.id = id;
  69 +
  70 + if(!$('#'+ id)[0]){
  71 + head.appendChild(link);
  72 + }
  73 +
  74 + if(typeof fn !== 'function') return;
  75 +
  76 + //轮询css是否加载完毕
  77 +/* (function poll() {
  78 + if(++timeout > 8 * 1000 / 100){
  79 + return window.console && console.error('layer.css: Invalid');
  80 + };
  81 + parseInt($('#'+id).css('width')) === 1989 ? fn() : setTimeout(poll, 100);
  82 + }());*/
  83 + },
  84 +
  85 + ready: function(callback){
  86 + /*var cssname = 'skinlayercss', ver = '303';
  87 + isLayui ? layui.addcss('modules/layer/default/layer.css?v='+layer.v+ver, callback, cssname)
  88 + : layer.link('skin/default/layer.css?v='+layer.v+ver, callback, cssname);*/
  89 + return this;
  90 + },
  91 +
  92 + //各种快捷引用
  93 + alert: function(content, options, yes){
  94 + var type = typeof options === 'function';
  95 + if(type) yes = options;
  96 + return layer.open($.extend({
  97 + content: content,
  98 + yes: yes
  99 + }, type ? {} : options));
  100 + },
  101 +
  102 + confirm: function(content, options, yes, cancel){
  103 + var type = typeof options === 'function';
  104 + if(type){
  105 + cancel = yes;
  106 + yes = options;
  107 + }
  108 + return layer.open($.extend({
  109 + content: content,
  110 + btn: ready.btn,
  111 + yes: yes,
  112 + btn2: cancel
  113 + }, type ? {} : options));
  114 + },
  115 +
  116 + msg: function(content, options, end){ //最常用提示层
  117 + var type = typeof options === 'function', rskin = ready.config.skin;
  118 + var skin = (rskin ? rskin + ' ' + rskin + '-msg' : '')||'layui-layer-msg';
  119 + var anim = doms.anim.length - 1;
  120 + if(type) end = options;
  121 + return layer.open($.extend({
  122 + content: content,
  123 + time: 3000,
  124 + shade: false,
  125 + skin: skin,
  126 + title: false,
  127 + closeBtn: false,
  128 + btn: false,
  129 + resize: false,
  130 + end: end
  131 + }, (type && !ready.config.skin) ? {
  132 + skin: skin + ' layui-layer-hui',
  133 + anim: anim
  134 + } : function(){
  135 + options = options || {};
  136 + if(options.icon === -1 || options.icon === undefined && !ready.config.skin){
  137 + options.skin = skin + ' ' + (options.skin||'layui-layer-hui');
  138 + }
  139 + return options;
  140 + }()));
  141 + },
  142 +
  143 + load: function(icon, options){
  144 + return layer.open($.extend({
  145 + type: 3,
  146 + icon: icon || 0,
  147 + resize: false,
  148 + shade: 0.01
  149 + }, options));
  150 + },
  151 +
  152 + tips: function(content, follow, options){
  153 + return layer.open($.extend({
  154 + type: 4,
  155 + content: [content, follow],
  156 + closeBtn: false,
  157 + time: 3000,
  158 + shade: false,
  159 + resize: false,
  160 + fixed: false,
  161 + maxWidth: 210
  162 + }, options));
  163 + }
  164 +};
  165 +
  166 +var Class = function(setings){
  167 + var that = this;
  168 + that.index = ++layer.index;
  169 + that.config = $.extend({}, that.config, ready.config, setings);
  170 + document.body ? that.creat() : setTimeout(function(){
  171 + that.creat();
  172 + }, 30);
  173 +};
  174 +
  175 +Class.pt = Class.prototype;
  176 +
  177 +//缓存常用字符
  178 +var doms = ['layui-layer', '.layui-layer-title', '.layui-layer-main', '.layui-layer-dialog', 'layui-layer-iframe', 'layui-layer-content', 'layui-layer-btn', 'layui-layer-close'];
  179 +doms.anim = ['layer-anim', 'layer-anim-01', 'layer-anim-02', 'layer-anim-03', 'layer-anim-04', 'layer-anim-05', 'layer-anim-06'];
  180 +
  181 +//默认配置
  182 +Class.pt.config = {
  183 + type: 0,
  184 + shade: 0.3,
  185 + fixed: true,
  186 + move: doms[1],
  187 + title: '&#x4FE1;&#x606F;',
  188 + offset: 'auto',
  189 + area: 'auto',
  190 + closeBtn: 1,
  191 + time: 0, //0表示不自动关闭
  192 + zIndex: 19891014,
  193 + maxWidth: 360,
  194 + anim: 0,
  195 + isOutAnim: true,
  196 + icon: -1,
  197 + moveType: 1,
  198 + resize: true,
  199 + scrollbar: true, //是否允许浏览器滚动条
  200 + tips: 2
  201 +};
  202 +
  203 +//容器
  204 +Class.pt.vessel = function(conType, callback){
  205 + var that = this, times = that.index, config = that.config;
  206 + var zIndex = config.zIndex + times, titype = typeof config.title === 'object';
  207 + var ismax = config.maxmin && (config.type === 1 || config.type === 2);
  208 + var titleHTML = (config.title ? '<div class="layui-layer-title" style="'+ (titype ? config.title[1] : '') +'">'
  209 + + (titype ? config.title[0] : config.title)
  210 + + '</div>' : '');
  211 +
  212 + config.zIndex = zIndex;
  213 + callback([
  214 + //遮罩
  215 + config.shade ? ('<div class="layui-layer-shade" id="layui-layer-shade'+ times +'" times="'+ times +'" style="'+ ('z-index:'+ (zIndex-1) +'; background-color:'+ (config.shade[1]||'#000') +'; opacity:'+ (config.shade[0]||config.shade) +'; filter:alpha(opacity='+ (config.shade[0]*100||config.shade*100) +');') +'"></div>') : '',
  216 +
  217 + //主体
  218 + '<div class="'+ doms[0] + (' layui-layer-'+ready.type[config.type]) + (((config.type == 0 || config.type == 2) && !config.shade) ? ' layui-layer-border' : '') + ' ' + (config.skin||'') +'" id="'+ doms[0] + times +'" type="'+ ready.type[config.type] +'" times="'+ times +'" showtime="'+ config.time +'" conType="'+ (conType ? 'object' : 'string') +'" style="z-index: '+ zIndex +'; width:'+ config.area[0] + ';height:' + config.area[1] + (config.fixed ? '' : ';position:absolute;') +'">'
  219 + + (conType && config.type != 2 ? '' : titleHTML)
  220 + + '<div id="'+ (config.id||'') +'" class="layui-layer-content'+ ((config.type == 0 && config.icon !== -1) ? ' layui-layer-padding' :'') + (config.type == 3 ? ' layui-layer-loading'+config.icon : '') +'">'
  221 + + (config.type == 0 && config.icon !== -1 ? '<i class="layui-layer-ico layui-layer-ico'+ config.icon +'"></i>' : '')
  222 + + (config.type == 1 && conType ? '' : (config.content||''))
  223 + + '</div>'
  224 + + '<span class="layui-layer-setwin">'+ function(){
  225 + var closebtn = ismax ? '<a class="layui-layer-min" href="javascript:;"><cite></cite></a><a class="layui-layer-ico layui-layer-max" href="javascript:;"></a>' : '';
  226 + config.closeBtn && (closebtn += '<a class="layui-layer-ico '+ doms[7] +' '+ doms[7] + (config.title ? config.closeBtn : (config.type == 4 ? '1' : '2')) +'" href="javascript:;"></a>');
  227 + return closebtn;
  228 + }() + '</span>'
  229 + + (config.btn ? function(){
  230 + var button = '';
  231 + typeof config.btn === 'string' && (config.btn = [config.btn]);
  232 + for(var i = 0, len = config.btn.length; i < len; i++){
  233 + button += '<a class="'+ doms[6] +''+ i +'">'+ config.btn[i] +'</a>'
  234 + }
  235 + return '<div class="'+ doms[6] + (config.btnAlign ? (' layui-layer-btn-' + config.btnAlign) : '') +'">'+ button +'</div>'
  236 + }() : '')
  237 + + (config.resize ? '<span class="layui-layer-resize"></span>' : '')
  238 + + '</div>'
  239 + ], titleHTML, $('<div class="layui-layer-move"></div>'));
  240 + return that;
  241 +};
  242 +
  243 +//创建骨架
  244 +Class.pt.creat = function(){
  245 + var that = this
  246 + ,config = that.config
  247 + ,times = that.index, nodeIndex
  248 + ,content = config.content
  249 + ,conType = typeof content === 'object'
  250 + ,body = $('body');
  251 +
  252 + if(config.id && $('#'+config.id)[0]) return;
  253 +
  254 + if(typeof config.area === 'string'){
  255 + config.area = config.area === 'auto' ? ['', ''] : [config.area, ''];
  256 + }
  257 +
  258 + //anim兼容旧版shift
  259 + if(config.shift){
  260 + config.anim = config.shift;
  261 + }
  262 +
  263 + if(layer.ie == 6){
  264 + config.fixed = false;
  265 + }
  266 +
  267 + switch(config.type){
  268 + case 0:
  269 + config.btn = ('btn' in config) ? config.btn : ready.btn[0];
  270 + layer.closeAll('dialog');
  271 + break;
  272 + case 2:
  273 + var content = config.content = conType ? config.content : [config.content, 'auto'];
  274 + config.content = '<iframe scrolling="'+ (config.content[1]||'auto') +'" allowtransparency="true" id="'+ doms[4] +''+ times +'" name="'+ doms[4] +''+ times +'" onload="this.className=\'\';" class="layui-layer-load" frameborder="0" src="' + config.content[0] + '"></iframe>';
  275 + break;
  276 + case 3:
  277 + delete config.title;
  278 + delete config.closeBtn;
  279 + config.icon === -1 && (config.icon === 0);
  280 + layer.closeAll('loading');
  281 + break;
  282 + case 4:
  283 + conType || (config.content = [config.content, 'body']);
  284 + config.follow = config.content[1];
  285 + config.content = config.content[0] + '<i class="layui-layer-TipsG"></i>';
  286 + delete config.title;
  287 + config.tips = typeof config.tips === 'object' ? config.tips : [config.tips, true];
  288 + config.tipsMore || layer.closeAll('tips');
  289 + break;
  290 + }
  291 +
  292 + //建立容器
  293 + that.vessel(conType, function(html, titleHTML, moveElem){
  294 + body.append(html[0]);
  295 + conType ? function(){
  296 + (config.type == 2 || config.type == 4) ? function(){
  297 + $('body').append(html[1]);
  298 + }() : function(){
  299 + if(!content.parents('.'+doms[0])[0]){
  300 + content.data('display', content.css('display')).show().addClass('layui-layer-wrap').wrap(html[1]);
  301 + $('#'+ doms[0] + times).find('.'+doms[5]).before(titleHTML);
  302 + }
  303 + }();
  304 + }() : body.append(html[1]);
  305 + $('.layui-layer-move')[0] || body.append(ready.moveElem = moveElem);
  306 + that.layero = $('#'+ doms[0] + times);
  307 + config.scrollbar || doms.html.css('overflow', 'hidden').attr('layer-full', times);
  308 + }).auto(times);
  309 +
  310 + config.type == 2 && layer.ie == 6 && that.layero.find('iframe').attr('src', content[0]);
  311 +
  312 + //坐标自适应浏览器窗口尺寸
  313 + config.type == 4 ? that.tips() : that.offset();
  314 + if(config.fixed){
  315 + win.on('resize', function(){
  316 + that.offset();
  317 + (/^\d+%$/.test(config.area[0]) || /^\d+%$/.test(config.area[1])) && that.auto(times);
  318 + config.type == 4 && that.tips();
  319 + });
  320 + }
  321 +
  322 + config.time <= 0 || setTimeout(function(){
  323 + layer.close(that.index)
  324 + }, config.time);
  325 + that.move().callback();
  326 +
  327 + //为兼容jQuery3.0的css动画影响元素尺寸计算
  328 + if(doms.anim[config.anim]){
  329 + that.layero.addClass(doms.anim[config.anim]);
  330 + };
  331 +
  332 + //记录关闭动画
  333 + if(config.isOutAnim){
  334 + that.layero.data('isOutAnim', true);
  335 + }
  336 +};
  337 +
  338 +//自适应
  339 +Class.pt.auto = function(index){
  340 + var that = this, config = that.config, layero = $('#'+ doms[0] + index);
  341 + if(config.area[0] === '' && config.maxWidth > 0){
  342 + //为了修复IE7下一个让人难以理解的bug
  343 + if(layer.ie && layer.ie < 8 && config.btn){
  344 + layero.width(layero.innerWidth());
  345 + }
  346 + layero.outerWidth() > config.maxWidth && layero.width(config.maxWidth);
  347 + }
  348 + var area = [layero.innerWidth(), layero.innerHeight()];
  349 + var titHeight = layero.find(doms[1]).outerHeight() || 0;
  350 + var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
  351 + function setHeight(elem){
  352 + elem = layero.find(elem);
  353 + elem.height(area[1] - titHeight - btnHeight - 2*(parseFloat(elem.css('padding-top'))|0));
  354 + }
  355 + switch(config.type){
  356 + case 2:
  357 + setHeight('iframe');
  358 + break;
  359 + default:
  360 + if(config.area[1] === ''){
  361 + if(config.fixed && area[1] >= win.height()){
  362 + area[1] = win.height();
  363 + setHeight('.'+doms[5]);
  364 + }
  365 + } else {
  366 + setHeight('.'+doms[5]);
  367 + }
  368 + break;
  369 + }
  370 + return that;
  371 +};
  372 +
  373 +//计算坐标
  374 +Class.pt.offset = function(){
  375 + var that = this, config = that.config, layero = that.layero;
  376 + var area = [layero.outerWidth(), layero.outerHeight()];
  377 + var type = typeof config.offset === 'object';
  378 + that.offsetTop = (win.height() - area[1])/2;
  379 + that.offsetLeft = (win.width() - area[0])/2;
  380 +
  381 + if(type){
  382 + that.offsetTop = config.offset[0];
  383 + that.offsetLeft = config.offset[1]||that.offsetLeft;
  384 + } else if(config.offset !== 'auto'){
  385 +
  386 + if(config.offset === 't'){ //上
  387 + that.offsetTop = 0;
  388 + } else if(config.offset === 'r'){ //右
  389 + that.offsetLeft = win.width() - area[0];
  390 + } else if(config.offset === 'b'){ //下
  391 + that.offsetTop = win.height() - area[1];
  392 + } else if(config.offset === 'l'){ //左
  393 + that.offsetLeft = 0;
  394 + } else if(config.offset === 'lt'){ //左上角
  395 + that.offsetTop = 0;
  396 + that.offsetLeft = 0;
  397 + } else if(config.offset === 'lb'){ //左下角
  398 + that.offsetTop = win.height() - area[1];
  399 + that.offsetLeft = 0;
  400 + } else if(config.offset === 'rt'){ //右上角
  401 + that.offsetTop = 0;
  402 + that.offsetLeft = win.width() - area[0];
  403 + } else if(config.offset === 'rb'){ //右下角
  404 + that.offsetTop = win.height() - area[1];
  405 + that.offsetLeft = win.width() - area[0];
  406 + } else {
  407 + that.offsetTop = config.offset;
  408 + }
  409 +
  410 + }
  411 +
  412 + if(!config.fixed){
  413 + that.offsetTop = /%$/.test(that.offsetTop) ?
  414 + win.height()*parseFloat(that.offsetTop)/100
  415 + : parseFloat(that.offsetTop);
  416 + that.offsetLeft = /%$/.test(that.offsetLeft) ?
  417 + win.width()*parseFloat(that.offsetLeft)/100
  418 + : parseFloat(that.offsetLeft);
  419 + that.offsetTop += win.scrollTop();
  420 + that.offsetLeft += win.scrollLeft();
  421 + }
  422 +
  423 + if(layero.attr('minLeft')){
  424 + that.offsetTop = win.height() - (layero.find(doms[1]).outerHeight() || 0);
  425 + that.offsetLeft = layero.css('left');
  426 + }
  427 +
  428 + layero.css({top: that.offsetTop, left: that.offsetLeft});
  429 +};
  430 +
  431 +//Tips
  432 +Class.pt.tips = function(){
  433 + var that = this, config = that.config, layero = that.layero;
  434 + var layArea = [layero.outerWidth(), layero.outerHeight()], follow = $(config.follow);
  435 + if(!follow[0]) follow = $('body');
  436 + var goal = {
  437 + width: follow.outerWidth(),
  438 + height: follow.outerHeight(),
  439 + top: follow.offset().top,
  440 + left: follow.offset().left
  441 + }, tipsG = layero.find('.layui-layer-TipsG');
  442 +
  443 + var guide = config.tips[0];
  444 + config.tips[1] || tipsG.remove();
  445 +
  446 + goal.autoLeft = function(){
  447 + if(goal.left + layArea[0] - win.width() > 0){
  448 + goal.tipLeft = goal.left + goal.width - layArea[0];
  449 + tipsG.css({right: 12, left: 'auto'});
  450 + } else {
  451 + goal.tipLeft = goal.left;
  452 + };
  453 + };
  454 +
  455 + //辨别tips的方位
  456 + goal.where = [function(){ //上
  457 + goal.autoLeft();
  458 + goal.tipTop = goal.top - layArea[1] - 10;
  459 + tipsG.removeClass('layui-layer-TipsB').addClass('layui-layer-TipsT').css('border-right-color', config.tips[1]);
  460 + }, function(){ //右
  461 + goal.tipLeft = goal.left + goal.width + 10;
  462 + goal.tipTop = goal.top;
  463 + tipsG.removeClass('layui-layer-TipsL').addClass('layui-layer-TipsR').css('border-bottom-color', config.tips[1]);
  464 + }, function(){ //下
  465 + goal.autoLeft();
  466 + goal.tipTop = goal.top + goal.height + 10;
  467 + tipsG.removeClass('layui-layer-TipsT').addClass('layui-layer-TipsB').css('border-right-color', config.tips[1]);
  468 + }, function(){ //左
  469 + goal.tipLeft = goal.left - layArea[0] - 10;
  470 + goal.tipTop = goal.top;
  471 + tipsG.removeClass('layui-layer-TipsR').addClass('layui-layer-TipsL').css('border-bottom-color', config.tips[1]);
  472 + }];
  473 + goal.where[guide-1]();
  474 +
  475 + /* 8*2为小三角形占据的空间 */
  476 + if(guide === 1){
  477 + goal.top - (win.scrollTop() + layArea[1] + 8*2) < 0 && goal.where[2]();
  478 + } else if(guide === 2){
  479 + win.width() - (goal.left + goal.width + layArea[0] + 8*2) > 0 || goal.where[3]()
  480 + } else if(guide === 3){
  481 + (goal.top - win.scrollTop() + goal.height + layArea[1] + 8*2) - win.height() > 0 && goal.where[0]();
  482 + } else if(guide === 4){
  483 + layArea[0] + 8*2 - goal.left > 0 && goal.where[1]()
  484 + }
  485 +
  486 + layero.find('.'+doms[5]).css({
  487 + 'background-color': config.tips[1],
  488 + 'padding-right': (config.closeBtn ? '30px' : '')
  489 + });
  490 + layero.css({
  491 + left: goal.tipLeft - (config.fixed ? win.scrollLeft() : 0),
  492 + top: goal.tipTop - (config.fixed ? win.scrollTop() : 0)
  493 + });
  494 +}
  495 +
  496 +//拖拽层
  497 +Class.pt.move = function(){
  498 + var that = this
  499 + ,config = that.config
  500 + ,_DOC = $(document)
  501 + ,layero = that.layero
  502 + ,moveElem = layero.find(config.move)
  503 + ,resizeElem = layero.find('.layui-layer-resize')
  504 + ,dict = {};
  505 +
  506 + if(config.move){
  507 + moveElem.css('cursor', 'move');
  508 + }
  509 +
  510 + moveElem.on('mousedown', function(e){
  511 + e.preventDefault();
  512 + if(config.move){
  513 + dict.moveStart = true;
  514 + dict.offset = [
  515 + e.clientX - parseFloat(layero.css('left'))
  516 + ,e.clientY - parseFloat(layero.css('top'))
  517 + ];
  518 + ready.moveElem.css('cursor', 'move').show();
  519 + }
  520 + });
  521 +
  522 + resizeElem.on('mousedown', function(e){
  523 + e.preventDefault();
  524 + dict.resizeStart = true;
  525 + dict.offset = [e.clientX, e.clientY];
  526 + dict.area = [
  527 + layero.outerWidth()
  528 + ,layero.outerHeight()
  529 + ];
  530 + ready.moveElem.css('cursor', 'se-resize').show();
  531 + });
  532 +
  533 + _DOC.on('mousemove', function(e){
  534 +
  535 + //拖拽移动
  536 + if(dict.moveStart){
  537 + var X = e.clientX - dict.offset[0]
  538 + ,Y = e.clientY - dict.offset[1]
  539 + ,fixed = layero.css('position') === 'fixed';
  540 +
  541 + e.preventDefault();
  542 +
  543 + dict.stX = fixed ? 0 : win.scrollLeft();
  544 + dict.stY = fixed ? 0 : win.scrollTop();
  545 +
  546 + //控制元素不被拖出窗口外
  547 + if(!config.moveOut){
  548 + var setRig = win.width() - layero.outerWidth() + dict.stX
  549 + ,setBot = win.height() - layero.outerHeight() + dict.stY;
  550 + X < dict.stX && (X = dict.stX);
  551 + X > setRig && (X = setRig);
  552 + Y < dict.stY && (Y = dict.stY);
  553 + Y > setBot && (Y = setBot);
  554 + }
  555 +
  556 + layero.css({
  557 + left: X
  558 + ,top: Y
  559 + });
  560 + }
  561 +
  562 + //Resize
  563 + if(config.resize && dict.resizeStart){
  564 + var X = e.clientX - dict.offset[0]
  565 + ,Y = e.clientY - dict.offset[1];
  566 +
  567 + e.preventDefault();
  568 +
  569 + layer.style(that.index, {
  570 + width: dict.area[0] + X
  571 + ,height: dict.area[1] + Y
  572 + })
  573 + dict.isResize = true;
  574 + config.resizing && config.resizing(layero);
  575 + }
  576 + }).on('mouseup', function(e){
  577 + if(dict.moveStart){
  578 + delete dict.moveStart;
  579 + ready.moveElem.hide();
  580 + config.moveEnd && config.moveEnd(layero);
  581 + }
  582 + if(dict.resizeStart){
  583 + delete dict.resizeStart;
  584 + ready.moveElem.hide();
  585 + }
  586 + });
  587 +
  588 + return that;
  589 +};
  590 +
  591 +Class.pt.callback = function(){
  592 + var that = this, layero = that.layero, config = that.config;
  593 + that.openLayer();
  594 + if(config.success){
  595 + if(config.type == 2){
  596 + layero.find('iframe').on('load', function(){
  597 + config.success(layero, that.index);
  598 + });
  599 + } else {
  600 + config.success(layero, that.index);
  601 + }
  602 + }
  603 + layer.ie == 6 && that.IE6(layero);
  604 +
  605 + //按钮
  606 + layero.find('.'+ doms[6]).children('a').on('click', function(){
  607 + var index = $(this).index();
  608 + if(index === 0){
  609 + if(config.yes){
  610 + config.yes(that.index, layero)
  611 + } else if(config['btn1']){
  612 + config['btn1'](that.index, layero)
  613 + } else {
  614 + layer.close(that.index);
  615 + }
  616 + } else {
  617 + var close = config['btn'+(index+1)] && config['btn'+(index+1)](that.index, layero);
  618 + close === false || layer.close(that.index);
  619 + }
  620 + });
  621 +
  622 + //取消
  623 + function cancel(){
  624 + var close = config.cancel && config.cancel(that.index, layero);
  625 + close === false || layer.close(that.index);
  626 + }
  627 +
  628 + //右上角关闭回调
  629 + layero.find('.'+ doms[7]).on('click', cancel);
  630 +
  631 + //点遮罩关闭
  632 + if(config.shadeClose){
  633 + $('#layui-layer-shade'+ that.index).on('click', function(){
  634 + layer.close(that.index);
  635 + });
  636 + }
  637 +
  638 + //最小化
  639 + layero.find('.layui-layer-min').on('click', function(){
  640 + var min = config.min && config.min(layero);
  641 + min === false || layer.min(that.index, config);
  642 + });
  643 +
  644 + //全屏/还原
  645 + layero.find('.layui-layer-max').on('click', function(){
  646 + if($(this).hasClass('layui-layer-maxmin')){
  647 + layer.restore(that.index);
  648 + config.restore && config.restore(layero);
  649 + } else {
  650 + layer.full(that.index, config);
  651 + setTimeout(function(){
  652 + config.full && config.full(layero);
  653 + }, 100);
  654 + }
  655 + });
  656 +
  657 + config.end && (ready.end[that.index] = config.end);
  658 +};
  659 +
  660 +//for ie6 恢复select
  661 +ready.reselect = function(){
  662 + $.each($('select'), function(index , value){
  663 + var sthis = $(this);
  664 + if(!sthis.parents('.'+doms[0])[0]){
  665 + (sthis.attr('layer') == 1 && $('.'+doms[0]).length < 1) && sthis.removeAttr('layer').show();
  666 + }
  667 + sthis = null;
  668 + });
  669 +};
  670 +
  671 +Class.pt.IE6 = function(layero){
  672 + //隐藏select
  673 + $('select').each(function(index , value){
  674 + var sthis = $(this);
  675 + if(!sthis.parents('.'+doms[0])[0]){
  676 + sthis.css('display') === 'none' || sthis.attr({'layer' : '1'}).hide();
  677 + }
  678 + sthis = null;
  679 + });
  680 +};
  681 +
  682 +//需依赖原型的对外方法
  683 +Class.pt.openLayer = function(){
  684 + var that = this;
  685 +
  686 + //置顶当前窗口
  687 + layer.zIndex = that.config.zIndex;
  688 + layer.setTop = function(layero){
  689 + var setZindex = function(){
  690 + layer.zIndex++;
  691 + layero.css('z-index', layer.zIndex + 1);
  692 + };
  693 + layer.zIndex = parseInt(layero[0].style.zIndex);
  694 + layero.on('mousedown', setZindex);
  695 + return layer.zIndex;
  696 + };
  697 +};
  698 +
  699 +ready.record = function(layero){
  700 + var area = [
  701 + layero.width(),
  702 + layero.height(),
  703 + layero.position().top,
  704 + layero.position().left + parseFloat(layero.css('margin-left'))
  705 + ];
  706 + layero.find('.layui-layer-max').addClass('layui-layer-maxmin');
  707 + layero.attr({area: area});
  708 +};
  709 +
  710 +ready.rescollbar = function(index){
  711 + if(doms.html.attr('layer-full') == index){
  712 + if(doms.html[0].style.removeProperty){
  713 + doms.html[0].style.removeProperty('overflow');
  714 + } else {
  715 + doms.html[0].style.removeAttribute('overflow');
  716 + }
  717 + doms.html.removeAttr('layer-full');
  718 + }
  719 +};
  720 +
  721 +/** 内置成员 */
  722 +
  723 +window.layer = layer;
  724 +
  725 +//获取子iframe的DOM
  726 +layer.getChildFrame = function(selector, index){
  727 + index = index || $('.'+doms[4]).attr('times');
  728 + return $('#'+ doms[0] + index).find('iframe').contents().find(selector);
  729 +};
  730 +
  731 +//得到当前iframe层的索引,子iframe时使用
  732 +layer.getFrameIndex = function(name){
  733 + return $('#'+ name).parents('.'+doms[4]).attr('times');
  734 +};
  735 +
  736 +//iframe层自适应宽高
  737 +layer.iframeAuto = function(index){
  738 + if(!index) return;
  739 + var heg = layer.getChildFrame('html', index).outerHeight();
  740 + var layero = $('#'+ doms[0] + index);
  741 + var titHeight = layero.find(doms[1]).outerHeight() || 0;
  742 + var btnHeight = layero.find('.'+doms[6]).outerHeight() || 0;
  743 + layero.css({height: heg + titHeight + btnHeight});
  744 + layero.find('iframe').css({height: heg});
  745 +};
  746 +
  747 +//重置iframe url
  748 +layer.iframeSrc = function(index, url){
  749 + $('#'+ doms[0] + index).find('iframe').attr('src', url);
  750 +};
  751 +
  752 +//设定层的样式
  753 +layer.style = function(index, options, limit){
  754 + var layero = $('#'+ doms[0] + index)
  755 + ,contElem = layero.find('.layui-layer-content')
  756 + ,type = layero.attr('type')
  757 + ,titHeight = layero.find(doms[1]).outerHeight() || 0
  758 + ,btnHeight = layero.find('.'+doms[6]).outerHeight() || 0
  759 + ,minLeft = layero.attr('minLeft');
  760 +
  761 + if(type === ready.type[3] || type === ready.type[4]){
  762 + return;
  763 + }
  764 +
  765 + if(!limit){
  766 + if(parseFloat(options.width) <= 260){
  767 + options.width = 260;
  768 + };
  769 +
  770 + if(parseFloat(options.height) - titHeight - btnHeight <= 64){
  771 + options.height = 64 + titHeight + btnHeight;
  772 + };
  773 + }
  774 +
  775 + layero.css(options);
  776 + btnHeight = layero.find('.'+doms[6]).outerHeight();
  777 +
  778 + if(type === ready.type[2]){
  779 + layero.find('iframe').css({
  780 + height: parseFloat(options.height) - titHeight - btnHeight
  781 + });
  782 + } else {
  783 + contElem.css({
  784 + height: parseFloat(options.height) - titHeight - btnHeight
  785 + - parseFloat(contElem.css('padding-top'))
  786 + - parseFloat(contElem.css('padding-bottom'))
  787 + })
  788 + }
  789 +};
  790 +
  791 +//最小化
  792 +layer.min = function(index, options){
  793 + var layero = $('#'+ doms[0] + index)
  794 + ,titHeight = layero.find(doms[1]).outerHeight() || 0
  795 + ,left = layero.attr('minLeft') || (181*ready.minIndex)+'px'
  796 + ,position = layero.css('position');
  797 +
  798 + ready.record(layero);
  799 +
  800 + if(ready.minLeft[0]){
  801 + left = ready.minLeft[0];
  802 + ready.minLeft.shift();
  803 + }
  804 +
  805 + layero.attr('position', position);
  806 +
  807 + layer.style(index, {
  808 + width: 180
  809 + ,height: titHeight
  810 + ,left: left
  811 + ,top: win.height() - titHeight
  812 + ,position: 'fixed'
  813 + ,overflow: 'hidden'
  814 + }, true);
  815 +
  816 + layero.find('.layui-layer-min').hide();
  817 + layero.attr('type') === 'page' && layero.find(doms[4]).hide();
  818 + ready.rescollbar(index);
  819 +
  820 + if(!layero.attr('minLeft')){
  821 + ready.minIndex++;
  822 + }
  823 + layero.attr('minLeft', left);
  824 +};
  825 +
  826 +//还原
  827 +layer.restore = function(index){
  828 + var layero = $('#'+ doms[0] + index), area = layero.attr('area').split(',');
  829 + var type = layero.attr('type');
  830 + layer.style(index, {
  831 + width: parseFloat(area[0]),
  832 + height: parseFloat(area[1]),
  833 + top: parseFloat(area[2]),
  834 + left: parseFloat(area[3]),
  835 + position: layero.attr('position'),
  836 + overflow: 'visible'
  837 + }, true);
  838 + layero.find('.layui-layer-max').removeClass('layui-layer-maxmin');
  839 + layero.find('.layui-layer-min').show();
  840 + layero.attr('type') === 'page' && layero.find(doms[4]).show();
  841 + ready.rescollbar(index);
  842 +};
  843 +
  844 +//全屏
  845 +layer.full = function(index){
  846 + var layero = $('#'+ doms[0] + index), timer;
  847 + ready.record(layero);
  848 + if(!doms.html.attr('layer-full')){
  849 + doms.html.css('overflow','hidden').attr('layer-full', index);
  850 + }
  851 + clearTimeout(timer);
  852 + timer = setTimeout(function(){
  853 + var isfix = layero.css('position') === 'fixed';
  854 + layer.style(index, {
  855 + top: isfix ? 0 : win.scrollTop(),
  856 + left: isfix ? 0 : win.scrollLeft(),
  857 + width: win.width(),
  858 + height: win.height()
  859 + }, true);
  860 + layero.find('.layui-layer-min').hide();
  861 + }, 100);
  862 +};
  863 +
  864 +//改变title
  865 +layer.title = function(name, index){
  866 + var title = $('#'+ doms[0] + (index||layer.index)).find(doms[1]);
  867 + title.html(name);
  868 +};
  869 +
  870 +//关闭layer总方法
  871 +layer.close = function(index){
  872 + var layero = $('#'+ doms[0] + index), type = layero.attr('type'), closeAnim = 'layer-anim-close';
  873 + if(!layero[0]) return;
  874 + var WRAP = 'layui-layer-wrap', remove = function(){
  875 + if(type === ready.type[1] && layero.attr('conType') === 'object'){
  876 + layero.children(':not(.'+ doms[5] +')').remove();
  877 + var wrap = layero.find('.'+WRAP);
  878 + for(var i = 0; i < 2; i++){
  879 + wrap.unwrap();
  880 + }
  881 + wrap.css('display', wrap.data('display')).removeClass(WRAP);
  882 + } else {
  883 + //低版本IE 回收 iframe
  884 + if(type === ready.type[2]){
  885 + try {
  886 + var iframe = $('#'+doms[4]+index)[0];
  887 + iframe.contentWindow.document.write('');
  888 + iframe.contentWindow.close();
  889 + layero.find('.'+doms[5])[0].removeChild(iframe);
  890 + } catch(e){}
  891 + }
  892 + layero[0].innerHTML = '';
  893 + layero.remove();
  894 + }
  895 + typeof ready.end[index] === 'function' && ready.end[index]();
  896 + delete ready.end[index];
  897 + };
  898 +
  899 + if(layero.data('isOutAnim')){
  900 + layero.addClass(closeAnim);
  901 + }
  902 +
  903 + $('#layui-layer-moves, #layui-layer-shade' + index).remove();
  904 + layer.ie == 6 && ready.reselect();
  905 + ready.rescollbar(index);
  906 + if(layero.attr('minLeft')){
  907 + ready.minIndex--;
  908 + ready.minLeft.push(layero.attr('minLeft'));
  909 + }
  910 +
  911 + if((layer.ie && layer.ie < 10) || !layero.data('isOutAnim')){
  912 + remove()
  913 + } else {
  914 + setTimeout(function(){
  915 + remove();
  916 + }, 200);
  917 + }
  918 +};
  919 +
  920 +//关闭所有层
  921 +layer.closeAll = function(type){
  922 + $.each($('.'+doms[0]), function(){
  923 + var othis = $(this);
  924 + var is = type ? (othis.attr('type') === type) : 1;
  925 + is && layer.close(othis.attr('times'));
  926 + is = null;
  927 + });
  928 +};
  929 +
  930 +/**
  931 +
  932 + 拓展模块,layui开始合并在一起
  933 +
  934 + */
  935 +
  936 +var cache = layer.cache||{}, skin = function(type){
  937 + return (cache.skin ? (' ' + cache.skin + ' ' + cache.skin + '-'+type) : '');
  938 +};
  939 +
  940 +//仿系统prompt
  941 +layer.prompt = function(options, yes){
  942 + var style = '';
  943 + options = options || {};
  944 +
  945 + if(typeof options === 'function') yes = options;
  946 +
  947 + if(options.area){
  948 + var area = options.area;
  949 + style = 'style="width: '+ area[0] +'; height: '+ area[1] + ';"';
  950 + delete options.area;
  951 + }
  952 + var prompt, content = options.formType == 2 ? '<textarea class="layui-layer-input"' + style +'>' + (options.value||'') +'</textarea>' : function(){
  953 + return '<input type="'+ (options.formType == 1 ? 'password' : 'text') +'" class="layui-layer-input" value="'+ (options.value||'') +'">';
  954 + }();
  955 +
  956 + var success = options.success;
  957 + delete options.success;
  958 +
  959 + return layer.open($.extend({
  960 + type: 1
  961 + ,btn: ['&#x786E;&#x5B9A;','&#x53D6;&#x6D88;']
  962 + ,content: content
  963 + ,skin: 'layui-layer-prompt' + skin('prompt')
  964 + ,maxWidth: win.width()
  965 + ,success: function(layero){
  966 + prompt = layero.find('.layui-layer-input');
  967 + prompt.focus();
  968 + typeof success === 'function' && success(layero);
  969 + }
  970 + ,resize: false
  971 + ,yes: function(index){
  972 + var value = prompt.val();
  973 + if(value === ''){
  974 + prompt.focus();
  975 + } else if(value.length > (options.maxlength||500)) {
  976 + layer.tips('&#x6700;&#x591A;&#x8F93;&#x5165;'+ (options.maxlength || 500) +'&#x4E2A;&#x5B57;&#x6570;', prompt, {tips: 1});
  977 + } else {
  978 + yes && yes(value, index, prompt);
  979 + }
  980 + }
  981 + }, options));
  982 +};
  983 +
  984 +//tab层
  985 +layer.tab = function(options){
  986 + options = options || {};
  987 +
  988 + var tab = options.tab || {}
  989 + ,success = options.success;
  990 +
  991 + delete options.success;
  992 +
  993 + return layer.open($.extend({
  994 + type: 1,
  995 + skin: 'layui-layer-tab' + skin('tab'),
  996 + resize: false,
  997 + title: function(){
  998 + var len = tab.length, ii = 1, str = '';
  999 + if(len > 0){
  1000 + str = '<span class="layui-layer-tabnow">'+ tab[0].title +'</span>';
  1001 + for(; ii < len; ii++){
  1002 + str += '<span>'+ tab[ii].title +'</span>';
  1003 + }
  1004 + }
  1005 + return str;
  1006 + }(),
  1007 + content: '<ul class="layui-layer-tabmain">'+ function(){
  1008 + var len = tab.length, ii = 1, str = '';
  1009 + if(len > 0){
  1010 + str = '<li class="layui-layer-tabli xubox_tab_layer">'+ (tab[0].content || 'no content') +'</li>';
  1011 + for(; ii < len; ii++){
  1012 + str += '<li class="layui-layer-tabli">'+ (tab[ii].content || 'no content') +'</li>';
  1013 + }
  1014 + }
  1015 + return str;
  1016 + }() +'</ul>',
  1017 + success: function(layero){
  1018 + var btn = layero.find('.layui-layer-title').children();
  1019 + var main = layero.find('.layui-layer-tabmain').children();
  1020 + btn.on('mousedown', function(e){
  1021 + e.stopPropagation ? e.stopPropagation() : e.cancelBubble = true;
  1022 + var othis = $(this), index = othis.index();
  1023 + othis.addClass('layui-layer-tabnow').siblings().removeClass('layui-layer-tabnow');
  1024 + main.eq(index).show().siblings().hide();
  1025 + typeof options.change === 'function' && options.change(index);
  1026 + });
  1027 + typeof success === 'function' && success(layero);
  1028 + }
  1029 + }, options));
  1030 +};
  1031 +
  1032 +//相册层
  1033 +layer.photos = function(options, loop, key){
  1034 + var dict = {};
  1035 + options = options || {};
  1036 + if(!options.photos) return;
  1037 + var type = options.photos.constructor === Object;
  1038 + var photos = type ? options.photos : {}, data = photos.data || [];
  1039 + var start = photos.start || 0;
  1040 + dict.imgIndex = (start|0) + 1;
  1041 +
  1042 + options.img = options.img || 'img';
  1043 +
  1044 + var success = options.success;
  1045 + delete options.success;
  1046 +
  1047 + if(!type){ //页面直接获取
  1048 + var parent = $(options.photos), pushData = function(){
  1049 + data = [];
  1050 + parent.find(options.img).each(function(index){
  1051 + var othis = $(this);
  1052 + othis.attr('layer-index', index);
  1053 + data.push({
  1054 + alt: othis.attr('alt'),
  1055 + pid: othis.attr('layer-pid'),
  1056 + src: othis.attr('layer-src') || othis.attr('src'),
  1057 + thumb: othis.attr('src')
  1058 + });
  1059 + })
  1060 + };
  1061 +
  1062 + pushData();
  1063 +
  1064 + if (data.length === 0) return;
  1065 +
  1066 + loop || parent.on('click', options.img, function(){
  1067 + var othis = $(this), index = othis.attr('layer-index');
  1068 + layer.photos($.extend(options, {
  1069 + photos: {
  1070 + start: index,
  1071 + data: data,
  1072 + tab: options.tab
  1073 + },
  1074 + full: options.full
  1075 + }), true);
  1076 + pushData();
  1077 + })
  1078 +
  1079 + //不直接弹出
  1080 + if(!loop) return;
  1081 +
  1082 + } else if (data.length === 0){
  1083 + return layer.msg('&#x6CA1;&#x6709;&#x56FE;&#x7247;');
  1084 + }
  1085 +
  1086 + //上一张
  1087 + dict.imgprev = function(key){
  1088 + dict.imgIndex--;
  1089 + if(dict.imgIndex < 1){
  1090 + dict.imgIndex = data.length;
  1091 + }
  1092 + dict.tabimg(key);
  1093 + };
  1094 +
  1095 + //下一张
  1096 + dict.imgnext = function(key,errorMsg){
  1097 + dict.imgIndex++;
  1098 + if(dict.imgIndex > data.length){
  1099 + dict.imgIndex = 1;
  1100 + if (errorMsg) {return};
  1101 + }
  1102 + dict.tabimg(key)
  1103 + };
  1104 +
  1105 + //方向键
  1106 + dict.keyup = function(event){
  1107 + if(!dict.end){
  1108 + var code = event.keyCode;
  1109 + event.preventDefault();
  1110 + if(code === 37){
  1111 + dict.imgprev(true);
  1112 + } else if(code === 39) {
  1113 + dict.imgnext(true);
  1114 + } else if(code === 27) {
  1115 + layer.close(dict.index);
  1116 + }
  1117 + }
  1118 + }
  1119 +
  1120 + //切换
  1121 + dict.tabimg = function(key){
  1122 + if(data.length <= 1) return;
  1123 + photos.start = dict.imgIndex - 1;
  1124 + layer.close(dict.index);
  1125 + return layer.photos(options, true, key);
  1126 + setTimeout(function(){
  1127 + layer.photos(options, true, key);
  1128 + }, 200);
  1129 + }
  1130 +
  1131 + //一些动作
  1132 + dict.event = function(){
  1133 + dict.bigimg.hover(function(){
  1134 + dict.imgsee.show();
  1135 + }, function(){
  1136 + dict.imgsee.hide();
  1137 + });
  1138 +
  1139 + dict.bigimg.find('.layui-layer-imgprev').on('click', function(event){
  1140 + event.preventDefault();
  1141 + dict.imgprev();
  1142 + });
  1143 +
  1144 + dict.bigimg.find('.layui-layer-imgnext').on('click', function(event){
  1145 + event.preventDefault();
  1146 + dict.imgnext();
  1147 + });
  1148 +
  1149 + $(document).on('keyup', dict.keyup);
  1150 + };
  1151 +
  1152 + //图片预加载
  1153 + function loadImage(url, callback, error) {
  1154 + var img = new Image();
  1155 + img.src = url;
  1156 + if(img.complete){
  1157 + return callback(img);
  1158 + }
  1159 + img.onload = function(){
  1160 + img.onload = null;
  1161 + callback(img);
  1162 + };
  1163 + img.onerror = function(e){
  1164 + img.onerror = null;
  1165 + error(e);
  1166 + };
  1167 + };
  1168 +
  1169 + dict.loadi = layer.load(1, {
  1170 + shade: 'shade' in options ? false : 0.9,
  1171 + scrollbar: false
  1172 + });
  1173 +
  1174 + loadImage(data[start].src, function(img){
  1175 + layer.close(dict.loadi);
  1176 + dict.index = layer.open($.extend({
  1177 + type: 1,
  1178 + id: 'layui-layer-photos',
  1179 + area: function(){
  1180 + var imgarea = [img.width, img.height];
  1181 + var winarea = [$(window).width() - 100, $(window).height() - 100];
  1182 +
  1183 + //如果 实际图片的宽或者高比 屏幕大(那么进行缩放)
  1184 + if(!options.full && (imgarea[0]>winarea[0]||imgarea[1]>winarea[1])){
  1185 + var wh = [imgarea[0]/winarea[0],imgarea[1]/winarea[1]];//取宽度缩放比例、高度缩放比例
  1186 + if(wh[0] > wh[1]){//取缩放比例最大的进行缩放
  1187 + imgarea[0] = imgarea[0]/wh[0];
  1188 + imgarea[1] = imgarea[1]/wh[0];
  1189 + } else if(wh[0] < wh[1]){
  1190 + imgarea[0] = imgarea[0]/wh[1];
  1191 + imgarea[1] = imgarea[1]/wh[1];
  1192 + }
  1193 + }
  1194 +
  1195 + return [imgarea[0]+'px', imgarea[1]+'px'];
  1196 + }(),
  1197 + title: false,
  1198 + shade: 0.9,
  1199 + shadeClose: true,
  1200 + closeBtn: false,
  1201 + move: '.layui-layer-phimg img',
  1202 + moveType: 1,
  1203 + scrollbar: false,
  1204 + moveOut: true,
  1205 + //anim: Math.random()*5|0,
  1206 + isOutAnim: false,
  1207 + skin: 'layui-layer-photos' + skin('photos'),
  1208 + content: '<div class="layui-layer-phimg">'
  1209 + +'<img src="'+ data[start].src +'" alt="'+ (data[start].alt||'') +'" layer-pid="'+ data[start].pid +'">'
  1210 + +'<div class="layui-layer-imgsee">'
  1211 + +(data.length > 1 ? '<span class="layui-layer-imguide"><a href="javascript:;" class="layui-layer-iconext layui-layer-imgprev"></a><a href="javascript:;" class="layui-layer-iconext layui-layer-imgnext"></a></span>' : '')
  1212 + +'<div class="layui-layer-imgbar" style="display:'+ (key ? 'block' : '') +'"><span class="layui-layer-imgtit"><a href="javascript:;">'+ (data[start].alt||'') +'</a><em>'+ dict.imgIndex +'/'+ data.length +'</em></span></div>'
  1213 + +'</div>'
  1214 + +'</div>',
  1215 + success: function(layero, index){
  1216 + dict.bigimg = layero.find('.layui-layer-phimg');
  1217 + dict.imgsee = layero.find('.layui-layer-imguide,.layui-layer-imgbar');
  1218 + dict.event(layero);
  1219 + options.tab && options.tab(data[start], layero);
  1220 + typeof success === 'function' && success(layero);
  1221 + }, end: function(){
  1222 + dict.end = true;
  1223 + $(document).off('keyup', dict.keyup);
  1224 + }
  1225 + }, options));
  1226 + }, function(){
  1227 + layer.close(dict.loadi);
  1228 + layer.msg('&#x5F53;&#x524D;&#x56FE;&#x7247;&#x5730;&#x5740;&#x5F02;&#x5E38;<br>&#x662F;&#x5426;&#x7EE7;&#x7EED;&#x67E5;&#x770B;&#x4E0B;&#x4E00;&#x5F20;&#xFF1F;', {
  1229 + time: 30000,
  1230 + btn: ['&#x4E0B;&#x4E00;&#x5F20;', '&#x4E0D;&#x770B;&#x4E86;'],
  1231 + yes: function(){
  1232 + data.length > 1 && dict.imgnext(true,true);
  1233 + }
  1234 + });
  1235 + });
  1236 +};
  1237 +
  1238 +//主入口
  1239 +ready.run = function(_$){
  1240 + $ = _$;
  1241 + win = $(window);
  1242 + doms.html = $('html');
  1243 + layer.open = function(deliver){
  1244 + var o = new Class(deliver);
  1245 + return o.index;
  1246 + };
  1247 +};
  1248 +
  1249 +//加载方式
  1250 +window.layui && layui.define ? (
  1251 + layer.ready()
  1252 + ,layui.define('jquery', function(exports){ //layui加载
  1253 + layer.path = layui.cache.dir;
  1254 + ready.run(layui.jquery);
  1255 +
  1256 + //暴露模块
  1257 + window.layer = layer;
  1258 + exports('layer', layer);
  1259 + })
  1260 +) : (
  1261 + (typeof define === 'function' && define.amd) ? define(['jquery'], function(){ //requirejs加载
  1262 + ready.run(window.jQuery);
  1263 + return layer;
  1264 + }) : function(){ //普通script标签加载
  1265 + ready.run(window.jQuery);
  1266 + layer.ready();
  1267 + }()
  1268 +);
  1269 +
  1270 +}(window);
... ...
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/css/north.css
... ... @@ -365,4 +365,120 @@
365 365 font-size: 18px !important;
366 366 font-family: Microsoft Yahei !important;
367 367 color: blue !important;
  368 +}
  369 +
  370 +
  371 +
  372 +.sch-edit-info-table dl dt:nth-of-type(1), .sch-edit-info-table dl dd:nth-of-type(1) {
  373 + width: 4%;
  374 +}
  375 +.sch-edit-info-table dl dd:nth-of-type(1){
  376 + background: #eae8e8;
  377 + border-right: 1px solid #b3b3b3;
  378 + text-align: center;
  379 + text-indent: -3px;
  380 + color: #000;
  381 +}
  382 +.sch-edit-info-table dl dt:nth-of-type(2), .sch-edit-info-table dl dd:nth-of-type(2) {
  383 + width: 4%;
  384 +}
  385 +
  386 +.sch-edit-info-table dl dt:nth-of-type(3), .sch-edit-info-table dl dd:nth-of-type(3) {
  387 + width: 8%;
  388 +}
  389 +
  390 +.sch-edit-info-table dl dt:nth-of-type(4), .sch-edit-info-table dl dd:nth-of-type(4) {
  391 + width: 12%;
  392 +}
  393 +.sch-edit-info-table dl dt:nth-of-type(5), .sch-edit-info-table dl dd:nth-of-type(5) {
  394 + width: 8%;
  395 +}
  396 +.sch-edit-info-table dl dt:nth-of-type(6), .sch-edit-info-table dl dd:nth-of-type(6) {
  397 + width: 64%;
  398 +}
  399 +
  400 +.sch-edit-info-table dl:nth-of-type(odd){
  401 +
  402 +}
  403 +
  404 +.ct-badge {
  405 + display: inline-block;
  406 + font-size: 12px;
  407 + text-indent: 0;
  408 + padding: 2px 3px 2px;
  409 + height: 15px;
  410 + line-height: 17px;
  411 + border-bottom: 1px dotted;
  412 +}
  413 +
  414 +.ct-badge.ct-badge-DFTZ{
  415 + color: #3bb540;
  416 +}
  417 +
  418 +.ct-badge.ct-badge-DFTZ:hover{
  419 + background: #3bb540;
  420 + color: #fff;
  421 +}
  422 +
  423 +.ct-badge.ct-badge-SFTZ{
  424 + color: #3bb540;
  425 +}
  426 +
  427 +.ct-badge.ct-badge-SFTZ:hover{
  428 + background: #3bb540;
  429 + color: #fff;
  430 +}
  431 +
  432 +.ct-badge.ct-badge-FCXXWT {
  433 + color: #2844e0;
  434 +}
  435 +
  436 +.ct-badge.ct-badge-FCXXWT:hover{
  437 + background: #2844e0;
  438 + color: #fff;
  439 +}
  440 +
  441 +.ct-badge.ct-badge-JHLB {
  442 + color: #f92970;
  443 +}
  444 +
  445 +.edit-info-tip p {
  446 + margin: 0 0 5px 0;
  447 + font-size: 14px;
  448 +}
  449 +
  450 +.edit-info-tip p.text {
  451 + padding: 0px 0px 7px 0;
  452 + border-bottom: 1px solid #dddddc;
  453 +}
  454 +
  455 +.edit-info-tip p.sub_text{
  456 + color: #807f7f;
  457 +}
  458 +
  459 +.ct-badge.ct-badge-CXLB{
  460 + color: grey;
  461 +}
  462 +
  463 +.ct-badge.ct-badge-CXSF:hover{
  464 + background: #cccccc;
  465 +}
  466 +
  467 +.ct-badge.ct-badge-CXZX:hover{
  468 + background: #cccccc;
  469 +}
  470 +
  471 +.ct-badge.ct-badge-JHLB:hover{
  472 + background: #f92970;
  473 + color: #fff;
  474 +}
  475 +
  476 +
  477 +.ct-badge.ct-badge-TZRC {
  478 + color: #97a50f;
  479 +}
  480 +
  481 +.ct-badge.ct-badge-TZRC:hover{
  482 + background: #97a50f;
  483 + color: #fff;
368 484 }
369 485 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/dftz.html
... ... @@ -9,6 +9,7 @@
9 9  
10 10 <script id="schedule-dftz-form-temp" type="text/html">
11 11 <input type="hidden" name="id" value="{{id}}"/>
  12 + <input type="hidden" name="opType" value="1"/>
12 13 <div class="uk-grid">
13 14 <div class="uk-width-1-2">
14 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 191 e.preventDefault();
192 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 197 return;
197 198 }
198 199  
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/history_sch_maintain.html
1 1 <div class="uk-modal ct_move_modal" id="history-sch-maintain-modal">
2 2 <div class="uk-modal-dialog" style="width: 1180px;">
3 3 <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
4 5 <h2>历史路单维护</h2>
  6 + </div>
5 7  
6 8 <div style="padding-left: 12px;margin: 20px 0">
7 9 <ul class="uk-subnav uk-subnav-pill h-s-time">
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/safeDriving.html
1 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 3 <a href="" class="uk-modal-close uk-close"></a>
4 4 <div class="uk-modal-header">
5 5 <h2>安全驾驶图像信息(当日)</h2></div>
... ... @@ -26,7 +26,7 @@
26 26 <option value="A7">行驶中与人交谈</option>
27 27 </select>
28 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 30 </fieldset>
31 31 </form>
32 32 </div>
... ... @@ -34,14 +34,15 @@
34 34 <table class="ct-fixed-table uk-table uk-table-hover">
35 35 <thead>
36 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 44 <th>视频</th>
  45 + <th style="width: 8%;">实时视频</th>
45 46 </tr>
46 47 </thead>
47 48 <tbody data-uk-observe>
... ... @@ -75,7 +76,10 @@
75 76 <a class="image_link" href="{{sd.url}}.jpg" data-uk-lightbox="{group:'jpg_group1'}" title="{{sd.title}}">JPG</a>
76 77 </td>
77 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 83 </td>
80 84 </tr>
81 85 {{/each}}
... ... @@ -88,9 +92,14 @@
88 92 var page = 0;
89 93 var pageSize = 12;
90 94  
91   - $('#showSSSpVedioModal', modal).on('click', function () {
  95 + /*$('#showSSSpVedioModal', modal).on('click', function () {
92 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 103 $(modal).on('init', function(e, data) {
95 104 e.stopPropagation();
96 105  
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/sch_edit_info/list.html 0 → 100644
  1 +<div class="uk-modal ct_move_modal" id="history-sch-edit-info-modal">
  2 + <div class="uk-modal-dialog" style="width: 1280px;">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>班次修正日志</h2>
  6 + </div>
  7 +
  8 + <div style="padding-left: 12px;margin: 20px 0">
  9 + <ul class="uk-subnav uk-subnav-pill h-s-time">
  10 + </ul>
  11 + </div>
  12 +
  13 + <div style="padding-left: 12px;">
  14 + <ul class="uk-subnav uk-subnav-pill h-s-line">
  15 + </ul>
  16 + </div>
  17 +
  18 + <div class="uk-panel uk-panel-box uk-panel-box-primary">
  19 + <form class="uk-form search-form">
  20 + <fieldset data-uk-margin>
  21 + <span class="horizontal-field">路牌</span>
  22 + <select name="lpName" style="width: 80px;"></select>
  23 + <span class="horizontal-field">上下行</span>
  24 + <select name="xlDir">
  25 + <option value="">全部</option>
  26 + <option value="0">上行</option>
  27 + <option value="1">下行</option>
  28 + </select>
  29 + &nbsp;
  30 + <span class="horizontal-field">车辆</span>
  31 + <div class="uk-autocomplete uk-form autocomplete-cars">
  32 + <input type="text" name="clZbh" placeholder="车辆自编号">
  33 + </div>
  34 + <span class="horizontal-field">驾驶员</span>
  35 + <div class="uk-autocomplete uk-form autocomplete-jsy">
  36 + <input type="text" name="jGh" placeholder="驾驶员">
  37 + </div>
  38 + <button class="uk-button">检索</button>
  39 +
  40 + <label style="float: right;font-size: 12px;color: #989797;">
  41 + <input type="checkbox" disabled> 显示系统修正日志
  42 + </label>
  43 + </fieldset>
  44 + </form>
  45 + </div>
  46 +
  47 + <div class="ct_table_wrap ct_table_no_border edit-info-table-wrap" style="height: 510px;">
  48 + <div class="ct_table sch-edit-info-table">
  49 + <div class="ct_table_head">
  50 + <dl>
  51 + <dt>序号</dt>
  52 + <dt>路牌</dt>
  53 + <dt>车辆</dt>
  54 + <dt>驾驶员</dt>
  55 + <dt>计发</dt>
  56 + <dt>修正记录</dt>
  57 + </dl>
  58 + </div>
  59 + <div class="ct_table_body">
  60 + </div>
  61 + </div>
  62 + </div>
  63 +
  64 + <div class="load-panel">
  65 + <i class="uk-icon-spinner uk-icon-spin"></i>
  66 + 正在加载数据
  67 + </div>
  68 + </div>
  69 +
  70 + <script id="history-sch-edit-info-temp" type="text/html">
  71 + {{each list as obj i}}
  72 + <dl>
  73 + <dd>{{i + 1}}</dd>
  74 + <dd>{{obj.lpName}}</dd>
  75 + <dd>{{obj.clZbh}}</dd>
  76 + <dd>{{obj.jGh}}/{{obj.jName}}</dd>
  77 + <dd>{{obj.fcsj}}</dd>
  78 + <dd>
  79 + {{each obj.editArray as e j}}
  80 + <div class="ct-badge ct-badge-{{e.type}}" data-id="{{e.id}}">
  81 + {{e.timeStr}}{{e.typeStr}}
  82 + </div>
  83 + {{/each}}
  84 + </dd>
  85 + </dl>
  86 + {{/each}}
  87 + </script>
  88 +
  89 + <!-- 待发调整 tip -->
  90 + <script id="edit-info-tip-dftz-temp" type="text/html">
  91 + <div class="edit-info-tip">
  92 + <p class="text">待发时间从 {{jsonArray.old}} 调整为 {{jsonArray.now}}</p>
  93 + <p class="sub_text">调整人:{{user}} 调整时间:{{timeStr}}</p>
  94 + {{if remarks!=null && remarks != ''}}
  95 + <p class="sub_text">备注:{{remarks}}</p>
  96 + {{/if}}
  97 + </div>
  98 + </script>
  99 +
  100 + <!-- 实发调整 -->
  101 + <script id="edit-info-tip-sftz-temp" type="text/html">
  102 + <div class="edit-info-tip">
  103 + <p class="text">实发时间由 {{jsonArray.old==null?'无':jsonArray.old}} 调整为 {{jsonArray.now}}</p>
  104 + <p class="sub_text">调整人:{{user}} 调整时间:{{timeStr}}</p>
  105 + {{if remarks!=null && remarks != ''}}
  106 + <p class="sub_text">备注:{{remarks}}</p>
  107 + {{/if}}
  108 + </div>
  109 + </script>
  110 +
  111 +
  112 + <!-- 发车信息微调 tip -->
  113 + <script id="edit-info-tip-fcxxwt-temp" type="text/html">
  114 + <div class="edit-info-tip">
  115 + {{each jsonArray as obj i}}
  116 + <p class="text">{{obj.title}} 由 {{obj.old==null?'无':obj.old}} 调整为 {{obj.now}}</p>
  117 + {{/each}}
  118 + <p class="sub_text">调整人:{{user}} 调整时间:{{timeStr}}</p>
  119 + {{if remarks!=null && remarks != ''}}
  120 + <p class="sub_text">备注:{{remarks}}</p>
  121 + {{/if}}
  122 + </div>
  123 + </script>
  124 +
  125 + <!-- 撤销实发tip -->
  126 + <script id="edit-info-tip-cxsf-temp" type="text/html">
  127 + <div class="edit-info-tip">
  128 + <p class="text">将实发时间 {{jsonArray.old_sfsj}} 撤销</p>
  129 + <p class="sub_text">调整人:{{user}} 调整时间:{{timeStr}}</p>
  130 + {{if remarks!=null && remarks != ''}}
  131 + <p class="sub_text">备注:{{remarks}}</p>
  132 + {{/if}}
  133 + </div>
  134 + </script>
  135 +
  136 + <!-- 撤销执行 -->
  137 + <script id="edit-info-tip-cxzx-temp" type="text/html">
  138 + <div class="edit-info-tip">
  139 + {{if jsonArray.old_sfsj != null}}
  140 + <p class="text">将实发时间 {{jsonArray.old_sfsj}} 撤销</p>
  141 + {{/if}}
  142 + {{if jsonArray.old_sdsj != null}}
  143 + <p class="text">将实达时间 {{jsonArray.old_sdsj}} 撤销</p>
  144 + {{/if}}
  145 + <p class="sub_text">调整人:{{user}} 调整时间:{{timeStr}}</p>
  146 + {{if remarks!=null && remarks != ''}}
  147 + <p class="sub_text">备注:{{remarks}}</p>
  148 + {{/if}}
  149 + </div>
  150 + </script>
  151 +
  152 + <!-- 调整人车 -->
  153 + <script id="edit-info-tip-tzrc-temp" type="text/html">
  154 + <div class="edit-info-tip">
  155 + {{if jsonArray.now_jsy != null}}
  156 + <p class="text">驾驶员从 {{jsonArray.old_jsy}} 调整为 {{jsonArray.now_jsy}}</p>
  157 + {{/if}}
  158 + {{if jsonArray.now_nbbm != null}}
  159 + <p class="text">车辆从 {{jsonArray.old_nbbm}} 调整为 {{jsonArray.now_nbbm}}</p>
  160 + {{/if}}
  161 + {{if jsonArray.now_spy != null}}
  162 + <p class="text">售票员从 {{jsonArray.old_spy}} 调整为 {{jsonArray.now_spy}}</p>
  163 + {{/if}}
  164 +
  165 + <p class="sub_text">调整人:{{user}} 调整时间:{{timeStr}}</p>
  166 + {{if remarks!=null && remarks != ''}}
  167 + <p class="sub_text">备注:{{remarks}}</p>
  168 + {{/if}}
  169 + </div>
  170 + </script>
  171 +
  172 + <script>
  173 + (function () {
  174 + var modal = '#history-sch-edit-info-modal';
  175 + var etInfos={};//id映射
  176 +
  177 + //滚动条
  178 + $('.edit-info-table-wrap', modal).perfectScrollbar({suppressScrollX: true});
  179 +
  180 + $(modal).on('init', function (e, data) {
  181 + e.stopPropagation();
  182 + $.get('/realSchedule/dateArray?c=1', function (rs) {
  183 + //日期tab
  184 + var tsStr = '';
  185 + $.each(rs, function (i) {
  186 + tsStr += '<li ' + (i == 0 ? 'class="uk-active"' : '') + '><a>' + this + '</a></li>';
  187 + });
  188 + $('.h-s-time', modal).html(tsStr);
  189 +
  190 + //线路tab
  191 + var xlStr = '';
  192 + $.each(gb_data_basic.activeLines, function (i) {
  193 + xlStr += '<li ' + (i == 0 ? 'class="uk-active"' : '') + ' data-id="' + this.lineCode + '"><a>' + this.name + '</a></li>';
  194 + });
  195 + $('.h-s-line', modal).html(xlStr);
  196 +
  197 + clearLpSelect();
  198 + //reLoadLp=true;
  199 + jsQuery();
  200 + });
  201 + });
  202 +
  203 + $(modal).on('refresh', jsQuery);
  204 +
  205 + $(modal).on('click', '.h-s-time li,.h-s-line li', function () {
  206 + if(loading)
  207 + return;
  208 + $(this).parent().find('li.uk-active').removeClass('uk-active');
  209 + $(this).addClass('uk-active');
  210 + clearLpSelect();
  211 + //检索之前将滚动条置顶
  212 + $('.edit-info-table-wrap', modal)[0].scrollTop = 0;
  213 + jsQuery();
  214 + });
  215 +
  216 + $('.search-form', modal).on('submit', function (e) {
  217 + try {
  218 + //检索之前将滚动条置顶
  219 + $('.edit-info-table-wrap', modal)[0].scrollTop = 0;
  220 + jsQuery();
  221 + }catch(e){
  222 + console.log(e);
  223 + }
  224 + return false;
  225 + });
  226 +
  227 + var reLoadLp;
  228 + var nbbmArray,jsyArray,lpArray,loading;
  229 + function jsQuery() {
  230 + var data = $('.search-form', modal).serializeJSON();
  231 + var rq = $('.h-s-time li.uk-active', modal).text(),
  232 + lineCode = $('.h-s-line li.uk-active', modal).data('id');
  233 + data.rq = rq;
  234 + data.lineCode = lineCode;
  235 + if(data.jGh.indexOf('/')!=-1){
  236 + var jsy=data.jGh.split('/');
  237 + data.jGh=jsy[0];
  238 + data.jName=jsy[1];
  239 + }
  240 +
  241 + $('.load-panel', modal).show();
  242 + loading=true;
  243 + gb_common.$get('/schEditInfo/_list', data, function (rs) {
  244 + etInfos = {};
  245 + nbbmArray=[];
  246 + jsyArray=[];
  247 + lpArray = [];
  248 + $.each(rs.list, function () {
  249 + this.jsonArray = JSON.parse(this.jsonArray);
  250 + etInfos[this.id] = this;
  251 +
  252 + nbbmArray.push({value: this.clZbh});
  253 + jsyArray.push({value: this.jGh+'/'+this.jName,
  254 + fullChars: pinyin.getFullChars(this.jName).toUpperCase(),
  255 + camelChars: pinyin.getCamelChars(this.jName)});
  256 + lpArray.push({value: this.lpName});
  257 + });
  258 + //根据班次ID合并修正操作
  259 + var list = mergeData(rs.list).sort(sortFun);
  260 + var htmlStr = template('history-sch-edit-info-temp', {list: list});
  261 + $('.sch-edit-info-table .ct_table_body', modal).html(htmlStr);
  262 + $('.load-panel', modal).hide();
  263 + loading=false;
  264 +
  265 + //value
  266 + nbbmArray=distinctByField(nbbmArray);
  267 + jsyArray=distinctByField(jsyArray);
  268 + lpArray=distinctByField(lpArray);
  269 + if(reLoadLp){
  270 + //路牌下拉框
  271 + var ops = '<option value="">全部</option>';
  272 + $.each(lpArray, function () {
  273 + ops += '<option value="'+this.value+'">'+this.value+'</option>';
  274 + });
  275 + $('[name=lpName]', modal).html(ops);
  276 + reLoadLp = false;
  277 + }
  278 +
  279 + //更新滚动条高度
  280 + $('.edit-info-table-wrap', modal).perfectScrollbar('update');
  281 + });
  282 + }
  283 +
  284 + function clearLpSelect() {
  285 + $('[name=lpName_eq]', modal).val('').html('');
  286 + reLoadLp = true;
  287 + }
  288 +
  289 + //nbbm autocomplete
  290 + var carAutoCom=$('.autocomplete-cars', modal);
  291 + UIkit.autocomplete(carAutoCom, {
  292 + minLength: 1,
  293 + delay: 50,
  294 + source: function(release) {
  295 + var q = $('input', carAutoCom).val().toUpperCase()
  296 + ,rs = [],
  297 + count = 0;
  298 + $.each(nbbmArray, function () {
  299 + if(this.value.indexOf(q) != -1){
  300 + rs.push(this);
  301 + count++;
  302 + }
  303 + if (count >= 15)
  304 + return false;
  305 + });
  306 + release && release(rs);
  307 + }
  308 + });
  309 +
  310 + //jsy autocomplete
  311 + var jsyAutoCom=$('.autocomplete-jsy', modal);
  312 + UIkit.autocomplete(jsyAutoCom, {
  313 + minLength: 1,
  314 + delay: 50,
  315 + source: function(release) {
  316 + var q = $('input', jsyAutoCom).val().toUpperCase()
  317 + ,rs = [],
  318 + count = 0;
  319 +
  320 + $.each(jsyArray, function() {
  321 + if (this.value.indexOf(q) != -1 || this.fullChars.indexOf(q) != -1 || this.camelChars.indexOf(q) != -1){
  322 + rs.push(this);
  323 + count++;
  324 + }
  325 +
  326 + if (count >= 10)
  327 + return false;
  328 + });
  329 + release && release(rs);
  330 + }
  331 + });
  332 +
  333 + function distinctByField(arr, f){
  334 + if(!f)
  335 + f = 'value';
  336 + var rs = {};
  337 + $.each(arr, function () {
  338 + rs[this[f]]=this;
  339 + });
  340 + return gb_common.get_vals(rs);
  341 + }
  342 +
  343 + function mergeData(list) {
  344 + var rs = {};
  345 + $.each(list, function () {
  346 + if(rs[this.schId]){
  347 + rs[this.schId]['editArray'].push(subData(this));
  348 + }
  349 + else{
  350 + rs[this.schId] = {
  351 + schId: this.schId,
  352 + clZbh: this.clZbh,
  353 + fcsj: this.fcsj,
  354 + gsbm: this.gsbm,
  355 + fgsbm: this.fgsbm,
  356 + lineCode: this.lineCode,
  357 + lpName: this.lpName,
  358 + jGh: this.jGh,
  359 + jName: this.jName,
  360 + realExecDate: this.realExecDate,
  361 + editArray: [subData(this)]
  362 + }
  363 + }
  364 + });
  365 + return gb_common.get_vals(rs);
  366 + }
  367 +
  368 + var types = {'DFTZ': '待发调整', 'FCXXWT':'发车信息微调', 'JHLB': '计划烂班', 'CXLB': '撤销烂班', 'CXZX': '撤销执行', 'CXSF': '撤销实发', 'SFTZ': '实发调整', 'TZRC': '调整人车'};
  369 + function subData(data){
  370 + return {
  371 + id: data.id,
  372 + type: data.type,
  373 + typeStr: types[data.type]?types[data.type]:data.type,
  374 + type2: data.type2,
  375 + user: data.user,
  376 + jsonArray: data.jsonArray,
  377 + remarks: data.remarks,
  378 + timeStr: data.timeStr
  379 + }
  380 + }
  381 + gb_ct_table.fixedHead($('.ct_table_wrap', modal));
  382 +
  383 +
  384 + /**
  385 + * 鼠标悬停、显示详细
  386 + */
  387 + var _opts = {
  388 + show:{ready: true, delay: 300},
  389 + position: {viewport: $(window), my: 'top center', at: 'bottom center'},
  390 + hide: {fixed: true, delay: 300},
  391 + events: {
  392 + hidden: function(event, api) {
  393 + $(this).qtip('destroy', true);
  394 + }
  395 + }
  396 + };
  397 + //待发调整tip
  398 + $(modal).on('mouseenter', '.ct-badge.ct-badge-DFTZ', function() {
  399 + $(this).qtip({
  400 + show: _opts.show,
  401 + content: {
  402 + title: '待发调整',
  403 + text: function() {
  404 + var obj = etInfos[$(this).data('id')];
  405 + return template('edit-info-tip-dftz-temp', obj);
  406 + }
  407 + },
  408 + position: _opts.position,
  409 + style: {
  410 + classes: 'qtip-green qtip-rounded qtip-shadow sch-badge-tip'
  411 + },
  412 + hide: _opts.hide,
  413 + events: _opts.events
  414 + });
  415 + });
  416 +
  417 + //实发调整tip
  418 + $(modal).on('mouseenter', '.ct-badge.ct-badge-SFTZ', function() {
  419 + $(this).qtip({
  420 + show: _opts.show,
  421 + content: {
  422 + title: '实发调整',
  423 + text: function() {
  424 + var obj = etInfos[$(this).data('id')];
  425 + return template('edit-info-tip-sftz-temp', obj);
  426 + }
  427 + },
  428 + position: _opts.position,
  429 + style: {
  430 + classes: 'qtip-green qtip-rounded qtip-shadow sch-badge-tip'
  431 + },
  432 + hide: _opts.hide,
  433 + events: _opts.events
  434 + });
  435 + });
  436 +
  437 + //发车信息微调tip
  438 + $(modal).on('mouseenter', '.ct-badge.ct-badge-FCXXWT', function() {
  439 + $(this).qtip({
  440 + show: _opts.show,
  441 + content: {
  442 + title: '发车信息微调',
  443 + text: function() {
  444 + var obj = etInfos[$(this).data('id')];
  445 + return template('edit-info-tip-fcxxwt-temp', obj);
  446 + }
  447 + },
  448 + position: _opts.position,
  449 + style: {
  450 + classes: 'qtip-blue qtip-rounded qtip-shadow sch-badge-tip'
  451 + },
  452 + hide: _opts.hide,
  453 + events: _opts.events
  454 + });
  455 + });
  456 +
  457 + //撤销实发tip
  458 + $(modal).on('mouseenter', '.ct-badge.ct-badge-CXSF', function() {
  459 + $(this).qtip({
  460 + show: _opts.show,
  461 + content: {
  462 + title: '撤销实发',
  463 + text: function() {
  464 + var obj = etInfos[$(this).data('id')];
  465 + return template('edit-info-tip-cxsf-temp', obj);
  466 + }
  467 + },
  468 + position: _opts.position,
  469 + style: {
  470 + classes: 'qtip-light qtip-rounded qtip-shadow sch-badge-tip'
  471 + },
  472 + hide: _opts.hide,
  473 + events: _opts.events
  474 + });
  475 + });
  476 +
  477 + //撤销执行tip
  478 + $(modal).on('mouseenter', '.ct-badge.ct-badge-CXZX', function() {
  479 + $(this).qtip({
  480 + show: _opts.show,
  481 + content: {
  482 + title: '撤销执行',
  483 + text: function() {
  484 + var obj = etInfos[$(this).data('id')];
  485 + return template('edit-info-tip-cxzx-temp', obj);
  486 + }
  487 + },
  488 + position: _opts.position,
  489 + style: {
  490 + classes: 'qtip-light qtip-rounded qtip-shadow sch-badge-tip'
  491 + },
  492 + hide: _opts.hide,
  493 + events: _opts.events
  494 + });
  495 + });
  496 +
  497 + //计划烂班tip
  498 + $(modal).on('mouseenter', '.ct-badge.ct-badge-JHLB', function() {
  499 + $(this).qtip({
  500 + show: _opts.show,
  501 + content: {
  502 + text: function() {
  503 + var obj = etInfos[$(this).data('id')];
  504 + return obj.remarks;
  505 + }
  506 + },
  507 + position: _opts.position,
  508 + style: {
  509 + classes: 'qtip-red qtip-rounded qtip-shadow sch-badge-tip'
  510 + },
  511 + hide: _opts.hide,
  512 + events: _opts.events
  513 + });
  514 + });
  515 +
  516 + //调整人车tip
  517 + $(modal).on('mouseenter', '.ct-badge.ct-badge-TZRC', function() {
  518 + $(this).qtip({
  519 + show: _opts.show,
  520 + content: {
  521 + title: '调整人车',
  522 + text: function() {
  523 + var obj = etInfos[$(this).data('id')];
  524 + console.log('obj', obj);
  525 + return template('edit-info-tip-tzrc-temp', obj);
  526 + }
  527 + },
  528 + position: _opts.position,
  529 + style: {
  530 + classes: 'qtip-rounded qtip-shadow sch-badge-tip'
  531 + },
  532 + hide: _opts.hide,
  533 + events: _opts.events
  534 + });
  535 + });
  536 +
  537 +
  538 + function sortFun(a, b) {
  539 + return (a.realExecDate + a.fcsj).localeCompare(b.realExecDate + b.fcsj);
  540 + }
  541 + })();
  542 + </script>
  543 +</div>
0 544 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/js/data/json/north_toolbar.json
... ... @@ -28,6 +28,11 @@
28 28 "event": "history_sch_maintain"
29 29 },
30 30 {
  31 + "id": 1.41,
  32 + "text": "班次修正日志",
  33 + "event": "sch_edit_info"
  34 + },
  35 + {
31 36 "id": 1.5,
32 37 "divider": true
33 38 },
... ...
src/main/resources/static/real_control_v2/js/line_schedule/dbclick.js
... ... @@ -18,7 +18,8 @@ var gb_schedule_table_dbclick = (function() {
18 18 gb_common.$post('/realSchedule/outgoAdjust', {
19 19 id: id,
20 20 dfsj: val,
21   - remarks: ''
  21 + remarks: '',
  22 + opType: '0'
22 23 }, function(rs) {
23 24 gb_schedule_table.updateSchedule(rs.ts);
24 25 notify_succ('待发调整成功!');
... ...
src/main/resources/static/real_control_v2/js/main.js
... ... @@ -169,9 +169,8 @@ var disabled_submit_btn = function (form) {
169 169 function showUpdateDescription() {
170 170 //更新说明
171 171 var updateDescription = {
172   - date: '2017-05-18',
173   - text: '<h5>现在自定义子任务,勾选是否烂班后,烂班原因必填。</h5><h5>修复了在驾驶员请求出场时,误下发分班出场指令的问题</h5>' +
174   - '<h5>调整了报表的弹出窗口<br>1、取消了窗口遮罩,可同时打开多个报表窗口,窗口堆叠时,点击窗口title切换堆叠顺序<br>2、鼠标按住窗口右下角,可随意改变窗口大小。<br>3、拖动窗口时,允许拖出页面之外<br><br>注意:将窗口和窗口title拖出页面外时,会面临窗口丢失的风险,过多丢失的窗口会影响到页面性能,你可以刷新页面以重置!</h5>'
  172 + date: '2017-05-23',
  173 + text: '<h5>现在可以在 数据&统计 里面看到部分班次修正日志。05-23之后的数据开始展现</h5>'
175 174 };
176 175  
177 176 var storage = window.localStorage
... ...
src/main/resources/static/real_control_v2/js/north/toolbar.js
... ... @@ -228,6 +228,9 @@ var gb_northToolbar = (function () {
228 228 },
229 229 data_move_and_verification: function () {
230 230 open_modal('/real_control_v2/fragments/north/nav/dataManager/dataMoveAndVerification.html', {}, modal_opts);
  231 + },
  232 + sch_edit_info: function () {
  233 + open_modal('/real_control_v2/fragments/north/nav/sch_edit_info/list.html', {}, modal_opts);
231 234 }
232 235 };
233 236  
... ...
src/main/resources/static/real_control_v2/js/safe_driv/safeDriv.js
... ... @@ -10,7 +10,8 @@ var gb_safe_driv = (function () {
10 10 'A4': '未戴袖章',
11 11 'A5': '眨眼/疲劳驾驶',
12 12 'A6': '打哈欠/打瞌睡',
13   - 'A7': '与人交谈'
  13 + 'A7': '与人交谈',
  14 + 'A9': '玩手机'
14 15 };
15 16  
16 17 var path = 'http://118.178.187.115/CurrentSafeDriving/';
... ... @@ -32,7 +33,7 @@ var gb_safe_driv = (function () {
32 33 //图片地址
33 34 var p = (sd.sbbh+'_'+sd.yczltype+'_'+stm.format('YYYYMMDDHHmmss'));
34 35 var url = stm.format('YYYYMMDD')+'/'+p+'/'+p;
35   - sd.url = path + url + '.jpg';
  36 + sd.url = path + url + '.gif';
36 37  
37 38 var htmlStr = template('safe_driv_item-temp', sd);
38 39 var items = $wrap.find('.safe_driv_pop'), len = items.length;
... ... @@ -46,12 +47,12 @@ var gb_safe_driv = (function () {
46 47 '<div class="uk-modal-dialog uk-modal-dialog-large">' +
47 48 '<button type="button" class="uk-modal-close uk-close"></button>' +
48 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 51 '</div>' +
51 52 '</div>';
52 53  
53 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 56 var url = $(this).data('url');
56 57 $(this).remove();
57 58 var lightbox = UIkit.lightbox.create([
... ... @@ -61,8 +62,19 @@ var gb_safe_driv = (function () {
61 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 78 $('#ssspVedioModal #vedioIframe').on('load', function () {
67 79 var that = this;
68 80 setTimeout(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 92 return {
... ...
src/main/resources/static/real_control_v2/main.html
... ... @@ -206,7 +206,7 @@
206 206 <!-- #### 安全驾驶 start ### -->
207 207 <div class="safe_driv_pop_wrap" ></div>
208 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 210 <div>
211 211 <span class="title">异常&nbsp;{{clzbh}}</span>
212 212 <span class="text"> {{timeStr}} 出现违规驾驶({{ycztText}})</span>
... ...