Commit fc084ab105ab7f58c7b517ad1661bf1861fd3487

Authored by 廖磊
2 parents 4897c795 9fd1fbcb

Merge branch 'pudong' of http://222.66.0.204:8090/panzhaov5/bsth_control

into pudong
Showing 96 changed files with 7537 additions and 4250 deletions
src/main/java/com/bsth/controller/calc/CalcExportController.java
... ... @@ -158,10 +158,14 @@ public class CalcExportController {
158 158 if(map.get("fgsdmSing")!=null){
159 159 fgsdmSing=map.get("fgsdmSing").toString().trim();
160 160 }
  161 + String sfdc="";
  162 + if(map.get("sfdc")!=null){
  163 + sfdc=map.get("sfdc").toString().trim();
  164 + }
161 165  
162 166 Map<String, Object> resMap = new HashMap<String, Object>();
163 167 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
164   - List<Map<String, Object>> list = clacMixService.singledatatj(line, startDate, endDate, tjtype, cont, gsdmSing, fgsdmSing);
  168 + List<Map<String, Object>> list = clacMixService.singledatatj(line, startDate, endDate, tjtype, cont, gsdmSing, fgsdmSing, sfdc);
165 169  
166 170 Map<String, Object> temp = new HashMap<String, Object>();
167 171 temp.put("i", "序号");
... ...
src/main/java/com/bsth/controller/calc/CalcMixController.java
... ... @@ -81,7 +81,11 @@ public class CalcMixController {
81 81 if(map.get("fgsdmSing")!=null){
82 82 fgsdmSing=map.get("fgsdmSing").toString().trim();
83 83 }
84   - return service.singledatatj(line, startDate, endDate, tjtype, cont, gsdmSing, fgsdmSing);
  84 + String sfdc="";
  85 + if(map.get("sfdc")!=null){
  86 + sfdc=map.get("sfdc").toString().trim();
  87 + }
  88 + return service.singledatatj(line, startDate, endDate, tjtype, cont, gsdmSing, fgsdmSing, sfdc);
85 89 }
86 90  
87 91 }
... ...
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&lt;Cwjy, Integer&gt;{
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/schedule/basicinfo/CarController_facade.java 0 → 100644
  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 0 → 100644
  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 0 → 100644
  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/basicinfo/CarDeviceController.java renamed to src/main/java/com/bsth/controller/schedule/basicinfo/legacy/CarDeviceController.java
1   -package com.bsth.controller.schedule.basicinfo;
  1 +package com.bsth.controller.schedule.basicinfo.legacy;
2 2  
3 3 import com.bsth.common.ResponseCode;
4 4 import com.bsth.controller.schedule.BController;
  5 +import com.bsth.controller.schedule.basicinfo.CarDeviceController_facade;
5 6 import com.bsth.entity.CarDevice;
6 7 import com.bsth.service.schedule.CarDeviceService;
7 8 import com.bsth.service.schedule.exception.ScheduleException;
8 9 import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
9 11 import org.springframework.web.bind.annotation.RequestMapping;
10 12 import org.springframework.web.bind.annotation.RequestMethod;
11 13 import org.springframework.web.bind.annotation.RequestParam;
... ... @@ -17,7 +19,8 @@ import java.util.Map;
17 19 /**
18 20 * Created by xu on 16/12/15.
19 21 */
20   -@RestController(value = "carDeviceController_sc")
  22 +@RestController("carDeviceController_sc")
  23 +@ConditionalOnMissingBean(CarDeviceController_facade.class)
21 24 @RequestMapping("cde_sc")
22 25 public class CarDeviceController extends BController<CarDevice, Long> {
23 26 @Autowired
... ...
src/main/java/com/bsth/controller/schedule/basicinfo/CarsController.java renamed to src/main/java/com/bsth/controller/schedule/basicinfo/legacy/CarsController.java
1   -package com.bsth.controller.schedule.basicinfo;
  1 +package com.bsth.controller.schedule.basicinfo.legacy;
2 2  
3 3 import com.bsth.common.ResponseCode;
4 4 import com.bsth.controller.schedule.BController;
  5 +import com.bsth.controller.schedule.basicinfo.CarController_facade;
5 6 import com.bsth.entity.Cars;
6 7 import com.bsth.service.schedule.CarsService;
7 8 import com.bsth.service.schedule.exception.ScheduleException;
8 9 import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
9 11 import org.springframework.web.bind.annotation.RequestMapping;
10 12 import org.springframework.web.bind.annotation.RequestMethod;
11 13 import org.springframework.web.bind.annotation.RequestParam;
... ... @@ -17,7 +19,8 @@ import java.util.Map;
17 19 /**
18 20 * 车辆基础信息controller
19 21 */
20   -@RestController(value = "carsController_sc")
  22 +@RestController("carsController_sc")
  23 +@ConditionalOnMissingBean(CarController_facade.class)
21 24 @RequestMapping("cars_sc")
22 25 public class CarsController extends BController<Cars, Integer> {
23 26 @Autowired
... ...
src/main/java/com/bsth/controller/schedule/basicinfo/EmployeeController.java renamed to src/main/java/com/bsth/controller/schedule/basicinfo/legacy/EmployeeController.java
1   -package com.bsth.controller.schedule.basicinfo;
  1 +package com.bsth.controller.schedule.basicinfo.legacy;
2 2  
3 3 import com.bsth.common.ResponseCode;
4 4 import com.bsth.controller.schedule.BController;
  5 +import com.bsth.controller.schedule.basicinfo.EmployeeController_facade;
5 6 import com.bsth.entity.Personnel;
6 7 import com.bsth.service.schedule.EmployeeService;
7 8 import com.bsth.service.schedule.exception.ScheduleException;
8 9 import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
9 11 import org.springframework.web.bind.annotation.RequestMapping;
10 12 import org.springframework.web.bind.annotation.RequestMethod;
11 13 import org.springframework.web.bind.annotation.RequestParam;
... ... @@ -18,6 +20,7 @@ import java.util.Map;
18 20 * 人员基础信息Controller
19 21 */
20 22 @RestController
  23 +@ConditionalOnMissingBean(EmployeeController_facade.class)
21 24 @RequestMapping("ee")
22 25 public class EmployeeController extends BController<Personnel, Integer> {
23 26 @Autowired
... ...
src/main/java/com/bsth/controller/schedule/core/CarConfigInfoController_facade.java 0 → 100644
  1 +package com.bsth.controller.schedule.core;
  2 +
  3 +import com.alibaba.dubbo.config.annotation.Reference;
  4 +import com.bsth.common.Constants;
  5 +import com.bsth.common.ResponseCode;
  6 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
  7 +import com.bsth.control_v2.plan_module.common.dto.baseinfo.CarDto;
  8 +import com.bsth.control_v2.plan_module.common.dto.baseinfo.LineDto;
  9 +import com.bsth.control_v2.plan_module.common.dto.schedule.config.VehicleConfigDto;
  10 +import com.bsth.control_v2.plan_module.common.dto.sys.CompanyAuthorityDto;
  11 +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
  12 +import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
  13 +import com.bsth.control_v2.plan_module.common.service.schedule.config.VehicleConfigServiceFacade;
  14 +import com.bsth.controller.schedule.BController_facade;
  15 +import com.bsth.entity.sys.CompanyAuthority;
  16 +import com.bsth.service.schedule.CarConfigInfoService;
  17 +import com.bsth.service.schedule.utils.DataToolsFile;
  18 +import org.apache.commons.lang3.StringUtils;
  19 +import org.apache.poi.ss.usermodel.Workbook;
  20 +import org.springframework.beans.factory.annotation.Autowired;
  21 +import org.springframework.context.annotation.Conditional;
  22 +import org.springframework.web.bind.annotation.RequestMapping;
  23 +import org.springframework.web.bind.annotation.RequestMethod;
  24 +import org.springframework.web.bind.annotation.RequestParam;
  25 +import org.springframework.web.bind.annotation.RestController;
  26 +import org.springframework.web.multipart.MultipartFile;
  27 +
  28 +import javax.servlet.http.HttpServletRequest;
  29 +import javax.servlet.http.HttpServletResponse;
  30 +import javax.servlet.http.HttpSession;
  31 +import java.io.*;
  32 +import java.util.*;
  33 +
  34 +/**
  35 + * Created by xu on 16/5/9.
  36 + */
  37 +@RestController
  38 +@Conditional(DubboConfigCondition.class)
  39 +@RequestMapping("cci")
  40 +public class CarConfigInfoController_facade extends BController_facade<Long, VehicleConfigDto> {
  41 +
  42 + @Override
  43 + public void setCreateUserInfo(VehicleConfigDto vehicleConfigDto, Integer userId, Date createDate) {
  44 + UserDto userDto = UserDto.getBuilder()
  45 + .setId(userId)
  46 + .build();
  47 + vehicleConfigDto.setCreateBy(userDto);
  48 + vehicleConfigDto.setCreateDate(createDate);
  49 + }
  50 +
  51 + @Override
  52 + public void setUpdateUserInfo(VehicleConfigDto vehicleConfigDto, Integer userId, Date updateDate) {
  53 + UserDto userDto = UserDto.getBuilder()
  54 + .setId(userId)
  55 + .build();
  56 + vehicleConfigDto.setUpdateBy(userDto);
  57 + vehicleConfigDto.setUpdateDate(updateDate);
  58 + }
  59 +
  60 + @Reference
  61 + private VehicleConfigServiceFacade vehicleConfigServiceFacade;
  62 +
  63 + @Override
  64 + protected BServiceFacade<Long, VehicleConfigDto> getBServiceFacade() {
  65 + return vehicleConfigServiceFacade;
  66 + }
  67 +
  68 + @RequestMapping(value = "/cars", method = RequestMethod.GET)
  69 + public List<Map<String, Object>> findCarConfigCars() {
  70 + return vehicleConfigServiceFacade.findCarsFromConfig_nbbm();
  71 + }
  72 +
  73 + @RequestMapping(value = "/cars2", method = RequestMethod.GET)
  74 + public List<Map<String, Object>> findCarsFromConfig() {
  75 + return vehicleConfigServiceFacade.findCarsFromConfig_insideCode();
  76 + }
  77 +
  78 + @RequestMapping(value = "/validate_cars", method = RequestMethod.GET)
  79 + public Map<String, Object> validate_cars(@RequestParam Map<String, Object> param) {
  80 + Map<String, Object> rtn = new HashMap<>();
  81 + try {
  82 + VehicleConfigDto vehicleConfigDto = VehicleConfigDto.getBuilder()
  83 + .setId(param.get("id_eq") == null ? null : Long.parseLong(param.get("id_eq").toString()))
  84 + .setXl(param.get("xl.id_eq") == null ? null : (
  85 + LineDto.getBuilder()
  86 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  87 + .setName(param.get("xl.name_eq").toString())
  88 + .build()
  89 + ))
  90 + .setCl(param.get("cl.id_eq") == null ? null : (
  91 + CarDto.getBuilder()
  92 + .setId(Integer.valueOf(param.get("cl.id_eq").toString()))
  93 + .build()
  94 + ))
  95 + .build();
  96 +
  97 + vehicleConfigServiceFacade.validate_already_config(vehicleConfigDto);
  98 + rtn.put("status", ResponseCode.SUCCESS);
  99 + } catch (Exception exp) {
  100 + rtn.put("status", ResponseCode.ERROR);
  101 + rtn.put("msg", exp.getMessage());
  102 + }
  103 +
  104 + return rtn;
  105 + }
  106 +
  107 + @RequestMapping(value = "/validate_cars_2", method = RequestMethod.GET)
  108 + public Map<String, Object> validate_cars(@RequestParam Integer xlId, @RequestParam Integer clId) {
  109 + Map<String, Object> rtn = new HashMap<>();
  110 + try {
  111 + VehicleConfigDto vehicleConfigDto = VehicleConfigDto.getBuilder()
  112 + .setXl(xlId == null ? null : (LineDto.getBuilder()
  113 + .setId(xlId)
  114 + .build()))
  115 + .setCl(clId == null ? null : (CarDto.getBuilder()
  116 + .setId(clId)
  117 + .build()))
  118 + .build();
  119 +
  120 + vehicleConfigServiceFacade.validate_already_config(vehicleConfigDto);
  121 + rtn.put("status", ResponseCode.SUCCESS);
  122 + } catch (Exception exp) {
  123 + rtn.put("status", ResponseCode.ERROR);
  124 + rtn.put("msg", exp.getMessage());
  125 + }
  126 +
  127 + return rtn;
  128 + }
  129 +
  130 + @RequestMapping(value = "/validate_cars_gs", method = RequestMethod.GET)
  131 + public Map<String, Object> validate_cars_gs(HttpServletRequest request, @RequestParam Map<String, Object> param) {
  132 + HttpSession session = request.getSession();
  133 + List<CompanyAuthority> cmyAuths = (List<CompanyAuthority>) session.getAttribute(Constants.COMPANY_AUTHORITYS);
  134 + List<CompanyAuthorityDto> companyAuthorityDtoList = new ArrayList<>();
  135 + for (CompanyAuthority companyAuthority : cmyAuths) {
  136 + CompanyAuthorityDto companyAuthorityDto = CompanyAuthorityDto.getBuilder()
  137 + .setId(companyAuthority.getId())
  138 + .setCompanyCode(companyAuthority.getCompanyCode())
  139 + .setCompanyName(companyAuthority.getCompanyName())
  140 + .setSubCompanyCode(companyAuthority.getSubCompanyCode())
  141 + .setSubCompanyName(companyAuthority.getSubCompanyName())
  142 + .build();
  143 + companyAuthorityDtoList.add(companyAuthorityDto);
  144 + }
  145 +
  146 + Map<String, Object> rtn = new HashMap<>();
  147 + try {
  148 + VehicleConfigDto vehicleConfigDto = VehicleConfigDto.getBuilder()
  149 + .setXl(param.get("xl.id_eq") == null ? null : (
  150 + LineDto.getBuilder()
  151 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  152 + .setName(param.get("xl.name_eq").toString())
  153 + .build()
  154 + ))
  155 + .setCl(param.get("cl.id_eq") == null ? null : (
  156 + CarDto.getBuilder()
  157 + .setId(Integer.valueOf(param.get("cl.id_eq").toString()))
  158 + .build()
  159 + ))
  160 + .build();
  161 +
  162 + vehicleConfigServiceFacade.validate_cars_gs(vehicleConfigDto, companyAuthorityDtoList);
  163 + rtn.put("status", ResponseCode.SUCCESS);
  164 + } catch (Exception exp) {
  165 + rtn.put("status", ResponseCode.ERROR);
  166 + rtn.put("msg", exp.getMessage());
  167 + }
  168 +
  169 + return rtn;
  170 + }
  171 +
  172 + @RequestMapping(value = "/validate_cars_fgs", method = RequestMethod.GET)
  173 + public Map<String, Object> validate_cars_fgs(HttpServletRequest request, @RequestParam Map<String, Object> param) {
  174 + HttpSession session = request.getSession();
  175 + List<CompanyAuthority> cmyAuths = (List<CompanyAuthority>) session.getAttribute(Constants.COMPANY_AUTHORITYS);
  176 + List<CompanyAuthorityDto> companyAuthorityDtoList = new ArrayList<>();
  177 + for (CompanyAuthority companyAuthority : cmyAuths) {
  178 + CompanyAuthorityDto companyAuthorityDto = CompanyAuthorityDto.getBuilder()
  179 + .setId(companyAuthority.getId())
  180 + .setCompanyCode(companyAuthority.getCompanyCode())
  181 + .setCompanyName(companyAuthority.getCompanyName())
  182 + .setSubCompanyCode(companyAuthority.getSubCompanyCode())
  183 + .setSubCompanyName(companyAuthority.getSubCompanyName())
  184 + .build();
  185 + companyAuthorityDtoList.add(companyAuthorityDto);
  186 + }
  187 +
  188 + Map<String, Object> rtn = new HashMap<>();
  189 + try {
  190 + VehicleConfigDto vehicleConfigDto = VehicleConfigDto.getBuilder()
  191 + .setXl(param.get("xl.id_eq") == null ? null : (
  192 + LineDto.getBuilder()
  193 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  194 + .setName(param.get("xl.name_eq").toString())
  195 + .build()
  196 + ))
  197 + .setCl(param.get("cl.id_eq") == null ? null : (
  198 + CarDto.getBuilder()
  199 + .setId(Integer.valueOf(param.get("cl.id_eq").toString()))
  200 + .build()
  201 + ))
  202 + .build();
  203 +
  204 + vehicleConfigServiceFacade.validate_cars_fgs(vehicleConfigDto, companyAuthorityDtoList);
  205 + rtn.put("status", ResponseCode.SUCCESS);
  206 + } catch (Exception exp) {
  207 + rtn.put("status", ResponseCode.ERROR);
  208 + rtn.put("msg", exp.getMessage());
  209 + }
  210 +
  211 + return rtn;
  212 + }
  213 +
  214 + @RequestMapping(value = "/validate_cars_config", method = RequestMethod.GET)
  215 + public Map<String, Object> validate_cars_config(@RequestParam Map<String, Object> param) {
  216 + Map<String, Object> rtn = new HashMap<>();
  217 + try {
  218 + VehicleConfigDto vehicleConfigDto = VehicleConfigDto.getBuilder()
  219 + .setXl(param.get("xl.id_eq") == null ? null : (
  220 + LineDto.getBuilder()
  221 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  222 + .setName(param.get("xl.name_eq").toString())
  223 + .build()
  224 + ))
  225 + .setCl(param.get("cl.id_eq") == null ? null : (
  226 + CarDto.getBuilder()
  227 + .setId(Integer.valueOf(param.get("cl.id_eq").toString()))
  228 + .build()
  229 + ))
  230 + .build();
  231 + vehicleConfigServiceFacade.validate_config_exist(vehicleConfigDto);
  232 + rtn.put("status", ResponseCode.SUCCESS);
  233 + } catch (Exception exp) {
  234 + rtn.put("status", ResponseCode.ERROR);
  235 + rtn.put("msg", exp.getMessage());
  236 + }
  237 +
  238 + return rtn;
  239 + }
  240 +
  241 + //------------------ TODO:导入导出逻辑,之后会服务化 -----------------//
  242 + @Autowired
  243 + private CarConfigInfoService carConfigInfoService;
  244 + // 上传excel文件
  245 + @RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
  246 + public Map<String, Object> uploadFile(MultipartFile file) {
  247 + Map<String, Object> rtn = new HashMap<>();
  248 + try {
  249 + DataToolsFile dataToolsFile = carConfigInfoService.uploadFile(file.getOriginalFilename(), file.getBytes());
  250 + // excel文件名
  251 + String fileName = dataToolsFile.getFile().getAbsolutePath();
  252 + Workbook wb = dataToolsFile.getFileType().getWorkBook(dataToolsFile.getFile());
  253 +
  254 + // excel文件sheet
  255 + List<String> sheetnames = new ArrayList<>();
  256 + for (int i = 0; i < wb.getNumberOfSheets(); i ++) {
  257 + sheetnames.add(wb.getSheetAt(i).getSheetName());
  258 + }
  259 +
  260 + wb.close();
  261 +
  262 + rtn.put("status", ResponseCode.SUCCESS);
  263 + rtn.put("filename", fileName);
  264 + rtn.put("sheetnames", StringUtils.join(sheetnames, ","));
  265 + } catch (Exception exp) {
  266 + exp.printStackTrace();
  267 + rtn.put("status", ResponseCode.ERROR);
  268 + rtn.put("msg", exp.getMessage());
  269 + }
  270 + return rtn;
  271 + }
  272 + // 导入excel文件
  273 + @RequestMapping(value = "/importFile", method = RequestMethod.POST)
  274 + public Map<String, Object> importFile(@RequestParam Map<String, Object> params) {
  275 + Map<String, Object> rtn = new HashMap<>();
  276 +
  277 + try {
  278 + File file = new File(String.valueOf(params.get("filename")));
  279 + if (!file.exists()) {
  280 + throw new Exception("导入文件不存在!");
  281 + }
  282 + carConfigInfoService.importData(file, params);
  283 +
  284 + rtn.put("status", ResponseCode.SUCCESS);
  285 + rtn.put("msg", "导入文件成功");
  286 + } catch (Exception exp) {
  287 + rtn.put("status", ResponseCode.ERROR);
  288 + rtn.put("msg", exp.getMessage());
  289 + }
  290 +
  291 + return rtn;
  292 + }
  293 + // 上传并导入excel文件
  294 + @RequestMapping(value = "/uploadAndImportFile", method = RequestMethod.POST)
  295 + public Map<String, Object> uploadAndImportFile(MultipartFile file) {
  296 + Map<String, Object> rtn = new HashMap<>();
  297 +
  298 + try {
  299 + DataToolsFile dataToolsFile = carConfigInfoService.uploadFile(file.getOriginalFilename(), file.getBytes());
  300 + Map<String, Object> params = new HashMap<>();
  301 + carConfigInfoService.importData(dataToolsFile.getFile(), params);
  302 +
  303 + rtn.put("status", ResponseCode.SUCCESS);
  304 + rtn.put("msg", "上传&导入文件成功");
  305 + } catch (Exception exp) {
  306 + exp.printStackTrace();
  307 + rtn.put("status", ResponseCode.ERROR);
  308 + rtn.put("msg", exp.getMessage());
  309 + }
  310 +
  311 + return rtn;
  312 + }
  313 +
  314 + // 导出数据到xls文件
  315 + @RequestMapping(value = "/exportFile", method = RequestMethod.GET)
  316 + public void exportFile(HttpServletResponse response,
  317 + @RequestParam Map<String, Object> params) throws Exception {
  318 + DataToolsFile dataToolsFile = carConfigInfoService.exportData(params);
  319 + // 流输出导出文件
  320 + response.setHeader("content-type", "application/octet-stream");
  321 + response.setHeader("Content-Disposition", "attachment; filename=" + dataToolsFile.getFile().getName());
  322 + response.setContentType("application/octet-stream");
  323 +
  324 + OutputStream os = response.getOutputStream();
  325 + BufferedOutputStream bos = new BufferedOutputStream(os);
  326 +
  327 + InputStream is = new FileInputStream(dataToolsFile.getFile());
  328 + BufferedInputStream bis = new BufferedInputStream(is);
  329 +
  330 + int length = 0;
  331 + byte[] temp = new byte[1 * 1024 * 10];
  332 + while ((length = bis.read(temp)) != -1) {
  333 + bos.write(temp, 0, length);
  334 + }
  335 + bos.flush();
  336 + bis.close();
  337 + bos.close();
  338 + is.close();
  339 + }
  340 +
  341 +
  342 +}
... ...
src/main/java/com/bsth/controller/schedule/core/EmployeeConfigInfoController_facade.java 0 → 100644
  1 +package com.bsth.controller.schedule.core;
  2 +
  3 +import com.alibaba.dubbo.config.annotation.Reference;
  4 +import com.bsth.common.Constants;
  5 +import com.bsth.common.ResponseCode;
  6 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
  7 +import com.bsth.control_v2.plan_module.common.dto.baseinfo.LineDto;
  8 +import com.bsth.control_v2.plan_module.common.dto.baseinfo.PersonnelDto;
  9 +import com.bsth.control_v2.plan_module.common.dto.schedule.config.EmployeeConfigDto;
  10 +import com.bsth.control_v2.plan_module.common.dto.sys.CompanyAuthorityDto;
  11 +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
  12 +import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
  13 +import com.bsth.control_v2.plan_module.common.service.schedule.config.EmployeeConfigServiceFacade;
  14 +import com.bsth.controller.schedule.BController_facade;
  15 +import com.bsth.entity.sys.CompanyAuthority;
  16 +import com.bsth.service.schedule.EmployeeConfigInfoService;
  17 +import com.bsth.service.schedule.utils.DataToolsFile;
  18 +import org.apache.commons.lang3.StringUtils;
  19 +import org.apache.poi.ss.usermodel.Workbook;
  20 +import org.springframework.beans.factory.annotation.Autowired;
  21 +import org.springframework.context.annotation.Conditional;
  22 +import org.springframework.web.bind.annotation.*;
  23 +import org.springframework.web.multipart.MultipartFile;
  24 +
  25 +import javax.servlet.http.HttpServletRequest;
  26 +import javax.servlet.http.HttpServletResponse;
  27 +import javax.servlet.http.HttpSession;
  28 +import java.io.*;
  29 +import java.util.*;
  30 +
  31 +/**
  32 + * Created by xu on 16/5/10.
  33 + */
  34 +@RestController
  35 +@Conditional(DubboConfigCondition.class)
  36 +@RequestMapping("eci")
  37 +public class EmployeeConfigInfoController_facade extends BController_facade<Long, EmployeeConfigDto> {
  38 +
  39 + @Override
  40 + public void setCreateUserInfo(EmployeeConfigDto employeeConfigDto, Integer userId, Date createDate) {
  41 + UserDto userDto = UserDto.getBuilder()
  42 + .setId(userId)
  43 + .build();
  44 + employeeConfigDto.setCreateBy(userDto);
  45 + employeeConfigDto.setCreateDate(createDate);
  46 + }
  47 +
  48 + @Override
  49 + public void setUpdateUserInfo(EmployeeConfigDto employeeConfigDto, Integer userId, Date updateDate) {
  50 + UserDto userDto = UserDto.getBuilder()
  51 + .setId(userId)
  52 + .build();
  53 + employeeConfigDto.setUpdateBy(userDto);
  54 + employeeConfigDto.setUpdateDate(updateDate);
  55 + }
  56 +
  57 + @Reference
  58 + private EmployeeConfigServiceFacade employeeConfigServiceFacade;
  59 +
  60 + @Override
  61 + protected BServiceFacade<Long, EmployeeConfigDto> getBServiceFacade() {
  62 + return employeeConfigServiceFacade;
  63 + }
  64 +
  65 + @RequestMapping(value = "/jsy", method = RequestMethod.GET)
  66 + public List<Map<String, Object>> findJsyFromConfig() {
  67 + return employeeConfigServiceFacade.findJsyFromConfig();
  68 + }
  69 +
  70 + @RequestMapping(value = "/spy", method = RequestMethod.GET)
  71 + public List<Map<String, Object>> findSpyFromConfig() {
  72 + return employeeConfigServiceFacade.findSpyFromConfig();
  73 + }
  74 +
  75 +
  76 + @RequestMapping(value = "/dbbm/{xlid}", method = RequestMethod.GET)
  77 + public Map<String, Object> getDbbm(@PathVariable("xlid") Integer xl) {
  78 + Map<String, Object> rtn = new HashMap<>();
  79 + try {
  80 + rtn.put("data", employeeConfigServiceFacade.getMaxDbbm(xl));
  81 + rtn.put("status", ResponseCode.SUCCESS);
  82 + } catch (Exception exp) {
  83 + exp.printStackTrace();
  84 + rtn.put("status", ResponseCode.ERROR);
  85 + rtn.put("msg", exp.getMessage());
  86 + }
  87 + return rtn;
  88 + }
  89 +
  90 + @RequestMapping(value = "/validate_jsy", method = RequestMethod.GET)
  91 + public Map<String, Object> validate_jsy(@RequestParam Map<String, Object> param) {
  92 + Map<String, Object> rtn = new HashMap<>();
  93 + try {
  94 + EmployeeConfigDto employeeConfigDto = EmployeeConfigDto.getBuilder()
  95 + .setId(param.get("id_eq") == null ? null : Long.parseLong(param.get("id_eq").toString()))
  96 + .setXl(param.get("xl.id_eq") == null ? null : (
  97 + LineDto.getBuilder()
  98 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  99 + .setName(param.get("xl.name_eq").toString())
  100 + .build()
  101 + ))
  102 + .setJsy(param.get("jsy.id_eq") == null ? null : (
  103 + PersonnelDto.getBuilder()
  104 + .setId(Integer.valueOf(param.get("jsy.id_eq").toString()))
  105 + .build()
  106 + ))
  107 + .build();
  108 + employeeConfigServiceFacade.validate_jsy_duplicate_without_current(employeeConfigDto);
  109 + rtn.put("status", ResponseCode.SUCCESS);
  110 + } catch (Exception exp) {
  111 + rtn.put("status", ResponseCode.ERROR);
  112 + rtn.put("msg", exp.getMessage());
  113 + }
  114 +
  115 + return rtn;
  116 + }
  117 +
  118 + @RequestMapping(value = "/validate_jsy_config", method = RequestMethod.GET)
  119 + public Map<String, Object> validate_jsy_config(@RequestParam Map<String, Object> param) {
  120 + Map<String, Object> rtn = new HashMap<>();
  121 + try {
  122 + EmployeeConfigDto employeeConfigDto = EmployeeConfigDto.getBuilder()
  123 + .setXl(param.get("xl.id_eq") == null ? null : (
  124 + LineDto.getBuilder()
  125 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  126 + .setName(param.get("xl.name_eq").toString())
  127 + .build()
  128 + ))
  129 + .setJsy(param.get("jsy.id_eq") == null ? null : (
  130 + PersonnelDto.getBuilder()
  131 + .setId(Integer.valueOf(param.get("jsy.id_eq").toString()))
  132 + .build()
  133 + ))
  134 + .build();
  135 + employeeConfigServiceFacade.validate_jsy_exist(employeeConfigDto);
  136 + rtn.put("status", ResponseCode.SUCCESS);
  137 + } catch (Exception exp) {
  138 + rtn.put("status", ResponseCode.ERROR);
  139 + rtn.put("msg", exp.getMessage());
  140 + }
  141 +
  142 + return rtn;
  143 + }
  144 +
  145 + @RequestMapping(value = "/validate_jsy_gs", method = RequestMethod.GET)
  146 + public Map<String, Object> validate_jsy_gs(HttpServletRequest request, @RequestParam Map<String, Object> param) {
  147 + HttpSession session = request.getSession();
  148 + List<CompanyAuthority> cmyAuths = (List<CompanyAuthority>) session.getAttribute(Constants.COMPANY_AUTHORITYS);
  149 + List<CompanyAuthorityDto> companyAuthorityDtoList = new ArrayList<>();
  150 + for (CompanyAuthority companyAuthority : cmyAuths) {
  151 + CompanyAuthorityDto companyAuthorityDto = CompanyAuthorityDto.getBuilder()
  152 + .setId(companyAuthority.getId())
  153 + .setCompanyCode(companyAuthority.getCompanyCode())
  154 + .setCompanyName(companyAuthority.getCompanyName())
  155 + .setSubCompanyCode(companyAuthority.getSubCompanyCode())
  156 + .setSubCompanyName(companyAuthority.getSubCompanyName())
  157 + .build();
  158 + companyAuthorityDtoList.add(companyAuthorityDto);
  159 + }
  160 +
  161 + Map<String, Object> rtn = new HashMap<>();
  162 + try {
  163 + EmployeeConfigDto employeeConfigDto = EmployeeConfigDto.getBuilder()
  164 + .setXl(param.get("xl.id_eq") == null ? null : (
  165 + LineDto.getBuilder()
  166 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  167 + .setName(param.get("xl.name_eq").toString())
  168 + .build()
  169 + ))
  170 + .setJsy(param.get("jsy.id_eq") == null ? null : (
  171 + PersonnelDto.getBuilder()
  172 + .setId(Integer.valueOf(param.get("jsy.id_eq").toString()))
  173 + .build()
  174 + ))
  175 + .build();
  176 + employeeConfigServiceFacade.validate_jsy_gs_authority(employeeConfigDto, companyAuthorityDtoList);
  177 + rtn.put("status", ResponseCode.SUCCESS);
  178 + } catch (Exception exp) {
  179 + rtn.put("status", ResponseCode.ERROR);
  180 + rtn.put("msg", exp.getMessage());
  181 + }
  182 +
  183 + return rtn;
  184 + }
  185 +
  186 + @RequestMapping(value = "/validate_jsy_fgs", method = RequestMethod.GET)
  187 + public Map<String, Object> validate_jsy_fgs(HttpServletRequest request, @RequestParam Map<String, Object> param) {
  188 + HttpSession session = request.getSession();
  189 + List<CompanyAuthority> cmyAuths = (List<CompanyAuthority>) session.getAttribute(Constants.COMPANY_AUTHORITYS);
  190 + List<CompanyAuthorityDto> companyAuthorityDtoList = new ArrayList<>();
  191 + for (CompanyAuthority companyAuthority : cmyAuths) {
  192 + CompanyAuthorityDto companyAuthorityDto = CompanyAuthorityDto.getBuilder()
  193 + .setId(companyAuthority.getId())
  194 + .setCompanyCode(companyAuthority.getCompanyCode())
  195 + .setCompanyName(companyAuthority.getCompanyName())
  196 + .setSubCompanyCode(companyAuthority.getSubCompanyCode())
  197 + .setSubCompanyName(companyAuthority.getSubCompanyName())
  198 + .build();
  199 + companyAuthorityDtoList.add(companyAuthorityDto);
  200 + }
  201 +
  202 + Map<String, Object> rtn = new HashMap<>();
  203 + try {
  204 + EmployeeConfigDto employeeConfigDto = EmployeeConfigDto.getBuilder()
  205 + .setXl(param.get("xl.id_eq") == null ? null : (
  206 + LineDto.getBuilder()
  207 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  208 + .setName(param.get("xl.name_eq").toString())
  209 + .build()
  210 + ))
  211 + .setJsy(param.get("jsy.id_eq") == null ? null : (
  212 + PersonnelDto.getBuilder()
  213 + .setId(Integer.valueOf(param.get("jsy.id_eq").toString()))
  214 + .build()
  215 + ))
  216 + .build();
  217 + employeeConfigServiceFacade.validate_jsy_fgs_authority(employeeConfigDto, companyAuthorityDtoList);
  218 + rtn.put("status", ResponseCode.SUCCESS);
  219 + } catch (Exception exp) {
  220 + rtn.put("status", ResponseCode.ERROR);
  221 + rtn.put("msg", exp.getMessage());
  222 + }
  223 +
  224 + return rtn;
  225 + }
  226 +
  227 + @RequestMapping(value = "/validate_spy", method = RequestMethod.GET)
  228 + public Map<String, Object> validate_spy(@RequestParam Map<String, Object> param) {
  229 + Map<String, Object> rtn = new HashMap<>();
  230 + try {
  231 + EmployeeConfigDto employeeConfigDto = EmployeeConfigDto.getBuilder()
  232 + .setId(param.get("id_eq") == null ? null : Long.parseLong(param.get("id_eq").toString()))
  233 + .setXl(param.get("xl.id_eq") == null ? null : (
  234 + LineDto.getBuilder()
  235 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  236 + .setName(param.get("xl.name_eq").toString())
  237 + .build()
  238 + ))
  239 + .setSpy(param.get("spy.id_eq") == null ? null : (
  240 + PersonnelDto.getBuilder()
  241 + .setId(Integer.valueOf(param.get("spy.id_eq").toString()))
  242 + .build()
  243 + ))
  244 + .build();
  245 + employeeConfigServiceFacade.validate_spy_duplicate_without_current(employeeConfigDto);
  246 + rtn.put("status", ResponseCode.SUCCESS);
  247 + } catch (Exception exp) {
  248 + rtn.put("status", ResponseCode.ERROR);
  249 + rtn.put("msg", exp.getMessage());
  250 + }
  251 + return rtn;
  252 + }
  253 +
  254 + @RequestMapping(value = "/validate_spy_config", method = RequestMethod.GET)
  255 + public Map<String, Object> validate_spy_config(@RequestParam Map<String, Object> param) {
  256 + Map<String, Object> rtn = new HashMap<>();
  257 + try {
  258 + EmployeeConfigDto employeeConfigDto = EmployeeConfigDto.getBuilder()
  259 + .setXl(param.get("xl.id_eq") == null ? null : (
  260 + LineDto.getBuilder()
  261 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  262 + .setName(param.get("xl.name_eq").toString())
  263 + .build()
  264 + ))
  265 + .setSpy(param.get("spy.id_eq") == null ? null : (
  266 + PersonnelDto.getBuilder()
  267 + .setId(Integer.valueOf(param.get("spy.id_eq").toString()))
  268 + .build()
  269 + ))
  270 + .build();
  271 + employeeConfigServiceFacade.validate_spy_exist(employeeConfigDto);
  272 + rtn.put("status", ResponseCode.SUCCESS);
  273 + } catch (Exception exp) {
  274 + rtn.put("status", ResponseCode.ERROR);
  275 + rtn.put("msg", exp.getMessage());
  276 + }
  277 + return rtn;
  278 + }
  279 +
  280 + @RequestMapping(value = "/validate_spy_gs", method = RequestMethod.GET)
  281 + public Map<String, Object> validate_spy_gs(HttpServletRequest request, @RequestParam Map<String, Object> param) {
  282 + HttpSession session = request.getSession();
  283 + List<CompanyAuthority> cmyAuths = (List<CompanyAuthority>) session.getAttribute(Constants.COMPANY_AUTHORITYS);
  284 + List<CompanyAuthorityDto> companyAuthorityDtoList = new ArrayList<>();
  285 + for (CompanyAuthority companyAuthority : cmyAuths) {
  286 + CompanyAuthorityDto companyAuthorityDto = CompanyAuthorityDto.getBuilder()
  287 + .setId(companyAuthority.getId())
  288 + .setCompanyCode(companyAuthority.getCompanyCode())
  289 + .setCompanyName(companyAuthority.getCompanyName())
  290 + .setSubCompanyCode(companyAuthority.getSubCompanyCode())
  291 + .setSubCompanyName(companyAuthority.getSubCompanyName())
  292 + .build();
  293 + companyAuthorityDtoList.add(companyAuthorityDto);
  294 + }
  295 +
  296 + Map<String, Object> rtn = new HashMap<>();
  297 + try {
  298 + EmployeeConfigDto employeeConfigDto = EmployeeConfigDto.getBuilder()
  299 + .setXl(param.get("xl.id_eq") == null ? null : (
  300 + LineDto.getBuilder()
  301 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  302 + .setName(param.get("xl.name_eq").toString())
  303 + .build()
  304 + ))
  305 + .setSpy(param.get("spy.id_eq") == null ? null : (
  306 + PersonnelDto.getBuilder()
  307 + .setId(Integer.valueOf(param.get("spy.id_eq").toString()))
  308 + .build()
  309 + ))
  310 + .build();
  311 + employeeConfigServiceFacade.validate_spy_gs_authority(employeeConfigDto, companyAuthorityDtoList);
  312 + rtn.put("status", ResponseCode.SUCCESS);
  313 + } catch (Exception exp) {
  314 + rtn.put("status", ResponseCode.ERROR);
  315 + rtn.put("msg", exp.getMessage());
  316 + }
  317 + return rtn;
  318 + }
  319 +
  320 + @RequestMapping(value = "/validate_spy_fgs", method = RequestMethod.GET)
  321 + public Map<String, Object> validate_spy_fgs(HttpServletRequest request, @RequestParam Map<String, Object> param) {
  322 + HttpSession session = request.getSession();
  323 + List<CompanyAuthority> cmyAuths = (List<CompanyAuthority>) session.getAttribute(Constants.COMPANY_AUTHORITYS);
  324 + List<CompanyAuthorityDto> companyAuthorityDtoList = new ArrayList<>();
  325 + for (CompanyAuthority companyAuthority : cmyAuths) {
  326 + CompanyAuthorityDto companyAuthorityDto = CompanyAuthorityDto.getBuilder()
  327 + .setId(companyAuthority.getId())
  328 + .setCompanyCode(companyAuthority.getCompanyCode())
  329 + .setCompanyName(companyAuthority.getCompanyName())
  330 + .setSubCompanyCode(companyAuthority.getSubCompanyCode())
  331 + .setSubCompanyName(companyAuthority.getSubCompanyName())
  332 + .build();
  333 + companyAuthorityDtoList.add(companyAuthorityDto);
  334 + }
  335 +
  336 + Map<String, Object> rtn = new HashMap<>();
  337 + try {
  338 + EmployeeConfigDto employeeConfigDto = EmployeeConfigDto.getBuilder()
  339 + .setXl(param.get("xl.id_eq") == null ? null : (
  340 + LineDto.getBuilder()
  341 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  342 + .setName(param.get("xl.name_eq").toString())
  343 + .build()
  344 + ))
  345 + .setSpy(param.get("spy.id_eq") == null ? null : (
  346 + PersonnelDto.getBuilder()
  347 + .setId(Integer.valueOf(param.get("spy.id_eq").toString()))
  348 + .build()
  349 + ))
  350 + .build();
  351 + employeeConfigServiceFacade.validate_spy_fgs_authority(employeeConfigDto, companyAuthorityDtoList);
  352 + rtn.put("status", ResponseCode.SUCCESS);
  353 + } catch (Exception exp) {
  354 + rtn.put("status", ResponseCode.ERROR);
  355 + rtn.put("msg", exp.getMessage());
  356 + }
  357 + return rtn;
  358 + }
  359 +
  360 + //------------------ TODO:导入导出逻辑,之后会服务化 -----------------//
  361 + @Autowired
  362 + private EmployeeConfigInfoService employeeConfigInfoService;
  363 + // 上传excel文件
  364 + @RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
  365 + public Map<String, Object> uploadFile(MultipartFile file) {
  366 + Map<String, Object> rtn = new HashMap<>();
  367 + try {
  368 + DataToolsFile dataToolsFile = employeeConfigInfoService.uploadFile(file.getOriginalFilename(), file.getBytes());
  369 + // excel文件名
  370 + String fileName = dataToolsFile.getFile().getAbsolutePath();
  371 + Workbook wb = dataToolsFile.getFileType().getWorkBook(dataToolsFile.getFile());
  372 +
  373 + // excel文件sheet
  374 + List<String> sheetnames = new ArrayList<>();
  375 + for (int i = 0; i < wb.getNumberOfSheets(); i ++) {
  376 + sheetnames.add(wb.getSheetAt(i).getSheetName());
  377 + }
  378 +
  379 + wb.close();
  380 +
  381 + rtn.put("status", ResponseCode.SUCCESS);
  382 + rtn.put("filename", fileName);
  383 + rtn.put("sheetnames", StringUtils.join(sheetnames, ","));
  384 + } catch (Exception exp) {
  385 + exp.printStackTrace();
  386 + rtn.put("status", ResponseCode.ERROR);
  387 + rtn.put("msg", exp.getMessage());
  388 + }
  389 + return rtn;
  390 + }
  391 + // 导入excel文件
  392 + @RequestMapping(value = "/importFile", method = RequestMethod.POST)
  393 + public Map<String, Object> importFile(@RequestParam Map<String, Object> params) {
  394 + Map<String, Object> rtn = new HashMap<>();
  395 +
  396 + try {
  397 + File file = new File(String.valueOf(params.get("filename")));
  398 + if (!file.exists()) {
  399 + throw new Exception("导入文件不存在!");
  400 + }
  401 + employeeConfigInfoService.importData(file, params);
  402 +
  403 + rtn.put("status", ResponseCode.SUCCESS);
  404 + rtn.put("msg", "导入文件成功");
  405 + } catch (Exception exp) {
  406 + rtn.put("status", ResponseCode.ERROR);
  407 + rtn.put("msg", exp.getMessage());
  408 + }
  409 +
  410 + return rtn;
  411 + }
  412 + // 上传并导入excel文件
  413 + @RequestMapping(value = "/uploadAndImportFile", method = RequestMethod.POST)
  414 + public Map<String, Object> uploadAndImportFile(MultipartFile file) {
  415 + Map<String, Object> rtn = new HashMap<>();
  416 +
  417 + try {
  418 + DataToolsFile dataToolsFile = employeeConfigInfoService.uploadFile(file.getOriginalFilename(), file.getBytes());
  419 + Map<String, Object> params = new HashMap<>();
  420 + employeeConfigInfoService.importData(dataToolsFile.getFile(), params);
  421 +
  422 + rtn.put("status", ResponseCode.SUCCESS);
  423 + rtn.put("msg", "上传&导入文件成功");
  424 + } catch (Exception exp) {
  425 + exp.printStackTrace();
  426 + rtn.put("status", ResponseCode.ERROR);
  427 + rtn.put("msg", exp.getMessage());
  428 + }
  429 +
  430 + return rtn;
  431 + }
  432 +
  433 + // 导出数据到xls文件
  434 + @RequestMapping(value = "/exportFile", method = RequestMethod.GET)
  435 + public void exportFile(HttpServletResponse response,
  436 + @RequestParam Map<String, Object> params) throws Exception {
  437 + DataToolsFile dataToolsFile = employeeConfigInfoService.exportData(params);
  438 + // 流输出导出文件
  439 + response.setHeader("content-type", "application/octet-stream");
  440 + response.setHeader("Content-Disposition", "attachment; filename=" + dataToolsFile.getFile().getName());
  441 + response.setContentType("application/octet-stream");
  442 +
  443 + OutputStream os = response.getOutputStream();
  444 + BufferedOutputStream bos = new BufferedOutputStream(os);
  445 +
  446 + InputStream is = new FileInputStream(dataToolsFile.getFile());
  447 + BufferedInputStream bis = new BufferedInputStream(is);
  448 +
  449 + int length = 0;
  450 + byte[] temp = new byte[1 * 1024 * 10];
  451 + while ((length = bis.read(temp)) != -1) {
  452 + bos.write(temp, 0, length);
  453 + }
  454 + bos.flush();
  455 + bis.close();
  456 + bos.close();
  457 + is.close();
  458 + }
  459 +
  460 +
  461 +}
... ...
src/main/java/com/bsth/controller/schedule/core/GuideboardInfoController_facade.java 0 → 100644
  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.baseinfo.LineDto;
  7 +import com.bsth.control_v2.plan_module.common.dto.schedule.config.LpConfigDto;
  8 +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
  9 +import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
  10 +import com.bsth.control_v2.plan_module.common.service.schedule.config.LpConfigServiceFacade;
  11 +import com.bsth.controller.schedule.BController_facade;
  12 +import com.bsth.service.schedule.GuideboardInfoService;
  13 +import com.bsth.service.schedule.utils.DataToolsFile;
  14 +import org.apache.commons.lang3.StringUtils;
  15 +import org.apache.poi.ss.usermodel.Workbook;
  16 +import org.springframework.beans.factory.annotation.Autowired;
  17 +import org.springframework.context.annotation.Conditional;
  18 +import org.springframework.web.bind.annotation.*;
  19 +import org.springframework.web.multipart.MultipartFile;
  20 +
  21 +import javax.servlet.http.HttpServletResponse;
  22 +import java.io.*;
  23 +import java.util.*;
  24 +
  25 +/**
  26 + * 路牌管理控制器。
  27 + */
  28 +@RestController
  29 +@Conditional(DubboConfigCondition.class)
  30 +@RequestMapping("gic")
  31 +public class GuideboardInfoController_facade extends BController_facade<Long, LpConfigDto> {
  32 + @Override
  33 + public void setCreateUserInfo(LpConfigDto lpConfigDto, Integer userId, Date createDate) {
  34 + UserDto userDto = UserDto.getBuilder()
  35 + .setId(userId)
  36 + .build();
  37 + lpConfigDto.setCreateBy(userDto);
  38 + lpConfigDto.setCreateDate(createDate);
  39 + }
  40 +
  41 + @Override
  42 + public void setUpdateUserInfo(LpConfigDto lpConfigDto, Integer userId, Date updateDate) {
  43 + UserDto userDto = UserDto.getBuilder()
  44 + .setId(userId)
  45 + .build();
  46 + lpConfigDto.setUpdateBy(userDto);
  47 + lpConfigDto.setUpdateDate(updateDate);
  48 + }
  49 +
  50 + @Reference
  51 + private LpConfigServiceFacade lpConfigServiceFacade;
  52 +
  53 + @Override
  54 + protected BServiceFacade<Long, LpConfigDto> getBServiceFacade() {
  55 + return lpConfigServiceFacade;
  56 + }
  57 +
  58 + @RequestMapping(value = "/ttlpnames", method = RequestMethod.GET)
  59 + public List<Map<String, Object>> findLpName(Long ttid) {
  60 + return lpConfigServiceFacade.findLpName_from_ttinfo(ttid);
  61 + }
  62 +
  63 + @RequestMapping(value = "lpno/{xlid}", method = RequestMethod.GET)
  64 + public Map<String, Object> getLpNo(@PathVariable("xlid") Integer xl) {
  65 + Map<String, Object> rtn = new HashMap<>();
  66 + try {
  67 + rtn.put("data", lpConfigServiceFacade.getMaxLpno(xl));
  68 + rtn.put("status", ResponseCode.SUCCESS);
  69 + } catch (Exception exp) {
  70 + exp.printStackTrace();
  71 + rtn.put("status", ResponseCode.ERROR);
  72 + rtn.put("msg", exp.getMessage());
  73 + }
  74 +
  75 + return rtn;
  76 + }
  77 +
  78 + @RequestMapping(value = "/validate_lpno", method = RequestMethod.GET)
  79 + public Map<String, Object> validate_lpno(@RequestParam Map<String, Object> param) {
  80 + Map<String, Object> rtn = new HashMap<>();
  81 + try {
  82 + LpConfigDto lpConfigDto = LpConfigDto.getBuilder()
  83 + .setId(param.get("id_eq") == null ? null : Long.valueOf(param.get("id_eq").toString()))
  84 + .setXl(param.get("xl.id_eq") == null ? null : (
  85 + LineDto.getBuilder()
  86 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  87 + .build()
  88 + ))
  89 + .setLpNo(param.get("lpNo_eq") == null ? null : Integer.valueOf(param.get("lpNo_eq").toString()))
  90 + .build();
  91 + lpConfigServiceFacade.validate_lpno_duplicate(lpConfigDto);
  92 + rtn.put("status", ResponseCode.SUCCESS);
  93 + } catch (Exception exp) {
  94 + rtn.put("status", ResponseCode.ERROR);
  95 + rtn.put("msg", exp.getMessage());
  96 + }
  97 + return rtn;
  98 + }
  99 +
  100 + @RequestMapping(value = "/validate_lpname", method = RequestMethod.GET)
  101 + public Map<String, Object> validate_lpname(@RequestParam Map<String, Object> param) {
  102 + Map<String, Object> rtn = new HashMap<>();
  103 + try {
  104 + LpConfigDto lpConfigDto = LpConfigDto.getBuilder()
  105 + .setId(param.get("id_eq") == null ? null : Long.valueOf(param.get("id_eq").toString()))
  106 + .setXl(param.get("xl.id_eq") == null ? null : (
  107 + LineDto.getBuilder()
  108 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  109 + .build()
  110 + ))
  111 + .setLpName(param.get("lpName_eq") == null ? null : param.get("lpName_eq").toString())
  112 + .build();
  113 + lpConfigServiceFacade.validate_lpname_duplicate(lpConfigDto);
  114 + rtn.put("status", ResponseCode.SUCCESS);
  115 + } catch (Exception exp) {
  116 + rtn.put("status", ResponseCode.ERROR);
  117 + rtn.put("msg", exp.getMessage());
  118 + }
  119 + return rtn;
  120 + }
  121 +
  122 + //------------------ TODO:导入导出逻辑,之后会服务化 -----------------//
  123 + @Autowired
  124 + private GuideboardInfoService guideboardInfoService;
  125 + // 上传excel文件
  126 + @RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
  127 + public Map<String, Object> uploadFile(MultipartFile file) {
  128 + Map<String, Object> rtn = new HashMap<>();
  129 + try {
  130 + DataToolsFile dataToolsFile = guideboardInfoService.uploadFile(file.getOriginalFilename(), file.getBytes());
  131 + // excel文件名
  132 + String fileName = dataToolsFile.getFile().getAbsolutePath();
  133 + Workbook wb = dataToolsFile.getFileType().getWorkBook(dataToolsFile.getFile());
  134 +
  135 + // excel文件sheet
  136 + List<String> sheetnames = new ArrayList<>();
  137 + for (int i = 0; i < wb.getNumberOfSheets(); i ++) {
  138 + sheetnames.add(wb.getSheetAt(i).getSheetName());
  139 + }
  140 +
  141 + wb.close();
  142 +
  143 + rtn.put("status", ResponseCode.SUCCESS);
  144 + rtn.put("filename", fileName);
  145 + rtn.put("sheetnames", StringUtils.join(sheetnames, ","));
  146 + } catch (Exception exp) {
  147 + exp.printStackTrace();
  148 + rtn.put("status", ResponseCode.ERROR);
  149 + rtn.put("msg", exp.getMessage());
  150 + }
  151 + return rtn;
  152 + }
  153 + // 导入excel文件
  154 + @RequestMapping(value = "/importFile", method = RequestMethod.POST)
  155 + public Map<String, Object> importFile(@RequestParam Map<String, Object> params) {
  156 + Map<String, Object> rtn = new HashMap<>();
  157 +
  158 + try {
  159 + File file = new File(String.valueOf(params.get("filename")));
  160 + if (!file.exists()) {
  161 + throw new Exception("导入文件不存在!");
  162 + }
  163 + guideboardInfoService.importData(file, params);
  164 +
  165 + rtn.put("status", ResponseCode.SUCCESS);
  166 + rtn.put("msg", "导入文件成功");
  167 + } catch (Exception exp) {
  168 + rtn.put("status", ResponseCode.ERROR);
  169 + rtn.put("msg", exp.getMessage());
  170 + }
  171 +
  172 + return rtn;
  173 + }
  174 + // 上传并导入excel文件
  175 + @RequestMapping(value = "/uploadAndImportFile", method = RequestMethod.POST)
  176 + public Map<String, Object> uploadAndImportFile(MultipartFile file) {
  177 + Map<String, Object> rtn = new HashMap<>();
  178 +
  179 + try {
  180 + DataToolsFile dataToolsFile = guideboardInfoService.uploadFile(file.getOriginalFilename(), file.getBytes());
  181 + Map<String, Object> params = new HashMap<>();
  182 + guideboardInfoService.importData(dataToolsFile.getFile(), params);
  183 +
  184 + rtn.put("status", ResponseCode.SUCCESS);
  185 + rtn.put("msg", "上传&导入文件成功");
  186 + } catch (Exception exp) {
  187 + exp.printStackTrace();
  188 + rtn.put("status", ResponseCode.ERROR);
  189 + rtn.put("msg", exp.getMessage());
  190 + }
  191 +
  192 + return rtn;
  193 + }
  194 +
  195 + // 导出数据到xls文件
  196 + @RequestMapping(value = "/exportFile", method = RequestMethod.GET)
  197 + public void exportFile(HttpServletResponse response,
  198 + @RequestParam Map<String, Object> params) throws Exception {
  199 + DataToolsFile dataToolsFile = guideboardInfoService.exportData(params);
  200 + // 流输出导出文件
  201 + response.setHeader("content-type", "application/octet-stream");
  202 + response.setHeader("Content-Disposition", "attachment; filename=" + dataToolsFile.getFile().getName());
  203 + response.setContentType("application/octet-stream");
  204 +
  205 + OutputStream os = response.getOutputStream();
  206 + BufferedOutputStream bos = new BufferedOutputStream(os);
  207 +
  208 + InputStream is = new FileInputStream(dataToolsFile.getFile());
  209 + BufferedInputStream bis = new BufferedInputStream(is);
  210 +
  211 + int length = 0;
  212 + byte[] temp = new byte[1 * 1024 * 10];
  213 + while ((length = bis.read(temp)) != -1) {
  214 + bos.write(temp, 0, length);
  215 + }
  216 + bos.flush();
  217 + bis.close();
  218 + bos.close();
  219 + is.close();
  220 + }
  221 +}
... ...
src/main/java/com/bsth/controller/schedule/core/LogController_facade.java
1 1 package com.bsth.controller.schedule.core;
2 2  
3 3 import com.alibaba.dubbo.config.annotation.Reference;
  4 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
4 5 import com.bsth.control_v2.plan_module.common.dto.schedule.log.ModuleOperatorLogDto;
5 6 import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
6 7 import com.bsth.control_v2.plan_module.common.service.log.LogServiceFacade;
7 8 import com.bsth.controller.schedule.BController_facade;
  9 +import org.springframework.context.annotation.Conditional;
8 10 import org.springframework.web.bind.annotation.RequestMapping;
9 11 import org.springframework.web.bind.annotation.RestController;
10 12  
11 13 @RestController
  14 +@Conditional(DubboConfigCondition.class)
12 15 @RequestMapping("s_log")
13 16 public class LogController_facade extends BController_facade<Long, ModuleOperatorLogDto> {
14 17 @Reference
... ...
src/main/java/com/bsth/controller/schedule/core/RerunController_facade.java 0 → 100644
  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.rule.RerunRuleDto;
  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.rule.RerunRuleConfigServiceFacade;
  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 +/**
  17 + * Created by xu on 16/10/20.
  18 + */
  19 +@RestController
  20 +@Conditional(DubboConfigCondition.class)
  21 +@RequestMapping("rms")
  22 +public class RerunController_facade extends BController_facade<Long, RerunRuleDto> {
  23 + @Override
  24 + public void setCreateUserInfo(RerunRuleDto rerunRuleDto, Integer userId, Date createDate) {
  25 + UserDto userDto = UserDto.getBuilder()
  26 + .setId(userId)
  27 + .build();
  28 + rerunRuleDto.setCreateBy(userDto);
  29 + rerunRuleDto.setCreateDate(createDate);
  30 + }
  31 +
  32 + @Override
  33 + public void setUpdateUserInfo(RerunRuleDto rerunRuleDto, Integer userId, Date updateDate) {
  34 + UserDto userDto = UserDto.getBuilder()
  35 + .setId(userId)
  36 + .build();
  37 + rerunRuleDto.setUpdateBy(userDto);
  38 + rerunRuleDto.setUpdateDate(updateDate);
  39 + }
  40 +
  41 + @Reference
  42 + private RerunRuleConfigServiceFacade rerunRuleConfigServiceFacade;
  43 +
  44 + @Override
  45 + protected BServiceFacade<Long, RerunRuleDto> getBServiceFacade() {
  46 + return rerunRuleConfigServiceFacade;
  47 + }
  48 +}
... ...
src/main/java/com/bsth/controller/schedule/core/SchedulePlanController_facade.java
... ... @@ -2,15 +2,17 @@ package com.bsth.controller.schedule.core;
2 2  
3 3 import com.alibaba.dubbo.config.annotation.Reference;
4 4 import com.bsth.common.ResponseCode;
  5 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
5 6 import com.bsth.control_v2.plan_module.common.dto.schedule.PlanDto;
  7 +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
6 8 import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
7   -import com.bsth.control_v2.plan_module.common.service.schedule.PlanGenerateFacade;
8 9 import com.bsth.control_v2.plan_module.common.service.schedule.PlanServiceFacade;
9 10 import com.bsth.control_v2.plan_module.common.service.schedule.validate.PlanPreValidateFacade;
10 11 import com.bsth.controller.schedule.BController_facade;
11 12 import com.bsth.entity.schedule.SchedulePlan;
12 13 import com.bsth.service.schedule.SchedulePlanService;
13 14 import org.springframework.beans.factory.annotation.Autowired;
  15 +import org.springframework.context.annotation.Conditional;
14 16 import org.springframework.web.bind.annotation.PathVariable;
15 17 import org.springframework.web.bind.annotation.RequestMapping;
16 18 import org.springframework.web.bind.annotation.RequestMethod;
... ... @@ -21,14 +23,13 @@ import java.util.HashMap;
21 23 import java.util.Map;
22 24  
23 25 @RestController
  26 +@Conditional(DubboConfigCondition.class)
24 27 @RequestMapping("spc")
25 28 public class SchedulePlanController_facade extends BController_facade<Long, PlanDto> {
26 29 @Reference
27 30 private PlanServiceFacade planServiceFacade;
28 31 @Reference
29 32 private PlanPreValidateFacade planPreValidateFacade;
30   - @Reference
31   - private PlanGenerateFacade planGenerateFacade;
32 33  
33 34 @Override
34 35 protected BServiceFacade<Long, PlanDto> getBServiceFacade() {
... ... @@ -73,19 +74,21 @@ public class SchedulePlanController_facade extends BController_facade&lt;Long, Plan
73 74 }
74 75  
75 76 @Override
76   - protected boolean isSaveExtend() {
77   - return true;
  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);
78 83 }
79 84  
80   - /**
81   - * 生成排班计划。
82   - * @param planDto
83   - * @return
84   - */
85 85 @Override
86   - protected PlanDto saveExtend(PlanDto planDto) {
87   - planGenerateFacade.generatePlan(planDto);
88   - return planDto;
  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);
89 92 }
90 93  
91 94 //------------------------- 以下是还未服务话的功能 --------------------------//
... ...
src/main/java/com/bsth/controller/schedule/core/SchedulePlanInfoController_facade.java
... ... @@ -2,12 +2,14 @@ package com.bsth.controller.schedule.core;
2 2  
3 3 import com.alibaba.dubbo.config.annotation.Reference;
4 4 import com.bsth.common.ResponseCode;
  5 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
5 6 import com.bsth.control_v2.plan_module.common.dto.schedule.PlanInfoDto;
6 7 import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
7 8 import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
8 9 import com.bsth.control_v2.plan_module.common.service.schedule.PlanInfoServiceFacade;
9 10 import com.bsth.control_v2.plan_module.common.utils.SystemInfoUtils;
10 11 import com.bsth.controller.schedule.BController_facade;
  12 +import org.springframework.context.annotation.Conditional;
11 13 import org.springframework.web.bind.annotation.PathVariable;
12 14 import org.springframework.web.bind.annotation.RequestMapping;
13 15 import org.springframework.web.bind.annotation.RequestMethod;
... ... @@ -18,6 +20,7 @@ import java.util.HashMap;
18 20 import java.util.Map;
19 21  
20 22 @RestController
  23 +@Conditional(DubboConfigCondition.class)
21 24 @RequestMapping("spic")
22 25 public class SchedulePlanInfoController_facade extends BController_facade<Long, PlanInfoDto> {
23 26 @Reference
... ...
src/main/java/com/bsth/controller/schedule/core/ScheduleRule1FlatController_facade.java 0 → 100644
  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.rule.FlatRuleDto;
  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.rule.FlatRuleConfigServiceFacade;
  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 +/**
  17 + * Created by xu on 16/7/4.
  18 + */
  19 +@RestController
  20 +@Conditional(DubboConfigCondition.class)
  21 +@RequestMapping("sr1fc")
  22 +public class ScheduleRule1FlatController_facade extends BController_facade<Long, FlatRuleDto> {
  23 + @Override
  24 + public void setCreateUserInfo(FlatRuleDto flatRuleDto, Integer userId, Date createDate) {
  25 + UserDto userDto = UserDto.getBuilder()
  26 + .setId(userId)
  27 + .build();
  28 + flatRuleDto.setCreateBy(userDto);
  29 + flatRuleDto.setCreateDate(createDate);
  30 + }
  31 +
  32 + @Override
  33 + public void setUpdateUserInfo(FlatRuleDto flatRuleDto, Integer userId, Date updateDate) {
  34 + UserDto userDto = UserDto.getBuilder()
  35 + .setId(userId)
  36 + .build();
  37 + flatRuleDto.setUpdateBy(userDto);
  38 + flatRuleDto.setUpdateDate(updateDate);
  39 + }
  40 +
  41 + @Reference
  42 + private FlatRuleConfigServiceFacade flatRuleConfigServiceFacade;
  43 +
  44 + @Override
  45 + protected BServiceFacade<Long, FlatRuleDto> getBServiceFacade() {
  46 + return flatRuleConfigServiceFacade;
  47 + }
  48 +}
... ...
src/main/java/com/bsth/controller/schedule/core/TTInfoBxDetailController_facade.java
1 1 package com.bsth.controller.schedule.core;
2 2  
3 3 import com.alibaba.dubbo.config.annotation.Reference;
  4 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
4 5 import com.bsth.control_v2.plan_module.common.dto.schedule.timetable.TTInfoBxDetailDto;
5 6 import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
6 7 import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
7 8 import com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoBxDetailServiceFacade;
8 9 import com.bsth.controller.schedule.BController_facade;
  10 +import org.springframework.context.annotation.Conditional;
9 11 import org.springframework.web.bind.annotation.RequestMapping;
10 12 import org.springframework.web.bind.annotation.RestController;
11 13  
12 14 import java.util.Date;
13 15  
14 16 @RestController
  17 +@Conditional(DubboConfigCondition.class)
15 18 @RequestMapping("tibxdc")
16 19 public class TTInfoBxDetailController_facade extends BController_facade<Long, TTInfoBxDetailDto> {
17 20 @Reference
... ...
src/main/java/com/bsth/controller/schedule/core/TTInfoController_facade.java 0 → 100644
  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.baseinfo.LineDto;
  7 +import com.bsth.control_v2.plan_module.common.dto.schedule.timetable.TTInfoDto;
  8 +import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
  9 +import com.bsth.control_v2.plan_module.common.exception.PlanModuleException;
  10 +import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
  11 +import com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoServiceFacade;
  12 +import com.bsth.controller.schedule.BController_facade;
  13 +import org.springframework.context.annotation.Conditional;
  14 +import org.springframework.web.bind.annotation.*;
  15 +
  16 +import java.util.Date;
  17 +import java.util.HashMap;
  18 +import java.util.Map;
  19 +
  20 +/**
  21 + * Created by xu on 16/12/20.
  22 + */
  23 +@RestController
  24 +@Conditional(DubboConfigCondition.class)
  25 +@RequestMapping(value = "tic_ec")
  26 +public class TTInfoController_facade extends BController_facade<Long, TTInfoDto> {
  27 + @Override
  28 + public void setCreateUserInfo(TTInfoDto ttInfoDto, Integer userId, Date createDate) {
  29 + UserDto userDto = UserDto.getBuilder()
  30 + .setId(userId)
  31 + .build();
  32 + ttInfoDto.setCreateBy(userDto);
  33 + ttInfoDto.setCreateDate(createDate);
  34 + }
  35 +
  36 + @Override
  37 + public void setUpdateUserInfo(TTInfoDto ttInfoDto, Integer userId, Date updateDate) {
  38 + UserDto userDto = UserDto.getBuilder()
  39 + .setId(userId)
  40 + .build();
  41 + ttInfoDto.setUpdateBy(userDto);
  42 + ttInfoDto.setUpdateDate(updateDate);
  43 + }
  44 +
  45 + @Reference
  46 + private TTInfoServiceFacade ttInfoServiceFacade;
  47 +
  48 + @Override
  49 + protected BServiceFacade<Long, TTInfoDto> getBServiceFacade() {
  50 + return ttInfoServiceFacade;
  51 + }
  52 +
  53 + @RequestMapping(value = "/stationroute/{lineid}", method = RequestMethod.GET)
  54 + public Map<String, Object> getLineStationRouteVersions(@PathVariable(value = "lineid") Integer lineid) {
  55 + Map<String, Object> rtn = new HashMap<>();
  56 + try {
  57 + rtn.put("status", ResponseCode.SUCCESS);
  58 + rtn.put("data", ttInfoServiceFacade.getLineStationRouteVersions(lineid));
  59 +
  60 + } catch (Exception exp) {
  61 + rtn.put("status", ResponseCode.ERROR);
  62 + rtn.put("msg", exp.getMessage());
  63 + }
  64 +
  65 + return rtn;
  66 +
  67 + }
  68 +
  69 + @RequestMapping(value = "/versiondesc/{lineid}/{version}")
  70 + public Map<String, Object> getLineVersionDesc(
  71 + @PathVariable(value = "lineid") Integer lineid,
  72 + @PathVariable(value = "version") Integer version) {
  73 + Map<String, Object> rtn = new HashMap<>();
  74 + try {
  75 + Map<String, String> desc = new HashMap<>();
  76 + desc.put("desc", ttInfoServiceFacade.getLineVersionDesc(lineid, version));
  77 + rtn.put("status", ResponseCode.SUCCESS);
  78 + rtn.put("data", desc);
  79 +
  80 + } catch (Exception exp) {
  81 + rtn.put("status", ResponseCode.ERROR);
  82 + rtn.put("msg", exp.getMessage());
  83 + }
  84 +
  85 + return rtn;
  86 + }
  87 +
  88 + @RequestMapping(value = "/versiondesc2/{lineid}/{status}")
  89 + public Map<String, Object> getLineVersionDesc2(
  90 + @PathVariable(value = "lineid") Integer lineid,
  91 + @PathVariable(value = "status") Integer status) {
  92 + Map<String, Object> rtn = new HashMap<>();
  93 + try {
  94 + rtn.put("status", ResponseCode.SUCCESS);
  95 + rtn.put("data", ttInfoServiceFacade.getLineVersions(lineid, status));
  96 +
  97 + } catch (Exception exp) {
  98 + rtn.put("status", ResponseCode.ERROR);
  99 + rtn.put("msg", exp.getMessage());
  100 + }
  101 +
  102 + return rtn;
  103 + }
  104 +
  105 + @RequestMapping(value = "/validate_name", method = RequestMethod.GET)
  106 + public Map<String, Object> validate_name(@RequestParam Map<String, Object> param) {
  107 + Map<String, Object> rtn = new HashMap<>();
  108 + try {
  109 + // 名字重复验证
  110 + TTInfoDto ttInfoDto = TTInfoDto.getBuilder()
  111 + .setId(param.get("id_eq") == null ? null : Long.valueOf(param.get("id_eq").toString()))
  112 + .setXl(param.get("xl.id_eq") == null ? null : (
  113 + LineDto.getBuilder()
  114 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  115 + .build()
  116 + ))
  117 + .setName(param.get("name_eq") == null ? null : param.get("name_eq").toString())
  118 + .setRule_days(param.get("rule_days_eq") == null ? null : param.get("rule_days_eq").toString())
  119 + .setSpecial_days(param.get("special_days_eq") == null ? null : param.get("special_days_eq").toString())
  120 + .build();
  121 + ttInfoServiceFacade.validate_name_duplicate(ttInfoDto);
  122 + rtn.put("status", ResponseCode.SUCCESS);
  123 + } catch (PlanModuleException exp) {
  124 + rtn.put("status", ResponseCode.ERROR);
  125 + rtn.put("msg", exp.getMessage());
  126 + }
  127 +
  128 + return rtn;
  129 + }
  130 +
  131 + @RequestMapping(value = "/validate_n_d", method = RequestMethod.GET)
  132 + public Map<String, Object> validate_n_d(@RequestParam Map<String, Object> param) {
  133 + Map<String, Object> rtn = new HashMap<>();
  134 + try {
  135 + // 常规有效日重复验证
  136 + TTInfoDto ttInfoDto = TTInfoDto.getBuilder()
  137 + .setId(param.get("id_eq") == null ? null : Long.valueOf(param.get("id_eq").toString()))
  138 + .setXl(param.get("xl.id_eq") == null ? null : (
  139 + LineDto.getBuilder()
  140 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  141 + .build()
  142 + ))
  143 + .setName(param.get("name_eq") == null ? null : param.get("name_eq").toString())
  144 + .setRule_days(param.get("rule_days_eq") == null ? null : param.get("rule_days_eq").toString())
  145 + .setSpecial_days(param.get("special_days_eq") == null ? null : param.get("special_days_eq").toString())
  146 + .build();
  147 + ttInfoServiceFacade.validate_normal_day_duplicate(ttInfoDto);
  148 + rtn.put("status", ResponseCode.SUCCESS);
  149 + } catch (PlanModuleException exp) {
  150 + rtn.put("status", ResponseCode.ERROR);
  151 + rtn.put("msg", exp.getMessage());
  152 + }
  153 + return rtn;
  154 + }
  155 +
  156 + @RequestMapping(value = "/validate_s_d", method = RequestMethod.GET)
  157 + public Map<String, Object> validate_s_d(@RequestParam Map<String, Object> param) {
  158 + Map<String, Object> rtn = new HashMap<>();
  159 + try {
  160 + // 特殊有效日重复判定
  161 + TTInfoDto ttInfoDto = TTInfoDto.getBuilder()
  162 + .setId(param.get("id_eq") == null ? null : Long.valueOf(param.get("id_eq").toString()))
  163 + .setXl(param.get("xl.id_eq") == null ? null : (
  164 + LineDto.getBuilder()
  165 + .setId(Integer.valueOf(param.get("xl.id_eq").toString()))
  166 + .build()
  167 + ))
  168 + .setName(param.get("name_eq") == null ? null : param.get("name_eq").toString())
  169 + .setRule_days(param.get("rule_days_eq") == null ? null : param.get("rule_days_eq").toString())
  170 + .setSpecial_days(param.get("special_days_eq") == null ? null : param.get("special_days_eq").toString())
  171 + .build();
  172 + ttInfoServiceFacade.validate_special_day_duplicate(ttInfoDto);
  173 + rtn.put("status", ResponseCode.SUCCESS);
  174 + } catch (PlanModuleException exp) {
  175 + rtn.put("status", ResponseCode.ERROR);
  176 + rtn.put("msg", exp.getMessage());
  177 + }
  178 + return rtn;
  179 + }
  180 +
  181 + @RequestMapping(value = "/backup/{ttinfo}", method = RequestMethod.GET)
  182 + public Map<String, Object> backup(@PathVariable(value = "ttinfo") Long ttInfoId) {
  183 + Map<String, Object> rtn = new HashMap<>();
  184 + try {
  185 + // 备份时刻表
  186 + this.ttInfoServiceFacade.backUp(ttInfoId);
  187 + } catch (PlanModuleException exp) {
  188 + rtn.put("status", ResponseCode.ERROR);
  189 + rtn.put("msg", exp.getMessage());
  190 + }
  191 +
  192 + return rtn;
  193 + }
  194 +
  195 +}
0 196 \ No newline at end of file
... ...
src/main/java/com/bsth/controller/schedule/core/TTInfoDetailController_facade.java
... ... @@ -2,6 +2,7 @@ package com.bsth.controller.schedule.core;
2 2  
3 3 import com.alibaba.dubbo.config.annotation.Reference;
4 4 import com.bsth.common.ResponseCode;
  5 +import com.bsth.control_v2.plan_module.common.config.springboot.dubbo.DubboConfigCondition;
5 6 import com.bsth.control_v2.plan_module.common.dto.schedule.timetable.TTInfoDetailDto;
6 7 import com.bsth.control_v2.plan_module.common.dto.sys.UserDto;
7 8 import com.bsth.control_v2.plan_module.common.service.BServiceFacade;
... ... @@ -10,18 +11,23 @@ import com.bsth.control_v2.plan_module.common.utils.SystemInfoUtils;
10 11 import com.bsth.controller.schedule.BController_facade;
11 12 import com.bsth.service.schedule.TTInfoDetailService;
12 13 import com.bsth.service.schedule.datatools.TTInfoDetailForEdit;
  14 +import com.bsth.service.schedule.datatools.TTinfoDetailDynamicData;
  15 +import com.bsth.service.schedule.timetable.ExcelFormatType;
  16 +import com.bsth.service.schedule.utils.DataToolsFile;
  17 +import com.bsth.service.schedule.utils.DataToolsFileType;
  18 +import org.apache.commons.lang3.StringUtils;
  19 +import org.apache.poi.ss.usermodel.Workbook;
13 20 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.RestController;
  21 +import org.springframework.context.annotation.Conditional;
  22 +import org.springframework.web.bind.annotation.*;
  23 +import org.springframework.web.multipart.MultipartFile;
18 24  
19   -import java.util.Date;
20   -import java.util.HashMap;
21   -import java.util.List;
22   -import java.util.Map;
  25 +import javax.servlet.http.HttpServletResponse;
  26 +import java.io.*;
  27 +import java.util.*;
23 28  
24 29 @RestController
  30 +@Conditional(DubboConfigCondition.class)
25 31 @RequestMapping("tidc")
26 32 public class TTInfoDetailController_facade extends BController_facade<Long, TTInfoDetailDto> {
27 33 @Reference
... ... @@ -77,9 +83,75 @@ public class TTInfoDetailController_facade extends BController_facade&lt;Long, TTIn
77 83 ttInfoDetailServiceFacade.deleteInfo(aLong, SystemInfoUtils.createClientSystemInfo());
78 84 }
79 85  
  86 + @RequestMapping(value = "/bcdetail", method = RequestMethod.GET)
  87 + public List<TTInfoDetailDto> findBcdetails(Integer xlId, Long ttinfoId, Long lpId) {
  88 + return ttInfoDetailServiceFacade.findBcdetails(xlId, ttinfoId, lpId);
  89 + }
  90 +
  91 + /**
  92 + * 验证关联的线路标准信息(以后放到规则引擎里去做)。
  93 + * @param lineinfoid
  94 + * @return
  95 + */
  96 + @RequestMapping(value = "/validate/lineinfo", method = RequestMethod.GET)
  97 + public Map<String, Object> validate_lineInfo(Integer lineinfoid) {
  98 + Map<String, Object> rtn = new HashMap<>();
  99 + try {
  100 + ttInfoDetailServiceFacade.validateAssoLineInfo(lineinfoid);
  101 + rtn.put("status", ResponseCode.SUCCESS);
  102 + } catch (Exception exp) {
  103 + rtn.put("status", ResponseCode.ERROR);
  104 + rtn.put("msg", exp.getMessage());
  105 + }
  106 + return rtn;
  107 + }
  108 +
  109 + @RequestMapping(value = "/zd_tcc", method = RequestMethod.GET)
  110 + public Map<String, Object> getZdAndTccInfo(Integer lineid, Integer xldir, Integer lineversion) {
  111 + Map<String, Object> rtn = new HashMap<>();
  112 + try {
  113 + List<Map<String, Object>> list = ttInfoDetailServiceFacade.findZdAndTcc(lineid, xldir, lineversion);
  114 + rtn.put("status", ResponseCode.SUCCESS);
  115 + rtn.put("data", list);
  116 + } catch (Exception exp) {
  117 + rtn.put("status", ResponseCode.ERROR);
  118 + rtn.put("msg", exp.getMessage());
  119 + }
  120 + return rtn;
  121 + }
  122 +
  123 +
80 124 //--------------- TODO:以下操作不属于BController_facade,暂时没用定义在TTInfoDetailServiceFacade中 ----------//
81 125 @Autowired
82 126 private TTInfoDetailService ttInfoDetailService;
  127 +
  128 + /**
  129 + * 验证sheet(以后放到规则引擎里去做)。
  130 + * @param filename excel文件全路径名
  131 + * @param sheetname sheet名字
  132 + * @param lineid 线路id
  133 + * @param linename 线路名称
  134 + * @param lineversion 线路版本
  135 + * @return
  136 + */
  137 + @RequestMapping(value = "/validate/sheet", method = RequestMethod.POST)
  138 + public Map<String, Object> validate_sheet(
  139 + String filename, String sheetname, Integer lineid, String linename, Integer lineversion, String excelFormatType) {
  140 + Map<String, Object> rtn = new HashMap<>();
  141 + try {
  142 + if (lineversion == null) {
  143 + throw new Exception("线路版本未知");
  144 + }
  145 + ttInfoDetailService.validateExcelSheet(filename, sheetname, lineid, linename, lineversion,
  146 + ExcelFormatType.getEnum(excelFormatType));
  147 + rtn.put("status", ResponseCode.SUCCESS);
  148 + } catch (Exception exp) {
  149 + rtn.put("status", ResponseCode.ERROR);
  150 + rtn.put("msg", exp.getMessage());
  151 + }
  152 + return rtn;
  153 + }
  154 +
83 155 /**
84 156 * 获取时刻表明细编辑信息。
85 157 * @param xlid 线路id
... ... @@ -105,17 +177,151 @@ public class TTInfoDetailController_facade extends BController_facade&lt;Long, TTIn
105 177 return rtn;
106 178 }
107 179  
108   - @RequestMapping(value = "/zd_tcc", method = RequestMethod.GET)
109   - public Map<String, Object> getZdAndTccInfo(Integer lineid, Integer xldir, Integer lineversion) {
  180 + /**
  181 + * 时刻表明细批量插入
  182 + *
  183 + * @param entities
  184 + *
  185 + * @return
  186 + */
  187 + @RequestMapping(value = "/skbDetailMxSave" ,method = RequestMethod.POST)
  188 + public Map<String, Object> skbDetailMxSave(@RequestParam Map<String, Object> entities){
  189 + return ttInfoDetailService.skbDetailMxSave(entities);
  190 + }
  191 +
  192 + //------------------ TODO:导入导出逻辑,之后会服务化 -----------------//
  193 +
  194 + // 上传excel文件
  195 + @RequestMapping(value = "/uploadFile", method = RequestMethod.POST)
  196 + public Map<String, Object> uploadFile(MultipartFile file) {
110 197 Map<String, Object> rtn = new HashMap<>();
111 198 try {
112   - List<Map<String, Object>> list = ttInfoDetailService.findZdAndTcc(lineid, xldir, lineversion);
  199 + DataToolsFile dataToolsFile = ttInfoDetailService.uploadFile(file.getOriginalFilename(), file.getBytes());
  200 + // excel文件名
  201 + String fileName = dataToolsFile.getFile().getAbsolutePath();
  202 + Workbook wb = dataToolsFile.getFileType().getWorkBook(dataToolsFile.getFile());
  203 +
  204 + // excel文件sheet
  205 + List<String> sheetnames = new ArrayList<>();
  206 + for (int i = 0; i < wb.getNumberOfSheets(); i ++) {
  207 + sheetnames.add(wb.getSheetAt(i).getSheetName());
  208 + }
  209 +
  210 + wb.close();
  211 +
113 212 rtn.put("status", ResponseCode.SUCCESS);
114   - rtn.put("data", list);
  213 + rtn.put("filename", fileName);
  214 + rtn.put("sheetnames", StringUtils.join(sheetnames, ","));
  215 + } catch (Exception exp) {
  216 + exp.printStackTrace();
  217 + rtn.put("status", ResponseCode.ERROR);
  218 + rtn.put("msg", exp.getMessage());
  219 + }
  220 + return rtn;
  221 + }
  222 + // 导入excel文件
  223 + @RequestMapping(value = "/importFile", method = RequestMethod.POST)
  224 + public Map<String, Object> importFile(@RequestParam Map<String, Object> params) {
  225 + Map<String, Object> rtn = new HashMap<>();
  226 +
  227 + try {
  228 + File file = new File(String.valueOf(params.get("filename")));
  229 + if (!file.exists()) {
  230 + throw new Exception("导入文件不存在!");
  231 + }
  232 + ttInfoDetailService.importData(file, params);
  233 +
  234 + rtn.put("status", ResponseCode.SUCCESS);
  235 + rtn.put("msg", "导入文件成功");
115 236 } catch (Exception exp) {
116 237 rtn.put("status", ResponseCode.ERROR);
117 238 rtn.put("msg", exp.getMessage());
118 239 }
  240 +
119 241 return rtn;
120 242 }
  243 + // 上传并导入excel文件
  244 + @RequestMapping(value = "/uploadAndImportFile", method = RequestMethod.POST)
  245 + public Map<String, Object> uploadAndImportFile(MultipartFile file) {
  246 + Map<String, Object> rtn = new HashMap<>();
  247 +
  248 + try {
  249 + DataToolsFile dataToolsFile = ttInfoDetailService.uploadFile(file.getOriginalFilename(), file.getBytes());
  250 + Map<String, Object> params = new HashMap<>();
  251 + ttInfoDetailService.importData(dataToolsFile.getFile(), params);
  252 +
  253 + rtn.put("status", ResponseCode.SUCCESS);
  254 + rtn.put("msg", "上传&导入文件成功");
  255 + } catch (Exception exp) {
  256 + exp.printStackTrace();
  257 + rtn.put("status", ResponseCode.ERROR);
  258 + rtn.put("msg", exp.getMessage());
  259 + }
  260 +
  261 + return rtn;
  262 + }
  263 +
  264 + // 导出数据到xls文件
  265 + @RequestMapping(value = "/exportFile", method = RequestMethod.GET)
  266 + public void exportFile(HttpServletResponse response,
  267 + @RequestParam Map<String, Object> params) throws Exception {
  268 + DataToolsFile dataToolsFile = ttInfoDetailService.exportData(params);
  269 + // 流输出导出文件
  270 + response.setHeader("content-type", "application/octet-stream");
  271 + response.setHeader("Content-Disposition", "attachment; filename=" + dataToolsFile.getFile().getName());
  272 + response.setContentType("application/octet-stream");
  273 +
  274 + OutputStream os = response.getOutputStream();
  275 + BufferedOutputStream bos = new BufferedOutputStream(os);
  276 +
  277 + InputStream is = new FileInputStream(dataToolsFile.getFile());
  278 + BufferedInputStream bis = new BufferedInputStream(is);
  279 +
  280 + int length = 0;
  281 + byte[] temp = new byte[1 * 1024 * 10];
  282 + while ((length = bis.read(temp)) != -1) {
  283 + bos.write(temp, 0, length);
  284 + }
  285 + bos.flush();
  286 + bis.close();
  287 + bos.close();
  288 + is.close();
  289 + }
  290 +
  291 + @RequestMapping(value = "/exportDTDFile/{type}", method = RequestMethod.POST)
  292 + public void exportFile(
  293 + @RequestBody TTinfoDetailDynamicData.DTInfos dtInfos, @PathVariable("type") String type,
  294 + HttpServletResponse response) throws Exception {
  295 + DataToolsFile dataToolsFile = null;
  296 + if ("xls".equals(type)) {
  297 + dataToolsFile = ttInfoDetailService.exportDynamicTTinfo(dtInfos, DataToolsFileType.XLS);
  298 + } else if ("xlsx".equals(type)) {
  299 + dataToolsFile = ttInfoDetailService.exportDynamicTTinfo(dtInfos, DataToolsFileType.XLSX);
  300 + } else {
  301 + throw new Exception("未知的导出格式==>" + type);
  302 + }
  303 +
  304 + // 流输出导出文件
  305 + response.setHeader("content-type", "application/octet-stream");
  306 + response.setHeader("Content-Disposition", "attachment; filename=" + dataToolsFile.getFile().getName());
  307 + response.setContentType("application/octet-stream");
  308 +
  309 + OutputStream os = response.getOutputStream();
  310 + BufferedOutputStream bos = new BufferedOutputStream(os);
  311 +
  312 + InputStream is = new FileInputStream(dataToolsFile.getFile());
  313 + BufferedInputStream bis = new BufferedInputStream(is);
  314 +
  315 + int length = 0;
  316 + byte[] temp = new byte[1 * 1024 * 10];
  317 + while ((length = bis.read(temp)) != -1) {
  318 + bos.write(temp, 0, length);
  319 + }
  320 + bos.flush();
  321 + bis.close();
  322 + bos.close();
  323 + is.close();
  324 + }
  325 +
  326 +
121 327 }
... ...
src/main/java/com/bsth/controller/schedule/core/CarConfigInfoController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/CarConfigInfoController.java
1   -package com.bsth.controller.schedule.core;
  1 +package com.bsth.controller.schedule.core.legacy;
2 2  
3 3 import com.bsth.common.Constants;
4 4 import com.bsth.common.ResponseCode;
5 5 import com.bsth.controller.schedule.BController;
  6 +import com.bsth.controller.schedule.core.CarConfigInfoController_facade;
6 7 import com.bsth.entity.schedule.CarConfigInfo;
7 8 import com.bsth.entity.sys.CompanyAuthority;
8 9 import com.bsth.repository.schedule.CarConfigInfoRepository;
9 10 import com.bsth.service.schedule.CarConfigInfoService;
10 11 import com.bsth.service.schedule.exception.ScheduleException;
11 12 import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
12 14 import org.springframework.web.bind.annotation.RequestMapping;
13 15 import org.springframework.web.bind.annotation.RequestMethod;
14 16 import org.springframework.web.bind.annotation.RequestParam;
... ... @@ -24,6 +26,7 @@ import java.util.Map;
24 26 * Created by xu on 16/5/9.
25 27 */
26 28 @RestController
  29 +@ConditionalOnMissingBean(CarConfigInfoController_facade.class)
27 30 @RequestMapping("cci")
28 31 public class CarConfigInfoController extends BController<CarConfigInfo, Long> {
29 32 @Autowired
... ...
src/main/java/com/bsth/controller/schedule/core/EmployeeConfigInfoController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/EmployeeConfigInfoController.java
1   -package com.bsth.controller.schedule.core;
  1 +package com.bsth.controller.schedule.core.legacy;
2 2  
3 3 import com.bsth.common.Constants;
4 4 import com.bsth.common.ResponseCode;
5 5 import com.bsth.controller.schedule.BController;
  6 +import com.bsth.controller.schedule.core.EmployeeConfigInfoController_facade;
6 7 import com.bsth.entity.schedule.EmployeeConfigInfo;
7 8 import com.bsth.entity.sys.CompanyAuthority;
8 9 import com.bsth.repository.schedule.EmployeeConfigInfoRepository;
9 10 import com.bsth.service.schedule.EmployeeConfigInfoService;
10 11 import com.bsth.service.schedule.exception.ScheduleException;
11 12 import org.springframework.beans.factory.annotation.Autowired;
  13 +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
12 14 import org.springframework.web.bind.annotation.*;
13 15  
14 16 import javax.servlet.http.HttpServletRequest;
... ... @@ -21,6 +23,7 @@ import java.util.Map;
21 23 * Created by xu on 16/5/10.
22 24 */
23 25 @RestController
  26 +@ConditionalOnMissingBean(EmployeeConfigInfoController_facade.class)
24 27 @RequestMapping("eci")
25 28 public class EmployeeConfigInfoController extends BController<EmployeeConfigInfo, Long> {
26 29 @Autowired
... ...
src/main/java/com/bsth/controller/schedule/core/GuideboardInfoController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/GuideboardInfoController.java
1   -package com.bsth.controller.schedule.core;
  1 +package com.bsth.controller.schedule.core.legacy;
2 2  
3 3 import com.bsth.common.ResponseCode;
4 4 import com.bsth.controller.schedule.BController;
  5 +import com.bsth.controller.schedule.core.GuideboardInfoController_facade;
5 6 import com.bsth.entity.schedule.GuideboardInfo;
6 7 import com.bsth.repository.schedule.GuideboardInfoRepository;
7 8 import com.bsth.service.schedule.GuideboardInfoService;
8 9 import com.bsth.service.schedule.exception.ScheduleException;
9 10 import org.springframework.beans.factory.annotation.Autowired;
  11 +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
10 12 import org.springframework.web.bind.annotation.*;
11 13  
12 14 import java.util.HashMap;
... ... @@ -17,6 +19,7 @@ import java.util.Map;
17 19 * 路牌管理控制器。
18 20 */
19 21 @RestController
  22 +@ConditionalOnMissingBean(GuideboardInfoController_facade.class)
20 23 @RequestMapping("gic")
21 24 public class GuideboardInfoController extends BController<GuideboardInfo, Long> {
22 25 @Autowired
... ...
src/main/java/com/bsth/controller/schedule/core/RerunController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/RerunController.java
1   -package com.bsth.controller.schedule.core;
  1 +package com.bsth.controller.schedule.core.legacy;
2 2  
3 3 import com.bsth.controller.schedule.BController;
  4 +import com.bsth.controller.schedule.core.RerunController_facade;
4 5 import com.bsth.entity.schedule.rule.RerunRule;
  6 +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
5 7 import org.springframework.web.bind.annotation.RequestMapping;
6 8 import org.springframework.web.bind.annotation.RestController;
7 9  
... ... @@ -9,6 +11,7 @@ import org.springframework.web.bind.annotation.RestController;
9 11 * Created by xu on 16/10/20.
10 12 */
11 13 @RestController
  14 +@ConditionalOnMissingBean(RerunController_facade.class)
12 15 @RequestMapping("rms")
13 16 public class RerunController extends BController<RerunRule, Long> {
14 17  
... ...
src/main/java/com/bsth/controller/schedule/core/SchedulePlanController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/SchedulePlanController.java
1   -package com.bsth.controller.schedule.core;
  1 +package com.bsth.controller.schedule.core.legacy;
2 2  
3 3 import com.bsth.common.ResponseCode;
4 4 import com.bsth.controller.schedule.BController;
  5 +import com.bsth.controller.schedule.core.SchedulePlanController_facade;
5 6 import com.bsth.entity.schedule.SchedulePlan;
6 7 import com.bsth.service.schedule.SchedulePlanService;
7 8 import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
8 10 import org.springframework.web.bind.annotation.PathVariable;
9 11 import org.springframework.web.bind.annotation.RequestMapping;
10 12 import org.springframework.web.bind.annotation.RequestMethod;
  13 +import org.springframework.web.bind.annotation.RestController;
11 14  
12 15 import java.util.Date;
13 16 import java.util.HashMap;
... ... @@ -16,8 +19,9 @@ import java.util.Map;
16 19 /**
17 20 * Created by xu on 16/6/16.
18 21 */
19   -//@RestController
20   -//@RequestMapping("spc")
  22 +@RestController
  23 +@ConditionalOnMissingBean(SchedulePlanController_facade.class)
  24 +@RequestMapping("spc")
21 25 public class SchedulePlanController extends BController<SchedulePlan, Long> {
22 26 @Autowired
23 27 private SchedulePlanService schedulePlanService;
... ...
src/main/java/com/bsth/controller/schedule/core/SchedulePlanInfoController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/SchedulePlanInfoController.java
1   -package com.bsth.controller.schedule.core;
  1 +package com.bsth.controller.schedule.core.legacy;
2 2  
3 3 import com.bsth.common.ResponseCode;
4 4 import com.bsth.controller.schedule.BController;
  5 +import com.bsth.controller.schedule.core.SchedulePlanInfoController_facade;
5 6 import com.bsth.entity.schedule.SchedulePlanInfo;
6 7 import com.bsth.service.schedule.SchedulePlanInfoService;
7 8 import org.springframework.beans.factory.annotation.Autowired;
  9 +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
8 10 import org.springframework.web.bind.annotation.*;
9 11  
10 12 import java.util.Date;
... ... @@ -15,8 +17,9 @@ import java.util.Map;
15 17 /**
16 18 * Created by xu on 17/5/1.
17 19 */
18   -//@RestController
19   -//@RequestMapping("spic")
  20 +@RestController
  21 +@ConditionalOnMissingBean(SchedulePlanInfoController_facade.class)
  22 +@RequestMapping("spic")
20 23 public class SchedulePlanInfoController extends BController<SchedulePlanInfo, Long> {
21 24 @Autowired
22 25 private SchedulePlanInfoService schedulePlanInfoService;
... ...
src/main/java/com/bsth/controller/schedule/core/ScheduleRule1FlatController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/ScheduleRule1FlatController.java
1   -package com.bsth.controller.schedule.core;
  1 +package com.bsth.controller.schedule.core.legacy;
2 2  
3 3 import com.bsth.controller.schedule.BController;
  4 +import com.bsth.controller.schedule.core.ScheduleRule1FlatController_facade;
4 5 import com.bsth.entity.schedule.rule.ScheduleRule1Flat;
  6 +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
5 7 import org.springframework.web.bind.annotation.RequestMapping;
6 8 import org.springframework.web.bind.annotation.RestController;
7 9  
... ... @@ -9,6 +11,7 @@ import org.springframework.web.bind.annotation.RestController;
9 11 * Created by xu on 16/7/4.
10 12 */
11 13 @RestController
  14 +@ConditionalOnMissingBean(ScheduleRule1FlatController_facade.class)
12 15 @RequestMapping("sr1fc")
13 16 public class ScheduleRule1FlatController extends BController<ScheduleRule1Flat, Long> {
14 17  
... ...
src/main/java/com/bsth/controller/schedule/core/legacy/TTInfoBxDetailController.java 0 → 100644
  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/controller/schedule/core/TTInfoController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/TTInfoController.java
1   -package com.bsth.controller.schedule.core;
  1 +package com.bsth.controller.schedule.core.legacy;
2 2  
3 3 import com.bsth.common.ResponseCode;
4 4 import com.bsth.controller.schedule.BController;
  5 +import com.bsth.controller.schedule.core.TTInfoController_facade;
5 6 import com.bsth.entity.schedule.TTInfo;
6 7 import com.bsth.service.schedule.TTInfoService;
7 8 import com.bsth.service.schedule.exception.ScheduleException;
8 9 import org.springframework.beans.factory.annotation.Autowired;
  10 +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
9 11 import org.springframework.web.bind.annotation.*;
10 12  
11 13 import java.util.HashMap;
... ... @@ -14,7 +16,8 @@ import java.util.Map;
14 16 /**
15 17 * Created by xu on 16/12/20.
16 18 */
17   -@RestController(value = "tTInfoController_ec")
  19 +@RestController
  20 +@ConditionalOnMissingBean(TTInfoController_facade.class)
18 21 @RequestMapping(value = "tic_ec")
19 22 public class TTInfoController extends BController<TTInfo, Long> {
20 23 @Autowired
... ...
src/main/java/com/bsth/controller/schedule/core/TTInfoDetailController.java renamed to src/main/java/com/bsth/controller/schedule/core/legacy/TTInfoDetailController.java
1   -package com.bsth.controller.schedule.core;
  1 +package com.bsth.controller.schedule.core.legacy;
2 2  
3 3 import com.bsth.common.ResponseCode;
4 4 import com.bsth.controller.schedule.BController;
  5 +import com.bsth.controller.schedule.core.TTInfoDetailController_facade;
5 6 import com.bsth.entity.schedule.TTInfoDetail;
6 7 import com.bsth.service.schedule.TTInfoDetailService;
7 8 import com.bsth.service.schedule.datatools.TTInfoDetailForEdit;
... ... @@ -10,6 +11,7 @@ import com.bsth.service.schedule.timetable.ExcelFormatType;
10 11 import com.bsth.service.schedule.utils.DataToolsFile;
11 12 import com.bsth.service.schedule.utils.DataToolsFileType;
12 13 import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
13 15 import org.springframework.web.bind.annotation.*;
14 16  
15 17 import javax.servlet.http.HttpServletResponse;
... ... @@ -21,8 +23,9 @@ import java.util.Map;
21 23 /**
22 24 * Created by xu on 17/1/4.
23 25 */
24   -//@RestController
25   -//@RequestMapping("tidc")
  26 +@RestController
  27 +@ConditionalOnMissingBean(TTInfoDetailController_facade.class)
  28 +@RequestMapping("tidc")
26 29 public class TTInfoDetailController extends BController<TTInfoDetail, Long> {
27 30 @Autowired
28 31 private TTInfoDetailService ttInfoDetailService;
... ...
src/main/java/com/bsth/controller/sys/RoleController.java
... ... @@ -68,4 +68,14 @@ public class RoleController extends BaseController&lt;Role, Integer&gt;{
68 68 public Map<String, Object> roleInfo(@RequestParam Integer id){
69 69 return roleService.roleInfo(id);
70 70 }
  71 +
  72 + /**
  73 + * 检查操作合法性 操作的是否是下级角色
  74 + * @param operationRoleId 下级角色Id
  75 + * @return
  76 + */
  77 + @RequestMapping(value = "/checkOperationLegality")
  78 + public boolean checkOperationLegality(@RequestParam Integer operationRoleId){
  79 + return roleService.checkOperationLegality(operationRoleId);
  80 + }
71 81 }
... ...
src/main/java/com/bsth/controller/sys/UserController.java
... ... @@ -260,6 +260,15 @@ public class UserController extends BaseController&lt;SysUser, Integer&gt; {
260 260 public String changePWD(@RequestParam String oldPWD, @RequestParam String newPWD, @RequestParam String cnewPWD) {
261 261 SysUser sysUser = SecurityUtils.getCurrentUser();
262 262 String msg = "";
  263 +
  264 + //解密RSA
  265 + try{
  266 + oldPWD = (RSAUtils.decryptBase64(oldPWD));
  267 + newPWD = (RSAUtils.decryptBase64(newPWD));
  268 + cnewPWD = (RSAUtils.decryptBase64(cnewPWD));
  269 + }catch (RuntimeException e) {
  270 + return "网络延迟,解密失败,请重新添加!";
  271 + }
263 272 if (new BCryptPasswordEncoder(4).matches(oldPWD, sysUser.getPassword())) {
264 273 if (oldPWD.equals(newPWD)) {
265 274 msg = "新密码不能跟原始密码一样!";
... ... @@ -282,8 +291,16 @@ public class UserController extends BaseController&lt;SysUser, Integer&gt; {
282 291 return sysUserService.register(u);
283 292 }
284 293  
  294 + // 查询用户下所有下级角色
285 295 @RequestMapping(value = "/all_distinct")
286 296 public List<SysUser> findAll_distinct() {
287 297 return sysUserService.findAll_distinct();
288 298 }
  299 +
  300 + // 重置密码
  301 + @RequestMapping(value = "/resetPassword", method = RequestMethod.POST)
  302 + public Map<String, Object> resetPassword(@RequestParam Integer id) {
  303 + return sysUserService.resetPassword(id);
  304 + }
  305 +
289 306 }
... ...
src/main/java/com/bsth/data/ThreadMonotor.java
... ... @@ -2,6 +2,9 @@ package com.bsth.data;
2 2  
3 3 import com.bsth.data.gpsdata_v2.DataHandleProcess;
4 4 import com.bsth.data.gpsdata_v2.thread.GpsDataLoaderThread;
  5 +
  6 +import org.slf4j.Logger;
  7 +import org.slf4j.LoggerFactory;
5 8 import org.springframework.stereotype.Component;
6 9  
7 10 /**
... ... @@ -9,11 +12,15 @@ import org.springframework.stereotype.Component;
9 12 */
10 13 @Component
11 14 public class ThreadMonotor extends Thread{
  15 +
  16 + Logger logger = LoggerFactory.getLogger(this.getClass());
12 17  
13 18 @Override
14 19 public void run() {
15 20 //切换到备用的网关实时GPS对照数据
16   - if(DataHandleProcess.isBlock())
17   - GpsDataLoaderThread.setFlag(-1);
  21 + if(DataHandleProcess.isBlock()) {
  22 + GpsDataLoaderThread.setFlag(-1);
  23 + logger.error("切换到备用GPS数据源");
  24 + }
18 25 }
19 26 }
20 27 \ No newline at end of file
... ...
src/main/java/com/bsth/data/gpsdata_v2/DataHandleProcess.java
... ... @@ -4,6 +4,8 @@ import com.alibaba.fastjson.JSON;
4 4 import com.bsth.data.gpsdata_v2.cache.GpsCacheData;
5 5 import com.bsth.data.gpsdata_v2.entity.GpsEntity;
6 6 import com.bsth.data.gpsdata_v2.handlers.*;
  7 +import com.bsth.email.SendEmailController;
  8 +import com.bsth.email.entity.EmailBean;
7 9 import com.google.common.collect.ArrayListMultimap;
8 10 import org.apache.commons.lang3.StringUtils;
9 11 import org.slf4j.Logger;
... ... @@ -15,6 +17,8 @@ import java.util.*;
15 17 import java.util.concurrent.CountDownLatch;
16 18 import java.util.concurrent.ExecutorService;
17 19 import java.util.concurrent.Executors;
  20 +import java.util.concurrent.ThreadFactory;
  21 +import java.util.concurrent.TimeUnit;
18 22  
19 23 /**
20 24 * 实时信号数据处理
... ... @@ -37,13 +41,27 @@ public class DataHandleProcess {
37 41 ReverseRouteProcess reverseRouteProcess;
38 42 @Autowired
39 43 GpsRealData gpsRealData;
  44 + // 发送邮件
  45 + @Autowired
  46 + private SendEmailController sendEmailController;
40 47  
41 48  
42 49 static Logger logger = LoggerFactory.getLogger(DataHandleProcess.class);
43 50  
44 51 final static int POOL_SIZE = 20;
45 52  
46   - static ExecutorService threadPool = Executors.newFixedThreadPool(POOL_SIZE + 1);
  53 + static ExecutorService threadPool = Executors.newFixedThreadPool(POOL_SIZE + 1, new ThreadFactory() {
  54 +
  55 + @Override
  56 + public Thread newThread(Runnable r) {
  57 + // TODO Auto-generated method stub
  58 + Thread t = new Thread(r);
  59 + t.setName("GPSProcessor");
  60 +
  61 + return t;
  62 + }
  63 +
  64 + });
47 65 public static CountDownLatch count;
48 66  
49 67 static long lastTime;
... ... @@ -51,7 +69,22 @@ public class DataHandleProcess {
51 69 public static boolean isBlock() {
52 70 return System.currentTimeMillis() - lastTime > 1000 * 30;
53 71 }
54   -
  72 +
  73 + private void shutdownAndAwaitTermination(ExecutorService pool) {
  74 + pool.shutdown();
  75 + try {
  76 + if (!pool.awaitTermination(500, TimeUnit.MILLISECONDS)) {
  77 + pool.shutdownNow();
  78 + }
  79 + if (!pool.awaitTermination(500, TimeUnit.MILLISECONDS)) {
  80 + logger.error("线程池无法正常终止");
  81 + }
  82 + } catch (InterruptedException e) {
  83 + pool.shutdown();
  84 + Thread.currentThread().interrupt();
  85 + }
  86 + }
  87 +
55 88 public void handle(List<GpsEntity> list) {
56 89 try {
57 90 if (list.size() == 0)
... ... @@ -85,7 +118,32 @@ public class DataHandleProcess {
85 118  
86 119  
87 120 //等待子线程结束
88   - count.await();
  121 + boolean isNormal = count.await(5, TimeUnit.SECONDS);
  122 + if (!isNormal) {
  123 + try {
  124 + shutdownAndAwaitTermination(threadPool);
  125 + threadPool = Executors.newFixedThreadPool(POOL_SIZE + 1, new ThreadFactory() {
  126 +
  127 + @Override
  128 + public Thread newThread(Runnable r) {
  129 + // TODO Auto-generated method stub
  130 + Thread t = new Thread(r);
  131 + t.setName("GPSProcessor");
  132 +
  133 + return t;
  134 + }
  135 +
  136 + });
  137 + //发送邮件
  138 + EmailBean mail = new EmailBean();
  139 + mail.setSubject("线调GPS处理");
  140 + mail.setContent("GPS处理超时,检查线程栈文件信息<br/>");
  141 + sendEmailController.sendMail("113252620@qq.com", mail);
  142 + logger.info("DataHandlerProcess:邮件发送成功!");
  143 + } catch (Exception e){
  144 + logger.error("DataHandlerProcess:邮件发送失败!",e);
  145 + }
  146 + }
89 147  
90 148 //加入实时gps对照
91 149 for (GpsEntity gps : list)
... ... @@ -115,6 +173,7 @@ public class DataHandleProcess {
115 173 Collections.sort(list, comp);
116 174 GpsEntity gps;
117 175 for(int i = 0,len = list.size(); i< len ;i ++){
  176 + if (Thread.currentThread().isInterrupted()) break;
118 177 gps = list.get(i);
119 178  
120 179 try {
... ...
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/schedule/TTInfoBxDetail.java 0 → 100644
  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 0 → 100644
  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/calc/CalcWaybillRepository.java
... ... @@ -66,7 +66,10 @@ public interface CalcWaybillRepository extends BaseRepository&lt;CalcWaybill, Integ
66 66 @Query(value="select DISTINCT c from CalcWaybill c where c.xl like %?1% and c.rqStr between ?2 and ?3 and c.gsdm like %?4% and c.fgsdm like %?5% and CONCAT(sGh,'/',sName) like %?6% order by c.xl")
67 67 List<CalcWaybill> scheduleBySpy(String line,String date,String date2,String gsdm,String fgsdm,String spy);
68 68 //按照时间段统计,公司下线路 (车辆自编号)
69   - @Query(value="select DISTINCT c from CalcWaybill c where c.xl like %?1% and c.rqStr between ?2 and ?3 and c.gsdm like %?4% and c.fgsdm like %?5% and cl like %?6% order by c.xl")
  69 + @Query(value="select DISTINCT c from CalcWaybill c where c.xl like %?1% and c.rqStr between ?2 and ?3 and c.gsdm like %?4% and c.fgsdm like %?5% and c.cl like %?6% order by c.xl")
70 70 List<CalcWaybill> scheduleByZbh(String line,String date,String date2,String gsdm,String fgsdm,String zbh);
  71 + @Query(value="select DISTINCT c from CalcWaybill c where c.xl like %?1% and c.rqStr between ?2 and ?3 and c.gsdm like %?4% and c.fgsdm like %?5% and c.cl like %?6%"
  72 + + " and c.cl in (select s.carCode from Cars s where s.sfdc = ?7) order by c.xl")
  73 + List<CalcWaybill> scheduleByZbh(String line,String date,String date2,String gsdm,String fgsdm,String zbh,Boolean sfdc);
71 74  
72 75 }
... ...
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/schedule/TTInfoBxDetailRepository.java 0 → 100644
  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/calc/CalcMixService.java
... ... @@ -10,6 +10,6 @@ public interface CalcMixService {
10 10  
11 11 List<Map<String, Object>> calcjsyspy(String line, String startDate, String endDate, String cont, String empnames, String gsdmManth, String fgsdmManth);
12 12  
13   - List<Map<String, Object>> singledatatj(String line, String startDate, String endDate, String tjtype, String cont, String gsdmSing, String fgsdmSing);
  13 + List<Map<String, Object>> singledatatj(String line, String startDate, String endDate, String tjtype, String cont, String gsdmSing, String fgsdmSing, String sfdc);
14 14  
15 15 }
... ...
src/main/java/com/bsth/service/calc/impl/CalcMixServiceImpl.java
... ... @@ -160,7 +160,7 @@ public class CalcMixServiceImpl implements CalcMixService {
160 160 public List<Map<String, Object>> singledatatj(String line,
161 161 String date, String date2,
162 162 String tjtype, String cont,
163   - String gsdm, String fgsdm) {
  163 + String gsdm, String fgsdm, String sfdc) {
164 164  
165 165 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
166 166 List<CalcWaybill> list = null;
... ... @@ -174,7 +174,13 @@ public class CalcMixServiceImpl implements CalcMixService {
174 174 list = calcRepository.scheduleBySpy(line, date, date2, gsdm, fgsdm, cont);
175 175 } else if("车辆自编号".equals(tjtype)){
176 176 flag = 3;
177   - list = calcRepository.scheduleByZbh(line, date, date2, gsdm, fgsdm, cont);
  177 + if("1".equals(sfdc)){
  178 + list = calcRepository.scheduleByZbh(line, date, date2, gsdm, fgsdm, cont, true);
  179 + } else if("0".equals(sfdc)){
  180 + list = calcRepository.scheduleByZbh(line, date, date2, gsdm, fgsdm, cont, false);
  181 + } else {
  182 + list = calcRepository.scheduleByZbh(line, date, date2, gsdm, fgsdm, cont);
  183 + }
178 184 }
179 185  
180 186 List<CalcWaybill> calcList = new ArrayList<CalcWaybill>();
... ... @@ -267,7 +273,7 @@ public class CalcMixServiceImpl implements CalcMixService {
267 273 + linesql
268 274 + " union"
269 275 + " SELECT id,xlbm,nbbm,jsy,cdl as jzl,hd as yh,sh as sh,fgsdm FROM bsth_c_dlb"
270   - + " WHERE rq >= '"+date2+"' and rq <= '"+date2+"'"
  276 + + " WHERE rq >= '"+date+"' and rq <= '"+date2+"'"
271 277 + linesql;
272 278 List<Singledata> listNy = jdbcTemplate.query(nysql, new RowMapper<Singledata>() {
273 279 @Override
... ...
src/main/java/com/bsth/service/gps/GpsServiceImpl.java
... ... @@ -13,6 +13,7 @@ import java.text.DecimalFormat;
13 13 import java.text.ParseException;
14 14 import java.text.SimpleDateFormat;
15 15 import java.util.ArrayList;
  16 +import java.util.Arrays;
16 17 import java.util.Calendar;
17 18 import java.util.Collections;
18 19 import java.util.Comparator;
... ... @@ -1173,7 +1174,7 @@ public class GpsServiceImpl implements GpsService {
1173 1174 }
1174 1175 //过滤数据
1175 1176 for (SafeDriv sd : list) {
1176   - if (fieldEquals(fs, sd, map))
  1177 + if (isSpecialLines(sd, map) && fieldEquals(fs, sd, map))
1177 1178 rs.add(sd);
1178 1179 }
1179 1180  
... ... @@ -1294,6 +1295,20 @@ public class GpsServiceImpl implements GpsService {
1294 1295 }
1295 1296 });
1296 1297 }
  1298 +
  1299 + /**
  1300 + *
  1301 + * @param sd
  1302 + * @param map
  1303 + * @return
  1304 + */
  1305 + public boolean isSpecialLines(SafeDriv sd, Map<String, Object> map) {
  1306 + String lines = (String)map.get("lines");
  1307 + if (lines == null) lines = "";
  1308 +
  1309 + if (Arrays.asList(lines.split(",")).contains(sd.getXlbm())) return true;
  1310 + return false;
  1311 + }
1297 1312  
1298 1313 public boolean fieldEquals(List<Field> fs, Object obj, Map<String, Object> map) {
1299 1314 try {
... ...
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/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/schedule/TTInfoBxDetailService.java 0 → 100644
  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/datatools/TTInfoDetailDataToolsImpl.java
... ... @@ -348,7 +348,7 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
348 348 for (int r = 1; r < sheet.getRows(); r++) {
349 349 List<FcInfo> fcInfos = new ArrayList<>();
350 350 // 每行第一列都是路牌
351   - fcInfos.add(new FcInfo(null, null, sheet.getCell(0, r).getContents(), null, null, null, null, null)); // 用fcsj放置路牌显示
  351 + fcInfos.add(new FcInfo(null, null, sheet.getCell(0, r).getContents(), null, null, null, null, null, null)); // 用fcsj放置路牌显示
352 352  
353 353 int bc_ks = 0; // 空驶班次
354 354 int bc_yy = 0; // 营运班次
... ... @@ -373,7 +373,9 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
373 373  
374 374 String ists = content == null ? "" : content[9]; // 是否停驶
375 375  
376   - FcInfo fcInfo = new FcInfo(ttdid_str, bctype, fcsj, xldir, isfb, qdzCode, zdzCode, ists);
  376 + String bcsj = content == null ? "" : content[10]; // 班次时间
  377 +
  378 + FcInfo fcInfo = new FcInfo(ttdid_str, bctype, fcsj, xldir, isfb, qdzCode, zdzCode, ists, bcsj);
377 379  
378 380 if (StringUtils.isNotEmpty(fzdname))
379 381 headarrays[c] = fzdname;
... ... @@ -407,10 +409,10 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail
407 409 }
408 410  
409 411 // 添加一列 空驶班次/空驶里程,fcsj放置数据
410   - fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_ks, lc_ks), null, null, null, null, null));
  412 + fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_ks, lc_ks), null, null, null, null, null, null));
411 413  
412 414 // 添加一列 营运班次/营运里程,fcsj放置数据
413   - fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_yy, lc_yy), null, null, null, null, null));
  415 + fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_yy, lc_yy), null, null, null, null, null, null));
414 416  
415 417 editInfo.getContents().add(fcInfos);
416 418 }
... ...
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailForEdit.java
... ... @@ -31,6 +31,8 @@ public interface TTInfoDetailForEdit {
31 31 private String zdzCode;
32 32 /** 是否停驶 */
33 33 private Boolean ists;
  34 + /** 班次时间 */
  35 + private String bcsj;
34 36  
35 37 public FcInfo() {
36 38 }
... ... @@ -43,7 +45,8 @@ public interface TTInfoDetailForEdit {
43 45 String isfb,
44 46 String qdzCode,
45 47 String zdzCode,
46   - String ists) {
  48 + String ists,
  49 + String bcsj) {
47 50 this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str);
48 51 this.bc_type = bc_type;
49 52 this.fcsj = fcsj;
... ... @@ -69,6 +72,10 @@ public interface TTInfoDetailForEdit {
69 72 else
70 73 this.ists = false;
71 74  
  75 + if (StringUtils.isNotEmpty(bcsj) && !"null".equals(bcsj)) {
  76 + this.bcsj = bcsj;
  77 + }
  78 +
72 79 }
73 80  
74 81 public Long getTtdid() {
... ... @@ -134,6 +141,14 @@ public interface TTInfoDetailForEdit {
134 141 public void setIsts(Boolean ists) {
135 142 this.ists = ists;
136 143 }
  144 +
  145 + public String getBcsj() {
  146 + return bcsj;
  147 + }
  148 +
  149 + public void setBcsj(String bcsj) {
  150 + this.bcsj = bcsj;
  151 + }
137 152 }
138 153  
139 154 /**
... ...
src/main/java/com/bsth/service/schedule/impl/TTInfoBxDetailServiceImpl.java 0 → 100644
  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/service/schedule/impl/plan/kBase3/validate/timetable/ErrorBcCountFunction.java
... ... @@ -59,10 +59,16 @@ public class ErrorBcCountFunction implements AccumulateFunction {
59 59 return;
60 60 }
61 61  
  62 + // 判定条件(数据库中的对应字段没有非空约束),与界面saTimeTable.js的validInfo方法对应
  63 + // 1、起点站编码,名字为空
  64 + // 2、终点站编码,名字为空
  65 + // 3、班次时间
  66 + // TODO:其他再议
62 67 if (StringUtils.isEmpty(ttInfoDetail.getQdzCode()) ||
63 68 StringUtils.isEmpty(ttInfoDetail.getQdzName()) ||
64 69 StringUtils.isEmpty(ttInfoDetail.getZdzCode()) ||
65   - StringUtils.isEmpty(ttInfoDetail.getZdzName()) ) {
  70 + StringUtils.isEmpty(ttInfoDetail.getZdzName()) ||
  71 + (ttInfoDetail.getBcsj() == null) ) {
66 72  
67 73 errorCountData.errorcount ++;
68 74 }
... ...
src/main/java/com/bsth/service/sys/RoleService.java
1 1 package com.bsth.service.sys;
2 2  
3   -import java.util.List;
4   -import java.util.Map;
5   -
6 3 import com.bsth.entity.sys.Role;
7   -import com.bsth.entity.sys.SysUser;
8 4 import com.bsth.service.BaseService;
9 5  
  6 +import java.util.List;
  7 +import java.util.Map;
  8 +
10 9 public interface RoleService extends BaseService<Role, Integer>{
11 10  
12 11 Map<String, Object> findSubordinate();
... ... @@ -18,4 +17,6 @@ public interface RoleService extends BaseService&lt;Role, Integer&gt;{
18 17 Map<String, Object> roleInfo(Integer id);
19 18  
20 19 List<Role> findAllByIds(String ids);
  20 +
  21 + boolean checkOperationLegality(Integer operationRoleId);
21 22 }
... ...
src/main/java/com/bsth/service/sys/SysUserService.java
... ... @@ -2,6 +2,7 @@ package com.bsth.service.sys;
2 2  
3 3 import com.bsth.entity.sys.SysUser;
4 4 import com.bsth.service.BaseService;
  5 +import org.springframework.web.bind.annotation.RequestParam;
5 6  
6 7 import java.util.List;
7 8 import java.util.Map;
... ... @@ -17,4 +18,6 @@ public interface SysUserService extends BaseService&lt;SysUser, Integer&gt;{
17 18 Map<String,Object> register(SysUser u);
18 19  
19 20 List<SysUser> findAll_distinct();
  21 +
  22 + Map<String, Object> resetPassword(@RequestParam Integer id);
20 23 }
... ...
src/main/java/com/bsth/service/sys/impl/RoleServiceImpl.java
... ... @@ -96,8 +96,10 @@ public class RoleServiceImpl extends BaseServiceImpl&lt;Role, Integer&gt; implements
96 96 // ComparatorSysrole(rootlist);
97 97 map.put("list", rsRoleList);
98 98 map.put("status", ResponseCode.SUCCESS);
  99 + map.put("msg", "成功");
99 100 } catch (Exception e) {
100 101 map.put("status", ResponseCode.ERROR);
  102 + map.put("msg", e);
101 103 logger.error("error",e);
102 104 }
103 105 return map;
... ... @@ -282,4 +284,12 @@ public class RoleServiceImpl extends BaseServiceImpl&lt;Role, Integer&gt; implements
282 284 public List<Role> findAllByIds(String ids) {
283 285 return roleRepository.findAllById(ids);
284 286 }
  287 +
  288 + @Override
  289 + public boolean checkOperationLegality(Integer operationRoleId){
  290 + boolean isLegality = false;
  291 + Map<String, Object> roleMap = findSubordinate();
  292 + isLegality = (roleMap.get(operationRoleId) == null ? true:false );
  293 + return isLegality;
  294 + }
285 295 }
... ...
src/main/java/com/bsth/service/sys/impl/SysUserServiceImpl.java
1 1 package com.bsth.service.sys.impl;
2 2  
3   -import com.alibaba.fastjson.JSONArray;
4 3 import com.bsth.common.ResponseCode;
  4 +import com.bsth.controller.sys.util.RSAUtils;
5 5 import com.bsth.entity.sys.Role;
6 6 import com.bsth.entity.sys.SysUser;
7 7 import com.bsth.repository.sys.SysUserRepository;
... ... @@ -16,6 +16,7 @@ import org.slf4j.LoggerFactory;
16 16 import org.springframework.beans.factory.annotation.Autowired;
17 17 import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
18 18 import org.springframework.stereotype.Service;
  19 +import org.springframework.web.bind.annotation.RequestParam;
19 20  
20 21 import java.util.ArrayList;
21 22 import java.util.HashMap;
... ... @@ -65,20 +66,45 @@ public class SysUserServiceImpl extends BaseServiceImpl&lt;SysUser, Integer&gt; implem
65 66 @Override
66 67 public Map<String, Object> register(SysUser u) {
67 68 Map<String, Object> rs = new HashMap();
68   - try{
69   - //检查用户名是否存在
70   - if(findByUserName(u.getUserName()) != null){
  69 + boolean isLegality = false;
  70 + Iterator<Role> itRole = u.getRoles().iterator();
  71 + Role ro = new Role();
  72 + while(itRole.hasNext()){//判断是否有下一个
  73 + ro = itRole.next();
  74 + if(roleService.checkOperationLegality(ro.getId())){
  75 + isLegality = true;
  76 + } else {
71 77 rs.put("status", ResponseCode.ERROR);
72   - rs.put("msg", "用户名" + u.getUserName() + "已存在!");
  78 + rs.put("msg", "用户权限不够,请联系管理员!");
  79 + return rs;
73 80 }
74   - else{
75   - u.setPassword(new BCryptPasswordEncoder(4).encode(u.getPassword()));
76   - rs = super.save(u);
  81 + }
  82 + if(isLegality){
  83 + try{
  84 + //解密RSA
  85 + try{
  86 + u.setUserName(RSAUtils.decryptBase64(u.getUserName()));
  87 + u.setPassword(RSAUtils.decryptBase64(u.getPassword()));
  88 + }catch (RuntimeException e) {
  89 + rs.put("msg", "网络延迟,解密失败,请重新添加!");
  90 + }
  91 + //检查用户名是否存在
  92 + if(findByUserName(u.getUserName()) != null){
  93 + rs.put("status", ResponseCode.ERROR);
  94 + rs.put("msg", "用户名" + u.getUserName() + "已存在!");
  95 + }
  96 + else{
  97 + u.setPassword(new BCryptPasswordEncoder(4).encode(u.getPassword()));
  98 + rs = super.save(u);
  99 + }
  100 + }catch (Exception e){
  101 + logger.error("", e);
  102 + rs.put("status", ResponseCode.ERROR);
  103 + rs.put("msg", e.getMessage());
77 104 }
78   - }catch (Exception e){
79   - logger.error("", e);
  105 + }else {
80 106 rs.put("status", ResponseCode.ERROR);
81   - rs.put("msg", e.getMessage());
  107 + rs.put("msg", "用户权限不够,请联系管理员!");
82 108 }
83 109 return rs;
84 110 }
... ... @@ -122,8 +148,36 @@ public class SysUserServiceImpl extends BaseServiceImpl&lt;SysUser, Integer&gt; implem
122 148 } catch (Exception e){
123 149 logger.error("error", e);
124 150 }
125   -
126   -
127 151 return rsList;
128 152 }
  153 +
  154 + @Override
  155 + public Map<String, Object> resetPassword(@RequestParam Integer id){
  156 + Map<String, Object> rs = new HashMap();
  157 + try{
  158 + // 获取当前用户
  159 + SysUser user = SecurityUtils.getCurrentUser();
  160 + Iterator<Role> itRole = user.getRoles().iterator();
  161 + Role ro = new Role();
  162 + boolean Legality = false;
  163 + while(itRole.hasNext()){//判断是否有下一个
  164 + ro = itRole.next();
  165 + if(ro.getLevel() == 1)
  166 + Legality = true;
  167 + }
  168 + if(Legality){
  169 + sysUserRepository.changePWD(id,new BCryptPasswordEncoder(4).encode("123456"));
  170 + rs.put("status", ResponseCode.SUCCESS);
  171 + rs.put("msg", "密码重置成功!");
  172 + }else {
  173 + rs.put("status", ResponseCode.ERROR);
  174 + rs.put("msg", "您不是超级管理员无权限重置其他用户密码");
  175 + }
  176 + }catch (Exception e){
  177 + logger.error("", e);
  178 + rs.put("status", ResponseCode.ERROR);
  179 + rs.put("msg", e.getMessage());
  180 + }
  181 + return rs;
  182 + }
129 183 }
... ...
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/application-dev.properties
... ... @@ -13,8 +13,8 @@ spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
13 13 spring.jpa.database= MYSQL
14 14 spring.jpa.show-sql= true
15 15 spring.datasource.driver-class-name= com.mysql.jdbc.Driver
16   -#spring.datasource.url= jdbc:mysql://127.0.0.1/test_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
17   -spring.datasource.url= jdbc:mysql://192.168.168.222/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
  16 +spring.datasource.url= jdbc:mysql://127.0.0.1/test_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
  17 +#spring.datasource.url= jdbc:mysql://192.168.168.222/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
18 18 spring.datasource.username= root
19 19 spring.datasource.password=
20 20 #spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false
... ...
src/main/resources/application-prod.properties
... ... @@ -3,7 +3,7 @@ server.port=9088
3 3 #management.address= 127.0.0.1
4 4 management.security.enabled=false
5 5 management.context-path=/manage
6   -dubbo.use=true
  6 +dubbo.use=false
7 7  
8 8 spring.jpa.hibernate.ddl-auto= update
9 9 spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
... ...
src/main/resources/datatools/config-prod.properties
... ... @@ -5,11 +5,11 @@ datatools.kettle_properties=/datatools/kettle.properties
5 5 # 2、ktr文件通用配置变量(数据库连接,根据不同的环境需要修正)
6 6  
7 7 #数据库ip地址
8   -datatools.kvars_dbip=10.10.150.20
  8 +datatools.kvars_dbip=10.10.200.121
9 9 #数据库用户名
10 10 datatools.kvars_dbuname=root
11 11 #数据库密码
12   -datatools.kvars_dbpwd=root2jsp@JSP
  12 +datatools.kvars_dbpwd=root2jsp
13 13 #数据库库名
14 14 datatools.kvars_dbdname=control
15 15  
... ...
src/main/resources/datatools/ktrs/ttinfodetailoutputforedit.ktr
... ... @@ -218,6 +218,102 @@
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>
221 317 <name>xlab_mysql_youle</name>
222 318 <server>101.231.124.8</server>
223 319 <type>MYSQL</type>
... ... @@ -296,6 +392,102 @@
296 392 <attribute><code>USE_POOLING</code><attribute>N</attribute></attribute>
297 393 </attributes>
298 394 </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>
299 491 <order>
300 492 <hop> <from>&#x5217;&#x8f6c;&#x884c;</from><to>&#x53bb;&#x9664;&#x5b57;&#x6bb5;</to><enabled>Y</enabled> </hop>
301 493 <hop> <from>&#x53bb;&#x9664;&#x5b57;&#x6bb5;</from><to>Excel&#x8f93;&#x51fa;</to><enabled>Y</enabled> </hop>
... ... @@ -3892,7 +4084,7 @@
3892 4084 <optimizationLevel>9</optimizationLevel>
3893 4085 <jsScripts> <jsScript> <jsScript_type>0</jsScript_type>
3894 4086 <jsScript_name>Script 1</jsScript_name>
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>
  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>
3896 4088 </jsScript> </jsScripts> <fields> <field> <name>all_content</name>
3897 4089 <rename>all_content</rename>
3898 4090 <type>String</type>
... ... @@ -3964,7 +4156,7 @@
3964 4156 <schema_name/>
3965 4157 </partitioning>
3966 4158 <connection>bus_control_variable</connection>
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>
  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>
3968 4160 <limit>0</limit>
3969 4161 <lookup>&#x83b7;&#x53d6;&#x53d8;&#x91cf;</lookup>
3970 4162 <execute_each_row>N</execute_each_row>
... ...
src/main/resources/dubbo/applicationContext_dubbo_consumer.xml deleted 100644 → 0
1   -<?xml version="1.0" encoding="UTF-8"?>
2   -<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
3   - xsi:schemaLocation="http://www.springframework.org/schema/beans
4   - http://www.springframework.org/schema/beans/spring-beans.xsd
5   - http://code.alibabatech.com/schema/dubbo
6   - http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
7   -
8   - <!-- 消费方应用名,用于计算依赖关系,不是匹配条件,不要与提供方一样 -->
9   - <dubbo:application name="bsth_control_v2" />
10   -
11   - <!-- 使用zookeeper注册中心暴露服务地址 -->
12   - <!-- 注册中心地址 -->
13   - <dubbo:registry protocol="zookeeper" address="127.0.0.1:2181" check="false" />
14   -
15   - <!-- 时刻表班型明细服务 -->
16   - <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoBxDetailServiceFacade" id="tTInfoBxDetailServiceFacadeImpl" check="false" />
17   - <!-- 时刻表明细服务 -->
18   - <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.timetable.TTInfoDetailServiceFacade" id="tTInfoDetailServiceFacadeImpl" check="false" />
19   - <!-- 日志服务 -->
20   - <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.log.LogServiceFacade" id="logServiceFacadeImpl" check="false" />
21   -
22   - <!-- TODO:还有其他排班计划服务 -->
23   - <!-- 排班计划查询服务 -->
24   - <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.PlanServiceFacade" id="planServiceFacadeImpl" check="false" />
25   - <!-- 排班明细查询服务 -->
26   - <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.PlanInfoServiceFacade" id="planInfoServiceFacadeImpl" check="false" />
27   - <!-- 排班前置验证服务 -->
28   - <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.validate.PlanPreValidateFacade" id="planPreValidateFacadeImpl" check="false" />
29   - <!-- 排班生成服务 -->
30   - <dubbo:reference interface="com.bsth.control_v2.plan_module.common.service.schedule.PlanGenerateFacade" ref="planGenerateFacadeImpl" check="false" />
31   -
32   -</beans>
33 0 \ No newline at end of file
src/main/resources/dubbo/config-dev.properties
1 1 # application名字
2   -spring.dubbo.application.name=bsth_control_v2
  2 +spring.dubbo.application.name=bsth_control_v_multi_service
3 3 # zookeeper注册中心地址
4 4 spring.dubbo.registry=zookeeper://127.0.0.1:2181
5 5  
... ... @@ -10,4 +10,4 @@ spring.dubbo.consumer.timeout=1800000
10 10 spring.dubbo.consumer.retries=0
11 11 #----------- dubbo:consumer 服务治理选项 -------------#
12 12 # 启动不检查提供者是否存在
13   -spring.dubbo.consumer.check=false
14 13 \ No newline at end of file
  14 +spring.dubbo.consumer.check=false
... ...
src/main/resources/dubbo/config-prod.properties
1 1 # application名字
2   -spring.dubbo.application.name=bsth_control_v2
  2 +spring.dubbo.application.name=bsth_control_v_multi_service
3 3 # zookeeper注册中心地址
4 4 spring.dubbo.registry=zookeeper://127.0.0.1:2181
5 5  
... ...
src/main/resources/logback.xml
... ... @@ -72,7 +72,7 @@
72 72 </rollingPolicy>
73 73  
74 74 <layout class="ch.qos.logback.classic.PatternLayout">
75   - <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%file:%line] %-5level -%msg%n
  75 + <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%file:%line] %-5level -%msg%n
76 76 </pattern>
77 77 </layout>
78 78 </appender>
... ... @@ -102,7 +102,7 @@
102 102 </rollingPolicy>
103 103  
104 104 <layout class="ch.qos.logback.classic.PatternLayout">
105   - <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%file:%line] %-5level -%msg%n
  105 + <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%file:%line] %-5level -%msg%n
106 106 </pattern>
107 107 </layout>
108 108 </appender>
... ... @@ -124,7 +124,7 @@
124 124 </rollingPolicy>
125 125  
126 126 <layout class="ch.qos.logback.classic.PatternLayout">
127   - <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%file:%line] %-5level -%msg%n
  127 + <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%file:%line] %-5level -%msg%n
128 128 </pattern>
129 129 </layout>
130 130 </appender>
... ... @@ -141,7 +141,7 @@
141 141 </rollingPolicy>
142 142  
143 143 <layout class="ch.qos.logback.classic.PatternLayout">
144   - <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%file:%line] %-5level -%msg%n
  144 + <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%file:%line] %-5level -%msg%n
145 145 </pattern>
146 146 </layout>
147 147 </appender>
... ... @@ -213,7 +213,7 @@
213 213 </rollingPolicy>
214 214  
215 215 <layout class="ch.qos.logback.classic.PatternLayout">
216   - <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%file:%line] %-5level -%msg%n
  216 + <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%file:%line] %-5level -%msg%n
217 217 </pattern>
218 218 </layout>
219 219 </appender>
... ... @@ -235,7 +235,7 @@
235 235 </rollingPolicy>
236 236  
237 237 <layout class="ch.qos.logback.classic.PatternLayout">
238   - <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%file:%line] %-5level -%msg%n
  238 + <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] [%file:%line] %-5level -%msg%n
239 239 </pattern>
240 240 </layout>
241 241 </appender>
... ...
src/main/resources/static/index.html
... ... @@ -630,9 +630,11 @@
630 630 <script
631 631 src="http://webapi.amap.com/maps?v=1.3&key=16cb1c5043847e09ef9edafdd77befda"
632 632 data-exclude=1></script>
633   -<!-- echarts4 误删 -->
  633 +<!-- echarts4 -->
634 634 <script src="/metronic_v4.5.4/plugins/echarts4/echarts.min.js"></script>
635 635 <script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" merge="plugins"></script>
  636 +<!-- RSA加密 -->
  637 +<script src="/assets/plugins/jsencrypt.min.js"></script>
636 638  
637 639 </body>
638 640 </html>
639 641 \ No newline at end of file
... ...
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/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/forms/calc/calcsingledata.html
... ... @@ -40,6 +40,14 @@
40 40 <span class="item-label" style="width: 80px;">线路: </span>
41 41 <select class="form-control" name="line" id="line" style="width: 140px;"></select>
42 42 </div>
  43 + <div style="display: inline-block; margin-left: 18px;" id="sfdcDiv">
  44 + <span class="item-label" style="width: 80px;">是否电车: </span>
  45 + <select class="form-control form-filter " name="sfdc" id="sfdc">
  46 + <option value="">请选择...</option>
  47 + <option value="0">否</option>
  48 + <option value="1">是</option>
  49 + </select>
  50 + </div>
43 51 <div style="margin-top: 10px"></div>
44 52 <div style="display: inline-block;margin-left: 3px;">
45 53 <span class="item-label" style="width: 140px;">开始时间: </span>
... ... @@ -99,13 +107,10 @@
99 107 // 关闭左侧栏
100 108 if (!$('body').hasClass('page-sidebar-closed'))
101 109 $('.menu-toggler.sidebar-toggler').click();
102   -
103   - $("#startDate,#endDate").datetimepicker({
104   - format : 'YYYY-MM-DD',
105   - locale : 'zh-cn'
106   - });
  110 +
107 111  
108 112 var d = new Date();
  113 + d.setTime(d.getTime() - 4*1000*60*60*24);
109 114 var year = d.getFullYear();
110 115 var month = d.getMonth() + 1;
111 116 var day = d.getDate();
... ... @@ -113,7 +118,20 @@
113 118 month = "0" + month;
114 119 if(day < 10)
115 120 day = "0" + day;
116   - $("#startDate,#endDate").val(year + "-" + month + "-" + day);
  121 + var dateTime = year + "-" + month + "-" + day;
  122 + $("#startDate").datetimepicker({
  123 + format : 'YYYY-MM-DD',
  124 + locale : 'zh-cn',
  125 + maxDate : dateTime
  126 + });
  127 + $("#endDate").datetimepicker({
  128 + format : 'YYYY-MM-DD',
  129 + locale : 'zh-cn',
  130 + maxDate : dateTime
  131 + });
  132 + $("#startDate").val(dateTime);
  133 + $("#endDate").val(dateTime);
  134 +
117 135  
118 136 var fage=false;
119 137 var xlList;
... ... @@ -193,6 +211,8 @@
193 211 }
194 212 });
195 213  
  214 + $("#sfdcDiv").hide();
  215 +
196 216 var cont = "驾驶员", cont1 = "", cont2 = "", cont3 = "";
197 217 $("#tjtype").on("change",function(){
198 218 if(cont == "驾驶员"){
... ... @@ -205,10 +225,13 @@
205 225 cont = $("#tjtype").val();
206 226 if($("#tjtype").val() == "驾驶员"){
207 227 $("#cont").val(cont1);
  228 + $("#sfdcDiv").hide();
208 229 } else if($("#tjtype").val() == "售票员"){
209 230 $("#cont").val(cont2);
  231 + $("#sfdcDiv").hide();
210 232 } else if($("#tjtype").val() == "车辆自编号"){
211 233 $("#cont").val(cont3);
  234 + $("#sfdcDiv").show();
212 235 }
213 236 });
214 237  
... ... @@ -229,9 +252,10 @@
229 252 var fgsdmSing = $("#fgsdmSing").val();
230 253 var tjtype=$("#tjtype").val();
231 254 var cont=$("#cont").val();
  255 + var sfdc=$("#sfdc").val();
232 256 var params = {};
233 257 var i = layer.load(2);
234   - $get("/calc_mix/singledatatj",{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,cont:cont},function(result){
  258 + $get("/calc_mix/singledatatj",{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,cont:cont,sfdc:sfdc},function(result){
235 259 layer.close(i);
236 260 var singledata = template('singledata',{list:result});
237 261 // 把渲染好的模版html文本追加到表格中
... ... @@ -247,11 +271,12 @@
247 271 var fgsdmSing = $("#fgsdmSing").val();
248 272 var tjtype=$("#tjtype").val();
249 273 var cont=$("#cont").val();
  274 + var sfdc=$("#sfdc").val();
250 275 var lineName = $('#line option:selected').text();
251 276 if(lineName == "全部线路")
252 277 lineName = $('#fgsdmSing option:selected').text();
253 278 var i = layer.load(2);
254   - $get('/calc_export/singledataExportTj',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,cont:cont,type:'export',lineName:lineName},function(result){
  279 + $get('/calc_export/singledataExportTj',{gsdmSing:gsdmSing,fgsdmSing:fgsdmSing,line:line,startDate:startDate,endDate:endDate,tjtype:tjtype,cont:cont,sfdc:sfdc,type:'export',lineName:lineName},function(result){
255 280 var dateTime = "";
256 281 if(startDate == endDate){
257 282 dateTime = moment(startDate).format("YYYYMMDD");
... ...
src/main/resources/static/pages/forms/export/import_Jygl.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/home.html
... ... @@ -59,41 +59,13 @@
59 59 }
60 60 </style>
61 61 <div class="system_change_log">
62   - <h2 style="text-indent: 35px;margin: 10px 0 5px;">2019-04-11 更新说明 Changelog</h2>
  62 + <h2 style="text-indent: 35px;margin: 10px 0 5px;">2020-03-12 更新说明 Changelog</h2>
63 63 <br><br>
64 64 <ul >
65 65 <li class="sub_title"><h6>权限管理</h6></li>
66   - <li><span class="label s_c_change">修复</span>1、编辑某一个员工,用户、角色和授权管理设置在同一界面。</li>
67   - <li><span class="label s_c_change">新增</span>2、用户增加一项状态,显示主调、监控和作废。</li>
  66 + <li><span class="label s_c_change">修改</span>1、密码修改加入密码复杂度校验机制</li>
68 67 <li class="sub_title"><h6>线调</h6></li>
69   - <li><span class="label s_c_change">新增</span>1、少量班次对换完成用颜色标记为已换。</li>
70   - <li><span class="label s_c_change">新增</span>2、子任务可最小化。</li>
71   - <li><span class="label s_c_change">修复</span>3、修正子任务一个备注栏原因选择后其他子任务都会同步备注此原因。</li>
72   - <li><span class="label s_c_change">修复</span>4、轨迹回放只显示当前一段时间内的gps走向,已轨迹回放的走向自动不显示(只显示当前上下行的gps走向)。</li>
73   - <li><span class="label s_c_change">修复</span>5、轨迹回放播放速度添加更多倍速播放可选。</li>
74   - <li><span class="label s_c_change">新增</span>6、"线路配置"分割成"线路配置"、"翻班与自动执行",可独立授权。</li>
75   - <li><span class="label s_c_change">新增</span>7、添加设置,选择是否显示应到实到误差时间。</li>
76   - <li><span class="label s_c_change">修复</span>8、无发有到时间 为紫色完成状态,改为显眼颜色区分,用橙色区分。</li>
77   - <li><span class="label s_c_change">修复</span>9、轨迹回放中根据时间点切换线路版本信息。</li>
78   - <li><span class="label s_c_change">修复</span>10、路牌对调连续请求造成数据不一致,翻班时无法清楚前日的排班数据。</li>
79   - <li class="sub_title"><h6>计划调度</h6></li>
80   - <li><span class="label s_c_change">修复</span>1、车辆报废,释放设备编号后在设备管理里添加一条设备替换记录。</li>
81   - <li><span class="label s_c_change">修复</span>2、线路值勤日报,修改班次时,跨线路修改班次车提示报警。</li>
82   - <li><span class="label s_c_change">修复</span>3、增加公司,分公司查询条件,公司,分公司,线路都是跟登录用户权限的,导出的数据和查询条件一致。</li>
83   - <li><span class="label s_c_change">修复</span>4、排班时,页面添加规则逻辑判定。</li>
84   - <li><span class="label s_c_change">修复</span>5、车辆导出修正,导出内容和权限匹配,和搜索条件匹配。</li>
85   - <li><span class="label s_c_change">新增</span>6、所有的页面搜索添加排序选项功能。</li>
86   - <li><span class="label s_c_change">新增</span>7、新增计划排班预览功能。</li>
87   - <li class="sub_title"><h6>统计报表</h6></li>
88   - <li><span class="label s_c_change">新增</span>1、新增早高峰出车报表。</li>
89   - <li><span class="label s_c_change">新增</span>2、新增调度日报(待发对比) 报表。</li>
90   - <li><span class="label s_c_change">新增</span>3、新增路单数据统计报表。</li>
91   - <li><span class="label s_c_change">修复</span>4、修正班次车辆人员日报表中的售票员统计。</li>
92   - <li class="sub_title"><h6>基础信息</h6></li>
93   - <li><span class="label s_c_change">修复</span>1、线路版本:待更新状态增加删除功能,历史版本取消修改功能。</li>
94   - <li><span class="label s_c_change">修复</span>2、线路信息-站点详情列-详情页面-站点修改功能:站点修改多边形功能修改,站点中心点可以移动。</li>
95   - <li class="sub_title"><h6>用油管理</h6></li>
96   - <li><span class="label s_c_change">修复</span>1、修正加油人员不符保存后不在显示。</li>
  68 + <li><span class="label s_c_change">新增</span>1、线调页面新增维修上报功能</li>
97 69 </ul>
98 70  
99 71 </div>
... ...
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/permission/user/add.html
... ... @@ -42,7 +42,7 @@
42 42 <label class="col-md-3 control-label">密码</label>
43 43 <div class="col-md-4">
44 44 <input type="password" class="form-control" id="password" name="password" >
45   - <span class="help-block"> 请输入6位以上密码</span>
  45 + <!--<span class="help-block"> 请输入6位以上密码</span>-->
46 46 </div>
47 47 </div>
48 48 <div class="form-group">
... ... @@ -100,18 +100,46 @@
100 100 });
101 101 });*/
102 102  
103   - // 查询下级角色
  103 + // 查询下级角色
104 104 $.get('/role/findSubordinate', function (rs) {
105 105 if(rs.status == "SUCCESS"){
  106 + if(rs.list.length < 1){
  107 + loadPage('/pages/permission/role/add.html');
  108 + layer.open({
  109 + // type: 2,
  110 + content: '用户需要有下级角色才能添加用户!',
  111 + title: '请添加下级角色',
  112 + shift: 5,
  113 + scrollbar: false
  114 + });
  115 + return;
  116 + }
  117 +
106 118 $.each(rs.list,function(i,obj){
107 119 $("#role").append("<option value='"+obj.id+"'>"+obj.roleName+"</option>");
108 120 });
  121 + }else {
  122 + loadPage('/pages/permission/role/list.html');
  123 + layer.open({
  124 + // type: 2,
  125 + content: rs.msg,
  126 + title: "用户的下级角色有问题",
  127 + shift: 5,
  128 + scrollbar: false
  129 + });
109 130 }
110 131 });
  132 +
111 133  
112 134 var form = $('#user_add_form');
113 135 var error = $('.alert-danger', form);
114   -
  136 +
  137 + $.validator.addMethod("passwordrule", function(value, element) {
  138 + //var userblank = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*?[#?!@$%^&*-]).{8,16}$/;
  139 + var userblank = /^(?=.*[a-zA-Z])(?=.*\d).{8,16}$/;
  140 + return this.optional(element) ||(userblank.test(value));
  141 + }, "需包含字母、数字的8-16位字符");
  142 +
115 143 //表单 validate
116 144 form.validate({
117 145 errorElement : 'span',
... ... @@ -128,13 +156,14 @@
128 156 },
129 157 'password' : {
130 158 required : true,
131   - minlength: 6,
132   - maxlength: 25
  159 + minlength: 8,
  160 + maxlength: 16,
  161 + passwordrule: true
133 162 },
134 163 'cfmPassword' : {
135   - equalTo: '#password'
  164 + equalTo: '#password',
136 165 },
137   - 'role' : {
  166 + 'roles[]' : {
138 167 required : true,
139 168 minlength: 1
140 169 }
... ... @@ -160,6 +189,21 @@
160 189 var params = form.serializeJSON();
161 190 error.hide();
162 191  
  192 + var keys;
  193 + $.ajax({
  194 + url: "/user/login/jCryptionKey?t="+Math.random(),
  195 + type: "Get",
  196 + async:false,
  197 + data: null,
  198 + success: function(data) {
  199 + keys = data.publickey;
  200 + }
  201 + });
  202 + //RSA加密
  203 + var encrypt = new JSEncrypt();
  204 + encrypt.setPublicKey(keys);
  205 + params.userName = encrypt.encrypt(params.userName);
  206 + params.password = encrypt.encrypt(params.password);
163 207 $.ajax({
164 208 url: '/user/register',
165 209 type: 'POST',
... ... @@ -178,27 +222,6 @@
178 222 }
179 223 }
180 224 });
181   - /*$get('/user/all', {userName_eq: params.userName}, function(list){
182   - if(!list || list.length == 0){
183   - console.log(params);
184   - $.ajax({
185   - url: '/user',
186   - type: 'POST',
187   - traditional: true,
188   - data: params,
189   - success: function(res){
190   - layer.msg('添加用户成功.');
191   - loadPage('list.html');
192   - }
193   - });
194   - /!* $post('/user', params, function(res){
195   - layer.msg('添加用户成功.');
196   - loadPage('list.html');
197   - }); *!/
198   - }
199   - else
200   - layer.alert('用户【' + params.userName + '】已存在', {icon: 2, title: '提交被拒绝'});
201   - });*/
202 225 }
203 226 });
204 227 });
... ...
src/main/resources/static/pages/permission/user/changePWD.html
... ... @@ -4,6 +4,9 @@
4 4 <div class="portlet light portlet-fit portlet-form bordered">
5 5 <div class="portlet-body">
6 6 <form class="form-horizontal" id="changePWDForm">
  7 + <div class="alert alert-danger display-hide">
  8 + <button class="close" data-close="alert"></button>您的输入有误,请检查下面的输入项
  9 + </div>
7 10 <div class="form-group" style="margin-top: 60px">
8 11 <label class="control-label col-md-5">原始密码:
9 12 </label>
... ... @@ -19,7 +22,7 @@
19 22 <div class="col-md-4">
20 23 <div class="input-icon right">
21 24 <i class="fa"></i>
22   - <input type="password" class="form-control" name="newPWD" /> </div>
  25 + <input type="password" class="form-control" name="newPWD" id="newPWD"/> </div>
23 26 </div>
24 27 </div>
25 28 <div class="form-group">
... ... @@ -34,7 +37,7 @@
34 37 <div class="form-actions">
35 38 <div class="row">
36 39 <div class="col-md-offset-5 col-md-7">
37   - <button type="button" id="confirm" class="btn green">确定</button>
  40 + <button type="submit" id="confirm" class="btn green">确定</button>
38 41 <button type="reset" class="btn default">取消</button>
39 42 </div>
40 43 </div>
... ... @@ -47,11 +50,79 @@
47 50  
48 51 <script>
49 52 $(function(){
50   - $("#confirm").on("click",function(){
51   - var data = $('#changePWDForm').serializeJSON();
52   - $.post('/user/changePWD',data,function(msg){
53   - layer.alert(msg);
54   - });
55   - });
  53 + var form = $('#changePWDForm');
  54 + //表单 validate
  55 + var error = $('.alert-danger', form);
  56 +
  57 + $.validator.addMethod("passwordrule", function(value, element) {
  58 + //var userblank = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*?[#?!@$%^&*-]).{8,16}$/;
  59 + var userblank = /^(?=.*[a-zA-Z])(?=.*\d).{8,16}$/;
  60 + return this.optional(element) ||(userblank.test(value));
  61 + }, "需包含字母、数字的8-16位字符");
  62 +
  63 + //表单 validate
  64 + form.validate({
  65 + errorElement : 'span',
  66 + errorClass : 'help-block help-block-error',
  67 + focusInvalid : false,
  68 + rules : {
  69 + 'newPWD' : {
  70 + required : true,
  71 + minlength: 8,
  72 + maxlength: 16,
  73 + passwordrule:true
  74 + },
  75 + 'cnewPWD' : {
  76 + equalTo: '#newPWD'
  77 + }
  78 + },
  79 + invalidHandler : function(event, validator) {
  80 + error.show();
  81 + App.scrollTo(error, -200);
  82 + },
  83 +
  84 + highlight : function(element) {
  85 + $(element).closest('.form-group').addClass('has-error');
  86 + },
  87 +
  88 + unhighlight : function(element) {
  89 + $(element).closest('.form-group').removeClass('has-error');
  90 + },
  91 +
  92 + success : function(label) {
  93 + label.closest('.form-group').removeClass('has-error');
  94 + },
  95 +
  96 + submitHandler : function(f) {
  97 + var params = form.serializeJSON();
  98 + error.hide();
  99 +
  100 + var keys;
  101 + $.ajax({
  102 + url: "/user/login/jCryptionKey?t="+Math.random(),
  103 + type: "Get",
  104 + async:false,
  105 + data: null,
  106 + success: function(data) {
  107 + keys = data.publickey;
  108 + }
  109 + });
  110 + //RSA加密
  111 + var encrypt = new JSEncrypt();
  112 + encrypt.setPublicKey(keys);
  113 + params.oldPWD = encrypt.encrypt(params.oldPWD);
  114 + params.newPWD = encrypt.encrypt(params.newPWD);
  115 + params.cnewPWD = encrypt.encrypt(params.cnewPWD);
  116 + $.ajax({
  117 + url: '/user/changePWD',
  118 + type: 'POST',
  119 + traditional: true,
  120 + data: params,
  121 + success: function(msg){
  122 + layer.alert(msg);
  123 + }
  124 + });
  125 + }
  126 + });
56 127 });
57 128 </script>
58 129 \ No newline at end of file
... ...
src/main/resources/static/pages/permission/user/list.html
... ... @@ -64,7 +64,7 @@
64 64 <td>
65 65 <button class="btn btn-sm green btn-outline filter-submit margin-bottom" >
66 66 <i class="fa fa-search"></i> 搜索</button>
67   -
  67 +
68 68 <button class="btn btn-sm red btn-outline filter-cancel">
69 69 <i class="fa fa-times"></i> 重置</button>
70 70 </td>
... ... @@ -117,6 +117,9 @@
117 117 <a class="btn btn-sm blue btn-outline" href="edit.html?no={{obj.id}}" data-pjax><i class="fa fa-edit"></i> 编辑</a>
118 118 <!--<button type="button" class="btn btn-sm line_allot_btn" data-id="{{obj.id}}">线调线路分配</button>-->
119 119 {{/if}}
  120 + {{if obj.isAdmin}}
  121 + <a class="btn btn-sm red btn-outline reset_password" data-id="{{obj.id}}" data-name="{{obj.userName}}" data-pjax><i class="fa fa-undo"></i> 重置密码</a>
  122 + {{/if}}
120 123 </td>
121 124 </tr>
122 125 {{/each}}
... ... @@ -130,15 +133,49 @@
130 133 <script>
131 134 $(function(){
132 135 var page = 0, initPagination;
133   - var user;
  136 + var user,isAdmin = false;
134 137 var icheckOptions = {
135 138 checkboxClass: 'icheckbox_flat-blue',
136 139 increaseArea: '20%'
137 140 };
138 141 $.get('/user/getCurrentUser', function(data) {
139 142 user = data;
  143 + var roles = user.roles;
  144 + $.each(roles,function () {
  145 + if(this.level == 1)
  146 + isAdmin = true;
  147 + })
  148 +
140 149 });
  150 +
141 151 setTimeout(function () {
  152 + $(document).on('click', 'a.reset_password', function () {
  153 + var id = $(this).data('id');
  154 + var name = $(this).data('name');
  155 + swal({
  156 + title: "重装密码",
  157 + text: "将登录名为"+name+"的用户,密码重置为默认密码!",
  158 + type: "warning",
  159 + showCancelButton: true,
  160 + confirmButtonColor: "#DD6B55",
  161 + confirmButtonText: "重置",
  162 + cancelButtonText: "取消",
  163 + closeOnConfirm: false },
  164 + function(){
  165 + $.post('/user/resetPassword',{'id':id},function(result){
  166 + if(result.status=='SUCCESS') {
  167 + // 弹出添加成功提示消息
  168 + swal("登录名为"+name+"的用户密码重置成功!", "success");
  169 + } else if(result.status=='ERROR') {
  170 + // 弹出添加失败提示消息
  171 + swal("重置失败!", result.msg+",请联系开发人员!", "ERROR");
  172 + }
  173 + // loadPage('list.html');
  174 + // 发布后刷新页面
  175 + jsDoQuery(getParams(), true);
  176 + });
  177 + });
  178 + });
142 179 jsDoQuery(null,true);
143 180  
144 181 //重置
... ... @@ -147,45 +184,63 @@ $(function(){
147 184 jsDoQuery(null, true);
148 185 });
149 186  
  187 + function getParams() {
  188 + var cells = $('tr.filter')[0].cells
  189 + ,params = {}
  190 + ,name;
  191 + $.each(cells, function(i, cell){
  192 + var items = $('input,select', cell);
  193 + for(var j = 0, item; item = items[j++];){
  194 + name = $(item).attr('name');
  195 + if(name){
  196 + params[name] = $(item).val();
  197 + }
  198 + }
  199 + });
  200 + return params;
  201 + }
  202 +
150 203 //提交
151 204 $('tr.filter .filter-submit').on('click', function(){
152   - var cells = $('tr.filter')[0].cells
153   - ,params = {}
154   - ,name;
155   - $.each(cells, function(i, cell){
156   - var items = $('input,select', cell);
157   - for(var j = 0, item; item = items[j++];){
158   - name = $(item).attr('name');
159   - if(name){
160   - params[name] = $(item).val();
161   - }
162   - }
163   - });
164   - page = 0;
165   - jsDoQuery(params, true);
  205 + jsDoQuery(getParams(), true);
166 206 });
167 207  
168 208 /*
169 209 * 获取数据 p: 要提交的参数, pagination: 是否重新分页
170 210 */
171 211 function jsDoQuery(p, pagination){
  212 + var roles = new Map();
  213 + // 查询下级角色
  214 + $.ajax({
  215 + url: "/role/findSubordinate",
  216 + type: "Get",
  217 + async:false,
  218 + data: null,
  219 + success: function (rs) {
  220 + if(rs.status == "SUCCESS"){
  221 + $.each(rs.list,function(i,obj){
  222 + roles[obj.id] = obj;
  223 + });
  224 + }
  225 + }
  226 + });
172 227 var params = {};
173 228 if(p)
174 229 params = p;
175 230 //更新时间排序
176 231 params['order'] = 'lastLoginDate';
177 232 params['page'] = page;
178   - params['roles[0].pic_ne'] = 1;
  233 + // params['id_eq'] = "1";
179 234 var i = layer.load(2);
180 235 $get('/user' ,params, function(data){
181 236 var list = data.content;
182   - var errorList=[];
183 237 $.each(list, function(i, obj) {
184   - if(obj.roles[0].level > user.roles[0].level){
  238 + if(roles[obj.roles[0].id] != null && roles[obj.roles[0].id] != undefined){
185 239 obj.isEdit = 0;
186 240 } else{
187 241 obj.isEdit = 1;
188 242 }
  243 + obj.isAdmin = isAdmin;
189 244 obj.lastLoginDate = moment(obj.lastLoginDate).format("YYYY-MM-DD HH:mm:ss");
190 245 });
191 246  
... ...
src/main/resources/static/pages/scheduleApp/module/common/dts2/ttinfotable/saTimeTable.js
... ... @@ -25,6 +25,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(
25 25 this.isfb = detailInfo && detailInfo.isfb; // 是否分班
26 26 this.qdzCode = detailInfo && detailInfo.qdzCode; // 起点站Code
27 27 this.zdzCode = detailInfo && detailInfo.zdzCode; // 终点站Code
  28 + this.bcsj = detailInfo && detailInfo.bcsj; // 班次历时
28 29  
29 30 // 路牌信息
30 31 this.lpId = undefined; // id
... ... @@ -37,8 +38,8 @@ angular.module(&#39;ScheduleApp&#39;).factory(
37 38 this.sel = false; // 是否被选中
38 39  
39 40 // 其余函数判定的内部保存值
40   - this.isCanSel = false;
41   - this.isValidInfo = false;
  41 + this.isCanSel = false; // 是否能被选择
  42 + this.isInValid = false; // 数据是否无效
42 43  
43 44 };
44 45 BcInfo.prototype.canUpdate = function() { // 是否能更新
... ... @@ -72,13 +73,15 @@ angular.module(&#39;ScheduleApp&#39;).factory(
72 73 };
73 74 BcInfo.prototype.validInfo = function() { // 验证班次信息内容是否正确
74 75 if (this.canSel() && this.ttdid) {
75   - if (!this.qdzCode || !this.zdzCode) { // 编码为空判定
76   - this.isValidInfo = true;
77   - return true;
  76 + if (!this.qdzCode || // 起点站编码为空判定
  77 + !this.zdzCode || // 终点站编码为空判定
  78 + (!this.bcsj && this.bcsj !== 0)) { // 班次历时为空判定
  79 + this.isInValid = true;
  80 + } else {
  81 + this.isInValid = false;
78 82 }
79 83 } else {
80   - this.isValidInfo = false;
81   - return false;
  84 + this.isInValid = false;
82 85 }
83 86 };
84 87  
... ...
src/main/resources/static/pages/scheduleApp/module/common/dts2/ttinfotable/saTimeTableTemplate.html
... ... @@ -424,7 +424,7 @@
424 424 ng-if="$index > 0"
425 425 ng-class="{
426 426 lpName: !cell.ttdid,
427   - error: cell.isValidInfo,
  427 + error: cell.isInValid,
428 428 active: cell.sel,
429 429 ists: cell.ists,
430 430 region: cell.bc_type == 'region',
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
... ... @@ -4089,6 +4089,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(
4089 4089 this.isfb = detailInfo && detailInfo.isfb; // 是否分班
4090 4090 this.qdzCode = detailInfo && detailInfo.qdzCode; // 起点站Code
4091 4091 this.zdzCode = detailInfo && detailInfo.zdzCode; // 终点站Code
  4092 + this.bcsj = detailInfo && detailInfo.bcsj; // 班次历时
4092 4093  
4093 4094 // 路牌信息
4094 4095 this.lpId = undefined; // id
... ... @@ -4101,8 +4102,8 @@ angular.module(&#39;ScheduleApp&#39;).factory(
4101 4102 this.sel = false; // 是否被选中
4102 4103  
4103 4104 // 其余函数判定的内部保存值
4104   - this.isCanSel = false;
4105   - this.isValidInfo = false;
  4105 + this.isCanSel = false; // 是否能被选择
  4106 + this.isInValid = false; // 数据是否无效
4106 4107  
4107 4108 };
4108 4109 BcInfo.prototype.canUpdate = function() { // 是否能更新
... ... @@ -4136,13 +4137,15 @@ angular.module(&#39;ScheduleApp&#39;).factory(
4136 4137 };
4137 4138 BcInfo.prototype.validInfo = function() { // 验证班次信息内容是否正确
4138 4139 if (this.canSel() && this.ttdid) {
4139   - if (!this.qdzCode || !this.zdzCode) { // 编码为空判定
4140   - this.isValidInfo = true;
4141   - return true;
  4140 + if (!this.qdzCode || // 起点站编码为空判定
  4141 + !this.zdzCode || // 终点站编码为空判定
  4142 + (!this.bcsj && this.bcsj !== 0)) { // 班次历时为空判定
  4143 + this.isInValid = true;
  4144 + } else {
  4145 + this.isInValid = false;
4142 4146 }
4143 4147 } else {
4144   - this.isValidInfo = false;
4145   - return false;
  4148 + this.isInValid = false;
4146 4149 }
4147 4150 };
4148 4151  
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-globalservice.js
... ... @@ -941,49 +941,49 @@ angular.module(&#39;ScheduleApp&#39;).factory(
941 941  
942 942 ]
943 943 );
944   -// 时刻表日志管理service
945   -angular.module('ScheduleApp').factory(
946   - 'TimetableLogManageService_g',
947   - [
948   - '$resource',
949   - function($resource) {
950   - return {
951   - rest: $resource(
952   - '/s_log/:id',
953   - {order: 'opEndTime', direction: 'DESC', id: '@id'},
954   - {
955   - list: {
956   - method: 'GET',
957   - params: {
958   - page: 0
959   - },
960   - transformResponse: function(rs) {
961   - var dst = angular.fromJson(rs);
962   - if (dst.status == 'SUCCESS') {
963   - return dst.data;
964   - } else {
965   - return dst; // 业务错误留给控制器处理
966   - }
967   - }
968   - },
969   - get: {
970   - method: 'GET',
971   - transformResponse: function(rs) {
972   - var dst = angular.fromJson(rs);
973   - if (dst.status == 'SUCCESS') {
974   - return dst.data;
975   - } else {
976   - return dst;
977   - }
978   - }
979   - }
980   - }
981   - )
982   -
983   -
984   - };
985   - }
986   - ]
  944 +// 时刻表日志管理service
  945 +angular.module('ScheduleApp').factory(
  946 + 'TimetableLogManageService_g',
  947 + [
  948 + '$resource',
  949 + function($resource) {
  950 + return {
  951 + rest: $resource(
  952 + '/s_log/:id',
  953 + {order: 'opEndTime', direction: 'DESC', id: '@id'},
  954 + {
  955 + list: {
  956 + method: 'GET',
  957 + params: {
  958 + page: 0
  959 + },
  960 + transformResponse: function(rs) {
  961 + var dst = angular.fromJson(rs);
  962 + if (dst.status == 'SUCCESS') {
  963 + return dst.data;
  964 + } else {
  965 + return dst; // 业务错误留给控制器处理
  966 + }
  967 + }
  968 + },
  969 + get: {
  970 + method: 'GET',
  971 + transformResponse: function(rs) {
  972 + var dst = angular.fromJson(rs);
  973 + if (dst.status == 'SUCCESS') {
  974 + return dst.data;
  975 + } else {
  976 + return dst;
  977 + }
  978 + }
  979 + }
  980 + }
  981 + )
  982 +
  983 +
  984 + };
  985 + }
  986 + ]
987 987 );
988 988 // 项目通用的全局service服务,供不同的controller使用,自定义指令不使用
989 989  
... ...
src/main/resources/static/pages/scheduleApp/module/common/prj-common-ui-route-state.js
... ... @@ -1402,61 +1402,61 @@ ScheduleApp.config([
1402 1402  
1403 1403 }
1404 1404 ]);
1405   -// ui route 配置
1406   -
1407   -/** 日志管理配置route */
1408   -ScheduleApp.config([
1409   - '$stateProvider',
1410   - function($stateProvider) {
1411   - $stateProvider
1412   - .state('logManage', { // index页面
1413   - url: '/logManage',
1414   - views: {
1415   - "": {
1416   - templateUrl: 'pages/scheduleApp/module/sys/logManage/index.html'
1417   - },
1418   - "logManage_list@logManage": {
1419   - templateUrl: 'pages/scheduleApp/module/sys/logManage/list.html'
1420   - }
1421   - },
1422   -
1423   - resolve: {
1424   - deps: ['$ocLazyLoad', function($ocLazyLoad) {
1425   - return $ocLazyLoad.load({
1426   - name: 'logManage_module',
1427   - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
1428   - files: [
1429   - "assets/bower_components/angular-ui-select/dist/select.min.css",
1430   - "assets/bower_components/angular-ui-select/dist/select.min.js",
1431   - "pages/scheduleApp/module/sys/logManage/module.js"
1432   - ]
1433   - });
1434   - }]
1435   - }
1436   - })
1437   - .state('logManage_detail', { // detail.html页面
1438   - url: 'logManage_detail/:id',
1439   - views: {
1440   - "": {templateUrl: 'pages/scheduleApp/module/sys/logManage/detail.html'}
1441   - },
1442   - resolve: {
1443   - deps: ['$ocLazyLoad', function($ocLazyLoad) {
1444   - return $ocLazyLoad.load({
1445   - name: 'logManage_detail_module',
1446   - insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
1447   - files: [
1448   - "pages/scheduleApp/module/sys/logManage/module.js"
1449   - ]
1450   - });
1451   - }]
1452   - }
1453   - })
1454   -
1455   -
1456   -
1457   -
1458   -
1459   -
1460   -
1461   - }
  1405 +// ui route 配置
  1406 +
  1407 +/** 日志管理配置route */
  1408 +ScheduleApp.config([
  1409 + '$stateProvider',
  1410 + function($stateProvider) {
  1411 + $stateProvider
  1412 + .state('logManage', { // index页面
  1413 + url: '/logManage',
  1414 + views: {
  1415 + "": {
  1416 + templateUrl: 'pages/scheduleApp/module/sys/logManage/index.html'
  1417 + },
  1418 + "logManage_list@logManage": {
  1419 + templateUrl: 'pages/scheduleApp/module/sys/logManage/list.html'
  1420 + }
  1421 + },
  1422 +
  1423 + resolve: {
  1424 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  1425 + return $ocLazyLoad.load({
  1426 + name: 'logManage_module',
  1427 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  1428 + files: [
  1429 + "assets/bower_components/angular-ui-select/dist/select.min.css",
  1430 + "assets/bower_components/angular-ui-select/dist/select.min.js",
  1431 + "pages/scheduleApp/module/sys/logManage/module.js"
  1432 + ]
  1433 + });
  1434 + }]
  1435 + }
  1436 + })
  1437 + .state('logManage_detail', { // detail.html页面
  1438 + url: 'logManage_detail/:id',
  1439 + views: {
  1440 + "": {templateUrl: 'pages/scheduleApp/module/sys/logManage/detail.html'}
  1441 + },
  1442 + resolve: {
  1443 + deps: ['$ocLazyLoad', function($ocLazyLoad) {
  1444 + return $ocLazyLoad.load({
  1445 + name: 'logManage_detail_module',
  1446 + insertBefore: '#ng_load_plugins_before', // 动态载入模块时放置的位置
  1447 + files: [
  1448 + "pages/scheduleApp/module/sys/logManage/module.js"
  1449 + ]
  1450 + });
  1451 + }]
  1452 + }
  1453 + })
  1454 +
  1455 +
  1456 +
  1457 +
  1458 +
  1459 +
  1460 +
  1461 + }
1462 1462 ]);
1463 1463 \ No newline at end of file
... ...
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/list.html
... ... @@ -135,14 +135,85 @@
135 135  
136 136 </td>
137 137 <td>
138   - <a href="#" class="btn btn-success btn-sm" ng-if="info.planResult == 'ok'">
  138 + <a sweetalert
  139 + sweet-options="{title: '排班信息',text: '线路:' + info.xl.name +
  140 + '</br>开始时间:' + ctrl.toDateStr(info.scheduleFromTime) +
  141 + '</br>结束时间:' + ctrl.toDateStr(info.scheduleToTime) +
  142 + '</br>事务Id:' + ctrl.getPlanResultXid(info) +
  143 + '</br>事务描述:' + ctrl.getPlanResultDesc(info),
  144 + html: true,
  145 + type: 'info'}"
  146 + sweet-on-confirm=""
  147 + class="btn btn-info btn-sm"
  148 + ng-if="ctrl.isPlanGenerate_PREPARE(info)">
  149 + <span>准备中</span>
  150 + <i class="fa fa-spinner" aria-hidden="true"></i>
  151 + </a>
  152 +
  153 + <a sweetalert
  154 + sweet-options="{title: '排班信息',text: '线路:' + info.xl.name +
  155 + '</br>开始时间:' + ctrl.toDateStr(info.scheduleFromTime) +
  156 + '</br>结束时间:' + ctrl.toDateStr(info.scheduleToTime) +
  157 + '</br>事务Id:' + ctrl.getPlanResultXid(info) +
  158 + '</br>事务描述:' + ctrl.getPlanResultDesc(info),
  159 + html: true,
  160 + type: 'info'}"
  161 + sweet-on-confirm=""
  162 + class="btn btn-primary btn-sm"
  163 + ng-if="ctrl.isPlanGenerate_PROGRESS(info)">
  164 + <span>进行中</span>
  165 + <i class="fa fa-spinner" aria-hidden="true"></i>
  166 + </a>
  167 +
  168 + <a sweetalert
  169 + sweet-options="{title: '排班信息',text: '线路:' + info.xl.name +
  170 + '</br>开始时间:' + ctrl.toDateStr(info.scheduleFromTime) +
  171 + '</br>结束时间:' + ctrl.toDateStr(info.scheduleToTime) +
  172 + '</br>事务Id:' + ctrl.getPlanResultXid(info) +
  173 + '</br>事务描述:' + ctrl.getPlanResultDesc(info),
  174 + html: true,
  175 + type: 'success'}"
  176 + sweet-on-confirm=""
  177 + class="btn btn-success btn-sm"
  178 + ng-if="ctrl.isPlanGenerate_SUCCESS_ALL(info)">
139 179 <span>成功</span>
  180 + <i class="fa fa-check" aria-hidden="true"></i>
140 181 </a>
  182 +
141 183 <a sweetalert
142   - sweet-options="{title: '排班错误信息',text: '线路:' + info.xl.name + '</br>开始时间:' + ctrl.toDateStr(info.scheduleFromTime) + '</br>结束时间:' + ctrl.toDateStr(info.scheduleToTime) + '</br>' + info.planResult, html: true,type: 'warning',showCancelButton: true,confirmButtonColor: '#DD6B55',confirmButtonText: '是',cancelButtonText: '取消'}"
  184 + sweet-options="{title: '排班信息',text: '线路:' + info.xl.name +
  185 + '</br>开始时间:' + ctrl.toDateStr(info.scheduleFromTime) +
  186 + '</br>结束时间:' + ctrl.toDateStr(info.scheduleToTime) +
  187 + '</br>事务Id:' + ctrl.getPlanResultXid(info) +
  188 + '</br>事务描述:排班成功,但是排班结果有异常,如下:</br>' + ctrl.getPlanResultDesc(info),
  189 + html: true,
  190 + type: 'warning',
  191 + showCancelButton: true,
  192 + confirmButtonColor: '#DD6B55',
  193 + confirmButtonText: '是',
  194 + cancelButtonText: '取消'}"
  195 + sweet-on-confirm=""
  196 + class="btn btn-warning btn-sm"
  197 + ng-if="ctrl.isPlanGenerate_SUCCESS_NOT_ALL(info)">
  198 + <span>成功</span>
  199 + <i class="fa fa-exclamation" aria-hidden="true"></i>
  200 + </a>
  201 +
  202 + <a sweetalert
  203 + sweet-options="{title: '排班信息',text: '线路:' + info.xl.name +
  204 + '</br>开始时间:' + ctrl.toDateStr(info.scheduleFromTime) +
  205 + '</br>结束时间:' + ctrl.toDateStr(info.scheduleToTime) +
  206 + '</br>事务Id:' + ctrl.getPlanResultXid(info) +
  207 + '</br>事务描述:' + ctrl.getPlanResultDesc(info),
  208 + html: true,
  209 + type: 'error'}"
143 210 sweet-on-confirm=""
144 211 class="btn btn-danger btn-sm"
145   - ng-if="info.planResult != 'ok'">点击查错</a>
  212 + ng-if="ctrl.isPlanGenerate_FAILURE(info)">
  213 + <span>失败</span>
  214 + <i class="fa fa-times" aria-hidden="true"></i>
  215 + </a>
  216 +
146 217 </td>
147 218 <td>
148 219 <!--<a href="details.html?lineId={{obj.id}}" class="btn default blue-stripe btn-sm"> 详细 </a>-->
... ...
src/main/resources/static/pages/scheduleApp/module/core/schedulePlanManage/module.js
... ... @@ -213,6 +213,68 @@ angular.module(&#39;ScheduleApp&#39;).controller(
213 213  
214 214 self.doPage();
215 215  
  216 + //------------- 判断排班的完成状态及输出(以下)----------------//
  217 + self.getPlanResultXid = function(info) {
  218 + try {
  219 + var result = angular.fromJson(info["planResult"]);
  220 + return result["generateTransactionXID"];
  221 + } catch (err) {
  222 + return "";
  223 + }
  224 + };
  225 + self.getPlanResultDesc = function(info) {
  226 + try {
  227 + var result = angular.fromJson(info["planResult"]);
  228 + return result["generateDesc"];
  229 + } catch (err) {
  230 + return info["planResult"];
  231 + }
  232 + };
  233 + self.isPlanGenerate_PREPARE = function(info) {
  234 + try {
  235 + var result = angular.fromJson(info["planResult"]);
  236 + return result["generateStatus"] === 0 || result["generateStatus"] === 'PREPARE';
  237 + } catch (err) {
  238 + return false;
  239 + }
  240 + };
  241 + self.isPlanGenerate_PROGRESS = function(info) {
  242 + try {
  243 + var result = angular.fromJson(info["planResult"]);
  244 + return result["generateStatus"] === 1 || result["generateStatus"] === 'PROGRESS';
  245 + } catch (err) {
  246 + return false;
  247 + }
  248 + };
  249 + self.isPlanGenerate_SUCCESS_ALL = function(info) {
  250 + try {
  251 + var result = angular.fromJson(info["planResult"]);
  252 + return (result["generateStatus"] === 2 || result["generateStatus"] === 'SUCCESS') && result["generateDesc"] === "ok";
  253 + } catch (err) {
  254 + return info["planResult"] === "ok";
  255 + }
  256 +
  257 + };
  258 + self.isPlanGenerate_SUCCESS_NOT_ALL = function(info) {
  259 + try {
  260 + var result = angular.fromJson(info["planResult"]);
  261 + return (result["generateStatus"] === 2 || result["generateStatus"] === 'SUCCESS') && result["generateDesc"] !== "ok";
  262 + } catch (err) {
  263 + return info["planResult"] !== "ok";
  264 + }
  265 +
  266 + };
  267 + self.isPlanGenerate_FAILURE = function(info) {
  268 + try {
  269 + var result = angular.fromJson(info["planResult"]);
  270 + return result["generateStatus"] === 3 || result["generateStatus"] === 'FAILURE';
  271 + } catch (err) {
  272 + return false;
  273 + }
  274 + };
  275 +
  276 + //------------- 判断排班的完成状态(以上)----------------//
  277 +
216 278 // 转换日期成str
217 279 self.toDateStr = function(time) {
218 280 return $filter('date')(new Date(time), 'yyyy-MM-dd');
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/edit3.html
... ... @@ -98,6 +98,7 @@
98 98 <i class="fa fa-file-excel-o"></i>
99 99 批量选择
100 100 </a>
  101 +
101 102 <a href="javascript:" style="padding-right: 5px;"
102 103 ng-click="ctrl.editInfos()"
103 104 ng-show="ctrl.currentView.btn2">
... ...
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detailedit/timeTableDetailManage_old.js
... ... @@ -159,6 +159,8 @@ angular.module(&#39;ScheduleApp&#39;).factory(
159 159 // assign创建人时间
160 160 editInfo.rowBxInfo[lp_bx_index].createBy = bxInfo_temp.createBy;
161 161 editInfo.rowBxInfo[lp_bx_index].createDate = bxInfo_temp.createDate;
  162 + // assign版本号
  163 + editInfo.rowBxInfo[lp_bx_index].version = bxInfo_temp.version;
162 164 }
163 165 }
164 166 }
... ... @@ -289,6 +291,7 @@ angular.module(&#39;ScheduleApp&#39;).factory(
289 291 ttinfodetailIds[index].qdzCode = value.qdzCode || undefined;
290 292 ttinfodetailIds[index].zdzCode = value.zdzCode || undefined;
291 293 ttinfodetailIds[index].isfb = value.isFB || undefined;
  294 + ttinfodetailIds[index].bcsj = value.bcsj || undefined;
292 295  
293 296 ttinfodetailIds[index].validInfo();
294 297  
... ... @@ -677,10 +680,15 @@ angular.module(&#39;ScheduleApp&#39;).controller(
677 680 }
678 681 // 更新班型信息
679 682 self.submit = function() {
  683 + // alert(self.bxInfo.id + "-" + self.bxInfo.version);
680 684 // assign线路版本
681 685 self.bxInfo.lineVersion = self.lineversion;
682 686 service.updateBXInfo(self.bxInfo).then(
683 687 function(result) {
  688 + // 设置id和version
  689 + self.bxInfo.id = result.id;
  690 + self.bxInfo.version = result.version;
  691 +
684 692 // 跳转
685 693 $state.go("ttInfoDetailManage_edit3", {
686 694 xlid: self.xlid,
... ... @@ -795,6 +803,7 @@ angular.module(&#39;ScheduleApp&#39;).controller(
795 803 detailInfo.zdzCode = value.zdzCode || undefined;
796 804 detailInfo.isfb = value.isFB;
797 805 detailInfo.ists = value.isTS;
  806 + detailInfo.bcsj = value.bcsj;
798 807  
799 808 detailInfo.validInfo();
800 809  
... ... @@ -865,7 +874,7 @@ angular.module(&#39;ScheduleApp&#39;).controller(
865 874 reSetTTinfoDetail: function(value) {
866 875 for (var key in this) {
867 876 if (!angular.isFunction(this[key])) {
868   - if (this[key] != undefined) {
  877 + if (!!this[key]) {
869 878 value[key] = this[key];
870 879 }
871 880 }
... ...
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
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/safeDriving.html
... ... @@ -117,10 +117,16 @@
117 117 var query = function() {
118 118 scanFlag = false;
119 119 var data = form.serializeJSON();
  120 + debugger;
  121 + var lines = new Array();
  122 + for (var i = 0;i < gb_data_basic.activeLines.length;i++) {
  123 + lines.push(gb_data_basic.activeLines[i].lineCode);
  124 + }
  125 + data.lines = lines.join(',');
120 126 data.page = page;
121 127 data.size = pageSize;
122 128  
123   - gb_common.$get('/gps/safeDriv', data, function (rs) {
  129 + gb_common.$post('/gps/safeDriv', data, function (rs) {
124 130 //数据转换
125 131 var code2Name=gb_data_basic.lineCode2NameAll(), url,stm, p;
126 132 $.each(rs.list, function(){
... ...