Commit 731e2e90657d81419b0379076a66adaf2dfecb83

Authored by 游瑞烽
2 parents 1b36c794 5e1a4649

Merge remote-tracking branch 'origin/pudong' into pudong_test

# Conflicts:
#	src/main/java/com/bsth/controller/schedule/core/TTInfoDetailController_facade.java
#	src/main/resources/datatools/ktrs/ttinfodetailoutputforedit.ktr
Showing 68 changed files with 6897 additions and 5930 deletions
src/main/java/com/bsth/controller/oil/CwjyController.java
1 1 package com.bsth.controller.oil;
2 2  
3 3  
  4 +import java.io.File;
4 5 import java.util.Date;
5 6 import java.util.HashMap;
6 7 import java.util.List;
... ... @@ -11,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
11 12 import org.springframework.web.bind.annotation.RequestMethod;
12 13 import org.springframework.web.bind.annotation.RequestParam;
13 14 import org.springframework.web.bind.annotation.RestController;
  15 +import org.springframework.web.multipart.MultipartFile;
14 16  
15 17 import com.bsth.common.ResponseCode;
16 18 import com.bsth.controller.BaseController;
... ... @@ -22,6 +24,7 @@ import com.bsth.entity.sys.SysUser;
22 24 import com.bsth.security.util.SecurityUtils;
23 25 import com.bsth.service.oil.CwjyService;
24 26 import com.bsth.util.PageObject;
  27 +import com.google.common.io.Files;
25 28  
26 29 @RestController
27 30 @RequestMapping("cwjy")
... ... @@ -95,4 +98,23 @@ public class CwjyController extends BaseController<Cwjy, Integer>{
95 98 return maps;
96 99 }
97 100  
  101 + /*
  102 + * 场外加油导入
  103 + */
  104 + @RequestMapping(value = "/uploadFile",method = RequestMethod.POST)
  105 + public String uploadFile(MultipartFile file, String gsbm_, String gsName,
  106 + String fgsbm_, String fgsName) throws Exception{
  107 + Map<String, Object> map = new HashMap<String, Object>();
  108 + File newFile = new File(
  109 + getDataImportClasspath() + File.separator +
  110 + file.getOriginalFilename());
  111 + Files.write(file.getBytes(), newFile);
  112 + String result = service.importExcel(newFile, gsbm_, gsName);
  113 + return "{\"result\":" + "\""+result+"\"}";
  114 + }
  115 +
  116 + public String getDataImportClasspath(){
  117 + return this.getClass().getResource("/").getPath() + "/static/pages/oil";
  118 + }
  119 +
98 120 }
... ...
src/main/java/com/bsth/controller/realcontrol/ReportRegisterController.java
1   -package com.bsth.controller.realcontrol;
2   -
3   -import com.alibaba.fastjson.JSON;
4   -import com.alibaba.fastjson.JSONObject;
5   -import com.bsth.common.ResponseCode;
6   -import com.bsth.controller.BaseController;
7   -import com.bsth.data.report_register.ReportRegisterService;
8   -import com.bsth.data.report_register.entity.ReportRegister;
9   -import com.bsth.util.HttpClientUtils;
10   -import org.slf4j.Logger;
11   -import org.slf4j.LoggerFactory;
12   -import org.springframework.beans.factory.annotation.Autowired;
13   -import org.springframework.beans.propertyeditors.CustomDateEditor;
14   -import org.springframework.web.bind.WebDataBinder;
15   -import org.springframework.web.bind.annotation.InitBinder;
16   -import org.springframework.web.bind.annotation.PathVariable;
17   -import org.springframework.web.bind.annotation.RequestMapping;
18   -import org.springframework.web.bind.annotation.RequestMethod;
19   -import org.springframework.web.bind.annotation.RequestParam;
20   -import org.springframework.web.bind.annotation.RestController;
21   -import org.springframework.web.context.request.WebRequest;
22   -
23   -import java.text.DateFormat;
24   -import java.text.SimpleDateFormat;
25   -import java.util.Date;
26   -import java.util.HashMap;
27   -import java.util.Map;
28   -
29   -/**
30   - * 报备登记
31   - * Created by yrf on 2019/12/04.
32   - */
33   -@RestController
34   -@RequestMapping("reportRegister")
35   -public class ReportRegisterController extends BaseController<ReportRegister, Long>{
36   -
37   - Logger log = LoggerFactory.getLogger(this.getClass());
38   -
39   - final static String url = "http://114.80.178.13/complaint/TsReport/input.do";
40   -// final static String url = "http://192.168.168.228:8080/complaint/TsReport/input.do";
41   -
42   - @Autowired
43   - ReportRegisterService reportRegisterService;
44   -
45   - @InitBinder
46   - public void initBinder(WebDataBinder binder, WebRequest request) {
47   - //转换日期 注意这里的转化要和传进来的字符串的格式一直 如2015-9-9 就应该为yyyy-MM-dd
48   - DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
49   - binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));// CustomDateEditor为自定义日期编辑器
50   - }
51   -
52   -
53   - @RequestMapping(value = "/findList", method = RequestMethod.GET)
54   - public Map<String, Object> findList(@RequestParam Map<String, String> map) {
55   - return reportRegisterService.findList(map);
56   - }
57   -
58   - @RequestMapping(value = "/{id}", method = RequestMethod.GET)
59   - public ReportRegister findById(@PathVariable("id") Long id) {
60   - ReportRegister reportRegister = reportRegisterService.findById(id);
61   - return reportRegister;
62   - }
63   -
64   - @RequestMapping(value = "/delete", method = RequestMethod.POST)
65   - public Map<String, Object> deleteInfo(ReportRegister t) {
66   - Map<String, Object> map = new HashMap<>();
67   - try{
68   -// map = baseService.delete(id);
69   - reportRegisterService.deleteInfo(t);
70   - String data = "{ID:'"+t.getID()+"', STATUS:'2'}";
71   - StringBuilder sb = HttpClientUtils.post(url,data);
72   - JSONObject obj = JSON.parseObject(sb.toString());
73   - map.put("status2", obj);
74   - } catch (Exception e) {
75   - log.error(e.toString(), e);
76   - }
77   - return map;
78   - }
79   -
80   -
81   - @RequestMapping(method = RequestMethod.POST)
82   - public Map<String, Object> save(ReportRegister t) {
83   - Map<String, Object> map = new HashMap<>();
84   - try{
85   - reportRegisterService.save(t);
86   - map.put("status", ResponseCode.SUCCESS);
87   - map.put("t", t);
88   - StringBuilder sb = HttpClientUtils.post(url,t.toString());
89   - JSONObject obj = JSON.parseObject(sb.toString());
90   - map.put("status2", obj);
91   - } catch (Exception e) {
92   - log.error(e.toString(), e);
93   - }
94   - return map;
95   - }
96   -}
  1 +package com.bsth.controller.realcontrol;
  2 +
  3 +import com.alibaba.fastjson.JSON;
  4 +import com.alibaba.fastjson.JSONObject;
  5 +import com.bsth.common.ResponseCode;
  6 +import com.bsth.controller.BaseController;
  7 +import com.bsth.data.report_register.ReportRegisterService;
  8 +import com.bsth.data.report_register.entity.ReportRegister;
  9 +import com.bsth.util.HttpClientUtils;
  10 +import org.slf4j.Logger;
  11 +import org.slf4j.LoggerFactory;
  12 +import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.beans.propertyeditors.CustomDateEditor;
  14 +import org.springframework.web.bind.WebDataBinder;
  15 +import org.springframework.web.bind.annotation.InitBinder;
  16 +import org.springframework.web.bind.annotation.PathVariable;
  17 +import org.springframework.web.bind.annotation.RequestMapping;
  18 +import org.springframework.web.bind.annotation.RequestMethod;
  19 +import org.springframework.web.bind.annotation.RequestParam;
  20 +import org.springframework.web.bind.annotation.RestController;
  21 +import org.springframework.web.context.request.WebRequest;
  22 +
  23 +import java.text.DateFormat;
  24 +import java.text.SimpleDateFormat;
  25 +import java.util.Date;
  26 +import java.util.HashMap;
  27 +import java.util.Map;
  28 +
  29 +/**
  30 + * 报备登记
  31 + * Created by yrf on 2019/12/04.
  32 + */
  33 +@RestController
  34 +@RequestMapping("reportRegister")
  35 +public class ReportRegisterController extends BaseController<ReportRegister, Long>{
  36 +
  37 + Logger log = LoggerFactory.getLogger(this.getClass());
  38 +
  39 + final static String url = "http://114.80.178.13/complaint/TsReport/input.do";
  40 +// final static String url = "http://192.168.168.228:8080/complaint/TsReport/input.do";
  41 +
  42 + @Autowired
  43 + ReportRegisterService reportRegisterService;
  44 +
  45 + @InitBinder
  46 + public void initBinder(WebDataBinder binder, WebRequest request) {
  47 + //转换日期 注意这里的转化要和传进来的字符串的格式一直 如2015-9-9 就应该为yyyy-MM-dd
  48 + DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  49 + binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));// CustomDateEditor为自定义日期编辑器
  50 + }
  51 +
  52 +
  53 + @RequestMapping(value = "/findList", method = RequestMethod.GET)
  54 + public Map<String, Object> findList(@RequestParam Map<String, String> map) {
  55 + return reportRegisterService.findList(map);
  56 + }
  57 +
  58 + @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  59 + public ReportRegister findById(@PathVariable("id") Long id) {
  60 + ReportRegister reportRegister = reportRegisterService.findById(id);
  61 + return reportRegister;
  62 + }
  63 +
  64 + @RequestMapping(value = "/delete", method = RequestMethod.POST)
  65 + public Map<String, Object> deleteInfo(ReportRegister t) {
  66 + Map<String, Object> map = new HashMap<>();
  67 + try{
  68 +// map = baseService.delete(id);
  69 + reportRegisterService.deleteInfo(t);
  70 + String data = "{ID:'"+t.getID()+"', STATUS:'2'}";
  71 + StringBuilder sb = HttpClientUtils.post(url,data);
  72 + JSONObject obj = JSON.parseObject(sb.toString());
  73 + map.put("status2", obj);
  74 + } catch (Exception e) {
  75 + log.error(e.toString(), e);
  76 + }
  77 + return map;
  78 + }
  79 +
  80 +
  81 + @RequestMapping(method = RequestMethod.POST)
  82 + public Map<String, Object> save(ReportRegister t) {
  83 + Map<String, Object> map = new HashMap<>();
  84 + try{
  85 + reportRegisterService.save(t);
  86 + map.put("status", ResponseCode.SUCCESS);
  87 + map.put("t", t);
  88 + StringBuilder sb = HttpClientUtils.post(url,t.toString());
  89 + JSONObject obj = JSON.parseObject(sb.toString());
  90 + map.put("status2", obj);
  91 + } catch (Exception e) {
  92 + log.error(e.toString(), e);
  93 + }
  94 + return map;
  95 + }
  96 +}
... ...
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
1   -package com.bsth.controller.realcontrol;
2   -
3   -import java.util.ArrayList;
4   -import java.util.Arrays;
5   -import java.util.Collection;
6   -import java.util.HashMap;
7   -import java.util.List;
8   -import java.util.Map;
9   -
10   -import org.apache.commons.lang3.StringEscapeUtils;
11   -import org.joda.time.format.DateTimeFormat;
12   -import org.joda.time.format.DateTimeFormatter;
13   -import org.springframework.beans.factory.annotation.Autowired;
14   -import org.springframework.web.bind.annotation.PathVariable;
15   -import org.springframework.web.bind.annotation.RequestMapping;
16   -import org.springframework.web.bind.annotation.RequestMethod;
17   -import org.springframework.web.bind.annotation.RequestParam;
18   -import org.springframework.web.bind.annotation.RestController;
19   -
20   -import com.alibaba.fastjson.JSONArray;
21   -import com.bsth.common.ResponseCode;
22   -import com.bsth.controller.BaseController;
23   -import com.bsth.controller.realcontrol.dto.ChangePersonCar;
24   -import com.bsth.controller.realcontrol.dto.DfsjChange;
25   -import com.bsth.data.BasicData;
26   -import com.bsth.data.schedule.DayOfSchedule;
27   -import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto;
28   -import com.bsth.entity.realcontrol.ScheduleRealInfo;
29   -import com.bsth.entity.report.RepairReport;
30   -import com.bsth.entity.schedule.SchedulePlanInfo;
31   -import com.bsth.service.realcontrol.ScheduleRealInfoService;
32   -
33   -@RestController
34   -@RequestMapping("/realSchedule")
35   -public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, Long> {
36   -
37   - @Autowired
38   - ScheduleRealInfoService scheduleRealInfoService;
39   -
40   - @Autowired
41   - DayOfSchedule dayOfSchedule;
42   -
43   - @RequestMapping(value = "check_fgs_ascription", method = RequestMethod.POST)
44   - public Map<String, Object> checkPCFgsAscription(@RequestParam Long schId, String jGh, String sGh, String nbbm){
45   - return scheduleRealInfoService.checkPCFgsAscription(schId, jGh, sGh, nbbm);
46   - }
47   -
48   - @RequestMapping(value = "/lines")
49   - public Map<String, Collection<ScheduleRealInfo>> findByLines(@RequestParam String lines) {
50   - return scheduleRealInfoService.findByLines(lines);
51   - }
52   -
53   - @RequestMapping(value = "/car")
54   - public List<ScheduleRealInfo> findByCar(String nbbm){
55   - return dayOfSchedule.findByNbbm(nbbm);
56   - }
57   -
58   - /**
59   - *
60   - * @Title: outgoAdjust @Description: TODO(待发调整) @param @param id
61   - * 主键 @param @param remarks 备注 @param @param dfsj 待发时间(HH:mm) @throws
62   - */
63   - @RequestMapping(value = "/outgoAdjust", method = RequestMethod.POST)
64   - public Map<String, Object> outgoAdjust(@RequestParam Long id, @RequestParam String remarks,
65   - @RequestParam String dfsj,String bcType,
66   - @RequestParam(defaultValue = "") String opType) {
67   - return scheduleRealInfoService.outgoAdjust(id, remarks, dfsj, bcType, opType, null);
68   - }
69   -
70   - /**
71   - *
72   - * @Title: destroy @Description: TODO(销毁,烂班) @param @param idsStr 要烂掉的班次ID ,分隔
73   - */
74   - @RequestMapping(value = "/destroy", method = RequestMethod.POST)
75   - public Map<String, Object> destroy(@RequestParam String idsStr
76   - /*, @RequestParam(defaultValue = "-1") int spaceAdjust*/,
77   - @RequestParam String remarks, @RequestParam String adjustExps/*, @RequestParam(defaultValue = "0") int spaceNum*/) {
78   - return scheduleRealInfoService.destroy(idsStr, remarks, adjustExps, null);
79   - }
80   -
81   - /**
82   - *
83   - * @Title: carDeviceMapp @Description: TODO(获取车辆自编号和设备号对照,从缓存取) @throws
84   - */
85   - @RequestMapping(value = "/carDeviceMapp", method = RequestMethod.GET)
86   - public Map<String, String> carDeviceMapp() {
87   - return BasicData.deviceId2NbbmMap.inverse();
88   - }
89   -
90   - /**
91   - *
92   - * @Title: findPersionByLine @Description: TODO(根据线路主键获取驾驶员) @param @param
93   - * lineId @throws
94   - */
95   - @RequestMapping(value = "/driver", method = RequestMethod.GET)
96   - public List<Map<String, String>> findDriverByLine(@RequestParam String lineCode) {
97   - return scheduleRealInfoService.findDriverByLine(lineCode);
98   - }
99   -
100   - /**
101   - *
102   - * @Title: findPersionByLine @Description: TODO(根据线路主键获取售票员) @param @param
103   - * lineId @throws
104   - */
105   - @RequestMapping(value = "/conductor", method = RequestMethod.GET)
106   - public List<Map<String, String>> findConductorByLine(@RequestParam String lineCode) {
107   - return scheduleRealInfoService.findConductorByLine(lineCode);
108   - }
109   -
110   - /**
111   - *
112   - * @Title: findPersionByLine @Description: TODO(根据线路主键获取车辆) @param @param
113   - * lineId @throws
114   - */
115   - @RequestMapping(value = "/cars", method = RequestMethod.GET)
116   - public List<Map<String, String>> findCarByLine(@RequestParam String lineCode) {
117   - return scheduleRealInfoService.findCarByLine(lineCode);
118   - }
119   -
120   - /**
121   - *
122   - * @Title: sreachNbbm @Description: TODO(搜索车辆内部编码) @throws
123   - */
124   - @RequestMapping(value = "/sreachVehic", method = RequestMethod.GET)
125   - public List<Map<String, String>> sreachVehic(@RequestParam String nbbm) {
126   - return scheduleRealInfoService.sreachVehic(nbbm);
127   - }
128   - /**
129   - *
130   - * @Title: realOutAdjust
131   - * @Description: TODO(实发调整)
132   - * @param @param id 班次ID
133   - * @param @param fcsjActual 实际发车时间 HH:mm
134   - * @param @param remarks 备注
135   - * @throws
136   - */
137   - @RequestMapping(value = "/realOutAdjust", method = RequestMethod.POST)
138   - public Map<String, Object> realOutAdjust(@RequestParam Map<String, String> map) {
139   - return scheduleRealInfoService.realOutAdjust(map);
140   - }
141   -
142   - /**
143   - *
144   - * @Title: revokeDestroy
145   - * @Description: TODO(撤销烂班)
146   - * @param @param id
147   - * @throws
148   - */
149   - @RequestMapping(value = "/revokeDestroy", method = RequestMethod.POST)
150   - public Map<String, Object> revokeDestroy(@RequestParam Long id){
151   - return scheduleRealInfoService.revokeDestroy(id);
152   - }
153   -
154   - /**
155   - *
156   - * @Title: revokeRealOutgo
157   - * @Description: TODO(撤销实发)
158   - * @param @param id
159   - * @throws
160   - */
161   - @RequestMapping(value = "/revokeRealOutgo", method = RequestMethod.POST)
162   - public Map<String, Object> revokeRealOutgo(@RequestParam Long id){
163   - return scheduleRealInfoService.revokeRealOutgo(id);
164   - }
165   -
166   - /**
167   - * 撤销执行
168   - * @param id
169   - * @return
170   - */
171   - @RequestMapping(value = "/revokeRealArrive", method = RequestMethod.POST)
172   - public Map<String, Object> revokeRealArrive(@RequestParam Long id){
173   - return scheduleRealInfoService.revokeRealArrive(id);
174   - }
175   -
176   - /**
177   - *
178   - * @Title: spaceAdjust
179   - * @Description: TODO(间隔调整)
180   - * @param @param ids 要调整的班次数组ID
181   - * @param @param space 间隔
182   - * @throws
183   - */
184   - @RequestMapping(value = "/spaceAdjust", method = RequestMethod.POST)
185   - public Map<String, Object> spaceAdjust(Long[] ids, Integer space){
186   - return scheduleRealInfoService.spaceAdjust(ids, space);
187   - }
188   -
189   - /**
190   - *
191   - * @Title: schInfoFineTune
192   - * @Description: TODO(发车信息微调)
193   - * @param @param map
194   - * @throws
195   - */
196   - @RequestMapping(value = "/schInfoFineTune", method = RequestMethod.POST)
197   - public Map<String, Object> schInfoFineTune(@RequestParam Map<String, String> map){
198   - return scheduleRealInfoService.schInfoFineTune(map);
199   - }
200   -
201   - /**
202   - *
203   - * @Title: outgoAdjustAll
204   - * @Description: TODO(批量待发调整)
205   - * @param @param list
206   - * @throws
207   - */
208   - @RequestMapping(value = "/outgoAdjustAll", method = RequestMethod.POST)
209   - public Map<String, Object> outgoAdjustAll(@RequestParam String params){
210   - //反转义
211   - params = StringEscapeUtils.unescapeHtml4(params);
212   - return scheduleRealInfoService.outgoAdjustAll(params);
213   - }
214   -
215   - /**
216   - *
217   - * @Title: findByLineAndUpDown
218   - * @Description: TODO(根据线路和走向获取班次)
219   - * @param @param line
220   - * @param @param upDown
221   - */
222   - @RequestMapping(value = "/findByLineAndUpDown")
223   - public List<ScheduleRealInfo> findByLineAndUpDown(@RequestParam String line,@RequestParam Integer upDown){
224   - return dayOfSchedule.findByLineAndUpDown(line, upDown);
225   - }
226   -
227   - /**
228   - *
229   - * @Title: findRouteByLine
230   - * @Description: TODO(获取线路的站点,路段路由)
231   - * @param @param lineCode
232   - * @throws
233   - */
234   - @RequestMapping(value = "/findRouteByLine")
235   - public Map<String, Object> findRouteByLine(@RequestParam String lineCode){
236   - return scheduleRealInfoService.findRouteByLine(lineCode);
237   - }
238   -
239   - /**
240   - *
241   - * @Title: removeChildTask
242   - * @Description: TODO(删除子任务)
243   - * @param @param taskId 子任务ID
244   - * @throws
245   - */
246   - @RequestMapping(value = "/childTask/{taskId}", method = RequestMethod.DELETE)
247   - public Map<String, Object> removeChildTask(@PathVariable("taskId") Long taskId){
248   - return scheduleRealInfoService.removeChildTask(taskId);
249   - }
250   -
251   - /**
252   - *
253   - * @Title: findByLineCode
254   - * @Description: TODO(根据线路获取班次信息)
255   - * @param @param lineCode
256   - */
257   - @RequestMapping(value = "/lineCode/{lineCode}")
258   - public List<ScheduleRealInfo> findByLineCode(@PathVariable("lineCode") String lineCode){
259   - return dayOfSchedule.findByLineCode(lineCode);
260   - }
261   -
262   - @RequestMapping(value = "/queryUserInfo")
263   - public List<ScheduleRealInfo> queryUserInfo(@RequestParam String line,
264   - @RequestParam String date,@RequestParam String state) {
265   - return scheduleRealInfoService.queryUserInfo(line, date,state);
266   - }
267   -
268   - @RequestMapping(value = "/queryUserInfoPx")
269   - public List<ScheduleRealInfo> queryUserInfoPx(@RequestParam String line,
270   - @RequestParam String date,@RequestParam String state,@RequestParam String type) {
271   - return scheduleRealInfoService.queryUserInfoPx(line, date,state,type);
272   - }
273   -
274   - @RequestMapping(value = "/exportWaybill",method = RequestMethod.GET)
275   - public List<ScheduleRealInfo> exportWaybill(@RequestParam String jName,@RequestParam String jGh, @RequestParam String clZbh,
276   - @RequestParam String lpName,@RequestParam String date,@RequestParam String line) {
277   - return scheduleRealInfoService.exportWaybill(jName,jGh, clZbh, lpName,date,line);
278   - }
279   -
280   - @RequestMapping(value = "/exportWaybillQp",method = RequestMethod.GET)
281   - public List<ScheduleRealInfo> exportWaybillQp(@RequestParam String clZbh
282   - ,@RequestParam String date,@RequestParam String line) {
283   - return scheduleRealInfoService.exportWaybillQp( clZbh, date,line);
284   - }
285   -
286   -
287   - @RequestMapping(value = "/dailyInfo")
288   - public List<Map<String, Object>> dailyInfo(@RequestParam String line, @RequestParam String date,@RequestParam String type) {
289   - return scheduleRealInfoService.dailyInfo(line, date, type);
290   - }
291   -
292   - @RequestMapping(value = "/historyMessage")
293   - public List<Object[]> historyMessage(@RequestParam String line, @RequestParam String date,
294   - @RequestParam String code, @RequestParam String type) {
295   - return scheduleRealInfoService.historyMessage(line, date, code, type);
296   - }
297   -
298   - @RequestMapping(value="/findLine")
299   - public List<Map<String,String>> findLine(@RequestParam String line){
300   - return scheduleRealInfoService.findLine(line);
301   - }
302   -
303   - @RequestMapping(value="/findKMBC",method = RequestMethod.GET)
304   - public Map<String,Object> findKMBC(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName
305   - ,@RequestParam String date,@RequestParam String line){
306   - return scheduleRealInfoService.findKMBC(jGh, clZbh,lpName,date,line);
307   - }
308   -
309   - /**
310   - * 路单公里统计 (闵行审计专用)
311   - * @param jGh
312   - * @param clZbh
313   - * @param lpName
314   - * @param date
315   - * @param line
316   - * @return
317   - */
318   - @RequestMapping(value="/findKMBC_mh_2",method = RequestMethod.GET)
319   - public Map<String,Object> findKMBC_mh_2(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName
320   - ,@RequestParam String date,@RequestParam String line){
321   - return scheduleRealInfoService.findKMBC_mh_2(jGh, clZbh,lpName,date,line);
322   - }
323   -
324   - @RequestMapping(value="/findKMBCQp",method = RequestMethod.GET)
325   - public Map<String,Object> findKMBCQp(@RequestParam String clZbh
326   - ,@RequestParam String date,@RequestParam String line){
327   - return scheduleRealInfoService.findKMBCQp(clZbh,date,line);
328   - }
329   -
330   - @RequestMapping(value="/findLpName")
331   - public List<Map<String,String>> findLpName(@RequestParam String lpName){
332   - return scheduleRealInfoService.findLpName(lpName);
333   - }
334   -
335   - @RequestMapping(value = "/account")
336   - public List<Map<String,Object>> account(@RequestParam String line, @RequestParam String date,
337   - @RequestParam String code,@RequestParam String xlName, @RequestParam String type) {
338   - return scheduleRealInfoService.account(line, date, code, xlName, type);
339   - }
340   -
341   - @RequestMapping(value = "/accountPx")
342   - public List<Map<String,Object>> accountPx(@RequestParam String line, @RequestParam String date,
343   - @RequestParam String code,@RequestParam String xlName, @RequestParam String px) {
344   - return scheduleRealInfoService.accountPx(line, date, code, xlName, px);
345   - }
346   -
347   - @RequestMapping(value = "/correctForm")
348   - public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date,
349   - @RequestParam String endDate,
350   - @RequestParam String lpName, @RequestParam String code,
351   - @RequestParam String type,@RequestParam String changType) {
352   - return scheduleRealInfoService.correctForm(line, date, endDate, lpName, code, type,changType);
353   - }
354   - /**
355   - * @Title queryListWaybill
356   - * @Description 查询行车路单列表
357   - * @param jName 驾驶员名字
358   - * @param clZbh 车辆自编号(内部编号)
359   - * @param lpName 路牌
360   - * @return
361   - */
362   - @RequestMapping(value="/queryListWaybill",method = RequestMethod.GET)
363   - public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName
364   - ,@RequestParam String date,@RequestParam String line){
365   - return scheduleRealInfoService.queryListWaybill(jGh, clZbh,lpName,date,line);
366   - }
367   -
368   - /**
369   - * @Title queryListWaybill
370   - * @Description 查询行车路单列表(闵行审计专用路单)
371   - * @param jName 驾驶员名字
372   - * @param clZbh 车辆自编号(内部编号)
373   - * @param lpName 路牌
374   - * @return
375   - */
376   - @RequestMapping(value="/queryListWaybill_mh_2",method = RequestMethod.GET)
377   - public List<ScheduleRealInfo> queryListWaybill_mh_2(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName
378   - ,@RequestParam String date,@RequestParam String line){
379   - return scheduleRealInfoService.queryListWaybill2(jName, clZbh,lpName,date,line);
380   - }
381   -
382   - @RequestMapping(value="/queryListWaybillQp",method = RequestMethod.GET)
383   - public List<ScheduleRealInfo> queryListWaybillQp(@RequestParam String clZbh,
384   - @RequestParam String date,@RequestParam String line){
385   - return scheduleRealInfoService.queryListWaybillQp(clZbh,date,line);
386   - }
387   -
388   - @RequestMapping(value="/statisticsDaily")
389   - public List<Map<String,Object>> statisticsDaily(@RequestParam String line, @RequestParam String date,
390   - @RequestParam String xlName, @RequestParam String type){
391   - return scheduleRealInfoService.statisticsDaily(line, date, xlName, type);
392   - }
393   -
394   - @RequestMapping(value="/statisticsDaily_mh_2")
395   - public List<Map<String,Object>> statisticsDaily_mh_2(@RequestParam String line, @RequestParam String date,
396   - @RequestParam String xlName, @RequestParam String type){
397   - return scheduleRealInfoService.statisticsDaily_mh_2(line, date, xlName, type);
398   - }
399   -
400   - @RequestMapping(value="/statisticsDailyTj")
401   - public List<Map<String,Object>> statisticsDailyTj(@RequestParam Map<String, Object> map){
402   - String gsdm="";
403   - if(map.get("gsdm")!=null){
404   - gsdm=map.get("gsdm").toString();
405   - }
406   - String fgsdm="";
407   - if(map.get("fgsdm")!=null){
408   - fgsdm=map.get("fgsdm").toString();
409   - }
410   - String line="";
411   - if(map.get("line")!=null){
412   - line=map.get("line").toString();
413   - }
414   - String date="";
415   - if(map.get("date")!=null){
416   - date=map.get("date").toString();
417   - }
418   - String date2="";
419   - if(map.get("date2")!=null){
420   - date2=map.get("date2").toString();
421   - }
422   - String xlName="";
423   - if(map.get("xlName")!=null){
424   - xlName=map.get("xlName").toString();
425   - }
426   - String type="";
427   - if(map.get("type")!=null){
428   - type=map.get("type").toString();
429   - }
430   - String nature="0";
431   - if(map.get("nature")!=null){
432   - nature=map.get("nature").toString();
433   - }
434   - return scheduleRealInfoService.statisticsDailyTj(gsdm,fgsdm,line, date,date2, xlName, type,nature);
435   - }
436   -
437   - /*
438   - * 公里修正报表
439   - */
440   - @RequestMapping(value="/mileageReportTj")
441   - public List<Map<String,Object>> mileageReport(@RequestParam Map<String, Object> map){
442   - String gsdm="";
443   - if(map.get("gsdm")!=null){
444   - gsdm=map.get("gsdm").toString();
445   - }
446   - String fgsdm="";
447   - if(map.get("fgsdm")!=null){
448   - fgsdm=map.get("fgsdm").toString();
449   - }
450   - String line="";
451   - if(map.get("line")!=null){
452   - line=map.get("line").toString();
453   - }
454   - String date="";
455   - if(map.get("date")!=null){
456   - date=map.get("date").toString();
457   - }
458   - String date2="";
459   - if(map.get("date2")!=null){
460   - date2=map.get("date2").toString();
461   - }
462   - String xlName="";
463   - if(map.get("xlName")!=null){
464   - xlName=map.get("xlName").toString();
465   - }
466   - return scheduleRealInfoService.mileageReport(gsdm,fgsdm,line, date,date2);
467   - }
468   -
469   - /*
470   - * 班次修正报表
471   - */
472   - @RequestMapping(value="/scheduleCorrectionReport")
473   - public List<Map<String,Object>> scheduleCorrectionReport(@RequestParam Map<String, Object> map){
474   - String gsdm="";
475   - if(map.get("gsdm")!=null){
476   - gsdm=map.get("gsdm").toString();
477   - }
478   - String fgsdm="";
479   - if(map.get("fgsdm")!=null){
480   - fgsdm=map.get("fgsdm").toString();
481   - }
482   - String line="";
483   - if(map.get("line")!=null){
484   - line=map.get("line").toString();
485   - }
486   - String date="";
487   - if(map.get("date")!=null){
488   - date=map.get("date").toString();
489   - }
490   - String date2="";
491   - if(map.get("date2")!=null){
492   - date2=map.get("date2").toString();
493   - }
494   - String xlName="";
495   - if(map.get("xlName")!=null){
496   - xlName=map.get("xlName").toString();
497   - }
498   - return scheduleRealInfoService.scheduleCorrectionReport(gsdm,fgsdm,line, date,date2);
499   - }
500   -
501   - @RequestMapping(value="/MapById",method = RequestMethod.GET)
502   - public Map<String, Object> MapById(@RequestParam("id") Long id){
503   - return scheduleRealInfoService.MapById(id);
504   - }
505   -
506   - @RequestMapping(value="/MapByIdQp",method = RequestMethod.GET)
507   - public Map<String, Object> MapByIdQp(@RequestParam("id") Long id){
508   - return scheduleRealInfoService.MapByIdQp(id);
509   - }
510   -
511   - /**
512   - * @Title: scheduleDaily
513   - * @Description: TODO(调度日报表)
514   - * @param line 线路
515   - * @param date 时间
516   - * @return
517   - */
518   - @RequestMapping(value="/scheduleDaily")
519   - public Map<String,Object> scheduleDaily(@RequestParam String line,@RequestParam String date){
520   - return scheduleRealInfoService.scheduleDaily(line,date);
521   - }
522   -
523   - @RequestMapping(value="/realScheduleList")
524   - public List<ScheduleRealInfo> realScheduleList(@RequestParam String line,@RequestParam String date){
525   - return scheduleRealInfoService.realScheduleList(line,date);
526   - }
527   -
528   - @RequestMapping(value="/realScheduleList_zrw")
529   - public List<ScheduleRealInfo> realScheduleList_zrw(@RequestParam String line,@RequestParam String date){
530   - return scheduleRealInfoService.realScheduleList_zrw(line,date);
531   - }
532   -
533   - @RequestMapping(value="/realScheduleList_mh_2")
534   - public List<ScheduleRealInfo> realScheduleList_mh_2(@RequestParam String line,@RequestParam String date){
535   - return scheduleRealInfoService.realScheduleList_mh_2(line,date);
536   - }
537   -
538   - @RequestMapping(value="/realScheduleListQp")
539   - public List<ScheduleRealInfo> realScheduleListQp(@RequestParam String line,@RequestParam String date){
540   - return scheduleRealInfoService.realScheduleListQp(line,date);
541   - }
542   -
543   - @RequestMapping(value="/multi_tzrc", method=RequestMethod.POST)
544   - public Map<String, Object> multi_tzrc(@RequestParam String cpcsJson){
545   - cpcsJson = StringEscapeUtils.unescapeHtml4(cpcsJson);
546   - List<ChangePersonCar> cpcs = JSONArray.parseArray(cpcsJson, ChangePersonCar.class);
547   - return scheduleRealInfoService.multi_tzrc(cpcs, null);
548   - }
549   -
550   - @RequestMapping(value="/multi_dftz", method=RequestMethod.POST)
551   - public Map<String, Object> multi_dftz(@RequestParam String dcsJson){
552   - dcsJson = StringEscapeUtils.unescapeHtml4(dcsJson);
553   - List<DfsjChange> dfsjcs = JSONArray.parseArray(dcsJson, DfsjChange.class);
554   - return scheduleRealInfoService.multi_dftz(dfsjcs);
555   - }
556   -
557   - @RequestMapping(value="/changeBcType/{id}", method=RequestMethod.POST)
558   - public Map<String, Object> changeBcType(@PathVariable("id") Long id, String bcType, String remarks, String majorStationName){
559   - return scheduleRealInfoService.changeBcType(id, bcType, remarks, majorStationName);
560   - }
561   -
562   - @RequestMapping(value="/history", method=RequestMethod.POST)
563   - public Map<String,Object> historySave(ScheduleRealInfo sch){
564   - return scheduleRealInfoService.historySave(sch);
565   - }
566   -
567   -
568   - private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd");
569   - private final static long ONE_DAY = 1000 * 60 * 60 * 24;
570   - /**
571   - * 获取可编辑的历史班次日期
572   - * @return
573   - */
574   - @RequestMapping("dateArray")
575   - public List<String> dateArray(@RequestParam(defaultValue = "0") int c){
576   - List<String> rs = new ArrayList<>();
577   -
578   - long t = System.currentTimeMillis();
579   - if(c != 1)
580   - t -= (ONE_DAY + (1000 * 60 * 60 * 6));
581   - for(int i = 0; i < 3; i ++){
582   - rs.add(fmtyyyyMMdd.print(t));
583   - t -= ONE_DAY;
584   - }
585   - return rs;
586   - }
587   -
588   - @RequestMapping(value = "svgAttr", method = RequestMethod.POST)
589   - public Map<String, Object> svgAttr(@RequestParam String jsonStr){
590   - return scheduleRealInfoService.svgAttr(jsonStr);
591   - }
592   -
593   - @RequestMapping(value = "svgAttr", method = RequestMethod.GET)
594   - public Map<String, Object> findSvgAttr(@RequestParam String idx){
595   - return scheduleRealInfoService.findSvgAttr(idx);
596   - }
597   -
598   - @RequestMapping(value = "addRemarks", method = RequestMethod.POST)
599   - public Map<String, Object> addRemarks(@RequestParam Long id, @RequestParam String remarks){
600   - return scheduleRealInfoService.addRemarks(id, remarks);
601   - }
602   -
603   - @RequestMapping(value = "scheduleDailyQp", method = RequestMethod.GET)
604   - public List<Map<String, Object>> scheduleDailyQp(@RequestParam String line,@RequestParam String date){
605   - return scheduleRealInfoService.scheduleDailyQp(line,date);
606   - }
607   -
608   - @RequestMapping(value = "scheduleDailyExport", method = RequestMethod.GET)
609   - public List<Map<String, Object>> scheduleDailyExport(@RequestParam Map<String, Object> map){
610   - return scheduleRealInfoService.scheduleDailyExport(map);
611   - }
612   -
613   - @RequestMapping(value = "exportWaybillMore", method = RequestMethod.GET)
614   - public Map<String, Object> exportWaybillMore(@RequestParam Map<String, Object> map){
615   - return scheduleRealInfoService.exportWaybillMore(map);
616   - }
617   -
618   - /**
619   - * 获取当日计划排班 , 从计划表抓取数据
620   - * @return
621   - */
622   - @RequestMapping(value = "currSchedulePlanByLineCode", method = RequestMethod.GET)
623   - public List<SchedulePlanInfo> currentSchedulePlan(@RequestParam String lineCode){
624   - return scheduleRealInfoService.currentSchedulePlan(lineCode);
625   - }
626   -
627   - @RequestMapping(value = "lpChangeMulti", method = RequestMethod.POST)
628   - public Map<String, Object> lpChangeMulti(@RequestParam String leftIdx, @RequestParam String rightIdx,@RequestParam int type){
629   - return scheduleRealInfoService.lpChangeMulti(leftIdx, rightIdx, type);
630   - }
631   -
632   - /**
633   - * 删除当日实际排班
634   - * @return
635   - */
636   - @RequestMapping(value = "deleteRealSchedule", method = RequestMethod.POST)
637   - public Map<String, Object> deleteRealSchedule(@RequestParam String lineCode){
638   - return dayOfSchedule.deleteRealSchedule(lineCode);
639   - }
640   -
641   - /**
642   - * 从计划表重新加载当日排班
643   - * @param lineCode
644   - * @return
645   - */
646   - @RequestMapping(value = "reLoadRealSchedule", method = RequestMethod.POST)
647   - public Map<String, Object> reLoadRealSchedule(@RequestParam String lineCode){
648   - Map<String, Object> rs = new HashMap<>();
649   - List<ScheduleRealInfo> list = dayOfSchedule.findByLineCode(lineCode);
650   - if(list != null && list.size() > 0){
651   - rs.put("status", ResponseCode.ERROR);
652   - rs.put("msg", "失败," + list.get(0).getXlName() + "当日存在实际排班,无法重新加载。");
653   - return rs;
654   - }
655   -
656   - int code = dayOfSchedule.reloadSch(lineCode);
657   -
658   - //重新按公司编码索引数据
659   - dayOfSchedule.groupByGsbm();
660   - rs.put("status", code==0? ResponseCode.SUCCESS: ResponseCode.ERROR);
661   - return rs;
662   - }
663   -
664   - /**
665   - * 误点调整
666   - * @param idx
667   - * @param minute
668   - * @return
669   - */
670   - @RequestMapping(value = "lateAdjust", method = RequestMethod.POST)
671   - public Map<String, Object> lateAdjust(@RequestParam String idx,@RequestParam float minute ){
672   - return scheduleRealInfoService.lateAdjust(idx, minute);
673   - }
674   -
675   - /**
676   - * 获取所有应发未到的班次
677   - * @param idx
678   - * @return
679   - */
680   - @RequestMapping(value = "allLate2")
681   - public List<ScheduleRealInfo> allLate2(@RequestParam String idx){
682   - return scheduleRealInfoService.allLate2(idx);
683   - }
684   -
685   - /**
686   - * 添加一个临加到历史库
687   - * @param sch
688   - * @return
689   - */
690   - @RequestMapping(value = "history/add", method = RequestMethod.POST)
691   - public Map<String, Object> addToHistory(ScheduleRealInfo sch){
692   - return scheduleRealInfoService.addToHistory(sch);
693   - }
694   -
695   - /**
696   - * 从历史库里删除临加班次
697   - * @param sch
698   - * @return
699   - */
700   - @RequestMapping(value = "history/{id}", method = RequestMethod.DELETE)
701   - public Map<String, Object> deleteToHistory(@PathVariable("id") Long id){
702   - return scheduleRealInfoService.deleteToHistory(id);
703   - }
704   -
705   - @RequestMapping(value = "isCircleQdz", method = RequestMethod.POST)
706   - public Map<String, Object> isCircleQdz(@RequestParam String line, String nbbm, String ts, String qdzCode){
707   - Map<String, Object> map =new HashMap<>();
708   - map.put("isExist",scheduleRealInfoService.isCircleQdz(nbbm, ts, line, qdzCode));
709   - return map;
710   - }
711   -
712   - /**
713   - * 从历史库里删除临加班次
714   - * @param sch
715   - * @return
716   - */
717   - @RequestMapping(value = "wxsb", method = RequestMethod.POST)
718   - public Map<String, Object> repairReport(@RequestParam Map<String, Object> param){
719   - return scheduleRealInfoService.repairReport(param, true);
720   - }
721   -
722   - @RequestMapping(value = "wxsb", method = RequestMethod.GET)
723   - public List<RepairReport> repairReportList(@RequestParam String line, @RequestParam String date, @RequestParam String code, @RequestParam String type){
724   - return scheduleRealInfoService.repairReportList(line, date, code, type);
725   - }
726   -
727   - @RequestMapping(value = "lineLevel", method = RequestMethod.GET)
728   - public Map<String, String> lineLevel(@RequestParam String idx){
729   - return scheduleRealInfoService.getLevelsByLines(Arrays.asList(idx.split(",")));
730   - }
731   -}
  1 +package com.bsth.controller.realcontrol;
  2 +
  3 +import java.util.ArrayList;
  4 +import java.util.Arrays;
  5 +import java.util.Collection;
  6 +import java.util.HashMap;
  7 +import java.util.List;
  8 +import java.util.Map;
  9 +
  10 +import org.apache.commons.lang3.StringEscapeUtils;
  11 +import org.joda.time.format.DateTimeFormat;
  12 +import org.joda.time.format.DateTimeFormatter;
  13 +import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.web.bind.annotation.PathVariable;
  15 +import org.springframework.web.bind.annotation.RequestMapping;
  16 +import org.springframework.web.bind.annotation.RequestMethod;
  17 +import org.springframework.web.bind.annotation.RequestParam;
  18 +import org.springframework.web.bind.annotation.RestController;
  19 +
  20 +import com.alibaba.fastjson.JSONArray;
  21 +import com.bsth.common.ResponseCode;
  22 +import com.bsth.controller.BaseController;
  23 +import com.bsth.controller.realcontrol.dto.ChangePersonCar;
  24 +import com.bsth.controller.realcontrol.dto.DfsjChange;
  25 +import com.bsth.data.BasicData;
  26 +import com.bsth.data.schedule.DayOfSchedule;
  27 +import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto;
  28 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  29 +import com.bsth.entity.report.RepairReport;
  30 +import com.bsth.entity.schedule.SchedulePlanInfo;
  31 +import com.bsth.service.realcontrol.ScheduleRealInfoService;
  32 +
  33 +@RestController
  34 +@RequestMapping("/realSchedule")
  35 +public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, Long> {
  36 +
  37 + @Autowired
  38 + ScheduleRealInfoService scheduleRealInfoService;
  39 +
  40 + @Autowired
  41 + DayOfSchedule dayOfSchedule;
  42 +
  43 + @RequestMapping(value = "check_fgs_ascription", method = RequestMethod.POST)
  44 + public Map<String, Object> checkPCFgsAscription(@RequestParam Long schId, String jGh, String sGh, String nbbm){
  45 + return scheduleRealInfoService.checkPCFgsAscription(schId, jGh, sGh, nbbm);
  46 + }
  47 +
  48 + @RequestMapping(value = "/lines")
  49 + public Map<String, Collection<ScheduleRealInfo>> findByLines(@RequestParam String lines) {
  50 + return scheduleRealInfoService.findByLines(lines);
  51 + }
  52 +
  53 + @RequestMapping(value = "/car")
  54 + public List<ScheduleRealInfo> findByCar(String nbbm){
  55 + return dayOfSchedule.findByNbbm(nbbm);
  56 + }
  57 +
  58 + /**
  59 + *
  60 + * @Title: outgoAdjust @Description: TODO(待发调整) @param @param id
  61 + * 主键 @param @param remarks 备注 @param @param dfsj 待发时间(HH:mm) @throws
  62 + */
  63 + @RequestMapping(value = "/outgoAdjust", method = RequestMethod.POST)
  64 + public Map<String, Object> outgoAdjust(@RequestParam Long id, @RequestParam String remarks,
  65 + @RequestParam String dfsj,String bcType,
  66 + @RequestParam(defaultValue = "") String opType) {
  67 + return scheduleRealInfoService.outgoAdjust(id, remarks, dfsj, bcType, opType, null);
  68 + }
  69 +
  70 + /**
  71 + *
  72 + * @Title: destroy @Description: TODO(销毁,烂班) @param @param idsStr 要烂掉的班次ID ,分隔
  73 + */
  74 + @RequestMapping(value = "/destroy", method = RequestMethod.POST)
  75 + public Map<String, Object> destroy(@RequestParam String idsStr
  76 + /*, @RequestParam(defaultValue = "-1") int spaceAdjust*/,
  77 + @RequestParam String remarks, @RequestParam String adjustExps/*, @RequestParam(defaultValue = "0") int spaceNum*/) {
  78 + return scheduleRealInfoService.destroy(idsStr, remarks, adjustExps, null);
  79 + }
  80 +
  81 + /**
  82 + *
  83 + * @Title: carDeviceMapp @Description: TODO(获取车辆自编号和设备号对照,从缓存取) @throws
  84 + */
  85 + @RequestMapping(value = "/carDeviceMapp", method = RequestMethod.GET)
  86 + public Map<String, String> carDeviceMapp() {
  87 + return BasicData.deviceId2NbbmMap.inverse();
  88 + }
  89 +
  90 + /**
  91 + *
  92 + * @Title: findPersionByLine @Description: TODO(根据线路主键获取驾驶员) @param @param
  93 + * lineId @throws
  94 + */
  95 + @RequestMapping(value = "/driver", method = RequestMethod.GET)
  96 + public List<Map<String, String>> findDriverByLine(@RequestParam String lineCode) {
  97 + return scheduleRealInfoService.findDriverByLine(lineCode);
  98 + }
  99 +
  100 + /**
  101 + *
  102 + * @Title: findPersionByLine @Description: TODO(根据线路主键获取售票员) @param @param
  103 + * lineId @throws
  104 + */
  105 + @RequestMapping(value = "/conductor", method = RequestMethod.GET)
  106 + public List<Map<String, String>> findConductorByLine(@RequestParam String lineCode) {
  107 + return scheduleRealInfoService.findConductorByLine(lineCode);
  108 + }
  109 +
  110 + /**
  111 + *
  112 + * @Title: findPersionByLine @Description: TODO(根据线路主键获取车辆) @param @param
  113 + * lineId @throws
  114 + */
  115 + @RequestMapping(value = "/cars", method = RequestMethod.GET)
  116 + public List<Map<String, String>> findCarByLine(@RequestParam String lineCode) {
  117 + return scheduleRealInfoService.findCarByLine(lineCode);
  118 + }
  119 +
  120 + /**
  121 + *
  122 + * @Title: sreachNbbm @Description: TODO(搜索车辆内部编码) @throws
  123 + */
  124 + @RequestMapping(value = "/sreachVehic", method = RequestMethod.GET)
  125 + public List<Map<String, String>> sreachVehic(@RequestParam String nbbm) {
  126 + return scheduleRealInfoService.sreachVehic(nbbm);
  127 + }
  128 + /**
  129 + *
  130 + * @Title: realOutAdjust
  131 + * @Description: TODO(实发调整)
  132 + * @param @param id 班次ID
  133 + * @param @param fcsjActual 实际发车时间 HH:mm
  134 + * @param @param remarks 备注
  135 + * @throws
  136 + */
  137 + @RequestMapping(value = "/realOutAdjust", method = RequestMethod.POST)
  138 + public Map<String, Object> realOutAdjust(@RequestParam Map<String, String> map) {
  139 + return scheduleRealInfoService.realOutAdjust(map);
  140 + }
  141 +
  142 + /**
  143 + *
  144 + * @Title: revokeDestroy
  145 + * @Description: TODO(撤销烂班)
  146 + * @param @param id
  147 + * @throws
  148 + */
  149 + @RequestMapping(value = "/revokeDestroy", method = RequestMethod.POST)
  150 + public Map<String, Object> revokeDestroy(@RequestParam Long id){
  151 + return scheduleRealInfoService.revokeDestroy(id);
  152 + }
  153 +
  154 + /**
  155 + *
  156 + * @Title: revokeRealOutgo
  157 + * @Description: TODO(撤销实发)
  158 + * @param @param id
  159 + * @throws
  160 + */
  161 + @RequestMapping(value = "/revokeRealOutgo", method = RequestMethod.POST)
  162 + public Map<String, Object> revokeRealOutgo(@RequestParam Long id){
  163 + return scheduleRealInfoService.revokeRealOutgo(id);
  164 + }
  165 +
  166 + /**
  167 + * 撤销执行
  168 + * @param id
  169 + * @return
  170 + */
  171 + @RequestMapping(value = "/revokeRealArrive", method = RequestMethod.POST)
  172 + public Map<String, Object> revokeRealArrive(@RequestParam Long id){
  173 + return scheduleRealInfoService.revokeRealArrive(id);
  174 + }
  175 +
  176 + /**
  177 + *
  178 + * @Title: spaceAdjust
  179 + * @Description: TODO(间隔调整)
  180 + * @param @param ids 要调整的班次数组ID
  181 + * @param @param space 间隔
  182 + * @throws
  183 + */
  184 + @RequestMapping(value = "/spaceAdjust", method = RequestMethod.POST)
  185 + public Map<String, Object> spaceAdjust(Long[] ids, Integer space){
  186 + return scheduleRealInfoService.spaceAdjust(ids, space);
  187 + }
  188 +
  189 + /**
  190 + *
  191 + * @Title: schInfoFineTune
  192 + * @Description: TODO(发车信息微调)
  193 + * @param @param map
  194 + * @throws
  195 + */
  196 + @RequestMapping(value = "/schInfoFineTune", method = RequestMethod.POST)
  197 + public Map<String, Object> schInfoFineTune(@RequestParam Map<String, String> map){
  198 + return scheduleRealInfoService.schInfoFineTune(map);
  199 + }
  200 +
  201 + /**
  202 + *
  203 + * @Title: outgoAdjustAll
  204 + * @Description: TODO(批量待发调整)
  205 + * @param @param list
  206 + * @throws
  207 + */
  208 + @RequestMapping(value = "/outgoAdjustAll", method = RequestMethod.POST)
  209 + public Map<String, Object> outgoAdjustAll(@RequestParam String params){
  210 + //反转义
  211 + params = StringEscapeUtils.unescapeHtml4(params);
  212 + return scheduleRealInfoService.outgoAdjustAll(params);
  213 + }
  214 +
  215 + /**
  216 + *
  217 + * @Title: findByLineAndUpDown
  218 + * @Description: TODO(根据线路和走向获取班次)
  219 + * @param @param line
  220 + * @param @param upDown
  221 + */
  222 + @RequestMapping(value = "/findByLineAndUpDown")
  223 + public List<ScheduleRealInfo> findByLineAndUpDown(@RequestParam String line,@RequestParam Integer upDown){
  224 + return dayOfSchedule.findByLineAndUpDown(line, upDown);
  225 + }
  226 +
  227 + /**
  228 + *
  229 + * @Title: findRouteByLine
  230 + * @Description: TODO(获取线路的站点,路段路由)
  231 + * @param @param lineCode
  232 + * @throws
  233 + */
  234 + @RequestMapping(value = "/findRouteByLine")
  235 + public Map<String, Object> findRouteByLine(@RequestParam String lineCode){
  236 + return scheduleRealInfoService.findRouteByLine(lineCode);
  237 + }
  238 +
  239 + /**
  240 + *
  241 + * @Title: removeChildTask
  242 + * @Description: TODO(删除子任务)
  243 + * @param @param taskId 子任务ID
  244 + * @throws
  245 + */
  246 + @RequestMapping(value = "/childTask/{taskId}", method = RequestMethod.DELETE)
  247 + public Map<String, Object> removeChildTask(@PathVariable("taskId") Long taskId){
  248 + return scheduleRealInfoService.removeChildTask(taskId);
  249 + }
  250 +
  251 + /**
  252 + *
  253 + * @Title: findByLineCode
  254 + * @Description: TODO(根据线路获取班次信息)
  255 + * @param @param lineCode
  256 + */
  257 + @RequestMapping(value = "/lineCode/{lineCode}")
  258 + public List<ScheduleRealInfo> findByLineCode(@PathVariable("lineCode") String lineCode){
  259 + return dayOfSchedule.findByLineCode(lineCode);
  260 + }
  261 +
  262 + @RequestMapping(value = "/queryUserInfo")
  263 + public List<ScheduleRealInfo> queryUserInfo(@RequestParam String line,
  264 + @RequestParam String date,@RequestParam String state) {
  265 + return scheduleRealInfoService.queryUserInfo(line, date,state);
  266 + }
  267 +
  268 + @RequestMapping(value = "/queryUserInfoPx")
  269 + public List<ScheduleRealInfo> queryUserInfoPx(@RequestParam String line,
  270 + @RequestParam String date,@RequestParam String state,@RequestParam String type) {
  271 + return scheduleRealInfoService.queryUserInfoPx(line, date,state,type);
  272 + }
  273 +
  274 + @RequestMapping(value = "/exportWaybill",method = RequestMethod.GET)
  275 + public List<ScheduleRealInfo> exportWaybill(@RequestParam String jName,@RequestParam String jGh, @RequestParam String clZbh,
  276 + @RequestParam String lpName,@RequestParam String date,@RequestParam String line) {
  277 + return scheduleRealInfoService.exportWaybill(jName,jGh, clZbh, lpName,date,line);
  278 + }
  279 +
  280 + @RequestMapping(value = "/exportWaybillQp",method = RequestMethod.GET)
  281 + public List<ScheduleRealInfo> exportWaybillQp(@RequestParam String clZbh
  282 + ,@RequestParam String date,@RequestParam String line) {
  283 + return scheduleRealInfoService.exportWaybillQp( clZbh, date,line);
  284 + }
  285 +
  286 +
  287 + @RequestMapping(value = "/dailyInfo")
  288 + public List<Map<String, Object>> dailyInfo(@RequestParam String line, @RequestParam String date,@RequestParam String type) {
  289 + return scheduleRealInfoService.dailyInfo(line, date, type);
  290 + }
  291 +
  292 + @RequestMapping(value = "/historyMessage")
  293 + public List<Object[]> historyMessage(@RequestParam String line, @RequestParam String date,
  294 + @RequestParam String code, @RequestParam String type) {
  295 + return scheduleRealInfoService.historyMessage(line, date, code, type);
  296 + }
  297 +
  298 + @RequestMapping(value="/findLine")
  299 + public List<Map<String,String>> findLine(@RequestParam String line){
  300 + return scheduleRealInfoService.findLine(line);
  301 + }
  302 +
  303 + @RequestMapping(value="/findKMBC",method = RequestMethod.GET)
  304 + public Map<String,Object> findKMBC(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName
  305 + ,@RequestParam String date,@RequestParam String line){
  306 + return scheduleRealInfoService.findKMBC(jGh, clZbh,lpName,date,line);
  307 + }
  308 +
  309 + /**
  310 + * 路单公里统计 (闵行审计专用)
  311 + * @param jGh
  312 + * @param clZbh
  313 + * @param lpName
  314 + * @param date
  315 + * @param line
  316 + * @return
  317 + */
  318 + @RequestMapping(value="/findKMBC_mh_2",method = RequestMethod.GET)
  319 + public Map<String,Object> findKMBC_mh_2(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName
  320 + ,@RequestParam String date,@RequestParam String line){
  321 + return scheduleRealInfoService.findKMBC_mh_2(jGh, clZbh,lpName,date,line);
  322 + }
  323 +
  324 + @RequestMapping(value="/findKMBCQp",method = RequestMethod.GET)
  325 + public Map<String,Object> findKMBCQp(@RequestParam String clZbh
  326 + ,@RequestParam String date,@RequestParam String line){
  327 + return scheduleRealInfoService.findKMBCQp(clZbh,date,line);
  328 + }
  329 +
  330 + @RequestMapping(value="/findLpName")
  331 + public List<Map<String,String>> findLpName(@RequestParam String lpName){
  332 + return scheduleRealInfoService.findLpName(lpName);
  333 + }
  334 +
  335 + @RequestMapping(value = "/account")
  336 + public List<Map<String,Object>> account(@RequestParam String line, @RequestParam String date,
  337 + @RequestParam String code,@RequestParam String xlName, @RequestParam String type) {
  338 + return scheduleRealInfoService.account(line, date, code, xlName, type);
  339 + }
  340 +
  341 + @RequestMapping(value = "/accountPx")
  342 + public List<Map<String,Object>> accountPx(@RequestParam String line, @RequestParam String date,
  343 + @RequestParam String code,@RequestParam String xlName, @RequestParam String px) {
  344 + return scheduleRealInfoService.accountPx(line, date, code, xlName, px);
  345 + }
  346 +
  347 + @RequestMapping(value = "/correctForm")
  348 + public List<SchEditInfoDto> correctForm(@RequestParam String line, @RequestParam String date,
  349 + @RequestParam String endDate,
  350 + @RequestParam String lpName, @RequestParam String code,
  351 + @RequestParam String type,@RequestParam String changType) {
  352 + return scheduleRealInfoService.correctForm(line, date, endDate, lpName, code, type,changType);
  353 + }
  354 + /**
  355 + * @Title queryListWaybill
  356 + * @Description 查询行车路单列表
  357 + * @param jName 驾驶员名字
  358 + * @param clZbh 车辆自编号(内部编号)
  359 + * @param lpName 路牌
  360 + * @return
  361 + */
  362 + @RequestMapping(value="/queryListWaybill",method = RequestMethod.GET)
  363 + public List<ScheduleRealInfo> queryListWaybill(@RequestParam String jGh,@RequestParam String clZbh,@RequestParam String lpName
  364 + ,@RequestParam String date,@RequestParam String line){
  365 + return scheduleRealInfoService.queryListWaybill(jGh, clZbh,lpName,date,line);
  366 + }
  367 +
  368 + /**
  369 + * @Title queryListWaybill
  370 + * @Description 查询行车路单列表(闵行审计专用路单)
  371 + * @param jName 驾驶员名字
  372 + * @param clZbh 车辆自编号(内部编号)
  373 + * @param lpName 路牌
  374 + * @return
  375 + */
  376 + @RequestMapping(value="/queryListWaybill_mh_2",method = RequestMethod.GET)
  377 + public List<ScheduleRealInfo> queryListWaybill_mh_2(@RequestParam String jName,@RequestParam String clZbh,@RequestParam String lpName
  378 + ,@RequestParam String date,@RequestParam String line){
  379 + return scheduleRealInfoService.queryListWaybill2(jName, clZbh,lpName,date,line);
  380 + }
  381 +
  382 + @RequestMapping(value="/queryListWaybillQp",method = RequestMethod.GET)
  383 + public List<ScheduleRealInfo> queryListWaybillQp(@RequestParam String clZbh,
  384 + @RequestParam String date,@RequestParam String line){
  385 + return scheduleRealInfoService.queryListWaybillQp(clZbh,date,line);
  386 + }
  387 +
  388 + @RequestMapping(value="/statisticsDaily")
  389 + public List<Map<String,Object>> statisticsDaily(@RequestParam String line, @RequestParam String date,
  390 + @RequestParam String xlName, @RequestParam String type){
  391 + return scheduleRealInfoService.statisticsDaily(line, date, xlName, type);
  392 + }
  393 +
  394 + @RequestMapping(value="/statisticsDaily_mh_2")
  395 + public List<Map<String,Object>> statisticsDaily_mh_2(@RequestParam String line, @RequestParam String date,
  396 + @RequestParam String xlName, @RequestParam String type){
  397 + return scheduleRealInfoService.statisticsDaily_mh_2(line, date, xlName, type);
  398 + }
  399 +
  400 + @RequestMapping(value="/statisticsDailyTj")
  401 + public List<Map<String,Object>> statisticsDailyTj(@RequestParam Map<String, Object> map){
  402 + String gsdm="";
  403 + if(map.get("gsdm")!=null){
  404 + gsdm=map.get("gsdm").toString();
  405 + }
  406 + String fgsdm="";
  407 + if(map.get("fgsdm")!=null){
  408 + fgsdm=map.get("fgsdm").toString();
  409 + }
  410 + String line="";
  411 + if(map.get("line")!=null){
  412 + line=map.get("line").toString();
  413 + }
  414 + String date="";
  415 + if(map.get("date")!=null){
  416 + date=map.get("date").toString();
  417 + }
  418 + String date2="";
  419 + if(map.get("date2")!=null){
  420 + date2=map.get("date2").toString();
  421 + }
  422 + String xlName="";
  423 + if(map.get("xlName")!=null){
  424 + xlName=map.get("xlName").toString();
  425 + }
  426 + String type="";
  427 + if(map.get("type")!=null){
  428 + type=map.get("type").toString();
  429 + }
  430 + String nature="0";
  431 + if(map.get("nature")!=null){
  432 + nature=map.get("nature").toString();
  433 + }
  434 + return scheduleRealInfoService.statisticsDailyTj(gsdm,fgsdm,line, date,date2, xlName, type,nature);
  435 + }
  436 +
  437 + /*
  438 + * 公里修正报表
  439 + */
  440 + @RequestMapping(value="/mileageReportTj")
  441 + public List<Map<String,Object>> mileageReport(@RequestParam Map<String, Object> map){
  442 + String gsdm="";
  443 + if(map.get("gsdm")!=null){
  444 + gsdm=map.get("gsdm").toString();
  445 + }
  446 + String fgsdm="";
  447 + if(map.get("fgsdm")!=null){
  448 + fgsdm=map.get("fgsdm").toString();
  449 + }
  450 + String line="";
  451 + if(map.get("line")!=null){
  452 + line=map.get("line").toString();
  453 + }
  454 + String date="";
  455 + if(map.get("date")!=null){
  456 + date=map.get("date").toString();
  457 + }
  458 + String date2="";
  459 + if(map.get("date2")!=null){
  460 + date2=map.get("date2").toString();
  461 + }
  462 + String xlName="";
  463 + if(map.get("xlName")!=null){
  464 + xlName=map.get("xlName").toString();
  465 + }
  466 + return scheduleRealInfoService.mileageReport(gsdm,fgsdm,line, date,date2);
  467 + }
  468 +
  469 + /*
  470 + * 班次修正报表
  471 + */
  472 + @RequestMapping(value="/scheduleCorrectionReport")
  473 + public List<Map<String,Object>> scheduleCorrectionReport(@RequestParam Map<String, Object> map){
  474 + String gsdm="";
  475 + if(map.get("gsdm")!=null){
  476 + gsdm=map.get("gsdm").toString();
  477 + }
  478 + String fgsdm="";
  479 + if(map.get("fgsdm")!=null){
  480 + fgsdm=map.get("fgsdm").toString();
  481 + }
  482 + String line="";
  483 + if(map.get("line")!=null){
  484 + line=map.get("line").toString();
  485 + }
  486 + String date="";
  487 + if(map.get("date")!=null){
  488 + date=map.get("date").toString();
  489 + }
  490 + String date2="";
  491 + if(map.get("date2")!=null){
  492 + date2=map.get("date2").toString();
  493 + }
  494 + String xlName="";
  495 + if(map.get("xlName")!=null){
  496 + xlName=map.get("xlName").toString();
  497 + }
  498 + return scheduleRealInfoService.scheduleCorrectionReport(gsdm,fgsdm,line, date,date2);
  499 + }
  500 +
  501 + @RequestMapping(value="/MapById",method = RequestMethod.GET)
  502 + public Map<String, Object> MapById(@RequestParam("id") Long id){
  503 + return scheduleRealInfoService.MapById(id);
  504 + }
  505 +
  506 + @RequestMapping(value="/MapByIdQp",method = RequestMethod.GET)
  507 + public Map<String, Object> MapByIdQp(@RequestParam("id") Long id){
  508 + return scheduleRealInfoService.MapByIdQp(id);
  509 + }
  510 +
  511 + /**
  512 + * @Title: scheduleDaily
  513 + * @Description: TODO(调度日报表)
  514 + * @param line 线路
  515 + * @param date 时间
  516 + * @return
  517 + */
  518 + @RequestMapping(value="/scheduleDaily")
  519 + public Map<String,Object> scheduleDaily(@RequestParam String line,@RequestParam String date){
  520 + return scheduleRealInfoService.scheduleDaily(line,date);
  521 + }
  522 +
  523 + @RequestMapping(value="/realScheduleList")
  524 + public List<ScheduleRealInfo> realScheduleList(@RequestParam String line,@RequestParam String date){
  525 + return scheduleRealInfoService.realScheduleList(line,date);
  526 + }
  527 +
  528 + @RequestMapping(value="/realScheduleList_zrw")
  529 + public List<ScheduleRealInfo> realScheduleList_zrw(@RequestParam String line,@RequestParam String date){
  530 + return scheduleRealInfoService.realScheduleList_zrw(line,date);
  531 + }
  532 +
  533 + @RequestMapping(value="/realScheduleList_mh_2")
  534 + public List<ScheduleRealInfo> realScheduleList_mh_2(@RequestParam String line,@RequestParam String date){
  535 + return scheduleRealInfoService.realScheduleList_mh_2(line,date);
  536 + }
  537 +
  538 + @RequestMapping(value="/realScheduleListQp")
  539 + public List<ScheduleRealInfo> realScheduleListQp(@RequestParam String line,@RequestParam String date){
  540 + return scheduleRealInfoService.realScheduleListQp(line,date);
  541 + }
  542 +
  543 + @RequestMapping(value="/multi_tzrc", method=RequestMethod.POST)
  544 + public synchronized Map<String, Object> multi_tzrc(@RequestParam String cpcsJson){
  545 + cpcsJson = StringEscapeUtils.unescapeHtml4(cpcsJson);
  546 + List<ChangePersonCar> cpcs = JSONArray.parseArray(cpcsJson, ChangePersonCar.class);
  547 + return scheduleRealInfoService.multi_tzrc(cpcs, null);
  548 + }
  549 +
  550 + @RequestMapping(value="/multi_dftz", method=RequestMethod.POST)
  551 + public Map<String, Object> multi_dftz(@RequestParam String dcsJson){
  552 + dcsJson = StringEscapeUtils.unescapeHtml4(dcsJson);
  553 + List<DfsjChange> dfsjcs = JSONArray.parseArray(dcsJson, DfsjChange.class);
  554 + return scheduleRealInfoService.multi_dftz(dfsjcs);
  555 + }
  556 +
  557 + @RequestMapping(value="/changeBcType/{id}", method=RequestMethod.POST)
  558 + public Map<String, Object> changeBcType(@PathVariable("id") Long id, String bcType, String remarks, String majorStationName){
  559 + return scheduleRealInfoService.changeBcType(id, bcType, remarks, majorStationName);
  560 + }
  561 +
  562 + @RequestMapping(value="/history", method=RequestMethod.POST)
  563 + public Map<String,Object> historySave(ScheduleRealInfo sch){
  564 + return scheduleRealInfoService.historySave(sch);
  565 + }
  566 +
  567 +
  568 + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd");
  569 + private final static long ONE_DAY = 1000 * 60 * 60 * 24;
  570 + /**
  571 + * 获取可编辑的历史班次日期
  572 + * @return
  573 + */
  574 + @RequestMapping("dateArray")
  575 + public List<String> dateArray(@RequestParam(defaultValue = "0") int c){
  576 + List<String> rs = new ArrayList<>();
  577 +
  578 + long t = System.currentTimeMillis();
  579 + if(c != 1)
  580 + t -= (ONE_DAY + (1000 * 60 * 60 * 6));
  581 + for(int i = 0; i < 3; i ++){
  582 + rs.add(fmtyyyyMMdd.print(t));
  583 + t -= ONE_DAY;
  584 + }
  585 + return rs;
  586 + }
  587 +
  588 + @RequestMapping(value = "svgAttr", method = RequestMethod.POST)
  589 + public Map<String, Object> svgAttr(@RequestParam String jsonStr){
  590 + return scheduleRealInfoService.svgAttr(jsonStr);
  591 + }
  592 +
  593 + @RequestMapping(value = "svgAttr", method = RequestMethod.GET)
  594 + public Map<String, Object> findSvgAttr(@RequestParam String idx){
  595 + return scheduleRealInfoService.findSvgAttr(idx);
  596 + }
  597 +
  598 + @RequestMapping(value = "addRemarks", method = RequestMethod.POST)
  599 + public Map<String, Object> addRemarks(@RequestParam Long id, @RequestParam String remarks){
  600 + return scheduleRealInfoService.addRemarks(id, remarks);
  601 + }
  602 +
  603 + @RequestMapping(value = "scheduleDailyQp", method = RequestMethod.GET)
  604 + public List<Map<String, Object>> scheduleDailyQp(@RequestParam String line,@RequestParam String date){
  605 + return scheduleRealInfoService.scheduleDailyQp(line,date);
  606 + }
  607 +
  608 + @RequestMapping(value = "scheduleDailyExport", method = RequestMethod.GET)
  609 + public List<Map<String, Object>> scheduleDailyExport(@RequestParam Map<String, Object> map){
  610 + return scheduleRealInfoService.scheduleDailyExport(map);
  611 + }
  612 +
  613 + @RequestMapping(value = "exportWaybillMore", method = RequestMethod.GET)
  614 + public Map<String, Object> exportWaybillMore(@RequestParam Map<String, Object> map){
  615 + return scheduleRealInfoService.exportWaybillMore(map);
  616 + }
  617 +
  618 + /**
  619 + * 获取当日计划排班 , 从计划表抓取数据
  620 + * @return
  621 + */
  622 + @RequestMapping(value = "currSchedulePlanByLineCode", method = RequestMethod.GET)
  623 + public List<SchedulePlanInfo> currentSchedulePlan(@RequestParam String lineCode){
  624 + return scheduleRealInfoService.currentSchedulePlan(lineCode);
  625 + }
  626 +
  627 + @RequestMapping(value = "lpChangeMulti", method = RequestMethod.POST)
  628 + public Map<String, Object> lpChangeMulti(@RequestParam String leftIdx, @RequestParam String rightIdx,@RequestParam int type){
  629 + return scheduleRealInfoService.lpChangeMulti(leftIdx, rightIdx, type);
  630 + }
  631 +
  632 + /**
  633 + * 删除当日实际排班
  634 + * @return
  635 + */
  636 + @RequestMapping(value = "deleteRealSchedule", method = RequestMethod.POST)
  637 + public Map<String, Object> deleteRealSchedule(@RequestParam String lineCode){
  638 + return dayOfSchedule.deleteRealSchedule(lineCode);
  639 + }
  640 +
  641 + /**
  642 + * 从计划表重新加载当日排班
  643 + * @param lineCode
  644 + * @return
  645 + */
  646 + @RequestMapping(value = "reLoadRealSchedule", method = RequestMethod.POST)
  647 + public Map<String, Object> reLoadRealSchedule(@RequestParam String lineCode){
  648 + Map<String, Object> rs = new HashMap<>();
  649 + List<ScheduleRealInfo> list = dayOfSchedule.findByLineCode(lineCode);
  650 + if(list != null && list.size() > 0){
  651 + rs.put("status", ResponseCode.ERROR);
  652 + rs.put("msg", "失败," + list.get(0).getXlName() + "当日存在实际排班,无法重新加载。");
  653 + return rs;
  654 + }
  655 +
  656 + int code = dayOfSchedule.reloadSch(lineCode);
  657 +
  658 + //重新按公司编码索引数据
  659 + dayOfSchedule.groupByGsbm();
  660 + rs.put("status", code==0? ResponseCode.SUCCESS: ResponseCode.ERROR);
  661 + return rs;
  662 + }
  663 +
  664 + /**
  665 + * 误点调整
  666 + * @param idx
  667 + * @param minute
  668 + * @return
  669 + */
  670 + @RequestMapping(value = "lateAdjust", method = RequestMethod.POST)
  671 + public Map<String, Object> lateAdjust(@RequestParam String idx,@RequestParam float minute ){
  672 + return scheduleRealInfoService.lateAdjust(idx, minute);
  673 + }
  674 +
  675 + /**
  676 + * 获取所有应发未到的班次
  677 + * @param idx
  678 + * @return
  679 + */
  680 + @RequestMapping(value = "allLate2")
  681 + public List<ScheduleRealInfo> allLate2(@RequestParam String idx){
  682 + return scheduleRealInfoService.allLate2(idx);
  683 + }
  684 +
  685 + /**
  686 + * 添加一个临加到历史库
  687 + * @param sch
  688 + * @return
  689 + */
  690 + @RequestMapping(value = "history/add", method = RequestMethod.POST)
  691 + public Map<String, Object> addToHistory(ScheduleRealInfo sch){
  692 + return scheduleRealInfoService.addToHistory(sch);
  693 + }
  694 +
  695 + /**
  696 + * 从历史库里删除临加班次
  697 + * @param sch
  698 + * @return
  699 + */
  700 + @RequestMapping(value = "history/{id}", method = RequestMethod.DELETE)
  701 + public Map<String, Object> deleteToHistory(@PathVariable("id") Long id){
  702 + return scheduleRealInfoService.deleteToHistory(id);
  703 + }
  704 +
  705 + @RequestMapping(value = "isCircleQdz", method = RequestMethod.POST)
  706 + public Map<String, Object> isCircleQdz(@RequestParam String line, String nbbm, String ts, String qdzCode){
  707 + Map<String, Object> map =new HashMap<>();
  708 + map.put("isExist",scheduleRealInfoService.isCircleQdz(nbbm, ts, line, qdzCode));
  709 + return map;
  710 + }
  711 +
  712 + /**
  713 + * 从历史库里删除临加班次
  714 + * @param sch
  715 + * @return
  716 + */
  717 + @RequestMapping(value = "wxsb", method = RequestMethod.POST)
  718 + public Map<String, Object> repairReport(@RequestParam Map<String, Object> param){
  719 + return scheduleRealInfoService.repairReport(param, true);
  720 + }
  721 +
  722 + @RequestMapping(value = "wxsb", method = RequestMethod.GET)
  723 + public List<RepairReport> repairReportList(@RequestParam String line, @RequestParam String date, @RequestParam String code, @RequestParam String type){
  724 + return scheduleRealInfoService.repairReportList(line, date, code, type);
  725 + }
  726 +
  727 + @RequestMapping(value = "lineLevel", method = RequestMethod.GET)
  728 + public Map<String, String> lineLevel(@RequestParam String idx){
  729 + return scheduleRealInfoService.getLevelsByLines(Arrays.asList(idx.split(",")));
  730 + }
  731 +}
... ...
src/main/java/com/bsth/controller/report/ReportController.java
... ... @@ -371,4 +371,10 @@ public class ReportController {
371 371 return service.singledatatj(map);
372 372 }
373 373  
  374 + //单日统计路单公里与油量,电量合并
  375 + @RequestMapping(value = "/singleEnergy", method = RequestMethod.GET)
  376 + public List<Map<String, Object>> singleEnergy(@RequestParam Map<String, Object> map) {
  377 +
  378 + return service.singleEnergy(map);
  379 + }
374 380 }
... ...
src/main/java/com/bsth/controller/schedule/basicinfo/CarController_facade.java
1   -package com.bsth.controller.schedule.basicinfo;
2   -
3   -import com.alibaba.dubbo.config.annotation.Reference;
4   -import com.bsth.common.ResponseCode;
5   -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
6   -import com.bsth.control_v2.plan_module.common.dto.baseinfo.CarDto;
7   -import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
8   -import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
9   -import com.bsth.control_v2.plan_module.common.service.baseinfo.CarServiceFacade;
10   -import com.bsth.controller.schedule.BController_facade;
11   -import com.bsth.service.schedule.CarsService;
12   -import com.bsth.service.schedule.utils.DataToolsFile;
13   -import org.apache.commons.lang3.StringUtils;
14   -import org.apache.poi.ss.usermodel.Workbook;
15   -import org.springframework.beans.factory.annotation.Autowired;
16   -import org.springframework.context.annotation.Conditional;
17   -import org.springframework.web.bind.annotation.RequestMapping;
18   -import org.springframework.web.bind.annotation.RequestMethod;
19   -import org.springframework.web.bind.annotation.RequestParam;
20   -import org.springframework.web.bind.annotation.RestController;
21   -import org.springframework.web.multipart.MultipartFile;
22   -
23   -import javax.servlet.http.HttpServletResponse;
24   -import java.io.*;
25   -import java.util.*;
26   -
27   -/**
28   - * 车辆基础信息controller_facade
29   - */
30   -@RestController
31   -@Conditional(DubboConfigCondition.class)
32   -@RequestMapping("cars_sc")
33   -public class CarController_facade extends BController_facade<Integer, CarDto> {
34   -
35   - @Override
36   - public void setCreateUserInfo(CarDto carDto, Integer userId, Date createDate) {
37   - UserDto userDto = UserDto.getBuilder()
38   - .setId(userId)
39   - .build();
40   - carDto.setCreateBy(userDto);
41   - carDto.setCreateDate(createDate);
42   - }
43   - @Override
44   - public void setUpdateUserInfo(CarDto carDto, Integer userId, Date updateDate) {
45   - UserDto userDto = UserDto.getBuilder()
46   - .setId(userId)
47   - .build();
48   - carDto.setUpdateBy(userDto);
49   - carDto.setUpdateDate(updateDate);
50   - }
51   -
52   - @Reference
53   - private CarServiceFacade carServiceFacade;
54   - @Override
55   - protected BServiceFacade<Integer, CarDto> getBServiceFacade() {
56   - return carServiceFacade;
57   - }
58   -
59   - @RequestMapping(value = "/validate_zbh", method = RequestMethod.GET)
60   - public Map<String, Object> validate_zbh(@RequestParam Map<String, Object> param) {
61   - Map<String, Object> rtn = new HashMap<>();
62   - try {
63   - // 自编号验证
64   - CarDto carDto = CarDto.getBuilder()
65   - .setId(param.get("id_eq") == null ?
66   - null : Integer.valueOf(param.get("id_eq").toString()))
67   - .setInsideCode(param.get("insideCode_eq") == null ?
68   - null : param.get("insideCode_eq").toString())
69   - .build();
70   - this.carServiceFacade.validate_repeat_nbbh(carDto);
71   - rtn.put("status", ResponseCode.SUCCESS);
72   - } catch (Exception exp) {
73   - rtn.put("status", ResponseCode.ERROR);
74   - rtn.put("msg", exp.getMessage());
75   - }
76   - return rtn;
77   - }
78   -
79   - @RequestMapping(value = "/validate_clbh", method = RequestMethod.GET)
80   - public Map<String, Object> validate_clbh(@RequestParam Map<String, Object> param) {
81   - Map<String, Object> rtn = new HashMap<>();
82   - try {
83   - // 车辆编号验证
84   - CarDto carDto = CarDto.getBuilder()
85   - .setId(param.get("id_eq") == null ?
86   - null : Integer.valueOf(param.get("id_eq").toString()))
87   - .setCarCode(param.get("carCode_eq") == null ?
88   - null : param.get("carCode_eq").toString())
89   - .build();
90   - this.carServiceFacade.validate_repeat_clbh(carDto);
91   - rtn.put("status", ResponseCode.SUCCESS);
92   - } catch (Exception exp) {
93   - rtn.put("status", ResponseCode.ERROR);
94   - rtn.put("msg", exp.getMessage());
95   - }
96   - return rtn;
97   - }
98   -
99   - @RequestMapping(value = "/validate_cph", method = RequestMethod.GET)
100   - public Map<String, Object> validate_cph(@RequestParam Map<String, Object> param) {
101   - Map<String, Object> rtn = new HashMap<>();
102   - try {
103   - // 车牌号验证
104   - CarDto carDto = CarDto.getBuilder()
105   - .setId(param.get("id_eq") == null ?
106   - null : Integer.valueOf(param.get("id_eq").toString()))
107   - .setCarPlate(param.get("carPlate_eq") == null ?
108   - null : param.get("carPlate_eq").toString())
109   - .build();
110   - this.carServiceFacade.validate_repeat_cph(carDto);
111   - rtn.put("status", ResponseCode.SUCCESS);
112   - } catch (Exception exp) {
113   - rtn.put("status", ResponseCode.ERROR);
114   - rtn.put("msg", exp.getMessage());
115   - }
116   - return rtn;
117   - }
118   -
119   - @RequestMapping(value = "/validate_sbbh", method = RequestMethod.GET)
120   - public Map<String, Object> validate_sbbh(@RequestParam Map<String, Object> param) {
121   - Map<String, Object> rtn = new HashMap<>();
122   - try {
123   - // 设备编号验证
124   - CarDto carDto = CarDto.getBuilder()
125   - .setId(param.get("id_eq") == null ?
126   - null : Integer.valueOf(param.get("id_eq").toString()))
127   - .setEquipmentCode(param.get("equipmentCode_eq") == null ?
128   - null : param.get("equipmentCode_eq").toString())
129   - .build();
130   - this.carServiceFacade.validate_repeat_sbbh(carDto);
131   - rtn.put("status", ResponseCode.SUCCESS);
132   - } catch (Exception exp) {
133   - rtn.put("status", ResponseCode.ERROR);
134   - rtn.put("msg", exp.getMessage());
135   - }
136   - return rtn;
137   - }
138   -
139   - //------------------ TODO:导入导出逻辑,之后会服务化 -----------------//
140   - @Autowired
141   - private CarsService carsService;
142   - // 上传excel文件
143   - @RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
144   - public Map<String, Object> uploadFile(MultipartFile file) {
145   - Map<String, Object> rtn = new HashMap<>();
146   - try {
147   - DataToolsFile dataToolsFile = carsService.uploadFile(file.getOriginalFilename(), file.getBytes());
148   - // excel文件名
149   - String fileName = dataToolsFile.getFile().getAbsolutePath();
150   - Workbook wb = dataToolsFile.getFileType().getWorkBook(dataToolsFile.getFile());
151   -
152   - // excel文件sheet
153   - List<String> sheetnames = new ArrayList<>();
154   - for (int i = 0; i < wb.getNumberOfSheets(); i ++) {
155   - sheetnames.add(wb.getSheetAt(i).getSheetName());
156   - }
157   -
158   - wb.close();
159   -
160   - rtn.put("status", ResponseCode.SUCCESS);
161   - rtn.put("filename", fileName);
162   - rtn.put("sheetnames", StringUtils.join(sheetnames, ","));
163   - } catch (Exception exp) {
164   - exp.printStackTrace();
165   - rtn.put("status", ResponseCode.ERROR);
166   - rtn.put("msg", exp.getMessage());
167   - }
168   - return rtn;
169   - }
170   - // 导入excel文件
171   - @RequestMapping(value = "/importFile", method = RequestMethod.POST)
172   - public Map<String, Object> importFile(@RequestParam Map<String, Object> params) {
173   - Map<String, Object> rtn = new HashMap<>();
174   -
175   - try {
176   - File file = new File(String.valueOf(params.get("filename")));
177   - if (!file.exists()) {
178   - throw new Exception("导入文件不存在!");
179   - }
180   - carsService.importData(file, params);
181   -
182   - rtn.put("status", ResponseCode.SUCCESS);
183   - rtn.put("msg", "导入文件成功");
184   - } catch (Exception exp) {
185   - rtn.put("status", ResponseCode.ERROR);
186   - rtn.put("msg", exp.getMessage());
187   - }
188   -
189   - return rtn;
190   - }
191   - // 上传并导入excel文件
192   - @RequestMapping(value = "/uploadAndImportFile", method = RequestMethod.POST)
193   - public Map<String, Object> uploadAndImportFile(MultipartFile file) {
194   - Map<String, Object> rtn = new HashMap<>();
195   -
196   - try {
197   - DataToolsFile dataToolsFile = carsService.uploadFile(file.getOriginalFilename(), file.getBytes());
198   - Map<String, Object> params = new HashMap<>();
199   - carsService.importData(dataToolsFile.getFile(), params);
200   -
201   - rtn.put("status", ResponseCode.SUCCESS);
202   - rtn.put("msg", "上传&导入文件成功");
203   - } catch (Exception exp) {
204   - exp.printStackTrace();
205   - rtn.put("status", ResponseCode.ERROR);
206   - rtn.put("msg", exp.getMessage());
207   - }
208   -
209   - return rtn;
210   - }
211   -
212   - // 导出数据到xls文件
213   - @RequestMapping(value = "/exportFile", method = RequestMethod.GET)
214   - public void exportFile(HttpServletResponse response,
215   - @RequestParam Map<String, Object> params) throws Exception {
216   - DataToolsFile dataToolsFile = carsService.exportData(params);
217   - // 流输出导出文件
218   - response.setHeader("content-type", "application/octet-stream");
219   - response.setHeader("Content-Disposition", "attachment; filename=" + dataToolsFile.getFile().getName());
220   - response.setContentType("application/octet-stream");
221   -
222   - OutputStream os = response.getOutputStream();
223   - BufferedOutputStream bos = new BufferedOutputStream(os);
224   -
225   - InputStream is = new FileInputStream(dataToolsFile.getFile());
226   - BufferedInputStream bis = new BufferedInputStream(is);
227   -
228   - int length = 0;
229   - byte[] temp = new byte[1 * 1024 * 10];
230   - while ((length = bis.read(temp)) != -1) {
231   - bos.write(temp, 0, length);
232   - }
233   - bos.flush();
234   - bis.close();
235   - bos.close();
236   - is.close();
237   - }
238   -
239   -
240   -
241   -
242   -}
  1 +package com.bsth.controller.schedule.basicinfo;
  2 +
  3 +import com.alibaba.dubbo.config.annotation.Reference;
  4 +import com.bsth.common.ResponseCode;
  5 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
  6 +import com.bsth.control_v2.plan_module.common.dto.baseinfo.CarDto;
  7 +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
  8 +import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
  9 +import com.bsth.control_v2.plan_module.common.service.baseinfo.CarServiceFacade;
  10 +import com.bsth.controller.schedule.BController_facade;
  11 +import com.bsth.service.schedule.CarsService;
  12 +import com.bsth.service.schedule.utils.DataToolsFile;
  13 +import org.apache.commons.lang3.StringUtils;
  14 +import org.apache.poi.ss.usermodel.Workbook;
  15 +import org.springframework.beans.factory.annotation.Autowired;
  16 +import org.springframework.context.annotation.Conditional;
  17 +import org.springframework.web.bind.annotation.RequestMapping;
  18 +import org.springframework.web.bind.annotation.RequestMethod;
  19 +import org.springframework.web.bind.annotation.RequestParam;
  20 +import org.springframework.web.bind.annotation.RestController;
  21 +import org.springframework.web.multipart.MultipartFile;
  22 +
  23 +import javax.servlet.http.HttpServletResponse;
  24 +import java.io.*;
  25 +import java.util.*;
  26 +
  27 +/**
  28 + * 车辆基础信息controller_facade
  29 + */
  30 +@RestController
  31 +@Conditional(DubboConfigCondition.class)
  32 +@RequestMapping("cars_sc")
  33 +public class CarController_facade extends BController_facade<Integer, CarDto> {
  34 +
  35 + @Override
  36 + public void setCreateUserInfo(CarDto carDto, Integer userId, Date createDate) {
  37 + UserDto userDto = UserDto.getBuilder()
  38 + .setId(userId)
  39 + .build();
  40 + carDto.setCreateBy(userDto);
  41 + carDto.setCreateDate(createDate);
  42 + }
  43 + @Override
  44 + public void setUpdateUserInfo(CarDto carDto, Integer userId, Date updateDate) {
  45 + UserDto userDto = UserDto.getBuilder()
  46 + .setId(userId)
  47 + .build();
  48 + carDto.setUpdateBy(userDto);
  49 + carDto.setUpdateDate(updateDate);
  50 + }
  51 +
  52 + @Reference
  53 + private CarServiceFacade carServiceFacade;
  54 + @Override
  55 + protected BServiceFacade<Integer, CarDto> getBServiceFacade() {
  56 + return carServiceFacade;
  57 + }
  58 +
  59 + @RequestMapping(value = "/validate_zbh", method = RequestMethod.GET)
  60 + public Map<String, Object> validate_zbh(@RequestParam Map<String, Object> param) {
  61 + Map<String, Object> rtn = new HashMap<>();
  62 + try {
  63 + // 自编号验证
  64 + CarDto carDto = CarDto.getBuilder()
  65 + .setId(param.get("id_eq") == null ?
  66 + null : Integer.valueOf(param.get("id_eq").toString()))
  67 + .setInsideCode(param.get("insideCode_eq") == null ?
  68 + null : param.get("insideCode_eq").toString())
  69 + .build();
  70 + this.carServiceFacade.validate_repeat_nbbh(carDto);
  71 + rtn.put("status", ResponseCode.SUCCESS);
  72 + } catch (Exception exp) {
  73 + rtn.put("status", ResponseCode.ERROR);
  74 + rtn.put("msg", exp.getMessage());
  75 + }
  76 + return rtn;
  77 + }
  78 +
  79 + @RequestMapping(value = "/validate_clbh", method = RequestMethod.GET)
  80 + public Map<String, Object> validate_clbh(@RequestParam Map<String, Object> param) {
  81 + Map<String, Object> rtn = new HashMap<>();
  82 + try {
  83 + // 车辆编号验证
  84 + CarDto carDto = CarDto.getBuilder()
  85 + .setId(param.get("id_eq") == null ?
  86 + null : Integer.valueOf(param.get("id_eq").toString()))
  87 + .setCarCode(param.get("carCode_eq") == null ?
  88 + null : param.get("carCode_eq").toString())
  89 + .build();
  90 + this.carServiceFacade.validate_repeat_clbh(carDto);
  91 + rtn.put("status", ResponseCode.SUCCESS);
  92 + } catch (Exception exp) {
  93 + rtn.put("status", ResponseCode.ERROR);
  94 + rtn.put("msg", exp.getMessage());
  95 + }
  96 + return rtn;
  97 + }
  98 +
  99 + @RequestMapping(value = "/validate_cph", method = RequestMethod.GET)
  100 + public Map<String, Object> validate_cph(@RequestParam Map<String, Object> param) {
  101 + Map<String, Object> rtn = new HashMap<>();
  102 + try {
  103 + // 车牌号验证
  104 + CarDto carDto = CarDto.getBuilder()
  105 + .setId(param.get("id_eq") == null ?
  106 + null : Integer.valueOf(param.get("id_eq").toString()))
  107 + .setCarPlate(param.get("carPlate_eq") == null ?
  108 + null : param.get("carPlate_eq").toString())
  109 + .build();
  110 + this.carServiceFacade.validate_repeat_cph(carDto);
  111 + rtn.put("status", ResponseCode.SUCCESS);
  112 + } catch (Exception exp) {
  113 + rtn.put("status", ResponseCode.ERROR);
  114 + rtn.put("msg", exp.getMessage());
  115 + }
  116 + return rtn;
  117 + }
  118 +
  119 + @RequestMapping(value = "/validate_sbbh", method = RequestMethod.GET)
  120 + public Map<String, Object> validate_sbbh(@RequestParam Map<String, Object> param) {
  121 + Map<String, Object> rtn = new HashMap<>();
  122 + try {
  123 + // 设备编号验证
  124 + CarDto carDto = CarDto.getBuilder()
  125 + .setId(param.get("id_eq") == null ?
  126 + null : Integer.valueOf(param.get("id_eq").toString()))
  127 + .setEquipmentCode(param.get("equipmentCode_eq") == null ?
  128 + null : param.get("equipmentCode_eq").toString())
  129 + .build();
  130 + this.carServiceFacade.validate_repeat_sbbh(carDto);
  131 + rtn.put("status", ResponseCode.SUCCESS);
  132 + } catch (Exception exp) {
  133 + rtn.put("status", ResponseCode.ERROR);
  134 + rtn.put("msg", exp.getMessage());
  135 + }
  136 + return rtn;
  137 + }
  138 +
  139 + //------------------ TODO:导入导出逻辑,之后会服务化 -----------------//
  140 + @Autowired
  141 + private CarsService carsService;
  142 + // 上传excel文件
  143 + @RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
  144 + public Map<String, Object> uploadFile(MultipartFile file) {
  145 + Map<String, Object> rtn = new HashMap<>();
  146 + try {
  147 + DataToolsFile dataToolsFile = carsService.uploadFile(file.getOriginalFilename(), file.getBytes());
  148 + // excel文件名
  149 + String fileName = dataToolsFile.getFile().getAbsolutePath();
  150 + Workbook wb = dataToolsFile.getFileType().getWorkBook(dataToolsFile.getFile());
  151 +
  152 + // excel文件sheet
  153 + List<String> sheetnames = new ArrayList<>();
  154 + for (int i = 0; i < wb.getNumberOfSheets(); i ++) {
  155 + sheetnames.add(wb.getSheetAt(i).getSheetName());
  156 + }
  157 +
  158 + wb.close();
  159 +
  160 + rtn.put("status", ResponseCode.SUCCESS);
  161 + rtn.put("filename", fileName);
  162 + rtn.put("sheetnames", StringUtils.join(sheetnames, ","));
  163 + } catch (Exception exp) {
  164 + exp.printStackTrace();
  165 + rtn.put("status", ResponseCode.ERROR);
  166 + rtn.put("msg", exp.getMessage());
  167 + }
  168 + return rtn;
  169 + }
  170 + // 导入excel文件
  171 + @RequestMapping(value = "/importFile", method = RequestMethod.POST)
  172 + public Map<String, Object> importFile(@RequestParam Map<String, Object> params) {
  173 + Map<String, Object> rtn = new HashMap<>();
  174 +
  175 + try {
  176 + File file = new File(String.valueOf(params.get("filename")));
  177 + if (!file.exists()) {
  178 + throw new Exception("导入文件不存在!");
  179 + }
  180 + carsService.importData(file, params);
  181 +
  182 + rtn.put("status", ResponseCode.SUCCESS);
  183 + rtn.put("msg", "导入文件成功");
  184 + } catch (Exception exp) {
  185 + rtn.put("status", ResponseCode.ERROR);
  186 + rtn.put("msg", exp.getMessage());
  187 + }
  188 +
  189 + return rtn;
  190 + }
  191 + // 上传并导入excel文件
  192 + @RequestMapping(value = "/uploadAndImportFile", method = RequestMethod.POST)
  193 + public Map<String, Object> uploadAndImportFile(MultipartFile file) {
  194 + Map<String, Object> rtn = new HashMap<>();
  195 +
  196 + try {
  197 + DataToolsFile dataToolsFile = carsService.uploadFile(file.getOriginalFilename(), file.getBytes());
  198 + Map<String, Object> params = new HashMap<>();
  199 + carsService.importData(dataToolsFile.getFile(), params);
  200 +
  201 + rtn.put("status", ResponseCode.SUCCESS);
  202 + rtn.put("msg", "上传&导入文件成功");
  203 + } catch (Exception exp) {
  204 + exp.printStackTrace();
  205 + rtn.put("status", ResponseCode.ERROR);
  206 + rtn.put("msg", exp.getMessage());
  207 + }
  208 +
  209 + return rtn;
  210 + }
  211 +
  212 + // 导出数据到xls文件
  213 + @RequestMapping(value = "/exportFile", method = RequestMethod.GET)
  214 + public void exportFile(HttpServletResponse response,
  215 + @RequestParam Map<String, Object> params) throws Exception {
  216 + DataToolsFile dataToolsFile = carsService.exportData(params);
  217 + // 流输出导出文件
  218 + response.setHeader("content-type", "application/octet-stream");
  219 + response.setHeader("Content-Disposition", "attachment; filename=" + dataToolsFile.getFile().getName());
  220 + response.setContentType("application/octet-stream");
  221 +
  222 + OutputStream os = response.getOutputStream();
  223 + BufferedOutputStream bos = new BufferedOutputStream(os);
  224 +
  225 + InputStream is = new FileInputStream(dataToolsFile.getFile());
  226 + BufferedInputStream bis = new BufferedInputStream(is);
  227 +
  228 + int length = 0;
  229 + byte[] temp = new byte[1 * 1024 * 10];
  230 + while ((length = bis.read(temp)) != -1) {
  231 + bos.write(temp, 0, length);
  232 + }
  233 + bos.flush();
  234 + bis.close();
  235 + bos.close();
  236 + is.close();
  237 + }
  238 +
  239 +
  240 +
  241 +
  242 +}
... ...
src/main/java/com/bsth/controller/schedule/basicinfo/CarDeviceController_facade.java
1   -package com.bsth.controller.schedule.basicinfo;
2   -
3   -import com.alibaba.dubbo.config.annotation.Reference;
4   -import com.bsth.common.ResponseCode;
5   -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
6   -import com.bsth.control_v2.plan_module.common.dto.baseinfo.CarDeviceDto;
7   -import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
8   -import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
9   -import com.bsth.control_v2.plan_module.common.service.baseinfo.CarDeviceServiceFacade;
10   -import com.bsth.controller.schedule.BController_facade;
11   -import org.joda.time.DateTime;
12   -import org.springframework.context.annotation.Conditional;
13   -import org.springframework.web.bind.annotation.RequestMapping;
14   -import org.springframework.web.bind.annotation.RequestMethod;
15   -import org.springframework.web.bind.annotation.RequestParam;
16   -import org.springframework.web.bind.annotation.RestController;
17   -
18   -import java.util.Date;
19   -import java.util.HashMap;
20   -import java.util.Map;
21   -
22   -@RestController
23   -@Conditional(DubboConfigCondition.class)
24   -@RequestMapping("cde_sc")
25   -public class CarDeviceController_facade extends BController_facade<Long, CarDeviceDto> {
26   - @Override
27   - public void setCreateUserInfo(CarDeviceDto carDeviceDto, Integer userId, Date createDate) {
28   - UserDto userDto = UserDto.getBuilder()
29   - .setId(userId)
30   - .build();
31   - carDeviceDto.setCreateBy(userDto);
32   - carDeviceDto.setCreateDate(createDate);
33   - }
34   -
35   - @Override
36   - public void setUpdateUserInfo(CarDeviceDto carDeviceDto, Integer userId, Date updateDate) {
37   - UserDto userDto = UserDto.getBuilder()
38   - .setId(userId)
39   - .build();
40   - carDeviceDto.setUpdateBy(userDto);
41   - carDeviceDto.setUpdateDate(updateDate);
42   - }
43   -
44   - @Reference
45   - private CarDeviceServiceFacade carDeviceServiceFacade;
46   -
47   - @Override
48   - protected BServiceFacade<Long, CarDeviceDto> getBServiceFacade() {
49   - return carDeviceServiceFacade;
50   - }
51   - @RequestMapping(value = "/validate_qyrq", method = RequestMethod.GET)
52   - public Map<String, Object> validate_qyrq(@RequestParam Map<String, Object> param) {
53   - Map<String, Object> rtn = new HashMap<>();
54   -
55   - try {
56   - // 启用日期验证
57   - // 计算日期
58   - Date qyrq_c = null;
59   - if (param.get("qyrq_eq") != null) {
60   - try {
61   - qyrq_c = new Date();
62   - qyrq_c.setTime(Long.parseLong(param.get("qyrq_eq").toString()));
63   - } catch (Exception exp) {
64   - qyrq_c = new DateTime(param.get("qyrq_eq").toString()).toDate();
65   - }
66   - }
67   -
68   - CarDeviceDto carDeviceDto = CarDeviceDto.getBuilder()
69   - .setId(param.get("id_eq") == null ?
70   - null : Long.valueOf(param.get("id_eq").toString()))
71   - .setXl(param.get("xl_eq") == null ?
72   - null : Integer.valueOf(param.get("xl_eq").toString()))
73   - .setCl(param.get("cl_eq") == null ?
74   - null : Integer.valueOf(param.get("cl_eq").toString()))
75   - .setQyrq(qyrq_c)
76   - .build();
77   -
78   - this.carDeviceServiceFacade.validate_qyrq(carDeviceDto);
79   - rtn.put("status", ResponseCode.SUCCESS);
80   - } catch (Exception exp) {
81   - rtn.put("status", ResponseCode.ERROR);
82   - rtn.put("msg", exp.getMessage());
83   - }
84   -
85   - return rtn;
86   - }
87   -}
  1 +package com.bsth.controller.schedule.basicinfo;
  2 +
  3 +import com.alibaba.dubbo.config.annotation.Reference;
  4 +import com.bsth.common.ResponseCode;
  5 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
  6 +import com.bsth.control_v2.plan_module.common.dto.baseinfo.CarDeviceDto;
  7 +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
  8 +import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
  9 +import com.bsth.control_v2.plan_module.common.service.baseinfo.CarDeviceServiceFacade;
  10 +import com.bsth.controller.schedule.BController_facade;
  11 +import org.joda.time.DateTime;
  12 +import org.springframework.context.annotation.Conditional;
  13 +import org.springframework.web.bind.annotation.RequestMapping;
  14 +import org.springframework.web.bind.annotation.RequestMethod;
  15 +import org.springframework.web.bind.annotation.RequestParam;
  16 +import org.springframework.web.bind.annotation.RestController;
  17 +
  18 +import java.util.Date;
  19 +import java.util.HashMap;
  20 +import java.util.Map;
  21 +
  22 +@RestController
  23 +@Conditional(DubboConfigCondition.class)
  24 +@RequestMapping("cde_sc")
  25 +public class CarDeviceController_facade extends BController_facade<Long, CarDeviceDto> {
  26 + @Override
  27 + public void setCreateUserInfo(CarDeviceDto carDeviceDto, Integer userId, Date createDate) {
  28 + UserDto userDto = UserDto.getBuilder()
  29 + .setId(userId)
  30 + .build();
  31 + carDeviceDto.setCreateBy(userDto);
  32 + carDeviceDto.setCreateDate(createDate);
  33 + }
  34 +
  35 + @Override
  36 + public void setUpdateUserInfo(CarDeviceDto carDeviceDto, Integer userId, Date updateDate) {
  37 + UserDto userDto = UserDto.getBuilder()
  38 + .setId(userId)
  39 + .build();
  40 + carDeviceDto.setUpdateBy(userDto);
  41 + carDeviceDto.setUpdateDate(updateDate);
  42 + }
  43 +
  44 + @Reference
  45 + private CarDeviceServiceFacade carDeviceServiceFacade;
  46 +
  47 + @Override
  48 + protected BServiceFacade<Long, CarDeviceDto> getBServiceFacade() {
  49 + return carDeviceServiceFacade;
  50 + }
  51 + @RequestMapping(value = "/validate_qyrq", method = RequestMethod.GET)
  52 + public Map<String, Object> validate_qyrq(@RequestParam Map<String, Object> param) {
  53 + Map<String, Object> rtn = new HashMap<>();
  54 +
  55 + try {
  56 + // 启用日期验证
  57 + // 计算日期
  58 + Date qyrq_c = null;
  59 + if (param.get("qyrq_eq") != null) {
  60 + try {
  61 + qyrq_c = new Date();
  62 + qyrq_c.setTime(Long.parseLong(param.get("qyrq_eq").toString()));
  63 + } catch (Exception exp) {
  64 + qyrq_c = new DateTime(param.get("qyrq_eq").toString()).toDate();
  65 + }
  66 + }
  67 +
  68 + CarDeviceDto carDeviceDto = CarDeviceDto.getBuilder()
  69 + .setId(param.get("id_eq") == null ?
  70 + null : Long.valueOf(param.get("id_eq").toString()))
  71 + .setXl(param.get("xl_eq") == null ?
  72 + null : Integer.valueOf(param.get("xl_eq").toString()))
  73 + .setCl(param.get("cl_eq") == null ?
  74 + null : Integer.valueOf(param.get("cl_eq").toString()))
  75 + .setQyrq(qyrq_c)
  76 + .build();
  77 +
  78 + this.carDeviceServiceFacade.validate_qyrq(carDeviceDto);
  79 + rtn.put("status", ResponseCode.SUCCESS);
  80 + } catch (Exception exp) {
  81 + rtn.put("status", ResponseCode.ERROR);
  82 + rtn.put("msg", exp.getMessage());
  83 + }
  84 +
  85 + return rtn;
  86 + }
  87 +}
... ...
src/main/java/com/bsth/controller/schedule/basicinfo/EmployeeController_facade.java
1   -package com.bsth.controller.schedule.basicinfo;
2   -
3   -import com.alibaba.dubbo.config.annotation.Reference;
4   -import com.bsth.common.ResponseCode;
5   -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
6   -import com.bsth.control_v2.plan_module.common.dto.baseinfo.PersonnelDto;
7   -import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
8   -import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
9   -import com.bsth.control_v2.plan_module.common.service.baseinfo.PersonnelServiceFacade;
10   -import com.bsth.controller.schedule.BController_facade;
11   -import com.bsth.service.schedule.EmployeeService;
12   -import com.bsth.service.schedule.utils.DataToolsFile;
13   -import org.apache.commons.lang3.StringUtils;
14   -import org.apache.poi.ss.usermodel.Workbook;
15   -import org.springframework.beans.factory.annotation.Autowired;
16   -import org.springframework.context.annotation.Conditional;
17   -import org.springframework.web.bind.annotation.RequestMapping;
18   -import org.springframework.web.bind.annotation.RequestMethod;
19   -import org.springframework.web.bind.annotation.RequestParam;
20   -import org.springframework.web.bind.annotation.RestController;
21   -import org.springframework.web.multipart.MultipartFile;
22   -
23   -import javax.servlet.http.HttpServletResponse;
24   -import java.io.*;
25   -import java.util.*;
26   -
27   -/**
28   - * 人员基础信息Controller_facade
29   - */
30   -@RestController
31   -@Conditional(DubboConfigCondition.class)
32   -@RequestMapping("ee")
33   -public class EmployeeController_facade extends BController_facade<Integer, PersonnelDto> {
34   - @Override
35   - public void setCreateUserInfo(PersonnelDto personnelDto, Integer userId, Date createDate) {
36   - UserDto userDto = UserDto.getBuilder()
37   - .setId(userId)
38   - .build();
39   - personnelDto.setCreateBy(userDto);
40   - personnelDto.setCreateDate(createDate);
41   - }
42   -
43   - @Override
44   - public void setUpdateUserInfo(PersonnelDto personnelDto, Integer userId, Date updateDate) {
45   - UserDto userDto = UserDto.getBuilder()
46   - .setId(userId)
47   - .build();
48   - personnelDto.setUpdateBy(userDto);
49   - personnelDto.setUpdateDate(updateDate);
50   - }
51   -
52   - @Reference
53   - private PersonnelServiceFacade personnelServiceFacade;
54   - @Override
55   - protected BServiceFacade<Integer, PersonnelDto> getBServiceFacade() {
56   - return personnelServiceFacade;
57   - }
58   - @RequestMapping(value = "/validate_gh", method = RequestMethod.GET)
59   - public Map<String, Object> validate_gh(@RequestParam Map<String, Object> param) {
60   - Map<String, Object> rtn = new HashMap<>();
61   - try {
62   - // 工号验证
63   - PersonnelDto personnelDto = PersonnelDto.getBuilder()
64   - .setId(param.get("id_eq") == null ?
65   - null : Integer.valueOf(param.get("id_eq").toString()))
66   - .setCompanyCode(param.get("companyCode_eq") == null ?
67   - null : param.get("companyCode_eq").toString())
68   - .setJobCode(param.get("jobCode_eq") == null ?
69   - null : param.get("jobCode_eq").toString())
70   - .build();
71   - this.personnelServiceFacade.validate_gh(personnelDto);
72   - rtn.put("status", ResponseCode.SUCCESS);
73   - } catch (Exception exp) {
74   - rtn.put("status", ResponseCode.ERROR);
75   - rtn.put("msg", exp.getMessage());
76   - }
77   -
78   - return rtn;
79   - }
80   -
81   - //------------------ TODO:导入导出逻辑,之后会服务化 -----------------//
82   - @Autowired
83   - private EmployeeService employeeService;
84   - // 上传excel文件
85   - @RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
86   - public Map<String, Object> uploadFile(MultipartFile file) {
87   - Map<String, Object> rtn = new HashMap<>();
88   - try {
89   - DataToolsFile dataToolsFile = employeeService.uploadFile(file.getOriginalFilename(), file.getBytes());
90   - // excel文件名
91   - String fileName = dataToolsFile.getFile().getAbsolutePath();
92   - Workbook wb = dataToolsFile.getFileType().getWorkBook(dataToolsFile.getFile());
93   -
94   - // excel文件sheet
95   - List<String> sheetnames = new ArrayList<>();
96   - for (int i = 0; i < wb.getNumberOfSheets(); i ++) {
97   - sheetnames.add(wb.getSheetAt(i).getSheetName());
98   - }
99   -
100   - wb.close();
101   -
102   - rtn.put("status", ResponseCode.SUCCESS);
103   - rtn.put("filename", fileName);
104   - rtn.put("sheetnames", StringUtils.join(sheetnames, ","));
105   - } catch (Exception exp) {
106   - exp.printStackTrace();
107   - rtn.put("status", ResponseCode.ERROR);
108   - rtn.put("msg", exp.getMessage());
109   - }
110   - return rtn;
111   - }
112   - // 导入excel文件
113   - @RequestMapping(value = "/importFile", method = RequestMethod.POST)
114   - public Map<String, Object> importFile(@RequestParam Map<String, Object> params) {
115   - Map<String, Object> rtn = new HashMap<>();
116   -
117   - try {
118   - File file = new File(String.valueOf(params.get("filename")));
119   - if (!file.exists()) {
120   - throw new Exception("导入文件不存在!");
121   - }
122   - employeeService.importData(file, params);
123   -
124   - rtn.put("status", ResponseCode.SUCCESS);
125   - rtn.put("msg", "导入文件成功");
126   - } catch (Exception exp) {
127   - rtn.put("status", ResponseCode.ERROR);
128   - rtn.put("msg", exp.getMessage());
129   - }
130   -
131   - return rtn;
132   - }
133   - // 上传并导入excel文件
134   - @RequestMapping(value = "/uploadAndImportFile", method = RequestMethod.POST)
135   - public Map<String, Object> uploadAndImportFile(MultipartFile file) {
136   - Map<String, Object> rtn = new HashMap<>();
137   -
138   - try {
139   - DataToolsFile dataToolsFile = employeeService.uploadFile(file.getOriginalFilename(), file.getBytes());
140   - Map<String, Object> params = new HashMap<>();
141   - employeeService.importData(dataToolsFile.getFile(), params);
142   -
143   - rtn.put("status", ResponseCode.SUCCESS);
144   - rtn.put("msg", "上传&导入文件成功");
145   - } catch (Exception exp) {
146   - exp.printStackTrace();
147   - rtn.put("status", ResponseCode.ERROR);
148   - rtn.put("msg", exp.getMessage());
149   - }
150   -
151   - return rtn;
152   - }
153   -
154   - // 导出数据到xls文件
155   - @RequestMapping(value = "/exportFile", method = RequestMethod.GET)
156   - public void exportFile(HttpServletResponse response,
157   - @RequestParam Map<String, Object> params) throws Exception {
158   - DataToolsFile dataToolsFile = employeeService.exportData(params);
159   - // 流输出导出文件
160   - response.setHeader("content-type", "application/octet-stream");
161   - response.setHeader("Content-Disposition", "attachment; filename=" + dataToolsFile.getFile().getName());
162   - response.setContentType("application/octet-stream");
163   -
164   - OutputStream os = response.getOutputStream();
165   - BufferedOutputStream bos = new BufferedOutputStream(os);
166   -
167   - InputStream is = new FileInputStream(dataToolsFile.getFile());
168   - BufferedInputStream bis = new BufferedInputStream(is);
169   -
170   - int length = 0;
171   - byte[] temp = new byte[1 * 1024 * 10];
172   - while ((length = bis.read(temp)) != -1) {
173   - bos.write(temp, 0, length);
174   - }
175   - bos.flush();
176   - bis.close();
177   - bos.close();
178   - is.close();
179   - }
180   -
181   -}
  1 +package com.bsth.controller.schedule.basicinfo;
  2 +
  3 +import com.alibaba.dubbo.config.annotation.Reference;
  4 +import com.bsth.common.ResponseCode;
  5 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
  6 +import com.bsth.control_v2.plan_module.common.dto.baseinfo.PersonnelDto;
  7 +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
  8 +import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
  9 +import com.bsth.control_v2.plan_module.common.service.baseinfo.PersonnelServiceFacade;
  10 +import com.bsth.controller.schedule.BController_facade;
  11 +import com.bsth.service.schedule.EmployeeService;
  12 +import com.bsth.service.schedule.utils.DataToolsFile;
  13 +import org.apache.commons.lang3.StringUtils;
  14 +import org.apache.poi.ss.usermodel.Workbook;
  15 +import org.springframework.beans.factory.annotation.Autowired;
  16 +import org.springframework.context.annotation.Conditional;
  17 +import org.springframework.web.bind.annotation.RequestMapping;
  18 +import org.springframework.web.bind.annotation.RequestMethod;
  19 +import org.springframework.web.bind.annotation.RequestParam;
  20 +import org.springframework.web.bind.annotation.RestController;
  21 +import org.springframework.web.multipart.MultipartFile;
  22 +
  23 +import javax.servlet.http.HttpServletResponse;
  24 +import java.io.*;
  25 +import java.util.*;
  26 +
  27 +/**
  28 + * 人员基础信息Controller_facade
  29 + */
  30 +@RestController
  31 +@Conditional(DubboConfigCondition.class)
  32 +@RequestMapping("ee")
  33 +public class EmployeeController_facade extends BController_facade<Integer, PersonnelDto> {
  34 + @Override
  35 + public void setCreateUserInfo(PersonnelDto personnelDto, Integer userId, Date createDate) {
  36 + UserDto userDto = UserDto.getBuilder()
  37 + .setId(userId)
  38 + .build();
  39 + personnelDto.setCreateBy(userDto);
  40 + personnelDto.setCreateDate(createDate);
  41 + }
  42 +
  43 + @Override
  44 + public void setUpdateUserInfo(PersonnelDto personnelDto, Integer userId, Date updateDate) {
  45 + UserDto userDto = UserDto.getBuilder()
  46 + .setId(userId)
  47 + .build();
  48 + personnelDto.setUpdateBy(userDto);
  49 + personnelDto.setUpdateDate(updateDate);
  50 + }
  51 +
  52 + @Reference
  53 + private PersonnelServiceFacade personnelServiceFacade;
  54 + @Override
  55 + protected BServiceFacade<Integer, PersonnelDto> getBServiceFacade() {
  56 + return personnelServiceFacade;
  57 + }
  58 + @RequestMapping(value = "/validate_gh", method = RequestMethod.GET)
  59 + public Map<String, Object> validate_gh(@RequestParam Map<String, Object> param) {
  60 + Map<String, Object> rtn = new HashMap<>();
  61 + try {
  62 + // 工号验证
  63 + PersonnelDto personnelDto = PersonnelDto.getBuilder()
  64 + .setId(param.get("id_eq") == null ?
  65 + null : Integer.valueOf(param.get("id_eq").toString()))
  66 + .setCompanyCode(param.get("companyCode_eq") == null ?
  67 + null : param.get("companyCode_eq").toString())
  68 + .setJobCode(param.get("jobCode_eq") == null ?
  69 + null : param.get("jobCode_eq").toString())
  70 + .build();
  71 + this.personnelServiceFacade.validate_gh(personnelDto);
  72 + rtn.put("status", ResponseCode.SUCCESS);
  73 + } catch (Exception exp) {
  74 + rtn.put("status", ResponseCode.ERROR);
  75 + rtn.put("msg", exp.getMessage());
  76 + }
  77 +
  78 + return rtn;
  79 + }
  80 +
  81 + //------------------ TODO:导入导出逻辑,之后会服务化 -----------------//
  82 + @Autowired
  83 + private EmployeeService employeeService;
  84 + // 上传excel文件
  85 + @RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
  86 + public Map<String, Object> uploadFile(MultipartFile file) {
  87 + Map<String, Object> rtn = new HashMap<>();
  88 + try {
  89 + DataToolsFile dataToolsFile = employeeService.uploadFile(file.getOriginalFilename(), file.getBytes());
  90 + // excel文件名
  91 + String fileName = dataToolsFile.getFile().getAbsolutePath();
  92 + Workbook wb = dataToolsFile.getFileType().getWorkBook(dataToolsFile.getFile());
  93 +
  94 + // excel文件sheet
  95 + List<String> sheetnames = new ArrayList<>();
  96 + for (int i = 0; i < wb.getNumberOfSheets(); i ++) {
  97 + sheetnames.add(wb.getSheetAt(i).getSheetName());
  98 + }
  99 +
  100 + wb.close();
  101 +
  102 + rtn.put("status", ResponseCode.SUCCESS);
  103 + rtn.put("filename", fileName);
  104 + rtn.put("sheetnames", StringUtils.join(sheetnames, ","));
  105 + } catch (Exception exp) {
  106 + exp.printStackTrace();
  107 + rtn.put("status", ResponseCode.ERROR);
  108 + rtn.put("msg", exp.getMessage());
  109 + }
  110 + return rtn;
  111 + }
  112 + // 导入excel文件
  113 + @RequestMapping(value = "/importFile", method = RequestMethod.POST)
  114 + public Map<String, Object> importFile(@RequestParam Map<String, Object> params) {
  115 + Map<String, Object> rtn = new HashMap<>();
  116 +
  117 + try {
  118 + File file = new File(String.valueOf(params.get("filename")));
  119 + if (!file.exists()) {
  120 + throw new Exception("导入文件不存在!");
  121 + }
  122 + employeeService.importData(file, params);
  123 +
  124 + rtn.put("status", ResponseCode.SUCCESS);
  125 + rtn.put("msg", "导入文件成功");
  126 + } catch (Exception exp) {
  127 + rtn.put("status", ResponseCode.ERROR);
  128 + rtn.put("msg", exp.getMessage());
  129 + }
  130 +
  131 + return rtn;
  132 + }
  133 + // 上传并导入excel文件
  134 + @RequestMapping(value = "/uploadAndImportFile", method = RequestMethod.POST)
  135 + public Map<String, Object> uploadAndImportFile(MultipartFile file) {
  136 + Map<String, Object> rtn = new HashMap<>();
  137 +
  138 + try {
  139 + DataToolsFile dataToolsFile = employeeService.uploadFile(file.getOriginalFilename(), file.getBytes());
  140 + Map<String, Object> params = new HashMap<>();
  141 + employeeService.importData(dataToolsFile.getFile(), params);
  142 +
  143 + rtn.put("status", ResponseCode.SUCCESS);
  144 + rtn.put("msg", "上传&导入文件成功");
  145 + } catch (Exception exp) {
  146 + exp.printStackTrace();
  147 + rtn.put("status", ResponseCode.ERROR);
  148 + rtn.put("msg", exp.getMessage());
  149 + }
  150 +
  151 + return rtn;
  152 + }
  153 +
  154 + // 导出数据到xls文件
  155 + @RequestMapping(value = "/exportFile", method = RequestMethod.GET)
  156 + public void exportFile(HttpServletResponse response,
  157 + @RequestParam Map<String, Object> params) throws Exception {
  158 + DataToolsFile dataToolsFile = employeeService.exportData(params);
  159 + // 流输出导出文件
  160 + response.setHeader("content-type", "application/octet-stream");
  161 + response.setHeader("Content-Disposition", "attachment; filename=" + dataToolsFile.getFile().getName());
  162 + response.setContentType("application/octet-stream");
  163 +
  164 + OutputStream os = response.getOutputStream();
  165 + BufferedOutputStream bos = new BufferedOutputStream(os);
  166 +
  167 + InputStream is = new FileInputStream(dataToolsFile.getFile());
  168 + BufferedInputStream bis = new BufferedInputStream(is);
  169 +
  170 + int length = 0;
  171 + byte[] temp = new byte[1 * 1024 * 10];
  172 + while ((length = bis.read(temp)) != -1) {
  173 + bos.write(temp, 0, length);
  174 + }
  175 + bos.flush();
  176 + bis.close();
  177 + bos.close();
  178 + is.close();
  179 + }
  180 +
  181 +}
... ...
src/main/java/com/bsth/controller/schedule/core/LogController_facade.java
1   -package com.bsth.controller.schedule.core;
2   -
3   -import com.alibaba.dubbo.config.annotation.Reference;
4   -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
5   -import com.bsth.control_v2.plan_module.common.dto.schedule.log.ModuleOperatorLogDto;
6   -import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
7   -import com.bsth.control_v2.plan_module.common.service.log.LogServiceFacade;
8   -import com.bsth.controller.schedule.BController_facade;
9   -import org.springframework.context.annotation.Conditional;
10   -import org.springframework.web.bind.annotation.RequestMapping;
11   -import org.springframework.web.bind.annotation.RestController;
12   -
13   -@RestController
14   -@Conditional(DubboConfigCondition.class)
15   -@RequestMapping("s_log")
16   -public class LogController_facade extends BController_facade<Long, ModuleOperatorLogDto> {
17   - @Reference
18   - private LogServiceFacade logServiceFacade;
19   -
20   - @Override
21   - protected BServiceFacade<Long, ModuleOperatorLogDto> getBServiceFacade() {
22   - return logServiceFacade;
23   - }
24   -}
  1 +package com.bsth.controller.schedule.core;
  2 +
  3 +import com.alibaba.dubbo.config.annotation.Reference;
  4 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
  5 +import com.bsth.control_v2.plan_module.common.dto.schedule.log.ModuleOperatorLogDto;
  6 +import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
  7 +import com.bsth.control_v2.plan_module.common.service.log.LogServiceFacade;
  8 +import com.bsth.controller.schedule.BController_facade;
  9 +import org.springframework.context.annotation.Conditional;
  10 +import org.springframework.web.bind.annotation.RequestMapping;
  11 +import org.springframework.web.bind.annotation.RestController;
  12 +
  13 +@RestController
  14 +@Conditional(DubboConfigCondition.class)
  15 +@RequestMapping("s_log")
  16 +public class LogController_facade extends BController_facade<Long, ModuleOperatorLogDto> {
  17 + @Reference
  18 + private LogServiceFacade logServiceFacade;
  19 +
  20 + @Override
  21 + protected BServiceFacade<Long, ModuleOperatorLogDto> getBServiceFacade() {
  22 + return logServiceFacade;
  23 + }
  24 +}
... ...
src/main/java/com/bsth/controller/schedule/core/SchedulePlanController_facade.java
1   -package com.bsth.controller.schedule.core;
2   -
3   -import com.alibaba.dubbo.config.annotation.Reference;
4   -import com.bsth.common.ResponseCode;
5   -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
6   -import com.bsth.control_v2.plan_module.common.dto.schedule.PlanDto;
7   -import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
8   -import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
9   -import com.bsth.control_v2.plan_module.common.service.schedule.PlanServiceFacade;
10   -import com.bsth.control_v2.plan_module.common.service.schedule.validate.PlanPreValidateFacade;
11   -import com.bsth.controller.schedule.BController_facade;
12   -import com.bsth.entity.schedule.SchedulePlan;
13   -import com.bsth.service.schedule.SchedulePlanService;
14   -import org.springframework.beans.factory.annotation.Autowired;
15   -import org.springframework.context.annotation.Conditional;
16   -import org.springframework.web.bind.annotation.PathVariable;
17   -import org.springframework.web.bind.annotation.RequestMapping;
18   -import org.springframework.web.bind.annotation.RequestMethod;
19   -import org.springframework.web.bind.annotation.RestController;
20   -
21   -import java.util.Date;
22   -import java.util.HashMap;
23   -import java.util.Map;
24   -
25   -@RestController
26   -@Conditional(DubboConfigCondition.class)
27   -@RequestMapping("spc")
28   -public class SchedulePlanController_facade extends BController_facade<Long, PlanDto> {
29   - @Reference
30   - private PlanServiceFacade planServiceFacade;
31   - @Reference
32   - private PlanPreValidateFacade planPreValidateFacade;
33   -
34   - @Override
35   - protected BServiceFacade<Long, PlanDto> getBServiceFacade() {
36   - return planServiceFacade;
37   - }
38   -
39   - /**
40   - * 创建指定线路,指定时间范围内的排班计划,使用的时刻表情况
41   - * @param xlid 线路id
42   - * @param from 开始时间
43   - * @param to 结束时间
44   - * @return
45   - * @throws Exception
46   - */
47   - @RequestMapping(value = "/valttinfo/{xlid}/{from}/{to}", method = RequestMethod.GET)
48   - public Map<String, Object> validateTTInfo(
49   - @PathVariable(value = "xlid") Integer xlid,
50   - @PathVariable(value = "from") Date from,
51   - @PathVariable(value = "to") Date to
52   - ) throws Exception {
53   - Map<String, Object> rtn = new HashMap<>();
54   - rtn.put("status", ResponseCode.SUCCESS);
55   - rtn.put("data", planPreValidateFacade.validateTTInfo(xlid, from, to));
56   - return rtn;
57   - }
58   -
59   - /**
60   - * 验证排班计划时间范围内规则的正确性。
61   - * @return
62   - * @throws Exception
63   - */
64   - @RequestMapping(value = "/valttrule/{xlid}/{from}/{to}", method = RequestMethod.GET)
65   - public Map<String, Object> validateRule(
66   - @PathVariable(value = "xlid") Integer xlid,
67   - @PathVariable(value = "from") Date from,
68   - @PathVariable(value = "to") Date to
69   - ) throws Exception {
70   - Map<String, Object> rtn = new HashMap<>();
71   - rtn.put("status", ResponseCode.SUCCESS);
72   - rtn.put("data", planPreValidateFacade.validateRule(xlid, from, to));
73   - return rtn;
74   - }
75   -
76   - @Override
77   - public void setCreateUserInfo(PlanDto planDto, Integer userId, Date createDate) {
78   - UserDto userDto = UserDto.getBuilder()
79   - .setId(userId)
80   - .build();
81   - planDto.setCreateBy(userDto);
82   - planDto.setCreateDate(createDate);
83   - }
84   -
85   - @Override
86   - public void setUpdateUserInfo(PlanDto planDto, Integer userId, Date updateDate) {
87   - UserDto userDto = UserDto.getBuilder()
88   - .setId(userId)
89   - .build();
90   - planDto.setUpdateBy(userDto);
91   - planDto.setUpdateDate(updateDate);
92   - }
93   -
94   - //------------------------- 以下是还未服务话的功能 --------------------------//
95   - @Autowired
96   - private SchedulePlanService schedulePlanService;
97   -
98   - /**
99   - * 获取明天的一歌排班计划。
100   - * @return
101   - * @throws Exception
102   - */
103   - @RequestMapping(value = "/tommorw", method = RequestMethod.GET)
104   - public SchedulePlan getTommorwPlan() throws Exception {
105   - try {
106   - return schedulePlanService.findSchedulePlanTommorw();
107   - } catch (Exception exp) {
108   - throw new Exception(exp.getCause());
109   - }
110   - }
111   -}
  1 +package com.bsth.controller.schedule.core;
  2 +
  3 +import com.alibaba.dubbo.config.annotation.Reference;
  4 +import com.bsth.common.ResponseCode;
  5 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
  6 +import com.bsth.control_v2.plan_module.common.dto.schedule.PlanDto;
  7 +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
  8 +import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
  9 +import com.bsth.control_v2.plan_module.common.service.schedule.PlanServiceFacade;
  10 +import com.bsth.control_v2.plan_module.common.service.schedule.validate.PlanPreValidateFacade;
  11 +import com.bsth.controller.schedule.BController_facade;
  12 +import com.bsth.entity.schedule.SchedulePlan;
  13 +import com.bsth.service.schedule.SchedulePlanService;
  14 +import org.springframework.beans.factory.annotation.Autowired;
  15 +import org.springframework.context.annotation.Conditional;
  16 +import org.springframework.web.bind.annotation.PathVariable;
  17 +import org.springframework.web.bind.annotation.RequestMapping;
  18 +import org.springframework.web.bind.annotation.RequestMethod;
  19 +import org.springframework.web.bind.annotation.RestController;
  20 +
  21 +import java.util.Date;
  22 +import java.util.HashMap;
  23 +import java.util.Map;
  24 +
  25 +@RestController
  26 +@Conditional(DubboConfigCondition.class)
  27 +@RequestMapping("spc")
  28 +public class SchedulePlanController_facade extends BController_facade<Long, PlanDto> {
  29 + @Reference
  30 + private PlanServiceFacade planServiceFacade;
  31 + @Reference
  32 + private PlanPreValidateFacade planPreValidateFacade;
  33 +
  34 + @Override
  35 + protected BServiceFacade<Long, PlanDto> getBServiceFacade() {
  36 + return planServiceFacade;
  37 + }
  38 +
  39 + /**
  40 + * 创建指定线路,指定时间范围内的排班计划,使用的时刻表情况
  41 + * @param xlid 线路id
  42 + * @param from 开始时间
  43 + * @param to 结束时间
  44 + * @return
  45 + * @throws Exception
  46 + */
  47 + @RequestMapping(value = "/valttinfo/{xlid}/{from}/{to}", method = RequestMethod.GET)
  48 + public Map<String, Object> validateTTInfo(
  49 + @PathVariable(value = "xlid") Integer xlid,
  50 + @PathVariable(value = "from") Date from,
  51 + @PathVariable(value = "to") Date to
  52 + ) throws Exception {
  53 + Map<String, Object> rtn = new HashMap<>();
  54 + rtn.put("status", ResponseCode.SUCCESS);
  55 + rtn.put("data", planPreValidateFacade.validateTTInfo(xlid, from, to));
  56 + return rtn;
  57 + }
  58 +
  59 + /**
  60 + * 验证排班计划时间范围内规则的正确性。
  61 + * @return
  62 + * @throws Exception
  63 + */
  64 + @RequestMapping(value = "/valttrule/{xlid}/{from}/{to}", method = RequestMethod.GET)
  65 + public Map<String, Object> validateRule(
  66 + @PathVariable(value = "xlid") Integer xlid,
  67 + @PathVariable(value = "from") Date from,
  68 + @PathVariable(value = "to") Date to
  69 + ) throws Exception {
  70 + Map<String, Object> rtn = new HashMap<>();
  71 + rtn.put("status", ResponseCode.SUCCESS);
  72 + rtn.put("data", planPreValidateFacade.validateRule(xlid, from, to));
  73 + return rtn;
  74 + }
  75 +
  76 + @Override
  77 + public void setCreateUserInfo(PlanDto planDto, Integer userId, Date createDate) {
  78 + UserDto userDto = UserDto.getBuilder()
  79 + .setId(userId)
  80 + .build();
  81 + planDto.setCreateBy(userDto);
  82 + planDto.setCreateDate(createDate);
  83 + }
  84 +
  85 + @Override
  86 + public void setUpdateUserInfo(PlanDto planDto, Integer userId, Date updateDate) {
  87 + UserDto userDto = UserDto.getBuilder()
  88 + .setId(userId)
  89 + .build();
  90 + planDto.setUpdateBy(userDto);
  91 + planDto.setUpdateDate(updateDate);
  92 + }
  93 +
  94 + //------------------------- 以下是还未服务话的功能 --------------------------//
  95 + @Autowired
  96 + private SchedulePlanService schedulePlanService;
  97 +
  98 + /**
  99 + * 获取明天的一歌排班计划。
  100 + * @return
  101 + * @throws Exception
  102 + */
  103 + @RequestMapping(value = "/tommorw", method = RequestMethod.GET)
  104 + public SchedulePlan getTommorwPlan() throws Exception {
  105 + try {
  106 + return schedulePlanService.findSchedulePlanTommorw();
  107 + } catch (Exception exp) {
  108 + throw new Exception(exp.getCause());
  109 + }
  110 + }
  111 +}
... ...
src/main/java/com/bsth/controller/schedule/core/SchedulePlanInfoController_facade.java
1   -package com.bsth.controller.schedule.core;
2   -
3   -import com.alibaba.dubbo.config.annotation.Reference;
4   -import com.bsth.common.ResponseCode;
5   -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
6   -import com.bsth.control_v2.plan_module.common.dto.schedule.PlanInfoDto;
7   -import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
8   -import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
9   -import com.bsth.control_v2.plan_module.common.service.schedule.PlanInfoServiceFacade;
10   -import com.bsth.control_v2.plan_module.common.utils.SystemInfoUtils;
11   -import com.bsth.controller.schedule.BController_facade;
12   -import org.springframework.context.annotation.Conditional;
13   -import org.springframework.web.bind.annotation.PathVariable;
14   -import org.springframework.web.bind.annotation.RequestMapping;
15   -import org.springframework.web.bind.annotation.RequestMethod;
16   -import org.springframework.web.bind.annotation.RestController;
17   -
18   -import java.util.Date;
19   -import java.util.HashMap;
20   -import java.util.Map;
21   -
22   -@RestController
23   -@Conditional(DubboConfigCondition.class)
24   -@RequestMapping("spic")
25   -public class SchedulePlanInfoController_facade extends BController_facade<Long, PlanInfoDto> {
26   - @Reference
27   - private PlanInfoServiceFacade planInfoServiceFacade;
28   -
29   - @Override
30   - protected BServiceFacade<Long, PlanInfoDto> getBServiceFacade() {
31   - return planInfoServiceFacade;
32   - }
33   -
34   - @Override
35   - public void setCreateUserInfo(PlanInfoDto planInfoDto, Integer userId, Date createDate) {
36   - UserDto userDto = UserDto.getBuilder()
37   - .setId(userId)
38   - .build();
39   - planInfoDto.setCreateBy(userDto);
40   - planInfoDto.setCreateDate(createDate);
41   - }
42   -
43   - @Override
44   - public void setUpdateUserInfo(PlanInfoDto planInfoDto, Integer userId, Date updateDate) {
45   - UserDto userDto = UserDto.getBuilder()
46   - .setId(userId)
47   - .build();
48   - planInfoDto.setUpdateBy(userDto);
49   - planInfoDto.setUpdateDate(updateDate);
50   - }
51   -
52   - @Override
53   - protected boolean isUpdateExtend() {
54   - return true;
55   - }
56   -
57   - @Override
58   - protected PlanInfoDto updateExtend(PlanInfoDto planInfoDto) {
59   - return this.planInfoServiceFacade.updateInfo(planInfoDto, SystemInfoUtils.createClientSystemInfo());
60   - }
61   -
62   - @RequestMapping(value = "/groupextinfos/{xlid}/{date}", method = RequestMethod.GET)
63   - public Map<String, Object> findGroupInfoExt(
64   - @PathVariable(value = "xlid") Integer xlid,
65   - @PathVariable(value = "date") Date scheduleDate) {
66   - Map<String, Object> resultMap = new HashMap<>();
67   - try {
68   - resultMap.put("status", ResponseCode.SUCCESS);
69   - resultMap.put("data", this.planInfoServiceFacade.findPlanGroupInfo(xlid, scheduleDate));
70   -
71   - } catch (Exception exp) {
72   - exp.printStackTrace();
73   - resultMap.put("status", ResponseCode.ERROR);
74   - resultMap.put("msg", exp.getLocalizedMessage());
75   - }
76   -
77   - return resultMap;
78   - }
79   -
80   - @RequestMapping(value = "/lastestsd/{xlid}", method = RequestMethod.GET)
81   - public Map<String, Object> findLastestPlanDate(
82   - @PathVariable(value = "xlid") Integer xlid) {
83   - Map<String, Object> resultMap = new HashMap<>();
84   - try {
85   - resultMap.put("status", ResponseCode.SUCCESS);
86   - resultMap.put("data", this.planInfoServiceFacade.findLastestPlanInfoDate(xlid));
87   -
88   - } catch (Exception exp) {
89   - exp.printStackTrace();
90   - resultMap.put("status", ResponseCode.ERROR);
91   - resultMap.put("msg", exp.getLocalizedMessage());
92   - }
93   -
94   - return resultMap;
95   - }
96   -
97   -
98   -}
  1 +package com.bsth.controller.schedule.core;
  2 +
  3 +import com.alibaba.dubbo.config.annotation.Reference;
  4 +import com.bsth.common.ResponseCode;
  5 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
  6 +import com.bsth.control_v2.plan_module.common.dto.schedule.PlanInfoDto;
  7 +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
  8 +import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
  9 +import com.bsth.control_v2.plan_module.common.service.schedule.PlanInfoServiceFacade;
  10 +import com.bsth.control_v2.plan_module.common.utils.SystemInfoUtils;
  11 +import com.bsth.controller.schedule.BController_facade;
  12 +import org.springframework.context.annotation.Conditional;
  13 +import org.springframework.web.bind.annotation.PathVariable;
  14 +import org.springframework.web.bind.annotation.RequestMapping;
  15 +import org.springframework.web.bind.annotation.RequestMethod;
  16 +import org.springframework.web.bind.annotation.RestController;
  17 +
  18 +import java.util.Date;
  19 +import java.util.HashMap;
  20 +import java.util.Map;
  21 +
  22 +@RestController
  23 +@Conditional(DubboConfigCondition.class)
  24 +@RequestMapping("spic")
  25 +public class SchedulePlanInfoController_facade extends BController_facade<Long, PlanInfoDto> {
  26 + @Reference
  27 + private PlanInfoServiceFacade planInfoServiceFacade;
  28 +
  29 + @Override
  30 + protected BServiceFacade<Long, PlanInfoDto> getBServiceFacade() {
  31 + return planInfoServiceFacade;
  32 + }
  33 +
  34 + @Override
  35 + public void setCreateUserInfo(PlanInfoDto planInfoDto, Integer userId, Date createDate) {
  36 + UserDto userDto = UserDto.getBuilder()
  37 + .setId(userId)
  38 + .build();
  39 + planInfoDto.setCreateBy(userDto);
  40 + planInfoDto.setCreateDate(createDate);
  41 + }
  42 +
  43 + @Override
  44 + public void setUpdateUserInfo(PlanInfoDto planInfoDto, Integer userId, Date updateDate) {
  45 + UserDto userDto = UserDto.getBuilder()
  46 + .setId(userId)
  47 + .build();
  48 + planInfoDto.setUpdateBy(userDto);
  49 + planInfoDto.setUpdateDate(updateDate);
  50 + }
  51 +
  52 + @Override
  53 + protected boolean isUpdateExtend() {
  54 + return true;
  55 + }
  56 +
  57 + @Override
  58 + protected PlanInfoDto updateExtend(PlanInfoDto planInfoDto) {
  59 + return this.planInfoServiceFacade.updateInfo(planInfoDto, SystemInfoUtils.createClientSystemInfo());
  60 + }
  61 +
  62 + @RequestMapping(value = "/groupextinfos/{xlid}/{date}", method = RequestMethod.GET)
  63 + public Map<String, Object> findGroupInfoExt(
  64 + @PathVariable(value = "xlid") Integer xlid,
  65 + @PathVariable(value = "date") Date scheduleDate) {
  66 + Map<String, Object> resultMap = new HashMap<>();
  67 + try {
  68 + resultMap.put("status", ResponseCode.SUCCESS);
  69 + resultMap.put("data", this.planInfoServiceFacade.findPlanGroupInfo(xlid, scheduleDate));
  70 +
  71 + } catch (Exception exp) {
  72 + exp.printStackTrace();
  73 + resultMap.put("status", ResponseCode.ERROR);
  74 + resultMap.put("msg", exp.getLocalizedMessage());
  75 + }
  76 +
  77 + return resultMap;
  78 + }
  79 +
  80 + @RequestMapping(value = "/lastestsd/{xlid}", method = RequestMethod.GET)
  81 + public Map<String, Object> findLastestPlanDate(
  82 + @PathVariable(value = "xlid") Integer xlid) {
  83 + Map<String, Object> resultMap = new HashMap<>();
  84 + try {
  85 + resultMap.put("status", ResponseCode.SUCCESS);
  86 + resultMap.put("data", this.planInfoServiceFacade.findLastestPlanInfoDate(xlid));
  87 +
  88 + } catch (Exception exp) {
  89 + exp.printStackTrace();
  90 + resultMap.put("status", ResponseCode.ERROR);
  91 + resultMap.put("msg", exp.getLocalizedMessage());
  92 + }
  93 +
  94 + return resultMap;
  95 + }
  96 +
  97 +
  98 +}
... ...
src/main/java/com/bsth/controller/schedule/core/TTInfoBxDetailController_facade.java
1   -package com.bsth.controller.schedule.core;
2   -
3   -import com.alibaba.dubbo.config.annotation.Reference;
4   -import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
5   -import com.bsth.control_v2.plan_module.common.dto.schedule.timetable.TTInfoBxDetailDto;
6   -import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
7   -import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
8   -import com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoBxDetailServiceFacade;
9   -import com.bsth.controller.schedule.BController_facade;
10   -import org.springframework.context.annotation.Conditional;
11   -import org.springframework.web.bind.annotation.RequestMapping;
12   -import org.springframework.web.bind.annotation.RestController;
13   -
14   -import java.util.Date;
15   -
16   -@RestController
17   -@Conditional(DubboConfigCondition.class)
18   -@RequestMapping("tibxdc")
19   -public class TTInfoBxDetailController_facade extends BController_facade<Long, TTInfoBxDetailDto> {
20   - @Reference
21   - private TTInfoBxDetailServiceFacade ttInfoBxDetailServiceFacade;
22   -
23   - @Override
24   - protected BServiceFacade<Long, TTInfoBxDetailDto> getBServiceFacade() {
25   - return ttInfoBxDetailServiceFacade;
26   - }
27   -
28   - @Override
29   - public void setCreateUserInfo(TTInfoBxDetailDto ttInfoBxDetailDto, Integer userId, Date createDate) {
30   - UserDto userDto = UserDto.getBuilder()
31   - .setId(userId)
32   - .build();
33   - ttInfoBxDetailDto.setCreateBy(userDto);
34   - ttInfoBxDetailDto.setCreateDate(createDate);
35   - }
36   -
37   - @Override
38   - public void setUpdateUserInfo(TTInfoBxDetailDto ttInfoBxDetailDto, Integer userId, Date updateDate) {
39   - UserDto userDto = UserDto.getBuilder()
40   - .setId(userId)
41   - .build();
42   - ttInfoBxDetailDto.setUpdateBy(userDto);
43   - ttInfoBxDetailDto.setUpdateDate(updateDate);
44   - }
45   -}
  1 +package com.bsth.controller.schedule.core;
  2 +
  3 +import com.alibaba.dubbo.config.annotation.Reference;
  4 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
  5 +import com.bsth.control_v2.plan_module.common.dto.schedule.timetable.TTInfoBxDetailDto;
  6 +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
  7 +import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
  8 +import com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoBxDetailServiceFacade;
  9 +import com.bsth.controller.schedule.BController_facade;
  10 +import org.springframework.context.annotation.Conditional;
  11 +import org.springframework.web.bind.annotation.RequestMapping;
  12 +import org.springframework.web.bind.annotation.RestController;
  13 +
  14 +import java.util.Date;
  15 +
  16 +@RestController
  17 +@Conditional(DubboConfigCondition.class)
  18 +@RequestMapping("tibxdc")
  19 +public class TTInfoBxDetailController_facade extends BController_facade<Long, TTInfoBxDetailDto> {
  20 + @Reference
  21 + private TTInfoBxDetailServiceFacade ttInfoBxDetailServiceFacade;
  22 +
  23 + @Override
  24 + protected BServiceFacade<Long, TTInfoBxDetailDto> getBServiceFacade() {
  25 + return ttInfoBxDetailServiceFacade;
  26 + }
  27 +
  28 + @Override
  29 + public void setCreateUserInfo(TTInfoBxDetailDto ttInfoBxDetailDto, Integer userId, Date createDate) {
  30 + UserDto userDto = UserDto.getBuilder()
  31 + .setId(userId)
  32 + .build();
  33 + ttInfoBxDetailDto.setCreateBy(userDto);
  34 + ttInfoBxDetailDto.setCreateDate(createDate);
  35 + }
  36 +
  37 + @Override
  38 + public void setUpdateUserInfo(TTInfoBxDetailDto ttInfoBxDetailDto, Integer userId, Date updateDate) {
  39 + UserDto userDto = UserDto.getBuilder()
  40 + .setId(userId)
  41 + .build();
  42 + ttInfoBxDetailDto.setUpdateBy(userDto);
  43 + ttInfoBxDetailDto.setUpdateDate(updateDate);
  44 + }
  45 +}
... ...
src/main/java/com/bsth/controller/schedule/core/legacy/TTInfoBxDetailController.java
1   -package com.bsth.controller.schedule.core.legacy;
2   -
3   -import com.bsth.controller.schedule.BController;
4   -import com.bsth.controller.schedule.core.TTInfoBxDetailController_facade;
5   -import com.bsth.entity.schedule.TTInfoBxDetail;
6   -import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
7   -import org.springframework.web.bind.annotation.RequestMapping;
8   -import org.springframework.web.bind.annotation.RestController;
9   -
10   -@RestController
11   -@ConditionalOnMissingBean(TTInfoBxDetailController_facade.class)
12   -@RequestMapping("tibxdc")
13   -public class TTInfoBxDetailController extends BController<TTInfoBxDetail, Long> {
14   -}
  1 +package com.bsth.controller.schedule.core.legacy;
  2 +
  3 +import com.bsth.controller.schedule.BController;
  4 +import com.bsth.controller.schedule.core.TTInfoBxDetailController_facade;
  5 +import com.bsth.entity.schedule.TTInfoBxDetail;
  6 +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.bind.annotation.RestController;
  9 +
  10 +@RestController
  11 +@ConditionalOnMissingBean(TTInfoBxDetailController_facade.class)
  12 +@RequestMapping("tibxdc")
  13 +public class TTInfoBxDetailController extends BController<TTInfoBxDetail, Long> {
  14 +}
... ...
src/main/java/com/bsth/data/report_register/ReportRegisterService.java
1   -package com.bsth.data.report_register;
2   -
3   -import com.bsth.data.report_register.entity.ReportRegister;
4   -import com.bsth.service.BaseService;
5   -
6   -import java.util.Map;
7   -
8   -public interface ReportRegisterService extends BaseService<ReportRegister, Long>{
9   -
10   - Map<String, Object> findList(Map<String, String> map);
11   -
12   - Map<String, Object> deleteInfo( ReportRegister t);
13   -}
  1 +package com.bsth.data.report_register;
  2 +
  3 +import com.bsth.data.report_register.entity.ReportRegister;
  4 +import com.bsth.service.BaseService;
  5 +
  6 +import java.util.Map;
  7 +
  8 +public interface ReportRegisterService extends BaseService<ReportRegister, Long>{
  9 +
  10 + Map<String, Object> findList(Map<String, String> map);
  11 +
  12 + Map<String, Object> deleteInfo( ReportRegister t);
  13 +}
... ...
src/main/java/com/bsth/data/report_register/ReportRegisterServiceImpl.java
1   -package com.bsth.data.report_register;
2   -
3   -import com.bsth.common.ResponseCode;
4   -import com.bsth.data.report_register.entity.ReportRegister;
5   -import com.bsth.service.impl.BaseServiceImpl;
6   -import com.bsth.util.ReportUtils;
7   -import org.slf4j.Logger;
8   -import org.slf4j.LoggerFactory;
9   -import org.springframework.beans.factory.annotation.Autowired;
10   -import org.springframework.dao.DataIntegrityViolationException;
11   -import org.springframework.jdbc.core.BeanPropertyRowMapper;
12   -import org.springframework.jdbc.core.JdbcTemplate;
13   -import org.springframework.stereotype.Service;
14   -
15   -import java.text.SimpleDateFormat;
16   -import java.util.ArrayList;
17   -import java.util.Date;
18   -import java.util.HashMap;
19   -import java.util.Iterator;
20   -import java.util.List;
21   -import java.util.Map;
22   -
23   -@Service
24   -public class ReportRegisterServiceImpl extends BaseServiceImpl<ReportRegister, Long> implements ReportRegisterService{
25   -
26   - Logger log = LoggerFactory.getLogger(this.getClass());
27   -
28   - @Autowired
29   - JdbcTemplate jdbcTemplate;
30   -
31   - @Override
32   - public Map<String, Object> findList(Map<String, String> map) {
33   - Map<String, Object> rs = new HashMap();
34   - try {
35   -
36   - String lineCodes = map.get("lineCodes") == null ? "" : map.get("lineCodes").toString();
37   - String lineName = map.get("lineName") == null ? "" : map.get("lineName").toString();
38   - String type = map.get("type") == null ? "" : map.get("type").toString();
39   - String date1 = "",date2 = "";
40   - String isFindDelete = "";
41   - if(type!=null && (type.equals("query") || type.equals("export"))){
42   - // 导出是不要删除的
43   - if(type.equals("export"))
44   - isFindDelete = " and STATUS !=2 ";
45   - date1 = map.get("date1") == null ? "" : map.get("date1").toString()+" 00:00:00";
46   - date2 = map.get("date2") == null ? "" : map.get("date2").toString()+" 23:59:59";
47   - } else {
48   - Date startDate = new Date();
49   - startDate.setHours(0);
50   - startDate.setMinutes(0);
51   - startDate.setSeconds(0);
52   - Date endDate = new Date();
53   - endDate.setHours(23);
54   - endDate.setMinutes(59);
55   - endDate.setSeconds(59);
56   - SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
57   - date1 = sdf.format(startDate);
58   - date2 = sdf.format(endDate);
59   - }
60   - String sql = "select * from bsth_t_report where REPORT_DATE >=\""+date1+"\" and REPORT_DATE <= \""+date2+"\" and REPORT_XL in("+lineCodes+") " + isFindDelete;
61   - List<ReportRegister> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(ReportRegister.class));
62   -
63   - if(type!=null && type.equals("export")){
64   - SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
65   - sdfSimple = new SimpleDateFormat("yyyyMMdd");
66   - String dateTime = "";
67   - try {
68   - String dateStr1 = sdfSimple.format(sdfMonth.parse(date1));
69   - String dateStr2 = sdfSimple.format(sdfMonth.parse(date2));
70   - if (dateStr1.equals(dateStr2)) {
71   - dateTime = dateStr1;
72   - } else {
73   - dateTime = dateStr1 + "-" + dateStr2;
74   - }
75   - } catch (Exception e) {
76   - // TODO: handle exception
77   - e.printStackTrace();
78   - }
79   - List<List<Iterator<?>>> lists = new ArrayList<>();
80   - List<Iterator<?>> list1 = new ArrayList<>();
81   - List<Iterator<?>> list2 = new ArrayList<>();
82   - List<Iterator<?>> list3 = new ArrayList<>();
83   - List<Iterator<?>> list4 = new ArrayList<>();
84   - List<Iterator<?>> list5 = new ArrayList<>();
85   - List<Iterator<?>> list6 = new ArrayList<>();
86   - List<Map<String, Object>> resList1 = new ArrayList<Map<String, Object>>();
87   - List<Map<String, Object>> resList2 = new ArrayList<Map<String, Object>>();
88   - List<Map<String, Object>> resList3 = new ArrayList<Map<String, Object>>();
89   - List<Map<String, Object>> resList4 = new ArrayList<Map<String, Object>>();
90   - List<Map<String, Object>> resList5 = new ArrayList<Map<String, Object>>();
91   - List<Map<String, Object>> resList6 = new ArrayList<Map<String, Object>>();
92   - int i1 =0,i2 =0,i3 =0,i4 =0,i5 =0,i6 =0;
93   - ReportUtils ee = new ReportUtils();
94   - for (ReportRegister l : list) {
95   - Map<String, Object> m = new HashMap<String, Object>();
96   - String report_type = l.getREPORT_TYPE();
97   - m.put("REPORT_DATE", l.getREPORT_DATE());
98   - m.put("REPORT_TYPE", report_type);
99   - m.put("REPORT_GSNAME", l.getREPORT_GSNAME());
100   - m.put("REPORT_FGSNAME", l.getREPORT_FGSNAME());
101   - m.put("REPORT_BBR", l.getREPORT_BBR());
102   - m.put("REPORT_XL", l.getREPORT_XL());
103   - m.put("REPORT_XLNAME", l.getREPORT_XLNAME());
104   - m.put("REPORT_STATION", l.getREPORT_STATION());
105   - m.put("REPORT_DWSBBM", l.getREPORT_DWSBBM());
106   - m.put("REPORT_DWSBSJ", l.getREPORT_DWSBSJ());
107   - m.put("REPORT_YWSJ", l.getREPORT_YWSJ());
108   - m.put("REPORT_SMBWD", l.getREPORT_SMBWD());
109   - m.put("REPORT_DJGSJ", l.getREPORT_DJGSJ());
110   - m.put("REPORT_DJGYY", l.getREPORT_DJGYY());
111   - m.put("REPORT_TFSJ", l.getREPORT_TFSJ());
112   - m.put("REPORT_YXSJ", l.getREPORT_YXSJ());
113   - m.put("REPORT_YXBC", l.getREPORT_YXBC());
114   - m.put("REPORT_TZCS", l.getREPORT_TZCS());
115   - m.put("REPORT_SGBH", l.getREPORT_SGBH());
116   - m.put("REPORT_ZBH", l.getREPORT_ZBH());
117   - m.put("REPORT_PZH", l.getREPORT_PZH());
118   - m.put("REPORT_JSY", l.getREPORT_JSY());
119   - m.put("REPORT_SGSJ", l.getREPORT_SGSJ());
120   - m.put("REPORT_SGDD", l.getREPORT_SGDD());
121   - m.put("REPORT_XSFX", l.getREPORT_XSFX());
122   - m.put("REPORT_SGDX", l.getREPORT_SGDX());
123   - m.put("REPORT_DXPZH", l.getREPORT_DXPZH());
124   - m.put("REPORT_SGGK", l.getREPORT_SGGK());
125   - m.put("REPORT_SSRS", l.getREPORT_SSRS());
126   - m.put("REPORT_SWRS", l.getREPORT_SWRS());
127   - m.put("REPORT_BGR", l.getREPORT_BGR());
128   - m.put("REPORT_BGRDH", l.getREPORT_BGRDH());
129   - m.put("REPORT_BZ", l.getREPORT_BZ());
130   - m.put("REPORT_ROAD", l.getREPORT_ROAD());
131   - if(report_type.equals("1")){
132   - i1++;
133   - m.put("i", i1);
134   - resList1.add(m);
135   - }else if(report_type.equals("2")){
136   - i2++;
137   - m.put("i", i2);
138   - resList2.add(m);
139   - }else if(report_type.equals("3")){
140   - i3++;
141   - m.put("i", i3);
142   - resList3.add(m);
143   - }else if(report_type.equals("4")){
144   - i4++;
145   - m.put("i", i4);
146   - resList4.add(m);
147   - } else if(report_type.equals("5")){
148   - i5++;
149   - m.put("i", i5);
150   - resList5.add(m);
151   - }else if(report_type.equals("6")){
152   - i6++;
153   - m.put("i", i6);
154   - resList6.add(m);
155   - }
156   - }
157   - try {
158   - list1.add(resList1.iterator());
159   - lists.add(list1);
160   - list2.add(resList2.iterator());
161   - lists.add(list2);
162   - list3.add(resList3.iterator());
163   - lists.add(list3);
164   - list4.add(resList4.iterator());
165   - lists.add(list4);
166   - list5.add(resList5.iterator());
167   - lists.add(list5);
168   - list6.add(resList6.iterator());
169   - lists.add(list6);
170   - String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
171   - ee.excelMoreSheetReplace(lists, new Object[]{map}, path + "mould/report_register.xls",
172   - path + "export/" + dateTime +"_"+lineName+ "_报备登记.xls");
173   - } catch (Exception e) {
174   - // TODO: handle exception
175   - e.printStackTrace();
176   - }
177   - }
178   - rs.put("status", ResponseCode.SUCCESS);
179   - rs.put("list", list);
180   - }
181   -// catch (ParseException e) {
182   -// e.printStackTrace();
183   -// }
184   - catch (Exception e){
185   - log.error("", e);
186   - rs.put("status", ResponseCode.ERROR);
187   - rs.put("msg", e.getMessage());
188   - }
189   - return rs;
190   - }
191   -
192   - @Override
193   - public Map<String, Object> deleteInfo(ReportRegister rr) {
194   - Map<String, Object> map = new HashMap<>();
195   - try{
196   - Long id = rr.getID();
197   - String bbr = rr.getREPORT_BBR();
198   -
199   - jdbcTemplate.update("UPDATE bsth_t_report SET STATUS = 2,REPORT_BBR = ? WHERE ID = ? ",bbr,id);
200   - map.put("status", ResponseCode.SUCCESS);
201   - }catch(DataIntegrityViolationException de){
202   - map.put("status", ResponseCode.ERROR);
203   - map.put("msg", "“完整性约束”校验失败,请检查要删除的对象是否存在外键约束");
204   - }
205   - return map;
206   - }
207   -}
  1 +package com.bsth.data.report_register;
  2 +
  3 +import com.bsth.common.ResponseCode;
  4 +import com.bsth.data.report_register.entity.ReportRegister;
  5 +import com.bsth.service.impl.BaseServiceImpl;
  6 +import com.bsth.util.ReportUtils;
  7 +import org.slf4j.Logger;
  8 +import org.slf4j.LoggerFactory;
  9 +import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.dao.DataIntegrityViolationException;
  11 +import org.springframework.jdbc.core.BeanPropertyRowMapper;
  12 +import org.springframework.jdbc.core.JdbcTemplate;
  13 +import org.springframework.stereotype.Service;
  14 +
  15 +import java.text.SimpleDateFormat;
  16 +import java.util.ArrayList;
  17 +import java.util.Date;
  18 +import java.util.HashMap;
  19 +import java.util.Iterator;
  20 +import java.util.List;
  21 +import java.util.Map;
  22 +
  23 +@Service
  24 +public class ReportRegisterServiceImpl extends BaseServiceImpl<ReportRegister, Long> implements ReportRegisterService{
  25 +
  26 + Logger log = LoggerFactory.getLogger(this.getClass());
  27 +
  28 + @Autowired
  29 + JdbcTemplate jdbcTemplate;
  30 +
  31 + @Override
  32 + public Map<String, Object> findList(Map<String, String> map) {
  33 + Map<String, Object> rs = new HashMap();
  34 + try {
  35 +
  36 + String lineCodes = map.get("lineCodes") == null ? "" : map.get("lineCodes").toString();
  37 + String lineName = map.get("lineName") == null ? "" : map.get("lineName").toString();
  38 + String type = map.get("type") == null ? "" : map.get("type").toString();
  39 + String date1 = "",date2 = "";
  40 + String isFindDelete = "";
  41 + if(type!=null && (type.equals("query") || type.equals("export"))){
  42 + // 导出是不要删除的
  43 + if(type.equals("export"))
  44 + isFindDelete = " and STATUS !=2 ";
  45 + date1 = map.get("date1") == null ? "" : map.get("date1").toString()+" 00:00:00";
  46 + date2 = map.get("date2") == null ? "" : map.get("date2").toString()+" 23:59:59";
  47 + } else {
  48 + Date startDate = new Date();
  49 + startDate.setHours(0);
  50 + startDate.setMinutes(0);
  51 + startDate.setSeconds(0);
  52 + Date endDate = new Date();
  53 + endDate.setHours(23);
  54 + endDate.setMinutes(59);
  55 + endDate.setSeconds(59);
  56 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  57 + date1 = sdf.format(startDate);
  58 + date2 = sdf.format(endDate);
  59 + }
  60 + String sql = "select * from bsth_t_report where REPORT_DATE >=\""+date1+"\" and REPORT_DATE <= \""+date2+"\" and REPORT_XL in("+lineCodes+") " + isFindDelete;
  61 + List<ReportRegister> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(ReportRegister.class));
  62 +
  63 + if(type!=null && type.equals("export")){
  64 + SimpleDateFormat sdfMonth = new SimpleDateFormat("yyyy-MM-dd"),
  65 + sdfSimple = new SimpleDateFormat("yyyyMMdd");
  66 + String dateTime = "";
  67 + try {
  68 + String dateStr1 = sdfSimple.format(sdfMonth.parse(date1));
  69 + String dateStr2 = sdfSimple.format(sdfMonth.parse(date2));
  70 + if (dateStr1.equals(dateStr2)) {
  71 + dateTime = dateStr1;
  72 + } else {
  73 + dateTime = dateStr1 + "-" + dateStr2;
  74 + }
  75 + } catch (Exception e) {
  76 + // TODO: handle exception
  77 + e.printStackTrace();
  78 + }
  79 + List<List<Iterator<?>>> lists = new ArrayList<>();
  80 + List<Iterator<?>> list1 = new ArrayList<>();
  81 + List<Iterator<?>> list2 = new ArrayList<>();
  82 + List<Iterator<?>> list3 = new ArrayList<>();
  83 + List<Iterator<?>> list4 = new ArrayList<>();
  84 + List<Iterator<?>> list5 = new ArrayList<>();
  85 + List<Iterator<?>> list6 = new ArrayList<>();
  86 + List<Map<String, Object>> resList1 = new ArrayList<Map<String, Object>>();
  87 + List<Map<String, Object>> resList2 = new ArrayList<Map<String, Object>>();
  88 + List<Map<String, Object>> resList3 = new ArrayList<Map<String, Object>>();
  89 + List<Map<String, Object>> resList4 = new ArrayList<Map<String, Object>>();
  90 + List<Map<String, Object>> resList5 = new ArrayList<Map<String, Object>>();
  91 + List<Map<String, Object>> resList6 = new ArrayList<Map<String, Object>>();
  92 + int i1 =0,i2 =0,i3 =0,i4 =0,i5 =0,i6 =0;
  93 + ReportUtils ee = new ReportUtils();
  94 + for (ReportRegister l : list) {
  95 + Map<String, Object> m = new HashMap<String, Object>();
  96 + String report_type = l.getREPORT_TYPE();
  97 + m.put("REPORT_DATE", l.getREPORT_DATE());
  98 + m.put("REPORT_TYPE", report_type);
  99 + m.put("REPORT_GSNAME", l.getREPORT_GSNAME());
  100 + m.put("REPORT_FGSNAME", l.getREPORT_FGSNAME());
  101 + m.put("REPORT_BBR", l.getREPORT_BBR());
  102 + m.put("REPORT_XL", l.getREPORT_XL());
  103 + m.put("REPORT_XLNAME", l.getREPORT_XLNAME());
  104 + m.put("REPORT_STATION", l.getREPORT_STATION());
  105 + m.put("REPORT_DWSBBM", l.getREPORT_DWSBBM());
  106 + m.put("REPORT_DWSBSJ", l.getREPORT_DWSBSJ());
  107 + m.put("REPORT_YWSJ", l.getREPORT_YWSJ());
  108 + m.put("REPORT_SMBWD", l.getREPORT_SMBWD());
  109 + m.put("REPORT_DJGSJ", l.getREPORT_DJGSJ());
  110 + m.put("REPORT_DJGYY", l.getREPORT_DJGYY());
  111 + m.put("REPORT_TFSJ", l.getREPORT_TFSJ());
  112 + m.put("REPORT_YXSJ", l.getREPORT_YXSJ());
  113 + m.put("REPORT_YXBC", l.getREPORT_YXBC());
  114 + m.put("REPORT_TZCS", l.getREPORT_TZCS());
  115 + m.put("REPORT_SGBH", l.getREPORT_SGBH());
  116 + m.put("REPORT_ZBH", l.getREPORT_ZBH());
  117 + m.put("REPORT_PZH", l.getREPORT_PZH());
  118 + m.put("REPORT_JSY", l.getREPORT_JSY());
  119 + m.put("REPORT_SGSJ", l.getREPORT_SGSJ());
  120 + m.put("REPORT_SGDD", l.getREPORT_SGDD());
  121 + m.put("REPORT_XSFX", l.getREPORT_XSFX());
  122 + m.put("REPORT_SGDX", l.getREPORT_SGDX());
  123 + m.put("REPORT_DXPZH", l.getREPORT_DXPZH());
  124 + m.put("REPORT_SGGK", l.getREPORT_SGGK());
  125 + m.put("REPORT_SSRS", l.getREPORT_SSRS());
  126 + m.put("REPORT_SWRS", l.getREPORT_SWRS());
  127 + m.put("REPORT_BGR", l.getREPORT_BGR());
  128 + m.put("REPORT_BGRDH", l.getREPORT_BGRDH());
  129 + m.put("REPORT_BZ", l.getREPORT_BZ());
  130 + m.put("REPORT_ROAD", l.getREPORT_ROAD());
  131 + if(report_type.equals("1")){
  132 + i1++;
  133 + m.put("i", i1);
  134 + resList1.add(m);
  135 + }else if(report_type.equals("2")){
  136 + i2++;
  137 + m.put("i", i2);
  138 + resList2.add(m);
  139 + }else if(report_type.equals("3")){
  140 + i3++;
  141 + m.put("i", i3);
  142 + resList3.add(m);
  143 + }else if(report_type.equals("4")){
  144 + i4++;
  145 + m.put("i", i4);
  146 + resList4.add(m);
  147 + } else if(report_type.equals("5")){
  148 + i5++;
  149 + m.put("i", i5);
  150 + resList5.add(m);
  151 + }else if(report_type.equals("6")){
  152 + i6++;
  153 + m.put("i", i6);
  154 + resList6.add(m);
  155 + }
  156 + }
  157 + try {
  158 + list1.add(resList1.iterator());
  159 + lists.add(list1);
  160 + list2.add(resList2.iterator());
  161 + lists.add(list2);
  162 + list3.add(resList3.iterator());
  163 + lists.add(list3);
  164 + list4.add(resList4.iterator());
  165 + lists.add(list4);
  166 + list5.add(resList5.iterator());
  167 + lists.add(list5);
  168 + list6.add(resList6.iterator());
  169 + lists.add(list6);
  170 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  171 + ee.excelMoreSheetReplace(lists, new Object[]{map}, path + "mould/report_register.xls",
  172 + path + "export/" + dateTime +"_"+lineName+ "_报备登记.xls");
  173 + } catch (Exception e) {
  174 + // TODO: handle exception
  175 + e.printStackTrace();
  176 + }
  177 + }
  178 + rs.put("status", ResponseCode.SUCCESS);
  179 + rs.put("list", list);
  180 + }
  181 +// catch (ParseException e) {
  182 +// e.printStackTrace();
  183 +// }
  184 + catch (Exception e){
  185 + log.error("", e);
  186 + rs.put("status", ResponseCode.ERROR);
  187 + rs.put("msg", e.getMessage());
  188 + }
  189 + return rs;
  190 + }
  191 +
  192 + @Override
  193 + public Map<String, Object> deleteInfo(ReportRegister rr) {
  194 + Map<String, Object> map = new HashMap<>();
  195 + try{
  196 + Long id = rr.getID();
  197 + String bbr = rr.getREPORT_BBR();
  198 +
  199 + jdbcTemplate.update("UPDATE bsth_t_report SET STATUS = 2,REPORT_BBR = ? WHERE ID = ? ",bbr,id);
  200 + map.put("status", ResponseCode.SUCCESS);
  201 + }catch(DataIntegrityViolationException de){
  202 + map.put("status", ResponseCode.ERROR);
  203 + map.put("msg", "“完整性约束”校验失败,请检查要删除的对象是否存在外键约束");
  204 + }
  205 + return map;
  206 + }
  207 +}
... ...
src/main/java/com/bsth/data/report_register/entity/ReportRegister.java
1   -package com.bsth.data.report_register.entity;
2   -
3   -import javax.persistence.Column;
4   -import javax.persistence.Entity;
5   -import javax.persistence.GeneratedValue;
6   -import javax.persistence.Id;
7   -import javax.persistence.Table;
8   -import java.text.DateFormat;
9   -import java.text.SimpleDateFormat;
10   -import java.util.Date;
11   -
12   -
13   -@Entity
14   -@Table(name = "bsth_t_report")
15   -public class ReportRegister {
16   -
17   - @Id
18   - @GeneratedValue
19   - private long ID;
20   -
21   - /** 类型*/
22   - private String REPORT_TYPE;
23   - /** 公司 */
24   - private String REPORT_GS;
25   - /** 分公司 */
26   - private String REPORT_FGS;
27   - /** 公司名 */
28   - private String REPORT_GSNAME;
29   - /** 分公司名 */
30   - private String REPORT_FGSNAME;
31   - /** 时间*/
32   - private Date REPORT_DATE;
33   - /** 报备人*/
34   - private String REPORT_BBR;
35   - /** 线路编码 */
36   - private String REPORT_XL;
37   - /** 线路名*/
38   - private String REPORT_XLNAME;
39   - /** 站点*/
40   - private String REPORT_STATION;
41   - /** 对外上报部门*/
42   - private String REPORT_DWSBBM;
43   - /** 对外上报时间*/
44   - private String REPORT_DWSBSJ;
45   - /** 延误时间*/
46   - private String REPORT_YWSJ;
47   - /** 首末班误点原因*/
48   - private String REPORT_SMBWD;
49   - /** 大间隔时间*/
50   - private String REPORT_DJGSJ;
51   - /** 大间隔原因*/
52   - private String REPORT_DJGYY;
53   - /** 突发事件*/
54   - private String REPORT_TFSJ;
55   - /** 影响时间*/
56   - private String REPORT_YXSJ;
57   - /** 影响班次数*/
58   - private String REPORT_YXBC;
59   - /** 调整措施*/
60   - private String REPORT_TZCS;
61   - /** 报案事故编号*/
62   - private String REPORT_SGBH;
63   - /** 车辆自编号*/
64   - private String REPORT_ZBH;
65   - /** 车辆牌照号*/
66   - private String REPORT_PZH;
67   - /** 驾驶员*/
68   - private String REPORT_JSY;
69   - /** 事故发生时间*/
70   - private String REPORT_SGSJ;
71   - /** 事故发生地点*/
72   - private String REPORT_SGDD;
73   - /** 行驶方向*/
74   - private String REPORT_XSFX;
75   - /** 事故对象*/
76   - private String REPORT_SGDX;
77   - /** 对象车牌照号*/
78   - private String REPORT_DXPZH;
79   - /** 事故概况*/
80   - private String REPORT_SGGK;
81   - /** 受伤人数*/
82   - private String REPORT_SSRS;
83   - /** 死亡人数*/
84   - private String REPORT_SWRS;
85   - /** 报告人 */
86   - private String REPORT_BGR;
87   - /** 报告人电话 */
88   - private String REPORT_BGRDH;
89   - /** 备注 */
90   - private String REPORT_BZ;
91   - /** 路段*/
92   - private String REPORT_ROAD;
93   - /** 访问接口时使用的状态码 操作类型,0:新增;1:修改;2:删除 */
94   - private String STATUS;
95   - /** 创建人*/
96   - private String CREATE_BY;
97   - /** 创建时间 */
98   - @Column(updatable = false, name = "CREATE_DATE", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
99   - private Date CREATE_DATE;
100   - /** 修改人*/
101   - private String UPDATE_BY;
102   - /** 修改时间*/
103   - @Column(name = "UPDATE_DATE", columnDefinition = "UPDATE_DATE DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
104   - private Date UPDATE_DATE;
105   -
106   - public long getID() {
107   - return ID;
108   - }
109   -
110   - public void setID(long ID) {
111   - this.ID = ID;
112   - }
113   -
114   - public String getREPORT_TYPE() {
115   - return REPORT_TYPE;
116   - }
117   -
118   - public void setREPORT_TYPE(String REPORT_TYPE) {
119   - this.REPORT_TYPE = REPORT_TYPE;
120   - }
121   -
122   - public String getREPORT_GS() {
123   - return REPORT_GS;
124   - }
125   -
126   - public void setREPORT_GS(String REPORT_GS) {
127   - this.REPORT_GS = REPORT_GS;
128   - }
129   -
130   - public String getREPORT_FGS() {
131   - return REPORT_FGS;
132   - }
133   -
134   - public void setREPORT_FGS(String REPORT_FGS) {
135   - this.REPORT_FGS = REPORT_FGS;
136   - }
137   -
138   - public String getREPORT_GSNAME() {
139   - return REPORT_GSNAME;
140   - }
141   -
142   - public void setREPORT_GSNAME(String REPORT_GSNAME) {
143   - this.REPORT_GSNAME = REPORT_GSNAME;
144   - }
145   -
146   - public String getREPORT_FGSNAME() {
147   - return REPORT_FGSNAME;
148   - }
149   -
150   - public void setREPORT_FGSNAME(String REPORT_FGSNAME) {
151   - this.REPORT_FGSNAME = REPORT_FGSNAME;
152   - }
153   -
154   - public Date getREPORT_DATE() {
155   - return REPORT_DATE;
156   - }
157   -
158   - public void setREPORT_DATE(Date REPORT_DATE) {
159   - this.REPORT_DATE = REPORT_DATE;
160   - }
161   -
162   - public String getREPORT_BBR() {
163   - return REPORT_BBR;
164   - }
165   -
166   - public void setREPORT_BBR(String REPORT_BBR) {
167   - this.REPORT_BBR = REPORT_BBR;
168   - }
169   -
170   - public String getREPORT_XL() {
171   - return REPORT_XL;
172   - }
173   -
174   - public void setREPORT_XL(String REPORT_XL) {
175   - this.REPORT_XL = REPORT_XL;
176   - }
177   -
178   - public String getREPORT_XLNAME() {
179   - return REPORT_XLNAME;
180   - }
181   -
182   - public void setREPORT_XLNAME(String REPORT_XLNAME) {
183   - this.REPORT_XLNAME = REPORT_XLNAME;
184   - }
185   -
186   - public String getREPORT_STATION() {
187   - return REPORT_STATION;
188   - }
189   -
190   - public void setREPORT_STATION(String REPORT_STATION) {
191   - this.REPORT_STATION = REPORT_STATION;
192   - }
193   -
194   - public String getREPORT_DWSBBM() {
195   - return REPORT_DWSBBM;
196   - }
197   -
198   - public void setREPORT_DWSBBM(String REPORT_DWSBBM) {
199   - this.REPORT_DWSBBM = REPORT_DWSBBM;
200   - }
201   -
202   - public String getREPORT_DWSBSJ() {
203   - return REPORT_DWSBSJ;
204   - }
205   -
206   - public void setREPORT_DWSBSJ(String REPORT_DWSBSJ) {
207   - this.REPORT_DWSBSJ = REPORT_DWSBSJ;
208   - }
209   -
210   - public String getREPORT_YWSJ() {
211   - return REPORT_YWSJ;
212   - }
213   -
214   - public void setREPORT_YWSJ(String REPORT_YWSJ) {
215   - this.REPORT_YWSJ = REPORT_YWSJ;
216   - }
217   -
218   - public String getREPORT_SMBWD() {
219   - return REPORT_SMBWD;
220   - }
221   -
222   - public void setREPORT_SMBWD(String REPORT_SMBWD) {
223   - this.REPORT_SMBWD = REPORT_SMBWD;
224   - }
225   -
226   - public String getREPORT_DJGSJ() {
227   - return REPORT_DJGSJ;
228   - }
229   -
230   - public void setREPORT_DJGSJ(String REPORT_DJGSJ) {
231   - this.REPORT_DJGSJ = REPORT_DJGSJ;
232   - }
233   -
234   - public String getREPORT_DJGYY() {
235   - return REPORT_DJGYY;
236   - }
237   -
238   - public void setREPORT_DJGYY(String REPORT_DJGYY) {
239   - this.REPORT_DJGYY = REPORT_DJGYY;
240   - }
241   -
242   - public String getREPORT_TFSJ() {
243   - return REPORT_TFSJ;
244   - }
245   -
246   - public void setREPORT_TFSJ(String REPORT_TFSJ) {
247   - this.REPORT_TFSJ = REPORT_TFSJ;
248   - }
249   -
250   - public String getREPORT_YXSJ() {
251   - return REPORT_YXSJ;
252   - }
253   -
254   - public void setREPORT_YXSJ(String REPORT_YXSJ) {
255   - this.REPORT_YXSJ = REPORT_YXSJ;
256   - }
257   -
258   - public String getREPORT_YXBC() {
259   - return REPORT_YXBC;
260   - }
261   -
262   - public void setREPORT_YXBC(String REPORT_YXBC) {
263   - this.REPORT_YXBC = REPORT_YXBC;
264   - }
265   -
266   - public String getREPORT_TZCS() {
267   - return REPORT_TZCS;
268   - }
269   -
270   - public void setREPORT_TZCS(String REPORT_TZCS) {
271   - this.REPORT_TZCS = REPORT_TZCS;
272   - }
273   -
274   - public String getREPORT_SGBH() {
275   - return REPORT_SGBH;
276   - }
277   -
278   - public void setREPORT_SGBH(String REPORT_SGBH) {
279   - this.REPORT_SGBH = REPORT_SGBH;
280   - }
281   -
282   - public String getREPORT_ZBH() {
283   - return REPORT_ZBH;
284   - }
285   -
286   - public void setREPORT_ZBH(String REPORT_ZBH) {
287   - this.REPORT_ZBH = REPORT_ZBH;
288   - }
289   -
290   - public String getREPORT_PZH() {
291   - return REPORT_PZH;
292   - }
293   -
294   - public void setREPORT_PZH(String REPORT_PZH) {
295   - this.REPORT_PZH = REPORT_PZH;
296   - }
297   -
298   - public String getREPORT_JSY() {
299   - return REPORT_JSY;
300   - }
301   -
302   - public void setREPORT_JSY(String REPORT_JSY) {
303   - this.REPORT_JSY = REPORT_JSY;
304   - }
305   -
306   - public String getREPORT_SGSJ() {
307   - return REPORT_SGSJ;
308   - }
309   -
310   - public void setREPORT_SGSJ(String REPORT_SGSJ) {
311   - this.REPORT_SGSJ = REPORT_SGSJ;
312   - }
313   -
314   - public String getREPORT_SGDD() {
315   - return REPORT_SGDD;
316   - }
317   -
318   - public void setREPORT_SGDD(String REPORT_SGDD) {
319   - this.REPORT_SGDD = REPORT_SGDD;
320   - }
321   -
322   - public String getREPORT_XSFX() {
323   - return REPORT_XSFX;
324   - }
325   -
326   - public void setREPORT_XSFX(String REPORT_XSFX) {
327   - this.REPORT_XSFX = REPORT_XSFX;
328   - }
329   -
330   - public String getREPORT_SGDX() {
331   - return REPORT_SGDX;
332   - }
333   -
334   - public void setREPORT_SGDX(String REPORT_SGDX) {
335   - this.REPORT_SGDX = REPORT_SGDX;
336   - }
337   -
338   - public String getREPORT_DXPZH() {
339   - return REPORT_DXPZH;
340   - }
341   -
342   - public void setREPORT_DXPZH(String REPORT_DXPZH) {
343   - this.REPORT_DXPZH = REPORT_DXPZH;
344   - }
345   -
346   - public String getREPORT_SGGK() {
347   - return REPORT_SGGK;
348   - }
349   -
350   - public void setREPORT_SGGK(String REPORT_SGGK) {
351   - this.REPORT_SGGK = REPORT_SGGK;
352   - }
353   -
354   - public String getREPORT_SSRS() {
355   - return REPORT_SSRS;
356   - }
357   -
358   - public void setREPORT_SSRS(String REPORT_SSRS) {
359   - this.REPORT_SSRS = REPORT_SSRS;
360   - }
361   -
362   - public String getREPORT_SWRS() {
363   - return REPORT_SWRS;
364   - }
365   -
366   - public void setREPORT_SWRS(String REPORT_SWRS) {
367   - this.REPORT_SWRS = REPORT_SWRS;
368   - }
369   -
370   - public String getREPORT_BGR() {
371   - return REPORT_BGR;
372   - }
373   -
374   - public void setREPORT_BGR(String REPORT_BGR) {
375   - this.REPORT_BGR = REPORT_BGR;
376   - }
377   -
378   - public String getREPORT_BGRDH() {
379   - return REPORT_BGRDH;
380   - }
381   -
382   - public void setREPORT_BGRDH(String REPORT_BGRDH) {
383   - this.REPORT_BGRDH = REPORT_BGRDH;
384   - }
385   -
386   - public String getREPORT_BZ() {
387   - return REPORT_BZ;
388   - }
389   -
390   - public void setREPORT_BZ(String REPORT_BZ) {
391   - this.REPORT_BZ = REPORT_BZ;
392   - }
393   -
394   - public String getCREATE_BY() {
395   - return CREATE_BY;
396   - }
397   -
398   - public void setCREATE_BY(String CREATE_BY) {
399   - this.CREATE_BY = CREATE_BY;
400   - }
401   -
402   - public Date getCREATE_DATE() {
403   - return CREATE_DATE;
404   - }
405   -
406   - public void setCREATE_DATE(Date CREATE_DATE) {
407   - this.CREATE_DATE = CREATE_DATE;
408   - }
409   -
410   - public String getUPDATE_BY() {
411   - return UPDATE_BY;
412   - }
413   -
414   - public void setUPDATE_BY(String UPDATE_BY) {
415   - this.UPDATE_BY = UPDATE_BY;
416   - }
417   -
418   - public Date getUPDATE_DATE() {
419   - return UPDATE_DATE;
420   - }
421   -
422   - public void setUPDATE_DATE(Date UPDATE_DATE) {
423   - this.UPDATE_DATE = UPDATE_DATE;
424   - }
425   -
426   - public String getREPORT_ROAD() {
427   - return REPORT_ROAD;
428   - }
429   -
430   - public void setREPORT_ROAD(String REPORT_ROAD) {
431   - this.REPORT_ROAD = REPORT_ROAD;
432   - }
433   -
434   - public String getSTATUS() {
435   - return STATUS;
436   - }
437   -
438   - public void setSTATUS(String STATUS) {
439   - this.STATUS = STATUS;
440   - }
441   -
442   - @Override
443   - public String toString() {
444   - DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
445   - return "{" +
446   - "ID:'" + ID + '\'' +
447   - ", REPORT_TYPE:'" + REPORT_TYPE + '\'' +
448   - ", REPORT_GS:'" + REPORT_GS + '\'' +
449   - ", REPORT_FGS:'" + REPORT_FGS + '\'' +
450   - ", REPORT_DATE:'" + dateFormat.format(REPORT_DATE) + '\'' +
451   - ", REPORT_BBR:'" + REPORT_BBR + '\'' +
452   - ", REPORT_XL:'" + REPORT_XL + '\'' +
453   - ", REPORT_XLNAME:'" + REPORT_XLNAME + '\'' +
454   - ", REPORT_STATION:'" + REPORT_STATION + '\'' +
455   - ", REPORT_DWSBBM:'" + REPORT_DWSBBM + '\'' +
456   - ", REPORT_DWSBSJ:'" + REPORT_DWSBSJ + '\'' +
457   - ", REPORT_YWSJ:'" + REPORT_YWSJ + '\'' +
458   - ", REPORT_SMBWD:'" + REPORT_SMBWD + '\'' +
459   - ", REPORT_DJGSJ:'" + REPORT_DJGSJ + '\'' +
460   - ", REPORT_DJGYY:'" + REPORT_DJGYY + '\'' +
461   - ", REPORT_TFSJ:'" + REPORT_TFSJ + '\'' +
462   - ", REPORT_YXSJ:'" + REPORT_YXSJ + '\'' +
463   - ", REPORT_YXBC:'" + REPORT_YXBC + '\'' +
464   - ", REPORT_TZCS:'" + REPORT_TZCS + '\'' +
465   - ", REPORT_SGBH:'" + REPORT_SGBH + '\'' +
466   - ", REPORT_ZBH:'" + REPORT_ZBH + '\'' +
467   - ", REPORT_PZH:'" + REPORT_PZH + '\'' +
468   - ", REPORT_JSY:'" + REPORT_JSY + '\'' +
469   - ", REPORT_SGSJ:'" + REPORT_SGSJ + '\'' +
470   - ", REPORT_SGDD:'" + REPORT_SGDD + '\'' +
471   - ", REPORT_XSFX:'" + REPORT_XSFX + '\'' +
472   - ", REPORT_SGDX:'" + REPORT_SGDX + '\'' +
473   - ", REPORT_DXPZH:'" + REPORT_DXPZH + '\'' +
474   - ", REPORT_SGGK:'" + REPORT_SGGK + '\'' +
475   - ", REPORT_SSRS:'" + REPORT_SSRS + '\'' +
476   - ", REPORT_SWRS:'" + REPORT_SWRS + '\'' +
477   - ", REPORT_BGR:'" + REPORT_BGR + '\'' +
478   - ", REPORT_BGRDH:'" + REPORT_BGRDH + '\'' +
479   - ", REPORT_BZ:'" + REPORT_BZ + '\'' +
480   - ", CREATE_BY:'" + CREATE_BY + '\'' +
481   - ", CREATE_DATE:" + CREATE_DATE +
482   - ", UPDATE_BY:'" + UPDATE_BY + '\'' +
483   - ", UPDATE_DATE:" + UPDATE_DATE +
484   - ", REPORT_ROAD:'" + REPORT_ROAD + '\'' +
485   - ", STATUS:'" + STATUS + '\'' +
486   - '}';
487   - }
488   -}
  1 +package com.bsth.data.report_register.entity;
  2 +
  3 +import javax.persistence.Column;
  4 +import javax.persistence.Entity;
  5 +import javax.persistence.GeneratedValue;
  6 +import javax.persistence.Id;
  7 +import javax.persistence.Table;
  8 +import java.text.DateFormat;
  9 +import java.text.SimpleDateFormat;
  10 +import java.util.Date;
  11 +
  12 +
  13 +@Entity
  14 +@Table(name = "bsth_t_report")
  15 +public class ReportRegister {
  16 +
  17 + @Id
  18 + @GeneratedValue
  19 + private long ID;
  20 +
  21 + /** 类型*/
  22 + private String REPORT_TYPE;
  23 + /** 公司 */
  24 + private String REPORT_GS;
  25 + /** 分公司 */
  26 + private String REPORT_FGS;
  27 + /** 公司名 */
  28 + private String REPORT_GSNAME;
  29 + /** 分公司名 */
  30 + private String REPORT_FGSNAME;
  31 + /** 时间*/
  32 + private Date REPORT_DATE;
  33 + /** 报备人*/
  34 + private String REPORT_BBR;
  35 + /** 线路编码 */
  36 + private String REPORT_XL;
  37 + /** 线路名*/
  38 + private String REPORT_XLNAME;
  39 + /** 站点*/
  40 + private String REPORT_STATION;
  41 + /** 对外上报部门*/
  42 + private String REPORT_DWSBBM;
  43 + /** 对外上报时间*/
  44 + private String REPORT_DWSBSJ;
  45 + /** 延误时间*/
  46 + private String REPORT_YWSJ;
  47 + /** 首末班误点原因*/
  48 + private String REPORT_SMBWD;
  49 + /** 大间隔时间*/
  50 + private String REPORT_DJGSJ;
  51 + /** 大间隔原因*/
  52 + private String REPORT_DJGYY;
  53 + /** 突发事件*/
  54 + private String REPORT_TFSJ;
  55 + /** 影响时间*/
  56 + private String REPORT_YXSJ;
  57 + /** 影响班次数*/
  58 + private String REPORT_YXBC;
  59 + /** 调整措施*/
  60 + private String REPORT_TZCS;
  61 + /** 报案事故编号*/
  62 + private String REPORT_SGBH;
  63 + /** 车辆自编号*/
  64 + private String REPORT_ZBH;
  65 + /** 车辆牌照号*/
  66 + private String REPORT_PZH;
  67 + /** 驾驶员*/
  68 + private String REPORT_JSY;
  69 + /** 事故发生时间*/
  70 + private String REPORT_SGSJ;
  71 + /** 事故发生地点*/
  72 + private String REPORT_SGDD;
  73 + /** 行驶方向*/
  74 + private String REPORT_XSFX;
  75 + /** 事故对象*/
  76 + private String REPORT_SGDX;
  77 + /** 对象车牌照号*/
  78 + private String REPORT_DXPZH;
  79 + /** 事故概况*/
  80 + private String REPORT_SGGK;
  81 + /** 受伤人数*/
  82 + private String REPORT_SSRS;
  83 + /** 死亡人数*/
  84 + private String REPORT_SWRS;
  85 + /** 报告人 */
  86 + private String REPORT_BGR;
  87 + /** 报告人电话 */
  88 + private String REPORT_BGRDH;
  89 + /** 备注 */
  90 + private String REPORT_BZ;
  91 + /** 路段*/
  92 + private String REPORT_ROAD;
  93 + /** 访问接口时使用的状态码 操作类型,0:新增;1:修改;2:删除 */
  94 + private String STATUS;
  95 + /** 创建人*/
  96 + private String CREATE_BY;
  97 + /** 创建时间 */
  98 + @Column(updatable = false, name = "CREATE_DATE", columnDefinition = "TIMESTAMP DEFAULT CURRENT_TIMESTAMP")
  99 + private Date CREATE_DATE;
  100 + /** 修改人*/
  101 + private String UPDATE_BY;
  102 + /** 修改时间*/
  103 + @Column(name = "UPDATE_DATE", columnDefinition = "UPDATE_DATE DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP")
  104 + private Date UPDATE_DATE;
  105 +
  106 + public long getID() {
  107 + return ID;
  108 + }
  109 +
  110 + public void setID(long ID) {
  111 + this.ID = ID;
  112 + }
  113 +
  114 + public String getREPORT_TYPE() {
  115 + return REPORT_TYPE;
  116 + }
  117 +
  118 + public void setREPORT_TYPE(String REPORT_TYPE) {
  119 + this.REPORT_TYPE = REPORT_TYPE;
  120 + }
  121 +
  122 + public String getREPORT_GS() {
  123 + return REPORT_GS;
  124 + }
  125 +
  126 + public void setREPORT_GS(String REPORT_GS) {
  127 + this.REPORT_GS = REPORT_GS;
  128 + }
  129 +
  130 + public String getREPORT_FGS() {
  131 + return REPORT_FGS;
  132 + }
  133 +
  134 + public void setREPORT_FGS(String REPORT_FGS) {
  135 + this.REPORT_FGS = REPORT_FGS;
  136 + }
  137 +
  138 + public String getREPORT_GSNAME() {
  139 + return REPORT_GSNAME;
  140 + }
  141 +
  142 + public void setREPORT_GSNAME(String REPORT_GSNAME) {
  143 + this.REPORT_GSNAME = REPORT_GSNAME;
  144 + }
  145 +
  146 + public String getREPORT_FGSNAME() {
  147 + return REPORT_FGSNAME;
  148 + }
  149 +
  150 + public void setREPORT_FGSNAME(String REPORT_FGSNAME) {
  151 + this.REPORT_FGSNAME = REPORT_FGSNAME;
  152 + }
  153 +
  154 + public Date getREPORT_DATE() {
  155 + return REPORT_DATE;
  156 + }
  157 +
  158 + public void setREPORT_DATE(Date REPORT_DATE) {
  159 + this.REPORT_DATE = REPORT_DATE;
  160 + }
  161 +
  162 + public String getREPORT_BBR() {
  163 + return REPORT_BBR;
  164 + }
  165 +
  166 + public void setREPORT_BBR(String REPORT_BBR) {
  167 + this.REPORT_BBR = REPORT_BBR;
  168 + }
  169 +
  170 + public String getREPORT_XL() {
  171 + return REPORT_XL;
  172 + }
  173 +
  174 + public void setREPORT_XL(String REPORT_XL) {
  175 + this.REPORT_XL = REPORT_XL;
  176 + }
  177 +
  178 + public String getREPORT_XLNAME() {
  179 + return REPORT_XLNAME;
  180 + }
  181 +
  182 + public void setREPORT_XLNAME(String REPORT_XLNAME) {
  183 + this.REPORT_XLNAME = REPORT_XLNAME;
  184 + }
  185 +
  186 + public String getREPORT_STATION() {
  187 + return REPORT_STATION;
  188 + }
  189 +
  190 + public void setREPORT_STATION(String REPORT_STATION) {
  191 + this.REPORT_STATION = REPORT_STATION;
  192 + }
  193 +
  194 + public String getREPORT_DWSBBM() {
  195 + return REPORT_DWSBBM;
  196 + }
  197 +
  198 + public void setREPORT_DWSBBM(String REPORT_DWSBBM) {
  199 + this.REPORT_DWSBBM = REPORT_DWSBBM;
  200 + }
  201 +
  202 + public String getREPORT_DWSBSJ() {
  203 + return REPORT_DWSBSJ;
  204 + }
  205 +
  206 + public void setREPORT_DWSBSJ(String REPORT_DWSBSJ) {
  207 + this.REPORT_DWSBSJ = REPORT_DWSBSJ;
  208 + }
  209 +
  210 + public String getREPORT_YWSJ() {
  211 + return REPORT_YWSJ;
  212 + }
  213 +
  214 + public void setREPORT_YWSJ(String REPORT_YWSJ) {
  215 + this.REPORT_YWSJ = REPORT_YWSJ;
  216 + }
  217 +
  218 + public String getREPORT_SMBWD() {
  219 + return REPORT_SMBWD;
  220 + }
  221 +
  222 + public void setREPORT_SMBWD(String REPORT_SMBWD) {
  223 + this.REPORT_SMBWD = REPORT_SMBWD;
  224 + }
  225 +
  226 + public String getREPORT_DJGSJ() {
  227 + return REPORT_DJGSJ;
  228 + }
  229 +
  230 + public void setREPORT_DJGSJ(String REPORT_DJGSJ) {
  231 + this.REPORT_DJGSJ = REPORT_DJGSJ;
  232 + }
  233 +
  234 + public String getREPORT_DJGYY() {
  235 + return REPORT_DJGYY;
  236 + }
  237 +
  238 + public void setREPORT_DJGYY(String REPORT_DJGYY) {
  239 + this.REPORT_DJGYY = REPORT_DJGYY;
  240 + }
  241 +
  242 + public String getREPORT_TFSJ() {
  243 + return REPORT_TFSJ;
  244 + }
  245 +
  246 + public void setREPORT_TFSJ(String REPORT_TFSJ) {
  247 + this.REPORT_TFSJ = REPORT_TFSJ;
  248 + }
  249 +
  250 + public String getREPORT_YXSJ() {
  251 + return REPORT_YXSJ;
  252 + }
  253 +
  254 + public void setREPORT_YXSJ(String REPORT_YXSJ) {
  255 + this.REPORT_YXSJ = REPORT_YXSJ;
  256 + }
  257 +
  258 + public String getREPORT_YXBC() {
  259 + return REPORT_YXBC;
  260 + }
  261 +
  262 + public void setREPORT_YXBC(String REPORT_YXBC) {
  263 + this.REPORT_YXBC = REPORT_YXBC;
  264 + }
  265 +
  266 + public String getREPORT_TZCS() {
  267 + return REPORT_TZCS;
  268 + }
  269 +
  270 + public void setREPORT_TZCS(String REPORT_TZCS) {
  271 + this.REPORT_TZCS = REPORT_TZCS;
  272 + }
  273 +
  274 + public String getREPORT_SGBH() {
  275 + return REPORT_SGBH;
  276 + }
  277 +
  278 + public void setREPORT_SGBH(String REPORT_SGBH) {
  279 + this.REPORT_SGBH = REPORT_SGBH;
  280 + }
  281 +
  282 + public String getREPORT_ZBH() {
  283 + return REPORT_ZBH;
  284 + }
  285 +
  286 + public void setREPORT_ZBH(String REPORT_ZBH) {
  287 + this.REPORT_ZBH = REPORT_ZBH;
  288 + }
  289 +
  290 + public String getREPORT_PZH() {
  291 + return REPORT_PZH;
  292 + }
  293 +
  294 + public void setREPORT_PZH(String REPORT_PZH) {
  295 + this.REPORT_PZH = REPORT_PZH;
  296 + }
  297 +
  298 + public String getREPORT_JSY() {
  299 + return REPORT_JSY;
  300 + }
  301 +
  302 + public void setREPORT_JSY(String REPORT_JSY) {
  303 + this.REPORT_JSY = REPORT_JSY;
  304 + }
  305 +
  306 + public String getREPORT_SGSJ() {
  307 + return REPORT_SGSJ;
  308 + }
  309 +
  310 + public void setREPORT_SGSJ(String REPORT_SGSJ) {
  311 + this.REPORT_SGSJ = REPORT_SGSJ;
  312 + }
  313 +
  314 + public String getREPORT_SGDD() {
  315 + return REPORT_SGDD;
  316 + }
  317 +
  318 + public void setREPORT_SGDD(String REPORT_SGDD) {
  319 + this.REPORT_SGDD = REPORT_SGDD;
  320 + }
  321 +
  322 + public String getREPORT_XSFX() {
  323 + return REPORT_XSFX;
  324 + }
  325 +
  326 + public void setREPORT_XSFX(String REPORT_XSFX) {
  327 + this.REPORT_XSFX = REPORT_XSFX;
  328 + }
  329 +
  330 + public String getREPORT_SGDX() {
  331 + return REPORT_SGDX;
  332 + }
  333 +
  334 + public void setREPORT_SGDX(String REPORT_SGDX) {
  335 + this.REPORT_SGDX = REPORT_SGDX;
  336 + }
  337 +
  338 + public String getREPORT_DXPZH() {
  339 + return REPORT_DXPZH;
  340 + }
  341 +
  342 + public void setREPORT_DXPZH(String REPORT_DXPZH) {
  343 + this.REPORT_DXPZH = REPORT_DXPZH;
  344 + }
  345 +
  346 + public String getREPORT_SGGK() {
  347 + return REPORT_SGGK;
  348 + }
  349 +
  350 + public void setREPORT_SGGK(String REPORT_SGGK) {
  351 + this.REPORT_SGGK = REPORT_SGGK;
  352 + }
  353 +
  354 + public String getREPORT_SSRS() {
  355 + return REPORT_SSRS;
  356 + }
  357 +
  358 + public void setREPORT_SSRS(String REPORT_SSRS) {
  359 + this.REPORT_SSRS = REPORT_SSRS;
  360 + }
  361 +
  362 + public String getREPORT_SWRS() {
  363 + return REPORT_SWRS;
  364 + }
  365 +
  366 + public void setREPORT_SWRS(String REPORT_SWRS) {
  367 + this.REPORT_SWRS = REPORT_SWRS;
  368 + }
  369 +
  370 + public String getREPORT_BGR() {
  371 + return REPORT_BGR;
  372 + }
  373 +
  374 + public void setREPORT_BGR(String REPORT_BGR) {
  375 + this.REPORT_BGR = REPORT_BGR;
  376 + }
  377 +
  378 + public String getREPORT_BGRDH() {
  379 + return REPORT_BGRDH;
  380 + }
  381 +
  382 + public void setREPORT_BGRDH(String REPORT_BGRDH) {
  383 + this.REPORT_BGRDH = REPORT_BGRDH;
  384 + }
  385 +
  386 + public String getREPORT_BZ() {
  387 + return REPORT_BZ;
  388 + }
  389 +
  390 + public void setREPORT_BZ(String REPORT_BZ) {
  391 + this.REPORT_BZ = REPORT_BZ;
  392 + }
  393 +
  394 + public String getCREATE_BY() {
  395 + return CREATE_BY;
  396 + }
  397 +
  398 + public void setCREATE_BY(String CREATE_BY) {
  399 + this.CREATE_BY = CREATE_BY;
  400 + }
  401 +
  402 + public Date getCREATE_DATE() {
  403 + return CREATE_DATE;
  404 + }
  405 +
  406 + public void setCREATE_DATE(Date CREATE_DATE) {
  407 + this.CREATE_DATE = CREATE_DATE;
  408 + }
  409 +
  410 + public String getUPDATE_BY() {
  411 + return UPDATE_BY;
  412 + }
  413 +
  414 + public void setUPDATE_BY(String UPDATE_BY) {
  415 + this.UPDATE_BY = UPDATE_BY;
  416 + }
  417 +
  418 + public Date getUPDATE_DATE() {
  419 + return UPDATE_DATE;
  420 + }
  421 +
  422 + public void setUPDATE_DATE(Date UPDATE_DATE) {
  423 + this.UPDATE_DATE = UPDATE_DATE;
  424 + }
  425 +
  426 + public String getREPORT_ROAD() {
  427 + return REPORT_ROAD;
  428 + }
  429 +
  430 + public void setREPORT_ROAD(String REPORT_ROAD) {
  431 + this.REPORT_ROAD = REPORT_ROAD;
  432 + }
  433 +
  434 + public String getSTATUS() {
  435 + return STATUS;
  436 + }
  437 +
  438 + public void setSTATUS(String STATUS) {
  439 + this.STATUS = STATUS;
  440 + }
  441 +
  442 + @Override
  443 + public String toString() {
  444 + DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  445 + return "{" +
  446 + "ID:'" + ID + '\'' +
  447 + ", REPORT_TYPE:'" + REPORT_TYPE + '\'' +
  448 + ", REPORT_GS:'" + REPORT_GS + '\'' +
  449 + ", REPORT_FGS:'" + REPORT_FGS + '\'' +
  450 + ", REPORT_DATE:'" + dateFormat.format(REPORT_DATE) + '\'' +
  451 + ", REPORT_BBR:'" + REPORT_BBR + '\'' +
  452 + ", REPORT_XL:'" + REPORT_XL + '\'' +
  453 + ", REPORT_XLNAME:'" + REPORT_XLNAME + '\'' +
  454 + ", REPORT_STATION:'" + REPORT_STATION + '\'' +
  455 + ", REPORT_DWSBBM:'" + REPORT_DWSBBM + '\'' +
  456 + ", REPORT_DWSBSJ:'" + REPORT_DWSBSJ + '\'' +
  457 + ", REPORT_YWSJ:'" + REPORT_YWSJ + '\'' +
  458 + ", REPORT_SMBWD:'" + REPORT_SMBWD + '\'' +
  459 + ", REPORT_DJGSJ:'" + REPORT_DJGSJ + '\'' +
  460 + ", REPORT_DJGYY:'" + REPORT_DJGYY + '\'' +
  461 + ", REPORT_TFSJ:'" + REPORT_TFSJ + '\'' +
  462 + ", REPORT_YXSJ:'" + REPORT_YXSJ + '\'' +
  463 + ", REPORT_YXBC:'" + REPORT_YXBC + '\'' +
  464 + ", REPORT_TZCS:'" + REPORT_TZCS + '\'' +
  465 + ", REPORT_SGBH:'" + REPORT_SGBH + '\'' +
  466 + ", REPORT_ZBH:'" + REPORT_ZBH + '\'' +
  467 + ", REPORT_PZH:'" + REPORT_PZH + '\'' +
  468 + ", REPORT_JSY:'" + REPORT_JSY + '\'' +
  469 + ", REPORT_SGSJ:'" + REPORT_SGSJ + '\'' +
  470 + ", REPORT_SGDD:'" + REPORT_SGDD + '\'' +
  471 + ", REPORT_XSFX:'" + REPORT_XSFX + '\'' +
  472 + ", REPORT_SGDX:'" + REPORT_SGDX + '\'' +
  473 + ", REPORT_DXPZH:'" + REPORT_DXPZH + '\'' +
  474 + ", REPORT_SGGK:'" + REPORT_SGGK + '\'' +
  475 + ", REPORT_SSRS:'" + REPORT_SSRS + '\'' +
  476 + ", REPORT_SWRS:'" + REPORT_SWRS + '\'' +
  477 + ", REPORT_BGR:'" + REPORT_BGR + '\'' +
  478 + ", REPORT_BGRDH:'" + REPORT_BGRDH + '\'' +
  479 + ", REPORT_BZ:'" + REPORT_BZ + '\'' +
  480 + ", CREATE_BY:'" + CREATE_BY + '\'' +
  481 + ", CREATE_DATE:" + CREATE_DATE +
  482 + ", UPDATE_BY:'" + UPDATE_BY + '\'' +
  483 + ", UPDATE_DATE:" + UPDATE_DATE +
  484 + ", REPORT_ROAD:'" + REPORT_ROAD + '\'' +
  485 + ", STATUS:'" + STATUS + '\'' +
  486 + '}';
  487 + }
  488 +}
... ...
src/main/java/com/bsth/data/report_register/repository/ReportRegisterRepository.java
1   -package com.bsth.data.report_register.repository;
2   -
3   -import com.bsth.data.report_register.entity.ReportRegister;
4   -import com.bsth.repository.BaseRepository;
5   -import org.springframework.stereotype.Repository;
6   -
7   -/**
8   - *
9   - * @Interface: ReportRegisterRepository(等级报表Repository数据持久层接口)
10   - *
11   - * @Author yrf
12   - *
13   - * @Date 2019-12-04
14   - *
15   - * @Version 公交调度系统BS版 0.1
16   - *
17   - */
18   -
19   -@Repository
20   -public interface ReportRegisterRepository extends BaseRepository<ReportRegister, Long> {
21   -
22   -}
  1 +package com.bsth.data.report_register.repository;
  2 +
  3 +import com.bsth.data.report_register.entity.ReportRegister;
  4 +import com.bsth.repository.BaseRepository;
  5 +import org.springframework.stereotype.Repository;
  6 +
  7 +/**
  8 + *
  9 + * @Interface: ReportRegisterRepository(等级报表Repository数据持久层接口)
  10 + *
  11 + * @Author yrf
  12 + *
  13 + * @Date 2019-12-04
  14 + *
  15 + * @Version 公交调度系统BS版 0.1
  16 + *
  17 + */
  18 +
  19 +@Repository
  20 +public interface ReportRegisterRepository extends BaseRepository<ReportRegister, Long> {
  21 +
  22 +}
... ...
src/main/java/com/bsth/entity/LsStationRoute.java
... ... @@ -41,7 +41,9 @@ public class LsStationRoute {
41 41  
42 42 // 线路编码
43 43 private String lineCode;
44   -
  44 +
  45 + // 行业编码
  46 + private String industryCode;
45 47 /**
46 48 * 站点类型
47 49 *
... ... @@ -145,6 +147,14 @@ public class LsStationRoute {
145 147 this.lineCode = lineCode;
146 148 }
147 149  
  150 + public String getIndustryCode() {
  151 + return industryCode;
  152 + }
  153 +
  154 + public void setIndustryCode(String industryCode) {
  155 + this.industryCode = industryCode;
  156 + }
  157 +
148 158 public String getStationMark() {
149 159 return stationMark;
150 160 }
... ...
src/main/java/com/bsth/entity/StationRoute.java
... ... @@ -43,6 +43,9 @@ public class StationRoute {
43 43  
44 44 // 线路编码
45 45 private String lineCode;
  46 +
  47 + // 行业编码
  48 + private String industryCode;
46 49  
47 50 /**
48 51 * 站点类型
... ... @@ -147,6 +150,14 @@ public class StationRoute {
147 150 this.lineCode = lineCode;
148 151 }
149 152  
  153 + public String getIndustryCode() {
  154 + return industryCode;
  155 + }
  156 +
  157 + public void setIndustryCode(String industryCode) {
  158 + this.industryCode = industryCode;
  159 + }
  160 +
150 161 public String getStationMark() {
151 162 return stationMark;
152 163 }
... ...
src/main/java/com/bsth/entity/StationRouteCache.java
... ... @@ -44,7 +44,9 @@ public class StationRouteCache {
44 44  
45 45 // 线路编码
46 46 private String lineCode;
47   -
  47 +
  48 + // 行业编码
  49 + private String industryCode;
48 50 /**
49 51 * 站点类型
50 52 *
... ... @@ -148,6 +150,14 @@ public class StationRouteCache {
148 150 this.lineCode = lineCode;
149 151 }
150 152  
  153 + public String getIndustryCode() {
  154 + return industryCode;
  155 + }
  156 +
  157 + public void setIndustryCode(String industryCode) {
  158 + this.industryCode = industryCode;
  159 + }
  160 +
151 161 public String getStationMark() {
152 162 return stationMark;
153 163 }
... ...
src/main/java/com/bsth/entity/schedule/TTInfoBxDetail.java
1   -package com.bsth.entity.schedule;
2   -
3   -import com.bsth.control_v2.plan_module.common.enums.ttinfo.BxType;
4   -import com.bsth.entity.Line;
5   -import com.bsth.entity.schedule.covert.BxTypeConverter;
6   -
7   -import javax.persistence.*;
8   -
9   -/**
10   - * 时刻表明细信息(班型信息)。
11   - */
12   -@Entity
13   -@Table(name = "bsth_c_s_ttinfo_bx_detail")
14   -public class TTInfoBxDetail extends BEntity {
15   -
16   - /** 主健Id */
17   - @Id
18   - @GeneratedValue
19   - private Long id;
20   -
21   -
22   - /** 关联线路 */
23   - @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
24   - private Line xl;
25   - /** 线路版本(bsth_c_line_versions表对应字段) */
26   - @Column(nullable = false)
27   - private int lineVersion;
28   - /** 时刻表主对象关联 */
29   - @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
30   - private TTInfo ttinfo;
31   - /** 关联的路牌 */
32   - @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
33   - private GuideboardInfo lp;
34   -
35   - /** 路牌班型1 */
36   - @Convert(converter = BxTypeConverter.class)
37   - @Column(nullable = false)
38   - private BxType bxType1;
39   - /** 路牌班型2 */
40   - @Column(nullable = false)
41   - @Convert(converter = BxTypeConverter.class)
42   - private BxType bxType2;
43   - /** 路牌配档数 */
44   - private String bxPds;
45   -
46   - /** 版本控制 */
47   - @Version
48   - @Column(nullable = false)
49   - private int version;
50   -
51   - // TODO:
52   -
53   - public Long getId() {
54   - return id;
55   - }
56   -
57   - public void setId(Long id) {
58   - this.id = id;
59   - }
60   -
61   - public Line getXl() {
62   - return xl;
63   - }
64   -
65   - public void setXl(Line xl) {
66   - this.xl = xl;
67   - }
68   -
69   - public int getLineVersion() {
70   - return lineVersion;
71   - }
72   -
73   - public void setLineVersion(int lineVersion) {
74   - this.lineVersion = lineVersion;
75   - }
76   -
77   - public TTInfo getTtinfo() {
78   - return ttinfo;
79   - }
80   -
81   - public void setTtinfo(TTInfo ttinfo) {
82   - this.ttinfo = ttinfo;
83   - }
84   -
85   - public GuideboardInfo getLp() {
86   - return lp;
87   - }
88   -
89   - public void setLp(GuideboardInfo lp) {
90   - this.lp = lp;
91   - }
92   -
93   - public BxType getBxType1() {
94   - return bxType1;
95   - }
96   -
97   - public void setBxType1(BxType bxType1) {
98   - this.bxType1 = bxType1;
99   - }
100   -
101   - public BxType getBxType2() {
102   - return bxType2;
103   - }
104   -
105   - public void setBxType2(BxType bxType2) {
106   - this.bxType2 = bxType2;
107   - }
108   -
109   - public String getBxPds() {
110   - return bxPds;
111   - }
112   -
113   - public void setBxPds(String bxPds) {
114   - this.bxPds = bxPds;
115   - }
116   -
117   - public int getVersion() {
118   - return version;
119   - }
120   -
121   - public void setVersion(int version) {
122   - this.version = version;
123   - }
124   -
125   -}
  1 +package com.bsth.entity.schedule;
  2 +
  3 +import com.bsth.control_v2.plan_module.common.enums.ttinfo.BxType;
  4 +import com.bsth.entity.Line;
  5 +import com.bsth.entity.schedule.covert.BxTypeConverter;
  6 +
  7 +import javax.persistence.*;
  8 +
  9 +/**
  10 + * 时刻表明细信息(班型信息)。
  11 + */
  12 +@Entity
  13 +@Table(name = "bsth_c_s_ttinfo_bx_detail")
  14 +public class TTInfoBxDetail extends BEntity {
  15 +
  16 + /** 主健Id */
  17 + @Id
  18 + @GeneratedValue
  19 + private Long id;
  20 +
  21 +
  22 + /** 关联线路 */
  23 + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
  24 + private Line xl;
  25 + /** 线路版本(bsth_c_line_versions表对应字段) */
  26 + @Column(nullable = false)
  27 + private int lineVersion;
  28 + /** 时刻表主对象关联 */
  29 + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
  30 + private TTInfo ttinfo;
  31 + /** 关联的路牌 */
  32 + @ManyToOne(optional = false, cascade = CascadeType.DETACH, fetch = FetchType.LAZY)
  33 + private GuideboardInfo lp;
  34 +
  35 + /** 路牌班型1 */
  36 + @Convert(converter = BxTypeConverter.class)
  37 + @Column(nullable = false)
  38 + private BxType bxType1;
  39 + /** 路牌班型2 */
  40 + @Column(nullable = false)
  41 + @Convert(converter = BxTypeConverter.class)
  42 + private BxType bxType2;
  43 + /** 路牌配档数 */
  44 + private String bxPds;
  45 +
  46 + /** 版本控制 */
  47 + @Version
  48 + @Column(nullable = false)
  49 + private int version;
  50 +
  51 + // TODO:
  52 +
  53 + public Long getId() {
  54 + return id;
  55 + }
  56 +
  57 + public void setId(Long id) {
  58 + this.id = id;
  59 + }
  60 +
  61 + public Line getXl() {
  62 + return xl;
  63 + }
  64 +
  65 + public void setXl(Line xl) {
  66 + this.xl = xl;
  67 + }
  68 +
  69 + public int getLineVersion() {
  70 + return lineVersion;
  71 + }
  72 +
  73 + public void setLineVersion(int lineVersion) {
  74 + this.lineVersion = lineVersion;
  75 + }
  76 +
  77 + public TTInfo getTtinfo() {
  78 + return ttinfo;
  79 + }
  80 +
  81 + public void setTtinfo(TTInfo ttinfo) {
  82 + this.ttinfo = ttinfo;
  83 + }
  84 +
  85 + public GuideboardInfo getLp() {
  86 + return lp;
  87 + }
  88 +
  89 + public void setLp(GuideboardInfo lp) {
  90 + this.lp = lp;
  91 + }
  92 +
  93 + public BxType getBxType1() {
  94 + return bxType1;
  95 + }
  96 +
  97 + public void setBxType1(BxType bxType1) {
  98 + this.bxType1 = bxType1;
  99 + }
  100 +
  101 + public BxType getBxType2() {
  102 + return bxType2;
  103 + }
  104 +
  105 + public void setBxType2(BxType bxType2) {
  106 + this.bxType2 = bxType2;
  107 + }
  108 +
  109 + public String getBxPds() {
  110 + return bxPds;
  111 + }
  112 +
  113 + public void setBxPds(String bxPds) {
  114 + this.bxPds = bxPds;
  115 + }
  116 +
  117 + public int getVersion() {
  118 + return version;
  119 + }
  120 +
  121 + public void setVersion(int version) {
  122 + this.version = version;
  123 + }
  124 +
  125 +}
... ...
src/main/java/com/bsth/entity/schedule/covert/BxTypeConverter.java
1   -package com.bsth.entity.schedule.covert;
2   -
3   -import com.bsth.control_v2.plan_module.common.enums.ttinfo.BxType;
4   -import org.apache.commons.lang3.StringUtils;
5   -
6   -import javax.persistence.AttributeConverter;
7   -import javax.persistence.Convert;
8   -
9   -@Convert
10   -public class BxTypeConverter implements AttributeConverter<BxType, String> {
11   - @Override
12   - public String convertToDatabaseColumn(BxType attribute) {
13   - return attribute.getDicDesc();
14   - }
15   -
16   - @Override
17   - public BxType convertToEntityAttribute(String dbData) {
18   - if (StringUtils.isEmpty(dbData)) {
19   - return null;
20   - } else {
21   - return BxType.fromDicDesc(dbData);
22   - }
23   -
24   - }
25   -}
  1 +package com.bsth.entity.schedule.covert;
  2 +
  3 +import com.bsth.control_v2.plan_module.common.enums.ttinfo.BxType;
  4 +import org.apache.commons.lang3.StringUtils;
  5 +
  6 +import javax.persistence.AttributeConverter;
  7 +import javax.persistence.Convert;
  8 +
  9 +@Convert
  10 +public class BxTypeConverter implements AttributeConverter<BxType, String> {
  11 + @Override
  12 + public String convertToDatabaseColumn(BxType attribute) {
  13 + return attribute.getDicDesc();
  14 + }
  15 +
  16 + @Override
  17 + public BxType convertToEntityAttribute(String dbData) {
  18 + if (StringUtils.isEmpty(dbData)) {
  19 + return null;
  20 + } else {
  21 + return BxType.fromDicDesc(dbData);
  22 + }
  23 +
  24 + }
  25 +}
... ...
src/main/java/com/bsth/repository/StationRouteCacheRepository.java
... ... @@ -57,11 +57,11 @@ public interface StationRouteCacheRepository extends BaseRepository&lt;StationRoute
57 57 */
58 58 @Modifying
59 59 @Query(value="delete from bsth_c_stationroute_cache where line_code = ?1 and directions = ?2 ", nativeQuery=true)
60   - public void stationRouteCacheDel(String lineCode,Integer dir);
  60 + void stationRouteCacheDel(String lineCode,Integer dir);
61 61  
62 62 @Modifying
63 63 @Query(value="delete from bsth_c_stationroute_cache where line = ?1 and directions = ?2 ", nativeQuery=true)
64   - public void stationRouteCacheDel(Integer lineId,Integer dir);
  64 + void stationRouteCacheDel(Integer lineId,Integer dir);
65 65  
66 66  
67 67 @Query(value = "SELECT a.`stationRoute.id`," +
... ... @@ -95,7 +95,9 @@ public interface StationRouteCacheRepository extends BaseRepository&lt;StationRoute
95 95 "ST_AsText(b.b_polygon_grid) AS 'station.bPolygonGrid'," +
96 96 "b.destroy AS 'station.destroy'," +
97 97 "b.versions AS 'station.versions'," +
98   - "b.descriptions AS 'station.descriptions' FROM (" +
  98 + "b.descriptions AS 'station.descriptions'," +
  99 + "a.`industryCode` " +
  100 + " FROM (" +
99 101 "SELECT r.id AS 'stationRoute.id'," +
100 102 " r.line AS 'stationRoute.line'," +
101 103 "r.station AS 'stationRoute.station'," +
... ... @@ -110,7 +112,7 @@ public interface StationRouteCacheRepository extends BaseRepository&lt;StationRoute
110 112 "r.first_time AS 'stationRoute.firstTime'," +
111 113 "r.end_time AS 'stationRoute.endTime'," +
112 114 "r.descriptions AS 'stationRoute.descriptions'," +
113   - "r.versions AS 'stationRoute.versions' FROM bsth_c_stationroute_cache r WHERE r.line = ?1 and r.directions = ?2 and r.destroy=0) a " +
  115 + "r.versions AS 'stationRoute.versions',r.industry_code AS industryCode FROM bsth_c_stationroute_cache r WHERE r.line = ?1 and r.directions = ?2 and r.destroy=0) a " +
114 116 "LEFT JOIN bsth_c_station b " +
115 117 "ON a.`stationRoute.station` = b.id ORDER BY a.`stationRoute.stationRouteCode` ASC", nativeQuery=true)
116 118 List<Object[]> findCachePoint(int lineId, int dir);
... ...
src/main/java/com/bsth/repository/StationRouteRepository.java
... ... @@ -66,7 +66,9 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
66 66 "ST_AsText(b.b_polygon_grid) AS 'station.bPolygonGrid'," +
67 67 "b.destroy AS 'station.destroy'," +
68 68 "b.versions AS 'station.versions'," +
69   - "b.descriptions AS 'station.descriptions' FROM (" +
  69 + "b.descriptions AS 'station.descriptions', " +
  70 + "a.`stationRoute.industryCode` " +
  71 + " FROM (" +
70 72 "SELECT r.id AS 'stationRoute.id'," +
71 73 " r.line AS 'stationRoute.line'," +
72 74 "r.station AS 'stationRoute.station'," +
... ... @@ -81,7 +83,9 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
81 83 "r.first_time AS 'stationRoute.firstTime'," +
82 84 "r.end_time AS 'stationRoute.endTime'," +
83 85 "r.descriptions AS 'stationRoute.descriptions'," +
84   - "r.versions AS 'stationRoute.versions' FROM bsth_c_stationroute r WHERE r.line = ?1 and r.directions = ?2 and r.destroy=0) a " +
  86 + "r.versions AS 'stationRoute.versions', " +
  87 + "r.industry_code AS 'stationRoute.industryCode' " +
  88 + " FROM bsth_c_stationroute r WHERE r.line = ?1 and r.directions = ?2 and r.destroy=0) a " +
85 89 "LEFT JOIN bsth_c_station b " +
86 90 "ON a.`stationRoute.station` = b.id ORDER BY a.`stationRoute.stationRouteCode` ASC", nativeQuery=true)
87 91 List<Object[]> findPoints(int line,int directions);
... ... @@ -149,29 +153,33 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
149 153 " b.create_date AS stationCreateDate," +
150 154 " b.update_by AS stationUpdateBy," +
151 155 " b.update_date AS stationUpdateDate," +
152   - " a.stationRouteId,b.station_name as zdmc "+
153   - " FROM ( SELECT s.id AS stationRouteId," +
154   - " s.line AS stationRouteLine," +
155   - " s.station as stationRouteStation," +
156   - " s.station_name AS stationRouteName," +
157   - " s.station_route_code as stationRouteCode," +
158   - " s.line_code AS stationRouteLIneCode," +
159   - " s.station_mark AS stationRouteStationMark," +
160   - " s.out_station_nmber AS stationOutStationNmber," +
161   - " s.directions AS stationRoutedirections," +
162   - " s.distances AS stationRouteDistances," +
163   - " s.to_time AS stationRouteToTime," +
164   - " s.first_time AS staitonRouteFirstTime," +
165   - " s.end_time AS stationRouteEndTime," +
166   - " s.descriptions AS stationRouteDescriptions," +
167   - " s.destroy AS stationRouteDestroy," +
168   - " s.versions AS stationRouteVersions," +
169   - " s.create_by AS stationRouteCreateBy," +
170   - " s.create_date AS stationRouteCreateDate," +
171   - " s.update_by AS stationRouteUpdateBy," +
172   - " s.update_date AS stationRouteUpdateDate FROM bsth_c_stationroute s WHERE s.station_route_code =(" +
173   - "select MIN(station_route_code) as stationRouteCode from bsth_c_stationroute r WHERE " +
174   - "r.line=?1 and r.directions =?2 and station_route_code > ?3 and r.destroy = 0 ) and s.line=?1 and s.directions = ?2 AND s.destroy = 0) a " +
  156 + " a.stationRouteId, " +
  157 + " b.station_name as zdmc, " +
  158 + " a.industryCode"+
  159 + " FROM " +
  160 + "( SELECT s.id AS stationRouteId," +
  161 + " s.line AS stationRouteLine," +
  162 + " s.station as stationRouteStation," +
  163 + " s.station_name AS stationRouteName," +
  164 + " s.station_route_code as stationRouteCode," +
  165 + " s.industry_code as industryCode," +
  166 + " s.line_code AS stationRouteLIneCode," +
  167 + " s.station_mark AS stationRouteStationMark," +
  168 + " s.out_station_nmber AS stationOutStationNmber," +
  169 + " s.directions AS stationRoutedirections," +
  170 + " s.distances AS stationRouteDistances," +
  171 + " s.to_time AS stationRouteToTime," +
  172 + " s.first_time AS staitonRouteFirstTime," +
  173 + " s.end_time AS stationRouteEndTime," +
  174 + " s.descriptions AS stationRouteDescriptions," +
  175 + " s.destroy AS stationRouteDestroy," +
  176 + " s.versions AS stationRouteVersions," +
  177 + " s.create_by AS stationRouteCreateBy," +
  178 + " s.create_date AS stationRouteCreateDate," +
  179 + " s.update_by AS stationRouteUpdateBy," +
  180 + " s.update_date AS stationRouteUpdateDate FROM bsth_c_stationroute s WHERE s.station_route_code =(" +
  181 + "select MIN(station_route_code) as stationRouteCode from bsth_c_stationroute r WHERE " +
  182 + "r.line=?1 and r.directions =?2 and station_route_code > ?3 and r.destroy = 0 ) and s.line=?1 and s.directions = ?2 AND s.destroy = 0) a " +
175 183 " LEFT JOIN bsth_c_station b ON a.stationRouteStation = b.id", nativeQuery=true)
176 184 List<Object[]> findDownStationRoute(Integer id,Integer direction,Integer stationRouteCode);
177 185  
... ... @@ -278,27 +286,30 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
278 286 " b.create_date AS stationCreateDate," +
279 287 " b.update_by AS stationUpdateBy," +
280 288 " b.update_date AS stationUpdateDate," +
281   - " a.stationRouteId,b.station_name as zdmc "+
282   - " FROM ( SELECT s.id AS stationRouteId," +
283   - " s.line AS stationRouteLine," +
284   - " s.station as stationRouteStation," +
285   - " s.station_name AS stationRouteName," +
286   - " s.station_route_code as stationRouteCode," +
287   - " s.line_code AS stationRouteLIneCode," +
288   - " s.station_mark AS stationRouteStationMark," +
289   - " s.out_station_nmber AS stationOutStationNmber," +
290   - " s.directions AS stationRoutedirections," +
291   - " s.distances AS stationRouteDistances," +
292   - " s.to_time AS stationRouteToTime," +
293   - " s.first_time AS staitonRouteFirstTime," +
294   - " s.end_time AS stationRouteEndTime," +
295   - " s.descriptions AS stationRouteDescriptions," +
296   - " s.destroy AS stationRouteDestroy," +
297   - " s.versions AS stationRouteVersions," +
298   - " s.create_by AS stationRouteCreateBy," +
299   - " s.create_date AS stationRouteCreateDate," +
300   - " s.update_by AS stationRouteUpdateBy," +
301   - " s.update_date AS stationRouteUpdateDate FROM bsth_c_stationroute s WHERE s.id = ?1 ) a " +
  289 + " a.stationRouteId,b.station_name as zdmc, " +
  290 + " a.industryCode "+
  291 + " FROM " +
  292 + "( SELECT s.id AS stationRouteId," +
  293 + " s.line AS stationRouteLine," +
  294 + " s.station as stationRouteStation," +
  295 + " s.station_name AS stationRouteName," +
  296 + " s.station_route_code as stationRouteCode," +
  297 + " s.industry_code as industryCode," +
  298 + " s.line_code AS stationRouteLIneCode," +
  299 + " s.station_mark AS stationRouteStationMark," +
  300 + " s.out_station_nmber AS stationOutStationNmber," +
  301 + " s.directions AS stationRoutedirections," +
  302 + " s.distances AS stationRouteDistances," +
  303 + " s.to_time AS stationRouteToTime," +
  304 + " s.first_time AS staitonRouteFirstTime," +
  305 + " s.end_time AS stationRouteEndTime," +
  306 + " s.descriptions AS stationRouteDescriptions," +
  307 + " s.destroy AS stationRouteDestroy," +
  308 + " s.versions AS stationRouteVersions," +
  309 + " s.create_by AS stationRouteCreateBy," +
  310 + " s.create_date AS stationRouteCreateDate," +
  311 + " s.update_by AS stationRouteUpdateBy," +
  312 + " s.update_date AS stationRouteUpdateDate FROM bsth_c_stationroute s WHERE s.id = ?1 ) a " +
302 313 " LEFT JOIN bsth_c_station b ON a.stationRouteStation = b.id", nativeQuery=true)
303 314 List<Object[]> findStationRouteInfo(Integer id);
304 315  
... ... @@ -348,27 +359,30 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
348 359 " b.create_date AS stationCreateDate," +
349 360 " b.update_by AS stationUpdateBy," +
350 361 " b.update_date AS stationUpdateDate," +
351   - " a.stationRouteId,b.station_name as zdmc "+
  362 + " a.stationRouteId," +
  363 + "b.station_name as zdmc, "+
  364 + "a.industryCode "+
352 365 " FROM ( SELECT s.id AS stationRouteId," +
353   - " s.line AS stationRouteLine," +
354   - " s.station as stationRouteStation," +
355   - " s.station_name AS stationRouteName," +
356   - " s.station_route_code as stationRouteCode," +
357   - " s.line_code AS stationRouteLIneCode," +
358   - " s.station_mark AS stationRouteStationMark," +
359   - " s.out_station_nmber AS stationOutStationNmber," +
360   - " s.directions AS stationRoutedirections," +
361   - " s.distances AS stationRouteDistances," +
362   - " s.to_time AS stationRouteToTime," +
363   - " s.first_time AS staitonRouteFirstTime," +
364   - " s.end_time AS stationRouteEndTime," +
365   - " s.descriptions AS stationRouteDescriptions," +
366   - " s.destroy AS stationRouteDestroy," +
367   - " s.versions AS stationRouteVersions," +
368   - " s.create_by AS stationRouteCreateBy," +
369   - " s.create_date AS stationRouteCreateDate," +
370   - " s.update_by AS stationRouteUpdateBy," +
371   - " s.update_date AS stationRouteUpdateDate FROM bsth_c_stationroute s WHERE s.line = ?1 and s.directions = ?2 and s.destroy = 0) a " +
  366 + " s.line AS stationRouteLine," +
  367 + " s.station as stationRouteStation," +
  368 + " s.station_name AS stationRouteName," +
  369 + " s.station_route_code as stationRouteCode," +
  370 + " s.industry_code as industryCode," +
  371 + " s.line_code AS stationRouteLIneCode," +
  372 + " s.station_mark AS stationRouteStationMark," +
  373 + " s.out_station_nmber AS stationOutStationNmber," +
  374 + " s.directions AS stationRoutedirections," +
  375 + " s.distances AS stationRouteDistances," +
  376 + " s.to_time AS stationRouteToTime," +
  377 + " s.first_time AS staitonRouteFirstTime," +
  378 + " s.end_time AS stationRouteEndTime," +
  379 + " s.descriptions AS stationRouteDescriptions," +
  380 + " s.destroy AS stationRouteDestroy," +
  381 + " s.versions AS stationRouteVersions," +
  382 + " s.create_by AS stationRouteCreateBy," +
  383 + " s.create_date AS stationRouteCreateDate," +
  384 + " s.update_by AS stationRouteUpdateBy," +
  385 + " s.update_date AS stationRouteUpdateDate FROM bsth_c_stationroute s WHERE s.line = ?1 and s.directions = ?2 and s.destroy = 0) a " +
372 386 " LEFT JOIN bsth_c_station b ON a.stationRouteStation = b.id order by a.stationRouteCode", nativeQuery=true)
373 387 List<Object[]> getStationRouteList(Integer lineId, Integer dir);
374 388  
... ...
src/main/java/com/bsth/repository/oil/CwjyRepository.java
... ... @@ -33,5 +33,22 @@ public interface CwjyRepository extends BaseRepository&lt;Cwjy, Integer&gt;{
33 33 @Query(value="select * from bsth_c_cwjy where nbbm like %?1% and gsdm like %?2% and fgsdm like %?3% and line =?4",nativeQuery=true)
34 34 List<Cwjy> selectAll_s(String nbbm,String gsdm,String fgsdm,String line);
35 35  
  36 +
  37 + @Query(value="SELECT jzl FROM bsth_c_ylxxb where gsdm = ?1 and yyrq = ?2 and nbbm = ?3 and jylx = '1' ",nativeQuery=true)
  38 + List<Double> import_queryBySame( String gsbm, String rq, String nbbm);
  39 +
  40 + @Transactional
  41 + @Modifying
  42 + @Query(value="INSERT INTO bsth_c_ylxxb("+
  43 + "gsdm, yyrq, nbbm, jsy, jzl, stationid, bz, createtime, nylx, jylx) " +
  44 + "VALUES(" +
  45 + "?1,str_to_date(?2,'%Y-%m-%d'),?3,?4,?5,?6,?7,str_to_date(?8,'%Y-%m-%d %H:%i:%s'), '0', '1') ", nativeQuery=true)
  46 + void import_insertData(String gsbm, String rq, String nbbm, String jsy, String jzl, String jyz, String remarks, String createtime);
  47 +
  48 + @Transactional
  49 + @Modifying
  50 + @Query(value="UPDATE bsth_c_ylxxb set jzl = ?1, jsy = ?2, stationid = ?3, bz = ?4 "
  51 + + "where gsdm = ?5 and yyrq = ?6 and nbbm = ?7 and jylx = '1' ",nativeQuery=true)
  52 + void import_UpdateJzl(String jzl, String jsy, String jyz, String remarks, String gsbm, String rq, String nbbm);
36 53  
37 54 }
... ...
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
... ... @@ -193,10 +193,10 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
193 193 List<ScheduleRealInfo> scheduleByDateAndLineYbb(String line,String date,String date2);
194 194  
195 195  
196   - @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,s.lpName as lpName,min(s.fcsj) as fcsj,min(s.realExecDate) as realExecDate ) from ScheduleRealInfo s where s.xlBm like %?1% and s.scheduleDateStr = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% and s.clZbh like %?5% GROUP BY xlBm,clZbh,jGh,scheduleDate,lpName ORDER BY clZbh,realExecDate,fcsj")
  196 + @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,s.lpName as lpName,min(CONCAT(s.realExecDate,' ',s.fcsj)) AS realExecDate ) from ScheduleRealInfo s where s.xlBm like %?1% and s.scheduleDateStr = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% and s.clZbh like %?5% GROUP BY xlBm,clZbh,jGh,scheduleDate,lpName ORDER BY clZbh,realExecDate")
197 197 List<Map<String,Object>> yesterdayDataList(String line,String date,String gsbm,String fgsbm,String nbbm);
198 198  
199   - @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,s.lpName as lpName,min(s.fcsj) as fcsj,min(s.realExecDate) as realExecDate ) from ScheduleRealInfo s where s.xlBm =?1 and s.scheduleDateStr = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% and s.clZbh like %?5% GROUP BY xlBm,clZbh,jGh,scheduleDate,lpName ORDER BY clZbh,realExecDate,fcsj")
  199 + @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,s.lpName as lpName,min(CONCAT(s.realExecDate,' ',s.fcsj)) AS realExecDate ) from ScheduleRealInfo s where s.xlBm =?1 and s.scheduleDateStr = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% and s.clZbh like %?5% GROUP BY xlBm,clZbh,jGh,scheduleDate,lpName ORDER BY clZbh,realExecDate")
200 200 List<Map<String,Object>> yesterdayDataList_eq(String line,String date,String gsbm,String fgsbm,String nbbm);
201 201  
202 202 @Query(value="select s from ScheduleRealInfo s where s.scheduleDateStr = ?1 ORDER BY xlBm,lpName,clZbh,xlDir")
... ...
src/main/java/com/bsth/repository/schedule/TTInfoBxDetailRepository.java
1   -package com.bsth.repository.schedule;
2   -
3   -import com.bsth.entity.schedule.TTInfoBxDetail;
4   -import com.bsth.repository.BaseRepository;
5   -import org.springframework.stereotype.Repository;
6   -
7   -@Repository
8   -public interface TTInfoBxDetailRepository extends BaseRepository<TTInfoBxDetail, Long> {
9   -
10   -}
  1 +package com.bsth.repository.schedule;
  2 +
  3 +import com.bsth.entity.schedule.TTInfoBxDetail;
  4 +import com.bsth.repository.BaseRepository;
  5 +import org.springframework.stereotype.Repository;
  6 +
  7 +@Repository
  8 +public interface TTInfoBxDetailRepository extends BaseRepository<TTInfoBxDetail, Long> {
  9 +
  10 +}
... ...
src/main/java/com/bsth/service/impl/RefuelServiceImpl.java
... ... @@ -13,6 +13,7 @@ import java.io.File;
13 13 import java.io.FileInputStream;
14 14 import java.math.BigDecimal;
15 15 import java.text.DecimalFormat;
  16 +import java.text.ParseException;
16 17 import java.text.SimpleDateFormat;
17 18 import java.util.ArrayList;
18 19 import java.util.Date;
... ... @@ -189,7 +190,7 @@ public class RefuelServiceImpl extends BaseServiceImpl&lt;Refuel, Long&gt; implements
189 190 realMileage = add(add(sjgl, ksgl), add(jccgl, ljgl));
190 191 }
191 192  
192   - if(r.getOutOil().length() > 0 && r.getInOil().length() > 0){
  193 + if(r.getOutOil() != null && r.getInOil() != null && r.getOutOil().length() > 0 && r.getInOil().length() > 0){
193 194 oil = new BigDecimal(r.getOutOil()).subtract(new BigDecimal(r.getInOil())).toString();
194 195 }
195 196 if(r.getInStation0().length() > 0){
... ... @@ -239,7 +240,10 @@ public class RefuelServiceImpl extends BaseServiceImpl&lt;Refuel, Long&gt; implements
239 240 public String importExcel(File file) {
240 241 SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
241 242 SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  243 + DecimalFormat df = new DecimalFormat("0.###");
  244 + List<Refuel> list = new ArrayList<Refuel>();
242 245 List<String> textList = new ArrayList<String>();
  246 + String msg = "";
243 247 try {
244 248 POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(file));
245 249 HSSFWorkbook wb = new HSSFWorkbook(fs);
... ... @@ -257,6 +261,7 @@ public class RefuelServiceImpl extends BaseServiceImpl&lt;Refuel, Long&gt; implements
257 261 userName = user.getUserName();
258 262 }
259 263  
  264 + //取值
260 265 for(int i = 1; i < rowNum; i++){
261 266 row = sheet.getRow(i);
262 267 if (row == null){
... ... @@ -280,6 +285,11 @@ public class RefuelServiceImpl extends BaseServiceImpl&lt;Refuel, Long&gt; implements
280 285 continue;
281 286 textList.add(text + ";");
282 287 }
  288 +
  289 + wb.close();
  290 + fs.close();
  291 +
  292 + //验证
283 293 for(int i = 0; i < textList.size(); i++){
284 294 String text = textList.get(i);
285 295 String[] split = text.split(",");
... ... @@ -301,25 +311,107 @@ public class RefuelServiceImpl extends BaseServiceImpl&lt;Refuel, Long&gt; implements
301 311 String outStation0 = split[12].trim();
302 312 String outStation10 = split[13].trim();
303 313  
304   - List<Refuel> list = repository.selectByDateAndCar(rq, line, car, driver);
305   - if(list.size() > 0){
306   - for(Refuel r : list){
307   - if(r.getId() != null){
308   - repository.update(r.getId(), rq, rq, line, car, driver, outOil, inOil, inStation0, inStation5,
309   - oilCard0, oilCard10, eastStation0, eastStation10, outStation0, outStation10, userName, sd.format(new Date()));
  314 + driver = driver.replace(".0", "");
  315 +
  316 + String l = "", obj = "";
  317 + try {
  318 + rq = sdf.format(sdf.parse(rq));
  319 +
  320 + if(outOil.length() != 0){
  321 + l = "E";obj = outOil;
  322 + outOil = df.format(new BigDecimal(outOil));
  323 + }
  324 + if(inOil.length() != 0){
  325 + l = "F";obj = inOil;
  326 + inOil = df.format(new BigDecimal(inOil));
  327 + }
  328 + if(inStation0.length() != 0){
  329 + l = "G";obj = inStation0;
  330 + inStation0 = df.format(new BigDecimal(inStation0));
  331 + }
  332 + if(inStation5.length() != 0){
  333 + l = "H";obj = inStation5;
  334 + inStation5 = df.format(new BigDecimal(inStation5));
  335 + }
  336 + if(oilCard0.length() != 0){
  337 + l = "I";obj = oilCard0;
  338 + oilCard0 = df.format(new BigDecimal(oilCard0));
  339 + }
  340 + if(oilCard10.length() != 0){
  341 + l = "J";obj = oilCard10;
  342 + oilCard10 = df.format(new BigDecimal(oilCard10));
  343 + }
  344 + if(eastStation0.length() != 0){
  345 + l = "K";obj = eastStation0;
  346 + eastStation0 = df.format(new BigDecimal(eastStation0));
  347 + }
  348 + if(eastStation10.length() != 0){
  349 + l = "L";obj = eastStation10;
  350 + eastStation10 = df.format(new BigDecimal(eastStation10));
  351 + }
  352 + if(outStation0.length() != 0){
  353 + l = "M";obj = outStation0;
  354 + outStation0 = df.format(new BigDecimal(outStation0));
  355 + }
  356 + if(outStation10.length() != 0){
  357 + l = "N";obj = outStation10;
  358 + outStation10 = df.format(new BigDecimal(outStation10));
  359 + }
  360 + } catch (ParseException e) {
  361 + // TODO: handle exception
  362 + msg += "\\n"+(i+2)+"行日期格式错误";
  363 + continue;
  364 + } catch (NumberFormatException e) {
  365 + // TODO: handle exception
  366 + msg += "\\n"+(i+2)+"行"+l+"列内容:“"+obj+"”数据异常或有误";
  367 + continue;
  368 + }
  369 +
  370 + Refuel r = new Refuel();
  371 + r.setDateStr(rq);
  372 + r.setLineName(line);
  373 + r.setCar(car);
  374 + r.setDriver(driver);
  375 + r.setOutOil(outOil);
  376 + r.setInOil(inOil);
  377 + r.setInStation0(inStation0);
  378 + r.setInStation5(inStation5);
  379 + r.setOilCard0(oilCard0);
  380 + r.setOilCard10(oilCard10);
  381 + r.setEastStation0(eastStation0);
  382 + r.setEastStation10(eastStation10);
  383 + r.setOutStation0(outStation0);
  384 + r.setOutStation10(outStation10);
  385 + list.add(r);
  386 + }
  387 +
  388 + //导入(msg是验证中产生的格式报错信息)
  389 + if(msg.length() == 0){
  390 + for(Refuel r : list){
  391 + if(msg.length() == 0){
  392 + List<Refuel> rs = repository.selectByDateAndCar(r.getDateStr(), r.getLineName(), r.getCar(), r.getDriver());
  393 + if(rs.size() > 0){
  394 + for(Refuel re : rs){
  395 + if(re.getId() != null){
  396 + repository.update(re.getId(), r.getDateStr(), r.getDateStr(), r.getLineName(), r.getCar(), r.getDriver(),
  397 + r.getOutOil(), r.getInOil(), r.getInStation0(), r.getInStation5(), r.getOilCard0(), r.getOilCard10(),
  398 + r.getEastStation0(), r.getEastStation10(), r.getOutStation0(), r.getOutStation10(), userName, sd.format(new Date()));
  399 + }
  400 + }
  401 + } else {
  402 + repository.insertData(r.getDateStr(), r.getDateStr(), r.getLineName(), r.getCar(), r.getDriver(),
  403 + r.getOutOil(), r.getInOil(), r.getInStation0(), r.getInStation5(), r.getOilCard0(), r.getOilCard10(),
  404 + r.getEastStation0(), r.getEastStation10(), r.getOutStation0(), r.getOutStation10(), userName, sd.format(new Date()));
310 405 }
311 406 }
312   - } else {
313   - repository.insertData(rq, rq, line, car, driver, outOil, inOil, inStation0, inStation5, oilCard0, oilCard10,
314   - eastStation0, eastStation10, outStation0, outStation10, userName, sd.format(new Date()));
315 407 }
  408 + } else {
  409 + throw new Exception();
316 410 }
317   - wb.close();
318   - fs.close();
319 411 } catch (Exception e) {
320 412 // TODO Auto-generated catch block
321 413 e.printStackTrace();
322   - return "文件导入失败";
  414 + return "文件导入失败" + msg;
323 415 } finally {
324 416 file.delete();
325 417 }
... ...
src/main/java/com/bsth/service/impl/StationRouteServiceImpl.java
... ... @@ -275,6 +275,8 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
275 275 tempM.put("stationVersions", stationList.get(i)[30]);
276 276 // 站点说明
277 277 tempM.put("stationDescriptions", stationList.get(i)[31]);
  278 + // 行业标准
  279 + tempM.put("industryCode", stationList.get(i)[32]);
278 280 tempM.put("zdmc", stationList.get(i)[3]);
279 281 tempM.put("text", stationList.get(i)[3]);
280 282 tempM.put("icon", "fa fa-bus");
... ... @@ -603,6 +605,8 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
603 605  
604 606 tempM.put("stationRouteId", objects.get(i)[39]);
605 607 tempM.put("zdmc", objects.get(i)[40]);
  608 + // 行业编码
  609 + tempM.put("industryCode", objects.get(i)[41]);
606 610  
607 611 resultList.add(tempM);
608 612 }
... ... @@ -1406,6 +1410,8 @@ public class StationRouteServiceImpl extends BaseServiceImpl&lt;StationRoute, Integ
1406 1410  
1407 1411 // 站点说明
1408 1412 tempM.put("stationDescriptions", stationList.get(i)[31]);
  1413 + // 行业编码
  1414 + tempM.put("industryCode", stationList.get(i)[32]);
1409 1415  
1410 1416 staitonRouteList.add(tempM);
1411 1417 }
... ...
src/main/java/com/bsth/service/impl/StationServiceImpl.java
... ... @@ -759,6 +759,8 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
759 759 Integer stationId = null;
760 760 // 站点名称
761 761 String zdmc = map.get("zdmc").equals("") ? "" : map.get("zdmc").toString();
  762 + // 行业编码
  763 + String industryCode = map.get("industryCode").equals("") ? "" : map.get("industryCode").toString();
762 764 // 方向
763 765 Integer directions = map.get("directions").equals("") ? null : Integer.parseInt(map.get("directions").toString());
764 766 // 原坐标点
... ... @@ -860,6 +862,7 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
860 862 // 线路
861 863 arg0.setLine(resultLine);
862 864 arg0.setLineCode(resultLine.getLineCode());
  865 + arg0.setIndustryCode(industryCode);
863 866 // 站点
864 867 arg0.setStation(station);
865 868 // 站点路由名称
... ... @@ -900,8 +903,8 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
900 903 public Map<String, Object> stationCacheSave(Map<String, Object> map) {
901 904 Map<String, Object> resultMap = new HashMap<String, Object>();
902 905 try {
903   - // 站点编码
904   - String stationCod = "";
  906 + // 站点编码 , 行业编码
  907 + String stationCod = "",industryCode = "";
905 908 // 站点ID
906 909 Integer stationId = null;
907 910 // 站点名称
... ... @@ -986,6 +989,8 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
986 989 }
987 990 Station station = repository.findOne(stationId);
988 991 StationRouteCache arg0 = new StationRouteCache();
  992 + // 行业编码
  993 + industryCode = map.get("industryCode").equals("") ? "" : map.get("industryCode").toString();
989 994 // 距离
990 995 Double distances = map.get("distances").equals("") ? 0.0d : Double.parseDouble(map.get("distances").toString());
991 996 // 时间
... ... @@ -1012,6 +1017,8 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
1012 1017 arg0.setLineCode(resultLine.getLineCode());
1013 1018 // 站点
1014 1019 arg0.setStation(station);
  1020 + // 行业编码
  1021 + arg0.setIndustryCode(industryCode);
1015 1022 // 站点路由名称
1016 1023 arg0.setStationName(stationName);
1017 1024 // 站点路由编码
... ... @@ -1064,6 +1071,7 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
1064 1071 // 站点Id
1065 1072 Integer stationId = map.get("stationId").equals("") ? null : Integer.parseInt(map.get("stationId").toString());
1066 1073 String stationCod = map.get("stationCod").equals("") ? "" : map.get("stationCod").toString();
  1074 + String industryCode = map.get("industryCode").equals("") ? "" : map.get("industryCode").toString();
1067 1075 String zdmc = map.get("zdmc").equals("") ? "" : map.get("zdmc").toString();
1068 1076 // 站点名称
1069 1077 String stationRouteName = map.get("stationName").equals("") ? "" : map.get("stationName").toString();
... ... @@ -1158,6 +1166,7 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
1158 1166 stationRoute.setStationRouteCode(stationRouteCode);
1159 1167 stationRoute.setStation(station);
1160 1168 stationRoute.setStationCode(station.getStationCod());
  1169 + stationRoute.setIndustryCode(industryCode);
1161 1170 stationRoute.setLine(line);
1162 1171 stationRoute.setLineCode(line.getLineCode());
1163 1172 stationRoute.setStationMark(stationMark);
... ... @@ -1799,6 +1808,8 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
1799 1808 Integer stationId = map.get("stationId").equals("") ? null : Integer.parseInt(map.get("stationId").toString());
1800 1809 String stationCod = map.get("stationCod").equals("") ? "" : map.get("stationCod").toString();
1801 1810 String zdmc = map.get("zdmc").equals("") ? "" : map.get("zdmc").toString();
  1811 + // 行业编码
  1812 + String industryCode = map.get("industryCode").equals("") ? "" : map.get("industryCode").toString();
1802 1813 // 站点路由名称
1803 1814 String stationName = map.get("stationName").equals("") ? "" : map.get("stationName").toString();
1804 1815 // 所在道路编码
... ... @@ -1890,6 +1901,7 @@ public class StationServiceImpl extends BaseServiceImpl&lt;Station, Integer&gt; implem
1890 1901 stationRoute.setStationName(stationName);
1891 1902 stationRoute.setId(stationRouteId);
1892 1903 stationRoute.setStationRouteCode(stationRouteCode);
  1904 + stationRoute.setIndustryCode(industryCode);
1893 1905 stationRoute.setStation(station);
1894 1906 stationRoute.setStationCode(station.getStationCod());
1895 1907 stationRoute.setLine(line);
... ...
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
... ... @@ -154,7 +154,7 @@ public class TrafficManageServiceImpl implements TrafficManageService{
154 154 // 密码
155 155 private final String passwordUp = "user";
156 156 // 接收邮件人
157   - private final String emailSendToAddress = "175912183@qq.com";
  157 + private final String emailSendToAddress = "113252620@qq.com";
158 158 // 记录路单上线的成功、失败线路数
159 159 private Integer countSuccess,countFailure;
160 160  
... ...
src/main/java/com/bsth/service/oil/CwjyService.java
1 1 package com.bsth.service.oil;
2 2  
3 3  
  4 +import java.io.File;
4 5 import java.util.List;
5 6 import java.util.Map;
6 7  
... ... @@ -18,4 +19,6 @@ public interface CwjyService extends BaseService&lt;Cwjy, Integer&gt;{
18 19 Map<String, Object> savejzl(Map<String, Object> map) throws Exception ;
19 20  
20 21 int checkNbbm(Cwjy t);
  22 +
  23 + public String importExcel(File file, String gsbm_, String gsName);
21 24 }
... ...
src/main/java/com/bsth/service/oil/impl/CwjyServiceImpl.java
1 1 package com.bsth.service.oil.impl;
2 2  
  3 +import java.io.File;
  4 +import java.io.FileInputStream;
3 5 import java.sql.ResultSet;
4 6 import java.sql.SQLException;
  7 +import java.text.DecimalFormat;
5 8 import java.text.ParseException;
6 9 import java.text.SimpleDateFormat;
7 10 import java.util.ArrayList;
... ... @@ -14,6 +17,11 @@ import java.util.Map;
14 17 import javax.transaction.Transactional;
15 18  
16 19 import org.apache.commons.lang3.StringEscapeUtils;
  20 +import org.apache.poi.hssf.usermodel.HSSFCell;
  21 +import org.apache.poi.hssf.usermodel.HSSFRow;
  22 +import org.apache.poi.hssf.usermodel.HSSFSheet;
  23 +import org.apache.poi.hssf.usermodel.HSSFWorkbook;
  24 +import org.apache.poi.poifs.filesystem.POIFSFileSystem;
17 25 import org.slf4j.Logger;
18 26 import org.slf4j.LoggerFactory;
19 27 import org.springframework.beans.factory.annotation.Autowired;
... ... @@ -457,5 +465,80 @@ public class CwjyServiceImpl extends BaseServiceImpl&lt;Cwjy,Integer&gt; implements Cw
457 465 }
458 466  
459 467  
460   -
  468 + @Override
  469 + public String importExcel(File file, String gsbm, String gsName) {
  470 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  471 + SimpleDateFormat sd = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  472 + DecimalFormat df = new DecimalFormat("######0.00");
  473 + List<String> textList = new ArrayList<String>();
  474 + try {
  475 + POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(file));
  476 + HSSFWorkbook wb = new HSSFWorkbook(fs);
  477 + HSSFSheet sheet = wb.getSheetAt(0);
  478 + // 取得总行数
  479 + int rowNum = sheet.getLastRowNum() + 1;
  480 + // 取得总列数
  481 + int cellNum = sheet.getRow(0).getLastCellNum();
  482 + HSSFRow row = null;
  483 + HSSFCell cell = null;
  484 + for(int i = 2; i < rowNum; i++){
  485 + row = sheet.getRow(i);
  486 + if (row == null){
  487 + continue;
  488 + }
  489 + String text = "";
  490 + for(int j = 0; j < cellNum; j++){
  491 + cell = row.getCell(j);
  492 + if(cell == null){
  493 + text += ",";
  494 + continue;
  495 + }
  496 + text += String.valueOf(cell) + ",";
  497 + }
  498 + String[] split = (text+";").split(",");
  499 + String str = "";
  500 + for(int j = 0; j < split.length && j < 5; j++){
  501 + str += split[j];
  502 + }
  503 + if(str.trim().length() == 0){
  504 + continue;
  505 + }
  506 + textList.add(text + ";");
  507 + }
  508 + for(int i = 0; i < textList.size(); i++){
  509 + String text = textList.get(i);
  510 + System.out.println(text);
  511 + String[] split = text.split(",");
  512 + String rq = split[0].trim();
  513 + String nbbm = split[1].trim();
  514 + String jsy = split[2].trim();
  515 + double jzl = Double.valueOf(split[3].trim().length()!=0?split[3]:"0");
  516 + String jyz = split[4].trim();
  517 + String remarks = split[5].trim();
  518 + if(rq.trim().length() == 0){
  519 + rq = sdf.format(new Date());
  520 + }
  521 +
  522 + List<Double> jzl_ = repository.import_queryBySame(gsbm, rq, nbbm);
  523 +//
  524 + if(jzl_.size() == 0){
  525 + repository.import_insertData(gsbm, rq, nbbm, jsy,
  526 + df.format(jzl), jyz, remarks, sd.format(new Date()));
  527 + }else{
  528 + repository.import_UpdateJzl(df.format(jzl), jsy, jyz, remarks, gsbm, rq, nbbm);
  529 + }
  530 + }
  531 + wb.close();
  532 + fs.close();
  533 + } catch (Exception e) {
  534 + // TODO Auto-generated catch block
  535 + e.printStackTrace();
  536 + return "文件导入失败";
  537 + } finally {
  538 + file.delete();
  539 + }
  540 + return "文件导入成功";
  541 + }
  542 +
  543 +
461 544 }
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -3961,6 +3961,10 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3961 3961 String clZbh = yesterdayDataList.get(x).get("clZbh").toString();
3962 3962 String xlbm = yesterdayDataList.get(x).get("xlBm").toString();
3963 3963 String lp = yesterdayDataList.get(x).get("lpName").toString();
  3964 + String realExecDate=yesterdayDataList.get(x).get("realExecDate").toString();
  3965 + String fcsj[] =realExecDate.split(" ");
  3966 + //取出最小计划发车时间
  3967 + yesterdayDataList.get(x).put("fcsj", fcsj[1]);
3964 3968 Map<String, Object> map = new HashMap<String, Object>();
3965 3969 boolean fage = true;
3966 3970 String company = "";
... ...
src/main/java/com/bsth/service/report/ReportService.java
... ... @@ -59,4 +59,6 @@ public interface ReportService {
59 59 Map<String, Object> online(Map<String, Object> map);
60 60  
61 61 List<Singledata> singledatatj(Map<String, Object> map);
  62 +
  63 + List<Map<String,Object>> singleEnergy(Map<String, Object> map);
62 64 }
... ...
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -11,12 +11,14 @@ import com.bsth.entity.oil.Dlb;
11 11 import com.bsth.entity.oil.Ylb;
12 12 import com.bsth.entity.realcontrol.ChildTaskPlan;
13 13 import com.bsth.entity.realcontrol.ScheduleRealInfo;
  14 +import com.bsth.entity.sys.Dictionary;
14 15 import com.bsth.entity.sys.Interval;
15 16 import com.bsth.repository.LineRepository;
16 17 import com.bsth.repository.StationRouteRepository;
17 18 import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
18 19 import com.bsth.service.report.CulateMileageService;
19 20 import com.bsth.service.report.ReportService;
  21 +import com.bsth.service.sys.DictionaryService;
20 22 import com.bsth.util.Arith;
21 23 import com.bsth.util.ComparableChild;
22 24 import com.bsth.util.ComparableJob;
... ... @@ -71,7 +73,8 @@ public class ReportServiceImpl implements ReportService{
71 73 StationRouteRepository stationRouteRepository;
72 74 @Autowired
73 75 CulateMileageService culateMileageService;
74   -
  76 + @Autowired
  77 + DictionaryService dictionaryService;
75 78  
76 79 @Override
77 80 public List<ScheduleRealInfo> queryListBczx(String line, String date,String clzbh) {
... ... @@ -3586,7 +3589,7 @@ public class ReportServiceImpl implements ReportService{
3586 3589 if(fgsdm.length() != 0){
3587 3590 sql += " and r.fgs_bm ='"+fgsdm+"'";
3588 3591 }
3589   - sql += " group by r.j_gh,r.xl_bm,r.cl_zbh order by r.xl_bm,r.cl_zbh";
  3592 + sql += " group by r.j_gh,r.xl_bm,r.cl_zbh,r.fgs_bm order by r.xl_bm,r.cl_zbh";
3590 3593  
3591 3594 list = jdbcTemplate.query(sql, new RowMapper<Singledata>() {
3592 3595 @Override
... ... @@ -3927,8 +3930,312 @@ public class ReportServiceImpl implements ReportService{
3927 3930 }
3928 3931 return list_;
3929 3932 }
  3933 +
  3934 + @Override
  3935 + public List<Map<String, Object>> singleEnergy(Map<String, Object> map) {
  3936 + // TODO Auto-generated method stub
  3937 + Map<String, Map<String,Object>> mm=new HashMap<String, Map<String,Object>>();
  3938 +
  3939 + String gsdm="";
  3940 + if(map.get("gs")!=null){
  3941 + gsdm=map.get("gs").toString();
  3942 + }
  3943 + String fgsdm="";
  3944 + if(map.get("fgs")!=null){
  3945 + fgsdm=map.get("fgs").toString();
  3946 + }
  3947 + String energy="";
  3948 + if(map.get("energy")!=null){
  3949 + energy=map.get("energy").toString();
  3950 + }
  3951 + String xlbm="";
  3952 + if(map.get("line")!=null){
  3953 + xlbm=map.get("line").toString().trim();
  3954 + }
  3955 + String date = map.get("date").toString();
3930 3956  
  3957 + List<ScheduleRealInfo> listReal=new ArrayList<ScheduleRealInfo>();
  3958 + if(xlbm.equals("")){
  3959 + listReal=scheduleRealInfoRepository.scheduleByDateAndLineByGs_(gsdm, fgsdm,date);
  3960 + }else{
  3961 + listReal=scheduleRealInfoRepository.scheduleByDateAndLineQp(xlbm, date);
  3962 + }
  3963 +
  3964 + String sql="select r.j_gh, r.xl_bm,r.cl_zbh,r.lp_name "
  3965 + + " from bsth_c_s_sp_info_real r where "
  3966 + + " r.schedule_date_str = '"+date+"'";
  3967 + if(xlbm.length() != 0){
  3968 + sql += " and r.xl_bm = '"+xlbm+"'";
  3969 + }
  3970 + if(gsdm.length() != 0){
  3971 + sql += " and r.gs_bm ='"+gsdm+"'";
  3972 + }
  3973 + if(fgsdm.length() != 0){
  3974 + sql += " and r.fgs_bm ='"+fgsdm+"'";
  3975 + }
  3976 + sql += " group by r.j_gh,r.xl_bm,r.cl_zbh,r.lp_name order by r.xl_bm,r.cl_zbh,r.lp_name";
  3977 +
  3978 +
  3979 + List<Map<String, Object>> list = jdbcTemplate.query(sql, new RowMapper<Map<String,Object>>() {
  3980 + @Override
  3981 + public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException {
  3982 + Map<String, Object> m=new HashMap<String, Object>();
  3983 + m.put("jGh", arg0.getString("j_gh"));
  3984 + m.put("xlBm", arg0.getString("xl_bm"));
  3985 + m.put("clZbh", arg0.getString("cl_zbh"));
  3986 + m.put("lpName", arg0.getString("lp_name"));
  3987 + return m;
  3988 + }
  3989 + });
  3990 +
  3991 + for (int i = 0; i < list.size(); i++) {
  3992 + Map<String, Object> m=list.get(i);
  3993 + String jGh=m.get("jGh").toString();
  3994 + String xlBm=m.get("xlBm").toString();
  3995 + String clZbh=m.get("clZbh").toString();
  3996 + String lpName=m.get("lpName").toString();
  3997 + List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
  3998 + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>();
  3999 + String sGh="";
  4000 + String sName="";
  4001 + String jName="";
  4002 + String xlName="";
  4003 + for (int j = 0; j < listReal.size(); j++) {
  4004 + ScheduleRealInfo s=listReal.get(j);
  4005 + if(s.getjGh().equals(jGh)
  4006 + && s.getClZbh().equals(clZbh)
  4007 + &&s.getXlBm().equals(xlBm)
  4008 + &&s.getLpName().equals(lpName)){
  4009 + newList.add(s);
  4010 + if(jName.equals("")){
  4011 + jName=s.getjName();
  4012 + xlName=s.getXlName();
  4013 + }
  4014 + if(sGh.equals("")){
  4015 + if(!StringUtils.isEmpty(s.getsGh())){
  4016 + sGh=s.getsGh();
  4017 + sName=s.getsName();
  4018 + }
  4019 + }
  4020 + Set<ChildTaskPlan> cts = s.getcTasks();
  4021 + if(cts != null && cts.size() > 0){
  4022 + newList_.add(s);
  4023 + }else{
  4024 + if(s.getZdsjActual()!=null && s.getFcsjActual()!=null){
  4025 + newList_.add(s);
  4026 + }
  4027 + }
  4028 + }
  4029 + }
  4030 + double yygl=culateMileageService.culateSjgl(newList_);
  4031 + double ljgl=culateMileageService.culateLjgl(newList_);
  4032 + double ksgl=culateMileageService.culateKsgl(newList_);
  4033 + double jcgl=culateMileageService.culateJccgl(newList_);
  4034 + double zyygl=Arith.add(yygl, ljgl);
  4035 + double zksgl=Arith.add(ksgl, jcgl);
  4036 + double zlc=Arith.add(zyygl, zksgl);
  4037 + Map<String, Object> m_=new HashMap<String, Object>();
  4038 + m_.put("zlc", zlc);
  4039 + m_.put("zksgl", zksgl);
  4040 + m_.put("sGh", sGh);
  4041 + m_.put("sName", sName);
  4042 + m_.put("jGh", jGh);
  4043 + m_.put("jName", jName);
  4044 + m_.put("xlName", xlName);
  4045 + mm.put(xlBm+jGh+clZbh+lpName, m_);
  4046 + }
  4047 + List<Map<String, Object>> listAll=new ArrayList<Map<String,Object>>();
  4048 + if(energy.equals("1")){
  4049 + //油统计
  4050 + String ylbSql="select ssgsdm,fgsdm,xlbm,nbbm,jsy,ifnull(lp,'') as lp,czlc,"
  4051 + + " czyl,jzl,jzlc,jzyl,yh,sh,shyy,rylx,ns,zlc,linename,jname "
  4052 + + " from bsth_c_ylb where rq='"+date+"'";
  4053 +
  4054 + if(xlbm.length() != 0){
  4055 + ylbSql += " and xlbm = '"+xlbm+"'";
  4056 + }
  4057 + if(gsdm.length() != 0){
  4058 + ylbSql += " and ssgsdm ='"+gsdm+"'";
  4059 + }
  4060 + if(fgsdm.length() != 0){
  4061 + ylbSql += " and fgsdm ='"+fgsdm+"'";
  4062 + }
  4063 + ylbSql += " order by xlbm,nbbm,jcsx";
  4064 + listAll = jdbcTemplate.query(ylbSql, new RowMapper<Map<String,Object>>() {
  4065 + @Override
  4066 + public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException {
  4067 + Map<String, Object> m=new HashMap<String, Object>();
  4068 + m.put("ssgsdm", arg0.getString("ssgsdm"));
  4069 + m.put("fgsdm", arg0.getString("fgsdm"));
  4070 + m.put("xlbm", arg0.getString("xlbm"));
  4071 + m.put("nbbm", arg0.getString("nbbm"));
  4072 + m.put("jsy", arg0.getString("jsy"));
  4073 + m.put("lp", arg0.getString("lp"));
  4074 + m.put("czlc", arg0.getDouble("czlc"));
  4075 + m.put("czyl", arg0.getDouble("czyl"));
  4076 + m.put("jzl", arg0.getDouble("jzl"));
  4077 + m.put("jzlc", arg0.getDouble("jzlc"));
  4078 + m.put("jzyl", arg0.getDouble("jzyl"));
  4079 + m.put("yh", arg0.getDouble("yh"));
  4080 + m.put("sh", arg0.getDouble("sh"));
  4081 + m.put("shyy", arg0.getString("shyy"));
  4082 + m.put("rylx", arg0.getString("rylx"));
  4083 + m.put("ns", arg0.getDouble("ns"));
  4084 + m.put("zlc", arg0.getDouble("zlc"));
  4085 + m.put("linename", arg0.getString("linename"));
  4086 + m.put("jname", arg0.getString("jname"));
  4087 + if(arg0.getDouble("zlc")==0){
  4088 + m.put("bglyh", "0.00");
  4089 + }else{
  4090 + DecimalFormat df = new DecimalFormat("0.00");
  4091 + m.put("bglyh", df.format(arg0.getDouble("yh")/arg0.getDouble("zlc")*100));
  4092 + }
  4093 + m.put("gsName", BasicData.businessCodeNameMap.get(arg0.getString("ssgsdm")));
  4094 + m.put("fgsName", BasicData.businessFgsCodeNameMap.get(arg0.getString("fgsdm")+"_"+arg0.getString("ssgsdm")));
  4095 + return m;
  4096 + }
  4097 + });
  4098 +
  4099 + }else{
  4100 + //电统计
  4101 + String dlbSql="select ssgsdm,fgsdm,xlbm,nbbm,jsy,ifnull(lp,'') as lp,czlc,"
  4102 + + " czcd,cdl,jzlc,jzcd,hd,sh,shyy,ns,zlc,linename,jname "
  4103 + + " from bsth_c_dlb where rq='"+date+"'";
  4104 + if(xlbm.length() != 0){
  4105 + dlbSql += " and xlbm = '"+xlbm+"'";
  4106 + }
  4107 + if(gsdm.length() != 0){
  4108 + dlbSql += " and ssgsdm ='"+gsdm+"'";
  4109 + }
  4110 + if(fgsdm.length() != 0){
  4111 + dlbSql += " and fgsdm ='"+fgsdm+"'";
  4112 + }
  4113 + dlbSql += " order by xlbm,nbbm,jcsx";
  4114 + listAll = jdbcTemplate.query(dlbSql, new RowMapper<Map<String,Object>>() {
  4115 + @Override
  4116 + public Map<String, Object> mapRow(ResultSet arg0, int arg1) throws SQLException {
  4117 + Map<String, Object> m=new HashMap<String, Object>();
  4118 + m.put("ssgsdm", arg0.getString("ssgsdm"));
  4119 + m.put("fgsdm", arg0.getString("fgsdm"));
  4120 + m.put("xlbm", arg0.getString("xlbm"));
  4121 + m.put("nbbm", arg0.getString("nbbm"));
  4122 + m.put("jsy", arg0.getString("jsy"));
  4123 + m.put("lp", arg0.getString("lp"));
  4124 + m.put("czlc", arg0.getDouble("czlc"));
  4125 + m.put("czcd", arg0.getDouble("czcd"));
  4126 + m.put("cdl", arg0.getDouble("cdl"));
  4127 + m.put("jzlc", arg0.getDouble("jzlc"));
  4128 + m.put("jzcd", arg0.getDouble("jzcd"));
  4129 + m.put("hd", arg0.getDouble("hd"));
  4130 + m.put("sh", arg0.getDouble("sh"));
  4131 + m.put("shyy", arg0.getString("shyy"));
  4132 + m.put("linename", arg0.getString("linename"));
  4133 + m.put("jname", arg0.getString("jname"));
  4134 + m.put("zlc", arg0.getDouble("zlc"));
  4135 + //电量统计中添加默认中 燃油类型,尿素,保证导出模板相同
  4136 + m.put("rylx", "");
  4137 + m.put("ns", "0");
  4138 + if(arg0.getDouble("zlc")==0){
  4139 + m.put("bglyh", "0.00");
  4140 + }else{
  4141 + DecimalFormat df = new DecimalFormat("0.00");
  4142 + m.put("bglyh", df.format(arg0.getDouble("hd")/arg0.getDouble("zlc")*100));
  4143 + }
  4144 + m.put("gsName", BasicData.businessCodeNameMap.get(arg0.getString("ssgsdm")));
  4145 + m.put("fgsName", BasicData.businessFgsCodeNameMap.get(arg0.getString("fgsdm")+"_"+arg0.getString("ssgsdm")));
  4146 + return m;
  4147 + }
  4148 + });
  4149 + }
  4150 +
  4151 + Map<String, Object> dMap=new HashMap<>();
  4152 + dMap.put("dGroup_eq", "oilType");
  4153 + Iterator<Dictionary> it= dictionaryService.list(dMap).iterator();
  4154 + while (it.hasNext()) {
  4155 + Dictionary d=it.next();
  4156 + dMap.put(d.getdCode(), d.getdName());
  4157 + }
  4158 + for (int i = 0; i < listAll.size(); i++) {
  4159 + Map<String, Object> m=listAll.get(i);
  4160 + String jGh=m.get("jsy").toString();
  4161 + String xlBm=m.get("xlbm").toString();
  4162 + String clZbh=m.get("nbbm").toString();
  4163 + String lpName=m.get("lp")==null?"":m.get("lp").toString();
  4164 + String shyy=m.get("shyy")==null?"":m.get("shyy").toString();
  4165 + String rylx=m.get("rylx")==null?"":m.get("rylx").toString();
  4166 + if(dMap.get(rylx)==null){
  4167 + rylx="";
  4168 + }else{
  4169 + rylx=dMap.get(rylx).toString();
  4170 + }
  4171 + m.put("rylx", rylx);
  4172 + m.put("shyy", getShyy(shyy));
  4173 + m.put("date", date);
  4174 +
  4175 + if(mm.get(xlBm+jGh+clZbh+lpName)!=null){
  4176 + Map<String, Object> m_=mm.get(xlBm+jGh+clZbh+lpName);
  4177 + m.put("zlcAll", m_.get("zlc")==null?"":m_.get("zlc").toString());
  4178 + m.put("zksgl", m_.get("zksgl")==null?"":m_.get("zksgl").toString());
  4179 + m.put("sGh", m_.get("sGh")==null?"":m_.get("sGh").toString());
  4180 + m.put("sName", m_.get("sName")==null?"":m_.get("sName").toString());
  4181 + m.put("jname", m_.get("jName")==null?"":m_.get("jName").toString());
  4182 + m.put("linename", m_.get("xlName")==null?"":m_.get("xlName").toString());
  4183 + }else{
  4184 + m.put("zlcAll", "");
  4185 + m.put("zksgl", "");
  4186 + m.put("sGh", "");
  4187 + m.put("sName", "");
  4188 + //油量表中历史数据和手动添加数据没有储存线路名字与驾驶员名字,是null的字段则根据编号查找
  4189 + if(m.get("linename")==null){
  4190 + m.put("linename", BasicData.lineCode2NameMap.get(xlBm));
  4191 + }
  4192 + if(m.get("jname")==null){
  4193 + m.put("jname", BasicData.allPerson.get(m.get("ssgsdm")+"-"+jGh));
  4194 + }
  4195 + }
  4196 + }
  4197 +
  4198 + if(map.get("type").toString().equals("export")){
  4199 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  4200 + Map<String, Object> m = new HashMap<String, Object>();
  4201 + m.put("date", date);
  4202 + ReportUtils ee = new ReportUtils();
  4203 + try {
  4204 + listI.add(listAll.iterator());
  4205 + if(energy.equals("1")){
  4206 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  4207 + ee.excelReplace(listI, new Object[]{m}, path + "mould/energy_ylb.xls",
  4208 + path + "export/"+date+"路单油量统计表.xls");
  4209 + }else{
  4210 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  4211 + ee.excelReplace(listI, new Object[]{m}, path + "mould/energy_dlb.xls",
  4212 + path + "export/"+date+"路单电量统计表.xls");
  4213 + }
  4214 +
  4215 + } catch (Exception e) {
  4216 + // TODO: handle exception
  4217 + e.printStackTrace();
  4218 + }
  4219 + }
  4220 + return listAll;
  4221 + }
3931 4222  
  4223 + private String getShyy(String node){
  4224 + String shyy ="无";
  4225 + if(!node.equals("")){
  4226 + if(node.equals("1")){shyy="票务用油";}
  4227 + else if(node.equals("2")){shyy="保养用油";}
  4228 + else if(node.equals("3")){shyy="报废车用油";}
  4229 + else if(node.equals("4")){shyy="其它用油";}
  4230 + else if(node.equals("5")){shyy="人保部";}
  4231 + else if(node.equals("6")){shyy="车队";}
  4232 + else if(node.equals("7")){shyy="车间(高保)";}
  4233 + else if(node.equals("8")){shyy="车间(小修)";}
  4234 + else{shyy ="无";}
  4235 + }
  4236 + return shyy;
  4237 + }
  4238 +
3932 4239 }
3933 4240  
3934 4241 class ComparableAcuals implements Comparator<ScheduleRealInfo>{
... ...
src/main/java/com/bsth/service/schedule/TTInfoBxDetailService.java
1   -package com.bsth.service.schedule;
2   -
3   -import com.bsth.entity.schedule.TTInfoBxDetail;
4   -
5   -/**
6   - * 时刻表班型明细服务。
7   - */
8   -public interface TTInfoBxDetailService extends BService<TTInfoBxDetail, Long> {
9   -
10   -}
  1 +package com.bsth.service.schedule;
  2 +
  3 +import com.bsth.entity.schedule.TTInfoBxDetail;
  4 +
  5 +/**
  6 + * 时刻表班型明细服务。
  7 + */
  8 +public interface TTInfoBxDetailService extends BService<TTInfoBxDetail, Long> {
  9 +
  10 +}
... ...
src/main/java/com/bsth/service/schedule/impl/TTInfoBxDetailServiceImpl.java
1   -package com.bsth.service.schedule.impl;
2   -
3   -import com.bsth.entity.schedule.TTInfoBxDetail;
4   -import com.bsth.service.schedule.TTInfoBxDetailService;
5   -import org.springframework.stereotype.Service;
6   -import org.springframework.transaction.annotation.Isolation;
7   -import org.springframework.transaction.annotation.Propagation;
8   -import org.springframework.transaction.annotation.Transactional;
9   -
10   -@Service
11   -@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED)
12   -public class TTInfoBxDetailServiceImpl extends BServiceImpl<TTInfoBxDetail, Long> implements TTInfoBxDetailService {
13   -
14   -}
  1 +package com.bsth.service.schedule.impl;
  2 +
  3 +import com.bsth.entity.schedule.TTInfoBxDetail;
  4 +import com.bsth.service.schedule.TTInfoBxDetailService;
  5 +import org.springframework.stereotype.Service;
  6 +import org.springframework.transaction.annotation.Isolation;
  7 +import org.springframework.transaction.annotation.Propagation;
  8 +import org.springframework.transaction.annotation.Transactional;
  9 +
  10 +@Service
  11 +@Transactional(propagation = Propagation.REQUIRED, isolation = Isolation.READ_COMMITTED)
  12 +public class TTInfoBxDetailServiceImpl extends BServiceImpl<TTInfoBxDetail, Long> implements TTInfoBxDetailService {
  13 +
  14 +}
... ...
src/main/java/com/bsth/util/ReportRegisterHTTPUtil.java
1   -package com.bsth.util;
2   -
3   -import org.apache.http.client.methods.CloseableHttpResponse;
4   -import org.apache.http.client.methods.HttpGet;
5   -import org.apache.http.client.methods.HttpPost;
6   -import org.apache.http.impl.client.CloseableHttpClient;
7   -import org.apache.http.impl.client.HttpClients;
8   -import org.apache.http.util.EntityUtils;
9   -
10   -import javax.servlet.ServletException;
11   -import javax.servlet.annotation.WebServlet;
12   -import javax.servlet.http.HttpServlet;
13   -import javax.servlet.http.HttpServletRequest;
14   -import javax.servlet.http.HttpServletResponse;
15   -import java.io.IOException;
16   -
17   -
18   -@WebServlet("/FromAjaxservlet")
19   -public class ReportRegisterHTTPUtil extends HttpServlet {
20   -
21   -
22   - protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
23   - try {
24   - //创建默认连接
25   - CloseableHttpClient httpClient = HttpClients.createDefault();
26   - //创建HttpGet对象,处理get请求,转发到A站点
27   - HttpPost httpPost = new HttpPost("http://114.80.178.13/complaint/TsReport/input.do");
28   - //执行
29   - CloseableHttpResponse response = httpClient.execute(httpPost);
30   - int code = response.getStatusLine().getStatusCode();
31   - //获取状态
32   - System.out.println("http请求结果为:"+code);
33   - if(code == 200){
34   - //获取A站点返回的结果
35   - String result = EntityUtils.toString(response.getEntity());
36   - System.out.println(result);
37   - //把结果返回给B站点
38   - resp.getWriter().print(result);
39   - }
40   - response.close();
41   - httpClient.close();
42   - } catch (Exception e) {
43   - }
44   - }
  1 +package com.bsth.util;
  2 +
  3 +import org.apache.http.client.methods.CloseableHttpResponse;
  4 +import org.apache.http.client.methods.HttpGet;
  5 +import org.apache.http.client.methods.HttpPost;
  6 +import org.apache.http.impl.client.CloseableHttpClient;
  7 +import org.apache.http.impl.client.HttpClients;
  8 +import org.apache.http.util.EntityUtils;
  9 +
  10 +import javax.servlet.ServletException;
  11 +import javax.servlet.annotation.WebServlet;
  12 +import javax.servlet.http.HttpServlet;
  13 +import javax.servlet.http.HttpServletRequest;
  14 +import javax.servlet.http.HttpServletResponse;
  15 +import java.io.IOException;
  16 +
  17 +
  18 +@WebServlet("/FromAjaxservlet")
  19 +public class ReportRegisterHTTPUtil extends HttpServlet {
  20 +
  21 +
  22 + protected void doPost(HttpServletRequest req, HttpServletResponse resp) throws ServletException, IOException {
  23 + try {
  24 + //创建默认连接
  25 + CloseableHttpClient httpClient = HttpClients.createDefault();
  26 + //创建HttpGet对象,处理get请求,转发到A站点
  27 + HttpPost httpPost = new HttpPost("http://114.80.178.13/complaint/TsReport/input.do");
  28 + //执行
  29 + CloseableHttpResponse response = httpClient.execute(httpPost);
  30 + int code = response.getStatusLine().getStatusCode();
  31 + //获取状态
  32 + System.out.println("http请求结果为:"+code);
  33 + if(code == 200){
  34 + //获取A站点返回的结果
  35 + String result = EntityUtils.toString(response.getEntity());
  36 + System.out.println(result);
  37 + //把结果返回给B站点
  38 + resp.getWriter().print(result);
  39 + }
  40 + response.close();
  41 + httpClient.close();
  42 + } catch (Exception e) {
  43 + }
  44 + }
45 45 }
46 46 \ No newline at end of file
... ...
src/main/resources/datatools/ktrs/ttinfodetailoutputforedit.ktr
... ... @@ -218,102 +218,6 @@
218 218 </attributes>
219 219 </connection>
220 220 <connection>
221   - <name>JGJW_VM</name>
222   - <server>192.168.198.240</server>
223   - <type>ORACLE</type>
224   - <access>Native</access>
225   - <database>orcl</database>
226   - <port>1521</port>
227   - <username>jwgl</username>
228   - <password>Encrypted 2be98afc86aa7f2e4cb79ce10d485a8d6</password>
229   - <servername/>
230   - <data_tablespace/>
231   - <index_tablespace/>
232   - <attributes>
233   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
234   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
235   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
236   - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
237   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
238   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
239   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
240   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
241   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
242   - </attributes>
243   - </connection>
244   - <connection>
245   - <name>NHJW_VM</name>
246   - <server>192.168.198.240</server>
247   - <type>ORACLE</type>
248   - <access>Native</access>
249   - <database>orcl</database>
250   - <port>1521</port>
251   - <username>nhjw</username>
252   - <password>Encrypted 2be98afc86aa7f2e4cb79ce10d09aa5cd</password>
253   - <servername/>
254   - <data_tablespace/>
255   - <index_tablespace/>
256   - <attributes>
257   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
258   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
259   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
260   - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
261   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
262   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
263   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
264   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
265   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
266   - </attributes>
267   - </connection>
268   - <connection>
269   - <name>PDGJ_VM</name>
270   - <server>192.168.198.240</server>
271   - <type>ORACLE</type>
272   - <access>Native</access>
273   - <database>orcl</database>
274   - <port>1521</port>
275   - <username>pdgj</username>
276   - <password>Encrypted 2be98afc86aa7f2e4cb79ce10ce96a8d0</password>
277   - <servername/>
278   - <data_tablespace/>
279   - <index_tablespace/>
280   - <attributes>
281   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
282   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
283   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
284   - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
285   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
286   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
287   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
288   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
289   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
290   - </attributes>
291   - </connection>
292   - <connection>
293   - <name>SNJW_VM</name>
294   - <server>192.168.198.240</server>
295   - <type>ORACLE</type>
296   - <access>Native</access>
297   - <database>orcl</database>
298   - <port>1521</port>
299   - <username>snjw</username>
300   - <password>Encrypted 2be98afc86aa7f2e4cb79ce10cd9ca5cd</password>
301   - <servername/>
302   - <data_tablespace/>
303   - <index_tablespace/>
304   - <attributes>
305   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
306   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
307   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
308   - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
309   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
310   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
311   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
312   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
313   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
314   - </attributes>
315   - </connection>
316   - <connection>
317 221 <name>xlab_mysql_youle</name>
318 222 <server>101.231.124.8</server>
319 223 <type>MYSQL</type>
... ... @@ -392,102 +296,6 @@
392 296 <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
393 297 </attributes>
394 298 </connection>
395   - <connection>
396   - <name>YGJW_VM</name>
397   - <server>192.168.198.240</server>
398   - <type>ORACLE</type>
399   - <access>Native</access>
400   - <database>orcl</database>
401   - <port>1521</port>
402   - <username>ygjw</username>
403   - <password>Encrypted 2be98afc86aa7f2e4cb79ce10c795a5cd</password>
404   - <servername/>
405   - <data_tablespace/>
406   - <index_tablespace/>
407   - <attributes>
408   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
409   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
410   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
411   - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
412   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
413   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
414   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
415   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
416   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
417   - </attributes>
418   - </connection>
419   - <connection>
420   - <name>&#x516c;&#x53f8;jgjw</name>
421   - <server>192.168.168.1</server>
422   - <type>ORACLE</type>
423   - <access>Native</access>
424   - <database>orcl</database>
425   - <port>1521</port>
426   - <username>jwgl</username>
427   - <password>Encrypted 2be98afc86aa7f2e4cb79ce10d485a8d6</password>
428   - <servername/>
429   - <data_tablespace/>
430   - <index_tablespace/>
431   - <attributes>
432   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
433   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
434   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
435   - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
436   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
437   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
438   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
439   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
440   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
441   - </attributes>
442   - </connection>
443   - <connection>
444   - <name>&#x516c;&#x53f8;snjw</name>
445   - <server>192.168.168.1</server>
446   - <type>ORACLE</type>
447   - <access>Native</access>
448   - <database>orcl</database>
449   - <port>1521</port>
450   - <username>snjw</username>
451   - <password>Encrypted 2be98afc86aa7f2e4cb79ce10cd9ca5cd</password>
452   - <servername/>
453   - <data_tablespace/>
454   - <index_tablespace/>
455   - <attributes>
456   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
457   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
458   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
459   - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
460   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
461   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
462   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
463   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
464   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
465   - </attributes>
466   - </connection>
467   - <connection>
468   - <name>&#x516c;&#x53f8;ygjw</name>
469   - <server>192.168.168.1</server>
470   - <type>ORACLE</type>
471   - <access>Native</access>
472   - <database>orcl</database>
473   - <port>1521</port>
474   - <username>ygjw</username>
475   - <password>Encrypted 2be98afc86aa7f2e4cb79ce10c795a5cd</password>
476   - <servername/>
477   - <data_tablespace/>
478   - <index_tablespace/>
479   - <attributes>
480   - <attribute><code>FORCE_IDENTIFIERS_TO_LOWERCASE</code><attribute>N</attribute></attribute>
481   - <attribute><code>FORCE_IDENTIFIERS_TO_UPPERCASE</code><attribute>N</attribute></attribute>
482   - <attribute><code>IS_CLUSTERED</code><attribute>N</attribute></attribute>
483   - <attribute><code>PORT_NUMBER</code><attribute>1521</attribute></attribute>
484   - <attribute><code>PRESERVE_RESERVED_WORD_CASE</code><attribute>N</attribute></attribute>
485   - <attribute><code>QUOTE_ALL_FIELDS</code><attribute>N</attribute></attribute>
486   - <attribute><code>SUPPORTS_BOOLEAN_DATA_TYPE</code><attribute>Y</attribute></attribute>
487   - <attribute><code>SUPPORTS_TIMESTAMP_DATA_TYPE</code><attribute>Y</attribute></attribute>
488   - <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
489   - </attributes>
490   - </connection>
491 299 <order>
492 300 <hop> <from>&#x5217;&#x8f6c;&#x884c;</from><to>&#x53bb;&#x9664;&#x5b57;&#x6bb5;</to><enabled>Y</enabled> </hop>
493 301 <hop> <from>&#x53bb;&#x9664;&#x5b57;&#x6bb5;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
... ... @@ -4084,7 +3892,7 @@
4084 3892 <optimizationLevel>9</optimizationLevel>
4085 3893 <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
4086 3894 <jsScript_name>Script 1</jsScript_name>
4087   - <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;&#x2f;&#x2f; &#x987a;&#x5e8f;&#xff0c;id,fcsj,jhlc,zdname,bctype,xldir,isfb&#xa;var all_content_array &#x3d; &#x5b;&#x5d;&#x3b;&#xa;var all_content &#x3d; &#x22;&#x22;&#x3b; &#xa;all_content_array.push&#x28;id&#x29;&#x3b;&#xa;all_content_array.push&#x28;fcsj&#x29;&#x3b;&#xa;all_content_array.push&#x28;jhlc&#x29;&#x3b;&#xa;all_content_array.push&#x28;fczdName&#x29;&#x3b;&#xa;all_content_array.push&#x28;bc_type&#x29;&#x3b;&#xa;all_content_array.push&#x28;xl_dir&#x29;&#x3b;&#xa;all_content_array.push&#x28;isfb&#x29;&#x3b;&#xa;all_content_array.push&#x28;qdz_code &#x7c;&#x7c; &#x27;null&#x27;&#x29;&#x3b;&#xa;all_content_array.push&#x28;zdz_code &#x7c;&#x7c; &#x27;null&#x27;&#x29;&#x3b;&#xa;all_content_array.push&#x28;ists&#x29;&#x3b;&#xa;all_content_array.push&#x28;bcsj &#x7c;&#x7c; &#x27;null&#x27;&#x29;&#x3b;&#xa;&#xa;all_content &#x3d; all_content_array.join&#x28;&#x22;,&#x22;&#x29;&#x3b; &#x2f;&#x2f; &#x9017;&#x53f7;&#x5206;&#x9694;</jsScript_script>
  3895 + <jsScript_script>&#x2f;&#x2f;Script here&#xa;&#xa;&#x2f;&#x2f; &#x987a;&#x5e8f;&#xff0c;id,fcsj,jhlc,zdname,bctype,xldir,isfb&#xa;var all_content_array &#x3d; &#x5b;&#x5d;&#x3b;&#xa;var all_content &#x3d; &#x22;&#x22;&#x3b; &#xa;all_content_array.push&#x28;id&#x29;&#x3b;&#xa;all_content_array.push&#x28;fcsj&#x29;&#x3b;&#xa;all_content_array.push&#x28;jhlc&#x29;&#x3b;&#xa;all_content_array.push&#x28;fczdName&#x29;&#x3b;&#xa;all_content_array.push&#x28;bc_type&#x29;&#x3b;&#xa;all_content_array.push&#x28;xl_dir&#x29;&#x3b;&#xa;all_content_array.push&#x28;isfb&#x29;&#x3b;&#xa;all_content_array.push&#x28;qdz_code &#x7c;&#x7c; &#x27;null&#x27;&#x29;&#x3b;&#xa;all_content_array.push&#x28;zdz_code &#x7c;&#x7c; &#x27;null&#x27;&#x29;&#x3b;&#xa;all_content_array.push&#x28;ists&#x29;&#x3b;&#xa;&#xa;all_content &#x3d; all_content_array.join&#x28;&#x22;,&#x22;&#x29;&#x3b; &#x2f;&#x2f; &#x9017;&#x53f7;&#x5206;&#x9694;</jsScript_script>
4088 3896 </jsScript> </jsScripts> <fields> <field> <name>all_content</name>
4089 3897 <rename>all_content</rename>
4090 3898 <type>String</type>
... ... @@ -4156,7 +3964,7 @@
4156 3964 <schema_name/>
4157 3965 </partitioning>
4158 3966 <connection>bus_control_variable</connection>
4159   - <sql>select &#xa;t.id as id&#xa;, concat&#x28;g.id, &#x27;_&#x27;, g.lp_name&#x29; as lp&#xa;, g.xl as xl&#xa;, qdz_code&#xa;, qdz_name&#xa;, zdz_code&#xa;, zdz_name&#xa;, fcsj&#xa;, jhlc&#xa;, bc_type &#xa;, bcs&#xa;, fcno&#xa;, xl_dir&#xa;, isfb&#xa;, ists&#xa;, bcsj &#xa;from bsth_c_s_ttinfo_detail t left join &#xa;bsth_c_s_gbi g on t.lp &#x3d; g.id &#xa;where &#xa;g.xl &#x3d; &#x3f; and&#xa;t.ttinfo &#x3d; &#x3f; &#xa;order by g.lp_no asc, t.bcs asc</sql>
  3967 + <sql>select &#xa;t.id as id&#xa;, concat&#x28;g.id, &#x27;_&#x27;, g.lp_name&#x29; as lp&#xa;, g.xl as xl&#xa;, qdz_code&#xa;, qdz_name&#xa;, zdz_code&#xa;, zdz_name&#xa;, fcsj&#xa;, jhlc&#xa;, bc_type &#xa;, bcs&#xa;, fcno&#xa;, xl_dir&#xa;, isfb&#xa;, ists&#xa;from bsth_c_s_ttinfo_detail t left join &#xa;bsth_c_s_gbi g on t.lp &#x3d; g.id &#xa;where &#xa;g.xl &#x3d; &#x3f; and&#xa;t.ttinfo &#x3d; &#x3f; &#xa;order by g.lp_no asc, t.bcs asc</sql>
4160 3968 <limit>0</limit>
4161 3969 <lookup>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</lookup>
4162 3970 <execute_each_row>N</execute_each_row>
... ...
src/main/resources/dubbo/config-dev.properties
1   -# application名字
2   -spring.dubbo.application.name=bsth_control_v_multi_service
3   -# zookeeper注册中心地址
4   -spring.dubbo.registry=zookeeper://127.0.0.1:2181
5   -
6   -#----------- dubbo:consumer 性能调优选项 -------------#
7   -# 远程服务调用超时时间,单位毫秒,这里设置30分钟
8   -spring.dubbo.consumer.timeout=1800000
9   -# 远程服务调用重试次数,0表示不需要重试
10   -spring.dubbo.consumer.retries=0
11   -#----------- dubbo:consumer 服务治理选项 -------------#
12   -# 启动不检查提供者是否存在
13   -spring.dubbo.consumer.check=false
  1 +# application名字
  2 +spring.dubbo.application.name=bsth_control_v_multi_service
  3 +# zookeeper注册中心地址
  4 +spring.dubbo.registry=zookeeper://127.0.0.1:2181
  5 +
  6 +#----------- dubbo:consumer 性能调优选项 -------------#
  7 +# 远程服务调用超时时间,单位毫秒,这里设置30分钟
  8 +spring.dubbo.consumer.timeout=1800000
  9 +# 远程服务调用重试次数,0表示不需要重试
  10 +spring.dubbo.consumer.retries=0
  11 +#----------- dubbo:consumer 服务治理选项 -------------#
  12 +# 启动不检查提供者是否存在
  13 +spring.dubbo.consumer.check=false
... ...
src/main/resources/dubbo/config-prod.properties
1   -# application名字
2   -spring.dubbo.application.name=bsth_control_v_multi_service
3   -# zookeeper注册中心地址
4   -spring.dubbo.registry=zookeeper://127.0.0.1:2181
5   -
6   -#----------- dubbo:consumer 性能调优选项 -------------#
7   -# 远程服务调用超时时间,单位毫秒,这里设置30分钟
8   -spring.dubbo.consumer.timeout=1800000
9   -# 远程服务调用重试次数,0表示不需要重试
10   -spring.dubbo.consumer.retries=0
11   -#----------- dubbo:consumer 服务治理选项 -------------#
12   -# 启动不检查提供者是否存在
13   -spring.dubbo.consumer.check=false
  1 +# application名字
  2 +spring.dubbo.application.name=bsth_control_v_multi_service
  3 +# zookeeper注册中心地址
  4 +spring.dubbo.registry=zookeeper://127.0.0.1:2181
  5 +
  6 +#----------- dubbo:consumer 性能调优选项 -------------#
  7 +# 远程服务调用超时时间,单位毫秒,这里设置30分钟
  8 +spring.dubbo.consumer.timeout=1800000
  9 +# 远程服务调用重试次数,0表示不需要重试
  10 +spring.dubbo.consumer.retries=0
  11 +#----------- dubbo:consumer 服务治理选项 -------------#
  12 +# 启动不检查提供者是否存在
  13 +spring.dubbo.consumer.check=false
... ...
src/main/resources/static/pages/base/line/add.html
... ... @@ -339,8 +339,8 @@
339 339 <div class="col-md-4">
340 340 <select name="linePlayType" class="form-control" id="linePlayTypeSelect">
341 341 <!--<option value="">&#45;&#45; 请选择线路类型 &#45;&#45;</option>-->
342   - <option value="0">双向</option>
343   - <option value="1">环线</option>
  342 + <option value="0">双向(包括双环线)</option>
  343 + <option value="1">单环线</option>
344 344 </select>
345 345 </div>
346 346 </div>
... ...
src/main/resources/static/pages/base/line/addstation.html
... ... @@ -52,6 +52,17 @@
52 52 </div>
53 53 </div>
54 54 </div>
  55 + <!-- 行业编码 -->
  56 + <div class="form-body">
  57 + <div class="form-group">
  58 + <label class="control-label col-md-3">
  59 + 行业编码&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
  60 + </label>
  61 + <div class="col-md-6">
  62 + <input type="text" class="form-control" name="industryCode" id="industryCodeInput" placeholder="行业编码">
  63 + </div>
  64 + </div>
  65 + </div>
55 66 <!-- 站点方向 -->
56 67 <div class="form-body">
57 68 <div class="form-group">
... ...
src/main/resources/static/pages/base/line/edit.html
... ... @@ -302,8 +302,8 @@
302 302 <div class="col-md-4">
303 303 <select name="linePlayType" class="form-control" id="linePlayTypeSelect">
304 304 <option value="">-- 请选择线路类型 --</option>
305   - <option value="0">双向</option>
306   - <option value="1">环线</option>
  305 + <option value="0">双向(包括双环线)</option>
  306 + <option value="1">单环线</option>
307 307 </select>
308 308 </div>
309 309 </div>
... ...
src/main/resources/static/pages/base/line/editstation.html
... ... @@ -54,6 +54,17 @@
54 54 </div>
55 55 </div>
56 56 </div>
  57 + <!-- 行业编码 -->
  58 + <div class="form-body">
  59 + <div class="form-group">
  60 + <label class="control-label col-md-3">
  61 + 行业编码&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
  62 + </label>
  63 + <div class="col-md-6">
  64 + <input type="text" class="form-control" name="industryCode" id="industryCodeInput" placeholder="行业编码">
  65 + </div>
  66 + </div>
  67 + </div>
57 68 <!-- 站点方向 -->
58 69 <div class="form-body">
59 70 <div class="form-group">
... ... @@ -363,5 +374,5 @@ $(&#39;#edit_station_mobal&#39;).on(&#39;editSelectMobal_show&#39;, function(e, map_,ajaxd,fun,s
363 374 }
364 375 return tel;
365 376 }, '方向必须一致!');
366   -});
  377 +});
367 378 </script>
368 379 \ No newline at end of file
... ...
src/main/resources/static/pages/base/line/js/map-function.js
... ... @@ -61,6 +61,8 @@ var PublicFunctions = function () {
61 61 $('#stationNameInput').val(editStationParmas.stationRouteStationName);
62 62 // 获取站点编码元素设值
63 63 $('#stationCodInput').val(editStationParmas.stationStationCod);
  64 + // 行业编码
  65 + $('#industryCodeInput').val(editStationParmas.industryCode);
64 66 // 获取站点类型元素设值
65 67 // $('#stationMarkSelect').val(editStationParmas.stationRouteStationMark);
66 68 // 获取站点方向元素设值
... ...
src/main/resources/static/pages/base/line/js/map.js
... ... @@ -559,12 +559,12 @@ var WorldsBMapLine = function () {
559 559 var htm = '<HR style="border:1 dashed #987cb9" width="100%" color=#987cb9 SIZE=1>'+
560 560 '<span style="color:#DDD;font-size: 15px;">站点名称:' + objStation.stationStationName + '</span>' +
561 561 '<span class="help-block" style="color:#DDD;font-size: 15px;">站点编码:' + objStation.stationStationCod + '</span>' +
  562 + '<span class="help-block" style="color:#DDD;font-size: 15px;">行业编码:' + objStation.industryCode + '</span>' +
562 563 '<span class="help-block" style="color:#DDD;font-size: 15px;">站点序号:' + objStation.stationRouteStationRouteCode + '</span>' +
563 564 '<span class="help-block" style="color:#DDD;font-size: 15px;">站点类型:' + markTypeStr + '</span>' +
564 565 '<span class="help-block" style="color:#DDD;font-size: 15px;">纬度坐标:' + objStation.stationBJwpoints + '</span>' +
565 566 '<span class="help-block" style="color:#DDD;font-size: 15px;">到站时间:' + objStation.stationRouteToTime + '&nbsp;分钟</span>' +
566 567 '<span class="help-block" style="color:#DDD;font-size: 15px;">到站距离:' + objStation.stationRouteDistances + '&nbsp;公里</span>' +
567   - '<span class="help-block" style="color:#DDD;font-size: 15px;">范围半径:' + objStation.stationRadius + '</span>' +
568 568 '<span class="help-block" style="color:#DDD;font-size: 15px;">版本号&nbsp&nbsp:' + objStation.stationRouteVersions + '</span>' +
569 569 '<span class="help-block" style="width: 100%;font-size: 15px;;color:#DDD;'+
570 570 'overflow: hidden; white-space: nowrap; text-overflow: ellipsis; " title="'+
... ... @@ -668,6 +668,7 @@ var WorldsBMapLine = function () {
668 668 var htm = '<HR style="border:1 dashed #987cb9" width="100%" color=#987cb9 SIZE=1>'+
669 669 '<span style="color:#DDD;font-size: 15px;">站点名称:' + objStation.stationStationName + '</span>' +
670 670 '<span class="help-block" style="color:#DDD;font-size: 15px;">站点编码:' + objStation.stationStationCod + '</span>' +
  671 + '<span class="help-block" style="color:#DDD;font-size: 15px;">行业编码:' + objStation.industryCode + '</span>' +
671 672 '<span class="help-block" style="color:#DDD;font-size: 15px;">站点序号:' + objStation.stationRouteStationRouteCode + '</span>' +
672 673 '<span class="help-block" style="color:#DDD;font-size: 15px;">站点类型:' + markTypeStr + '</span>' +
673 674 '<span class="help-block" style="color:#DDD;font-size: 15px;">纬度坐标:' + objStation.stationBJwpoints + '</span>' +
... ...
src/main/resources/static/pages/base/station/edit.html
... ... @@ -67,6 +67,17 @@
67 67 </div>
68 68 </div>
69 69 </div>
  70 + <!-- 行业编码 -->
  71 + <div class="form-body">
  72 + <div class="form-group">
  73 + <label class="control-label col-md-3">
  74 + 行业编码&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
  75 + </label>
  76 + <div class="col-md-6">
  77 + <input type="text" class="form-control" name="industryCode" id="industryCodeInput" placeholder="行业编码">
  78 + </div>
  79 + </div>
  80 + </div>
70 81 <!-- 站点方向 -->
71 82 <div class="form-body">
72 83 <div class="form-group">
... ...
src/main/resources/static/pages/base/station/js/station-positions-function.js
... ... @@ -28,13 +28,14 @@ var PositionsPublicFunctions = function () {
28 28 var htm = '<HR style="border:1 dashed #987cb9" width="100%" color=#987cb9 SIZE=1>'+
29 29 '<span style="color:#DDD;font-size: 15px;">站点名称:' + r[0].zdmc + '</span>' +
30 30 '<span class="help-block" style="color:#DDD;font-size: 15px;">站点编码:' + r[0].stationCode + '</span>' +
  31 + '<span class="help-block" style="color:#DDD;font-size: 15px;">行业编码:' + r[0].industryCode + '</span>' +
31 32 '<span class="help-block" style="color:#DDD;font-size: 15px;">站点序号:' + r[0].stationRouteCode + '</span>' +
32 33 '<span class="help-block" style="color:#DDD;font-size: 15px;">站点类型:' + markTypeStr + '</span>' +
33 34 '<span class="help-block" style="color:#DDD;font-size: 15px;">纬度坐标:' + r[0].stationJwpoints + '</span>' +
34 35 '<span class="help-block" style="color:#DDD;font-size: 15px;">到站时间:' + r[0].stationRouteToTime + '&nbsp;分钟</span>' +
35 36 '<span class="help-block" style="color:#DDD;font-size: 15px;">到站距离:' + r[0].stationRouteDistances + '&nbsp;公里</span>' +
36 37 '<span class="help-block" style="color:#DDD;font-size: 15px;">范围半径:' + r[0].stationRadius + '</span>' +
37   - '<span class="help-block" style="color:#DDD;font-size: 15px;">版本 号:' + r[0].stationRouteVersions + '</span>' +
  38 + '<span class="help-block" style="color:#DDD;font-size: 15px;">版本号&nbsp;&nbsp;:' + r[0].stationRouteVersions + '</span>' +
38 39 '<span class="help-block" style="width: 100%;font-size: 15px;;color:#DDD;'+
39 40 'overflow: hidden; white-space: nowrap; text-overflow: ellipsis; " title="'+
40 41 r[0].stationRouteDescriptions +'" >说明/描述:' + r[0].stationRouteDescriptions + '</span>' ;
... ... @@ -118,6 +119,8 @@ var PositionsPublicFunctions = function () {
118 119 $('#stationRouteLineInput').val(stationObj.stationRouteLine);
119 120 // 线路编码
120 121 $('#lineCodeInput').val(stationObj.stationRouteLIneCode);
  122 + // 线路编码
  123 + $('#industryCodeInput').val(stationObj.industryCode);
121 124 // WGS坐标点图形集合
122 125 $('#bPolygonGridInput').val(stationObj.stationBPolyonGrid);
123 126 // 获取站点名称元素设值
... ... @@ -201,6 +204,8 @@ var PositionsPublicFunctions = function () {
201 204 $('#versionsInput').val(stationObj.stationRouteVersions);
202 205 // 描述/说明
203 206 $('#descriptionsTextarea').val(stationObj.stationRouteDescriptions);
  207 + // 行业编码
  208 + $('#industryCodeInput').val(stationObj.industryCode);
204 209 },
205 210 // 获取站点路由.
206 211 getzdlyInfo : function(params,callback) {
... ...
src/main/resources/static/pages/base/station/list.html
... ... @@ -34,14 +34,15 @@
34 34 <th width="3%">序号</th>
35 35 <th width="5%">线路编号</th>
36 36 <th width="8%">线路名称</th>
37   - <th width="5%">线路方向</th>
  37 + <th width="4%">线路方向</th>
38 38 <th width="8%">站点路由名称</th>
39 39 <th width="4%">站点编码</th>
  40 + <th width="4%">行业编码</th>
40 41 <th width="4%">站点序号</th>
41 42 <th width="4%">站点类型</th>
42 43 <th width="6%">站点距离(km)</th>
43 44 <th width="6%">站点时长(min)</th>
44   - <th width="4%">版本号</th>
  45 + <th width="3%">版本号</th>
45 46 <th width="4%">是否撤销</th>
46 47 <th width="8%">操作</th>
47 48 </tr>
... ... @@ -68,6 +69,9 @@
68 69 <input type="text" class="form-control form-filter input-sm" name="stationCode_eq">
69 70 </td>
70 71 <td>
  72 + <input type="text" class="form-control form-filter input-sm" name="industryCode_eq">
  73 + </td>
  74 + <td>
71 75 <input type="text" class="form-control form-filter input-sm" name="stationRouteCode_eq">
72 76 </td>
73 77 <td>
... ... @@ -141,6 +145,9 @@
141 145 {{obj.stationCode}}
142 146 </td>
143 147 <td>
  148 + {{obj.industryCode}}
  149 + </td>
  150 + <td>
144 151 {{obj.stationRouteCode}}
145 152 </td>
146 153 <td>
... ...
src/main/resources/static/pages/base/station/list_edit.html
... ... @@ -249,7 +249,16 @@
249 249  
250 250 <!-- 表单分组组件 form-group START -->
251 251 <div class="form-group">
252   - <!-- 描述/说明 -->
  252 + <!-- 行业编码 -->
  253 + <div class="col-md-6">
  254 + <label class="control-label col-md-5">
  255 + 行业编码&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
  256 + </label>
  257 + <div class="col-md-4">
  258 + <input type="text" class="form-control" name="industryCode" id="industryCodeInput" placeholder="行业编码">
  259 + </div>
  260 + </div>
  261 + <!-- 描述/说明 -->
253 262 <div class="col-md-6">
254 263 <label class="control-label col-md-5"><span class="required"></span>描述/说明&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
255 264 </label>
... ...
src/main/resources/static/pages/base/stationroute/add.html
... ... @@ -52,6 +52,17 @@
52 52 </div>
53 53 </div>
54 54 </div>
  55 + <!-- 行业编码 -->
  56 + <div class="form-body">
  57 + <div class="form-group">
  58 + <label class="control-label col-md-3">
  59 + 行业编码&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
  60 + </label>
  61 + <div class="col-md-6">
  62 + <input type="text" class="form-control" name="industryCode" id="industryCodeInput" placeholder="行业编码">
  63 + </div>
  64 + </div>
  65 + </div>
55 66 <!-- 站点方向 -->
56 67 <div class="form-body">
57 68 <div class="form-group">
... ...
src/main/resources/static/pages/base/stationroute/edit.html
... ... @@ -30,7 +30,7 @@
30 30 <div class="form-body">
31 31 <div class="form-group">
32 32 <label class="control-label col-md-3">
33   - <span class="required"> * </span> 站点名称:
  33 + <span class="required"> * </span> 站点名称&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
34 34 </label>
35 35 <div class="col-md-6">
36 36 <input type="text" class="form-control" name="stationName" id="stationNameInput" placeholder="站点名称" readonly="readonly">
... ... @@ -48,6 +48,18 @@
48 48 </div>
49 49 </div>
50 50 </div>
  51 +
  52 + <!-- 行业编码 -->
  53 + <div class="form-body">
  54 + <div class="form-group">
  55 + <label class="control-label col-md-3">
  56 + 行业编码&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;:
  57 + </label>
  58 + <div class="col-md-6">
  59 + <input type="text" class="form-control" name="industryCode" id="industryCodeInput" placeholder="行业编码">
  60 + </div>
  61 + </div>
  62 + </div>
51 63 <!-- 站点序号 -->
52 64 <div class="form-body">
53 65 <div class="form-group">
... ... @@ -251,7 +263,7 @@ $(&#39;#edit_station_mobal&#39;).on(&#39;editSelectMobal_show&#39;, function(e, map_,ajaxd,stati
251 263 // 弹出添加成功提示消息
252 264 layer.msg('修改成功...');
253 265 /** 通知更新缓存区 */
254   - $.post('http://192.168.168.171:8800/transport_server/basic/refresh',function(rs){console.log(rs)})
  266 + // $.post('http://192.168.168.171:8800/transport_server/basic/refresh',function(rs){console.log(rs)})
255 267 }else {
256 268 // 弹出添加失败提示消息
257 269 layer.msg('修改失败...');
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
... ... @@ -359,6 +359,8 @@ var PublicFunctions = function () {
359 359 $('#stationRouteLineInput').val(editStationParmas.stationRouteLine);
360 360 // 线路编码
361 361 $('#lineCodeInput').val(editStationParmas.stationRouteLIneCode);
  362 + // 行业标准
  363 + $('#industryCodeInput').val(editStationParmas.industryCode);
362 364 // 百度坐标点图形集合
363 365 $('#bPolygonGridInput').val(editStationParmas.stationBPolygonGrid);
364 366 // 获取站点名称元素设值
... ...
src/main/resources/static/pages/base/stationroute/js/stationroute-list-map.js
... ... @@ -225,7 +225,7 @@ window.WorldsBMap = function () {
225 225 // 信息窗口宽度
226 226 width: (width < 240 ? 240 : width),
227 227 // 信息窗口高度
228   - height: shapes=="r" ?330:300,
  228 + // height: shapes=="r" ?380:350,
229 229 // 信息窗位置偏移值。
230 230 offset: new BMap.Size(10,-20),
231 231 //设置不允许信窗发送短息
... ... @@ -246,6 +246,7 @@ window.WorldsBMap = function () {
246 246 }
247 247 var htm = '<span style="color: #ff8355;font-size: 20px; overflow: hidden; white-space: nowrap; text-overflow:ellipsis;display: -webkit-box; -webkit-box-orient: vertical;">' + objStation.stationRouteName + '</span>' +
248 248 '<span class="help-block" >站点编码:' + objStation.stationCode + '</span>' +
  249 + '<span class="help-block" >行业编号:' + (objStation.industryCode == null ? "":objStation.industryCode)+ '</span>' +
249 250 '<span class="help-block" >站点序号:' + objStation.stationRouteCode + '</span>' +
250 251 '<span class="help-block" >站点类型:' + markTypeStr + '</span>' +
251 252 '<span class="help-block" >经度:&nbsp&nbsp' + BJwpoints[0] + '</span>' +
... ...
src/main/resources/static/pages/forms/export/import_Jygl.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/energy_dlb.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/mould/energy_ylb.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/refuelUpload.html
... ... @@ -73,11 +73,13 @@
73 73 // alert("文件导入成功");
74 74 $('#uploadFile').modal('hide');
75 75 $('tr.filter .filter-submit').click();
  76 + $("#query").click();
76 77 }
77 78 },
78 79 error : function(data, status, e) {
79 80 layer.close(j);
80   - alert("文件导入失败");
  81 + alert(JSON.parse((data.responseText)).result);
  82 +// alert("文件导入失败");
81 83 }
82 84 })
83 85 });
... ...
src/main/resources/static/pages/oil/jyglList.html
... ... @@ -22,6 +22,9 @@
22 22 class="caption-subject font-dark sbold uppercase">场外加油管理</span>
23 23 </div>
24 24 <div class="actions">
  25 + <button type="button" class="btn btn-circle blue" id="upload"><i class="fa fa-file-excel-o"></i>
  26 + 导入Excel
  27 + </button> &nbsp;&nbsp;
25 28 <!-- <a class="btn btn-circle blue" href="cylAdd.html" data-pjax><i class="fa fa-plus"></i> 添加</a> -->
26 29 <button type="button" class="btn btn-circle blue" id="saveButton"><i class="fa fa-minus-square"></i> 保存</button>
27 30 <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> -->
... ... @@ -112,6 +115,8 @@
112 115 </div>
113 116 </div>
114 117  
  118 +<script src="/assets/js/ajaxfileupload/ajaxfileupload.js"></script>
  119 +
115 120 <script id="jygl_list_temp" type="text/html">
116 121 {{each list as obj i}}
117 122 <tr>
... ... @@ -499,4 +504,10 @@ function changeEnabled(id,enabled){
499 504 }
500 505  
501 506  
  507 +//导入
  508 +$("#upload").on("click", function(){
  509 + $.get('upload.html', function(m){$(pjaxContainer).append(m);});
  510 +});
  511 +
  512 +
502 513 </script>
503 514 \ No newline at end of file
... ...
src/main/resources/static/pages/oil/upload.html 0 → 100644
  1 +<div class="modal fade" id="uploadFile" tabindex="-1" role="basic"
  2 + aria-hidden="true">
  3 + <div class="modal-dialog">
  4 + <div class="modal-content">
  5 + <div class="modal-header">
  6 + <button type="button" class="close" data-dismiss="modal"
  7 + aria-hidden="true"></button>
  8 + <h4 class="modal-title">导入Excel</h4>
  9 + </div>
  10 + <div class="modal-body">
  11 + <form class="form-horizontal" role="form" id="excelFile" method="post"
  12 + action="" enctype="multipart/form-data">
  13 + <input type="hidden" name="groupType" value="3">
  14 + <div class="alert alert-danger display-hide">
  15 + <button class="close" data-close="alert"></button>
  16 + 您的输入有误,请检查下面的输入项
  17 + </div>
  18 + <div class="form-body">
  19 + <div class="form-group">
  20 + <label class="col-md-3 control-label">选择文件</label>
  21 + <div class="col-md-9">
  22 + <input type="file" name="file" id="file"
  23 + accept="application/vnd.ms-excel"/>
  24 + <input type=hidden name="gsbm_" id="gsbm_">
  25 + <input type="hidden" name="gsName" id="gsName">
  26 +<!-- <input type="hidden" name="fgsbm_" id="fgsbm_"> -->
  27 +<!-- <input type="hidden" name="fgsName" id="fgsName"> -->
  28 + </div>
  29 + </div>
  30 + </div>
  31 + </form>
  32 + </div>
  33 + <div class="modal-footer">
  34 + <button type="button" class="btn default" id="downLoad">下载模板</button>
  35 + <button type="button" class="btn default" data-dismiss="modal">取消</button>
  36 + <button type="button" class="btn btn-primary" id="submit">确认导入</button>
  37 + </div>
  38 + </div>
  39 + </div>
  40 +</div>
  41 +<script id="res_tbody_temp" type="text/html">
  42 +
  43 +</script>
  44 +<script data-exclude=1>
  45 + $(function() {
  46 + var form = $('#excelFile');
  47 + var error = $('.alert-danger', form);
  48 +
  49 + $('#gsbm_').val($("select[name=gsdm_like]").val());
  50 + $('#gsName').val($("select[name=gsdm_like]").find("option:selected").text());
  51 +// $('#fgsbm_').val($("#fgsbm").val());
  52 +// $('#fgsName').val($("#fgsbm").find("option:selected").text());
  53 +
  54 + //modal 显示事件
  55 + $('#uploadFile').on('show.bs.modal', function(){
  56 + })
  57 + .modal('show');
  58 +
  59 + //提交
  60 +// $('#submit').on('click', function() {
  61 +// form.submit();
  62 +// });
  63 +
  64 + $('#submit').on('click', function() {
  65 + var j = layer.load(2);
  66 + var param = {};
  67 + param.uploadDir = 'upload';
  68 + param["gsbm_"] = $('#gsbm_').val();
  69 + param["gsName"] = $('#gsName').val();
  70 +// param["fgsbm_"] = $('#fgsbm_').val();
  71 +// param["fgsName"] = $('#fgsName').val();
  72 + $.ajaxFileUpload({
  73 + url : '/cwjy/uploadFile',
  74 + secureuri : false,
  75 + fileElementId : 'file',
  76 + dataType : 'json',
  77 + data : param,
  78 + success : function(data) {
  79 + layer.close(j);
  80 + alert(data.result);
  81 +// alert("文件导入成功");
  82 + $('#uploadFile').modal('hide');
  83 + $('tr.filter .filter-submit').click();
  84 + },
  85 + error : function(data, status, e) {
  86 + layer.close(j);
  87 + alert("文件导入失败");
  88 + }
  89 + })
  90 + });
  91 +
  92 + $('#downLoad').on('click', function(){
  93 + window.open("/downloadFile/downloadModel?fileName=import_Jygl");
  94 + });
  95 +
  96 + function getCurrSelNode(){
  97 + return $.jstree.reference("#modules_tree").get_selected(true);
  98 + }
  99 + });
  100 +</script>
0 101 \ No newline at end of file
... ...
src/main/resources/static/pages/report/singleEnergy.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="gsdmEnergy" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 38px;" id="fgsdmDiv">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="fgsdmEnergy" style="width: 180px;"></select>
  37 + </div>
  38 + <div style="display: inline-block;margin-left: 33px;">
  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="margin-top: 10px">
  43 + </div>
  44 + <div style="display: inline-block;margin-left: 33px;">
  45 + <span class="item-label" style="width: 80px;">类型: </span>
  46 + <select class="form-control" style="width: 180px;" id="energy">
  47 + <option value="1">油汇总</option>
  48 + <option value="2">电汇总</option>
  49 + </select>
  50 + </div>
  51 + <div style="display: inline-block;">
  52 + <span class="item-label" style="width: 80px;margin-left: 24px;">时间: </span>
  53 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  54 + </div>
  55 +
  56 + <div class="form-group">
  57 + <input type="hidden" id="id"/>
  58 + <input class="btn btn-default" type="button" id="query" value="查询"/>
  59 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  60 + </div>
  61 + </form>
  62 + </div>
  63 +
  64 + <div class="portlet-body">
  65 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  66 + <table class="table table-bordered table-hover table-checkable" id="forms">
  67 + <thead>
  68 + <tr>
  69 + <td>日期</td>
  70 + <td>公司</td>
  71 + <td>分公司</td>
  72 + <td>线路</td>
  73 + <td>自编号</td>
  74 + <td>驾工号</td>
  75 + <td>驾姓名</td>
  76 + <td>售工号</td>
  77 + <td>售姓名</td>
  78 + <td>出场公里</td>
  79 + <td>出场存油</td>
  80 + <td>加油量</td>
  81 + <td>进场公里</td>
  82 + <td>进场存油</td>
  83 + <td>油耗</td>
  84 + <td>损耗油量</td>
  85 + <td>损耗原因</td>
  86 + <td>燃油类型</td>
  87 + <td>尿素</td>
  88 + <td>总里程</td>
  89 + <td>百公里油耗</td>
  90 + <td>行驶里程</td>
  91 + <td>空驶里程</td>
  92 + </tr>
  93 + </thead>
  94 + <tbody>
  95 + </tbody>
  96 + </table>
  97 +
  98 + <table class="table table-bordered table-hover table-checkable" style="display: none" id="forms_d">
  99 + <thead>
  100 + <tr>
  101 + <td>日期</td>
  102 + <td>公司</td>
  103 + <td>分公司</td>
  104 + <td>线路</td>
  105 + <td>自编号</td>
  106 + <td>驾工号</td>
  107 + <td>驾姓名</td>
  108 + <td>售工号</td>
  109 + <td>售姓名</td>
  110 + <td>出场公里</td>
  111 + <td>出场存电</td>
  112 + <td>充电量</td>
  113 + <td>进场公里</td>
  114 + <td>进场存电</td>
  115 + <td>耗电</td>
  116 + <td>损耗电量</td>
  117 + <td>损耗原因</td>
  118 + <td>总里程</td>
  119 + <td>百公里电耗</td>
  120 + <td>行驶里程</td>
  121 + <td>空驶里程</td>
  122 + </tr>
  123 + </thead>
  124 + <tbody>
  125 + </tbody>
  126 + </table>
  127 + </div>
  128 +
  129 + </div>
  130 + </div>
  131 + </div>
  132 +</div>
  133 +<script>
  134 + $(function(){
  135 + // 关闭左侧栏
  136 + if (!$('body').hasClass('page-sidebar-closed'))
  137 + $('.menu-toggler.sidebar-toggler').click();
  138 +
  139 + var d = new Date();
  140 + d.setTime(d.getTime() - 1*1000*60*60*24);
  141 + var year = d.getFullYear();
  142 + var month = d.getMonth() + 1;
  143 + var day = d.getDate();
  144 + if(month < 10)
  145 + month = "0"+month;
  146 + if(day < 10)
  147 + day = "0"+day;
  148 + var dateTime = year + "-" + month + "-" + day;
  149 + $("#date").datetimepicker({
  150 + format : 'YYYY-MM-DD',
  151 + locale : 'zh-cn',
  152 + maxDate : dateTime
  153 + });
  154 +
  155 + $("#date").val(dateTime);
  156 +
  157 + var fage=false;
  158 + var obj = [];
  159 + var xlList;
  160 + $.get('/report/lineList',function(result){
  161 + xlList=result;
  162 +
  163 + $.get('/user/companyData', function(result){
  164 + obj = result;
  165 + var options = '';
  166 + for(var i = 0; i < obj.length; i++){
  167 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  168 + }
  169 + if(obj.length ==0){
  170 + $("#gsdmDiv").css('display','none');
  171 + }else if(obj.length ==1){
  172 + $("#gsdmDiv").css('display','none');
  173 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  174 + $('#fgsdmDiv').css('display','none');
  175 + }
  176 + $('#gsdmEnergy').html(options);
  177 +
  178 + updateCompany();
  179 + });
  180 + });
  181 +
  182 + $("#gsdmEnergy").on("change",updateCompany);
  183 + function updateCompany(){
  184 + var company = $('#gsdmEnergy').val();
  185 + var options = '';
  186 + for(var i = 0; i < obj.length; i++){
  187 + if(obj[i].companyCode == company){
  188 + var children = obj[i].children;
  189 + for(var j = 0; j < children.length; j++){
  190 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  191 + }
  192 + }
  193 + }
  194 + $('#fgsdmEnergy').html(options);
  195 + }
  196 +
  197 + var tempData = {};
  198 + $.get('/report/lineList',function(xlList){
  199 + var data = [];
  200 + data.push({id: " ", text: "全部线路"});
  201 + $.get('/user/companyData', function(result){
  202 + for(var i = 0; i < result.length; i++){
  203 + var companyCode = result[i].companyCode;
  204 + var children = result[i].children;
  205 + for(var j = 0; j < children.length; j++){
  206 + var code = children[j].code;
  207 + for(var k=0;k < xlList.length;k++ ){
  208 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  209 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  210 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  211 + }
  212 + }
  213 + }
  214 + }
  215 + initPinYinSelect2('#line',data,'');
  216 +
  217 + });
  218 + });
  219 +
  220 + $("#line").on("change", function(){
  221 + if($("#line").val() == " "){
  222 + $("#gsdmEnergy").attr("disabled", false);
  223 + $("#fgsdmEnergy").attr("disabled", false);
  224 + } else {
  225 + var temp = tempData[$("#line").val()].split(":");
  226 + $("#gsdmEnergy").val(temp[0]);
  227 + updateCompany();
  228 + $("#nature").val(0);
  229 + $("#fgsdmEnergy").val(temp[1]);
  230 + $("#gsdmEnergy").attr("disabled", true);
  231 + $("#fgsdmEnergy").attr("disabled", true);
  232 + }
  233 + });
  234 +
  235 + $("#export").attr('disabled',"true");
  236 +
  237 + //查询
  238 + $("#query").on('click',function(){
  239 + var line = $("#line").val();
  240 + var date = $("#date").val();
  241 + var fgs=$('#fgsdmEnergy').val();
  242 + var gs=$('#gsdmEnergy').val();
  243 + var energy=$('#energy').val();
  244 + var i = layer.load(2);
  245 + $get('/report/singleEnergy',{line:line,date:date,gs:gs,fgs:fgs,energy:energy,type:"query"},function(result){
  246 + if(energy=="2"){
  247 + var singleEnergy_d = template('singleEnergy_d',{list:result});
  248 + $('#forms_d tbody').html(singleEnergy_d);
  249 + $("#forms").hide();
  250 + $("#forms_d").show();
  251 + }else{
  252 + var singleEnergy = template('singleEnergy',{list:result});
  253 + $('#forms tbody').html(singleEnergy);
  254 + $("#forms_d").hide();
  255 + $("#forms").show();
  256 + }
  257 + layer.close(i);
  258 + if(result.length == 0)
  259 + $("#export").attr('disabled',"true");
  260 + else
  261 + $("#export").removeAttr("disabled");
  262 + });
  263 + });
  264 +
  265 +
  266 + $("#export").on("click",function(){
  267 + var line = $("#line").val();
  268 + var date = $("#date").val();
  269 + var fgs=$('#fgsdmEnergy').val();
  270 + var gs=$('#gsdmEnergy').val();
  271 + var energy=$('#energy').val();
  272 + var lineName = $('#line option:selected').text();
  273 + if(lineName == "全部线路")
  274 + lineName = $('#fgsdm option:selected').text();
  275 + if(lineName=="全部分公司")
  276 + lineName = $('#gsdm option:selected').text();
  277 +
  278 + var i = layer.load(2);
  279 + $get('/report/singleEnergy',{line:line,date:date,gs:gs,fgs:fgs,energy:energy,type:"export",lineName:lineName},function(result){
  280 + if(energy=="2"){
  281 + window.open("/downloadFile/download?fileName="
  282 + +date+"路单电量统计表");
  283 + }else{
  284 + window.open("/downloadFile/download?fileName="
  285 + +date+"路单油量统计表");
  286 + }
  287 +
  288 + layer.close(i);
  289 + });
  290 + });
  291 +
  292 +
  293 +
  294 + });
  295 +</script>
  296 +<script type="text/html" id="singleEnergy">
  297 + {{each list as obj i}}
  298 + <tr>
  299 + <td>{{obj.date}}</td>
  300 + <td>{{obj.gsName}}</td>
  301 + <td>{{obj.fgsName}}</td>
  302 + <td>{{obj.linename}}</td>
  303 + <td>{{obj.nbbm}}</td>
  304 + <td>{{obj.jsy}}</td>
  305 + <td>{{obj.jname}}</td>
  306 + <td>{{obj.sGh}}</td>
  307 + <td>{{obj.sName}}</td>
  308 + <td>{{obj.czlc}}</td>
  309 + <td>{{obj.czyl}}</td>
  310 + <td>{{obj.jzl}}</td>
  311 + <td>{{obj.jzlc}}</td>
  312 + <td>{{obj.jzyl}}</td>
  313 + <td>{{obj.yh}}</td>
  314 + <td>{{obj.sh}}</td>
  315 + <td>{{obj.shyy}}</td>
  316 + <td>{{obj.rylx}}</td>
  317 + <td>{{obj.ns}}</td>
  318 + <td>{{obj.zlc}}</td>
  319 + <td>{{obj.bglyh}}</td>
  320 + <td>{{obj.zlcAll}}</td>
  321 + <td>{{obj.zksgl}}</td>
  322 + </tr>
  323 + {{/each}}
  324 + {{if list.length == 0}}
  325 + <tr>
  326 + <td colspan="23"><h6 class="muted">没有找到相关数据</h6></td>
  327 + </tr>
  328 + {{/if}}
  329 +</script>
  330 +
  331 +<script type="text/html" id="singleEnergy_d">
  332 + {{each list as obj i}}
  333 + <tr>
  334 + <td>{{obj.date}}</td>
  335 + <td>{{obj.gsName}}</td>
  336 + <td>{{obj.fgsName}}</td>
  337 + <td>{{obj.linename}}</td>
  338 + <td>{{obj.nbbm}}</td>
  339 + <td>{{obj.jsy}}</td>
  340 + <td>{{obj.jname}}</td>
  341 + <td>{{obj.sGh}}</td>
  342 + <td>{{obj.sName}}</td>
  343 + <td>{{obj.czlc}}</td>
  344 + <td>{{obj.czcd}}</td>
  345 + <td>{{obj.cdl}}</td>
  346 + <td>{{obj.jzlc}}</td>
  347 + <td>{{obj.jzcd}}</td>
  348 + <td>{{obj.hd}}</td>
  349 + <td>{{obj.sh}}</td>
  350 + <td>{{obj.shyy}}</td>
  351 + <td>{{obj.zlc}}</td>
  352 + <td>{{obj.bglyh}}</td>
  353 + <td>{{obj.zlcAll}}</td>
  354 + <td>{{obj.zksgl}}</td>
  355 + </tr>
  356 + {{/each}}
  357 + {{if list.length == 0}}
  358 + <tr>
  359 + <td colspan="21"><h6 class="muted">没有找到相关数据</h6></td>
  360 + </tr>
  361 + {{/if}}
  362 +</script>
0 363 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/add.html
1   -<div class="uk-modal" id="report_register_add_mobal">
2   - <div class="uk-modal-dialog" style="width: 600px;">
3   - <a href="" class="uk-modal-close uk-close"></a>
4   - <div class="uk-modal-header">
5   - <h2>添加报备登记</h2>
6   - </div>
7   - <div class="uk-form uk-form-horizontal" id="report_register_form">
8   - <!--<div class="alert alert-danger display-hide">-->
9   - <!--您的输入有误,请检查下面的输入项-->
10   - <!--</div>-->
11   - <!-- 线路ID -->
12   - <!--<input type="hidden" name="REPORT_DATE" id="REPORT_DATE">-->
13   - <form id="add_head_table">
14   - <input type="hidden" name="REPORT_BBR" id="REPORT_BBR" value="">
15   - <input type="hidden" name="REPORT_GS" id="REPORT_GS" value="">
16   - <input type="hidden" name="REPORT_FGS" id="REPORT_FGS" value="">
17   - <input type="hidden" name="REPORT_GSNAME" id="REPORT_GSNAME" value="">
18   - <input type="hidden" name="REPORT_FGSNAME" id="REPORT_FGSNAME" value="">
19   - <input type="hidden" name="REPORT_XLNAME" id="REPORT_XLNAME" value="">
20   -
21   - <!-- 报备时间 -->
22   - <div class="uk-grid uk-width-2-3 uk-container-center">
23   - <div class="uk-form-row">
24   - <label class="uk-form-label">
25   - 报备时间:
26   - </label>
27   - <div class="uk-form-controls">
28   - <input type="text" class="form-control" name="REPORT_DATE" id="REPORT_DATE" readonly="readonly">
29   - </div>
30   - </div>
31   - </div>
32   - <!-- 类型 -->
33   - <div class="uk-grid uk-width-2-3 uk-container-center">
34   - <div class="uk-form-row">
35   - <label class="uk-form-label">
36   - 类型:
37   - </label>
38   - <div class="uk-form-controls">
39   - <select class="form-control typeSelect" name="REPORT_TYPE" id="REPORT_TYPE">
40   - <option value="1">首末班误点</option>
41   - <option value="2">大间隔</option>
42   - <option value="3">突发事件</option>
43   - <option value="4">事故</option>
44   - <option value="5">其他</option>
45   - <option value="6">咨询</option>
46   - </select>
47   - </div>
48   - </div>
49   - </div>
50   - <!-- 路段名称 -->
51   - <div class="uk-grid uk-width-2-3 uk-container-center">
52   - <div class="uk-form-row">
53   - <label class="uk-form-label">
54   - 线路:
55   - </label>
56   - <div class="uk-form-controls">
57   - <select class="form-control lineSelect" name="REPORT_XL" id="REPORT_XL">
58   - </select>
59   - </div>
60   - </div>
61   - </div>
62   - </form>
63   - <!-- 首末班误点-->
64   - <form id="add_first_last_late_table" class="c_register_form" style="display:none; margin-top: 35px;">
65   - <div class="uk-grid uk-width-2-3 uk-container-center">
66   - <div class="uk-form-row">
67   - <label class="uk-form-label">
68   - 延误站点:
69   - </label>
70   - <div class="uk-form-controls">
71   - <input type="text" class="form-control" name="REPORT_STATION" placeholder="延误站点" required>
72   - </div>
73   - </div>
74   - </div>
75   - <div class="uk-grid uk-width-2-3 uk-container-center">
76   - <div class="uk-form-row">
77   - <label class="uk-form-label">
78   - 延误时间:
79   - </label>
80   - <div class="uk-form-controls">
81   - <input type="text" class="form-control" name="REPORT_YWSJ" placeholder="延误时间" required>
82   - </div>
83   - </div>
84   - </div>
85   - <div class="uk-grid uk-width-2-3 uk-container-center">
86   - <div class="uk-form-row">
87   - <label class="uk-form-label">
88   - 首末班延误原因:
89   - </label>
90   - <div class="uk-form-controls">
91   - <input type="text" class="form-control" name="REPORT_SMBWD" placeholder="首末班延误原因" required>
92   - </div>
93   - </div>
94   - </div>
95   - <div class="uk-grid uk-width-2-3 uk-container-center">
96   - <div class="uk-form-row">
97   - <label class="uk-form-label">
98   - 对外上报部门:
99   - </label>
100   - <div class="uk-form-controls">
101   - <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required>
102   - </div>
103   - </div>
104   - </div>
105   - <div class="uk-grid uk-width-2-3 uk-container-center">
106   - <div class="uk-form-row">
107   - <label class="uk-form-label">对外上报时间:</label>
108   - <div class="uk-form-controls">
109   - <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required>
110   - </div>
111   - </div>
112   - </div>
113   - <div class="uk-modal-footer uk-text-right">
114   - <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
115   - <button type="button" class="uk-button uk-modal-close">取消</button>
116   - <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
117   - </div>
118   - </form>
119   - <!-- 大间隔-->
120   - <form id="add_large_interval_table" class="c_register_form" style="display:none; margin-top: 35px;">
121   - <div class="uk-grid uk-width-2-3 uk-container-center">
122   - <div class="uk-form-row">
123   - <label class="uk-form-label">
124   - 路段:
125   - </label>
126   - <div class="uk-form-controls">
127   - <input type="text" class="form-control" name="REPORT_ROAD" placeholder="路段" required>
128   - </div>
129   - </div>
130   - </div>
131   - <div class="uk-grid uk-width-2-3 uk-container-center">
132   - <div class="uk-form-row">
133   - <label class="uk-form-label">
134   - 行驶方向:
135   - </label>
136   - <div class="uk-form-controls">
137   - <input type="text" class="form-control" name="REPORT_XSFX" placeholder="行驶方向" required>
138   - </div>
139   - </div>
140   - </div>
141   - <div class="uk-grid uk-width-2-3 uk-container-center">
142   - <div class="uk-form-row">
143   - <label class="uk-form-label">
144   - 站点:
145   - </label>
146   - <div class="uk-form-controls">
147   - <input type="text" class="form-control" name="REPORT_STATION" placeholder="站点" required >
148   - </div>
149   - </div>
150   - </div>
151   - <div class="uk-grid uk-width-2-3 uk-container-center">
152   - <div class="uk-form-row">
153   - <label class="uk-form-label">
154   - 大间隔时间:
155   - </label>
156   - <div class="uk-form-controls">
157   - <input type="text" class="form-control" name="REPORT_DJGSJ" placeholder="大间隔时间" required>
158   - </div>
159   - </div>
160   - </div>
161   - <div class="uk-grid uk-width-2-3 uk-container-center">
162   - <div class="uk-form-row">
163   - <label class="uk-form-label">
164   - 大间隔原因:
165   - </label>
166   - <div class="uk-form-controls">
167   - <input type="text" class="form-control" name="REPORT_DJGYY" placeholder="大间隔原因" required>
168   - </div>
169   - </div>
170   - </div>
171   - <div class="uk-grid uk-width-2-3 uk-container-center">
172   - <div class="uk-form-row">
173   - <label class="uk-form-label">
174   - 对外上报部门:
175   - </label>
176   - <div class="uk-form-controls">
177   - <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required>
178   - </div>
179   - </div>
180   - </div>
181   - <div class="uk-grid uk-width-2-3 uk-container-center">
182   - <div class="uk-form-row">
183   - <label class="uk-form-label">对外上报时间:</label>
184   - <div class="uk-form-controls">
185   - <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required>
186   - </div>
187   - </div>
188   - </div>
189   - <div class="uk-modal-footer uk-text-right">
190   - <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
191   - <button type="button" class="uk-button uk-modal-close">取消</button>
192   - <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
193   - </div>
194   - </form>
195   - <!-- 突发事件-->
196   - <form id="add_emergency_table" class="c_register_form" style="display:none; margin-top: 35px;">
197   -
198   - <div class="uk-grid uk-width-2-3 uk-container-center">
199   - <div class="uk-form-row">
200   - <label class="uk-form-label">
201   - 重大活动货突发事件:
202   - </label>
203   - <div class="uk-form-controls">
204   - <input type="text" class="form-control" name="REPORT_TFSJ" placeholder="重大活动货突发事件" required>
205   - </div>
206   - </div>
207   - </div>
208   - <div class="uk-grid uk-width-2-3 uk-container-center">
209   - <div class="uk-form-row">
210   - <label class="uk-form-label">
211   - 影响时间:
212   - </label>
213   - <div class="uk-form-controls">
214   - <input type="text" class="form-control" name="REPORT_YXSJ" placeholder="影响时间" required>
215   - </div>
216   - </div>
217   - </div>
218   - <div class="uk-grid uk-width-2-3 uk-container-center">
219   - <div class="uk-form-row">
220   - <label class="uk-form-label">
221   - 影响班次数:
222   - </label>
223   - <div class="uk-form-controls">
224   - <input type="text" class="form-control" name="REPORT_YXBC" placeholder="影响班次数" required>
225   - </div>
226   - </div>
227   - </div>
228   - <div class="uk-grid uk-width-2-3 uk-container-center">
229   - <div class="uk-form-row">
230   - <label class="uk-form-label">
231   - 调整措施:
232   - </label>
233   - <div class="uk-form-controls">
234   - <input type="text" class="form-control" name="REPORT_TZCS" placeholder="调整措施" required>
235   - </div>
236   - </div>
237   - </div>
238   - <div class="uk-grid uk-width-2-3 uk-container-center">
239   - <div class="uk-form-row">
240   - <label class="uk-form-label">
241   - 对外上报部门:
242   - </label>
243   - <div class="uk-form-controls">
244   - <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required>
245   - </div>
246   - </div>
247   - </div>
248   - <div class="uk-grid uk-width-2-3 uk-container-center">
249   - <div class="uk-form-row">
250   - <label class="uk-form-label">对外上报时间:</label>
251   - <div class="uk-form-controls">
252   - <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required>
253   - </div>
254   - </div>
255   - </div>
256   - <div class="uk-modal-footer uk-text-right">
257   - <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
258   - <button type="button" class="uk-button uk-modal-close">取消</button>
259   - <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
260   - </div>
261   - </form>
262   - <!-- 事故-->
263   - <form id="add_accident_table" class="c_register_form" style="display:none; margin-top: 35px;">
264   - <div class="uk-grid uk-width-2-3 uk-container-center">
265   - <div class="uk-form-row">
266   - <label class="uk-form-label">
267   - 车辆自编号:
268   - </label>
269   - <div class="uk-form-controls">
270   - <input type="text" class="form-control" name="REPORT_ZBH" placeholder="车辆自编号" required>
271   - </div>
272   - </div>
273   - </div>
274   - <div class="uk-grid uk-width-2-3 uk-container-center">
275   - <div class="uk-form-row">
276   - <label class="uk-form-label">
277   - 驾驶员:
278   - </label>
279   - <div class="uk-form-controls">
280   - <input type="text" class="form-control" name="REPORT_JSY" placeholder="驾驶员" required>
281   - </div>
282   - </div>
283   - </div>
284   - <div class="uk-grid uk-width-2-3 uk-container-center">
285   - <div class="uk-form-row">
286   - <label class="uk-form-label">
287   - 事故发生时间:
288   - </label>
289   - <div class="uk-form-controls">
290   - <input type="text" class="form-control" name="REPORT_SGSJ" placeholder="事故发生时间" required>
291   - </div>
292   - </div>
293   - </div>
294   - <div class="uk-grid uk-width-2-3 uk-container-center">
295   - <div class="uk-form-row">
296   - <label class="uk-form-label">
297   - 事故发生地点:
298   - </label>
299   - <div class="uk-form-controls">
300   - <input type="text" class="form-control" name="REPORT_SGDD" placeholder="事故发生地点" required>
301   - </div>
302   - </div>
303   - </div>
304   - <div class="uk-grid uk-width-2-3 uk-container-center">
305   - <div class="uk-form-row">
306   - <label class="uk-form-label">
307   - 行驶方向:
308   - </label>
309   - <div class="uk-form-controls">
310   - <input type="text" class="form-control" name="REPORT_XSFX" placeholder="行驶方向" required>
311   - </div>
312   - </div>
313   - </div>
314   - <div class="uk-grid uk-width-2-3 uk-container-center">
315   - <div class="uk-form-row">
316   - <label class="uk-form-label">
317   - 事故对象:
318   - </label>
319   - <div class="uk-form-controls">
320   - <input type="text" class="form-control" name="REPORT_SGDX" placeholder="事故对象" required>
321   - </div>
322   - </div>
323   - </div>
324   - <div class="uk-grid uk-width-2-3 uk-container-center">
325   - <div class="uk-form-row">
326   - <label class="uk-form-label">
327   - 对象车牌号:
328   - </label>
329   - <div class="uk-form-controls">
330   - <input type="text" class="form-control" name="REPORT_DXPZH" placeholder="对象车牌号" required>
331   - </div>
332   - </div>
333   - </div>
334   - <div class="uk-grid uk-width-2-3 uk-container-center">
335   - <div class="uk-form-row">
336   - <label class="uk-form-label">
337   - 事故概况:
338   - </label>
339   - <div class="uk-form-controls">
340   - <input type="text" class="form-control" name="REPORT_SGGK" placeholder="事故概况" required>
341   - </div>
342   - </div>
343   - </div>
344   - <div class="uk-grid uk-width-2-3 uk-container-center">
345   - <div class="uk-form-row">
346   - <label class="uk-form-label">
347   - 受伤人数:
348   - </label>
349   - <div class="uk-form-controls">
350   - <input type="text" class="form-control" name="REPORT_SSRS" placeholder="受伤人数" required>
351   - </div>
352   - </div>
353   - </div>
354   - <div class="uk-grid uk-width-2-3 uk-container-center">
355   - <div class="uk-form-row">
356   - <label class="uk-form-label">
357   - 死亡人数:
358   - </label>
359   - <div class="uk-form-controls">
360   - <input type="text" class="form-control" name="REPORT_SWRS" placeholder="死亡人数" required>
361   - </div>
362   - </div>
363   - </div>
364   - <div class="uk-grid uk-width-2-3 uk-container-center">
365   - <div class="uk-form-row">
366   - <label class="uk-form-label">
367   - 报告人:
368   - </label>
369   - <div class="uk-form-controls">
370   - <input type="text" class="form-control" name="REPORT_BGR" placeholder="报告人" required >
371   - </div>
372   - </div>
373   - </div>
374   - <div class="uk-grid uk-width-2-3 uk-container-center">
375   - <div class="uk-form-row">
376   - <label class="uk-form-label">
377   - 报告人电话:
378   - </label>
379   - <div class="uk-form-controls">
380   - <input type="text" class="form-control" name="REPORT_BGRDH" placeholder="报告人电话" required>
381   - </div>
382   - </div>
383   - </div>
384   - <div class="uk-grid uk-width-2-3 uk-container-center">
385   - <div class="uk-form-row">
386   - <label class="uk-form-label"> 备注:</label>
387   - <div class="uk-form-controls">
388   - <input type="text" class="form-control" name="REPORT_BZ" placeholder="备注">
389   - </div>
390   - </div>
391   - </div>
392   - <div class="uk-modal-footer uk-text-right">
393   - <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
394   - <button type="button" class="uk-button uk-modal-close">取消</button>
395   - <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
396   - </div>
397   - </form>
398   - <!-- 其他-->
399   - <form id="add_rests_table" class="c_register_form" style="display:none; margin-top: 35px;">
400   -
401   - <div class="uk-grid uk-width-2-3 uk-container-center">
402   - <div class="uk-form-row">
403   - <label class="uk-form-label">
404   - 报备内容:
405   - </label>
406   - <div class="uk-form-controls">
407   - <input type="text" class="form-control" name="REPORT_BZ" placeholder="报备内容" required>
408   - </div>
409   - </div>
410   - </div>
411   - <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
412   - <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
413   - <button type="button" class="uk-button uk-modal-close">取消</button>
414   - <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
415   - </div>
416   - </form>
417   - <!-- 咨询-->
418   - <form id="add_consult_table" class="c_register_form" style="display:none; margin-top: 35px;">
419   - <div class="uk-grid uk-width-2-3 uk-container-center">
420   - <div class="uk-form-row">
421   - <label class="uk-form-label">
422   - 班线名称:
423   - </label>
424   - <div class="uk-form-controls">
425   - <input type="text" class="form-control" name="REPORT_STATION" placeholder="班线名称" required>
426   - </div>
427   - </div>
428   - </div>
429   - <div class="uk-grid uk-width-2-3 uk-container-center">
430   - <div class="uk-form-row">
431   - <label class="uk-form-label">
432   - 内容:
433   - </label>
434   - <div class="uk-form-controls">
435   - <input type="text" class="form-control" name="REPORT_BZ" placeholder="内容" required>
436   - </div>
437   - </div>
438   - </div>
439   - <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
440   - <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
441   - <button type="button" class="uk-button uk-modal-close">取消</button>
442   - <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
443   - </div>
444   - </form>
445   - </div>
446   - </div>
447   -
448   - <script>
449   - (function () {
450   - var modal = '#report_register_add_mobal';
451   - // var form = '#report_register_form';
452   - var tableActive = '',formActive = '';
453   - var REPORT_TYPE,
454   - lineList = {},
455   - companyMap = new Map(),
456   - user = {};
457   -
458   - $("#REPORT_XL").on("change", function(){
459   - var lineCode = $(this).val();
460   - if(lineCode == "" || lineCode == undefined || lineCode == null){
461   - $('#REPORT_GS').val();
462   - $('#REPORT_FGS').val();
463   - $('#REPORT_GSNAME').val();
464   - $('#REPORT_FGSNAME').val();
465   - } else {
466   - // var temp = companyMap[lineCode].split("_");
467   - var code = companyMap[lineCode].split("-")[0].split(":");
468   - var name = companyMap[lineCode].split("-")[1].split(":");
469   - $('#REPORT_GS').val(code[0]);
470   - $('#REPORT_FGS').val(code[1]);
471   - $('#REPORT_GSNAME').val(name[0]);
472   - $('#REPORT_FGSNAME').val(name[1]);
473   - $("#REPORT_XLNAME").val($('#REPORT_XL option:selected').text());
474   - }
475   - });
476   -
477   - $(modal).on('init', function (e, data) {
478   - $('#REPORT_DATE').datetimepicker({
479   - format : 'YYYY-MM-DD HH:mm:ss',
480   - locale : 'zh-cn'
481   - });
482   - $('#REPORT_DATE').val(moment(new Date()).format('YYYY-MM-DD HH:mm:ss'));
483   - tableActive = "add_"+data.tableActive;
484   - var typeInt = 1;
485   - if (tableActive == 'add_first_last_late_table') {
486   - typeInt = 1;
487   - } else if (tableActive == 'add_large_interval_table') {
488   - typeInt = 2;
489   - } else if (tableActive == 'add_emergency_table') {
490   - typeInt = 3;
491   - } else if (tableActive == 'add_accident_table') {
492   - typeInt = 4;
493   - } else if (tableActive == 'add_rests_table') {
494   - typeInt = 5;
495   - } else if (tableActive == 'add_consult_table') {
496   - typeInt = 6;
497   - } else {
498   - UIkit.modal(modal).hide();
499   - notify_err('您所选的数据有问题,请重新选择!');
500   - return;
501   - }
502   - $('#REPORT_TYPE').val(typeInt);
503   - document.getElementById(tableActive).style.display = "";
504   - lineList = data.lineList;
505   - user = data.user;
506   - $('#REPORT_BBR').val(user.userName+'/'+user.name);
507   - gb_common.$get("/user/companyData",null,function(result) {
508   - var len_ = lineList.length,lineData=[];
509   - if (len_ > 0) {
510   - // 遍历线路对应的公司
511   - for (var i = 0; i < result.length; i++) {
512   - var companyCode = result[i].companyCode;
513   - var children = result[i].children;
514   - for (var j = 0; j < children.length; j++) {
515   - var code = children[j].code;
516   - for (var k = 0; k < lineList.length; k++) {
517   - if (lineList[k].brancheCompany == code && lineList[k].company == companyCode) {
518   - // companyMap[lineList[k].lineCode] = companyCode + "_" + code;
519   - companyMap[lineList[k].lineCode] = companyCode + ":" + code + "-" + result[i].companyName + ":" + result[i].children[j].name;
520   - // lineData.push({id: lineList[k]["lineCode"], text: lineList[k]["name"]});
521   - }
522   - }
523   - }
524   - }
525   - }
526   -
527   - // initPinYinSelect2('#REPORT_XL',data,'');
528   -
529   - // var options = '<option value="">请选择...</option>';
530   - var options = '';
531   - $.each(lineList, function (i,line) {
532   - options += '<option value='+line.lineCode+'>'+line.name+'</option>';
533   - });
534   - $('#REPORT_XL').html(options);
535   - // 模拟change给公司分公司赋值
536   - $('#REPORT_XL').trigger("change");
537   -
538   - });
539   - changeType(tableActive);
540   -
541   - $('#REPORT_TYPE').on('change',function () {
542   - document.getElementById(tableActive).style.display = "none";
543   - REPORT_TYPE = this.value;
544   - if (REPORT_TYPE == 1) {
545   - tableActive = 'add_first_last_late_table';
546   - } else if (REPORT_TYPE == 2) {
547   - tableActive = 'add_large_interval_table';
548   - } else if (REPORT_TYPE == 3) {
549   - tableActive = 'add_emergency_table';
550   - } else if (REPORT_TYPE == 4) {
551   - tableActive = 'add_accident_table';
552   - } else if (REPORT_TYPE == 5) {
553   - tableActive = 'add_rests_table';
554   - } else if (REPORT_TYPE == 6) {
555   - tableActive = 'add_consult_table';
556   - }
557   - document.getElementById(tableActive).style.display = "";
558   - changeType(tableActive);
559   - });
560   - });
561   -
562   - function changeType(tableActiveStr) {
563   - formActive = $('#'+tableActiveStr);
564   - // formActive = $('#'+tableActive);
565   - //校验不过
566   - formActive.on('err.field.fv', function () {
567   - $('#submitChildTaskBtn', modal).removeClass('disabled').removeAttr('disabled');
568   - });
569   -
570   - //校验
571   - formActive.formValidation({framework: 'uikit', locale: 'zh_CN'});
572   - //提交
573   - formActive.on('success.form.fv', function (e) {
574   - e.preventDefault();
575   - // disabled_submit_btn(formActive);
576   - var headData = $('#add_head_table').serializeJSON();
577   - var bodyData = $(formActive).serializeJSON();
578   - var params = {};
579   - Object.assign(params,headData,bodyData);
580   - params.STATUS = 0;
581   - gb_common.$post('/reportRegister/', params, function (rs) {
582   - if(rs.status == 'SUCCESS'){
583   - // $('#report-register-modal').trigger('refresh', {'tableActive' : tableActive,'companyMap':companyMap,'lineList':lineList,'user':user});
584   - UIkit.modal(modal).hide();
585   - notify_succ('新增成功!');
586   - manageJs.refreshDate();
587   - if(rs.status2.CODE == '0')
588   - notify_succ('同步到服务热线系统成功!');
589   - else
590   - notify_err('同步到服务热线系统失败!');
591   - } else
592   - notify_err('新增失败!');
593   -
594   - });
595   - });
596   - }
597   -
598   - //submit
599   - $('.submitBtn', modal).on('click', function () {
600   - $(this).addClass('disabled').attr('disabled', 'disabled');
601   - formActive.data('valid', false);
602   - formActive.formValidation('validate');
603   - });
604   - })();
605   - </script>
  1 +<div class="uk-modal" id="report_register_add_mobal">
  2 + <div class="uk-modal-dialog" style="width: 600px;">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>添加报备登记</h2>
  6 + </div>
  7 + <div class="uk-form uk-form-horizontal" id="report_register_form">
  8 + <!--<div class="alert alert-danger display-hide">-->
  9 + <!--您的输入有误,请检查下面的输入项-->
  10 + <!--</div>-->
  11 + <!-- 线路ID -->
  12 + <!--<input type="hidden" name="REPORT_DATE" id="REPORT_DATE">-->
  13 + <form id="add_head_table">
  14 + <input type="hidden" name="REPORT_BBR" id="REPORT_BBR" value="">
  15 + <input type="hidden" name="REPORT_GS" id="REPORT_GS" value="">
  16 + <input type="hidden" name="REPORT_FGS" id="REPORT_FGS" value="">
  17 + <input type="hidden" name="REPORT_GSNAME" id="REPORT_GSNAME" value="">
  18 + <input type="hidden" name="REPORT_FGSNAME" id="REPORT_FGSNAME" value="">
  19 + <input type="hidden" name="REPORT_XLNAME" id="REPORT_XLNAME" value="">
  20 +
  21 + <!-- 报备时间 -->
  22 + <div class="uk-grid uk-width-2-3 uk-container-center">
  23 + <div class="uk-form-row">
  24 + <label class="uk-form-label">
  25 + 报备时间:
  26 + </label>
  27 + <div class="uk-form-controls">
  28 + <input type="text" class="form-control" name="REPORT_DATE" id="REPORT_DATE" readonly="readonly">
  29 + </div>
  30 + </div>
  31 + </div>
  32 + <!-- 类型 -->
  33 + <div class="uk-grid uk-width-2-3 uk-container-center">
  34 + <div class="uk-form-row">
  35 + <label class="uk-form-label">
  36 + 类型:
  37 + </label>
  38 + <div class="uk-form-controls">
  39 + <select class="form-control typeSelect" name="REPORT_TYPE" id="REPORT_TYPE">
  40 + <option value="1">首末班误点</option>
  41 + <option value="2">大间隔</option>
  42 + <option value="3">突发事件</option>
  43 + <option value="4">事故</option>
  44 + <option value="5">其他</option>
  45 + <option value="6">咨询</option>
  46 + </select>
  47 + </div>
  48 + </div>
  49 + </div>
  50 + <!-- 路段名称 -->
  51 + <div class="uk-grid uk-width-2-3 uk-container-center">
  52 + <div class="uk-form-row">
  53 + <label class="uk-form-label">
  54 + 线路:
  55 + </label>
  56 + <div class="uk-form-controls">
  57 + <select class="form-control lineSelect" name="REPORT_XL" id="REPORT_XL">
  58 + </select>
  59 + </div>
  60 + </div>
  61 + </div>
  62 + </form>
  63 + <!-- 首末班误点-->
  64 + <form id="add_first_last_late_table" class="c_register_form" style="display:none; margin-top: 35px;">
  65 + <div class="uk-grid uk-width-2-3 uk-container-center">
  66 + <div class="uk-form-row">
  67 + <label class="uk-form-label">
  68 + 延误站点:
  69 + </label>
  70 + <div class="uk-form-controls">
  71 + <input type="text" class="form-control" name="REPORT_STATION" placeholder="延误站点" required>
  72 + </div>
  73 + </div>
  74 + </div>
  75 + <div class="uk-grid uk-width-2-3 uk-container-center">
  76 + <div class="uk-form-row">
  77 + <label class="uk-form-label">
  78 + 延误时间:
  79 + </label>
  80 + <div class="uk-form-controls">
  81 + <input type="text" class="form-control" name="REPORT_YWSJ" placeholder="延误时间" required>
  82 + </div>
  83 + </div>
  84 + </div>
  85 + <div class="uk-grid uk-width-2-3 uk-container-center">
  86 + <div class="uk-form-row">
  87 + <label class="uk-form-label">
  88 + 首末班延误原因:
  89 + </label>
  90 + <div class="uk-form-controls">
  91 + <input type="text" class="form-control" name="REPORT_SMBWD" placeholder="首末班延误原因" required>
  92 + </div>
  93 + </div>
  94 + </div>
  95 + <div class="uk-grid uk-width-2-3 uk-container-center">
  96 + <div class="uk-form-row">
  97 + <label class="uk-form-label">
  98 + 对外上报部门:
  99 + </label>
  100 + <div class="uk-form-controls">
  101 + <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required>
  102 + </div>
  103 + </div>
  104 + </div>
  105 + <div class="uk-grid uk-width-2-3 uk-container-center">
  106 + <div class="uk-form-row">
  107 + <label class="uk-form-label">对外上报时间:</label>
  108 + <div class="uk-form-controls">
  109 + <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required>
  110 + </div>
  111 + </div>
  112 + </div>
  113 + <div class="uk-modal-footer uk-text-right">
  114 + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
  115 + <button type="button" class="uk-button uk-modal-close">取消</button>
  116 + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
  117 + </div>
  118 + </form>
  119 + <!-- 大间隔-->
  120 + <form id="add_large_interval_table" class="c_register_form" style="display:none; margin-top: 35px;">
  121 + <div class="uk-grid uk-width-2-3 uk-container-center">
  122 + <div class="uk-form-row">
  123 + <label class="uk-form-label">
  124 + 路段:
  125 + </label>
  126 + <div class="uk-form-controls">
  127 + <input type="text" class="form-control" name="REPORT_ROAD" placeholder="路段" required>
  128 + </div>
  129 + </div>
  130 + </div>
  131 + <div class="uk-grid uk-width-2-3 uk-container-center">
  132 + <div class="uk-form-row">
  133 + <label class="uk-form-label">
  134 + 行驶方向:
  135 + </label>
  136 + <div class="uk-form-controls">
  137 + <input type="text" class="form-control" name="REPORT_XSFX" placeholder="行驶方向" required>
  138 + </div>
  139 + </div>
  140 + </div>
  141 + <div class="uk-grid uk-width-2-3 uk-container-center">
  142 + <div class="uk-form-row">
  143 + <label class="uk-form-label">
  144 + 站点:
  145 + </label>
  146 + <div class="uk-form-controls">
  147 + <input type="text" class="form-control" name="REPORT_STATION" placeholder="站点" required >
  148 + </div>
  149 + </div>
  150 + </div>
  151 + <div class="uk-grid uk-width-2-3 uk-container-center">
  152 + <div class="uk-form-row">
  153 + <label class="uk-form-label">
  154 + 大间隔时间:
  155 + </label>
  156 + <div class="uk-form-controls">
  157 + <input type="text" class="form-control" name="REPORT_DJGSJ" placeholder="大间隔时间" required>
  158 + </div>
  159 + </div>
  160 + </div>
  161 + <div class="uk-grid uk-width-2-3 uk-container-center">
  162 + <div class="uk-form-row">
  163 + <label class="uk-form-label">
  164 + 大间隔原因:
  165 + </label>
  166 + <div class="uk-form-controls">
  167 + <input type="text" class="form-control" name="REPORT_DJGYY" placeholder="大间隔原因" required>
  168 + </div>
  169 + </div>
  170 + </div>
  171 + <div class="uk-grid uk-width-2-3 uk-container-center">
  172 + <div class="uk-form-row">
  173 + <label class="uk-form-label">
  174 + 对外上报部门:
  175 + </label>
  176 + <div class="uk-form-controls">
  177 + <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required>
  178 + </div>
  179 + </div>
  180 + </div>
  181 + <div class="uk-grid uk-width-2-3 uk-container-center">
  182 + <div class="uk-form-row">
  183 + <label class="uk-form-label">对外上报时间:</label>
  184 + <div class="uk-form-controls">
  185 + <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required>
  186 + </div>
  187 + </div>
  188 + </div>
  189 + <div class="uk-modal-footer uk-text-right">
  190 + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
  191 + <button type="button" class="uk-button uk-modal-close">取消</button>
  192 + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
  193 + </div>
  194 + </form>
  195 + <!-- 突发事件-->
  196 + <form id="add_emergency_table" class="c_register_form" style="display:none; margin-top: 35px;">
  197 +
  198 + <div class="uk-grid uk-width-2-3 uk-container-center">
  199 + <div class="uk-form-row">
  200 + <label class="uk-form-label">
  201 + 重大活动货突发事件:
  202 + </label>
  203 + <div class="uk-form-controls">
  204 + <input type="text" class="form-control" name="REPORT_TFSJ" placeholder="重大活动货突发事件" required>
  205 + </div>
  206 + </div>
  207 + </div>
  208 + <div class="uk-grid uk-width-2-3 uk-container-center">
  209 + <div class="uk-form-row">
  210 + <label class="uk-form-label">
  211 + 影响时间:
  212 + </label>
  213 + <div class="uk-form-controls">
  214 + <input type="text" class="form-control" name="REPORT_YXSJ" placeholder="影响时间" required>
  215 + </div>
  216 + </div>
  217 + </div>
  218 + <div class="uk-grid uk-width-2-3 uk-container-center">
  219 + <div class="uk-form-row">
  220 + <label class="uk-form-label">
  221 + 影响班次数:
  222 + </label>
  223 + <div class="uk-form-controls">
  224 + <input type="text" class="form-control" name="REPORT_YXBC" placeholder="影响班次数" required>
  225 + </div>
  226 + </div>
  227 + </div>
  228 + <div class="uk-grid uk-width-2-3 uk-container-center">
  229 + <div class="uk-form-row">
  230 + <label class="uk-form-label">
  231 + 调整措施:
  232 + </label>
  233 + <div class="uk-form-controls">
  234 + <input type="text" class="form-control" name="REPORT_TZCS" placeholder="调整措施" required>
  235 + </div>
  236 + </div>
  237 + </div>
  238 + <div class="uk-grid uk-width-2-3 uk-container-center">
  239 + <div class="uk-form-row">
  240 + <label class="uk-form-label">
  241 + 对外上报部门:
  242 + </label>
  243 + <div class="uk-form-controls">
  244 + <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required>
  245 + </div>
  246 + </div>
  247 + </div>
  248 + <div class="uk-grid uk-width-2-3 uk-container-center">
  249 + <div class="uk-form-row">
  250 + <label class="uk-form-label">对外上报时间:</label>
  251 + <div class="uk-form-controls">
  252 + <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required>
  253 + </div>
  254 + </div>
  255 + </div>
  256 + <div class="uk-modal-footer uk-text-right">
  257 + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
  258 + <button type="button" class="uk-button uk-modal-close">取消</button>
  259 + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
  260 + </div>
  261 + </form>
  262 + <!-- 事故-->
  263 + <form id="add_accident_table" class="c_register_form" style="display:none; margin-top: 35px;">
  264 + <div class="uk-grid uk-width-2-3 uk-container-center">
  265 + <div class="uk-form-row">
  266 + <label class="uk-form-label">
  267 + 车辆自编号:
  268 + </label>
  269 + <div class="uk-form-controls">
  270 + <input type="text" class="form-control" name="REPORT_ZBH" placeholder="车辆自编号" required>
  271 + </div>
  272 + </div>
  273 + </div>
  274 + <div class="uk-grid uk-width-2-3 uk-container-center">
  275 + <div class="uk-form-row">
  276 + <label class="uk-form-label">
  277 + 驾驶员:
  278 + </label>
  279 + <div class="uk-form-controls">
  280 + <input type="text" class="form-control" name="REPORT_JSY" placeholder="驾驶员" required>
  281 + </div>
  282 + </div>
  283 + </div>
  284 + <div class="uk-grid uk-width-2-3 uk-container-center">
  285 + <div class="uk-form-row">
  286 + <label class="uk-form-label">
  287 + 事故发生时间:
  288 + </label>
  289 + <div class="uk-form-controls">
  290 + <input type="text" class="form-control" name="REPORT_SGSJ" placeholder="事故发生时间" required>
  291 + </div>
  292 + </div>
  293 + </div>
  294 + <div class="uk-grid uk-width-2-3 uk-container-center">
  295 + <div class="uk-form-row">
  296 + <label class="uk-form-label">
  297 + 事故发生地点:
  298 + </label>
  299 + <div class="uk-form-controls">
  300 + <input type="text" class="form-control" name="REPORT_SGDD" placeholder="事故发生地点" required>
  301 + </div>
  302 + </div>
  303 + </div>
  304 + <div class="uk-grid uk-width-2-3 uk-container-center">
  305 + <div class="uk-form-row">
  306 + <label class="uk-form-label">
  307 + 行驶方向:
  308 + </label>
  309 + <div class="uk-form-controls">
  310 + <input type="text" class="form-control" name="REPORT_XSFX" placeholder="行驶方向" required>
  311 + </div>
  312 + </div>
  313 + </div>
  314 + <div class="uk-grid uk-width-2-3 uk-container-center">
  315 + <div class="uk-form-row">
  316 + <label class="uk-form-label">
  317 + 事故对象:
  318 + </label>
  319 + <div class="uk-form-controls">
  320 + <input type="text" class="form-control" name="REPORT_SGDX" placeholder="事故对象" required>
  321 + </div>
  322 + </div>
  323 + </div>
  324 + <div class="uk-grid uk-width-2-3 uk-container-center">
  325 + <div class="uk-form-row">
  326 + <label class="uk-form-label">
  327 + 对象车牌号:
  328 + </label>
  329 + <div class="uk-form-controls">
  330 + <input type="text" class="form-control" name="REPORT_DXPZH" placeholder="对象车牌号" required>
  331 + </div>
  332 + </div>
  333 + </div>
  334 + <div class="uk-grid uk-width-2-3 uk-container-center">
  335 + <div class="uk-form-row">
  336 + <label class="uk-form-label">
  337 + 事故概况:
  338 + </label>
  339 + <div class="uk-form-controls">
  340 + <input type="text" class="form-control" name="REPORT_SGGK" placeholder="事故概况" required>
  341 + </div>
  342 + </div>
  343 + </div>
  344 + <div class="uk-grid uk-width-2-3 uk-container-center">
  345 + <div class="uk-form-row">
  346 + <label class="uk-form-label">
  347 + 受伤人数:
  348 + </label>
  349 + <div class="uk-form-controls">
  350 + <input type="text" class="form-control" name="REPORT_SSRS" placeholder="受伤人数" required>
  351 + </div>
  352 + </div>
  353 + </div>
  354 + <div class="uk-grid uk-width-2-3 uk-container-center">
  355 + <div class="uk-form-row">
  356 + <label class="uk-form-label">
  357 + 死亡人数:
  358 + </label>
  359 + <div class="uk-form-controls">
  360 + <input type="text" class="form-control" name="REPORT_SWRS" placeholder="死亡人数" required>
  361 + </div>
  362 + </div>
  363 + </div>
  364 + <div class="uk-grid uk-width-2-3 uk-container-center">
  365 + <div class="uk-form-row">
  366 + <label class="uk-form-label">
  367 + 报告人:
  368 + </label>
  369 + <div class="uk-form-controls">
  370 + <input type="text" class="form-control" name="REPORT_BGR" placeholder="报告人" required >
  371 + </div>
  372 + </div>
  373 + </div>
  374 + <div class="uk-grid uk-width-2-3 uk-container-center">
  375 + <div class="uk-form-row">
  376 + <label class="uk-form-label">
  377 + 报告人电话:
  378 + </label>
  379 + <div class="uk-form-controls">
  380 + <input type="text" class="form-control" name="REPORT_BGRDH" placeholder="报告人电话" required>
  381 + </div>
  382 + </div>
  383 + </div>
  384 + <div class="uk-grid uk-width-2-3 uk-container-center">
  385 + <div class="uk-form-row">
  386 + <label class="uk-form-label"> 备注:</label>
  387 + <div class="uk-form-controls">
  388 + <input type="text" class="form-control" name="REPORT_BZ" placeholder="备注">
  389 + </div>
  390 + </div>
  391 + </div>
  392 + <div class="uk-modal-footer uk-text-right">
  393 + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
  394 + <button type="button" class="uk-button uk-modal-close">取消</button>
  395 + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
  396 + </div>
  397 + </form>
  398 + <!-- 其他-->
  399 + <form id="add_rests_table" class="c_register_form" style="display:none; margin-top: 35px;">
  400 +
  401 + <div class="uk-grid uk-width-2-3 uk-container-center">
  402 + <div class="uk-form-row">
  403 + <label class="uk-form-label">
  404 + 报备内容:
  405 + </label>
  406 + <div class="uk-form-controls">
  407 + <input type="text" class="form-control" name="REPORT_BZ" placeholder="报备内容" required>
  408 + </div>
  409 + </div>
  410 + </div>
  411 + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
  412 + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
  413 + <button type="button" class="uk-button uk-modal-close">取消</button>
  414 + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
  415 + </div>
  416 + </form>
  417 + <!-- 咨询-->
  418 + <form id="add_consult_table" class="c_register_form" style="display:none; margin-top: 35px;">
  419 + <div class="uk-grid uk-width-2-3 uk-container-center">
  420 + <div class="uk-form-row">
  421 + <label class="uk-form-label">
  422 + 班线名称:
  423 + </label>
  424 + <div class="uk-form-controls">
  425 + <input type="text" class="form-control" name="REPORT_STATION" placeholder="班线名称" required>
  426 + </div>
  427 + </div>
  428 + </div>
  429 + <div class="uk-grid uk-width-2-3 uk-container-center">
  430 + <div class="uk-form-row">
  431 + <label class="uk-form-label">
  432 + 内容:
  433 + </label>
  434 + <div class="uk-form-controls">
  435 + <input type="text" class="form-control" name="REPORT_BZ" placeholder="内容" required>
  436 + </div>
  437 + </div>
  438 + </div>
  439 + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
  440 + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
  441 + <button type="button" class="uk-button uk-modal-close">取消</button>
  442 + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
  443 + </div>
  444 + </form>
  445 + </div>
  446 + </div>
  447 +
  448 + <script>
  449 + (function () {
  450 + var modal = '#report_register_add_mobal';
  451 + // var form = '#report_register_form';
  452 + var tableActive = '',formActive = '';
  453 + var REPORT_TYPE,
  454 + lineList = {},
  455 + companyMap = new Map(),
  456 + user = {};
  457 +
  458 + $("#REPORT_XL").on("change", function(){
  459 + var lineCode = $(this).val();
  460 + if(lineCode == "" || lineCode == undefined || lineCode == null){
  461 + $('#REPORT_GS').val();
  462 + $('#REPORT_FGS').val();
  463 + $('#REPORT_GSNAME').val();
  464 + $('#REPORT_FGSNAME').val();
  465 + } else {
  466 + // var temp = companyMap[lineCode].split("_");
  467 + var code = companyMap[lineCode].split("-")[0].split(":");
  468 + var name = companyMap[lineCode].split("-")[1].split(":");
  469 + $('#REPORT_GS').val(code[0]);
  470 + $('#REPORT_FGS').val(code[1]);
  471 + $('#REPORT_GSNAME').val(name[0]);
  472 + $('#REPORT_FGSNAME').val(name[1]);
  473 + $("#REPORT_XLNAME").val($('#REPORT_XL option:selected').text());
  474 + }
  475 + });
  476 +
  477 + $(modal).on('init', function (e, data) {
  478 + $('#REPORT_DATE').datetimepicker({
  479 + format : 'YYYY-MM-DD HH:mm:ss',
  480 + locale : 'zh-cn'
  481 + });
  482 + $('#REPORT_DATE').val(moment(new Date()).format('YYYY-MM-DD HH:mm:ss'));
  483 + tableActive = "add_"+data.tableActive;
  484 + var typeInt = 1;
  485 + if (tableActive == 'add_first_last_late_table') {
  486 + typeInt = 1;
  487 + } else if (tableActive == 'add_large_interval_table') {
  488 + typeInt = 2;
  489 + } else if (tableActive == 'add_emergency_table') {
  490 + typeInt = 3;
  491 + } else if (tableActive == 'add_accident_table') {
  492 + typeInt = 4;
  493 + } else if (tableActive == 'add_rests_table') {
  494 + typeInt = 5;
  495 + } else if (tableActive == 'add_consult_table') {
  496 + typeInt = 6;
  497 + } else {
  498 + UIkit.modal(modal).hide();
  499 + notify_err('您所选的数据有问题,请重新选择!');
  500 + return;
  501 + }
  502 + $('#REPORT_TYPE').val(typeInt);
  503 + document.getElementById(tableActive).style.display = "";
  504 + lineList = data.lineList;
  505 + user = data.user;
  506 + $('#REPORT_BBR').val(user.userName+'/'+user.name);
  507 + gb_common.$get("/user/companyData",null,function(result) {
  508 + var len_ = lineList.length,lineData=[];
  509 + if (len_ > 0) {
  510 + // 遍历线路对应的公司
  511 + for (var i = 0; i < result.length; i++) {
  512 + var companyCode = result[i].companyCode;
  513 + var children = result[i].children;
  514 + for (var j = 0; j < children.length; j++) {
  515 + var code = children[j].code;
  516 + for (var k = 0; k < lineList.length; k++) {
  517 + if (lineList[k].brancheCompany == code && lineList[k].company == companyCode) {
  518 + // companyMap[lineList[k].lineCode] = companyCode + "_" + code;
  519 + companyMap[lineList[k].lineCode] = companyCode + ":" + code + "-" + result[i].companyName + ":" + result[i].children[j].name;
  520 + // lineData.push({id: lineList[k]["lineCode"], text: lineList[k]["name"]});
  521 + }
  522 + }
  523 + }
  524 + }
  525 + }
  526 +
  527 + // initPinYinSelect2('#REPORT_XL',data,'');
  528 +
  529 + // var options = '<option value="">请选择...</option>';
  530 + var options = '';
  531 + $.each(lineList, function (i,line) {
  532 + options += '<option value='+line.lineCode+'>'+line.name+'</option>';
  533 + });
  534 + $('#REPORT_XL').html(options);
  535 + // 模拟change给公司分公司赋值
  536 + $('#REPORT_XL').trigger("change");
  537 +
  538 + });
  539 + changeType(tableActive);
  540 +
  541 + $('#REPORT_TYPE').on('change',function () {
  542 + document.getElementById(tableActive).style.display = "none";
  543 + REPORT_TYPE = this.value;
  544 + if (REPORT_TYPE == 1) {
  545 + tableActive = 'add_first_last_late_table';
  546 + } else if (REPORT_TYPE == 2) {
  547 + tableActive = 'add_large_interval_table';
  548 + } else if (REPORT_TYPE == 3) {
  549 + tableActive = 'add_emergency_table';
  550 + } else if (REPORT_TYPE == 4) {
  551 + tableActive = 'add_accident_table';
  552 + } else if (REPORT_TYPE == 5) {
  553 + tableActive = 'add_rests_table';
  554 + } else if (REPORT_TYPE == 6) {
  555 + tableActive = 'add_consult_table';
  556 + }
  557 + document.getElementById(tableActive).style.display = "";
  558 + changeType(tableActive);
  559 + });
  560 + });
  561 +
  562 + function changeType(tableActiveStr) {
  563 + formActive = $('#'+tableActiveStr);
  564 + // formActive = $('#'+tableActive);
  565 + //校验不过
  566 + formActive.on('err.field.fv', function () {
  567 + $('#submitChildTaskBtn', modal).removeClass('disabled').removeAttr('disabled');
  568 + });
  569 +
  570 + //校验
  571 + formActive.formValidation({framework: 'uikit', locale: 'zh_CN'});
  572 + //提交
  573 + formActive.on('success.form.fv', function (e) {
  574 + e.preventDefault();
  575 + // disabled_submit_btn(formActive);
  576 + var headData = $('#add_head_table').serializeJSON();
  577 + var bodyData = $(formActive).serializeJSON();
  578 + var params = {};
  579 + Object.assign(params,headData,bodyData);
  580 + params.STATUS = 0;
  581 + gb_common.$post('/reportRegister/', params, function (rs) {
  582 + if(rs.status == 'SUCCESS'){
  583 + // $('#report-register-modal').trigger('refresh', {'tableActive' : tableActive,'companyMap':companyMap,'lineList':lineList,'user':user});
  584 + UIkit.modal(modal).hide();
  585 + notify_succ('新增成功!');
  586 + manageJs.refreshDate();
  587 + if(rs.status2.CODE == '0')
  588 + notify_succ('同步到服务热线系统成功!');
  589 + else
  590 + notify_err('同步到服务热线系统失败!');
  591 + } else
  592 + notify_err('新增失败!');
  593 +
  594 + });
  595 + });
  596 + }
  597 +
  598 + //submit
  599 + $('.submitBtn', modal).on('click', function () {
  600 + $(this).addClass('disabled').attr('disabled', 'disabled');
  601 + formActive.data('valid', false);
  602 + formActive.formValidation('validate');
  603 + });
  604 + })();
  605 + </script>
606 606 </div>
607 607 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/css/main.css
1   -
2   -.report-register-table1 dl dt:nth-of-type(1), .report-register-table1 dl dd:nth-of-type(1) {
3   - width: 2%;
4   -}
5   -.report-register-table1 dl dt:nth-of-type(2), .report-register-table1 dl dd:nth-of-type(2) {
6   - width: 4%;
7   -}
8   -.report-register-table1 dl dt:nth-of-type(3), .report-register-table1 dl dd:nth-of-type(3) {
9   - width: 7%;
10   -}
11   -.report-register-table1 dl dt:nth-of-type(4), .report-register-table1 dl dd:nth-of-type(4) {
12   - width: 7%;
13   -}
14   -.report-register-table1 dl dt:nth-of-type(5), .report-register-table1 dl dd:nth-of-type(5) {
15   - width: 7%;
16   -}
17   -.report-register-table1 dl dt:nth-of-type(6), .report-register-table1 dl dd:nth-of-type(6) {
18   - width: 7%;
19   -}
20   -.report-register-table1 dl dt:nth-of-type(7), .report-register-table1 dl dd:nth-of-type(7) {
21   - width: 10%;
22   -}
23   -.report-register-table1 dl dt:nth-of-type(8), .report-register-table1 dl dd:nth-of-type(8) {
24   - width: 7%;
25   -}
26   -.report-register-table1 dl dt:nth-of-type(9), .report-register-table1 dl dd:nth-of-type(9) {
27   - width: 7%;
28   -}
29   -.report-register-table1 dl dt:nth-of-type(10), .report-register-table1 dl dd:nth-of-type(10) {
30   - width: 7%;
31   -}
32   -.report-register-table1 dl dt:nth-of-type(11), .report-register-table1 dl dd:nth-of-type(11) {
33   - width: 7%;
34   -}
35   -.report-register-table1 dl dt:nth-of-type(12), .report-register-table1 dl dd:nth-of-type(12) {
36   - width: 7%;
37   -}
38   -.report-register-table1 dl dt:nth-of-type(13), .report-register-table1 dl dd:nth-of-type(13) {
39   - width: 7%;
40   -}
41   -.report-register-table1 dl dt:nth-of-type(14), .report-register-table1 dl dd:nth-of-type(14) {
42   - width: 7%;
43   -}
44   -.report-register-table1 dl dt:nth-of-type(15), .report-register-table1 dl dd:nth-of-type(15) {
45   - width: 7%;
46   -}
47   -.report-register-table1 dl dt:nth-of-type(16), .report-register-table1 dl dd:nth-of-type(16) {
48   - width: 7%;
49   -}
50   -.report-register-table1 dl dt:nth-of-type(17), .report-register-table1 dl dd:nth-of-type(17) {
51   - width: 7%;
52   -}
53   -.report-register-table1 dl dt:nth-of-type(18), .report-register-table1 dl dd:nth-of-type(18) {
54   - width: 7%;
55   -}
56   -
57   -
58   -.report-register-table2 dl dt:nth-of-type(1), .report-register-table2 dl dd:nth-of-type(1) {
59   - width: 2%;
60   -}
61   -.report-register-table2 dl dt:nth-of-type(2), .report-register-table2 dl dd:nth-of-type(2) {
62   - width: 4%;
63   -}
64   -.report-register-table2 dl dt:nth-of-type(3), .report-register-table2 dl dd:nth-of-type(3) {
65   - width: 7%;
66   -}
67   -.report-register-table2 dl dt:nth-of-type(4), .report-register-table2 dl dd:nth-of-type(4) {
68   - width: 7%;
69   -}
70   -.report-register-table2 dl dt:nth-of-type(5), .report-register-table2 dl dd:nth-of-type(5) {
71   - width: 7%;
72   -}
73   -.report-register-table2 dl dt:nth-of-type(6), .report-register-table2 dl dd:nth-of-type(6) {
74   - width: 7%;
75   -}
76   -.report-register-table2 dl dt:nth-of-type(7), .report-register-table2 dl dd:nth-of-type(7) {
77   - width: 7%;
78   -}
79   -.report-register-table2 dl dt:nth-of-type(8), .report-register-table2 dl dd:nth-of-type(8) {
80   - width: 7%;
81   -}
82   -.report-register-table2 dl dt:nth-of-type(9), .report-register-table2 dl dd:nth-of-type(9) {
83   - width: 7%;
84   -}
85   -.report-register-table2 dl dt:nth-of-type(10), .report-register-table2 dl dd:nth-of-type(10) {
86   - width: 7%;
87   -}
88   -.report-register-table2 dl dt:nth-of-type(11), .report-register-table2 dl dd:nth-of-type(11) {
89   - width: 7%;
90   -}
91   -
92   -.report-register-table3 dl dt:nth-of-type(1), .report-register-table3 dl dd:nth-of-type(1) {
93   - width: 2%;
94   -}
95   -.report-register-table3 dl dt:nth-of-type(2), .report-register-table3 dl dd:nth-of-type(2) {
96   - width: 4%;
97   -}
98   -.report-register-table3 dl dt:nth-of-type(3), .report-register-table3 dl dd:nth-of-type(3) {
99   - width: 7%;
100   -}
101   -.report-register-table3 dl dt:nth-of-type(4), .report-register-table3 dl dd:nth-of-type(4) {
102   - width: 7%;
103   -}
104   -.report-register-table3 dl dt:nth-of-type(5), .report-register-table3 dl dd:nth-of-type(5) {
105   - width: 12%;
106   -}
107   -.report-register-table3 dl dt:nth-of-type(6), .report-register-table3 dl dd:nth-of-type(6) {
108   - width: 7%;
109   -}
110   -.report-register-table3 dl dt:nth-of-type(7), .report-register-table3 dl dd:nth-of-type(7) {
111   - width: 7%;
112   -}
113   -.report-register-table3 dl dt:nth-of-type(8), .report-register-table3 dl dd:nth-of-type(8) {
114   - width: 7%;
115   -}
116   -.report-register-table3 dl dt:nth-of-type(9), .report-register-table3 dl dd:nth-of-type(9) {
117   - width: 7%;
118   -}
119   -.report-register-table3 dl dt:nth-of-type(10), .report-register-table3 dl dd:nth-of-type(10) {
120   - width: 7%;
121   -}
122   -
123   -.report-register-table4 dl dt:nth-of-type(1), .report-register-table4 dl dd:nth-of-type(1) {
124   - width: 2%;
125   -}
126   -.report-register-table4 dl dt:nth-of-type(2), .report-register-table4 dl dd:nth-of-type(2) {
127   - width: 4%;
128   -}
129   -.report-register-table4 dl dt:nth-of-type(3), .report-register-table4 dl dd:nth-of-type(3) {
130   - width: 7%;
131   -}
132   -.report-register-table4 dl dt:nth-of-type(4), .report-register-table4 dl dd:nth-of-type(4) {
133   - width: 7%;
134   -}
135   -.report-register-table4 dl dt:nth-of-type(5), .report-register-table4 dl dd:nth-of-type(5) {
136   - width: 7%;
137   -}
138   -.report-register-table4 dl dt:nth-of-type(6), .report-register-table4 dl dd:nth-of-type(6) {
139   - width: 7%;
140   -}
141   -.report-register-table4 dl dt:nth-of-type(7), .report-register-table4 dl dd:nth-of-type(7) {
142   - width: 7%;
143   -}
144   -.report-register-table4 dl dt:nth-of-type(8), .report-register-table4 dl dd:nth-of-type(8) {
145   - width: 9%;
146   -}
147   -.report-register-table4 dl dt:nth-of-type(9), .report-register-table4 dl dd:nth-of-type(9) {
148   - width: 12%;
149   -}
150   -.report-register-table4 dl dt:nth-of-type(10), .report-register-table4 dl dd:nth-of-type(10) {
151   - width: 7%;
152   -}
153   -.report-register-table4 dl dt:nth-of-type(11), .report-register-table4 dl dd:nth-of-type(11) {
154   - width: 7%;
155   -}
156   -.report-register-table4 dl dt:nth-of-type(12), .report-register-table4 dl dd:nth-of-type(12) {
157   - width: 20%;
158   -}
159   -.report-register-table4 dl dt:nth-of-type(13), .report-register-table4 dl dd:nth-of-type(13) {
160   - width: 7%;
161   -}
162   -.report-register-table4 dl dt:nth-of-type(14), .report-register-table4 dl dd:nth-of-type(14) {
163   - width: 7%;
164   -}
165   -.report-register-table4 dl dt:nth-of-type(15), .report-register-table4 dl dd:nth-of-type(15) {
166   - width: 7%;
167   -}
168   -.report-register-table4 dl dt:nth-of-type(16), .report-register-table4 dl dd:nth-of-type(16) {
169   - width: 7%;
170   -}
171   -.report-register-table4 dl dt:nth-of-type(17), .report-register-table4 dl dd:nth-of-type(17) {
172   - width: 7%;
173   -}
174   -
175   -
176   -.report-register-table5 dl dt:nth-of-type(1), .report-register-table5 dl dd:nth-of-type(1) {
177   - width: 2%;
178   -}
179   -.report-register-table5 dl dt:nth-of-type(2), .report-register-table5 dl dd:nth-of-type(2) {
180   - width: 4%;
181   -}
182   -.report-register-table5 dl dt:nth-of-type(3), .report-register-table5 dl dd:nth-of-type(3) {
183   - width: 7%;
184   -}
185   -.report-register-table5 dl dt:nth-of-type(4), .report-register-table5 dl dd:nth-of-type(4) {
186   - width: 7%;
187   -}
188   -.report-register-table5 dl dt:nth-of-type(5), .report-register-table5 dl dd:nth-of-type(5) {
189   - width: 7%;
190   -}
191   -
192   -
193   -.report-register-table6 dl dt:nth-of-type(1), .report-register-table6 dl dd:nth-of-type(1) {
194   - width: 2%;
195   -}
196   -.report-register-table6 dl dt:nth-of-type(2), .report-register-table6 dl dd:nth-of-type(2) {
197   - width: 4%;
198   -}
199   -.report-register-table6 dl dt:nth-of-type(3), .report-register-table6 dl dd:nth-of-type(3) {
200   - width: 7%;
201   -}
202   -.report-register-table6 dl dt:nth-of-type(4), .report-register-table6 dl dd:nth-of-type(4) {
203   - width: 7%;
204   -}
205   -.report-register-table6 dl dt:nth-of-type(5), .report-register-table6 dl dd:nth-of-type(5) {
206   - width: 7%;
207   -}
208   -.report-register-table6 dl dt:nth-of-type(6), .report-register-table6 dl dd:nth-of-type(6) {
209   - width: 7%;
  1 +
  2 +.report-register-table1 dl dt:nth-of-type(1), .report-register-table1 dl dd:nth-of-type(1) {
  3 + width: 2%;
  4 +}
  5 +.report-register-table1 dl dt:nth-of-type(2), .report-register-table1 dl dd:nth-of-type(2) {
  6 + width: 4%;
  7 +}
  8 +.report-register-table1 dl dt:nth-of-type(3), .report-register-table1 dl dd:nth-of-type(3) {
  9 + width: 7%;
  10 +}
  11 +.report-register-table1 dl dt:nth-of-type(4), .report-register-table1 dl dd:nth-of-type(4) {
  12 + width: 7%;
  13 +}
  14 +.report-register-table1 dl dt:nth-of-type(5), .report-register-table1 dl dd:nth-of-type(5) {
  15 + width: 7%;
  16 +}
  17 +.report-register-table1 dl dt:nth-of-type(6), .report-register-table1 dl dd:nth-of-type(6) {
  18 + width: 7%;
  19 +}
  20 +.report-register-table1 dl dt:nth-of-type(7), .report-register-table1 dl dd:nth-of-type(7) {
  21 + width: 10%;
  22 +}
  23 +.report-register-table1 dl dt:nth-of-type(8), .report-register-table1 dl dd:nth-of-type(8) {
  24 + width: 7%;
  25 +}
  26 +.report-register-table1 dl dt:nth-of-type(9), .report-register-table1 dl dd:nth-of-type(9) {
  27 + width: 7%;
  28 +}
  29 +.report-register-table1 dl dt:nth-of-type(10), .report-register-table1 dl dd:nth-of-type(10) {
  30 + width: 7%;
  31 +}
  32 +.report-register-table1 dl dt:nth-of-type(11), .report-register-table1 dl dd:nth-of-type(11) {
  33 + width: 7%;
  34 +}
  35 +.report-register-table1 dl dt:nth-of-type(12), .report-register-table1 dl dd:nth-of-type(12) {
  36 + width: 7%;
  37 +}
  38 +.report-register-table1 dl dt:nth-of-type(13), .report-register-table1 dl dd:nth-of-type(13) {
  39 + width: 7%;
  40 +}
  41 +.report-register-table1 dl dt:nth-of-type(14), .report-register-table1 dl dd:nth-of-type(14) {
  42 + width: 7%;
  43 +}
  44 +.report-register-table1 dl dt:nth-of-type(15), .report-register-table1 dl dd:nth-of-type(15) {
  45 + width: 7%;
  46 +}
  47 +.report-register-table1 dl dt:nth-of-type(16), .report-register-table1 dl dd:nth-of-type(16) {
  48 + width: 7%;
  49 +}
  50 +.report-register-table1 dl dt:nth-of-type(17), .report-register-table1 dl dd:nth-of-type(17) {
  51 + width: 7%;
  52 +}
  53 +.report-register-table1 dl dt:nth-of-type(18), .report-register-table1 dl dd:nth-of-type(18) {
  54 + width: 7%;
  55 +}
  56 +
  57 +
  58 +.report-register-table2 dl dt:nth-of-type(1), .report-register-table2 dl dd:nth-of-type(1) {
  59 + width: 2%;
  60 +}
  61 +.report-register-table2 dl dt:nth-of-type(2), .report-register-table2 dl dd:nth-of-type(2) {
  62 + width: 4%;
  63 +}
  64 +.report-register-table2 dl dt:nth-of-type(3), .report-register-table2 dl dd:nth-of-type(3) {
  65 + width: 7%;
  66 +}
  67 +.report-register-table2 dl dt:nth-of-type(4), .report-register-table2 dl dd:nth-of-type(4) {
  68 + width: 7%;
  69 +}
  70 +.report-register-table2 dl dt:nth-of-type(5), .report-register-table2 dl dd:nth-of-type(5) {
  71 + width: 7%;
  72 +}
  73 +.report-register-table2 dl dt:nth-of-type(6), .report-register-table2 dl dd:nth-of-type(6) {
  74 + width: 7%;
  75 +}
  76 +.report-register-table2 dl dt:nth-of-type(7), .report-register-table2 dl dd:nth-of-type(7) {
  77 + width: 7%;
  78 +}
  79 +.report-register-table2 dl dt:nth-of-type(8), .report-register-table2 dl dd:nth-of-type(8) {
  80 + width: 7%;
  81 +}
  82 +.report-register-table2 dl dt:nth-of-type(9), .report-register-table2 dl dd:nth-of-type(9) {
  83 + width: 7%;
  84 +}
  85 +.report-register-table2 dl dt:nth-of-type(10), .report-register-table2 dl dd:nth-of-type(10) {
  86 + width: 7%;
  87 +}
  88 +.report-register-table2 dl dt:nth-of-type(11), .report-register-table2 dl dd:nth-of-type(11) {
  89 + width: 7%;
  90 +}
  91 +
  92 +.report-register-table3 dl dt:nth-of-type(1), .report-register-table3 dl dd:nth-of-type(1) {
  93 + width: 2%;
  94 +}
  95 +.report-register-table3 dl dt:nth-of-type(2), .report-register-table3 dl dd:nth-of-type(2) {
  96 + width: 4%;
  97 +}
  98 +.report-register-table3 dl dt:nth-of-type(3), .report-register-table3 dl dd:nth-of-type(3) {
  99 + width: 7%;
  100 +}
  101 +.report-register-table3 dl dt:nth-of-type(4), .report-register-table3 dl dd:nth-of-type(4) {
  102 + width: 7%;
  103 +}
  104 +.report-register-table3 dl dt:nth-of-type(5), .report-register-table3 dl dd:nth-of-type(5) {
  105 + width: 12%;
  106 +}
  107 +.report-register-table3 dl dt:nth-of-type(6), .report-register-table3 dl dd:nth-of-type(6) {
  108 + width: 7%;
  109 +}
  110 +.report-register-table3 dl dt:nth-of-type(7), .report-register-table3 dl dd:nth-of-type(7) {
  111 + width: 7%;
  112 +}
  113 +.report-register-table3 dl dt:nth-of-type(8), .report-register-table3 dl dd:nth-of-type(8) {
  114 + width: 7%;
  115 +}
  116 +.report-register-table3 dl dt:nth-of-type(9), .report-register-table3 dl dd:nth-of-type(9) {
  117 + width: 7%;
  118 +}
  119 +.report-register-table3 dl dt:nth-of-type(10), .report-register-table3 dl dd:nth-of-type(10) {
  120 + width: 7%;
  121 +}
  122 +
  123 +.report-register-table4 dl dt:nth-of-type(1), .report-register-table4 dl dd:nth-of-type(1) {
  124 + width: 2%;
  125 +}
  126 +.report-register-table4 dl dt:nth-of-type(2), .report-register-table4 dl dd:nth-of-type(2) {
  127 + width: 4%;
  128 +}
  129 +.report-register-table4 dl dt:nth-of-type(3), .report-register-table4 dl dd:nth-of-type(3) {
  130 + width: 7%;
  131 +}
  132 +.report-register-table4 dl dt:nth-of-type(4), .report-register-table4 dl dd:nth-of-type(4) {
  133 + width: 7%;
  134 +}
  135 +.report-register-table4 dl dt:nth-of-type(5), .report-register-table4 dl dd:nth-of-type(5) {
  136 + width: 7%;
  137 +}
  138 +.report-register-table4 dl dt:nth-of-type(6), .report-register-table4 dl dd:nth-of-type(6) {
  139 + width: 7%;
  140 +}
  141 +.report-register-table4 dl dt:nth-of-type(7), .report-register-table4 dl dd:nth-of-type(7) {
  142 + width: 7%;
  143 +}
  144 +.report-register-table4 dl dt:nth-of-type(8), .report-register-table4 dl dd:nth-of-type(8) {
  145 + width: 9%;
  146 +}
  147 +.report-register-table4 dl dt:nth-of-type(9), .report-register-table4 dl dd:nth-of-type(9) {
  148 + width: 12%;
  149 +}
  150 +.report-register-table4 dl dt:nth-of-type(10), .report-register-table4 dl dd:nth-of-type(10) {
  151 + width: 7%;
  152 +}
  153 +.report-register-table4 dl dt:nth-of-type(11), .report-register-table4 dl dd:nth-of-type(11) {
  154 + width: 7%;
  155 +}
  156 +.report-register-table4 dl dt:nth-of-type(12), .report-register-table4 dl dd:nth-of-type(12) {
  157 + width: 20%;
  158 +}
  159 +.report-register-table4 dl dt:nth-of-type(13), .report-register-table4 dl dd:nth-of-type(13) {
  160 + width: 7%;
  161 +}
  162 +.report-register-table4 dl dt:nth-of-type(14), .report-register-table4 dl dd:nth-of-type(14) {
  163 + width: 7%;
  164 +}
  165 +.report-register-table4 dl dt:nth-of-type(15), .report-register-table4 dl dd:nth-of-type(15) {
  166 + width: 7%;
  167 +}
  168 +.report-register-table4 dl dt:nth-of-type(16), .report-register-table4 dl dd:nth-of-type(16) {
  169 + width: 7%;
  170 +}
  171 +.report-register-table4 dl dt:nth-of-type(17), .report-register-table4 dl dd:nth-of-type(17) {
  172 + width: 7%;
  173 +}
  174 +
  175 +
  176 +.report-register-table5 dl dt:nth-of-type(1), .report-register-table5 dl dd:nth-of-type(1) {
  177 + width: 2%;
  178 +}
  179 +.report-register-table5 dl dt:nth-of-type(2), .report-register-table5 dl dd:nth-of-type(2) {
  180 + width: 4%;
  181 +}
  182 +.report-register-table5 dl dt:nth-of-type(3), .report-register-table5 dl dd:nth-of-type(3) {
  183 + width: 7%;
  184 +}
  185 +.report-register-table5 dl dt:nth-of-type(4), .report-register-table5 dl dd:nth-of-type(4) {
  186 + width: 7%;
  187 +}
  188 +.report-register-table5 dl dt:nth-of-type(5), .report-register-table5 dl dd:nth-of-type(5) {
  189 + width: 7%;
  190 +}
  191 +
  192 +
  193 +.report-register-table6 dl dt:nth-of-type(1), .report-register-table6 dl dd:nth-of-type(1) {
  194 + width: 2%;
  195 +}
  196 +.report-register-table6 dl dt:nth-of-type(2), .report-register-table6 dl dd:nth-of-type(2) {
  197 + width: 4%;
  198 +}
  199 +.report-register-table6 dl dt:nth-of-type(3), .report-register-table6 dl dd:nth-of-type(3) {
  200 + width: 7%;
  201 +}
  202 +.report-register-table6 dl dt:nth-of-type(4), .report-register-table6 dl dd:nth-of-type(4) {
  203 + width: 7%;
  204 +}
  205 +.report-register-table6 dl dt:nth-of-type(5), .report-register-table6 dl dd:nth-of-type(5) {
  206 + width: 7%;
  207 +}
  208 +.report-register-table6 dl dt:nth-of-type(6), .report-register-table6 dl dd:nth-of-type(6) {
  209 + width: 7%;
210 210 }
211 211 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/list.html
1   -<div class="uk-modal ct_move_modal" id="report-register-modal">
2   - <!-- editable -->
3   - <!--<link href="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet" type="text/css" />-->
4   - <!-- Bootstrap style -->
5   - <link href="/metronic_v4.5.4/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
6   - <!-- select2 下拉框插件 -->
7   - <link href="/metronic_v4.5.4/plugins/select2/css/select2.min.css"
8   - rel="stylesheet" type="text/css" />
9   - <link
10   - href="/metronic_v4.5.4/plugins/select2/css/select2-bootstrap.min.css"
11   - rel="stylesheet" type="text/css" />
12   - <style>
13   - /*ul.navigation_bar:before {*/
14   - /*content: "报备类型";*/
15   - /*position: absolute;*/
16   - /*top: -9px;*/
17   - /*font-size: 12px;*/
18   - /*background: white;*/
19   - /*padding: 0 4px;*/
20   - /*color: #7d7b7b;*/
21   - /*left: 10px;*/
22   - /*}*/
23   - </style>
24   - <div class="uk-modal-dialog" style="width: 1800px;">
25   - <a href="" class="uk-modal-close uk-close"></a>
26   - <div class="uk-modal-header">
27   - <h2>报备登记报表</h2>
28   - </div>
29   -
30   -
31   - <div style="padding-left: 12px;margin: 10px 0">
32   - <ul class="uk-subnav uk-subnav-pill navigation_bar">
33   - <li id="first_last_late" class="uk-active"><a>首末班误点</a></li>
34   - <li id="large_interval"><a>大间隔</a></li>
35   - <li id="emergency"><a>突发事件</a></li>
36   - <li id="accident"><a>事故</a></li>
37   - <li id="rests"><a>其他</a></li>
38   - <li id="consult"><a>咨询</a></li>
39   - </ul>
40   - </div>
41   -
42   - <div class="uk-panel uk-panel-box uk-panel-box-primary" style="margin: 10px 0;">
43   - <!--<form class="uk-form search-form">-->
44   - <!--<fieldset data-uk-margin>-->
45   - <span class="horizontal-field">线路</span>
46   - <select name="line" id="line" style="width: 180px;"></select>
47   - <span class="horizontal-field">时间</span>
48   - <input class=" horizontal-field" type="text" id="date1" style="width: 180px;"/> -
49   - <input class="horizontal-field" type="text" id="date2" style="width: 180px;"/>
50   - &nbsp;
51   - <button class="uk-button horizontal-field" id="query">检索</button>
52   - <button class="uk-button horizontal-field" id="export">导出</button>
53   - <!--</fieldset>-->
54   - <!--</form>-->
55   - </div>
56   -
57   - <div class="ct_table_wrap" style="height: 510px">
58   - <!-- 首末班误点-->
59   - <table class="table table-striped table-bordered table-hover table-checkable report-register-table active" id="first_last_late_table">
60   - <thead >
61   - <tr role="row">
62   - <th width="2%">序号</th>
63   - <th width="5%">报备时间</th>
64   - <th width="5%">报备人</th>
65   - <th width="5%">公司</th>
66   - <th width="5%">分公司</th>
67   - <th width="7%">线路</th>
68   - <th width="7%">延误站点</th>
69   - <th width="5%">延误时间</th>
70   - <th width="10%">首末班延误原因</th>
71   - <th width="7%">对外上报部门</th>
72   - <th width="7%">对外上报时间</th>
73   - </tr>
74   - </thead>
75   - <tbody class="table_body">
76   - </tbody>
77   - </table>
78   - <!-- 大间隔-->
79   - <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="large_interval_table">
80   - <thead >
81   - <tr role="row">
82   - <th width="2%">序号</th>
83   - <th width="5%">报备时间</th>
84   - <th width="5%">报备人</th>
85   - <th width="5%">公司</th>
86   - <th width="5%">分公司</th>
87   - <th width="7%">线路</th>
88   - <th width="7%">路段</th>
89   - <th width="7%">行驶方向</th>
90   - <th width="7%">站点</th>
91   - <th width="7%">大间隔时间</th>
92   - <th width="7%">大间隔原因</th>
93   - <th width="7%">对外上报部门</th>
94   - <th width="7%">对外上报时间</th>
95   - </tr>
96   - </thead>
97   - <tbody class="table_body">
98   - </tbody>
99   - </table>
100   - <!-- 突发事件-->
101   - <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="emergency_table">
102   - <thead >
103   - <tr role="row">
104   - <th width="2%">序号</th>
105   - <th width="5%">报备时间</th>
106   - <th width="5%">报备人</th>
107   - <th width="5%">公司</th>
108   - <th width="5%">分公司</th>
109   - <th width="7%">影响线路</th>
110   - <th width="7%">重大活动货突发事件</th>
111   - <th width="7%">影响时间</th>
112   - <th width="7%">影响班次数</th>
113   - <th width="7%">调整措施</th>
114   - <th width="7%">对外上报部门</th>
115   - <th width="7%">对外上报时间</th>
116   - </tr>
117   - </thead>
118   - <tbody class="table_body">
119   - </tbody>
120   - </table>
121   - <!-- 事故-->
122   - <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="accident_table">
123   - <thead >
124   - <tr role="row">
125   - <th width="2%">序号</th>
126   - <th width="5%">报备时间</th>
127   - <th width="5%">报备人</th>
128   - <th width="5%">公司</th>
129   - <th width="5%">分公司</th>
130   - <th width="5%">线路</th>
131   - <th width="5%">车辆自编号</th>
132   - <th width="5%">驾驶员</th>
133   - <th width="5%">事故发生时间</th>
134   - <th width="5%">事故发生地点</th>
135   - <th width="5%">行驶方向</th>
136   - <th width="5%">事故对象</th>
137   - <th width="5%">对象车牌号</th>
138   - <th width="5%">事故概况</th>
139   - <th width="5%">受伤人数</th>
140   - <th width="5%">死亡人数</th>
141   - <th width="5%">报告人</th>
142   - <th width="5%">报告人电话</th>
143   - <th width="5%">备注</th>
144   - </tr>
145   - </thead>
146   - <tbody class="table_body">
147   - </tbody>
148   - </table>
149   - <!-- 其他-->
150   - <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="rests_table">
151   - <tr role="row">
152   - <th width="2%">序号</th>
153   - <th width="5%">报备时间</th>
154   - <th width="5%">报备人</th>
155   - <th width="5%">公司</th>
156   - <th width="5%">分公司</th>
157   - <th width="7%">线路</th>
158   - <th width="7%">报备内容</th>
159   - </tr>
160   - </thead>
161   - <tbody class="table_body">
162   - </tbody>
163   - </table>
164   - <!-- 咨询-->
165   - <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="consult_table">
166   - <thead >
167   - <tr role="row">
168   - <th width="2%">序号</th>
169   - <th width="5%">报备时间</th>
170   - <th width="5%">报备人</th>
171   - <th width="5%">公司</th>
172   - <th width="5%">分公司</th>
173   - <th width="7%">线路</th>
174   - <th width="7%">班线名称</th>
175   - <th width="7%">内容</th>
176   - </tr>
177   - </thead>
178   - <tbody class="table_body">
179   - </tbody>
180   - </table>
181   - </div>
182   -
183   - <div class="load-panel">
184   - <i class="uk-icon-spinner uk-icon-spin"></i>
185   - 正在加载数据
186   - </div>
187   - </div>
188   -
189   - <script id="first_last_late_table_body_list" type="text/html">
190   - {{each data.list as obj i}}
191   - {{if obj.status == 2}}
192   - <tr style="background-color: #ff5f78">
193   - {{else}}
194   - <tr>
195   - {{/if}}
196   - <td style="vertical-align: middle;">{{i + 1}}</td>
197   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
198   - <td style="vertical-align: middle;">{{obj.report_BBR}}</td>
199   - <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td>
200   - <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td>
201   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
202   - <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
203   - <td style="vertical-align: middle;">{{obj.report_YWSJ}}</td>
204   - <td style="vertical-align: middle;">{{obj.report_SMBWD}}</td>
205   - <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
206   - <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
207   - </tr>
208   - {{/each}}
209   - </script>
210   - <script id="large_interval_table_body_list" type="text/html">
211   - {{each data.list as obj i}}
212   - {{if obj.status == 2}}
213   - <tr style="background-color: #ff5f78">
214   - {{else}}
215   - <tr>
216   - {{/if}}
217   - <td style="vertical-align: middle;">{{i + 1}}</td>
218   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
219   - <td style="vertical-align: middle;">{{obj.report_BBR}}</td>
220   - <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td>
221   - <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td>
222   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
223   - <td style="vertical-align: middle;">{{obj.report_ROAD}}</td>
224   - <td style="vertical-align: middle;">{{obj.report_XSFX}}</td>
225   - <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
226   - <td style="vertical-align: middle;">{{obj.report_DJGSNAMEJ}}</td>
227   - <td style="vertical-align: middle;">{{obj.report_DJGYY}}</td>
228   - <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
229   - <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
230   - </tr>
231   - {{/each}}
232   - </script>
233   - <script id="emergency_table_body_list" type="text/html">
234   - {{each data.list as obj i}}
235   - {{if obj.status == 2}}
236   - <tr style="background-color: #ff5f78">
237   - {{else}}
238   - <tr>
239   - {{/if}}
240   - <td style="vertical-align: middle;">{{i + 1}}</td>
241   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
242   - <td style="vertical-align: middle;">{{obj.report_BBR}}</td>
243   - <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td>
244   - <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td>
245   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
246   - <td style="vertical-align: middle;">{{obj.report_TFSJ}}</td>
247   - <td style="vertical-align: middle;">{{obj.report_YXSJ}}</td>
248   - <td style="vertical-align: middle;">{{obj.report_YXBC}}</td>
249   - <td style="vertical-align: middle;">{{obj.report_TZCS}}</td>
250   - <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
251   - <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
252   - </tr>
253   - {{/each}}
254   - </script>
255   - <script id="accident_table_body_list" type="text/html">
256   - {{each data.list as obj i}}
257   - {{if obj.status == 2}}
258   - <tr style="background-color: #ff5f78">
259   - {{else}}
260   - <tr>
261   - {{/if}}
262   - <td style="vertical-align: middle;">{{i + 1}}</td>
263   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
264   - <td style="vertical-align: middle;">{{obj.report_BBR}}</td>
265   - <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td>
266   - <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td>
267   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
268   - <td style="vertical-align: middle;">{{obj.report_ZBH}}</td>
269   - <td style="vertical-align: middle;">{{obj.report_JSY}}</td>
270   - <td style="vertical-align: middle;">{{obj.report_SGSJ}}</td>
271   - <td style="vertical-align: middle;">{{obj.report_SGDD}}</td>
272   - <td style="vertical-align: middle;">{{obj.report_XSFX}}</td>
273   - <td style="vertical-align: middle;">{{obj.report_SGDX}}</td>
274   - <td style="vertical-align: middle;">{{obj.report_DXPZH}}</td>
275   - <td style="vertical-align: middle;">{{obj.report_SGGK}}</td>
276   - <td style="vertical-align: middle;">{{obj.report_SSRS}}</td>
277   - <td style="vertical-align: middle;">{{obj.report_SWRS}}</td>
278   - <td style="vertical-align: middle;">{{obj.report_BGR}}</td>
279   - <td style="vertical-align: middle;">{{obj.report_BGRDH}}</td>
280   - <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
281   - </tr>
282   - {{/each}}
283   - </script>
284   - <script id="rests_table_body_list" type="text/html">
285   - {{each data.list as obj i}}
286   - {{if obj.status == 2}}
287   - <tr style="background-color: #ff5f78">
288   - {{else}}
289   - <tr>
290   - {{/if}}
291   - <td style="vertical-align: middle;">{{i + 1}}</td>
292   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
293   - <td style="vertical-align: middle;">{{obj.report_BBR}}</td>
294   - <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td>
295   - <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td>
296   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
297   - <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
298   - </tr>
299   - {{/each}}
300   - </script>
301   - <script id="consult_table_body_list" type="text/html">
302   - {{each data.list as obj i}}
303   - {{if obj.status == 2}}
304   - <tr style="background-color: #ff5f78">
305   - {{else}}
306   - <tr>
307   - {{/if}}
308   - <td style="vertical-align: middle;">{{i + 1}}</td>
309   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
310   - <td style="vertical-align: middle;">{{obj.report_BBR}}</td>
311   - <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td>
312   - <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td>
313   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
314   - <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
315   - <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
316   - </tr>
317   - {{/each}}
318   - </script>
319   -
320   -
321   - <!-- common js -->
322   - <script src="/assets/js/common.js"></script>
323   - <!-- select2 下拉框 -->
324   - <script src="/metronic_v4.5.4/plugins/select2/js/select2.full.min.js"></script>
325   - <!-- moment.js 日期处理类库 -->
326   - <script src="/assets/plugins/moment-with-locales.js" data-exclude=1></script>
327   - <!-- 日期控件 -->
328   - <script src="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/js/bootstrap-datetimepicker.min.js"></script>
329   - <!-- bootstrap -->
330   - <script src="/metronic_v4.5.4/plugins/bootstrap/js/bootstrap.min.js" data-exclude=1></script>
331   - <!--<script src="/metronic_v4.5.4/plugins/bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script>-->
332   - <!-- editable.js -->
333   - <!--<script src="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.min.js"></script>-->
334   - <script>
335   - var manageJs = (function () {
336   - $('#export').attr('disabled', "true");
337   -
338   - var modal = '#report-register-modal';
339   - var activeDiv='first_last_late_table';
340   - var lineList = gb_data_basic.activeLines;
341   - var loading=false;
342   -
343   - var line = $("#line").val();
344   - var date1 = $("#date1").val();
345   - var date2 = $("#date2").val();
346   - var dataType = $("#dataType").val();
347   - var lineName = $('#line option:selected').text();
348   -
349   - $(modal).on('init', function (e,data) {
350   -
351   - $("#date1").datetimepicker({
352   - format : 'YYYY-MM-DD',
353   - locale : 'zh-cn'
354   - });
355   - $("#date2").datetimepicker({
356   - format : 'YYYY-MM-DD',
357   - locale : 'zh-cn'
358   - });
359   - $('#date1').val(moment(new Date()).format('YYYY-MM-DD'));
360   - $('#date2').val(moment(new Date()).format('YYYY-MM-DD'));
361   - var data = [];
362   - $.get('/user/companyData', function(result){
363   - for(var i = 0; i < result.length; i++){
364   - var companyCode = result[i].companyCode;
365   - var children = result[i].children;
366   - for(var j = 0; j < children.length; j++){
367   - var code = children[j].code;
368   - for(var k=0;k < lineList.length;k++ ){
369   - if(lineList[k]["brancheCompany"]==code && lineList[k]["company"]==companyCode){
370   - data.push({id: lineList[k]["lineCode"], text: lineList[k]["name"]});
371   - }
372   - }
373   - }
374   - }
375   - initPinYinSelect2('#line',data,'');
376   -
377   - });
378   -
379   - //滚动条
380   - $('.report-register-table-wrap', modal).perfectScrollbar();
381   - });
382   -
383   - $("#query").on("click",function(){
384   - if(loading)
385   - return;
386   - $('.load-panel', modal).show();
387   - loading=true;
388   - line = $("#line").val();
389   - date1 = $("#date1").val();
390   - date2 = $("#date2").val();
391   - if(line == null || line == '' || line.length == 0){
392   - $('.load-panel', modal).hide();
393   - loading=false;
394   - layer.msg("请选择线路");
395   - return;
396   - }
397   - if(date1 == null || date1.trim().length == 0 || date2 == null || date2.trim().length == 0){
398   - $('.load-panel', modal).hide();
399   - loading=false;
400   - layer.msg("请选择时间");
401   - return;
402   - } else if(date1 > date2){
403   - $('.load-panel', modal).hide();
404   - loading=false;
405   - layer.msg("时间区间不正确,第二个时间不能大于第一个时间");
406   - return;
407   - }
408   - var type = "query";
409   - gb_common.$get("/reportRegister/findList", {lineCodes:line,date1:date1,date2:date2,type:type}, function (data) {
410   - if (data.status == "SUCCESS") {
411   - var list = data.list;
412   - var tableList1 = [], tableList2 = [], tableList3 = [], tableList4 = [], tableList5 = [],
413   - tableList6 = [];
414   - $.each(list, function (i, rr) {
415   - rr.report_DATE = formatDate(new Date(rr.report_DATE));
416   - if (rr.report_TYPE == 1) {
417   - tableList1.push(rr);
418   - } else if (rr.report_TYPE == 2) {
419   - tableList2.push(rr);
420   - } else if (rr.report_TYPE == 3) {
421   - tableList3.push(rr);
422   - } else if (rr.report_TYPE == 4) {
423   - tableList4.push(rr);
424   - } else if (rr.report_TYPE == 5) {
425   - tableList5.push(rr);
426   - } else if (rr.report_TYPE == 6) {
427   - tableList6.push(rr);
428   - }
429   - });
430   - var htmlStr = template('first_last_late_table_body_list', {'data':{'list': tableList1,'line':lineList}});
431   - $('#first_last_late_table .table_body', modal).html(htmlStr);
432   - htmlStr = template('large_interval_table_body_list', {'data':{'list': tableList2,'line':lineList}});
433   - $('#large_interval_table .table_body', modal).html(htmlStr);
434   - htmlStr = template('emergency_table_body_list', {'data':{'list': tableList3,'line':lineList}});
435   - $('#emergency_table .table_body', modal).html(htmlStr);
436   - htmlStr = template('accident_table_body_list', {'data':{'list': tableList4,'line':lineList}});
437   - $('#accident_table .table_body', modal).html(htmlStr);
438   - htmlStr = template('rests_table_body_list', {'data':{'list': tableList5,'line':lineList}});
439   - $('#rests_table .table_body', modal).html(htmlStr);
440   - htmlStr = template('consult_table_body_list', {'data':{'list': tableList6,'line':lineList}});
441   - $('#consult_table .table_body', modal).html(htmlStr);
442   - $('.load-panel', modal).hide();
443   - loading=false;
444   - if(list.length == 0)
445   - $("#export").attr('disabled',"true");
446   - else
447   - $("#export").removeAttr("disabled");
448   - }
449   - });
450   - });
451   -
452   - $("#export").on("click",function(){
453   - line = $("#line").val();
454   - date1 = $("#date1").val();
455   - date2 = $("#date2").val();
456   - var dateTime='';
457   - if (date1 == date2) {
458   - dateTime = moment(date1).format("YYYYMMDD");
459   - } else {
460   - dateTime = moment(date1).format("YYYYMMDD")
461   - +"-"+moment(date2).format("YYYYMMDD");
462   - }
463   - if(date1 == null || date1.trim().length == 0 || date2 == null || date2.trim().length == 0){
464   - layer.msg("请选择时间");
465   - return;
466   - } else if(date1 > date2){
467   - layer.msg("时间区间不正确,第二个时间不能大于第一个时间");
468   - return;
469   - }
470   - lineName = $('#line option:selected').text();
471   - var type = "export";
472   - gb_common.$get("/reportRegister/findList", {lineCodes:line,lineName:lineName,date1:date1,date2:date2,type:type}, function (data) {
473   - if (data.status == "SUCCESS") {
474   - window.open("/downloadFile/download?fileName="
475   - +dateTime+"_"+lineName+"_报备登记");
476   - }
477   - });
478   - });
479   -
480   -
481   - $(modal).on('click', '.navigation_bar li', function () {
482   - $(this).parent().find('li.uk-active').removeClass('uk-active');
483   - $(this).addClass('uk-active');
484   - var typeName = $(this).attr('id');
485   - var oldActiveDivId = $("#"+typeName+"_table").parent().find('.active');
486   - var oldActiveDiv = document.getElementById(oldActiveDivId.attr('id'));
487   - oldActiveDiv.style.display = "none";
488   - oldActiveDivId.removeClass("active");
489   -
490   - activeDiv = typeName+"_table";
491   - $("#"+typeName+"_table").addClass("active");
492   - var activeTable = document.getElementById(typeName+"_table");
493   - activeTable.style.display = "";
494   - });
495   -
496   - var formatDate = function(now) {
497   - var year=now.getFullYear();
498   - var month=now.getMonth()+1;
499   - var date=now.getDate();
500   - var hour=now.getHours();
501   - var minute=now.getMinutes();
502   - var second=now.getSeconds();
503   - return year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second;
504   - };
505   -
506   - })();
507   - </script>
  1 +<div class="uk-modal ct_move_modal" id="report-register-modal">
  2 + <!-- editable -->
  3 + <!--<link href="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet" type="text/css" />-->
  4 + <!-- Bootstrap style -->
  5 + <link href="/metronic_v4.5.4/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  6 + <!-- select2 下拉框插件 -->
  7 + <link href="/metronic_v4.5.4/plugins/select2/css/select2.min.css"
  8 + rel="stylesheet" type="text/css" />
  9 + <link
  10 + href="/metronic_v4.5.4/plugins/select2/css/select2-bootstrap.min.css"
  11 + rel="stylesheet" type="text/css" />
  12 + <style>
  13 + /*ul.navigation_bar:before {*/
  14 + /*content: "报备类型";*/
  15 + /*position: absolute;*/
  16 + /*top: -9px;*/
  17 + /*font-size: 12px;*/
  18 + /*background: white;*/
  19 + /*padding: 0 4px;*/
  20 + /*color: #7d7b7b;*/
  21 + /*left: 10px;*/
  22 + /*}*/
  23 + </style>
  24 + <div class="uk-modal-dialog" style="width: 1800px;">
  25 + <a href="" class="uk-modal-close uk-close"></a>
  26 + <div class="uk-modal-header">
  27 + <h2>报备登记报表</h2>
  28 + </div>
  29 +
  30 +
  31 + <div style="padding-left: 12px;margin: 10px 0">
  32 + <ul class="uk-subnav uk-subnav-pill navigation_bar">
  33 + <li id="first_last_late" class="uk-active"><a>首末班误点</a></li>
  34 + <li id="large_interval"><a>大间隔</a></li>
  35 + <li id="emergency"><a>突发事件</a></li>
  36 + <li id="accident"><a>事故</a></li>
  37 + <li id="rests"><a>其他</a></li>
  38 + <li id="consult"><a>咨询</a></li>
  39 + </ul>
  40 + </div>
  41 +
  42 + <div class="uk-panel uk-panel-box uk-panel-box-primary" style="margin: 10px 0;">
  43 + <!--<form class="uk-form search-form">-->
  44 + <!--<fieldset data-uk-margin>-->
  45 + <span class="horizontal-field">线路</span>
  46 + <select name="line" id="line" style="width: 180px;"></select>
  47 + <span class="horizontal-field">时间</span>
  48 + <input class=" horizontal-field" type="text" id="date1" style="width: 180px;"/> -
  49 + <input class="horizontal-field" type="text" id="date2" style="width: 180px;"/>
  50 + &nbsp;
  51 + <button class="uk-button horizontal-field" id="query">检索</button>
  52 + <button class="uk-button horizontal-field" id="export">导出</button>
  53 + <!--</fieldset>-->
  54 + <!--</form>-->
  55 + </div>
  56 +
  57 + <div class="ct_table_wrap" style="height: 510px">
  58 + <!-- 首末班误点-->
  59 + <table class="table table-striped table-bordered table-hover table-checkable report-register-table active" id="first_last_late_table">
  60 + <thead >
  61 + <tr role="row">
  62 + <th width="2%">序号</th>
  63 + <th width="5%">报备时间</th>
  64 + <th width="5%">报备人</th>
  65 + <th width="5%">公司</th>
  66 + <th width="5%">分公司</th>
  67 + <th width="7%">线路</th>
  68 + <th width="7%">延误站点</th>
  69 + <th width="5%">延误时间</th>
  70 + <th width="10%">首末班延误原因</th>
  71 + <th width="7%">对外上报部门</th>
  72 + <th width="7%">对外上报时间</th>
  73 + </tr>
  74 + </thead>
  75 + <tbody class="table_body">
  76 + </tbody>
  77 + </table>
  78 + <!-- 大间隔-->
  79 + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="large_interval_table">
  80 + <thead >
  81 + <tr role="row">
  82 + <th width="2%">序号</th>
  83 + <th width="5%">报备时间</th>
  84 + <th width="5%">报备人</th>
  85 + <th width="5%">公司</th>
  86 + <th width="5%">分公司</th>
  87 + <th width="7%">线路</th>
  88 + <th width="7%">路段</th>
  89 + <th width="7%">行驶方向</th>
  90 + <th width="7%">站点</th>
  91 + <th width="7%">大间隔时间</th>
  92 + <th width="7%">大间隔原因</th>
  93 + <th width="7%">对外上报部门</th>
  94 + <th width="7%">对外上报时间</th>
  95 + </tr>
  96 + </thead>
  97 + <tbody class="table_body">
  98 + </tbody>
  99 + </table>
  100 + <!-- 突发事件-->
  101 + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="emergency_table">
  102 + <thead >
  103 + <tr role="row">
  104 + <th width="2%">序号</th>
  105 + <th width="5%">报备时间</th>
  106 + <th width="5%">报备人</th>
  107 + <th width="5%">公司</th>
  108 + <th width="5%">分公司</th>
  109 + <th width="7%">影响线路</th>
  110 + <th width="7%">重大活动货突发事件</th>
  111 + <th width="7%">影响时间</th>
  112 + <th width="7%">影响班次数</th>
  113 + <th width="7%">调整措施</th>
  114 + <th width="7%">对外上报部门</th>
  115 + <th width="7%">对外上报时间</th>
  116 + </tr>
  117 + </thead>
  118 + <tbody class="table_body">
  119 + </tbody>
  120 + </table>
  121 + <!-- 事故-->
  122 + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="accident_table">
  123 + <thead >
  124 + <tr role="row">
  125 + <th width="2%">序号</th>
  126 + <th width="5%">报备时间</th>
  127 + <th width="5%">报备人</th>
  128 + <th width="5%">公司</th>
  129 + <th width="5%">分公司</th>
  130 + <th width="5%">线路</th>
  131 + <th width="5%">车辆自编号</th>
  132 + <th width="5%">驾驶员</th>
  133 + <th width="5%">事故发生时间</th>
  134 + <th width="5%">事故发生地点</th>
  135 + <th width="5%">行驶方向</th>
  136 + <th width="5%">事故对象</th>
  137 + <th width="5%">对象车牌号</th>
  138 + <th width="5%">事故概况</th>
  139 + <th width="5%">受伤人数</th>
  140 + <th width="5%">死亡人数</th>
  141 + <th width="5%">报告人</th>
  142 + <th width="5%">报告人电话</th>
  143 + <th width="5%">备注</th>
  144 + </tr>
  145 + </thead>
  146 + <tbody class="table_body">
  147 + </tbody>
  148 + </table>
  149 + <!-- 其他-->
  150 + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="rests_table">
  151 + <tr role="row">
  152 + <th width="2%">序号</th>
  153 + <th width="5%">报备时间</th>
  154 + <th width="5%">报备人</th>
  155 + <th width="5%">公司</th>
  156 + <th width="5%">分公司</th>
  157 + <th width="7%">线路</th>
  158 + <th width="7%">报备内容</th>
  159 + </tr>
  160 + </thead>
  161 + <tbody class="table_body">
  162 + </tbody>
  163 + </table>
  164 + <!-- 咨询-->
  165 + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="consult_table">
  166 + <thead >
  167 + <tr role="row">
  168 + <th width="2%">序号</th>
  169 + <th width="5%">报备时间</th>
  170 + <th width="5%">报备人</th>
  171 + <th width="5%">公司</th>
  172 + <th width="5%">分公司</th>
  173 + <th width="7%">线路</th>
  174 + <th width="7%">班线名称</th>
  175 + <th width="7%">内容</th>
  176 + </tr>
  177 + </thead>
  178 + <tbody class="table_body">
  179 + </tbody>
  180 + </table>
  181 + </div>
  182 +
  183 + <div class="load-panel">
  184 + <i class="uk-icon-spinner uk-icon-spin"></i>
  185 + 正在加载数据
  186 + </div>
  187 + </div>
  188 +
  189 + <script id="first_last_late_table_body_list" type="text/html">
  190 + {{each data.list as obj i}}
  191 + {{if obj.status == 2}}
  192 + <tr style="background-color: #ff5f78">
  193 + {{else}}
  194 + <tr>
  195 + {{/if}}
  196 + <td style="vertical-align: middle;">{{i + 1}}</td>
  197 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  198 + <td style="vertical-align: middle;">{{obj.report_BBR}}</td>
  199 + <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td>
  200 + <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td>
  201 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  202 + <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
  203 + <td style="vertical-align: middle;">{{obj.report_YWSJ}}</td>
  204 + <td style="vertical-align: middle;">{{obj.report_SMBWD}}</td>
  205 + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
  206 + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
  207 + </tr>
  208 + {{/each}}
  209 + </script>
  210 + <script id="large_interval_table_body_list" type="text/html">
  211 + {{each data.list as obj i}}
  212 + {{if obj.status == 2}}
  213 + <tr style="background-color: #ff5f78">
  214 + {{else}}
  215 + <tr>
  216 + {{/if}}
  217 + <td style="vertical-align: middle;">{{i + 1}}</td>
  218 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  219 + <td style="vertical-align: middle;">{{obj.report_BBR}}</td>
  220 + <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td>
  221 + <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td>
  222 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  223 + <td style="vertical-align: middle;">{{obj.report_ROAD}}</td>
  224 + <td style="vertical-align: middle;">{{obj.report_XSFX}}</td>
  225 + <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
  226 + <td style="vertical-align: middle;">{{obj.report_DJGSNAMEJ}}</td>
  227 + <td style="vertical-align: middle;">{{obj.report_DJGYY}}</td>
  228 + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
  229 + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
  230 + </tr>
  231 + {{/each}}
  232 + </script>
  233 + <script id="emergency_table_body_list" type="text/html">
  234 + {{each data.list as obj i}}
  235 + {{if obj.status == 2}}
  236 + <tr style="background-color: #ff5f78">
  237 + {{else}}
  238 + <tr>
  239 + {{/if}}
  240 + <td style="vertical-align: middle;">{{i + 1}}</td>
  241 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  242 + <td style="vertical-align: middle;">{{obj.report_BBR}}</td>
  243 + <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td>
  244 + <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td>
  245 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  246 + <td style="vertical-align: middle;">{{obj.report_TFSJ}}</td>
  247 + <td style="vertical-align: middle;">{{obj.report_YXSJ}}</td>
  248 + <td style="vertical-align: middle;">{{obj.report_YXBC}}</td>
  249 + <td style="vertical-align: middle;">{{obj.report_TZCS}}</td>
  250 + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
  251 + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
  252 + </tr>
  253 + {{/each}}
  254 + </script>
  255 + <script id="accident_table_body_list" type="text/html">
  256 + {{each data.list as obj i}}
  257 + {{if obj.status == 2}}
  258 + <tr style="background-color: #ff5f78">
  259 + {{else}}
  260 + <tr>
  261 + {{/if}}
  262 + <td style="vertical-align: middle;">{{i + 1}}</td>
  263 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  264 + <td style="vertical-align: middle;">{{obj.report_BBR}}</td>
  265 + <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td>
  266 + <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td>
  267 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  268 + <td style="vertical-align: middle;">{{obj.report_ZBH}}</td>
  269 + <td style="vertical-align: middle;">{{obj.report_JSY}}</td>
  270 + <td style="vertical-align: middle;">{{obj.report_SGSJ}}</td>
  271 + <td style="vertical-align: middle;">{{obj.report_SGDD}}</td>
  272 + <td style="vertical-align: middle;">{{obj.report_XSFX}}</td>
  273 + <td style="vertical-align: middle;">{{obj.report_SGDX}}</td>
  274 + <td style="vertical-align: middle;">{{obj.report_DXPZH}}</td>
  275 + <td style="vertical-align: middle;">{{obj.report_SGGK}}</td>
  276 + <td style="vertical-align: middle;">{{obj.report_SSRS}}</td>
  277 + <td style="vertical-align: middle;">{{obj.report_SWRS}}</td>
  278 + <td style="vertical-align: middle;">{{obj.report_BGR}}</td>
  279 + <td style="vertical-align: middle;">{{obj.report_BGRDH}}</td>
  280 + <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
  281 + </tr>
  282 + {{/each}}
  283 + </script>
  284 + <script id="rests_table_body_list" type="text/html">
  285 + {{each data.list as obj i}}
  286 + {{if obj.status == 2}}
  287 + <tr style="background-color: #ff5f78">
  288 + {{else}}
  289 + <tr>
  290 + {{/if}}
  291 + <td style="vertical-align: middle;">{{i + 1}}</td>
  292 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  293 + <td style="vertical-align: middle;">{{obj.report_BBR}}</td>
  294 + <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td>
  295 + <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td>
  296 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  297 + <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
  298 + </tr>
  299 + {{/each}}
  300 + </script>
  301 + <script id="consult_table_body_list" type="text/html">
  302 + {{each data.list as obj i}}
  303 + {{if obj.status == 2}}
  304 + <tr style="background-color: #ff5f78">
  305 + {{else}}
  306 + <tr>
  307 + {{/if}}
  308 + <td style="vertical-align: middle;">{{i + 1}}</td>
  309 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  310 + <td style="vertical-align: middle;">{{obj.report_BBR}}</td>
  311 + <td style="vertical-align: middle;">{{obj.report_GSNAME}}</td>
  312 + <td style="vertical-align: middle;">{{obj.report_FGSNAME}}</td>
  313 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  314 + <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
  315 + <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
  316 + </tr>
  317 + {{/each}}
  318 + </script>
  319 +
  320 +
  321 + <!-- common js -->
  322 + <script src="/assets/js/common.js"></script>
  323 + <!-- select2 下拉框 -->
  324 + <script src="/metronic_v4.5.4/plugins/select2/js/select2.full.min.js"></script>
  325 + <!-- moment.js 日期处理类库 -->
  326 + <script src="/assets/plugins/moment-with-locales.js" data-exclude=1></script>
  327 + <!-- 日期控件 -->
  328 + <script src="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/js/bootstrap-datetimepicker.min.js"></script>
  329 + <!-- bootstrap -->
  330 + <script src="/metronic_v4.5.4/plugins/bootstrap/js/bootstrap.min.js" data-exclude=1></script>
  331 + <!--<script src="/metronic_v4.5.4/plugins/bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script>-->
  332 + <!-- editable.js -->
  333 + <!--<script src="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.min.js"></script>-->
  334 + <script>
  335 + var manageJs = (function () {
  336 + $('#export').attr('disabled', "true");
  337 +
  338 + var modal = '#report-register-modal';
  339 + var activeDiv='first_last_late_table';
  340 + var lineList = gb_data_basic.activeLines;
  341 + var loading=false;
  342 +
  343 + var line = $("#line").val();
  344 + var date1 = $("#date1").val();
  345 + var date2 = $("#date2").val();
  346 + var dataType = $("#dataType").val();
  347 + var lineName = $('#line option:selected').text();
  348 +
  349 + $(modal).on('init', function (e,data) {
  350 +
  351 + $("#date1").datetimepicker({
  352 + format : 'YYYY-MM-DD',
  353 + locale : 'zh-cn'
  354 + });
  355 + $("#date2").datetimepicker({
  356 + format : 'YYYY-MM-DD',
  357 + locale : 'zh-cn'
  358 + });
  359 + $('#date1').val(moment(new Date()).format('YYYY-MM-DD'));
  360 + $('#date2').val(moment(new Date()).format('YYYY-MM-DD'));
  361 + var data = [];
  362 + $.get('/user/companyData', function(result){
  363 + for(var i = 0; i < result.length; i++){
  364 + var companyCode = result[i].companyCode;
  365 + var children = result[i].children;
  366 + for(var j = 0; j < children.length; j++){
  367 + var code = children[j].code;
  368 + for(var k=0;k < lineList.length;k++ ){
  369 + if(lineList[k]["brancheCompany"]==code && lineList[k]["company"]==companyCode){
  370 + data.push({id: lineList[k]["lineCode"], text: lineList[k]["name"]});
  371 + }
  372 + }
  373 + }
  374 + }
  375 + initPinYinSelect2('#line',data,'');
  376 +
  377 + });
  378 +
  379 + //滚动条
  380 + $('.report-register-table-wrap', modal).perfectScrollbar();
  381 + });
  382 +
  383 + $("#query").on("click",function(){
  384 + if(loading)
  385 + return;
  386 + $('.load-panel', modal).show();
  387 + loading=true;
  388 + line = $("#line").val();
  389 + date1 = $("#date1").val();
  390 + date2 = $("#date2").val();
  391 + if(line == null || line == '' || line.length == 0){
  392 + $('.load-panel', modal).hide();
  393 + loading=false;
  394 + layer.msg("请选择线路");
  395 + return;
  396 + }
  397 + if(date1 == null || date1.trim().length == 0 || date2 == null || date2.trim().length == 0){
  398 + $('.load-panel', modal).hide();
  399 + loading=false;
  400 + layer.msg("请选择时间");
  401 + return;
  402 + } else if(date1 > date2){
  403 + $('.load-panel', modal).hide();
  404 + loading=false;
  405 + layer.msg("时间区间不正确,第二个时间不能大于第一个时间");
  406 + return;
  407 + }
  408 + var type = "query";
  409 + gb_common.$get("/reportRegister/findList", {lineCodes:line,date1:date1,date2:date2,type:type}, function (data) {
  410 + if (data.status == "SUCCESS") {
  411 + var list = data.list;
  412 + var tableList1 = [], tableList2 = [], tableList3 = [], tableList4 = [], tableList5 = [],
  413 + tableList6 = [];
  414 + $.each(list, function (i, rr) {
  415 + rr.report_DATE = formatDate(new Date(rr.report_DATE));
  416 + if (rr.report_TYPE == 1) {
  417 + tableList1.push(rr);
  418 + } else if (rr.report_TYPE == 2) {
  419 + tableList2.push(rr);
  420 + } else if (rr.report_TYPE == 3) {
  421 + tableList3.push(rr);
  422 + } else if (rr.report_TYPE == 4) {
  423 + tableList4.push(rr);
  424 + } else if (rr.report_TYPE == 5) {
  425 + tableList5.push(rr);
  426 + } else if (rr.report_TYPE == 6) {
  427 + tableList6.push(rr);
  428 + }
  429 + });
  430 + var htmlStr = template('first_last_late_table_body_list', {'data':{'list': tableList1,'line':lineList}});
  431 + $('#first_last_late_table .table_body', modal).html(htmlStr);
  432 + htmlStr = template('large_interval_table_body_list', {'data':{'list': tableList2,'line':lineList}});
  433 + $('#large_interval_table .table_body', modal).html(htmlStr);
  434 + htmlStr = template('emergency_table_body_list', {'data':{'list': tableList3,'line':lineList}});
  435 + $('#emergency_table .table_body', modal).html(htmlStr);
  436 + htmlStr = template('accident_table_body_list', {'data':{'list': tableList4,'line':lineList}});
  437 + $('#accident_table .table_body', modal).html(htmlStr);
  438 + htmlStr = template('rests_table_body_list', {'data':{'list': tableList5,'line':lineList}});
  439 + $('#rests_table .table_body', modal).html(htmlStr);
  440 + htmlStr = template('consult_table_body_list', {'data':{'list': tableList6,'line':lineList}});
  441 + $('#consult_table .table_body', modal).html(htmlStr);
  442 + $('.load-panel', modal).hide();
  443 + loading=false;
  444 + if(list.length == 0)
  445 + $("#export").attr('disabled',"true");
  446 + else
  447 + $("#export").removeAttr("disabled");
  448 + }
  449 + });
  450 + });
  451 +
  452 + $("#export").on("click",function(){
  453 + line = $("#line").val();
  454 + date1 = $("#date1").val();
  455 + date2 = $("#date2").val();
  456 + var dateTime='';
  457 + if (date1 == date2) {
  458 + dateTime = moment(date1).format("YYYYMMDD");
  459 + } else {
  460 + dateTime = moment(date1).format("YYYYMMDD")
  461 + +"-"+moment(date2).format("YYYYMMDD");
  462 + }
  463 + if(date1 == null || date1.trim().length == 0 || date2 == null || date2.trim().length == 0){
  464 + layer.msg("请选择时间");
  465 + return;
  466 + } else if(date1 > date2){
  467 + layer.msg("时间区间不正确,第二个时间不能大于第一个时间");
  468 + return;
  469 + }
  470 + lineName = $('#line option:selected').text();
  471 + var type = "export";
  472 + gb_common.$get("/reportRegister/findList", {lineCodes:line,lineName:lineName,date1:date1,date2:date2,type:type}, function (data) {
  473 + if (data.status == "SUCCESS") {
  474 + window.open("/downloadFile/download?fileName="
  475 + +dateTime+"_"+lineName+"_报备登记");
  476 + }
  477 + });
  478 + });
  479 +
  480 +
  481 + $(modal).on('click', '.navigation_bar li', function () {
  482 + $(this).parent().find('li.uk-active').removeClass('uk-active');
  483 + $(this).addClass('uk-active');
  484 + var typeName = $(this).attr('id');
  485 + var oldActiveDivId = $("#"+typeName+"_table").parent().find('.active');
  486 + var oldActiveDiv = document.getElementById(oldActiveDivId.attr('id'));
  487 + oldActiveDiv.style.display = "none";
  488 + oldActiveDivId.removeClass("active");
  489 +
  490 + activeDiv = typeName+"_table";
  491 + $("#"+typeName+"_table").addClass("active");
  492 + var activeTable = document.getElementById(typeName+"_table");
  493 + activeTable.style.display = "";
  494 + });
  495 +
  496 + var formatDate = function(now) {
  497 + var year=now.getFullYear();
  498 + var month=now.getMonth()+1;
  499 + var date=now.getDate();
  500 + var hour=now.getHours();
  501 + var minute=now.getMinutes();
  502 + var second=now.getSeconds();
  503 + return year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second;
  504 + };
  505 +
  506 + })();
  507 + </script>
508 508 </div>
509 509 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/list2.html
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 id="history" class="form-inline" action="">
30   - <div style="display: inline-block;">
31   - <span class="item-label" style="width: 80px;">线路: </span>
32   - <select class="form-control" name="line" id="line" style="width: 180px;"></select>
33   - </div>
34   - <div style="display: inline-block;margin-left: 15px;">
35   - <span class="item-label" style="width: 80px;">时间: </span>
36   - <input class="form-control" type="text" id="date1" style="width: 180px;"/> -
37   - <input class="form-control" type="text" id="date2" style="width: 180px;"/>
38   - </div>
39   - <div style="display: inline-block;margin-left: 15px">
40   - <span class="item-label" style="width: 140px;">类型: </span>
41   - <select class="form-control" name="code" id="code" style="width: 180px;">
42   - <!--<option value="0">所有类型</option>-->
43   - <option value="1">首末班误点</option>
44   - <option value="2">大间隔</option>
45   - <option value="3">突发事件</option>
46   - <option value="4">事故</option>
47   - <option value="5">其他</option>
48   - <option value="6">咨询</option>
49   - </select>
50   - </div>
51   - <div class="form-group">
52   - <input class="btn btn-default" type="button" id="query" value="筛选"/>
53   - <input class="btn btn-default" type="button" id="export" value="导出"/>
54   - </div>
55   - </form>
56   - </div>
57   - <div class="portlet-body">
58   - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px;">
59   - <table class="table table-bordered table-hover table-checkable" id="forms">
60   -
61   - </table>
62   - </div>
63   - </div>
64   - </div>
65   - </div>
66   -
67   - <script>
68   - $(function(){
69   - $('#export').attr('disabled', "true");
70   -
71   - // 关闭左侧栏
72   - if (!$('body').hasClass('page-sidebar-closed'))
73   - $('.menu-toggler.sidebar-toggler').click();
74   -
75   - $("#date").datetimepicker({
76   - format : 'YYYY-MM-DD',
77   - locale : 'zh-cn'
78   - });
79   -
80   - $.get('/report/lineList',function(xlList){
81   - var data = [];
82   - $.get('/user/companyData', function(result){
83   - for(var i = 0; i < result.length; i++){
84   - var companyCode = result[i].companyCode;
85   - var children = result[i].children;
86   - for(var j = 0; j < children.length; j++){
87   - var code = children[j].code;
88   - for(var k=0;k < xlList.length;k++ ){
89   - if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
90   - data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
91   - }
92   - }
93   - }
94   - }
95   - initPinYinSelect2('#line',data,'');
96   -
97   - });
98   - });
99   -
100   -
101   - $('#code').select2({
102   - ajax: {
103   - url: '/realSchedule/sreachVehic',
104   - dataType: 'json',
105   - delay: 150,
106   - data: function(params){
107   - return{nbbm: params.term};
108   - },
109   - processResults: function (data) {
110   - return {
111   - results: data
112   - };
113   - },
114   - cache: true
115   - },
116   - templateResult: function(repo){
117   - if (repo.loading) return repo.text;
118   - var h = '<span>'+repo.text+'</span>';
119   - h += (repo.lineName?'&nbsp;<span class="select2-desc">'+repo.lineName+'</span>':'');
120   - return h;
121   - },
122   - escapeMarkup: function (markup) { return markup; },
123   - minimumInputLength: 1,
124   - templateSelection: function(repo){
125   - return repo.text;
126   - },
127   - language: {
128   - noResults: function(){
129   - return '<span style="color:red;font-size: 12px;">没有搜索到车辆!</span>';
130   - },
131   - inputTooShort : function(e) {
132   - return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入自编号搜索车辆</span>';
133   - },
134   - searching : function() {
135   - return '<span style="color:gray;font-size: 12px;"> 正在搜索车辆...</span>';
136   - }
137   - }
138   - });
139   -
140   - var line = $("#line").val();
141   - var date = $("#date").val();
142   - var code = $("#code").val();
143   - var lineName = $('#line option:selected').text();
144   - $("#query").on("click",function(){
145   - if($("#date").val() == null || $("#date").val().trim().length == 0){
146   - layer.msg("请选择时间");
147   - return;
148   - }
149   - line = $("#line").val();
150   - date = $("#date").val();
151   - code = $("#code").val();
152   - lineName = $('#line option:selected').text();
153   - var type = "query";
154   - $(".hidden").removeClass("hidden");
155   - var i = layer.load(2);
156   - $get('/realSchedule/wxsb',{line:line,date:date,code:code,type:type},function(result){
157   - // 把数据填充到模版中
158   - var tbodyHtml = template('list_repair',{list:result});
159   - // 把渲染好的模版html文本追加到表格中
160   - $('#forms tbody').html(tbodyHtml);
161   - layer.close(i);
162   -
163   - if(result.length == 0)
164   - $("#export").attr('disabled',"true");
165   - else
166   - $("#export").removeAttr("disabled");
167   -
168   - });
169   - });
170   -
171   - $("#export").on("click",function(){
172   - var type = "export";
173   - var i = layer.load(2);
174   - $get('/realSchedule/wxsb', {line:line,date:date,code:code,type:type}, function(result){
175   - window.open("/downloadFile/download?fileName="
176   - +moment(date).format("YYYYMMDD")
177   - +"-"+lineName+"-维修上报记录");
178   - layer.close(i);
179   - });
180   - });
181   -
182   - });
183   - </script>
184   - <script type="text/html" id="table1">
185   - <thead>
186   - <tr>
187   - <th width="4%">序号</th>
188   - <th width="5%">报备时间</th>
189   - <th width="7%">线路</th>
190   - <th width="7%">延误站点</th>
191   - <th width="5%">延误时间</th>
192   - <th width="10%">首末班延误原因</th>
193   - <th width="7%">对外上报部门</th>
194   - <th width="7%">对外上报时间</th>
195   - </tr>
196   - </thead>
197   - <tbody>
198   - {{each data.list as obj i}}
199   - <tr>
200   - <td style="vertical-align: middle;">{{i + 1}}</td>
201   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
202   - <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
203   - <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
204   - <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
205   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
206   - <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
207   - <td style="vertical-align: middle;">{{obj.report_YWSJ}}</td>
208   - <td style="vertical-align: middle;">{{obj.report_SMBWD}}</td>
209   - <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
210   - <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
211   - </tr>
212   - {{/each}}
213   - {{if list.length == 0}}
214   - <tr>
215   - <td colspan="8"><h6 class="muted">没有找到相关数据</h6></td>
216   - </tr>
217   - {{/if}}
218   - </tbody>
219   - </script>
220   - <script type="text/html" id="table2">
221   - <thead>
222   - <tr>
223   - <th width="4%">序号</th>
224   - <th width="5%">报备时间</th>
225   - <th width="7%">线路</th>
226   - <th width="7%">路段</th>
227   - <th width="7%">行驶方向</th>
228   - <th width="7%">站点</th>
229   - <th width="7%">大间隔时间</th>
230   - <th width="7%">大间隔原因</th>
231   - <th width="7%">对外上报部门</th>
232   - <th width="7%">对外上报时间</th>
233   - </tr>
234   - </thead>
235   - <tbody>
236   - {{each list as obj i}}
237   - <tr>
238   - <td style="vertical-align: middle;">{{i + 1}}</td>
239   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
240   - <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
241   - <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
242   - <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
243   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
244   - <td style="vertical-align: middle;">{{obj.report_ROAD}}</td>
245   - <td style="vertical-align: middle;">{{obj.report_XSFX}}</td>
246   - <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
247   - <td style="vertical-align: middle;">{{obj.report_DJGSJ}}</td>
248   - <td style="vertical-align: middle;">{{obj.report_DJGYY}}</td>
249   - <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
250   - <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
251   - </tr>
252   - {{/each}}
253   - {{if list.length == 0}}
254   - <tr>
255   - <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td>
256   - </tr>
257   - {{/if}}
258   - </tbody>
259   - </script>
260   - <script type="text/html" id="table3">
261   - <thead>
262   - <tr>
263   - <th width="4%">序号</th>
264   - <th width="5%">报备时间</th>
265   - <th width="7%">影响线路</th>
266   - <th width="7%">重大活动货突发事件</th>
267   - <th width="7%">影响时间</th>
268   - <th width="7%">影响班次数</th>
269   - <th width="7%">调整措施</th>
270   - <th width="7%">对外上报部门</th>
271   - <th width="7%">对外上报时间</th>
272   - </tr>
273   - </thead>
274   - <tbody>
275   - {{each list as obj i}}
276   - <tr>
277   - <td style="vertical-align: middle;">{{i + 1}}</td>
278   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
279   - <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
280   - <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
281   - <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
282   - <td style="vertical-align: middle;display:none">{{obj.report_XLNAME}}</td>
283   - <td style="vertical-align: middle;">{{obj.report_TFSJ}}</td>
284   - <td style="vertical-align: middle;">{{obj.report_YXSJ}}</td>
285   - <td style="vertical-align: middle;">{{obj.report_YXBC}}</td>
286   - <td style="vertical-align: middle;">{{obj.report_TZCS}}</td>
287   - <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
288   - <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
289   - </tr>
290   - {{/each}}
291   - {{if list.length == 0}}
292   - <tr>
293   - <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td>
294   - </tr>
295   - {{/if}}
296   - </tbody>
297   - </script>
298   - <script type="text/html" id="table4">
299   - <thead>
300   - <tr>
301   - <th width="3%">序号</th>
302   - <th width="5%">报备时间</th>
303   - <th width="7%">线路</th>
304   - <th width="7%">车辆自编号</th>
305   - <th width="7%">驾驶员</th>
306   - <th width="7%">事故发生时间</th>
307   - <th width="7%">事故发生地点</th>
308   - <th width="7%">行驶方向</th>
309   - <th width="7%">事故对象</th>
310   - <th width="7%">对象车牌号</th>
311   - <th width="7%">事故概况</th>
312   - <th width="7%">受伤人数</th>
313   - <th width="7%">死亡人数</th>
314   - <th width="7%">报告人</th>
315   - <th width="7%">报告人电话</th>
316   - <th width="7%">备注</th>
317   - </tr>
318   - </thead>
319   - <tbody>
320   - {{each list as obj i}}
321   - <tr>
322   - <td style="vertical-align: middle;">{{i + 1}}</td>
323   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
324   - <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
325   - <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
326   - <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
327   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
328   - <td style="vertical-align: middle;">{{obj.report_ZBH}}</td>
329   - <td style="vertical-align: middle;">{{obj.report_JSY}}</td>
330   - <td style="vertical-align: middle;">{{obj.report_SGSJ}}</td>
331   - <td style="vertical-align: middle;">{{obj.report_SGDD}}</td>
332   - <td style="vertical-align: middle;">{{obj.report_XSFX}}</td>
333   - <td style="vertical-align: middle;">{{obj.report_SGDX}}</td>
334   - <td style="vertical-align: middle;">{{obj.report_DXPZH}}</td>
335   - <td style="vertical-align: middle;">{{obj.report_SGGK}}</td>
336   - <td style="vertical-align: middle;">{{obj.report_SSRS}}</td>
337   - <td style="vertical-align: middle;">{{obj.report_SWRS}}</td>
338   - <td style="vertical-align: middle;">{{obj.report_BGR}}</td>
339   - <td style="vertical-align: middle;">{{obj.report_BGRDH}}</td>
340   - <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
341   - </tr>
342   - {{/each}}
343   - {{if list.length == 0}}
344   - <tr>
345   - <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td>
346   - </tr>
347   - {{/if}}
348   - </tbody>
349   - </script>
350   - <script type="text/html" id="table5">
351   - <thead>
352   - <tr>
353   - <th width="4%">序号</th>
354   - <th width="5%">报备时间</th>
355   - <th width="7%">线路</th>
356   - <th width="7%">报备内容</th>
357   - </tr>
358   - </thead>
359   - <tbody>
360   - {{each list as obj i}}
361   - <tr>
362   - <td style="vertical-align: middle;">{{i + 1}}</td>
363   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
364   - <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
365   - <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
366   - <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
367   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
368   - <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
369   - </tr>
370   - {{/each}}
371   - {{if list.length == 0}}
372   - <tr>
373   - <td colspan="4"><h6 class="muted">没有找到相关数据</h6></td>
374   - </tr>
375   - {{/if}}
376   - </tbody>
377   - </script>
378   - <script type="text/html" id="table6">
379   - <thead>
380   - <tr>
381   - <th width="4%">序号</th>
382   - <th width="5%">报备时间</th>
383   - <th width="7%">线路</th>
384   - <th width="7%">班线名称</th>
385   - <th width="7%">内容</th>
386   - </tr>
387   - </thead>
388   - <tbody>
389   - {{each list as obj i}}
390   - <tr>
391   - <td style="vertical-align: middle;">{{i + 1}}</td>
392   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
393   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
394   - <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
395   - <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
396   - </tr>
397   - {{/each}}
398   - {{if list.length == 0}}
399   - <tr>
400   - <td colspan="5"><h6 class="muted">没有找到相关数据</h6></td>
401   - </tr>
402   - {{/if}}
403   - </tbody>
404   - </script>
405   -
406   - <script>
407   - (function () {
408   - $('#export').attr('disabled', "true");
409   -
410   - // 关闭左侧栏
411   - if (!$('body').hasClass('page-sidebar-closed'))
412   - $('.menu-toggler.sidebar-toggler').click();
413   -
414   - $("#date1").datetimepicker({
415   - format : 'YYYY-MM-DD',
416   - locale : 'zh-cn'
417   - });
418   - $("#date2").datetimepicker({
419   - format : 'YYYY-MM-DD',
420   - locale : 'zh-cn'
421   - });
422   -
423   - $.get('/report/lineList',function(xlList){
424   - var data = [];
425   - $.get('/user/companyData', function(result){
426   - for(var i = 0; i < result.length; i++){
427   - var companyCode = result[i].companyCode;
428   - var children = result[i].children;
429   - for(var j = 0; j < children.length; j++){
430   - var code = children[j].code;
431   - for(var k=0;k < xlList.length;k++ ){
432   - if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
433   - data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
434   - }
435   - }
436   - }
437   - }
438   - initPinYinSelect2('#line',data,'');
439   -
440   - });
441   - });
442   - var line = $("#line").val();
443   - var date1 = $("#date1").val();
444   - var date2 = $("#date2").val();
445   - var dataType = $("#dataType").val();
446   - var lineName = $('#line option:selected').text();
447   - $("#query").on("click",function(){
448   - line = $("#line").val();
449   - date1 = $("#date1").val();
450   - date2 = $("#date2").val();
451   - if(date1 == null || date1.trim().length == 0 || date2 == null || date2.trim().length == 0){
452   - layer.msg("请选择时间");
453   - return;
454   - } else if(date1 > date2){
455   - layer.msg("时间区间不正确,第二个时间不能大于第一个时间");
456   - return;
457   - }
458   - dataType = $("#dataType").val();
459   - lineName = $('#line option:selected').text();
460   - var type = "query";
461   - $(".hidden").removeClass("hidden");
462   - var i = layer.load(2);
463   - $get('/realSchedule/wxsb',{line:line,date:date,dataType:dataType,type:type},function(result){
464   - // 把数据填充到模版中
465   - var tbodyHtml = template('list_repair',{list:result});
466   - // 把渲染好的模版html文本追加到表格中
467   - $('#forms tbody').html(tbodyHtml);
468   - layer.close(i);
469   -
470   - if(result.length == 0)
471   - $("#export").attr('disabled',"true");
472   - else
473   - $("#export").removeAttr("disabled");
474   -
475   - });
476   - });
477   -
478   - $("#export").on("click",function(){
479   - var type = "export";
480   - var i = layer.load(2);
481   - $get('/realSchedule/wxsb', {line:line,date:date,code:code,type:type}, function(result){
482   - window.open("/downloadFile/download?fileName="
483   - +moment(date).format("YYYYMMDD")
484   - +"-"+lineName+"-维修上报记录");
485   - layer.close(i);
486   - });
487   - });
488   -
489   - })();
490   -
491   - </script>
492   -</div>
  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 id="history" class="form-inline" action="">
  30 + <div style="display: inline-block;">
  31 + <span class="item-label" style="width: 80px;">线路: </span>
  32 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block;margin-left: 15px;">
  35 + <span class="item-label" style="width: 80px;">时间: </span>
  36 + <input class="form-control" type="text" id="date1" style="width: 180px;"/> -
  37 + <input class="form-control" type="text" id="date2" style="width: 180px;"/>
  38 + </div>
  39 + <div style="display: inline-block;margin-left: 15px">
  40 + <span class="item-label" style="width: 140px;">类型: </span>
  41 + <select class="form-control" name="code" id="code" style="width: 180px;">
  42 + <!--<option value="0">所有类型</option>-->
  43 + <option value="1">首末班误点</option>
  44 + <option value="2">大间隔</option>
  45 + <option value="3">突发事件</option>
  46 + <option value="4">事故</option>
  47 + <option value="5">其他</option>
  48 + <option value="6">咨询</option>
  49 + </select>
  50 + </div>
  51 + <div class="form-group">
  52 + <input class="btn btn-default" type="button" id="query" value="筛选"/>
  53 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  54 + </div>
  55 + </form>
  56 + </div>
  57 + <div class="portlet-body">
  58 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px;">
  59 + <table class="table table-bordered table-hover table-checkable" id="forms">
  60 +
  61 + </table>
  62 + </div>
  63 + </div>
  64 + </div>
  65 + </div>
  66 +
  67 + <script>
  68 + $(function(){
  69 + $('#export').attr('disabled', "true");
  70 +
  71 + // 关闭左侧栏
  72 + if (!$('body').hasClass('page-sidebar-closed'))
  73 + $('.menu-toggler.sidebar-toggler').click();
  74 +
  75 + $("#date").datetimepicker({
  76 + format : 'YYYY-MM-DD',
  77 + locale : 'zh-cn'
  78 + });
  79 +
  80 + $.get('/report/lineList',function(xlList){
  81 + var data = [];
  82 + $.get('/user/companyData', function(result){
  83 + for(var i = 0; i < result.length; i++){
  84 + var companyCode = result[i].companyCode;
  85 + var children = result[i].children;
  86 + for(var j = 0; j < children.length; j++){
  87 + var code = children[j].code;
  88 + for(var k=0;k < xlList.length;k++ ){
  89 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  90 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  91 + }
  92 + }
  93 + }
  94 + }
  95 + initPinYinSelect2('#line',data,'');
  96 +
  97 + });
  98 + });
  99 +
  100 +
  101 + $('#code').select2({
  102 + ajax: {
  103 + url: '/realSchedule/sreachVehic',
  104 + dataType: 'json',
  105 + delay: 150,
  106 + data: function(params){
  107 + return{nbbm: params.term};
  108 + },
  109 + processResults: function (data) {
  110 + return {
  111 + results: data
  112 + };
  113 + },
  114 + cache: true
  115 + },
  116 + templateResult: function(repo){
  117 + if (repo.loading) return repo.text;
  118 + var h = '<span>'+repo.text+'</span>';
  119 + h += (repo.lineName?'&nbsp;<span class="select2-desc">'+repo.lineName+'</span>':'');
  120 + return h;
  121 + },
  122 + escapeMarkup: function (markup) { return markup; },
  123 + minimumInputLength: 1,
  124 + templateSelection: function(repo){
  125 + return repo.text;
  126 + },
  127 + language: {
  128 + noResults: function(){
  129 + return '<span style="color:red;font-size: 12px;">没有搜索到车辆!</span>';
  130 + },
  131 + inputTooShort : function(e) {
  132 + return '<span style="color:gray;font-size: 12px;"><i class="fa fa-search"></i> 输入自编号搜索车辆</span>';
  133 + },
  134 + searching : function() {
  135 + return '<span style="color:gray;font-size: 12px;"> 正在搜索车辆...</span>';
  136 + }
  137 + }
  138 + });
  139 +
  140 + var line = $("#line").val();
  141 + var date = $("#date").val();
  142 + var code = $("#code").val();
  143 + var lineName = $('#line option:selected').text();
  144 + $("#query").on("click",function(){
  145 + if($("#date").val() == null || $("#date").val().trim().length == 0){
  146 + layer.msg("请选择时间");
  147 + return;
  148 + }
  149 + line = $("#line").val();
  150 + date = $("#date").val();
  151 + code = $("#code").val();
  152 + lineName = $('#line option:selected').text();
  153 + var type = "query";
  154 + $(".hidden").removeClass("hidden");
  155 + var i = layer.load(2);
  156 + $get('/realSchedule/wxsb',{line:line,date:date,code:code,type:type},function(result){
  157 + // 把数据填充到模版中
  158 + var tbodyHtml = template('list_repair',{list:result});
  159 + // 把渲染好的模版html文本追加到表格中
  160 + $('#forms tbody').html(tbodyHtml);
  161 + layer.close(i);
  162 +
  163 + if(result.length == 0)
  164 + $("#export").attr('disabled',"true");
  165 + else
  166 + $("#export").removeAttr("disabled");
  167 +
  168 + });
  169 + });
  170 +
  171 + $("#export").on("click",function(){
  172 + var type = "export";
  173 + var i = layer.load(2);
  174 + $get('/realSchedule/wxsb', {line:line,date:date,code:code,type:type}, function(result){
  175 + window.open("/downloadFile/download?fileName="
  176 + +moment(date).format("YYYYMMDD")
  177 + +"-"+lineName+"-维修上报记录");
  178 + layer.close(i);
  179 + });
  180 + });
  181 +
  182 + });
  183 + </script>
  184 + <script type="text/html" id="table1">
  185 + <thead>
  186 + <tr>
  187 + <th width="4%">序号</th>
  188 + <th width="5%">报备时间</th>
  189 + <th width="7%">线路</th>
  190 + <th width="7%">延误站点</th>
  191 + <th width="5%">延误时间</th>
  192 + <th width="10%">首末班延误原因</th>
  193 + <th width="7%">对外上报部门</th>
  194 + <th width="7%">对外上报时间</th>
  195 + </tr>
  196 + </thead>
  197 + <tbody>
  198 + {{each data.list as obj i}}
  199 + <tr>
  200 + <td style="vertical-align: middle;">{{i + 1}}</td>
  201 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  202 + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
  203 + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
  204 + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
  205 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  206 + <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
  207 + <td style="vertical-align: middle;">{{obj.report_YWSJ}}</td>
  208 + <td style="vertical-align: middle;">{{obj.report_SMBWD}}</td>
  209 + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
  210 + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
  211 + </tr>
  212 + {{/each}}
  213 + {{if list.length == 0}}
  214 + <tr>
  215 + <td colspan="8"><h6 class="muted">没有找到相关数据</h6></td>
  216 + </tr>
  217 + {{/if}}
  218 + </tbody>
  219 + </script>
  220 + <script type="text/html" id="table2">
  221 + <thead>
  222 + <tr>
  223 + <th width="4%">序号</th>
  224 + <th width="5%">报备时间</th>
  225 + <th width="7%">线路</th>
  226 + <th width="7%">路段</th>
  227 + <th width="7%">行驶方向</th>
  228 + <th width="7%">站点</th>
  229 + <th width="7%">大间隔时间</th>
  230 + <th width="7%">大间隔原因</th>
  231 + <th width="7%">对外上报部门</th>
  232 + <th width="7%">对外上报时间</th>
  233 + </tr>
  234 + </thead>
  235 + <tbody>
  236 + {{each list as obj i}}
  237 + <tr>
  238 + <td style="vertical-align: middle;">{{i + 1}}</td>
  239 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  240 + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
  241 + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
  242 + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
  243 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  244 + <td style="vertical-align: middle;">{{obj.report_ROAD}}</td>
  245 + <td style="vertical-align: middle;">{{obj.report_XSFX}}</td>
  246 + <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
  247 + <td style="vertical-align: middle;">{{obj.report_DJGSJ}}</td>
  248 + <td style="vertical-align: middle;">{{obj.report_DJGYY}}</td>
  249 + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
  250 + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
  251 + </tr>
  252 + {{/each}}
  253 + {{if list.length == 0}}
  254 + <tr>
  255 + <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td>
  256 + </tr>
  257 + {{/if}}
  258 + </tbody>
  259 + </script>
  260 + <script type="text/html" id="table3">
  261 + <thead>
  262 + <tr>
  263 + <th width="4%">序号</th>
  264 + <th width="5%">报备时间</th>
  265 + <th width="7%">影响线路</th>
  266 + <th width="7%">重大活动货突发事件</th>
  267 + <th width="7%">影响时间</th>
  268 + <th width="7%">影响班次数</th>
  269 + <th width="7%">调整措施</th>
  270 + <th width="7%">对外上报部门</th>
  271 + <th width="7%">对外上报时间</th>
  272 + </tr>
  273 + </thead>
  274 + <tbody>
  275 + {{each list as obj i}}
  276 + <tr>
  277 + <td style="vertical-align: middle;">{{i + 1}}</td>
  278 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  279 + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
  280 + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
  281 + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
  282 + <td style="vertical-align: middle;display:none">{{obj.report_XLNAME}}</td>
  283 + <td style="vertical-align: middle;">{{obj.report_TFSJ}}</td>
  284 + <td style="vertical-align: middle;">{{obj.report_YXSJ}}</td>
  285 + <td style="vertical-align: middle;">{{obj.report_YXBC}}</td>
  286 + <td style="vertical-align: middle;">{{obj.report_TZCS}}</td>
  287 + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
  288 + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
  289 + </tr>
  290 + {{/each}}
  291 + {{if list.length == 0}}
  292 + <tr>
  293 + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td>
  294 + </tr>
  295 + {{/if}}
  296 + </tbody>
  297 + </script>
  298 + <script type="text/html" id="table4">
  299 + <thead>
  300 + <tr>
  301 + <th width="3%">序号</th>
  302 + <th width="5%">报备时间</th>
  303 + <th width="7%">线路</th>
  304 + <th width="7%">车辆自编号</th>
  305 + <th width="7%">驾驶员</th>
  306 + <th width="7%">事故发生时间</th>
  307 + <th width="7%">事故发生地点</th>
  308 + <th width="7%">行驶方向</th>
  309 + <th width="7%">事故对象</th>
  310 + <th width="7%">对象车牌号</th>
  311 + <th width="7%">事故概况</th>
  312 + <th width="7%">受伤人数</th>
  313 + <th width="7%">死亡人数</th>
  314 + <th width="7%">报告人</th>
  315 + <th width="7%">报告人电话</th>
  316 + <th width="7%">备注</th>
  317 + </tr>
  318 + </thead>
  319 + <tbody>
  320 + {{each list as obj i}}
  321 + <tr>
  322 + <td style="vertical-align: middle;">{{i + 1}}</td>
  323 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  324 + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
  325 + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
  326 + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
  327 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  328 + <td style="vertical-align: middle;">{{obj.report_ZBH}}</td>
  329 + <td style="vertical-align: middle;">{{obj.report_JSY}}</td>
  330 + <td style="vertical-align: middle;">{{obj.report_SGSJ}}</td>
  331 + <td style="vertical-align: middle;">{{obj.report_SGDD}}</td>
  332 + <td style="vertical-align: middle;">{{obj.report_XSFX}}</td>
  333 + <td style="vertical-align: middle;">{{obj.report_SGDX}}</td>
  334 + <td style="vertical-align: middle;">{{obj.report_DXPZH}}</td>
  335 + <td style="vertical-align: middle;">{{obj.report_SGGK}}</td>
  336 + <td style="vertical-align: middle;">{{obj.report_SSRS}}</td>
  337 + <td style="vertical-align: middle;">{{obj.report_SWRS}}</td>
  338 + <td style="vertical-align: middle;">{{obj.report_BGR}}</td>
  339 + <td style="vertical-align: middle;">{{obj.report_BGRDH}}</td>
  340 + <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
  341 + </tr>
  342 + {{/each}}
  343 + {{if list.length == 0}}
  344 + <tr>
  345 + <td colspan="16"><h6 class="muted">没有找到相关数据</h6></td>
  346 + </tr>
  347 + {{/if}}
  348 + </tbody>
  349 + </script>
  350 + <script type="text/html" id="table5">
  351 + <thead>
  352 + <tr>
  353 + <th width="4%">序号</th>
  354 + <th width="5%">报备时间</th>
  355 + <th width="7%">线路</th>
  356 + <th width="7%">报备内容</th>
  357 + </tr>
  358 + </thead>
  359 + <tbody>
  360 + {{each list as obj i}}
  361 + <tr>
  362 + <td style="vertical-align: middle;">{{i + 1}}</td>
  363 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  364 + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
  365 + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
  366 + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
  367 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  368 + <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
  369 + </tr>
  370 + {{/each}}
  371 + {{if list.length == 0}}
  372 + <tr>
  373 + <td colspan="4"><h6 class="muted">没有找到相关数据</h6></td>
  374 + </tr>
  375 + {{/if}}
  376 + </tbody>
  377 + </script>
  378 + <script type="text/html" id="table6">
  379 + <thead>
  380 + <tr>
  381 + <th width="4%">序号</th>
  382 + <th width="5%">报备时间</th>
  383 + <th width="7%">线路</th>
  384 + <th width="7%">班线名称</th>
  385 + <th width="7%">内容</th>
  386 + </tr>
  387 + </thead>
  388 + <tbody>
  389 + {{each list as obj i}}
  390 + <tr>
  391 + <td style="vertical-align: middle;">{{i + 1}}</td>
  392 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  393 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  394 + <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
  395 + <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
  396 + </tr>
  397 + {{/each}}
  398 + {{if list.length == 0}}
  399 + <tr>
  400 + <td colspan="5"><h6 class="muted">没有找到相关数据</h6></td>
  401 + </tr>
  402 + {{/if}}
  403 + </tbody>
  404 + </script>
  405 +
  406 + <script>
  407 + (function () {
  408 + $('#export').attr('disabled', "true");
  409 +
  410 + // 关闭左侧栏
  411 + if (!$('body').hasClass('page-sidebar-closed'))
  412 + $('.menu-toggler.sidebar-toggler').click();
  413 +
  414 + $("#date1").datetimepicker({
  415 + format : 'YYYY-MM-DD',
  416 + locale : 'zh-cn'
  417 + });
  418 + $("#date2").datetimepicker({
  419 + format : 'YYYY-MM-DD',
  420 + locale : 'zh-cn'
  421 + });
  422 +
  423 + $.get('/report/lineList',function(xlList){
  424 + var data = [];
  425 + $.get('/user/companyData', function(result){
  426 + for(var i = 0; i < result.length; i++){
  427 + var companyCode = result[i].companyCode;
  428 + var children = result[i].children;
  429 + for(var j = 0; j < children.length; j++){
  430 + var code = children[j].code;
  431 + for(var k=0;k < xlList.length;k++ ){
  432 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  433 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  434 + }
  435 + }
  436 + }
  437 + }
  438 + initPinYinSelect2('#line',data,'');
  439 +
  440 + });
  441 + });
  442 + var line = $("#line").val();
  443 + var date1 = $("#date1").val();
  444 + var date2 = $("#date2").val();
  445 + var dataType = $("#dataType").val();
  446 + var lineName = $('#line option:selected').text();
  447 + $("#query").on("click",function(){
  448 + line = $("#line").val();
  449 + date1 = $("#date1").val();
  450 + date2 = $("#date2").val();
  451 + if(date1 == null || date1.trim().length == 0 || date2 == null || date2.trim().length == 0){
  452 + layer.msg("请选择时间");
  453 + return;
  454 + } else if(date1 > date2){
  455 + layer.msg("时间区间不正确,第二个时间不能大于第一个时间");
  456 + return;
  457 + }
  458 + dataType = $("#dataType").val();
  459 + lineName = $('#line option:selected').text();
  460 + var type = "query";
  461 + $(".hidden").removeClass("hidden");
  462 + var i = layer.load(2);
  463 + $get('/realSchedule/wxsb',{line:line,date:date,dataType:dataType,type:type},function(result){
  464 + // 把数据填充到模版中
  465 + var tbodyHtml = template('list_repair',{list:result});
  466 + // 把渲染好的模版html文本追加到表格中
  467 + $('#forms tbody').html(tbodyHtml);
  468 + layer.close(i);
  469 +
  470 + if(result.length == 0)
  471 + $("#export").attr('disabled',"true");
  472 + else
  473 + $("#export").removeAttr("disabled");
  474 +
  475 + });
  476 + });
  477 +
  478 + $("#export").on("click",function(){
  479 + var type = "export";
  480 + var i = layer.load(2);
  481 + $get('/realSchedule/wxsb', {line:line,date:date,code:code,type:type}, function(result){
  482 + window.open("/downloadFile/download?fileName="
  483 + +moment(date).format("YYYYMMDD")
  484 + +"-"+lineName+"-维修上报记录");
  485 + layer.close(i);
  486 + });
  487 + });
  488 +
  489 + })();
  490 +
  491 + </script>
  492 +</div>
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/manage.html
1   -<div class="uk-modal ct_move_modal" id="report-register-modal">
2   -
3   - <!-- editable -->
4   - <!--<link href="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet" type="text/css" />-->
5   - <!-- Bootstrap style -->
6   - <link href="/metronic_v4.5.4/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
7   - <!-- select2 下拉框插件 -->
8   - <!--<link href="/metronic_v4.5.4/plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css" />-->
9   - <!--<link href="/metronic_v4.5.4/plugins/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css" />-->
10   - <style>
11   - <style>
12   - .lineSelect{
13   - width:174px !important
14   - }
15   -
16   - /*ul.navigation_bar:before {
17   - content: "报备类型";
18   - position: absolute;
19   - top: -9px;
20   - font-size: 12px;
21   - background: white;
22   - padding: 0 4px;
23   - color: #7d7b7b;
24   - left: 10px;
25   - }*/
26   - </style>
27   - <div class="uk-modal-dialog" style="width: 1800px;">
28   - <a href="" class="uk-modal-close uk-close"></a>
29   - <div class="uk-modal-header">
30   - <h2>报备登记</h2>
31   - </div>
32   -
33   -
34   - <div style="padding-left: 12px;margin: 10px 0">
35   - <ul class="uk-subnav uk-subnav-pill navigation_bar">
36   - <li id="first_last_late" class="uk-active"><a>首末班误点</a></li>
37   - <li id="large_interval"><a>大间隔</a></li>
38   - <li id="emergency"><a>突发事件</a></li>
39   - <li id="accident"><a>事故</a></li>
40   - <li id="rests"><a>其他</a></li>
41   - <li id="consult"><a>咨询</a></li>
42   - </ul>
43   - </div>
44   -
45   - <div style="padding-left: 12px;margin: 10px 0">
46   - <div class=" uk-subnav-pill management_bar" >
47   - <button class="uk-button uk-button-primary" id="add">添加</button>
48   - <button class="uk-button uk-button-danger" id="update">修改</button>
49   - <button class="uk-button uk-button-danger" id="delete">删除</button>
50   - </div>
51   -
52   - <!--<div class=" management_bar" style="padding-right: 12px;float: right;">-->
53   - <!--<button class="ui-btn active">保存</button>-->
54   - <!--<button class="ui-btn disabled">取消</button>-->
55   - <!--</div>-->
56   - </div>
57   -
58   - <div class="ct_table_wrap" style="height: 510px">
59   - <!-- 首末班误点-->
60   - <table class="table table-striped table-bordered table-hover table-checkable report-register-table active" id="first_last_late_table">
61   - <thead class="">
62   - <tr role="row">
63   - <!--<th width="2%"><input type="radio" name="checkItems"></th>-->
64   - <th width="2%">#</th>
65   - <th width="2%">序号</th>
66   - <th width="5%">报备时间</th>
67   - <th width="7%">线路</th>
68   - <th width="7%">延误站点</th>
69   - <th width="5%">延误时间</th>
70   - <th width="10%">首末班延误原因</th>
71   - <th width="7%">对外上报部门</th>
72   - <th width="7%">对外上报时间</th>
73   - </tr>
74   - </thead>
75   - <tbody class="table_body">
76   - </tbody>
77   - </table>
78   - <!-- 大间隔-->
79   - <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="large_interval_table">
80   - <thead class="">
81   - <tr role="row">
82   - <!--<th width="2%"><input type="radio" name="checkItems"></th>-->
83   - <th width="2%">#</th>
84   - <th width="2%">序号</th>
85   - <th width="5%">报备时间</th>
86   - <th width="7%">线路</th>
87   - <th width="7%">路段</th>
88   - <th width="7%">行驶方向</th>
89   - <th width="7%">站点</th>
90   - <th width="7%">大间隔时间</th>
91   - <th width="7%">大间隔原因</th>
92   - <th width="7%">对外上报部门</th>
93   - <th width="7%">对外上报时间</th>
94   - </tr>
95   - </thead>
96   - <tbody class="table_body">
97   - </tbody>
98   - </table>
99   - <!-- 突发事件-->
100   - <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="emergency_table">
101   - <thead class="">
102   - <tr role="row">
103   - <!--<th width="2%"><input type="radio" name="checkItems"></th>-->
104   - <th width="2%">#</th>
105   - <th width="2%">序号</th>
106   - <th width="5%">报备时间</th>
107   - <th width="7%">影响线路</th>
108   - <th width="7%">重大活动货突发事件</th>
109   - <th width="7%">影响时间</th>
110   - <th width="7%">影响班次数</th>
111   - <th width="7%">调整措施</th>
112   - <th width="7%">对外上报部门</th>
113   - <th width="7%">对外上报时间</th>
114   - </tr>
115   - </thead>
116   - <tbody class="table_body">
117   - </tbody>
118   - </table>
119   - <!-- 事故-->
120   - <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="accident_table">
121   - <thead class="">
122   - <tr role="row">
123   - <!--<th width="2%"><input type="radio" name="checkItems"></th>-->
124   - <th width="1%">#</th>
125   - <th width="2%">序号</th>
126   - <th width="5%">报备时间</th>
127   - <th width="5%">线路</th>
128   - <th width="5%">车辆自编号</th>
129   - <th width="5%">驾驶员</th>
130   - <th width="5%">事故发生时间</th>
131   - <th width="5%">事故发生地点</th>
132   - <th width="5%">行驶方向</th>
133   - <th width="5%">事故对象</th>
134   - <th width="5%">对象车牌号</th>
135   - <th width="5%">事故概况</th>
136   - <th width="5%">受伤人数</th>
137   - <th width="5%">死亡人数</th>
138   - <th width="5%">报告人</th>
139   - <th width="5%">报告人电话</th>
140   - <th width="5%">备注</th>
141   - </tr>
142   - </thead>
143   - <tbody class="table_body">
144   - </tbody>
145   - </table>
146   - <!-- 其他-->
147   - <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="rests_table">
148   - <thead class="">
149   - <tr role="row">
150   - <!--<th width="2%"><input type="radio" name="checkItems"></th>-->
151   - <th width="2%">#</th>
152   - <th width="2%">序号</th>
153   - <th width="5%">报备时间</th>
154   - <th width="7%">线路</th>
155   - <th width="7%">报备内容</th>
156   - </tr>
157   - </thead>
158   - <tbody class="table_body">
159   - </tbody>
160   - </table>
161   - <!-- 咨询-->
162   - <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="consult_table">
163   - <thead class="">
164   - <tr role="row">
165   - <!--<th width="2%"><input type="radio" name="checkItems"></th>-->
166   - <th width="2%">#</th>
167   - <th width="2%">序号</th>
168   - <th width="5%">报备时间</th>
169   - <th width="7%">线路</th>
170   - <th width="7%">班线名称</th>
171   - <th width="7%">内容</th>
172   - </tr>
173   - </thead>
174   - <tbody class="table_body">
175   - </tbody>
176   - </table>
177   - </div>
178   -
179   - <div class="load-panel">
180   - <i class="uk-icon-spinner uk-icon-spin"></i>
181   - 正在加载数据
182   - </div>
183   - </div>
184   -
185   - <script id="first_last_late_table_body" type="text/html">
186   - {{each data.list as obj i}}
187   - {{if obj.status == 2}}
188   - <tr style="background-color: #ff5f78">
189   - <td style="vertical-align: middle;">
190   - <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">-->
191   - </td>
192   - {{else}}
193   - <tr>
194   - <td style="vertical-align: middle;">
195   - <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">
196   - </td>
197   - {{/if}}
198   - <td style="vertical-align: middle;">{{i + 1}}</td>
199   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
200   - <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
201   - <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
202   - <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
203   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
204   - <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
205   - <td style="vertical-align: middle;">{{obj.report_YWSJ}}</td>
206   - <td style="vertical-align: middle;">{{obj.report_SMBWD}}</td>
207   - <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
208   - <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
209   - </tr>
210   - {{/each}}
211   - </script>
212   - <script id="large_interval_table_body" type="text/html">
213   - {{each data.list as obj i}}
214   - {{if obj.status == 2}}
215   - <tr style="background-color: #ff5f78">
216   - <td style="vertical-align: middle;">
217   - <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">-->
218   - </td>
219   - {{else}}
220   - <tr>
221   - <td style="vertical-align: middle;">
222   - <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">
223   - </td>
224   - {{/if}}
225   - <td style="vertical-align: middle;">{{i + 1}}</td>
226   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
227   - <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
228   - <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
229   - <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
230   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
231   - <td style="vertical-align: middle;">{{obj.report_ROAD}}</td>
232   - <td style="vertical-align: middle;">{{obj.report_XSFX}}</td>
233   - <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
234   - <td style="vertical-align: middle;">{{obj.report_DJGSJ}}</td>
235   - <td style="vertical-align: middle;">{{obj.report_DJGYY}}</td>
236   - <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
237   - <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
238   - </tr>
239   - {{/each}}
240   - </script>
241   - <script id="emergency_table_body" type="text/html">
242   - {{each data.list as obj i}}
243   - {{if obj.status == 2}}
244   - <tr style="background-color: #ff5f78">
245   - <td style="vertical-align: middle;">
246   - <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">-->
247   - </td>
248   - {{else}}
249   - <tr>
250   - <td style="vertical-align: middle;">
251   - <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">
252   - </td>
253   - {{/if}}
254   - <td style="vertical-align: middle;">{{i + 1}}</td>
255   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
256   - <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
257   - <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
258   - <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
259   - <td style="vertical-align: middle;display:none">{{obj.report_XLNAME}}</td>
260   - <td style="vertical-align: middle;">{{obj.report_TFSJ}}</td>
261   - <td style="vertical-align: middle;">{{obj.report_YXSJ}}</td>
262   - <td style="vertical-align: middle;">{{obj.report_YXBC}}</td>
263   - <td style="vertical-align: middle;">{{obj.report_TZCS}}</td>
264   - <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
265   - <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
266   - </tr>
267   - {{/each}}
268   - </script>
269   - <script id="accident_table_body" type="text/html">
270   - {{each data.list as obj i}}
271   - {{if obj.status == 2}}
272   - <tr style="background-color: #ff5f78">
273   - <td style="vertical-align: middle;">
274   - <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">-->
275   - </td>
276   - {{else}}
277   - <tr>
278   - <td style="vertical-align: middle;">
279   - <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">
280   - </td>
281   - {{/if}}
282   - <td style="vertical-align: middle;">{{i + 1}}</td>
283   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
284   - <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
285   - <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
286   - <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
287   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
288   - <td style="vertical-align: middle;">{{obj.report_ZBH}}</td>
289   - <td style="vertical-align: middle;">{{obj.report_JSY}}</td>
290   - <td style="vertical-align: middle;">{{obj.report_SGSJ}}</td>
291   - <td style="vertical-align: middle;">{{obj.report_SGDD}}</td>
292   - <td style="vertical-align: middle;">{{obj.report_XSFX}}</td>
293   - <td style="vertical-align: middle;">{{obj.report_SGDX}}</td>
294   - <td style="vertical-align: middle;">{{obj.report_DXPZH}}</td>
295   - <td style="vertical-align: middle;">{{obj.report_SGGK}}</td>
296   - <td style="vertical-align: middle;">{{obj.report_SSRS}}</td>
297   - <td style="vertical-align: middle;">{{obj.report_SWRS}}</td>
298   - <td style="vertical-align: middle;">{{obj.report_BGR}}</td>
299   - <td style="vertical-align: middle;">{{obj.report_BGRDH}}</td>
300   - <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
301   - </tr>
302   - {{/each}}
303   - </script>
304   - <script id="rests_table_body" type="text/html">
305   - {{each data.list as obj i}}
306   -
307   - {{if obj.status == 2}}
308   - <tr style="background-color: #ff5f78">
309   - <td style="vertical-align: middle;">
310   - <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">-->
311   - </td>
312   - {{else}}
313   - <tr>
314   - <td style="vertical-align: middle;">
315   - <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">
316   - </td>
317   - {{/if}}
318   - <td style="vertical-align: middle;">{{i + 1}}</td>
319   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
320   - <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
321   - <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
322   - <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
323   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
324   - <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
325   - </tr>
326   - {{/each}}
327   - </script>
328   - <script id="consult_table_body" type="text/html">
329   - {{each data.list as obj i}}
330   -
331   - {{if obj.status == 2}}
332   - <tr style="background-color: #ff5f78">
333   - <td style="vertical-align: middle;">
334   - <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">-->
335   - </td>
336   - {{else}}
337   - <tr>
338   - <td style="vertical-align: middle;">
339   - <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">
340   - </td>
341   - {{/if}}
342   - <td style="vertical-align: middle;">{{i + 1}}</td>
343   - <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
344   - <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
345   - <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
346   - <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
347   - <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
348   - <!--<td style="vertical-align: middle;"><select class="form-control lineSelect" name="lineSelect" value="{{obj.report_XLNAME}}" data-id="{{obj.report_XL}}" data-lineName="{{obj.report_XLNAME}}">
349   - <option value="">请选择...</option>
350   - {{each data.line as line i}}
351   - {{if line.lineCode == obj.report_XL}}
352   - <option value="{{line.lineCode}}" selected = "selected">{{line.name}}</option>
353   - {{else}}
354   - <option value="{{line.lineCode}}">{{line.name}}</option>
355   - {{/if}}
356   - {{/each}}
357   - </select></td>-->
358   - <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
359   - <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
360   - </tr>
361   - {{/each}}
362   - </script>
363   -
364   -
365   - <!-- common js -->
366   - <!--<script src="/assets/js/common.js"></script>-->
367   - <!--&lt;!&ndash; select2 下拉框 &ndash;&gt;-->
368   - <!--<script src="/metronic_v4.5.4/plugins/select2/js/select2.full.min.js"></script>-->
369   - <!-- moment.js 日期处理类库 -->
370   - <script src="/assets/plugins/moment-with-locales.js" data-exclude=1></script>
371   - <!-- 日期控件 -->
372   - <script src="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/js/bootstrap-datetimepicker.min.js"></script>
373   - <!-- bootstrap -->
374   - <script src="/metronic_v4.5.4/plugins/bootstrap/js/bootstrap.min.js" data-exclude=1></script>
375   - <!--<script src="/metronic_v4.5.4/plugins/bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script>-->
376   - <!-- editable.js -->
377   - <!--<script src="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.min.js"></script>-->
378   - <script>
379   - var manageJs = (function () {
380   - var modal = '#report-register-modal';
381   - var editType = false;//编辑状态,修改过东西
382   - var lineCodes ='',// 选择的线路
383   - companyMap = {},
384   - user = {};//当前用户信息
385   - var activeDiv='first_last_late_table';
386   - var lineList = gb_data_basic.activeLines;
387   -
388   - //当前用户信息
389   - gb_common.$get('/user/currentUser', null,function (data) {
390   - user = data;
391   - });
392   -
393   - $(modal).on('init', function (e,data) {
394   - // get请求获取公司
395   - gb_common.$get("/user/companyData",null,function(result){
396   - var len_ = lineList.length;
397   - if(len_>0) {
398   - // 遍历线路对应的公司
399   - for(var i = 0; i < result.length; i++){
400   - var companyCode = result[i].companyCode;
401   - var children = result[i].children;
402   - for(var j = 0; j < children.length; j++){
403   - var code = children[j].code;
404   - for(var k=0;k < lineList.length;k++ ){
405   - if(lineList[k].brancheCompany==code && lineList[k].company==companyCode){
406   - companyMap[lineList[k].lineCode] = companyCode+":"+code+"-"+result[i].companyName+":"+result[i].children[j].name;
407   - }
408   - }
409   - }
410   - }
411   - // 遍历出所有需要查询的线路
412   - lineCodes = '';
413   - $.each(lineList, function (i, g) {
414   - lineCodes += '"'+g.lineCode + '",';
415   - });
416   -
417   - refreshDate();
418   -
419   - // initPinYinSelect2($('.lineSelect'), paramsD, function (selector) {
420   - // selector.select2("val", "");
421   - // });
422   - }
423   - });
424   -
425   - //滚动条
426   - $('.report-register-table-wrap', modal).perfectScrollbar();
427   - });
428   -
429   - var refreshDate = function() {
430   -
431   - $('.load-panel', modal).show();
432   - loading=true;
433   - gb_common.$get("/reportRegister/findList", {lineCodes: lineCodes.substring(0, lineCodes.length - 1)}, function (data) {
434   - if (data.status == "SUCCESS") {
435   - var list = data.list;
436   - var tableList1 = [], tableList2 = [], tableList3 = [], tableList4 = [], tableList5 = [],
437   - tableList6 = [];
438   - $.each(list, function (i, rr) {
439   - rr.report_DATE = formatDate(new Date(rr.report_DATE));
440   - if (rr.report_TYPE == 1) {
441   - tableList1.push(rr);
442   - } else if (rr.report_TYPE == 2) {
443   - tableList2.push(rr);
444   - } else if (rr.report_TYPE == 3) {
445   - tableList3.push(rr);
446   - } else if (rr.report_TYPE == 4) {
447   - tableList4.push(rr);
448   - } else if (rr.report_TYPE == 5) {
449   - tableList5.push(rr);
450   - } else if (rr.report_TYPE == 6) {
451   - tableList6.push(rr);
452   - }
453   - });
454   - var htmlStr = template('first_last_late_table_body', {'data':{'list': tableList1,'line':lineList}});
455   - $('#first_last_late_table .table_body', modal).html(htmlStr);
456   - htmlStr = template('large_interval_table_body', {'data':{'list': tableList2,'line':lineList}});
457   - $('#large_interval_table .table_body', modal).html(htmlStr);
458   - htmlStr = template('emergency_table_body', {'data':{'list': tableList3,'line':lineList}});
459   - $('#emergency_table .table_body', modal).html(htmlStr);
460   - htmlStr = template('accident_table_body', {'data':{'list': tableList4,'line':lineList}});
461   - $('#accident_table .table_body', modal).html(htmlStr);
462   - htmlStr = template('rests_table_body', {'data':{'list': tableList5,'line':lineList}});
463   - $('#rests_table .table_body', modal).html(htmlStr);
464   - htmlStr = template('consult_table_body', {'data':{'list': tableList6,'line':lineList}});
465   - $('#consult_table .table_body', modal).html(htmlStr);
466   - $('.load-panel', modal).hide();
467   - loading=false;
468   - }
469   - });
470   - };
471   -
472   - setTimeout(function () {
473   - $(".table_body .lineSelect").on("change", function(){
474   - var lineCode = $(this).val();
475   - if(lineCode == " "){
476   - $(this).parent().parent().find('td input[name="report_GS"]').val();
477   - $(this).parent().parent().find('td input[name="report_FGS"]').val();
478   - } else {
479   - var temp = companyMap[lineCode].split("-")[1].split(":");
480   - $(this).parent().parent().find('td input[name="report_GS"]').val(temp[0]);
481   - $(this).parent().parent().find('td input[name="report_FGS"]').val(temp[1]);
482   - }
483   - });
484   - },1000);
485   -
486   - $("#add", modal).on('click', function () {
487   - var activeDivId = $('.ct_table_wrap .active').attr('id');
488   - open_modal('/real_control_v2/fragments/north/nav/report_register/add.html', {'tableActive' : activeDivId,'companyMap':companyMap,'lineList':lineList,'user':user}, {
489   - bgclose: false,
490   - modal: false
491   - });
492   - });
493   - $("#update", modal).on('click', function () {
494   - var activeDivId = $('.ct_table_wrap .active').attr('id');
495   - var id = $("#"+activeDivId+" .table_body input[name='idRadio']:checked", modal).val();
496   - if(id){
497   - gb_common.$get('/reportRegister/' + id,null, function (rs) {
498   - // 全转换为大写
499   - var rr = nameTo_(rs);
500   - open_modal('/real_control_v2/fragments/north/nav/report_register/update.html', {'tableActive' : activeDivId,'companyMap':companyMap,'lineList':lineList,'user':user,'rr':rr}, {
501   - bgclose: false,
502   - modal: false
503   - });
504   - });
505   - } else {
506   - notify_succ('当前类型没有选中!');
507   - }
508   - });
509   - $("#delete").on('click', function () {
510   - var activeDivId = $('.ct_table_wrap .active').attr('id');
511   - var id = $("#"+activeDivId+" .table_body input[name='idRadio']:checked", modal).val();
512   - if(id){
513   - alt_confirm('确实要删除这个报备登记吗?', function () {
514   - // gb_common.$del('/reportRegister/' + id, function (rs) {
515   - gb_common.$post('/reportRegister/delete',{ID:id,REPORT_BBR:user.userName+'/'+user.name}, function (rs) {
516   - manageJs.refreshDate();
517   - notify_succ('删除成功!');
518   - if(rs.status2.CODE == '0')
519   - notify_succ('同步到服务热线系统成功!');
520   - else
521   - notify_err('同步到服务热线系统失败!');
522   - });
523   - }, '确定删除');
524   - } else {
525   - notify_succ('当前类型没有选中!');
526   - }
527   - });
528   -
529   - // $('[name="checkItems"]').on('click',function (e,data) {
530   - // // 获取所有的复选框
531   - // activeDiv;
532   - // var checkElements = document.getElementsByName('items');
533   - // if (this.checked) {
534   - // for ( var i = 0; i < checkElements.length; i++) {
535   - // var checkElement = checkElements[i];
536   - // checkElement.checked = "checked";
537   - // }
538   - // } else {
539   - // for ( var i = 0; i < checkElements.length; i++) {
540   - // var checkElement = checkElements[i];
541   - // checkElement.checked = null;
542   - // }
543   - // }
544   - // });
545   -
546   - $(modal).on('click', '.navigation_bar li', function () {
547   - $(this).parent().find('li.uk-active').removeClass('uk-active');
548   - $(this).addClass('uk-active');
549   - var typeName = $(this).attr('id');
550   - var oldActiveDivId = $("#"+typeName+"_table").parent().find('.active');
551   - var oldActiveDiv = document.getElementById(oldActiveDivId.attr('id'));
552   - oldActiveDiv.style.display = "none";
553   - oldActiveDivId.removeClass("active");
554   -
555   - activeDiv = typeName+"_table";
556   - $("#"+typeName+"_table").addClass("active");
557   - var activeTable = document.getElementById(typeName+"_table");
558   - activeTable.style.display = "";
559   - });
560   -
561   - var formatDate = function(now) {
562   - var year=now.getFullYear();
563   - var month=now.getMonth()+1;
564   - var date=now.getDate();
565   - var hour=now.getHours();
566   - var minute=now.getMinutes();
567   - var second=now.getSeconds();
568   - return year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second;
569   - };
570   -
571   - function nameTo_(object) {
572   - for (var i in object) {
573   - if (object.hasOwnProperty(i)) {
574   - var temp = object[i];
575   - var oldI = i;
576   - temp = object[i.toUpperCase()] = object[i];
577   - delete object[oldI];
578   - if (typeof temp === 'object' || Object.prototype.toString.call(temp) === '[object Array]') {
579   - nameTo_(temp);
580   - }
581   - }
582   - }
583   - return object;
584   - }
585   -
586   - return{
587   - refreshDate:refreshDate
588   - }
589   - })();
590   - </script>
  1 +<div class="uk-modal ct_move_modal" id="report-register-modal">
  2 +
  3 + <!-- editable -->
  4 + <!--<link href="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/css/bootstrap-editable.css" rel="stylesheet" type="text/css" />-->
  5 + <!-- Bootstrap style -->
  6 + <link href="/metronic_v4.5.4/plugins/bootstrap/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
  7 + <!-- select2 下拉框插件 -->
  8 + <!--<link href="/metronic_v4.5.4/plugins/select2/css/select2.min.css" rel="stylesheet" type="text/css" />-->
  9 + <!--<link href="/metronic_v4.5.4/plugins/select2/css/select2-bootstrap.min.css" rel="stylesheet" type="text/css" />-->
  10 + <style>
  11 + <style>
  12 + .lineSelect{
  13 + width:174px !important
  14 + }
  15 +
  16 + /*ul.navigation_bar:before {
  17 + content: "报备类型";
  18 + position: absolute;
  19 + top: -9px;
  20 + font-size: 12px;
  21 + background: white;
  22 + padding: 0 4px;
  23 + color: #7d7b7b;
  24 + left: 10px;
  25 + }*/
  26 + </style>
  27 + <div class="uk-modal-dialog" style="width: 1800px;">
  28 + <a href="" class="uk-modal-close uk-close"></a>
  29 + <div class="uk-modal-header">
  30 + <h2>报备登记</h2>
  31 + </div>
  32 +
  33 +
  34 + <div style="padding-left: 12px;margin: 10px 0">
  35 + <ul class="uk-subnav uk-subnav-pill navigation_bar">
  36 + <li id="first_last_late" class="uk-active"><a>首末班误点</a></li>
  37 + <li id="large_interval"><a>大间隔</a></li>
  38 + <li id="emergency"><a>突发事件</a></li>
  39 + <li id="accident"><a>事故</a></li>
  40 + <li id="rests"><a>其他</a></li>
  41 + <li id="consult"><a>咨询</a></li>
  42 + </ul>
  43 + </div>
  44 +
  45 + <div style="padding-left: 12px;margin: 10px 0">
  46 + <div class=" uk-subnav-pill management_bar" >
  47 + <button class="uk-button uk-button-primary" id="add">添加</button>
  48 + <button class="uk-button uk-button-danger" id="update">修改</button>
  49 + <button class="uk-button uk-button-danger" id="delete">删除</button>
  50 + </div>
  51 +
  52 + <!--<div class=" management_bar" style="padding-right: 12px;float: right;">-->
  53 + <!--<button class="ui-btn active">保存</button>-->
  54 + <!--<button class="ui-btn disabled">取消</button>-->
  55 + <!--</div>-->
  56 + </div>
  57 +
  58 + <div class="ct_table_wrap" style="height: 510px">
  59 + <!-- 首末班误点-->
  60 + <table class="table table-striped table-bordered table-hover table-checkable report-register-table active" id="first_last_late_table">
  61 + <thead class="">
  62 + <tr role="row">
  63 + <!--<th width="2%"><input type="radio" name="checkItems"></th>-->
  64 + <th width="2%">#</th>
  65 + <th width="2%">序号</th>
  66 + <th width="5%">报备时间</th>
  67 + <th width="7%">线路</th>
  68 + <th width="7%">延误站点</th>
  69 + <th width="5%">延误时间</th>
  70 + <th width="10%">首末班延误原因</th>
  71 + <th width="7%">对外上报部门</th>
  72 + <th width="7%">对外上报时间</th>
  73 + </tr>
  74 + </thead>
  75 + <tbody class="table_body">
  76 + </tbody>
  77 + </table>
  78 + <!-- 大间隔-->
  79 + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="large_interval_table">
  80 + <thead class="">
  81 + <tr role="row">
  82 + <!--<th width="2%"><input type="radio" name="checkItems"></th>-->
  83 + <th width="2%">#</th>
  84 + <th width="2%">序号</th>
  85 + <th width="5%">报备时间</th>
  86 + <th width="7%">线路</th>
  87 + <th width="7%">路段</th>
  88 + <th width="7%">行驶方向</th>
  89 + <th width="7%">站点</th>
  90 + <th width="7%">大间隔时间</th>
  91 + <th width="7%">大间隔原因</th>
  92 + <th width="7%">对外上报部门</th>
  93 + <th width="7%">对外上报时间</th>
  94 + </tr>
  95 + </thead>
  96 + <tbody class="table_body">
  97 + </tbody>
  98 + </table>
  99 + <!-- 突发事件-->
  100 + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="emergency_table">
  101 + <thead class="">
  102 + <tr role="row">
  103 + <!--<th width="2%"><input type="radio" name="checkItems"></th>-->
  104 + <th width="2%">#</th>
  105 + <th width="2%">序号</th>
  106 + <th width="5%">报备时间</th>
  107 + <th width="7%">影响线路</th>
  108 + <th width="7%">重大活动货突发事件</th>
  109 + <th width="7%">影响时间</th>
  110 + <th width="7%">影响班次数</th>
  111 + <th width="7%">调整措施</th>
  112 + <th width="7%">对外上报部门</th>
  113 + <th width="7%">对外上报时间</th>
  114 + </tr>
  115 + </thead>
  116 + <tbody class="table_body">
  117 + </tbody>
  118 + </table>
  119 + <!-- 事故-->
  120 + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="accident_table">
  121 + <thead class="">
  122 + <tr role="row">
  123 + <!--<th width="2%"><input type="radio" name="checkItems"></th>-->
  124 + <th width="1%">#</th>
  125 + <th width="2%">序号</th>
  126 + <th width="5%">报备时间</th>
  127 + <th width="5%">线路</th>
  128 + <th width="5%">车辆自编号</th>
  129 + <th width="5%">驾驶员</th>
  130 + <th width="5%">事故发生时间</th>
  131 + <th width="5%">事故发生地点</th>
  132 + <th width="5%">行驶方向</th>
  133 + <th width="5%">事故对象</th>
  134 + <th width="5%">对象车牌号</th>
  135 + <th width="5%">事故概况</th>
  136 + <th width="5%">受伤人数</th>
  137 + <th width="5%">死亡人数</th>
  138 + <th width="5%">报告人</th>
  139 + <th width="5%">报告人电话</th>
  140 + <th width="5%">备注</th>
  141 + </tr>
  142 + </thead>
  143 + <tbody class="table_body">
  144 + </tbody>
  145 + </table>
  146 + <!-- 其他-->
  147 + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="rests_table">
  148 + <thead class="">
  149 + <tr role="row">
  150 + <!--<th width="2%"><input type="radio" name="checkItems"></th>-->
  151 + <th width="2%">#</th>
  152 + <th width="2%">序号</th>
  153 + <th width="5%">报备时间</th>
  154 + <th width="7%">线路</th>
  155 + <th width="7%">报备内容</th>
  156 + </tr>
  157 + </thead>
  158 + <tbody class="table_body">
  159 + </tbody>
  160 + </table>
  161 + <!-- 咨询-->
  162 + <table class="table table-striped table-bordered table-hover table-checkable report-register-table" style="display:none" id="consult_table">
  163 + <thead class="">
  164 + <tr role="row">
  165 + <!--<th width="2%"><input type="radio" name="checkItems"></th>-->
  166 + <th width="2%">#</th>
  167 + <th width="2%">序号</th>
  168 + <th width="5%">报备时间</th>
  169 + <th width="7%">线路</th>
  170 + <th width="7%">班线名称</th>
  171 + <th width="7%">内容</th>
  172 + </tr>
  173 + </thead>
  174 + <tbody class="table_body">
  175 + </tbody>
  176 + </table>
  177 + </div>
  178 +
  179 + <div class="load-panel">
  180 + <i class="uk-icon-spinner uk-icon-spin"></i>
  181 + 正在加载数据
  182 + </div>
  183 + </div>
  184 +
  185 + <script id="first_last_late_table_body" type="text/html">
  186 + {{each data.list as obj i}}
  187 + {{if obj.status == 2}}
  188 + <tr style="background-color: #ff5f78">
  189 + <td style="vertical-align: middle;">
  190 + <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">-->
  191 + </td>
  192 + {{else}}
  193 + <tr>
  194 + <td style="vertical-align: middle;">
  195 + <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">
  196 + </td>
  197 + {{/if}}
  198 + <td style="vertical-align: middle;">{{i + 1}}</td>
  199 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  200 + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
  201 + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
  202 + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
  203 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  204 + <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
  205 + <td style="vertical-align: middle;">{{obj.report_YWSJ}}</td>
  206 + <td style="vertical-align: middle;">{{obj.report_SMBWD}}</td>
  207 + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
  208 + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
  209 + </tr>
  210 + {{/each}}
  211 + </script>
  212 + <script id="large_interval_table_body" type="text/html">
  213 + {{each data.list as obj i}}
  214 + {{if obj.status == 2}}
  215 + <tr style="background-color: #ff5f78">
  216 + <td style="vertical-align: middle;">
  217 + <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">-->
  218 + </td>
  219 + {{else}}
  220 + <tr>
  221 + <td style="vertical-align: middle;">
  222 + <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">
  223 + </td>
  224 + {{/if}}
  225 + <td style="vertical-align: middle;">{{i + 1}}</td>
  226 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  227 + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
  228 + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
  229 + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
  230 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  231 + <td style="vertical-align: middle;">{{obj.report_ROAD}}</td>
  232 + <td style="vertical-align: middle;">{{obj.report_XSFX}}</td>
  233 + <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
  234 + <td style="vertical-align: middle;">{{obj.report_DJGSJ}}</td>
  235 + <td style="vertical-align: middle;">{{obj.report_DJGYY}}</td>
  236 + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
  237 + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
  238 + </tr>
  239 + {{/each}}
  240 + </script>
  241 + <script id="emergency_table_body" type="text/html">
  242 + {{each data.list as obj i}}
  243 + {{if obj.status == 2}}
  244 + <tr style="background-color: #ff5f78">
  245 + <td style="vertical-align: middle;">
  246 + <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">-->
  247 + </td>
  248 + {{else}}
  249 + <tr>
  250 + <td style="vertical-align: middle;">
  251 + <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">
  252 + </td>
  253 + {{/if}}
  254 + <td style="vertical-align: middle;">{{i + 1}}</td>
  255 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  256 + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
  257 + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
  258 + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
  259 + <td style="vertical-align: middle;display:none">{{obj.report_XLNAME}}</td>
  260 + <td style="vertical-align: middle;">{{obj.report_TFSJ}}</td>
  261 + <td style="vertical-align: middle;">{{obj.report_YXSJ}}</td>
  262 + <td style="vertical-align: middle;">{{obj.report_YXBC}}</td>
  263 + <td style="vertical-align: middle;">{{obj.report_TZCS}}</td>
  264 + <td style="vertical-align: middle;">{{obj.report_DWSBBM}}</td>
  265 + <td style="vertical-align: middle;">{{obj.report_DWSBSJ}}</td>
  266 + </tr>
  267 + {{/each}}
  268 + </script>
  269 + <script id="accident_table_body" type="text/html">
  270 + {{each data.list as obj i}}
  271 + {{if obj.status == 2}}
  272 + <tr style="background-color: #ff5f78">
  273 + <td style="vertical-align: middle;">
  274 + <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">-->
  275 + </td>
  276 + {{else}}
  277 + <tr>
  278 + <td style="vertical-align: middle;">
  279 + <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">
  280 + </td>
  281 + {{/if}}
  282 + <td style="vertical-align: middle;">{{i + 1}}</td>
  283 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  284 + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
  285 + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
  286 + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
  287 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  288 + <td style="vertical-align: middle;">{{obj.report_ZBH}}</td>
  289 + <td style="vertical-align: middle;">{{obj.report_JSY}}</td>
  290 + <td style="vertical-align: middle;">{{obj.report_SGSJ}}</td>
  291 + <td style="vertical-align: middle;">{{obj.report_SGDD}}</td>
  292 + <td style="vertical-align: middle;">{{obj.report_XSFX}}</td>
  293 + <td style="vertical-align: middle;">{{obj.report_SGDX}}</td>
  294 + <td style="vertical-align: middle;">{{obj.report_DXPZH}}</td>
  295 + <td style="vertical-align: middle;">{{obj.report_SGGK}}</td>
  296 + <td style="vertical-align: middle;">{{obj.report_SSRS}}</td>
  297 + <td style="vertical-align: middle;">{{obj.report_SWRS}}</td>
  298 + <td style="vertical-align: middle;">{{obj.report_BGR}}</td>
  299 + <td style="vertical-align: middle;">{{obj.report_BGRDH}}</td>
  300 + <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
  301 + </tr>
  302 + {{/each}}
  303 + </script>
  304 + <script id="rests_table_body" type="text/html">
  305 + {{each data.list as obj i}}
  306 +
  307 + {{if obj.status == 2}}
  308 + <tr style="background-color: #ff5f78">
  309 + <td style="vertical-align: middle;">
  310 + <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">-->
  311 + </td>
  312 + {{else}}
  313 + <tr>
  314 + <td style="vertical-align: middle;">
  315 + <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">
  316 + </td>
  317 + {{/if}}
  318 + <td style="vertical-align: middle;">{{i + 1}}</td>
  319 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  320 + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
  321 + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
  322 + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
  323 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  324 + <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
  325 + </tr>
  326 + {{/each}}
  327 + </script>
  328 + <script id="consult_table_body" type="text/html">
  329 + {{each data.list as obj i}}
  330 +
  331 + {{if obj.status == 2}}
  332 + <tr style="background-color: #ff5f78">
  333 + <td style="vertical-align: middle;">
  334 + <!--<input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">-->
  335 + </td>
  336 + {{else}}
  337 + <tr>
  338 + <td style="vertical-align: middle;">
  339 + <input type="radio" class="group-checkable icheck" name="idRadio" value="{{obj.id}}" data-lineCode="{{obj.report_XL}}">
  340 + </td>
  341 + {{/if}}
  342 + <td style="vertical-align: middle;">{{i + 1}}</td>
  343 + <td style="vertical-align: middle;">{{obj.report_DATE}}</td>
  344 + <td style="vertical-align: middle;display:none">{{obj.report_BBR}}</td>
  345 + <td style="vertical-align: middle;display:none">{{obj.report_GS}}</td>
  346 + <td style="vertical-align: middle;display:none">{{obj.report_FGS}}</td>
  347 + <td style="vertical-align: middle;">{{obj.report_XLNAME}}</td>
  348 + <!--<td style="vertical-align: middle;"><select class="form-control lineSelect" name="lineSelect" value="{{obj.report_XLNAME}}" data-id="{{obj.report_XL}}" data-lineName="{{obj.report_XLNAME}}">
  349 + <option value="">请选择...</option>
  350 + {{each data.line as line i}}
  351 + {{if line.lineCode == obj.report_XL}}
  352 + <option value="{{line.lineCode}}" selected = "selected">{{line.name}}</option>
  353 + {{else}}
  354 + <option value="{{line.lineCode}}">{{line.name}}</option>
  355 + {{/if}}
  356 + {{/each}}
  357 + </select></td>-->
  358 + <td style="vertical-align: middle;">{{obj.report_STATION}}</td>
  359 + <td style="vertical-align: middle;">{{obj.report_BZ}}</td>
  360 + </tr>
  361 + {{/each}}
  362 + </script>
  363 +
  364 +
  365 + <!-- common js -->
  366 + <!--<script src="/assets/js/common.js"></script>-->
  367 + <!--&lt;!&ndash; select2 下拉框 &ndash;&gt;-->
  368 + <!--<script src="/metronic_v4.5.4/plugins/select2/js/select2.full.min.js"></script>-->
  369 + <!-- moment.js 日期处理类库 -->
  370 + <script src="/assets/plugins/moment-with-locales.js" data-exclude=1></script>
  371 + <!-- 日期控件 -->
  372 + <script src="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/js/bootstrap-datetimepicker.min.js"></script>
  373 + <!-- bootstrap -->
  374 + <script src="/metronic_v4.5.4/plugins/bootstrap/js/bootstrap.min.js" data-exclude=1></script>
  375 + <!--<script src="/metronic_v4.5.4/plugins/bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script>-->
  376 + <!-- editable.js -->
  377 + <!--<script src="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.min.js"></script>-->
  378 + <script>
  379 + var manageJs = (function () {
  380 + var modal = '#report-register-modal';
  381 + var editType = false;//编辑状态,修改过东西
  382 + var lineCodes ='',// 选择的线路
  383 + companyMap = {},
  384 + user = {};//当前用户信息
  385 + var activeDiv='first_last_late_table';
  386 + var lineList = gb_data_basic.activeLines;
  387 +
  388 + //当前用户信息
  389 + gb_common.$get('/user/currentUser', null,function (data) {
  390 + user = data;
  391 + });
  392 +
  393 + $(modal).on('init', function (e,data) {
  394 + // get请求获取公司
  395 + gb_common.$get("/user/companyData",null,function(result){
  396 + var len_ = lineList.length;
  397 + if(len_>0) {
  398 + // 遍历线路对应的公司
  399 + for(var i = 0; i < result.length; i++){
  400 + var companyCode = result[i].companyCode;
  401 + var children = result[i].children;
  402 + for(var j = 0; j < children.length; j++){
  403 + var code = children[j].code;
  404 + for(var k=0;k < lineList.length;k++ ){
  405 + if(lineList[k].brancheCompany==code && lineList[k].company==companyCode){
  406 + companyMap[lineList[k].lineCode] = companyCode+":"+code+"-"+result[i].companyName+":"+result[i].children[j].name;
  407 + }
  408 + }
  409 + }
  410 + }
  411 + // 遍历出所有需要查询的线路
  412 + lineCodes = '';
  413 + $.each(lineList, function (i, g) {
  414 + lineCodes += '"'+g.lineCode + '",';
  415 + });
  416 +
  417 + refreshDate();
  418 +
  419 + // initPinYinSelect2($('.lineSelect'), paramsD, function (selector) {
  420 + // selector.select2("val", "");
  421 + // });
  422 + }
  423 + });
  424 +
  425 + //滚动条
  426 + $('.report-register-table-wrap', modal).perfectScrollbar();
  427 + });
  428 +
  429 + var refreshDate = function() {
  430 +
  431 + $('.load-panel', modal).show();
  432 + loading=true;
  433 + gb_common.$get("/reportRegister/findList", {lineCodes: lineCodes.substring(0, lineCodes.length - 1)}, function (data) {
  434 + if (data.status == "SUCCESS") {
  435 + var list = data.list;
  436 + var tableList1 = [], tableList2 = [], tableList3 = [], tableList4 = [], tableList5 = [],
  437 + tableList6 = [];
  438 + $.each(list, function (i, rr) {
  439 + rr.report_DATE = formatDate(new Date(rr.report_DATE));
  440 + if (rr.report_TYPE == 1) {
  441 + tableList1.push(rr);
  442 + } else if (rr.report_TYPE == 2) {
  443 + tableList2.push(rr);
  444 + } else if (rr.report_TYPE == 3) {
  445 + tableList3.push(rr);
  446 + } else if (rr.report_TYPE == 4) {
  447 + tableList4.push(rr);
  448 + } else if (rr.report_TYPE == 5) {
  449 + tableList5.push(rr);
  450 + } else if (rr.report_TYPE == 6) {
  451 + tableList6.push(rr);
  452 + }
  453 + });
  454 + var htmlStr = template('first_last_late_table_body', {'data':{'list': tableList1,'line':lineList}});
  455 + $('#first_last_late_table .table_body', modal).html(htmlStr);
  456 + htmlStr = template('large_interval_table_body', {'data':{'list': tableList2,'line':lineList}});
  457 + $('#large_interval_table .table_body', modal).html(htmlStr);
  458 + htmlStr = template('emergency_table_body', {'data':{'list': tableList3,'line':lineList}});
  459 + $('#emergency_table .table_body', modal).html(htmlStr);
  460 + htmlStr = template('accident_table_body', {'data':{'list': tableList4,'line':lineList}});
  461 + $('#accident_table .table_body', modal).html(htmlStr);
  462 + htmlStr = template('rests_table_body', {'data':{'list': tableList5,'line':lineList}});
  463 + $('#rests_table .table_body', modal).html(htmlStr);
  464 + htmlStr = template('consult_table_body', {'data':{'list': tableList6,'line':lineList}});
  465 + $('#consult_table .table_body', modal).html(htmlStr);
  466 + $('.load-panel', modal).hide();
  467 + loading=false;
  468 + }
  469 + });
  470 + };
  471 +
  472 + setTimeout(function () {
  473 + $(".table_body .lineSelect").on("change", function(){
  474 + var lineCode = $(this).val();
  475 + if(lineCode == " "){
  476 + $(this).parent().parent().find('td input[name="report_GS"]').val();
  477 + $(this).parent().parent().find('td input[name="report_FGS"]').val();
  478 + } else {
  479 + var temp = companyMap[lineCode].split("-")[1].split(":");
  480 + $(this).parent().parent().find('td input[name="report_GS"]').val(temp[0]);
  481 + $(this).parent().parent().find('td input[name="report_FGS"]').val(temp[1]);
  482 + }
  483 + });
  484 + },1000);
  485 +
  486 + $("#add", modal).on('click', function () {
  487 + var activeDivId = $('.ct_table_wrap .active').attr('id');
  488 + open_modal('/real_control_v2/fragments/north/nav/report_register/add.html', {'tableActive' : activeDivId,'companyMap':companyMap,'lineList':lineList,'user':user}, {
  489 + bgclose: false,
  490 + modal: false
  491 + });
  492 + });
  493 + $("#update", modal).on('click', function () {
  494 + var activeDivId = $('.ct_table_wrap .active').attr('id');
  495 + var id = $("#"+activeDivId+" .table_body input[name='idRadio']:checked", modal).val();
  496 + if(id){
  497 + gb_common.$get('/reportRegister/' + id,null, function (rs) {
  498 + // 全转换为大写
  499 + var rr = nameTo_(rs);
  500 + open_modal('/real_control_v2/fragments/north/nav/report_register/update.html', {'tableActive' : activeDivId,'companyMap':companyMap,'lineList':lineList,'user':user,'rr':rr}, {
  501 + bgclose: false,
  502 + modal: false
  503 + });
  504 + });
  505 + } else {
  506 + notify_succ('当前类型没有选中!');
  507 + }
  508 + });
  509 + $("#delete").on('click', function () {
  510 + var activeDivId = $('.ct_table_wrap .active').attr('id');
  511 + var id = $("#"+activeDivId+" .table_body input[name='idRadio']:checked", modal).val();
  512 + if(id){
  513 + alt_confirm('确实要删除这个报备登记吗?', function () {
  514 + // gb_common.$del('/reportRegister/' + id, function (rs) {
  515 + gb_common.$post('/reportRegister/delete',{ID:id,REPORT_BBR:user.userName+'/'+user.name}, function (rs) {
  516 + manageJs.refreshDate();
  517 + notify_succ('删除成功!');
  518 + if(rs.status2.CODE == '0')
  519 + notify_succ('同步到服务热线系统成功!');
  520 + else
  521 + notify_err('同步到服务热线系统失败!');
  522 + });
  523 + }, '确定删除');
  524 + } else {
  525 + notify_succ('当前类型没有选中!');
  526 + }
  527 + });
  528 +
  529 + // $('[name="checkItems"]').on('click',function (e,data) {
  530 + // // 获取所有的复选框
  531 + // activeDiv;
  532 + // var checkElements = document.getElementsByName('items');
  533 + // if (this.checked) {
  534 + // for ( var i = 0; i < checkElements.length; i++) {
  535 + // var checkElement = checkElements[i];
  536 + // checkElement.checked = "checked";
  537 + // }
  538 + // } else {
  539 + // for ( var i = 0; i < checkElements.length; i++) {
  540 + // var checkElement = checkElements[i];
  541 + // checkElement.checked = null;
  542 + // }
  543 + // }
  544 + // });
  545 +
  546 + $(modal).on('click', '.navigation_bar li', function () {
  547 + $(this).parent().find('li.uk-active').removeClass('uk-active');
  548 + $(this).addClass('uk-active');
  549 + var typeName = $(this).attr('id');
  550 + var oldActiveDivId = $("#"+typeName+"_table").parent().find('.active');
  551 + var oldActiveDiv = document.getElementById(oldActiveDivId.attr('id'));
  552 + oldActiveDiv.style.display = "none";
  553 + oldActiveDivId.removeClass("active");
  554 +
  555 + activeDiv = typeName+"_table";
  556 + $("#"+typeName+"_table").addClass("active");
  557 + var activeTable = document.getElementById(typeName+"_table");
  558 + activeTable.style.display = "";
  559 + });
  560 +
  561 + var formatDate = function(now) {
  562 + var year=now.getFullYear();
  563 + var month=now.getMonth()+1;
  564 + var date=now.getDate();
  565 + var hour=now.getHours();
  566 + var minute=now.getMinutes();
  567 + var second=now.getSeconds();
  568 + return year+"-"+month+"-"+date+" "+hour+":"+minute+":"+second;
  569 + };
  570 +
  571 + function nameTo_(object) {
  572 + for (var i in object) {
  573 + if (object.hasOwnProperty(i)) {
  574 + var temp = object[i];
  575 + var oldI = i;
  576 + temp = object[i.toUpperCase()] = object[i];
  577 + delete object[oldI];
  578 + if (typeof temp === 'object' || Object.prototype.toString.call(temp) === '[object Array]') {
  579 + nameTo_(temp);
  580 + }
  581 + }
  582 + }
  583 + return object;
  584 + }
  585 +
  586 + return{
  587 + refreshDate:refreshDate
  588 + }
  589 + })();
  590 + </script>
591 591 </div>
592 592 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/update.html
1   -<div class="uk-modal" id="report_register_update_mobal">
2   - <div class="uk-modal-dialog" style="width: 600px;">
3   - <a href="" class="uk-modal-close uk-close"></a>
4   - <div class="uk-modal-header">
5   - <h2>修改报备登记</h2>
6   - </div>
7   - <div class="uk-form uk-form-horizontal" id="report_register_form">
8   - <!--<div class="alert alert-danger display-hide">-->
9   - <!--您的输入有误,请检查下面的输入项-->
10   - <!--</div>-->
11   - <!-- 线路ID -->
12   - <!--<input type="hidden" name="REPORT_DATE" id="REPORT_DATE">-->
13   - <form id="add_head_table">
14   - <input type="hidden" name="ID" id="ID">
15   - <input type="hidden" name="REPORT_BBR" id="REPORT_BBR" value="">
16   - <input type="hidden" name="REPORT_GS" id="REPORT_GS" value="">
17   - <input type="hidden" name="REPORT_FGS" id="REPORT_FGS" value="">
18   - <input type="hidden" name="REPORT_GSNAME" id="REPORT_GSNAME" value="">
19   - <input type="hidden" name="REPORT_FGSNAME" id="REPORT_FGSNAME" value="">
20   - <input type="hidden" name="REPORT_XLNAME" id="REPORT_XLNAME" value="">
21   -
22   - <!-- 报备时间 -->
23   - <div class="uk-grid uk-width-2-3 uk-container-center">
24   - <div class="uk-form-row">
25   - <label class="uk-form-label">
26   - 报备时间:
27   - </label>
28   - <div class="uk-form-controls">
29   - <input type="text" class="form-control" name="REPORT_DATE" id="REPORT_DATE" readonly="readonly">
30   - </div>
31   - </div>
32   - </div>
33   - <!-- 类型 -->
34   - <div class="uk-grid uk-width-2-3 uk-container-center">
35   - <div class="uk-form-row">
36   - <label class="uk-form-label">
37   - 类型:
38   - </label>
39   - <div class="uk-form-controls">
40   - <select class="form-control typeSelect" name="REPORT_TYPE" id="REPORT_TYPE">
41   - <option value="1">首末班误点</option>
42   - <option value="2">大间隔</option>
43   - <option value="3">突发事件</option>
44   - <option value="4">事故</option>
45   - <option value="5">其他</option>
46   - <option value="6">咨询</option>
47   - </select>
48   - </div>
49   - </div>
50   - </div>
51   - <!-- 路段名称 -->
52   - <div class="uk-grid uk-width-2-3 uk-container-center">
53   - <div class="uk-form-row">
54   - <label class="uk-form-label">
55   - 线路:
56   - </label>
57   - <div class="uk-form-controls">
58   - <select class="form-control lineSelect" name="REPORT_XL" id="REPORT_XL">
59   - </select>
60   - </div>
61   - </div>
62   - </div>
63   - </form>
64   - <!-- 首末班误点-->
65   - <form id="add_first_last_late_table" class="c_register_form" style="display:none; margin-top: 35px;">
66   - <div class="uk-grid uk-width-2-3 uk-container-center">
67   - <div class="uk-form-row">
68   - <label class="uk-form-label">
69   - 延误站点:
70   - </label>
71   - <div class="uk-form-controls">
72   - <input type="text" class="form-control" name="REPORT_STATION" placeholder="延误站点" required>
73   - </div>
74   - </div>
75   - </div>
76   - <div class="uk-grid uk-width-2-3 uk-container-center">
77   - <div class="uk-form-row">
78   - <label class="uk-form-label">
79   - 延误时间:
80   - </label>
81   - <div class="uk-form-controls">
82   - <input type="text" class="form-control" name="REPORT_YWSJ" placeholder="延误时间" required>
83   - </div>
84   - </div>
85   - </div>
86   - <div class="uk-grid uk-width-2-3 uk-container-center">
87   - <div class="uk-form-row">
88   - <label class="uk-form-label">
89   - 首末班延误原因:
90   - </label>
91   - <div class="uk-form-controls">
92   - <input type="text" class="form-control" name="REPORT_SMBWD" placeholder="首末班延误原因" required>
93   - </div>
94   - </div>
95   - </div>
96   - <div class="uk-grid uk-width-2-3 uk-container-center">
97   - <div class="uk-form-row">
98   - <label class="uk-form-label">
99   - 对外上报部门:
100   - </label>
101   - <div class="uk-form-controls">
102   - <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required>
103   - </div>
104   - </div>
105   - </div>
106   - <div class="uk-grid uk-width-2-3 uk-container-center">
107   - <div class="uk-form-row">
108   - <label class="uk-form-label">对外上报时间:</label>
109   - <div class="uk-form-controls">
110   - <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required>
111   - </div>
112   - </div>
113   - </div>
114   - <div class="uk-modal-footer uk-text-right">
115   - <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
116   - <button type="button" class="uk-button uk-modal-close">取消</button>
117   - <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
118   - </div>
119   - </form>
120   - <!-- 大间隔-->
121   - <form id="add_large_interval_table" class="c_register_form" style="display:none; margin-top: 35px;">
122   - <div class="uk-grid uk-width-2-3 uk-container-center">
123   - <div class="uk-form-row">
124   - <label class="uk-form-label">
125   - 路段:
126   - </label>
127   - <div class="uk-form-controls">
128   - <input type="text" class="form-control" name="REPORT_ROAD" placeholder="路段" required>
129   - </div>
130   - </div>
131   - </div>
132   - <div class="uk-grid uk-width-2-3 uk-container-center">
133   - <div class="uk-form-row">
134   - <label class="uk-form-label">
135   - 行驶方向:
136   - </label>
137   - <div class="uk-form-controls">
138   - <input type="text" class="form-control" name="REPORT_XSFX" placeholder="行驶方向" required>
139   - </div>
140   - </div>
141   - </div>
142   - <div class="uk-grid uk-width-2-3 uk-container-center">
143   - <div class="uk-form-row">
144   - <label class="uk-form-label">
145   - 站点:
146   - </label>
147   - <div class="uk-form-controls">
148   - <input type="text" class="form-control" name="REPORT_STATION" placeholder="站点" required >
149   - </div>
150   - </div>
151   - </div>
152   - <div class="uk-grid uk-width-2-3 uk-container-center">
153   - <div class="uk-form-row">
154   - <label class="uk-form-label">
155   - 大间隔时间:
156   - </label>
157   - <div class="uk-form-controls">
158   - <input type="text" class="form-control" name="REPORT_DJGSJ" placeholder="大间隔时间" required>
159   - </div>
160   - </div>
161   - </div>
162   - <div class="uk-grid uk-width-2-3 uk-container-center">
163   - <div class="uk-form-row">
164   - <label class="uk-form-label">
165   - 大间隔原因:
166   - </label>
167   - <div class="uk-form-controls">
168   - <input type="text" class="form-control" name="REPORT_DJGYY" placeholder="大间隔原因" required>
169   - </div>
170   - </div>
171   - </div>
172   - <div class="uk-grid uk-width-2-3 uk-container-center">
173   - <div class="uk-form-row">
174   - <label class="uk-form-label">
175   - 对外上报部门:
176   - </label>
177   - <div class="uk-form-controls">
178   - <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required>
179   - </div>
180   - </div>
181   - </div>
182   - <div class="uk-grid uk-width-2-3 uk-container-center">
183   - <div class="uk-form-row">
184   - <label class="uk-form-label">对外上报时间:</label>
185   - <div class="uk-form-controls">
186   - <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required>
187   - </div>
188   - </div>
189   - </div>
190   - <div class="uk-modal-footer uk-text-right">
191   - <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
192   - <button type="button" class="uk-button uk-modal-close">取消</button>
193   - <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
194   - </div>
195   - </form>
196   - <!-- 突发事件-->
197   - <form id="add_emergency_table" class="c_register_form" style="display:none; margin-top: 35px;">
198   -
199   - <div class="uk-grid uk-width-2-3 uk-container-center">
200   - <div class="uk-form-row">
201   - <label class="uk-form-label">
202   - 重大活动货突发事件:
203   - </label>
204   - <div class="uk-form-controls">
205   - <input type="text" class="form-control" name="REPORT_TFSJ" placeholder="重大活动货突发事件" required>
206   - </div>
207   - </div>
208   - </div>
209   - <div class="uk-grid uk-width-2-3 uk-container-center">
210   - <div class="uk-form-row">
211   - <label class="uk-form-label">
212   - 影响时间:
213   - </label>
214   - <div class="uk-form-controls">
215   - <input type="text" class="form-control" name="REPORT_YXSJ" placeholder="影响时间" required>
216   - </div>
217   - </div>
218   - </div>
219   - <div class="uk-grid uk-width-2-3 uk-container-center">
220   - <div class="uk-form-row">
221   - <label class="uk-form-label">
222   - 影响班次数:
223   - </label>
224   - <div class="uk-form-controls">
225   - <input type="text" class="form-control" name="REPORT_YXBC" placeholder="影响班次数" required>
226   - </div>
227   - </div>
228   - </div>
229   - <div class="uk-grid uk-width-2-3 uk-container-center">
230   - <div class="uk-form-row">
231   - <label class="uk-form-label">
232   - 调整措施:
233   - </label>
234   - <div class="uk-form-controls">
235   - <input type="text" class="form-control" name="REPORT_TZCS" placeholder="调整措施" required>
236   - </div>
237   - </div>
238   - </div>
239   - <div class="uk-grid uk-width-2-3 uk-container-center">
240   - <div class="uk-form-row">
241   - <label class="uk-form-label">
242   - 对外上报部门:
243   - </label>
244   - <div class="uk-form-controls">
245   - <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required>
246   - </div>
247   - </div>
248   - </div>
249   - <div class="uk-grid uk-width-2-3 uk-container-center">
250   - <div class="uk-form-row">
251   - <label class="uk-form-label">对外上报时间:</label>
252   - <div class="uk-form-controls">
253   - <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required>
254   - </div>
255   - </div>
256   - </div>
257   - <div class="uk-modal-footer uk-text-right">
258   - <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
259   - <button type="button" class="uk-button uk-modal-close">取消</button>
260   - <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
261   - </div>
262   - </form>
263   - <!-- 事故-->
264   - <form id="add_accident_table" class="c_register_form" style="display:none; margin-top: 35px;">
265   - <div class="uk-grid uk-width-2-3 uk-container-center">
266   - <div class="uk-form-row">
267   - <label class="uk-form-label">
268   - 车辆自编号:
269   - </label>
270   - <div class="uk-form-controls">
271   - <input type="text" class="form-control" name="REPORT_ZBH" placeholder="车辆自编号" required>
272   - </div>
273   - </div>
274   - </div>
275   - <div class="uk-grid uk-width-2-3 uk-container-center">
276   - <div class="uk-form-row">
277   - <label class="uk-form-label">
278   - 驾驶员:
279   - </label>
280   - <div class="uk-form-controls">
281   - <input type="text" class="form-control" name="REPORT_JSY" placeholder="驾驶员" required>
282   - </div>
283   - </div>
284   - </div>
285   - <div class="uk-grid uk-width-2-3 uk-container-center">
286   - <div class="uk-form-row">
287   - <label class="uk-form-label">
288   - 事故发生时间:
289   - </label>
290   - <div class="uk-form-controls">
291   - <input type="text" class="form-control" name="REPORT_SGSJ" placeholder="事故发生时间" required>
292   - </div>
293   - </div>
294   - </div>
295   - <div class="uk-grid uk-width-2-3 uk-container-center">
296   - <div class="uk-form-row">
297   - <label class="uk-form-label">
298   - 事故发生地点:
299   - </label>
300   - <div class="uk-form-controls">
301   - <input type="text" class="form-control" name="REPORT_SGDD" placeholder="事故发生地点" required>
302   - </div>
303   - </div>
304   - </div>
305   - <div class="uk-grid uk-width-2-3 uk-container-center">
306   - <div class="uk-form-row">
307   - <label class="uk-form-label">
308   - 行驶方向:
309   - </label>
310   - <div class="uk-form-controls">
311   - <input type="text" class="form-control" name="REPORT_XSFX" placeholder="行驶方向" required>
312   - </div>
313   - </div>
314   - </div>
315   - <div class="uk-grid uk-width-2-3 uk-container-center">
316   - <div class="uk-form-row">
317   - <label class="uk-form-label">
318   - 事故对象:
319   - </label>
320   - <div class="uk-form-controls">
321   - <input type="text" class="form-control" name="REPORT_SGDX" placeholder="事故对象" required>
322   - </div>
323   - </div>
324   - </div>
325   - <div class="uk-grid uk-width-2-3 uk-container-center">
326   - <div class="uk-form-row">
327   - <label class="uk-form-label">
328   - 对象车牌号:
329   - </label>
330   - <div class="uk-form-controls">
331   - <input type="text" class="form-control" name="REPORT_DXPZH" placeholder="对象车牌号" required>
332   - </div>
333   - </div>
334   - </div>
335   - <div class="uk-grid uk-width-2-3 uk-container-center">
336   - <div class="uk-form-row">
337   - <label class="uk-form-label">
338   - 事故概况:
339   - </label>
340   - <div class="uk-form-controls">
341   - <input type="text" class="form-control" name="REPORT_SGGK" placeholder="事故概况" required>
342   - </div>
343   - </div>
344   - </div>
345   - <div class="uk-grid uk-width-2-3 uk-container-center">
346   - <div class="uk-form-row">
347   - <label class="uk-form-label">
348   - 受伤人数:
349   - </label>
350   - <div class="uk-form-controls">
351   - <input type="text" class="form-control" name="REPORT_SSRS" placeholder="受伤人数" required>
352   - </div>
353   - </div>
354   - </div>
355   - <div class="uk-grid uk-width-2-3 uk-container-center">
356   - <div class="uk-form-row">
357   - <label class="uk-form-label">
358   - 死亡人数:
359   - </label>
360   - <div class="uk-form-controls">
361   - <input type="text" class="form-control" name="REPORT_SWRS" placeholder="死亡人数" required>
362   - </div>
363   - </div>
364   - </div>
365   - <div class="uk-grid uk-width-2-3 uk-container-center">
366   - <div class="uk-form-row">
367   - <label class="uk-form-label">
368   - 报告人:
369   - </label>
370   - <div class="uk-form-controls">
371   - <input type="text" class="form-control" name="REPORT_BGR" placeholder="报告人" required >
372   - </div>
373   - </div>
374   - </div>
375   - <div class="uk-grid uk-width-2-3 uk-container-center">
376   - <div class="uk-form-row">
377   - <label class="uk-form-label">
378   - 报告人电话:
379   - </label>
380   - <div class="uk-form-controls">
381   - <input type="text" class="form-control" name="REPORT_BGRDH" placeholder="报告人电话" required>
382   - </div>
383   - </div>
384   - </div>
385   - <div class="uk-grid uk-width-2-3 uk-container-center">
386   - <div class="uk-form-row">
387   - <label class="uk-form-label"> 备注:</label>
388   - <div class="uk-form-controls">
389   - <input type="text" class="form-control" name="REPORT_BZ" placeholder="备注">
390   - </div>
391   - </div>
392   - </div>
393   - <div class="uk-modal-footer uk-text-right">
394   - <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
395   - <button type="button" class="uk-button uk-modal-close">取消</button>
396   - <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
397   - </div>
398   - </form>
399   - <!-- 其他-->
400   - <form id="add_rests_table" class="c_register_form" style="display:none; margin-top: 35px;">
401   -
402   - <div class="uk-grid uk-width-2-3 uk-container-center">
403   - <div class="uk-form-row">
404   - <label class="uk-form-label">
405   - 报备内容:
406   - </label>
407   - <div class="uk-form-controls">
408   - <input type="text" class="form-control" name="REPORT_BZ" placeholder="报备内容" required>
409   - </div>
410   - </div>
411   - </div>
412   - <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
413   - <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
414   - <button type="button" class="uk-button uk-modal-close">取消</button>
415   - <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
416   - </div>
417   - </form>
418   - <!-- 咨询-->
419   - <form id="add_consult_table" class="c_register_form" style="display:none; margin-top: 35px;">
420   - <div class="uk-grid uk-width-2-3 uk-container-center">
421   - <div class="uk-form-row">
422   - <label class="uk-form-label">
423   - 班线名称:
424   - </label>
425   - <div class="uk-form-controls">
426   - <input type="text" class="form-control" name="REPORT_STATION" placeholder="班线名称" required>
427   - </div>
428   - </div>
429   - </div>
430   - <div class="uk-grid uk-width-2-3 uk-container-center">
431   - <div class="uk-form-row">
432   - <label class="uk-form-label">
433   - 内容:
434   - </label>
435   - <div class="uk-form-controls">
436   - <input type="text" class="form-control" name="REPORT_BZ" placeholder="内容" required>
437   - </div>
438   - </div>
439   - </div>
440   - <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
441   - <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
442   - <button type="button" class="uk-button uk-modal-close">取消</button>
443   - <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
444   - </div>
445   - </form>
446   - </div>
447   - </div>
448   -
449   - <script>
450   - (function () {
451   - var modal = '#report_register_update_mobal';
452   - // var form = '#report_register_form';
453   - var tableActive = '',formActive = '';
454   - var REPORT_TYPE,
455   - lineList = {},
456   - companyMap = new Map(),
457   - user = {},rr={};
458   -
459   - $("#REPORT_XL").on("change", function(){
460   - var lineCode = $(this).val();
461   - if(lineCode == "" || lineCode == undefined || lineCode == null){
462   - $('#REPORT_GS').val();
463   - $('#REPORT_FGS').val();
464   - $('#REPORT_GSNAME').val();
465   - $('#REPORT_FGSNAME').val();
466   - } else {
467   - // var temp = companyMap[lineCode].split("_");
468   - var code = companyMap[lineCode].split("-")[0].split(":");
469   - var name = companyMap[lineCode].split("-")[1].split(":");
470   - $('#REPORT_GS').val(code[0]);
471   - $('#REPORT_FGS').val(code[1]);
472   - $('#REPORT_GSNAME').val(name[0]);
473   - $('#REPORT_FGSNAME').val(name[1]);
474   - $("#REPORT_XLNAME").val($('#REPORT_XL option:selected').text());
475   - }
476   - });
477   -
478   - $(modal).on('init', function (e, data) {
479   - $('#REPORT_DATE').datetimepicker({
480   - format : 'YYYY-MM-DD HH:mm:ss',
481   - locale : 'zh-cn'
482   - });
483   - tableActive = "add_"+data.tableActive;
484   - rr = data.rr;
485   - var typeInt = 1;
486   - if (tableActive == 'add_first_last_late_table') {
487   - typeInt = 1;
488   - } else if (tableActive == 'add_large_interval_table') {
489   - typeInt = 2;
490   - } else if (tableActive == 'add_emergency_table') {
491   - typeInt = 3;
492   - } else if (tableActive == 'add_accident_table') {
493   - typeInt = 4;
494   - } else if (tableActive == 'add_rests_table') {
495   - typeInt = 5;
496   - } else if (tableActive == 'add_consult_table') {
497   - typeInt = 6;
498   - }
499   - $('#REPORT_TYPE').val(typeInt);
500   - if(typeInt != rr.REPORT_TYPE ) {
501   - UIkit.modal(modal).hide();
502   - notify_err('您所选的数据有问题,请重新选择!');
503   - return;
504   - }
505   - document.getElementById(tableActive).style.display = "";
506   -
507   - // 先给input赋值
508   - $('input,select', modal).each(function () {
509   - var domName = $(this).attr('name');
510   - if(domName == 'REPORT_DATE'){
511   - $('#REPORT_DATE').val(moment(new Date(rr[domName])).format('YYYY-MM-DD HH:mm:ss'));
512   - } else{
513   - $(this).val(rr[domName]);
514   - }
515   - });
516   -
517   - lineList = data.lineList;
518   - user = data.user;
519   - $('#REPORT_BBR').val(user.userName+'/'+user.name);
520   - gb_common.$get("/user/companyData",null,function(result) {
521   - var len_ = lineList.length;
522   - if (len_ > 0) {
523   - // 遍历线路对应的公司
524   - for (var i = 0; i < result.length; i++) {
525   - var companyCode = result[i].companyCode;
526   - var children = result[i].children;
527   - for (var j = 0; j < children.length; j++) {
528   - var code = children[j].code;
529   - for (var k = 0; k < lineList.length; k++) {
530   - if (lineList[k].brancheCompany == code && lineList[k].company == companyCode) {
531   - // companyMap[lineList[k].lineCode] = companyCode + "_" + code;
532   - companyMap[lineList[k].lineCode] = companyCode + ":" + code + "-" + result[i].companyName + ":" + result[i].children[j].name;
533   - }
534   - }
535   - }
536   - }
537   - }
538   - // var options = '<option value="">请选择...</option>';
539   - var options = '';
540   - $.each(lineList, function (i,line) {
541   - if(line.lineCode == rr.REPORT_XL)
542   - options += '<option value='+line.lineCode+' selected = "selected" >'+line.name+'</option>';
543   - else
544   - options += '<option value='+line.lineCode+'>'+line.name+'</option>';
545   - });
546   - $('#REPORT_XL').html(options);
547   - $('#REPORT_XL').trigger("change");
548   - });
549   - changeType(tableActive);
550   -
551   - $('#REPORT_TYPE').on('change',function () {
552   - document.getElementById(tableActive).style.display = "none";
553   - REPORT_TYPE = this.value;
554   - if (REPORT_TYPE == 1) {
555   - tableActive = 'add_first_last_late_table';
556   - } else if (REPORT_TYPE == 2) {
557   - tableActive = 'add_large_interval_table';
558   - } else if (REPORT_TYPE == 3) {
559   - tableActive = 'add_emergency_table';
560   - } else if (REPORT_TYPE == 4) {
561   - tableActive = 'add_accident_table';
562   - } else if (REPORT_TYPE == 5) {
563   - tableActive = 'add_rests_table';
564   - } else if (REPORT_TYPE == 6) {
565   - tableActive = 'add_consult_table';
566   - }
567   - document.getElementById(tableActive).style.display = "";
568   - changeType(tableActive);
569   - });
570   - });
571   -
572   -
573   - function changeType(tableActiveStr) {
574   - formActive = $('#'+tableActiveStr);
575   - //校验不过
576   - formActive.on('err.field.fv', function () {
577   - $('#submitChildTaskBtn', modal).removeClass('disabled').removeAttr('disabled');
578   - });
579   -
580   - //校验
581   - formActive.formValidation({framework: 'uikit', locale: 'zh_CN'});
582   - //提交
583   - formActive.on('success.form.fv', function (e) {
584   - e.preventDefault();
585   - var headData = $('#add_head_table').serializeJSON();
586   - var bodyData = $(formActive).serializeJSON();
587   - var params = {};
588   - Object.assign(params,headData,bodyData);
589   - params.STATUS = '1';
590   - gb_common.$post('/reportRegister/', params, function (rs) {
591   - if(rs.status == 'SUCCESS'){
592   - // $('#history-sch-maintain-modal').trigger('refresh', {'tableActive' : tableActive,'companyMap':companyMap,'lineList':lineList,'user':user});
593   - UIkit.modal(modal).hide();
594   - notify_succ('修改成功!');
595   - manageJs.refreshDate();
596   - if(rs.status2.CODE == '0')
597   - notify_succ('同步到服务热线系统成功!');
598   - else
599   - notify_err('同步到服务热线系统失败!');
600   - } else
601   - notify_err('修改失败!');
602   - });
603   - });
604   - }
605   -
606   - //submit
607   - $('.submitBtn', modal).on('click', function () {
608   - $(this).addClass('disabled').attr('disabled', 'disabled');
609   - formActive.data('valid', false);
610   - formActive.formValidation('validate');
611   - });
612   - })();
613   - </script>
  1 +<div class="uk-modal" id="report_register_update_mobal">
  2 + <div class="uk-modal-dialog" style="width: 600px;">
  3 + <a href="" class="uk-modal-close uk-close"></a>
  4 + <div class="uk-modal-header">
  5 + <h2>修改报备登记</h2>
  6 + </div>
  7 + <div class="uk-form uk-form-horizontal" id="report_register_form">
  8 + <!--<div class="alert alert-danger display-hide">-->
  9 + <!--您的输入有误,请检查下面的输入项-->
  10 + <!--</div>-->
  11 + <!-- 线路ID -->
  12 + <!--<input type="hidden" name="REPORT_DATE" id="REPORT_DATE">-->
  13 + <form id="add_head_table">
  14 + <input type="hidden" name="ID" id="ID">
  15 + <input type="hidden" name="REPORT_BBR" id="REPORT_BBR" value="">
  16 + <input type="hidden" name="REPORT_GS" id="REPORT_GS" value="">
  17 + <input type="hidden" name="REPORT_FGS" id="REPORT_FGS" value="">
  18 + <input type="hidden" name="REPORT_GSNAME" id="REPORT_GSNAME" value="">
  19 + <input type="hidden" name="REPORT_FGSNAME" id="REPORT_FGSNAME" value="">
  20 + <input type="hidden" name="REPORT_XLNAME" id="REPORT_XLNAME" value="">
  21 +
  22 + <!-- 报备时间 -->
  23 + <div class="uk-grid uk-width-2-3 uk-container-center">
  24 + <div class="uk-form-row">
  25 + <label class="uk-form-label">
  26 + 报备时间:
  27 + </label>
  28 + <div class="uk-form-controls">
  29 + <input type="text" class="form-control" name="REPORT_DATE" id="REPORT_DATE" readonly="readonly">
  30 + </div>
  31 + </div>
  32 + </div>
  33 + <!-- 类型 -->
  34 + <div class="uk-grid uk-width-2-3 uk-container-center">
  35 + <div class="uk-form-row">
  36 + <label class="uk-form-label">
  37 + 类型:
  38 + </label>
  39 + <div class="uk-form-controls">
  40 + <select class="form-control typeSelect" name="REPORT_TYPE" id="REPORT_TYPE">
  41 + <option value="1">首末班误点</option>
  42 + <option value="2">大间隔</option>
  43 + <option value="3">突发事件</option>
  44 + <option value="4">事故</option>
  45 + <option value="5">其他</option>
  46 + <option value="6">咨询</option>
  47 + </select>
  48 + </div>
  49 + </div>
  50 + </div>
  51 + <!-- 路段名称 -->
  52 + <div class="uk-grid uk-width-2-3 uk-container-center">
  53 + <div class="uk-form-row">
  54 + <label class="uk-form-label">
  55 + 线路:
  56 + </label>
  57 + <div class="uk-form-controls">
  58 + <select class="form-control lineSelect" name="REPORT_XL" id="REPORT_XL">
  59 + </select>
  60 + </div>
  61 + </div>
  62 + </div>
  63 + </form>
  64 + <!-- 首末班误点-->
  65 + <form id="add_first_last_late_table" class="c_register_form" style="display:none; margin-top: 35px;">
  66 + <div class="uk-grid uk-width-2-3 uk-container-center">
  67 + <div class="uk-form-row">
  68 + <label class="uk-form-label">
  69 + 延误站点:
  70 + </label>
  71 + <div class="uk-form-controls">
  72 + <input type="text" class="form-control" name="REPORT_STATION" placeholder="延误站点" required>
  73 + </div>
  74 + </div>
  75 + </div>
  76 + <div class="uk-grid uk-width-2-3 uk-container-center">
  77 + <div class="uk-form-row">
  78 + <label class="uk-form-label">
  79 + 延误时间:
  80 + </label>
  81 + <div class="uk-form-controls">
  82 + <input type="text" class="form-control" name="REPORT_YWSJ" placeholder="延误时间" required>
  83 + </div>
  84 + </div>
  85 + </div>
  86 + <div class="uk-grid uk-width-2-3 uk-container-center">
  87 + <div class="uk-form-row">
  88 + <label class="uk-form-label">
  89 + 首末班延误原因:
  90 + </label>
  91 + <div class="uk-form-controls">
  92 + <input type="text" class="form-control" name="REPORT_SMBWD" placeholder="首末班延误原因" required>
  93 + </div>
  94 + </div>
  95 + </div>
  96 + <div class="uk-grid uk-width-2-3 uk-container-center">
  97 + <div class="uk-form-row">
  98 + <label class="uk-form-label">
  99 + 对外上报部门:
  100 + </label>
  101 + <div class="uk-form-controls">
  102 + <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required>
  103 + </div>
  104 + </div>
  105 + </div>
  106 + <div class="uk-grid uk-width-2-3 uk-container-center">
  107 + <div class="uk-form-row">
  108 + <label class="uk-form-label">对外上报时间:</label>
  109 + <div class="uk-form-controls">
  110 + <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required>
  111 + </div>
  112 + </div>
  113 + </div>
  114 + <div class="uk-modal-footer uk-text-right">
  115 + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
  116 + <button type="button" class="uk-button uk-modal-close">取消</button>
  117 + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
  118 + </div>
  119 + </form>
  120 + <!-- 大间隔-->
  121 + <form id="add_large_interval_table" class="c_register_form" style="display:none; margin-top: 35px;">
  122 + <div class="uk-grid uk-width-2-3 uk-container-center">
  123 + <div class="uk-form-row">
  124 + <label class="uk-form-label">
  125 + 路段:
  126 + </label>
  127 + <div class="uk-form-controls">
  128 + <input type="text" class="form-control" name="REPORT_ROAD" placeholder="路段" required>
  129 + </div>
  130 + </div>
  131 + </div>
  132 + <div class="uk-grid uk-width-2-3 uk-container-center">
  133 + <div class="uk-form-row">
  134 + <label class="uk-form-label">
  135 + 行驶方向:
  136 + </label>
  137 + <div class="uk-form-controls">
  138 + <input type="text" class="form-control" name="REPORT_XSFX" placeholder="行驶方向" required>
  139 + </div>
  140 + </div>
  141 + </div>
  142 + <div class="uk-grid uk-width-2-3 uk-container-center">
  143 + <div class="uk-form-row">
  144 + <label class="uk-form-label">
  145 + 站点:
  146 + </label>
  147 + <div class="uk-form-controls">
  148 + <input type="text" class="form-control" name="REPORT_STATION" placeholder="站点" required >
  149 + </div>
  150 + </div>
  151 + </div>
  152 + <div class="uk-grid uk-width-2-3 uk-container-center">
  153 + <div class="uk-form-row">
  154 + <label class="uk-form-label">
  155 + 大间隔时间:
  156 + </label>
  157 + <div class="uk-form-controls">
  158 + <input type="text" class="form-control" name="REPORT_DJGSJ" placeholder="大间隔时间" required>
  159 + </div>
  160 + </div>
  161 + </div>
  162 + <div class="uk-grid uk-width-2-3 uk-container-center">
  163 + <div class="uk-form-row">
  164 + <label class="uk-form-label">
  165 + 大间隔原因:
  166 + </label>
  167 + <div class="uk-form-controls">
  168 + <input type="text" class="form-control" name="REPORT_DJGYY" placeholder="大间隔原因" required>
  169 + </div>
  170 + </div>
  171 + </div>
  172 + <div class="uk-grid uk-width-2-3 uk-container-center">
  173 + <div class="uk-form-row">
  174 + <label class="uk-form-label">
  175 + 对外上报部门:
  176 + </label>
  177 + <div class="uk-form-controls">
  178 + <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required>
  179 + </div>
  180 + </div>
  181 + </div>
  182 + <div class="uk-grid uk-width-2-3 uk-container-center">
  183 + <div class="uk-form-row">
  184 + <label class="uk-form-label">对外上报时间:</label>
  185 + <div class="uk-form-controls">
  186 + <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required>
  187 + </div>
  188 + </div>
  189 + </div>
  190 + <div class="uk-modal-footer uk-text-right">
  191 + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
  192 + <button type="button" class="uk-button uk-modal-close">取消</button>
  193 + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
  194 + </div>
  195 + </form>
  196 + <!-- 突发事件-->
  197 + <form id="add_emergency_table" class="c_register_form" style="display:none; margin-top: 35px;">
  198 +
  199 + <div class="uk-grid uk-width-2-3 uk-container-center">
  200 + <div class="uk-form-row">
  201 + <label class="uk-form-label">
  202 + 重大活动货突发事件:
  203 + </label>
  204 + <div class="uk-form-controls">
  205 + <input type="text" class="form-control" name="REPORT_TFSJ" placeholder="重大活动货突发事件" required>
  206 + </div>
  207 + </div>
  208 + </div>
  209 + <div class="uk-grid uk-width-2-3 uk-container-center">
  210 + <div class="uk-form-row">
  211 + <label class="uk-form-label">
  212 + 影响时间:
  213 + </label>
  214 + <div class="uk-form-controls">
  215 + <input type="text" class="form-control" name="REPORT_YXSJ" placeholder="影响时间" required>
  216 + </div>
  217 + </div>
  218 + </div>
  219 + <div class="uk-grid uk-width-2-3 uk-container-center">
  220 + <div class="uk-form-row">
  221 + <label class="uk-form-label">
  222 + 影响班次数:
  223 + </label>
  224 + <div class="uk-form-controls">
  225 + <input type="text" class="form-control" name="REPORT_YXBC" placeholder="影响班次数" required>
  226 + </div>
  227 + </div>
  228 + </div>
  229 + <div class="uk-grid uk-width-2-3 uk-container-center">
  230 + <div class="uk-form-row">
  231 + <label class="uk-form-label">
  232 + 调整措施:
  233 + </label>
  234 + <div class="uk-form-controls">
  235 + <input type="text" class="form-control" name="REPORT_TZCS" placeholder="调整措施" required>
  236 + </div>
  237 + </div>
  238 + </div>
  239 + <div class="uk-grid uk-width-2-3 uk-container-center">
  240 + <div class="uk-form-row">
  241 + <label class="uk-form-label">
  242 + 对外上报部门:
  243 + </label>
  244 + <div class="uk-form-controls">
  245 + <input type="text" class="form-control" name="REPORT_DWSBBM" placeholder="对外上报部门" required>
  246 + </div>
  247 + </div>
  248 + </div>
  249 + <div class="uk-grid uk-width-2-3 uk-container-center">
  250 + <div class="uk-form-row">
  251 + <label class="uk-form-label">对外上报时间:</label>
  252 + <div class="uk-form-controls">
  253 + <input type="text" class="form-control" name="REPORT_DWSBSJ" placeholder="对外上报时间" required>
  254 + </div>
  255 + </div>
  256 + </div>
  257 + <div class="uk-modal-footer uk-text-right">
  258 + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
  259 + <button type="button" class="uk-button uk-modal-close">取消</button>
  260 + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
  261 + </div>
  262 + </form>
  263 + <!-- 事故-->
  264 + <form id="add_accident_table" class="c_register_form" style="display:none; margin-top: 35px;">
  265 + <div class="uk-grid uk-width-2-3 uk-container-center">
  266 + <div class="uk-form-row">
  267 + <label class="uk-form-label">
  268 + 车辆自编号:
  269 + </label>
  270 + <div class="uk-form-controls">
  271 + <input type="text" class="form-control" name="REPORT_ZBH" placeholder="车辆自编号" required>
  272 + </div>
  273 + </div>
  274 + </div>
  275 + <div class="uk-grid uk-width-2-3 uk-container-center">
  276 + <div class="uk-form-row">
  277 + <label class="uk-form-label">
  278 + 驾驶员:
  279 + </label>
  280 + <div class="uk-form-controls">
  281 + <input type="text" class="form-control" name="REPORT_JSY" placeholder="驾驶员" required>
  282 + </div>
  283 + </div>
  284 + </div>
  285 + <div class="uk-grid uk-width-2-3 uk-container-center">
  286 + <div class="uk-form-row">
  287 + <label class="uk-form-label">
  288 + 事故发生时间:
  289 + </label>
  290 + <div class="uk-form-controls">
  291 + <input type="text" class="form-control" name="REPORT_SGSJ" placeholder="事故发生时间" required>
  292 + </div>
  293 + </div>
  294 + </div>
  295 + <div class="uk-grid uk-width-2-3 uk-container-center">
  296 + <div class="uk-form-row">
  297 + <label class="uk-form-label">
  298 + 事故发生地点:
  299 + </label>
  300 + <div class="uk-form-controls">
  301 + <input type="text" class="form-control" name="REPORT_SGDD" placeholder="事故发生地点" required>
  302 + </div>
  303 + </div>
  304 + </div>
  305 + <div class="uk-grid uk-width-2-3 uk-container-center">
  306 + <div class="uk-form-row">
  307 + <label class="uk-form-label">
  308 + 行驶方向:
  309 + </label>
  310 + <div class="uk-form-controls">
  311 + <input type="text" class="form-control" name="REPORT_XSFX" placeholder="行驶方向" required>
  312 + </div>
  313 + </div>
  314 + </div>
  315 + <div class="uk-grid uk-width-2-3 uk-container-center">
  316 + <div class="uk-form-row">
  317 + <label class="uk-form-label">
  318 + 事故对象:
  319 + </label>
  320 + <div class="uk-form-controls">
  321 + <input type="text" class="form-control" name="REPORT_SGDX" placeholder="事故对象" required>
  322 + </div>
  323 + </div>
  324 + </div>
  325 + <div class="uk-grid uk-width-2-3 uk-container-center">
  326 + <div class="uk-form-row">
  327 + <label class="uk-form-label">
  328 + 对象车牌号:
  329 + </label>
  330 + <div class="uk-form-controls">
  331 + <input type="text" class="form-control" name="REPORT_DXPZH" placeholder="对象车牌号" required>
  332 + </div>
  333 + </div>
  334 + </div>
  335 + <div class="uk-grid uk-width-2-3 uk-container-center">
  336 + <div class="uk-form-row">
  337 + <label class="uk-form-label">
  338 + 事故概况:
  339 + </label>
  340 + <div class="uk-form-controls">
  341 + <input type="text" class="form-control" name="REPORT_SGGK" placeholder="事故概况" required>
  342 + </div>
  343 + </div>
  344 + </div>
  345 + <div class="uk-grid uk-width-2-3 uk-container-center">
  346 + <div class="uk-form-row">
  347 + <label class="uk-form-label">
  348 + 受伤人数:
  349 + </label>
  350 + <div class="uk-form-controls">
  351 + <input type="text" class="form-control" name="REPORT_SSRS" placeholder="受伤人数" required>
  352 + </div>
  353 + </div>
  354 + </div>
  355 + <div class="uk-grid uk-width-2-3 uk-container-center">
  356 + <div class="uk-form-row">
  357 + <label class="uk-form-label">
  358 + 死亡人数:
  359 + </label>
  360 + <div class="uk-form-controls">
  361 + <input type="text" class="form-control" name="REPORT_SWRS" placeholder="死亡人数" required>
  362 + </div>
  363 + </div>
  364 + </div>
  365 + <div class="uk-grid uk-width-2-3 uk-container-center">
  366 + <div class="uk-form-row">
  367 + <label class="uk-form-label">
  368 + 报告人:
  369 + </label>
  370 + <div class="uk-form-controls">
  371 + <input type="text" class="form-control" name="REPORT_BGR" placeholder="报告人" required >
  372 + </div>
  373 + </div>
  374 + </div>
  375 + <div class="uk-grid uk-width-2-3 uk-container-center">
  376 + <div class="uk-form-row">
  377 + <label class="uk-form-label">
  378 + 报告人电话:
  379 + </label>
  380 + <div class="uk-form-controls">
  381 + <input type="text" class="form-control" name="REPORT_BGRDH" placeholder="报告人电话" required>
  382 + </div>
  383 + </div>
  384 + </div>
  385 + <div class="uk-grid uk-width-2-3 uk-container-center">
  386 + <div class="uk-form-row">
  387 + <label class="uk-form-label"> 备注:</label>
  388 + <div class="uk-form-controls">
  389 + <input type="text" class="form-control" name="REPORT_BZ" placeholder="备注">
  390 + </div>
  391 + </div>
  392 + </div>
  393 + <div class="uk-modal-footer uk-text-right">
  394 + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
  395 + <button type="button" class="uk-button uk-modal-close">取消</button>
  396 + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
  397 + </div>
  398 + </form>
  399 + <!-- 其他-->
  400 + <form id="add_rests_table" class="c_register_form" style="display:none; margin-top: 35px;">
  401 +
  402 + <div class="uk-grid uk-width-2-3 uk-container-center">
  403 + <div class="uk-form-row">
  404 + <label class="uk-form-label">
  405 + 报备内容:
  406 + </label>
  407 + <div class="uk-form-controls">
  408 + <input type="text" class="form-control" name="REPORT_BZ" placeholder="报备内容" required>
  409 + </div>
  410 + </div>
  411 + </div>
  412 + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
  413 + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
  414 + <button type="button" class="uk-button uk-modal-close">取消</button>
  415 + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
  416 + </div>
  417 + </form>
  418 + <!-- 咨询-->
  419 + <form id="add_consult_table" class="c_register_form" style="display:none; margin-top: 35px;">
  420 + <div class="uk-grid uk-width-2-3 uk-container-center">
  421 + <div class="uk-form-row">
  422 + <label class="uk-form-label">
  423 + 班线名称:
  424 + </label>
  425 + <div class="uk-form-controls">
  426 + <input type="text" class="form-control" name="REPORT_STATION" placeholder="班线名称" required>
  427 + </div>
  428 + </div>
  429 + </div>
  430 + <div class="uk-grid uk-width-2-3 uk-container-center">
  431 + <div class="uk-form-row">
  432 + <label class="uk-form-label">
  433 + 内容:
  434 + </label>
  435 + <div class="uk-form-controls">
  436 + <input type="text" class="form-control" name="REPORT_BZ" placeholder="内容" required>
  437 + </div>
  438 + </div>
  439 + </div>
  440 + <div class="uk-modal-footer uk-text-right" style="margin-bottom: -20px;">
  441 + <span class="bind_gas_station_panel" style="position: absolute;left: 30px;text-decoration: underline;"></span>
  442 + <button type="button" class="uk-button uk-modal-close">取消</button>
  443 + <button type="submit" class="uk-button uk-button-primary submitBtn"><i class="uk-icon-check"></i> &nbsp;保存</button>
  444 + </div>
  445 + </form>
  446 + </div>
  447 + </div>
  448 +
  449 + <script>
  450 + (function () {
  451 + var modal = '#report_register_update_mobal';
  452 + // var form = '#report_register_form';
  453 + var tableActive = '',formActive = '';
  454 + var REPORT_TYPE,
  455 + lineList = {},
  456 + companyMap = new Map(),
  457 + user = {},rr={};
  458 +
  459 + $("#REPORT_XL").on("change", function(){
  460 + var lineCode = $(this).val();
  461 + if(lineCode == "" || lineCode == undefined || lineCode == null){
  462 + $('#REPORT_GS').val();
  463 + $('#REPORT_FGS').val();
  464 + $('#REPORT_GSNAME').val();
  465 + $('#REPORT_FGSNAME').val();
  466 + } else {
  467 + // var temp = companyMap[lineCode].split("_");
  468 + var code = companyMap[lineCode].split("-")[0].split(":");
  469 + var name = companyMap[lineCode].split("-")[1].split(":");
  470 + $('#REPORT_GS').val(code[0]);
  471 + $('#REPORT_FGS').val(code[1]);
  472 + $('#REPORT_GSNAME').val(name[0]);
  473 + $('#REPORT_FGSNAME').val(name[1]);
  474 + $("#REPORT_XLNAME").val($('#REPORT_XL option:selected').text());
  475 + }
  476 + });
  477 +
  478 + $(modal).on('init', function (e, data) {
  479 + $('#REPORT_DATE').datetimepicker({
  480 + format : 'YYYY-MM-DD HH:mm:ss',
  481 + locale : 'zh-cn'
  482 + });
  483 + tableActive = "add_"+data.tableActive;
  484 + rr = data.rr;
  485 + var typeInt = 1;
  486 + if (tableActive == 'add_first_last_late_table') {
  487 + typeInt = 1;
  488 + } else if (tableActive == 'add_large_interval_table') {
  489 + typeInt = 2;
  490 + } else if (tableActive == 'add_emergency_table') {
  491 + typeInt = 3;
  492 + } else if (tableActive == 'add_accident_table') {
  493 + typeInt = 4;
  494 + } else if (tableActive == 'add_rests_table') {
  495 + typeInt = 5;
  496 + } else if (tableActive == 'add_consult_table') {
  497 + typeInt = 6;
  498 + }
  499 + $('#REPORT_TYPE').val(typeInt);
  500 + if(typeInt != rr.REPORT_TYPE ) {
  501 + UIkit.modal(modal).hide();
  502 + notify_err('您所选的数据有问题,请重新选择!');
  503 + return;
  504 + }
  505 + document.getElementById(tableActive).style.display = "";
  506 +
  507 + // 先给input赋值
  508 + $('input,select', modal).each(function () {
  509 + var domName = $(this).attr('name');
  510 + if(domName == 'REPORT_DATE'){
  511 + $('#REPORT_DATE').val(moment(new Date(rr[domName])).format('YYYY-MM-DD HH:mm:ss'));
  512 + } else{
  513 + $(this).val(rr[domName]);
  514 + }
  515 + });
  516 +
  517 + lineList = data.lineList;
  518 + user = data.user;
  519 + $('#REPORT_BBR').val(user.userName+'/'+user.name);
  520 + gb_common.$get("/user/companyData",null,function(result) {
  521 + var len_ = lineList.length;
  522 + if (len_ > 0) {
  523 + // 遍历线路对应的公司
  524 + for (var i = 0; i < result.length; i++) {
  525 + var companyCode = result[i].companyCode;
  526 + var children = result[i].children;
  527 + for (var j = 0; j < children.length; j++) {
  528 + var code = children[j].code;
  529 + for (var k = 0; k < lineList.length; k++) {
  530 + if (lineList[k].brancheCompany == code && lineList[k].company == companyCode) {
  531 + // companyMap[lineList[k].lineCode] = companyCode + "_" + code;
  532 + companyMap[lineList[k].lineCode] = companyCode + ":" + code + "-" + result[i].companyName + ":" + result[i].children[j].name;
  533 + }
  534 + }
  535 + }
  536 + }
  537 + }
  538 + // var options = '<option value="">请选择...</option>';
  539 + var options = '';
  540 + $.each(lineList, function (i,line) {
  541 + if(line.lineCode == rr.REPORT_XL)
  542 + options += '<option value='+line.lineCode+' selected = "selected" >'+line.name+'</option>';
  543 + else
  544 + options += '<option value='+line.lineCode+'>'+line.name+'</option>';
  545 + });
  546 + $('#REPORT_XL').html(options);
  547 + $('#REPORT_XL').trigger("change");
  548 + });
  549 + changeType(tableActive);
  550 +
  551 + $('#REPORT_TYPE').on('change',function () {
  552 + document.getElementById(tableActive).style.display = "none";
  553 + REPORT_TYPE = this.value;
  554 + if (REPORT_TYPE == 1) {
  555 + tableActive = 'add_first_last_late_table';
  556 + } else if (REPORT_TYPE == 2) {
  557 + tableActive = 'add_large_interval_table';
  558 + } else if (REPORT_TYPE == 3) {
  559 + tableActive = 'add_emergency_table';
  560 + } else if (REPORT_TYPE == 4) {
  561 + tableActive = 'add_accident_table';
  562 + } else if (REPORT_TYPE == 5) {
  563 + tableActive = 'add_rests_table';
  564 + } else if (REPORT_TYPE == 6) {
  565 + tableActive = 'add_consult_table';
  566 + }
  567 + document.getElementById(tableActive).style.display = "";
  568 + changeType(tableActive);
  569 + });
  570 + });
  571 +
  572 +
  573 + function changeType(tableActiveStr) {
  574 + formActive = $('#'+tableActiveStr);
  575 + //校验不过
  576 + formActive.on('err.field.fv', function () {
  577 + $('#submitChildTaskBtn', modal).removeClass('disabled').removeAttr('disabled');
  578 + });
  579 +
  580 + //校验
  581 + formActive.formValidation({framework: 'uikit', locale: 'zh_CN'});
  582 + //提交
  583 + formActive.on('success.form.fv', function (e) {
  584 + e.preventDefault();
  585 + var headData = $('#add_head_table').serializeJSON();
  586 + var bodyData = $(formActive).serializeJSON();
  587 + var params = {};
  588 + Object.assign(params,headData,bodyData);
  589 + params.STATUS = '1';
  590 + gb_common.$post('/reportRegister/', params, function (rs) {
  591 + if(rs.status == 'SUCCESS'){
  592 + // $('#history-sch-maintain-modal').trigger('refresh', {'tableActive' : tableActive,'companyMap':companyMap,'lineList':lineList,'user':user});
  593 + UIkit.modal(modal).hide();
  594 + notify_succ('修改成功!');
  595 + manageJs.refreshDate();
  596 + if(rs.status2.CODE == '0')
  597 + notify_succ('同步到服务热线系统成功!');
  598 + else
  599 + notify_err('同步到服务热线系统失败!');
  600 + } else
  601 + notify_err('修改失败!');
  602 + });
  603 + });
  604 + }
  605 +
  606 + //submit
  607 + $('.submitBtn', modal).on('click', function () {
  608 + $(this).addClass('disabled').attr('disabled', 'disabled');
  609 + formActive.data('valid', false);
  610 + formActive.formValidation('validate');
  611 + });
  612 + })();
  613 + </script>
614 614 </div>
615 615 \ No newline at end of file
... ...