Commit 5d73425a6a3aac65827041af877cb2e92144d79d

Authored by 游瑞烽
2 parents 05da5ab5 67dff64a

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

Showing 48 changed files with 6094 additions and 450 deletions
src/main/java/com/bsth/controller/calc/CalcIntervalController.java 0 → 100644
  1 +package com.bsth.controller.calc;
  2 +
  3 +import java.util.List;
  4 +import java.util.Map;
  5 +
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.web.bind.annotation.RequestMapping;
  8 +import org.springframework.web.bind.annotation.RequestParam;
  9 +import org.springframework.web.bind.annotation.RestController;
  10 +
  11 +import com.bsth.controller.BaseController;
  12 +import com.bsth.entity.calc.CalcInterval;
  13 +import com.bsth.service.calc.CalcIntervalService;
  14 +
  15 +@RestController
  16 +@RequestMapping("calcInterval")
  17 +public class CalcIntervalController extends BaseController<CalcInterval,Integer>{
  18 + @Autowired
  19 + CalcIntervalService calcIntervalService;
  20 + @RequestMapping(value="/countList")
  21 + public List<Map<String,Object>> countList(@RequestParam Map<String, Object> map){
  22 + List<Map<String, Object>> list=calcIntervalService.countList(map);
  23 + return list;
  24 + }
  25 +
  26 + @RequestMapping(value="/listInterval")
  27 + public List<Map<String, Object>> listInterval(@RequestParam Map<String, Object> map){
  28 + List<Map<String, Object>>list=calcIntervalService.listInterval(map);
  29 + return list;
  30 + }
  31 +
  32 + @RequestMapping(value="/interval")
  33 + public List<Map<String,Object>> interval(@RequestParam Map<String, Object> map){
  34 + List<Map<String,Object>> list=calcIntervalService.interval(map);
  35 + return list;
  36 + }
  37 +
  38 +
  39 +}
... ...
src/main/java/com/bsth/controller/realcontrol/ReportRegisterController.java 0 → 100644
  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.apache.poi.ss.formula.functions.T;
  11 +import org.slf4j.Logger;
  12 +import org.slf4j.LoggerFactory;
  13 +import org.springframework.beans.factory.annotation.Autowired;
  14 +import org.springframework.beans.propertyeditors.CustomDateEditor;
  15 +import org.springframework.web.bind.WebDataBinder;
  16 +import org.springframework.web.bind.annotation.InitBinder;
  17 +import org.springframework.web.bind.annotation.PathVariable;
  18 +import org.springframework.web.bind.annotation.RequestMapping;
  19 +import org.springframework.web.bind.annotation.RequestMethod;
  20 +import org.springframework.web.bind.annotation.RequestParam;
  21 +import org.springframework.web.bind.annotation.RestController;
  22 +import org.springframework.web.context.request.WebRequest;
  23 +
  24 +import java.text.DateFormat;
  25 +import java.text.SimpleDateFormat;
  26 +import java.util.Date;
  27 +import java.util.HashMap;
  28 +import java.util.Map;
  29 +
  30 +/**
  31 + * 报备登记
  32 + * Created by yrf on 2019/12/04.
  33 + */
  34 +@RestController
  35 +@RequestMapping("reportRegister")
  36 +public class ReportRegisterController extends BaseController<ReportRegister, Long>{
  37 +
  38 + Logger log = LoggerFactory.getLogger(this.getClass());
  39 +
  40 +// final static String url = "http://114.80.178.13/complaint/TsReport/input.do";
  41 + final static String url = "http://192.168.168.228:8080/complaint/TsReport/input.do";
  42 +
  43 + @Autowired
  44 + ReportRegisterService reportRegisterService;
  45 +
  46 + @InitBinder
  47 + public void initBinder(WebDataBinder binder, WebRequest request) {
  48 + //转换日期 注意这里的转化要和传进来的字符串的格式一直 如2015-9-9 就应该为yyyy-MM-dd
  49 + DateFormat dateFormat=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
  50 + binder.registerCustomEditor(Date.class, new CustomDateEditor(dateFormat, true));// CustomDateEditor为自定义日期编辑器
  51 + }
  52 +
  53 +
  54 + @RequestMapping(value = "/findList", method = RequestMethod.GET)
  55 + public Map<String, Object> findList(@RequestParam Map<String, String> map) {
  56 + return reportRegisterService.findList(map);
  57 + }
  58 +
  59 + @RequestMapping(value = "/{id}", method = RequestMethod.GET)
  60 + public ReportRegister findById(@PathVariable("id") Long id) {
  61 + ReportRegister reportRegister = reportRegisterService.findById(id);
  62 + return reportRegister;
  63 + }
  64 +
  65 + @RequestMapping(value = "/delete", method = RequestMethod.POST)
  66 + public Map<String, Object> deleteInfo(ReportRegister t) {
  67 + Map<String, Object> map = new HashMap<>();
  68 + try{
  69 +// map = baseService.delete(id);
  70 + reportRegisterService.deleteInfo(t);
  71 + String data = "{ID:'"+t.getID()+"', STATUS:'2'}";
  72 + StringBuilder sb = HttpClientUtils.post(url,data);
  73 + JSONObject obj = JSON.parseObject(sb.toString());
  74 + map.put("status2", obj);
  75 + } catch (Exception e) {
  76 + log.error(e.toString(), e);
  77 + }
  78 + return map;
  79 + }
  80 +
  81 +
  82 + @RequestMapping(method = RequestMethod.POST)
  83 + public Map<String, Object> save(ReportRegister t) {
  84 + Map<String, Object> map = new HashMap<>();
  85 + try{
  86 + reportRegisterService.save(t);
  87 + map.put("status", ResponseCode.SUCCESS);
  88 + map.put("t", t);
  89 + StringBuilder sb = HttpClientUtils.post(url,t.toString());
  90 + JSONObject obj = JSON.parseObject(sb.toString());
  91 + map.put("status2", obj);
  92 + } catch (Exception e) {
  93 + log.error(e.toString(), e);
  94 + }
  95 + return map;
  96 + }
  97 +}
... ...
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
1 1 package com.bsth.controller.realcontrol;
2 2  
3 3 import java.util.ArrayList;
  4 +import java.util.Arrays;
4 5 import java.util.Collection;
5 6 import java.util.HashMap;
6 7 import java.util.List;
... ... @@ -134,7 +135,7 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
134 135 * @throws
135 136 */
136 137 @RequestMapping(value = "/realOutAdjust", method = RequestMethod.POST)
137   - public Map<String, Object> realOutAdjust(Map<String, String> map) {
  138 + public Map<String, Object> realOutAdjust(@RequestParam Map<String, String> map) {
138 139 return scheduleRealInfoService.realOutAdjust(map);
139 140 }
140 141  
... ... @@ -722,4 +723,9 @@ public class ScheduleRealInfoController extends BaseController&lt;ScheduleRealInfo,
722 723 public List<RepairReport> repairReportList(@RequestParam String line, @RequestParam String date, @RequestParam String code, @RequestParam String type){
723 724 return scheduleRealInfoService.repairReportList(line, date, code, type);
724 725 }
  726 +
  727 + @RequestMapping(value = "lineLevel", method = RequestMethod.GET)
  728 + public Map<String, String> lineLevel(@RequestParam String idx){
  729 + return scheduleRealInfoService.getLevelsByLines(Arrays.asList(idx.split(",")));
  730 + }
725 731 }
... ...
src/main/java/com/bsth/controller/report/CalcSheetController.java
... ... @@ -29,6 +29,14 @@ public class CalcSheetController extends BaseController&lt;CalcSheet, Integer&gt;{
29 29 List<CalcSheet> list=calcSheetService.calcListSheet(map);
30 30 return list;
31 31 }
  32 +
  33 + //D级别线路发车到站准点率列表
  34 + @RequestMapping(value = "/calcListSheet_d",method = RequestMethod.GET)
  35 + public List<CalcSheet> calcListSheet_d(@RequestParam Map<String, Object> map){
  36 + List<CalcSheet> list=calcSheetService.calcListSheet_d(map);
  37 + return list;
  38 + }
  39 +
32 40 //发车站点准点率详细
33 41 @RequestMapping(value = "/calcSheet",method = RequestMethod.GET)
34 42 public List<Sheet> calcSheet(@RequestParam Map<String, Object> map){
... ...
src/main/java/com/bsth/data/BasicData.java
1 1 package com.bsth.data;
2 2  
3   -import com.bsth.data.gpsdata_v2.cache.GeoCacheData;
4   -import com.bsth.data.pinyin.PersionPinYinBuffer;
5   -import com.bsth.entity.*;
6   -import com.bsth.entity.schedule.CarConfigInfo;
7   -import com.bsth.repository.*;
8   -import com.bsth.repository.schedule.CarConfigInfoRepository;
9   -import com.google.common.collect.BiMap;
10   -import com.google.common.collect.HashBiMap;
  3 +import java.text.DateFormat;
  4 +import java.text.SimpleDateFormat;
  5 +import java.util.ArrayList;
  6 +import java.util.Calendar;
  7 +import java.util.Date;
  8 +import java.util.HashMap;
  9 +import java.util.Iterator;
  10 +import java.util.List;
  11 +import java.util.Map;
  12 +
11 13 import org.apache.commons.lang3.StringUtils;
12 14 import org.slf4j.Logger;
13 15 import org.slf4j.LoggerFactory;
14 16 import org.springframework.beans.factory.annotation.Autowired;
15 17 import org.springframework.stereotype.Component;
16 18  
17   -import java.util.*;
  19 +import com.bsth.data.gpsdata_v2.cache.GeoCacheData;
  20 +import com.bsth.data.pinyin.PersionPinYinBuffer;
  21 +import com.bsth.entity.Business;
  22 +import com.bsth.entity.CarPark;
  23 +import com.bsth.entity.Cars;
  24 +import com.bsth.entity.Line;
  25 +import com.bsth.entity.Personnel;
  26 +import com.bsth.entity.StationRoute;
  27 +import com.bsth.entity.calc.CalcInterval;
  28 +import com.bsth.entity.schedule.CarConfigInfo;
  29 +import com.bsth.repository.BusinessRepository;
  30 +import com.bsth.repository.CarParkRepository;
  31 +import com.bsth.repository.CarsRepository;
  32 +import com.bsth.repository.LineRepository;
  33 +import com.bsth.repository.PersonnelRepository;
  34 +import com.bsth.repository.StationRepository;
  35 +import com.bsth.repository.StationRouteRepository;
  36 +import com.bsth.repository.calc.CalcIntervalRepository;
  37 +import com.bsth.repository.schedule.CarConfigInfoRepository;
  38 +import com.google.common.collect.BiMap;
  39 +import com.google.common.collect.HashBiMap;
18 40  
19 41 /**
20 42 * @author PanZhao
... ... @@ -77,6 +99,8 @@ public class BasicData {
77 99 //站点名和运管处编号 对照
78 100 public static Map<String, Integer> stationName2YgcNumber;
79 101  
  102 + // 线路编码_日期 等级
  103 + public static Map<String, String> lineDate2Level;
80 104  
81 105 static Logger logger = LoggerFactory.getLogger(BasicData.class);
82 106  
... ... @@ -132,7 +156,9 @@ public class BasicData {
132 156  
133 157 @Autowired
134 158 PersionPinYinBuffer persionPinYinBuffer;
135   -
  159 +
  160 + @Autowired
  161 + CalcIntervalRepository calcIntervalRepository;
136 162  
137 163 @Override
138 164 public void run() {
... ... @@ -158,7 +184,9 @@ public class BasicData {
158 184 loadPersonnelInfo();
159 185 //公司信息
160 186 loadBusinessInfo();
161   -
  187 + // 线路等级信息
  188 + loadLineLevel();
  189 +
162 190 logger.info("load geo cache..,");
163 191 geoCacheData.loadData();
164 192 station2ParkBuffer.saveAll();
... ... @@ -365,5 +393,30 @@ public class BasicData {
365 393 //人员拼音转换
366 394 persionPinYinBuffer.refresh();
367 395 }
  396 +
  397 + /**
  398 + * 加载线路级别信息 按当前日期取(当前+前后一天)的数据
  399 + */
  400 + public void loadLineLevel() {
  401 + List<String> dates = new ArrayList<>();
  402 + Map<String, String> result = new HashMap<>();
  403 + DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
  404 +
  405 + Calendar c = Calendar.getInstance();
  406 + c.setTime(new Date(System.currentTimeMillis() - 86400000));
  407 + dates.add(df.format(c.getTime()));
  408 +
  409 + for (int i = 0;i < 2;i++) {
  410 + c.add(Calendar.DATE, 1);
  411 + dates.add(df.format(c.getTime()));
  412 + }
  413 +
  414 + List<CalcInterval> l = calcIntervalRepository.selectByDates(dates);
  415 + for (CalcInterval ci : l) {
  416 + result.put(ci.getXlBm() + "_" + ci.getDate(), ci.getLevel());
  417 + }
  418 +
  419 + lineDate2Level = result;
  420 + }
368 421 }
369 422 }
... ...
src/main/java/com/bsth/data/gpsdata_v2/load/GatewayHttpLoader.java
... ... @@ -64,6 +64,7 @@ public class GatewayHttpLoader implements ApplicationContextAware{
64 64 response = httpClient.execute(get);
65 65 entity = response.getEntity();
66 66  
  67 + logger.info("entity:" + entity + "get:" + get);
67 68 if(null == entity)
68 69 return list;
69 70  
... ... @@ -74,6 +75,7 @@ public class GatewayHttpLoader implements ApplicationContextAware{
74 75 while ((str = br.readLine()) != null)
75 76 sb.append(str);
76 77  
  78 + logger.info("gps:" + sb.toString());
77 79 list = JSON.parseArray(JSON.parseObject(sb.toString()).getString("data"), GpsEntity.class);
78 80 //过滤掉无效的点位
79 81 list = GpsDataUtils.clearInvalid(list);
... ...
src/main/java/com/bsth/data/report_register/ReportRegisterService.java 0 → 100644
  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 0 → 100644
  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 0 → 100644
  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 0 → 100644
  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/calc/CalcInterval.java
... ... @@ -6,123 +6,167 @@ import javax.persistence.Entity;
6 6 import javax.persistence.GeneratedValue;
7 7 import javax.persistence.Id;
8 8 import javax.persistence.Table;
  9 +import javax.persistence.Transient;
9 10  
  11 +import com.bsth.data.BasicData;
  12 +
  13 +/**
  14 + * @author bsth-a
  15 + *
  16 + */
10 17 @Entity
11   -@Table(name = "calc_interval")
  18 +@Table(name = "bsth_c_calc_interval")
12 19 public class CalcInterval {
13 20 /* 主键*/
14 21 @Id
15 22 @GeneratedValue
16 23 private Long id;
17 24 /* 公司代码*/
18   - private String gsdm;
19   - /* 公司名称*/
20   - private String gsname;
  25 + private String gsbm;
21 26 /* 分公司代码*/
22   - private String fgsdm;
23   - /* 分公司名称*/
24   - private String fgsname;
25   - /* 日期*/
26   - private Date rq;
  27 + private String fgsbm;
27 28 /* 日期字符串*/
28   - private String rqStr;
  29 + private String date;
29 30 /* 线路编码*/
30   - private String xl;
  31 + private String xlBm;
31 32 /* 线路名称*/
32 33 private String xlName;
33   - /* 大间隔次数*/
34   - private int djg;
35   - /* 大间隔次数(早高峰)*/
36   - private int djgM;
37   - /* 大间隔次数(晚高峰)*/
38   - private int djgA;
39   - /* 最大大间隔时间*/
40   - private int djgTime;
41   - /* 备注*/
42   - private String remark;
  34 + /*大间隔等级*/
  35 + private String level;
  36 + /*等级具体时间*/
  37 + private Integer levelTime;
  38 + /*全日大间隔次数*/
  39 + private Integer djgAll;
  40 + /*高峰大间隔次数*/
  41 + private Integer djgGf;
  42 + /*早高峰大间隔次数*/
  43 + private Integer djgZgf;
  44 + /*晚高峰大间隔次数*/
  45 + private Integer djgWgf;
  46 + /*低谷大间隔次数*/
  47 + private Integer djgDg;
  48 + /*最大间隔时间*/
  49 + private Integer djgTime;
  50 + /*数据创建时间*/
  51 + private Date createtime;
  52 + /*数据修改时间*/
  53 + private Date updatetime;
  54 +
  55 + /*公司名字*/
  56 + @Transient
  57 + private String gsname;
  58 + /*分公司名字*/
  59 + @Transient
  60 + private String fgsname;
43 61 public Long getId() {
44 62 return id;
45 63 }
46 64 public void setId(Long id) {
47 65 this.id = id;
48 66 }
49   - public String getGsdm() {
50   - return gsdm;
  67 + public String getGsbm() {
  68 + return gsbm;
51 69 }
52   - public void setGsdm(String gsdm) {
53   - this.gsdm = gsdm;
  70 + public void setGsbm(String gsbm) {
  71 + this.gsbm = gsbm;
54 72 }
55   - public String getGsname() {
56   - return gsname;
  73 + public String getFgsbm() {
  74 + return fgsbm;
57 75 }
58   - public void setGsname(String gsname) {
59   - this.gsname = gsname;
  76 + public void setFgsbm(String fgsbm) {
  77 + this.fgsbm = fgsbm;
60 78 }
61   - public String getFgsdm() {
62   - return fgsdm;
  79 + public String getDate() {
  80 + return date;
63 81 }
64   - public void setFgsdm(String fgsdm) {
65   - this.fgsdm = fgsdm;
  82 + public void setDate(String date) {
  83 + this.date = date;
66 84 }
67   - public String getFgsname() {
68   - return fgsname;
  85 + public String getXlBm() {
  86 + return xlBm;
69 87 }
70   - public void setFgsname(String fgsname) {
71   - this.fgsname = fgsname;
  88 + public void setXlBm(String xlBm) {
  89 + this.xlBm = xlBm;
72 90 }
73   - public Date getRq() {
74   - return rq;
  91 + public String getXlName() {
  92 + return xlName;
75 93 }
76   - public void setRq(Date rq) {
77   - this.rq = rq;
  94 + public void setXlName(String xlName) {
  95 + this.xlName = xlName;
78 96 }
79   - public String getRqStr() {
80   - return rqStr;
  97 + public String getLevel() {
  98 + return level;
81 99 }
82   - public void setRqStr(String rqStr) {
83   - this.rqStr = rqStr;
  100 + public void setLevel(String level) {
  101 + this.level = level;
84 102 }
85   - public String getXl() {
86   - return xl;
  103 + public Integer getLevelTime() {
  104 + return levelTime;
87 105 }
88   - public void setXl(String xl) {
89   - this.xl = xl;
  106 + public void setLevelTime(Integer levelTime) {
  107 + this.levelTime = levelTime;
90 108 }
91   - public String getXlName() {
92   - return xlName;
  109 + public Integer getDjgAll() {
  110 + return djgAll;
93 111 }
94   - public void setXlName(String xlName) {
95   - this.xlName = xlName;
  112 + public void setDjgAll(Integer djgAll) {
  113 + this.djgAll = djgAll;
  114 + }
  115 + public Integer getDjgGf() {
  116 + return djgGf;
96 117 }
97   - public int getDjg() {
98   - return djg;
  118 + public void setDjgGf(Integer djgGf) {
  119 + this.djgGf = djgGf;
  120 + }
  121 +
  122 + public Integer getDjgZgf() {
  123 + return djgZgf;
99 124 }
100   - public void setDjg(int djg) {
101   - this.djg = djg;
  125 + public void setDjgZgf(Integer djgZgf) {
  126 + this.djgZgf = djgZgf;
102 127 }
103   - public int getDjgM() {
104   - return djgM;
  128 + public Integer getDjgWgf() {
  129 + return djgWgf;
105 130 }
106   - public void setDjgM(int djgM) {
107   - this.djgM = djgM;
  131 + public void setDjgWgf(Integer djgWgf) {
  132 + this.djgWgf = djgWgf;
108 133 }
109   - public int getDjgA() {
110   - return djgA;
  134 + public Integer getDjgDg() {
  135 + return djgDg;
111 136 }
112   - public void setDjgA(int djgA) {
113   - this.djgA = djgA;
  137 + public void setDjgDg(Integer djgDg) {
  138 + this.djgDg = djgDg;
114 139 }
115   - public int getDjgTime() {
  140 + public Integer getDjgTime() {
116 141 return djgTime;
117 142 }
118   - public void setDjgTime(int djgTime) {
  143 + public void setDjgTime(Integer djgTime) {
119 144 this.djgTime = djgTime;
120 145 }
121   - public String getRemark() {
122   - return remark;
  146 + public Date getCreatetime() {
  147 + return createtime;
  148 + }
  149 + public void setCreatetime(Date createtime) {
  150 + this.createtime = createtime;
  151 + }
  152 + public Date getUpdatetime() {
  153 + return updatetime;
  154 + }
  155 + public void setUpdatetime(Date updatetime) {
  156 + this.updatetime = updatetime;
  157 + }
  158 + public String getGsname() {
  159 + return BasicData.businessCodeNameMap.get(this.gsbm);
123 160 }
124   - public void setRemark(String remark) {
125   - this.remark = remark;
  161 + public void setGsname(String gsname) {
  162 + this.gsname = gsname;
  163 + }
  164 + public String getFgsname() {
  165 + return BasicData.businessFgsCodeNameMap.get(this.fgsbm+"_"+this.gsbm);
126 166 }
  167 + public void setFgsname(String fgsname) {
  168 + this.fgsname = fgsname;
  169 + }
  170 +
127 171  
128 172 }
... ...
src/main/java/com/bsth/repository/calc/CalcIntervalRepository.java
... ... @@ -2,15 +2,13 @@ package com.bsth.repository.calc;
2 2  
3 3 import java.util.List;
4 4  
5   -import javax.transaction.Transactional;
  5 +import org.springframework.data.jpa.repository.Query;
  6 +import org.springframework.data.repository.query.Param;
  7 +import org.springframework.stereotype.Repository;
6 8  
7 9 import com.bsth.entity.calc.CalcInterval;
8 10 import com.bsth.repository.BaseRepository;
9 11  
10   -import org.springframework.data.jpa.repository.Modifying;
11   -import org.springframework.data.jpa.repository.Query;
12   -import org.springframework.stereotype.Repository;
13   -
14 12 /**
15 13 *
16 14 */
... ... @@ -18,23 +16,36 @@ import org.springframework.stereotype.Repository;
18 16 public interface CalcIntervalRepository extends BaseRepository<CalcInterval, Integer>{
19 17  
20 18 //按照时间段统计,公司下线路
21   - @Query(value="select DISTINCT c from CalcInterval c where c.xl like %?1% and c.rqStr between ?2 and ?3 and c.gsdm like %?4% and c.fgsdm like %?5% order by c.xl")
22   - List<CalcInterval> selectByDateAndLine(String line,String date,String date2,String gsdm,String fgsdm);
  19 + @Query(value="select DISTINCT c from CalcInterval c where c.date >= ?1 and c.date<= ?2 and c.gsbm like %?3% and c.fgsbm like %?4% and c.level like %?5% order by c.xlBm")
  20 + List<CalcInterval> selectByDateAndCompany(String date,String date2,String gsdm,String fgsdm,String level);
23 21  
24   - //按照时间段统计,单条线路
25   - @Query(value="select DISTINCT c from CalcInterval c where c.xl = ?1 and c.rqStr between ?2 and ?3 order by c.xl")
26   - List<CalcInterval> selectByDateAndLine(String line,String date,String date2);
  22 + //按照时间,公司下线路
  23 + @Query(value="select DISTINCT c from CalcInterval c where c.date = ?1 and c.gsbm like %?2% and c.fgsbm like %?3% and c.level like %?4% order by c.xlBm")
  24 + List<CalcInterval> selectByDateAndCompany(String date,String gsdm,String fgsdm,String level);
27 25  
28   - //按照日期和线路删除数据
29   - @Modifying
30   - @Transactional
31   - @Query(value = "delete CalcInterval c where c.rqStr=?1 and c.xl=?2")
32   - void deleteByDateAndLine(String date, String line);
33 26  
34   - //按照日期删除数据
35   - @Modifying
36   - @Transactional
37   - @Query(value = "delete CalcInterval c where c.rqStr=?1")
38   - void deleteByDate(String date);
  27 + //按照时间段统计,单条线路
  28 + @Query(value="select DISTINCT c from CalcInterval c where c.xlBm = ?1 and c.date >= ?2 and c.date <=?3 and c.level like %?4% order by c.xlBm")
  29 + List<CalcInterval> selectByDateAndLine(String line,String date,String date2,String level);
  30 +
39 31  
  32 + //按照时间,单条线路
  33 + @Query(value="select DISTINCT c from CalcInterval c where c.xlBm = ?1 and c.date = ?2 and c.level like %?3% order by c.xlBm")
  34 + List<CalcInterval> selectByDateAndLine(String line,String date,String level);
  35 +
  36 + //按照时间段,公司统计
  37 + @Query(value="select gsbm,fgsbm,xl_bm,SUM(djg_all) as djgAll,SUM(djg_gf) as djgGf,SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime "
  38 + + " from bsth_c_calc_interval where gsbm like %?1% and fgsbm like %?2% and date >=?3 and date <=?4 "
  39 + + " group by xl_bm,gsbm,fgsbm",nativeQuery=true)
  40 + List<Object[]> countByDateAndLine(String gsbm,String fgsbm,String date,String date2);
  41 +
  42 + //按照时间段,线路统计
  43 + @Query(value="select gsbm,fgsbm,xl_bm,SUM(djg_all) as djgAll,SUM(djg_gf) as djgGf,SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime "
  44 + + " from bsth_c_calc_interval where xl_bm =?1 and date >=?2 and date <=?3 "
  45 + + " group by xl_bm,gsbm,fgsbm",nativeQuery=true)
  46 + List<Object[]> countByDateAndLine(String xlbm,String date,String date2);
  47 +
  48 + // 按日期查询
  49 + @Query(value="select c from CalcInterval c where c.date in (:dates)")
  50 + List<CalcInterval> selectByDates(@Param("dates")List<String> dates);
40 51 }
... ...
src/main/java/com/bsth/service/calc/CalcIntervalService.java 0 → 100644
  1 +package com.bsth.service.calc;
  2 +
  3 +import java.util.List;
  4 +import java.util.Map;
  5 +
  6 +import com.bsth.entity.calc.CalcInterval;
  7 +import com.bsth.service.BaseService;
  8 +
  9 +/**
  10 + * Created by 17/11/16.
  11 + */
  12 +public interface CalcIntervalService extends BaseService<CalcInterval,Integer> {
  13 +
  14 + List<Map<String,Object>> countList(Map<String, Object> map);
  15 + List<Map<String,Object>> listInterval(Map<String, Object> map);
  16 + List<Map<String,Object>> interval(Map<String, Object> map);
  17 +}
... ...
src/main/java/com/bsth/service/calc/impl/CalcIntervalServiceImpl.java 0 → 100644
  1 +package com.bsth.service.calc.impl;
  2 +
  3 +import java.sql.ResultSet;
  4 +import java.sql.SQLException;
  5 +import java.text.DecimalFormat;
  6 +import java.text.ParseException;
  7 +import java.text.SimpleDateFormat;
  8 +import java.util.ArrayList;
  9 +import java.util.Calendar;
  10 +import java.util.Collections;
  11 +import java.util.Comparator;
  12 +import java.util.Date;
  13 +import java.util.GregorianCalendar;
  14 +import java.util.HashMap;
  15 +import java.util.Iterator;
  16 +import java.util.List;
  17 +import java.util.Map;
  18 +
  19 +import org.apache.commons.lang3.StringUtils;
  20 +import org.springframework.beans.factory.annotation.Autowired;
  21 +import org.springframework.jdbc.core.JdbcTemplate;
  22 +import org.springframework.jdbc.core.RowMapper;
  23 +import org.springframework.stereotype.Service;
  24 +
  25 +import com.bsth.data.BasicData;
  26 +import com.bsth.entity.Line;
  27 +import com.bsth.entity.calc.CalcInterval;
  28 +import com.bsth.entity.realcontrol.ScheduleRealInfo;
  29 +import com.bsth.entity.sheet.CalcSheet;
  30 +import com.bsth.entity.sheet.Sheet;
  31 +import com.bsth.repository.LineRepository;
  32 +import com.bsth.repository.calc.CalcIntervalRepository;
  33 +import com.bsth.repository.realcontrol.ScheduleRealInfoRepository;
  34 +import com.bsth.service.calc.CalcIntervalService;
  35 +import com.bsth.service.impl.BaseServiceImpl;
  36 +import com.bsth.util.ComparableReal;
  37 +import com.bsth.util.ReportUtils;
  38 +
  39 +@Service
  40 +public class CalcIntervalServiceImpl extends BaseServiceImpl<CalcInterval,Integer> implements CalcIntervalService {
  41 + private static long zgf1 = 6 * 60 + 31,
  42 + zgf2 = 8 * 60 + 30,
  43 + wgf1 = 16 * 60 + 1,
  44 + wgf2 = 18 * 60;
  45 +
  46 + @Autowired
  47 + CalcIntervalRepository calcIntervalRepository;
  48 + @Autowired
  49 + ScheduleRealInfoRepository scheduleRealInfoRepository;
  50 + @Autowired
  51 + LineRepository lineRepository;
  52 + @Autowired
  53 + JdbcTemplate jdbcTemplate;
  54 + @Override
  55 + public List<Map<String, Object>> countList(Map<String, Object> map) {
  56 + // TODO Auto-generated method stub
  57 + final DecimalFormat df = new DecimalFormat("0.00");
  58 + List<Map<String, Object>> list=new ArrayList<>();
  59 + String level=map.get("levelType").toString();
  60 + String line=map.get("line").toString().trim();
  61 + String gs=map.get("gs").toString().trim();
  62 + String fgs=map.get("fgs").toString().trim();
  63 + String sDate=map.get("date").toString();
  64 + String eDate=map.get("endDate").toString();
  65 +
  66 + //D级线路显示发车准点率
  67 + if(level.equals("D")){
  68 + String sql1=" select xl_bm,gsbm,fgsbm,xl_name from bsth_c_calc_interval where date >='"+sDate+"' and date <= '"+eDate+"' and `level`='D'";
  69 + if(line.equals("")){
  70 + sql1 +=" and gsbm like '%"+gs+"%' and fgsbm like '%"+fgs+"%'";
  71 + }else{
  72 + sql1 +=" and xl_bm ='"+line+"'";
  73 + }
  74 + sql1+=" group by xl_bm,gsbm,fgsbm,xl_name";
  75 +
  76 + String sql2="select gsdm,fgsdm,xl,xl_name,max(id) as id,sum(jhszfcs) as jhszfcs,"
  77 + + " sum(sjszfczds) as sjszfczds,sum(sjszddzds) as sjszddzds from bsth_c_calc_sheet where date >= '"+sDate+"' and date <= '"+eDate+"'";
  78 + if(line.trim().equals("")){
  79 + sql2 +=" and gsdm = '"+gs+"' and fgsdm like '%"+fgs+"%'";
  80 + }else{
  81 + sql2 +=" and xl ='"+line+"'";
  82 + }
  83 + sql2 +=" group by gsdm,fgsdm,xl,xl_name";
  84 +
  85 + String sql="select b.* from ("+sql1+") a left join ("+sql2+") b"
  86 + + " on a.xl_bm=b.xl and a.gsbm=b.gsdm and a.fgsbm=b.fgsdm and a.xl_name=b.xl_name";
  87 +
  88 + list=jdbcTemplate.query(sql,
  89 + new RowMapper<Map<String,Object>>(){
  90 + @Override
  91 + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
  92 + Map<String, Object> m=new HashMap<String,Object>();
  93 + m.put("gs", BasicData.businessCodeNameMap.get(rs.getString("gsdm")));
  94 + m.put("fgs", BasicData.businessFgsCodeNameMap.get(rs.getString("fgsdm")+"_"+rs.getString("gsdm")));
  95 + m.put("xlBm", rs.getString("xl"));
  96 + m.put("xlName", rs.getString("xl_name"));
  97 + m.put("id", rs.getInt("id"));
  98 + m.put("jhszfcs", rs.getString("jhszfcs"));
  99 + m.put("sjszfczds", rs.getString("sjszfczds"));
  100 + m.put("sjszddzds", rs.getString("sjszddzds"));
  101 + int jhfc=rs.getInt("jhszfcs");
  102 + int zdfc=rs.getInt("sjszfczds");
  103 + int zddd=rs.getInt("sjszddzds");
  104 + if(jhfc>0){
  105 + double zdl=(zdfc*1.0)/(jhfc*1.0)*100;
  106 + m.put("szfczdl", df.format(zdl)+"%");
  107 + zdl=(zddd*1.0)/(jhfc*1.0)*100;
  108 + m.put("szddzdl", df.format(zdl)+"%");
  109 + }else{
  110 + m.put("szfczdl", "0.0%");
  111 + m.put("szddzdl", "0.0%");
  112 +
  113 + }
  114 + return m;
  115 + }
  116 + });
  117 + }else{
  118 + String sql="select gsbm,fgsbm,xl_bm,xl_name,MAX(id) as id,SUM(djg_all) as djgAll,SUM(djg_gf) as djgGf,"
  119 + + "SUM(djg_dg) as djgDg,SUM(djg_zgf) as djgZgf,SUM(djg_wgf) as djgWgf,MAX(djg_time) as djgTime "
  120 + + "from bsth_c_calc_interval where date>= '"+sDate+"' and date<='"+eDate+"' and level <> 'D' ";
  121 + if(line.equals("")){
  122 + sql +=" and gsbm like '%"+gs+"%' and fgsbm like '%"+fgs+"%'";
  123 + }else{
  124 + sql +=" and xl_bm ='"+line+"'";
  125 + }
  126 + sql += " group by xl_bm,gsbm,fgsbm,xl_name";
  127 +
  128 + list=jdbcTemplate.query(sql,
  129 + new RowMapper<Map<String,Object>>(){
  130 + @Override
  131 + public Map<String, Object> mapRow(ResultSet rs, int rowNum) throws SQLException {
  132 + Map<String, Object> m=new HashMap<String,Object>();
  133 + m.put("gs", BasicData.businessCodeNameMap.get(rs.getString("gsbm")));
  134 + m.put("fgs", BasicData.businessFgsCodeNameMap.get(rs.getString("fgsbm")+"_"+rs.getString("gsbm")));
  135 + m.put("xlBm", rs.getString("xl_bm"));
  136 + m.put("xlName", rs.getString("xl_name"));
  137 + m.put("id", rs.getInt("id"));
  138 + m.put("djgAll", rs.getString("djgAll"));
  139 + m.put("djgGf", rs.getString("djgGf"));
  140 + m.put("djgZgf", rs.getString("djgZgf"));
  141 + m.put("djgWgf", rs.getString("djgWgf"));
  142 + m.put("djgDg", rs.getString("djgDg"));
  143 + m.put("djgTime", rs.getString("djgTime"));
  144 + return m;
  145 + }
  146 + });
  147 + }
  148 +
  149 + if(map.get("type").equals("export")){
  150 + String lineName="";
  151 + if(!line.equals("")){
  152 + lineName=list.get(0).get("xlName").toString();
  153 + }else if(!fgs.equals("")){
  154 + lineName=list.get(0).get("fgs").toString();
  155 + }else{
  156 + lineName=list.get(0).get("gs").toString();
  157 + }
  158 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  159 + Map<String, Object> m = new HashMap<String, Object>();
  160 + m.put("sdate", sDate);
  161 + m.put("eDate", eDate);
  162 + ReportUtils ee = new ReportUtils();
  163 + try {
  164 + String dateTime = "";
  165 + if(sDate.equals(eDate)){
  166 + dateTime = sDate.replaceAll("-", "");
  167 + } else {
  168 + dateTime = sDate.replaceAll("-", "")+"-"+
  169 + eDate.replaceAll("-", "");
  170 + }
  171 + listI.add(list.iterator());
  172 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  173 + String xls="";
  174 + String xlsName="";
  175 + if(level.equals("D")){
  176 + xls="calcSheetList.xls";
  177 + xlsName="发车到站准点率.xls";
  178 + }else{
  179 + xls="calcIntervalCount.xls";
  180 + xlsName="大间隔汇总表.xls";
  181 + }
  182 +
  183 + ee.excelReplace(listI, new Object[]{m}, path + "mould/" + ""+xls,
  184 + path + "export/"+dateTime+"-"+lineName+"-"+xlsName);
  185 + } catch (Exception e) {
  186 + // TODO: handle exception
  187 + e.printStackTrace();
  188 + }
  189 + }
  190 + return list;
  191 + }
  192 + @Override
  193 + public List<Map<String, Object>> listInterval(Map<String, Object> map) {
  194 + // TODO Auto-generated method stub
  195 + String line=map.get("line").toString();
  196 + String date=map.get("date").toString();
  197 + String endDate=map.get("endDate").toString();
  198 + List<CalcInterval> listAll=calcIntervalRepository.selectByDateAndLine(line, date, endDate, "");
  199 + List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>();
  200 + for (int i = 0; i < listAll.size(); i++) {
  201 + CalcInterval t=listAll.get(i);
  202 + if(!t.getLevel().equals("D") && t.getDjgAll()>0){
  203 + Map<String, Object> m=new HashMap<>();
  204 + m.put("gs", t.getGsname());
  205 + m.put("fgs", t.getFgsname());
  206 + m.put("date", t.getDate());
  207 + m.put("xl", t.getXlName());
  208 + m.put("xlBm", t.getXlBm());
  209 + m.put("level", t.getLevel());
  210 + m.put("djgAll", t.getDjgAll());
  211 + m.put("djgGf", t.getDjgGf());
  212 + m.put("djgZgf", t.getDjgZgf());
  213 + m.put("djgWgf", t.getDjgWgf());
  214 + m.put("djgDg", t.getDjgDg());
  215 + m.put("djgTime", t.getDjgTime());
  216 + tempList.add(m);
  217 + }
  218 + }
  219 + if(map.get("type").equals("export")){
  220 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  221 + Map<String, Object> m = new HashMap<String, Object>();
  222 + m.put("date", date);
  223 + m.put("endDate", endDate);
  224 + ReportUtils ee = new ReportUtils();
  225 + try {
  226 + listI.add(tempList.iterator());
  227 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  228 + ee.excelReplace(listI, new Object[]{m}, path + "mould/" + "calcIntervalList1.xls",
  229 + path + "export/大间距汇总表"+date.replaceAll("-", "")+"-"+endDate.replaceAll("-", "")+".xls");
  230 + } catch (Exception e) {
  231 + // TODO: handle exception
  232 + e.printStackTrace();
  233 + }
  234 +
  235 + }
  236 + return tempList;
  237 + }
  238 +
  239 + @Override
  240 + public List<Map<String, Object>> interval(Map<String, Object> map) {
  241 + // TODO Auto-generated method stub
  242 + List<Map<String, Object>> list=new ArrayList<>();
  243 + String line=map.get("line").toString();
  244 + String date=map.get("date").toString();
  245 + List<ScheduleRealInfo> listReal=scheduleRealInfoRepository.scheduleDaily(line, date);
  246 + List<CalcInterval> listInterval=calcIntervalRepository.selectByDateAndLine(line, date, "");
  247 + String level=listInterval.get(0).getLevel();
  248 + if(listReal.size()>0){
  249 + Line t=lineRepository.findByLineCode(line);
  250 + long minFcsj = minFcsjs(t.getId());
  251 + list=calcIntervalList(listReal, minFcsj,level,t);
  252 + }
  253 + if(map.get("type").toString().equals("export")){
  254 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  255 + Map<String, Object> m = new HashMap<String, Object>();
  256 + m.put("date", date);
  257 + ReportUtils ee = new ReportUtils();
  258 + try {
  259 + listI.add(list.iterator());
  260 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  261 + ee.excelReplace(listI, new Object[]{m}, path + "mould/" + "interval.xls",
  262 + path + "export/"+date+"大间隔详细.xls");
  263 + } catch (Exception e) {
  264 + // TODO: handle exception
  265 + e.printStackTrace();
  266 + }
  267 + }
  268 + return list;
  269 + }
  270 +
  271 + private List<Map<String, Object>> calcIntervalList(List<ScheduleRealInfo> lists,long minFcsj,String level,Line line) {
  272 + List<ScheduleRealInfo> listjh0 = new ArrayList<ScheduleRealInfo>();
  273 + List<ScheduleRealInfo> listjh1 = new ArrayList<ScheduleRealInfo>();
  274 + List<ScheduleRealInfo> listsj0 = new ArrayList<ScheduleRealInfo>();
  275 + List<ScheduleRealInfo> listsj1 = new ArrayList<ScheduleRealInfo>();
  276 + List<Map<String, Object>> list=new ArrayList<>();
  277 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm");
  278 + SimpleDateFormat sdf_ = new SimpleDateFormat("yyyy-MM-dd");
  279 + String xlName=lists.get(0).getXlName();
  280 + String scheduleDate=lists.get(0).getScheduleDateStr();
  281 + for (int j = 0; j < lists.size(); j++) {
  282 + ScheduleRealInfo s = lists.get(j);
  283 + boolean fage=false;
  284 + if(s.getBcType().equals("normal")){
  285 + fage=true;
  286 + }
  287 + if(s.getBcType().equals("region")){
  288 + if(s.getXlDir().equals("0")){
  289 + if(s.getQdzName().equals(line.getStartStationName()));
  290 + fage=true;
  291 + }else{
  292 + if(s.getQdzName().equals(line.getEndStationName()));
  293 + fage=true;
  294 + }
  295 + }
  296 + if (fage) {
  297 + String[] fcsj = s.getFcsj().split(":");
  298 + Long fcsjL = Long.parseLong(fcsj[0]) * 60 + Long.parseLong(fcsj[1]);
  299 + Long fcsjT = 0L;
  300 + if (fcsjL < minFcsj) {
  301 + Calendar calendar = new GregorianCalendar();
  302 + calendar.setTime(s.getScheduleDate());
  303 + calendar.add(calendar.DATE, 1);
  304 + Date date = calendar.getTime();
  305 + try {
  306 + fcsjT = sdf.parse(sdf_.format(date) + " " + s.getFcsj()).getTime();
  307 + } catch (ParseException e) {
  308 + // TODO Auto-generated catch block
  309 + e.printStackTrace();
  310 + }
  311 + } else {
  312 + try {
  313 + fcsjT = sdf.parse(s.getScheduleDateStr() + " " + s.getFcsj()).getTime();
  314 + } catch (ParseException e) {
  315 + // TODO Auto-generated catch block
  316 + e.printStackTrace();
  317 + }
  318 + }
  319 + Long fcsjAcual = 0L;
  320 + if (StringUtils.isEmpty(s.getFcsjActual())) {
  321 + s.setFcsjActualTime(0L);
  322 + s.setFcsjT(fcsjT);
  323 + } else {
  324 + try {
  325 + fcsjAcual = sdf.parse(s.getRealExecDate() + " " + s.getFcsjActual()).getTime();
  326 + s.setFcsjActualTime(fcsjAcual);
  327 + s.setFcsjT(fcsjT);
  328 + } catch (ParseException e) {
  329 + // TODO Auto-generated catch block
  330 + e.printStackTrace();
  331 + }
  332 + }
  333 +
  334 + if (s.isSflj()) {
  335 + if(StringUtils.isNotEmpty(s.getFcsjActual())){
  336 + if (s.getXlDir().equals("0")) {
  337 + listsj0.add(s);
  338 + } else {
  339 + listsj1.add(s);
  340 + }
  341 + }
  342 + } else {
  343 + if (s.getXlDir().equals("0")) {
  344 + if(StringUtils.isNotEmpty(s.getFcsjActual())){
  345 + listsj0.add(s);
  346 + }
  347 + listjh0.add(s);
  348 + } else {
  349 + if(StringUtils.isNotEmpty(s.getFcsjActual())){
  350 + listsj1.add(s);
  351 + }
  352 + listjh1.add(s);
  353 + }
  354 + }
  355 + }
  356 + }
  357 + /*
  358 + * 所有班次信息按上下行计划实际班次分组和根据计划实际发车时间排序
  359 + */
  360 + Collections.sort(listjh0, new ComparableJhfc());
  361 + Collections.sort(listjh1, new ComparableJhfc());
  362 + Collections.sort(listsj0, new ComparableAcual());
  363 + Collections.sort(listsj1, new ComparableAcual());
  364 +
  365 + long max_time=0;
  366 +
  367 + String jhfc="";
  368 + String sjfc="";
  369 + if(listsj0.size()>2){
  370 + //首班与首二班,末班与末二班中间的间隔不参与到统计
  371 + int p_time=0;
  372 + boolean p_fage=false; //判断两个班次是否为高峰班次,只有前后两个班次都是高峰班次,班次大间隔标准才用高峰标准
  373 + long p_actual_time=0;
  374 + String p_type="";
  375 + for (int j = 1; j < listsj0.size()-1; j++) {
  376 + boolean isAdd=false; //判断是否需要往map里面添加值
  377 + ScheduleRealInfo s =listsj0.get(j);
  378 + Map<String, Object> mm=new HashMap<>();
  379 + String[] fcsj = s.getFcsjActual().split(":");
  380 + int time = Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1]);
  381 + boolean fage=false;
  382 + String type="";
  383 + if (time >= zgf1 && time <= zgf2) {
  384 + fage=true;
  385 + type="zgf";
  386 + } else if (time >= wgf1 && time <= wgf2) {
  387 + fage=true;
  388 + type="wgf";
  389 + } else {
  390 + fage=false;
  391 + }
  392 + long sub_time=(s.getFcsjActualTime()-p_actual_time)/1000/60;
  393 + if(p_time>0){
  394 + if(sub_time>max_time){
  395 + max_time=sub_time;
  396 + }
  397 + if(fage&&p_fage){
  398 + //高峰间隔统计
  399 + if("zgf".equals(type) && type.equals(p_type)){
  400 + if(level.equals("A")){
  401 + if(sub_time >15)
  402 + isAdd=true;
  403 +
  404 + }else if(level.equals("B")){
  405 + if(sub_time >20)
  406 + isAdd=true;
  407 + }else if(level.equals("C")){
  408 + if(sub_time >25)
  409 + isAdd=true;
  410 + }else {
  411 + //D类不计算大间隔时间,通过发车准点率
  412 + }
  413 + }else if("wgf".equals(type) && type.equals(p_type)){
  414 + if(level.equals("A")){
  415 + if(sub_time >15)
  416 + isAdd=true;
  417 + }else if(level.equals("B")){
  418 + if(sub_time >20)
  419 + isAdd=true;
  420 + }else if(level.equals("C")){
  421 + if(sub_time >25)
  422 + isAdd=true;
  423 + }else {
  424 + //D类不计算大间隔时间,通过发车准点率
  425 + }
  426 + }
  427 + }else{
  428 + //平谷间隔统计
  429 + if(level.equals("A")){
  430 + if(sub_time >29)
  431 + isAdd=true;
  432 + }else if(level.equals("B")){
  433 + if(sub_time >29)
  434 + isAdd=true;
  435 + }else if(level.equals("C")){
  436 + if(sub_time >40)
  437 + isAdd=true;
  438 + }else {
  439 + //D类不计算大间隔时间,通过发车准点率
  440 + max_time=0;
  441 + }
  442 + }
  443 + }
  444 + if(isAdd){
  445 + mm.put("xlName", xlName);
  446 + mm.put("level", level);
  447 + mm.put("jhfc1", jhfc);
  448 + mm.put("sjfc1", sjfc);
  449 + mm.put("jhfc2", s.getFcsj());
  450 + mm.put("sjfc2", s.getFcsjActual());
  451 + mm.put("subTime", sub_time);
  452 + mm.put("date", scheduleDate);
  453 + mm.put("station", s.getQdzName());
  454 + list.add(mm);
  455 + }
  456 + p_fage=fage;
  457 + p_type=type;
  458 + p_time =time;
  459 + p_actual_time=s.getFcsjActualTime();
  460 + jhfc=s.getFcsj();
  461 + sjfc=s.getFcsjActual();
  462 + }
  463 + }
  464 +
  465 +
  466 + jhfc="";
  467 + sjfc="";
  468 + if(listsj1.size()>2){
  469 + //首班与首二班,末班与末二班中间的间隔不参与到统计
  470 + int p_time=0;
  471 + boolean p_fage=false; //判断两个班次是否为高峰班次,只有前后两个班次都是高峰班次,班次大间隔标准才用高峰标准
  472 + long p_actual_time=0;
  473 + String p_type="";
  474 + for (int j = 1; j < listsj1.size()-1; j++) {
  475 + boolean isAdd=false; //判断是否需要往map里面添加值
  476 + ScheduleRealInfo s =listsj1.get(j);
  477 + Map<String, Object> mm=new HashMap<>();
  478 + String[] fcsj = s.getFcsjActual().split(":");
  479 + int time = Integer.parseInt(fcsj[0]) * 60 + Integer.parseInt(fcsj[1]);
  480 + boolean fage=false;
  481 + String type="";
  482 + if (time >= zgf1 && time <= zgf2) {
  483 + fage=true;
  484 + type="zgf";
  485 + } else if (time >= wgf1 && time <= wgf2) {
  486 + fage=true;
  487 + type="wgf";
  488 + } else {
  489 + fage=false;
  490 + }
  491 + long sub_time=(s.getFcsjActualTime()-p_actual_time)/1000/60;
  492 + if(p_time>0){
  493 + if(sub_time>max_time){
  494 + max_time=sub_time;
  495 + }
  496 + if(fage&&p_fage){
  497 + //高峰间隔统计
  498 + if("zgf".equals(type) && type.equals(p_type)){
  499 + if(level.equals("A")){
  500 + if(sub_time >15)
  501 + isAdd=true;
  502 +
  503 + }else if(level.equals("B")){
  504 + if(sub_time >20)
  505 + isAdd=true;
  506 + }else if(level.equals("C")){
  507 + if(sub_time >25)
  508 + isAdd=true;
  509 + }else {
  510 + //D类不计算大间隔时间,通过发车准点率
  511 + }
  512 + }else if("wgf".equals(type) && type.equals(p_type)){
  513 + if(level.equals("A")){
  514 + if(sub_time >15)
  515 + isAdd=true;
  516 + }else if(level.equals("B")){
  517 + if(sub_time >20)
  518 + isAdd=true;
  519 + }else if(level.equals("C")){
  520 + if(sub_time >25)
  521 + isAdd=true;
  522 + }else {
  523 + //D类不计算大间隔时间,通过发车准点率
  524 + }
  525 + }
  526 + }else{
  527 + //平谷间隔统计
  528 + if(level.equals("A")){
  529 + if(sub_time >29)
  530 + isAdd=true;
  531 + }else if(level.equals("B")){
  532 + if(sub_time >29)
  533 + isAdd=true;
  534 + }else if(level.equals("C")){
  535 + if(sub_time >40)
  536 + isAdd=true;
  537 + }else {
  538 + //D类不计算大间隔时间,通过发车准点率
  539 + max_time=0;
  540 + }
  541 + }
  542 + }
  543 + if(isAdd){
  544 + mm.put("xlName", xlName);
  545 + mm.put("level", level);
  546 + mm.put("jhfc1", jhfc);
  547 + mm.put("sjfc1", sjfc);
  548 + mm.put("jhfc2", s.getFcsj());
  549 + mm.put("sjfc2", s.getFcsjActual());
  550 + mm.put("subTime", sub_time);
  551 + mm.put("date", scheduleDate);
  552 + mm.put("station", s.getQdzName());
  553 +
  554 + list.add(mm);
  555 + }
  556 + p_fage=fage;
  557 + p_type=type;
  558 + p_time =time;
  559 + p_actual_time=s.getFcsjActualTime();
  560 + jhfc=s.getFcsj();
  561 + sjfc=s.getFcsjActual();
  562 + }
  563 + }
  564 + return list;
  565 + }
  566 +
  567 +
  568 + private Long minFcsjs(int id){
  569 + String minfcsj="02:00";
  570 + String sqlMinYysj="select ifnull(max(start_opt),'02:00') as start_opt from bsth_c_line_config where "
  571 + + " id = ("
  572 + + "select max(id) from bsth_c_line_config where line ='"+id +"'"
  573 + + ")";
  574 + minfcsj= jdbcTemplate.queryForObject(sqlMinYysj, String.class);
  575 + String[] minSjs = minfcsj.split(":");
  576 + //车辆最早发车时间 用了过滤超第二天0点的数据
  577 + Long minSj=Long.parseLong(minSjs[0])*60+Long.parseLong(minSjs[1]);
  578 + return minSj;
  579 + }
  580 +}
  581 +
  582 +class ComparableJhfc implements Comparator<ScheduleRealInfo>{
  583 + @Override
  584 + public int compare(ScheduleRealInfo o1, ScheduleRealInfo o2) {
  585 + // TODO Auto-generated method stub
  586 + return o1.getFcsjT().compareTo(o2.getFcsjT());
  587 + }
  588 +}
  589 +
  590 +class ComparableAcual implements Comparator<ScheduleRealInfo>{
  591 + @Override
  592 + public int compare(ScheduleRealInfo o1, ScheduleRealInfo o2) {
  593 + // TODO Auto-generated method stub
  594 + return o1.getFcsjActualTime().compareTo(o2.getFcsjActualTime());
  595 + }
  596 +}
... ...
src/main/java/com/bsth/service/calc/impl/CalcToolServiceImpl.java
1 1 package com.bsth.service.calc.impl;
2 2  
3   -import java.sql.ResultSet;
4   -import java.sql.SQLException;
5 3 import java.util.ArrayList;
6 4 import java.util.Date;
7 5 import java.util.HashMap;
... ... @@ -10,7 +8,6 @@ import java.util.List;
10 8 import java.util.Map;
11 9 import java.util.Set;
12 10  
13   -import com.bsth.entity.calc.CalcInterval;
14 11 import com.bsth.entity.calc.CalcWaybill;
15 12 import com.bsth.entity.realcontrol.ChildTaskPlan;
16 13 import com.bsth.entity.realcontrol.ScheduleRealInfo;
... ... @@ -19,14 +16,12 @@ import com.bsth.repository.calc.CalcIntervalRepository;
19 16 import com.bsth.repository.calc.CalcWaybillRepository;
20 17 import com.bsth.service.calc.CalcToolService;
21 18 import com.bsth.service.calc.CalcCulateMileageService;
22   -import com.bsth.service.report.CulateMileageService;
23 19 import com.bsth.util.Arith;
24 20  
25 21 import org.slf4j.Logger;
26 22 import org.slf4j.LoggerFactory;
27 23 import org.springframework.beans.factory.annotation.Autowired;
28 24 import org.springframework.jdbc.core.JdbcTemplate;
29   -import org.springframework.jdbc.core.RowMapper;
30 25 import org.springframework.stereotype.Service;
31 26  
32 27 /**
... ... @@ -35,11 +30,6 @@ import org.springframework.stereotype.Service;
35 30 @Service
36 31 public class CalcToolServiceImpl implements CalcToolService {
37 32  
38   - @Autowired
39   - private CalcWaybillRepository clacRepository;
40   -
41   - @Autowired
42   - private CalcIntervalRepository culcIntervalRepository;
43 33  
44 34 @Autowired
45 35 private CalcCulateMileageService culateMileageService;
... ... @@ -114,50 +104,6 @@ public class CalcToolServiceImpl implements CalcToolService {
114 104 listCal.addAll(this.cul(list_, lists_, xlList, djgList));
115 105 }
116 106 }
117   -
118   - //按线路计算大间隔
119   - if(list.size() > 0){
120   - ScheduleRealInfo s = list.get(0);
121   - Map<String, Object> culateDjg = culateMileageService.culateDjg(list, lineCode, xlList, djgList);
122   - CalcInterval interval = new CalcInterval();
123   - interval.setGsdm(s.getGsBm());
124   - interval.setGsname(s.getGsName());
125   - interval.setFgsdm(s.getFgsBm());
126   - interval.setFgsname(s.getFgsName());
127   - interval.setRq(s.getScheduleDate());
128   - interval.setRqStr(s.getScheduleDateStr());
129   - interval.setXl(s.getXlBm());
130   - interval.setXlName(s.getXlName());
131   - if(culateDjg.keySet().size() > 0){
132   - if(culateDjg.containsKey("djgcsq")){
133   - interval.setDjg(Integer.valueOf(culateDjg.get("djgcsq").toString()));
134   - } else {
135   - interval.setDjg(0);
136   - }
137   - if(culateDjg.containsKey("djgcsz")){
138   - interval.setDjgM(Integer.valueOf(culateDjg.get("djgcsz").toString()));
139   - } else {
140   - interval.setDjgM(0);
141   - }
142   - if(culateDjg.containsKey("djgcsw")){
143   - interval.setDjgA(Integer.valueOf(culateDjg.get("djgcsw").toString()));
144   - } else {
145   - interval.setDjgA(0);
146   - }
147   - if(culateDjg.containsKey("djgsj")){
148   - interval.setDjgTime(Integer.valueOf(culateDjg.get("djgsj").toString()));
149   - } else {
150   - interval.setDjgTime(0);
151   - }
152   - } else {
153   - interval.setDjg(0);
154   - interval.setDjgM(0);
155   - interval.setDjgA(0);
156   - interval.setDjgTime(0);
157   - }
158   - culcIntervalRepository.save(interval);
159   - }
160   -
161 107 while(true){
162 108 int i = 0, l = 0;
163 109 boolean flag = false;
... ...
src/main/java/com/bsth/service/calc/impl/CalcWaybillServiceImpl.java
... ... @@ -68,9 +68,6 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
68 68 private CalcWaybillRepository calcRepository;
69 69  
70 70 @Autowired
71   - private CalcIntervalRepository calcIntervalRepository;
72   -
73   - @Autowired
74 71 private CalcStatisticsRepository calcStatisticsRepository;
75 72  
76 73 @Autowired
... ... @@ -92,6 +89,9 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
92 89 private ScheduleRealInfoRepository scheduleRealInfoRepository;
93 90  
94 91 @Autowired
  92 + private CalcIntervalRepository calcIntervalRepository;
  93 +
  94 + @Autowired
95 95 private LineRepository lineRepository;
96 96 @Autowired
97 97 private LineService lineService;
... ... @@ -163,10 +163,8 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
163 163 }
164 164 if(date.length() != 0 && line.length() != 0){
165 165 calcRepository.deleteByDateAndLine(date, line);
166   - calcIntervalRepository.deleteByDateAndLine(date, line);
167 166 } else if(date.length() != 0){
168 167 calcRepository.deleteByDate(date);
169   - calcIntervalRepository.deleteByDate(date);
170 168 } else {
171 169 newMap.put("status", ResponseCode.ERROR);
172 170 logger.error("save erro.", "日期不能为空");
... ... @@ -283,19 +281,15 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
283 281 List<String> keyList = new ArrayList<String>();
284 282 List<CalcWaybill> list = new ArrayList<CalcWaybill>();
285 283 List<CalcWaybill> lists = new ArrayList<CalcWaybill>();
286   - List<CalcInterval> list_ = new ArrayList<CalcInterval>();
287 284 List<Map<String, Object>> resList = new ArrayList<Map<String, Object>>();
288 285 Map<String, List<CalcWaybill>> keyMap = new HashMap<String, List<CalcWaybill>>();
289   - Map<String, List<CalcInterval>> keyMap_ = new HashMap<String, List<CalcInterval>>();
290 286  
291 287 if(line.equals("")){
292 288 //查询所有线路
293 289 list = calcRepository.scheduleByDateAndLineTj(line,date,date2,gsdm,fgsdm);
294   - list_ = calcIntervalRepository.selectByDateAndLine(line, date, date2, gsdm, fgsdm);
295 290 }else{
296 291 //查询单条线路
297 292 list = calcRepository.scheduleByDateAndLineTj2(line,date,date2);
298   - list_ = calcIntervalRepository.selectByDateAndLine(line, date, date2);
299 293 }
300 294  
301 295 for(CalcWaybill c : list){
... ... @@ -306,12 +300,6 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
306 300 }
307 301 keyMap.get(key).add(c);
308 302 }
309   - for(CalcInterval c : list_){
310   - String key = c.getXlName();
311   - if(!keyMap_.containsKey(key))
312   - keyMap_.put(key, new ArrayList<CalcInterval>());
313   - keyMap_.get(key).add(c);
314   - }
315 303 Collections.sort(keyList, new AccountXlbmStr());
316 304 for(String key : keyList){
317 305 CalcWaybill calc = keyMap.get(key).get(0);
... ... @@ -356,26 +344,6 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
356 344 calc.setSjfyylc(Arith.add(calc.getSjfyylc(), calc.getLjfyylc()));
357 345 lists.add(calc);
358 346 }
359   - CalcInterval sum_ = new CalcInterval();
360   - sum_.setXlName("合计");
361   - sum_.setDjgTime(0);
362   - for(String key : keyMap_.keySet()){
363   - CalcInterval calc = keyMap_.get(key).get(0);
364   - for(int i = 1; i < keyMap_.get(key).size(); i++){
365   - CalcInterval calc_ = keyMap_.get(key).get(i);
366   - calc.setDjg(calc.getDjg() + calc_.getDjg());
367   - calc.setDjgM(calc.getDjgM() + calc_.getDjgM());
368   - calc.setDjgA(calc.getDjgA() + calc_.getDjgA());
369   - if(calc_.getDjgTime() > calc.getDjgTime())
370   - calc.setDjgTime(calc_.getDjgTime());
371   - }
372   - sum_.setDjg(sum_.getDjg() + calc.getDjg());
373   - sum_.setDjgM(sum_.getDjgM() + calc.getDjgM());
374   - sum_.setDjgA(sum_.getDjgA() + calc.getDjgA());
375   - if(calc.getDjgTime() > sum_.getDjgTime())
376   - sum_.setDjgTime(calc.getDjgTime());
377   - }
378   -
379 347 CalcWaybill sum = new CalcWaybill();
380 348 sum.setXlName("合计");
381 349 for(CalcWaybill c : lists){
... ... @@ -459,22 +427,6 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
459 427 m.put("dtbc", c.getDtbc());
460 428 m.put("dtbc_m", c.getDtbczgf());
461 429 m.put("dtbc_a", c.getDtbcwgf());
462   - if(keyMap_.containsKey(c.getXlName()) || c.getXlName().equals("合计")){
463   - CalcInterval calc;
464   - if(c.getXlName().equals("合计"))
465   - calc = sum_;
466   - else
467   - calc = keyMap_.get(c.getXlName()).get(0);
468   - m.put("djg", calc.getDjg());
469   - m.put("djg_m", calc.getDjgM());
470   - m.put("djg_a", calc.getDjgA());
471   - m.put("djg_time", calc.getDjgTime());
472   - } else {
473   - m.put("djg", 0);
474   - m.put("djg_m", 0);
475   - m.put("djg_a", 0);
476   - m.put("djg_time", 0);
477   - }
478 430 resList.add(m);
479 431 }
480 432  
... ... @@ -533,7 +485,6 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
533 485 } else {
534 486 line = line.trim();
535 487 }
536   -
537 488 List<ScheduleRealInfo> list = new ArrayList<ScheduleRealInfo>();
538 489 List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>();
539 490 List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>();
... ... @@ -555,6 +506,14 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
555 506 for(Map<String, String> m : gsList){
556 507 list.addAll(calcStatisticsRepository.scheduleByDateAndLine(line, rq, rq, m.get("gsdm"), m.get("fgsdm")));
557 508 }
  509 +
  510 + List<CalcInterval> listInterval=calcIntervalRepository.selectByDateAndCompany(rq, "", "","");
  511 + Map<String,CalcInterval> mapInterval=new HashMap<String,CalcInterval>();
  512 + for (int i = 0; i < listInterval.size(); i++) {
  513 + CalcInterval c=listInterval.get(i);
  514 + mapInterval.put(c.getXlBm(), c);
  515 + }
  516 +
558 517  
559 518 for (int i = 0; i < list.size(); i++) {
560 519 ScheduleRealInfo s=list.get(i);
... ... @@ -574,19 +533,32 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
574 533 lists.add(list.get(i));
575 534 }else{
576 535 lists.add(list.get(i));
577   - CalcStatistics s=staticTj(lists);
  536 + CalcInterval t=null;
  537 + if(mapInterval.get(lists.get(0).getXlBm())!=null){
  538 + t=mapInterval.get(lists.get(0).getXlBm());
  539 + }
  540 +
  541 + CalcStatistics s=staticTj(lists,t);
578 542 lMap.add(s);
579 543 lists=new ArrayList<ScheduleRealInfo>();
580 544 }
581 545 }else{
582 546 if(list.get(i).getXlBm().equals(list.get(i-1).getXlBm())){
583 547 lists.add(list.get(i));
584   - CalcStatistics s=staticTj(lists);
  548 + CalcInterval t=null;
  549 + if(mapInterval.get(lists.get(0).getXlBm())!=null){
  550 + t=mapInterval.get(lists.get(0).getXlBm());
  551 + }
  552 + CalcStatistics s=staticTj(lists,t);
585 553 lMap.add(s);
586 554 }else{
587 555 lists=new ArrayList<ScheduleRealInfo>();
588 556 lists.add(list.get(i));
589   - CalcStatistics s=staticTj(lists);
  557 + CalcInterval t=null;
  558 + if(mapInterval.get(lists.get(0).getXlBm())!=null){
  559 + t=mapInterval.get(lists.get(0).getXlBm());
  560 + }
  561 + CalcStatistics s=staticTj(lists,t);
590 562 lMap.add(s);
591 563 }
592 564 }
... ... @@ -609,7 +581,7 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
609 581 return result;
610 582 }
611 583  
612   - public final CalcStatistics staticTj(List<ScheduleRealInfo> list){
  584 + public final CalcStatistics staticTj(List<ScheduleRealInfo> list,CalcInterval t){
613 585  
614 586 List<ScheduleRealInfo> lists=new ArrayList<ScheduleRealInfo>();
615 587 for(int i=0;i<list.size();i++){
... ... @@ -697,23 +669,30 @@ public class CalcWaybillServiceImpl extends BaseServiceImpl&lt;CalcWaybill, Integer
697 669 s.setDtbcq(0);
698 670 s.setDtbcz(0);
699 671 s.setDtbcw(0);
700   - Map<String, Object> m_=culateService.culateDjg(lists, list.get(0).getXlBm());
701   - if(m_.containsKey("djgcsq") && m_.get("djgcsq")!=null)
702   - s.setDjgq(Integer.valueOf(m_.get("djgcsq").toString()));
703   - else
704   - s.setDjgq(0);
705   - if(m_.containsKey("djgcsz") && m_.get("djgcsz")!=null)
706   - s.setDjgz(Integer.valueOf(m_.get("djgcsz").toString()));
707   - else
708   - s.setDjgz(0);
709   - if(m_.containsKey("djgcsw") && m_.get("djgcsw")!=null)
710   - s.setDjgw(Integer.valueOf(m_.get("djgcsw").toString()));
711   - else
712   - s.setDjgw(0);
713   - if(m_.containsKey("djgsj") && m_.get("djgsj")!=null)
714   - s.setDjgsj(Integer.valueOf(m_.get("djgsj").toString()));
715   - else
716   - s.setDjgsj(0);
  672 + if(t==null){
  673 + Map<String, Object> m_=culateService.culateDjg(lists, list.get(0).getXlBm());
  674 + if(m_.containsKey("djgcsq") && m_.get("djgcsq")!=null)
  675 + s.setDjgq(Integer.valueOf(m_.get("djgcsq").toString()));
  676 + else
  677 + s.setDjgq(0);
  678 + if(m_.containsKey("djgcsz") && m_.get("djgcsz")!=null)
  679 + s.setDjgz(Integer.valueOf(m_.get("djgcsz").toString()));
  680 + else
  681 + s.setDjgz(0);
  682 + if(m_.containsKey("djgcsw") && m_.get("djgcsw")!=null)
  683 + s.setDjgw(Integer.valueOf(m_.get("djgcsw").toString()));
  684 + else
  685 + s.setDjgw(0);
  686 + if(m_.containsKey("djgsj") && m_.get("djgsj")!=null)
  687 + s.setDjgsj(Integer.valueOf(m_.get("djgsj").toString()));
  688 + else
  689 + s.setDjgsj(0);
  690 + }else{
  691 + s.setDjgq(t.getDjgAll());
  692 + s.setDjgz(t.getDjgZgf());
  693 + s.setDjgw(t.getDjgWgf());
  694 + s.setDjgsj(t.getDjgTime());
  695 + }
717 696 }
718 697 return s;
719 698 }
... ...
src/main/java/com/bsth/service/realcontrol/ScheduleRealInfoService.java
... ... @@ -199,4 +199,6 @@ public interface ScheduleRealInfoService extends BaseService&lt;ScheduleRealInfo, L
199 199 Map<String, Object> repairReport(Map<String, Object> map, boolean isActive);
200 200  
201 201 List<RepairReport> repairReportList(String line,String date,String code, String type);
  202 +
  203 + Map<String, String> getLevelsByLines(List<String> lines);
202 204 }
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -73,6 +73,7 @@ import com.bsth.entity.CarDevice;
73 73 import com.bsth.entity.Cars;
74 74 import com.bsth.entity.Line;
75 75 import com.bsth.entity.Personnel;
  76 +import com.bsth.entity.calc.CalcInterval;
76 77 import com.bsth.entity.oil.Dlb;
77 78 import com.bsth.entity.oil.Ylb;
78 79 import com.bsth.entity.oil.Ylxxb;
... ... @@ -94,6 +95,7 @@ import com.bsth.repository.CarDeviceRepository;
94 95 import com.bsth.repository.CarsRepository;
95 96 import com.bsth.repository.LineRepository;
96 97 import com.bsth.repository.RepairReportRepository;
  98 +import com.bsth.repository.calc.CalcIntervalRepository;
97 99 import com.bsth.repository.oil.DlbRepository;
98 100 import com.bsth.repository.oil.YlbRepository;
99 101 import com.bsth.repository.oil.YlxxbRepository;
... ... @@ -154,6 +156,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
154 156  
155 157 @Autowired
156 158 DictionaryService dictionaryService;
  159 +
  160 + @Autowired
  161 + CalcIntervalRepository calcIntervalRepository;
157 162 /*@Autowired
158 163 BorrowCenter borrowCenter;*/
159 164  
... ... @@ -238,6 +243,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
238 243 report2repair.put("9103", "9103");
239 244 report2repair.put("9104", "9104");
240 245 report2repair.put("9109", "9109");
  246 + report2repair.put("9201", "9201");
  247 + report2repair.put("9202", "9202");
  248 + report2repair.put("9203", "9203");
  249 + report2repair.put("9204", "9204");
  250 + report2repair.put("9209", "9209");
  251 + report2repair.put("9301", "9301");
  252 + report2repair.put("9302", "9302");
  253 + report2repair.put("9303", "9303");
  254 + report2repair.put("9304", "9304");
  255 + report2repair.put("9305", "9305");
  256 + report2repair.put("9306", "9306");
  257 + report2repair.put("9309", "9309");
241 258 }
242 259  
243 260  
... ... @@ -2690,11 +2707,21 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2690 2707 map.put("dtbc", 0);
2691 2708 map.put("dtbc_m", 0);
2692 2709 map.put("dtbc_a", 0);
2693   - Map<String, Object> m = culateService.culateDjg(list_s, line);
2694   - map.put("djg", m.get("djgcsq"));
2695   - map.put("djg_m", m.get("djgcsz"));
2696   - map.put("djg_a", m.get("djgcsw"));
2697   - map.put("djg_time", m.get("djgsj"));
  2710 + List<CalcInterval> intervalList=calcIntervalRepository.selectByDateAndLine(line, date,"");
  2711 + if(intervalList.size()>0){
  2712 + CalcInterval c=intervalList.get(0);
  2713 + map.put("djg",c.getDjgAll());
  2714 + map.put("djg_m", c.getDjgZgf());
  2715 + map.put("djg_a", c.getDjgWgf());
  2716 + map.put("djg_time", c.getDjgTime());
  2717 + }else{
  2718 + Map<String, Object> m = culateService.culateDjg(list_s, line);
  2719 + map.put("djg", m.get("djgcsq"));
  2720 + map.put("djg_m", m.get("djgcsz"));
  2721 + map.put("djg_a", m.get("djgcsw"));
  2722 + map.put("djg_time", m.get("djgsj"));
  2723 + }
  2724 +
2698 2725 map.put("jls", Arith.sub(Arith.add(jhlc, ljgl), lbgl));
2699 2726 lMap.add(map);
2700 2727  
... ... @@ -2796,7 +2823,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2796 2823 return lMap;
2797 2824 }
2798 2825  
2799   - public final Map<String, Object> staticTj(List<ScheduleRealInfo> list) {
  2826 + public final Map<String, Object> staticTj(List<ScheduleRealInfo> list,Map<String, Object> m) {
2800 2827  
2801 2828 List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>();
2802 2829 for (int i = 0; i < list.size(); i++) {
... ... @@ -2882,11 +2909,18 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2882 2909 map.put("dtbc", 0);
2883 2910 map.put("dtbc_m", 0);
2884 2911 map.put("dtbc_a", 0);
2885   - Map<String, Object> m_ = culateService.culateDjg(lists, list.get(0).getXlBm());
2886   - map.put("djg", m_.get("djgcsq"));
2887   - map.put("djg_m", m_.get("djgcsz"));
2888   - map.put("djg_a", m_.get("djgcsw"));
2889   - map.put("djg_time", m_.get("djgsj"));
  2912 + if(m.get("xl")==null){
  2913 + Map<String, Object> m_ = culateService.culateDjg(lists, list.get(0).getXlBm());
  2914 + map.put("djg", m_.get("djgcsq"));
  2915 + map.put("djg_m", m_.get("djgcsz"));
  2916 + map.put("djg_a", m_.get("djgcsw"));
  2917 + map.put("djg_time", m_.get("djgsj"));
  2918 + }else{
  2919 + map.put("djg", m.get("djgAll")==null?"0":m.get("djgAll"));
  2920 + map.put("djg_m", m.get("djgZgf")==null?"0":m.get("djgZgf"));
  2921 + map.put("djg_a", m.get("djgWgf")==null?"0":m.get("djgWgf"));
  2922 + map.put("djg_time", m.get("djgTime")==null?"0":m.get("djgTime"));
  2923 + }
2890 2924 }
2891 2925 return map;
2892 2926 }
... ... @@ -2897,14 +2931,33 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2897 2931 List<ScheduleRealInfo> listAll = new ArrayList<ScheduleRealInfo>();
2898 2932 List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>();
2899 2933 List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>();
  2934 + List<Object[]> listInterval=new ArrayList<Object[]>();
2900 2935 line = line.trim();
2901 2936 if (line.equals("")) {
2902 2937 //查询所有线路
2903 2938 listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date, date2, gsdm, fgsdm);
  2939 + listInterval = calcIntervalRepository.countByDateAndLine(gsdm, fgsdm, date, date2);
2904 2940 } else {
2905 2941 //查询单条线路
2906 2942 listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date, date2);
2907   - }
  2943 + listInterval = calcIntervalRepository.countByDateAndLine(line, date, date2);
  2944 + }
  2945 + Map<String, Map<String,Object>> mapInterval=new HashMap<String, Map<String,Object>>();
  2946 + for (int i = 0; i < listInterval.size(); i++) {
  2947 + Object[] interval=listInterval.get(i);
  2948 + String gs=interval[0].toString();
  2949 + String fgs=interval[1].toString();
  2950 + String xl=interval[2].toString();
  2951 + Map<String, Object> m=new HashMap<String,Object>();
  2952 + m.put("gs", gs);
  2953 + m.put("fgs", fgs);
  2954 + m.put("xl", xl);
  2955 + m.put("djgAll", interval[3]);
  2956 + m.put("djgZgf", interval[6]);
  2957 + m.put("djgWgf", interval[7]);
  2958 + m.put("djgTime", interval[8]);
  2959 + mapInterval.put(gs+"-"+fgs+"-"+xl, m);
  2960 + }
2908 2961 Map<String, Boolean> lineMap=lineService.lineNature();
2909 2962 List<ScheduleRealInfo> list=new ArrayList<ScheduleRealInfo>();
2910 2963 for (int i = 0; i < listAll.size(); i++) {
... ... @@ -2939,19 +2992,31 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2939 2992 lists.add(list.get(i));
2940 2993 } else {
2941 2994 lists.add(list.get(i));
2942   - Map<String, Object> map = staticTj(lists);
  2995 + Map<String, Object> mm=new HashMap<String,Object>();
  2996 + if(mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm())!=null){
  2997 + mm=mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm());
  2998 + }
  2999 + Map<String, Object> map = staticTj(lists,mm);
2943 3000 lMap.add(map);
2944 3001 lists = new ArrayList<ScheduleRealInfo>();
2945 3002 }
2946 3003 } else {
2947 3004 if ((list.get(i).getFgsBm()+list.get(i).getXlBm()).equals(list.get(i - 1).getFgsBm()+list.get(i - 1).getXlBm())) {
2948 3005 lists.add(list.get(i));
2949   - Map<String, Object> map = staticTj(lists);
  3006 + Map<String, Object> mm=new HashMap<String,Object>();
  3007 + if(mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm())!=null){
  3008 + mm=mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm());
  3009 + }
  3010 + Map<String, Object> map = staticTj(lists,mm);
2950 3011 lMap.add(map);
2951 3012 } else {
2952 3013 lists = new ArrayList<ScheduleRealInfo>();
2953 3014 lists.add(list.get(i));
2954   - Map<String, Object> map = staticTj(lists);
  3015 + Map<String, Object> mm=new HashMap<String,Object>();
  3016 + if(mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm())!=null){
  3017 + mm=mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm());
  3018 + }
  3019 + Map<String, Object> map = staticTj(lists,mm);
2955 3020 lMap.add(map);
2956 3021 }
2957 3022 }
... ... @@ -3091,14 +3156,34 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3091 3156 List<ScheduleRealInfo> listAll = new ArrayList<ScheduleRealInfo>();
3092 3157 List<ScheduleRealInfo> list_s = new ArrayList<ScheduleRealInfo>();
3093 3158 List<ScheduleRealInfo> lists = new ArrayList<ScheduleRealInfo>();
  3159 + List<Object[]> listInterval=new ArrayList<Object[]>();
  3160 +
3094 3161 line = line.trim();
3095 3162 if (line.equals("")) {
3096 3163 //查询所有线路
3097 3164 listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj(line, date, date2, gsdm, fgsdm);
  3165 + listInterval = calcIntervalRepository.countByDateAndLine(gsdm, fgsdm, date, date2);
3098 3166 } else {
3099 3167 //查询单条线路
3100 3168 listAll = scheduleRealInfoRepository.scheduleByDateAndLineTj2(line, date, date2);
3101   - }
  3169 + listInterval = calcIntervalRepository.countByDateAndLine(line, date, date2);
  3170 + }
  3171 + Map<String, Map<String,Object>> mapInterval=new HashMap<>();
  3172 + for (int i = 0; i < listInterval.size(); i++) {
  3173 + Object[] interval=listInterval.get(i);
  3174 + String gs=interval[0].toString();
  3175 + String fgs=interval[1].toString();
  3176 + String xl=interval[2].toString();
  3177 + Map<String, Object> m=new HashMap<String,Object>();
  3178 + m.put("gs", gs);
  3179 + m.put("fgs", fgs);
  3180 + m.put("xl", xl);
  3181 + m.put("djgAll", interval[3]);
  3182 + m.put("djgZgf", interval[6]);
  3183 + m.put("djgWgf", interval[7]);
  3184 + m.put("djgTime", interval[8]);
  3185 + mapInterval.put(gs+"-"+fgs+"-"+xl, m);
  3186 + }
3102 3187  
3103 3188 Map<String, Boolean> lineMap=lineService.lineNature();
3104 3189 List<ScheduleRealInfo> list=new ArrayList<ScheduleRealInfo>();
... ... @@ -3134,19 +3219,31 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3134 3219 lists.add(list.get(i));
3135 3220 } else {
3136 3221 lists.add(list.get(i));
3137   - Map<String, Object> map = staticTj(lists);
  3222 + Map<String, Object> mm=new HashMap<String,Object>();
  3223 + if(mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm())!=null){
  3224 + mm=mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm());
  3225 + }
  3226 + Map<String, Object> map = staticTj(lists,mm);
3138 3227 lMap.add(map);
3139 3228 lists = new ArrayList<ScheduleRealInfo>();
3140 3229 }
3141 3230 } else {
3142 3231 if ((list.get(i).getFgsBm()+list.get(i).getXlBm()).equals(list.get(i - 1).getFgsBm()+list.get(i - 1).getXlBm())) {
3143 3232 lists.add(list.get(i));
3144   - Map<String, Object> map = staticTj(lists);
  3233 + Map<String, Object> mm=new HashMap<String,Object>();
  3234 + if(mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm())!=null){
  3235 + mm=mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm());
  3236 + }
  3237 + Map<String, Object> map = staticTj(lists,mm);
3145 3238 lMap.add(map);
3146 3239 } else {
3147 3240 lists = new ArrayList<ScheduleRealInfo>();
3148 3241 lists.add(list.get(i));
3149   - Map<String, Object> map = staticTj(lists);
  3242 + Map<String, Object> mm=new HashMap<String,Object>();
  3243 + if(mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm())!=null){
  3244 + mm=mapInterval.get(lists.get(0).getGsBm()+"-"+lists.get(0).getFgsBm()+"-"+lists.get(0).getXlBm());
  3245 + }
  3246 + Map<String, Object> map = staticTj(lists,mm);
3150 3247 lMap.add(map);
3151 3248 }
3152 3249 }
... ... @@ -5273,20 +5370,22 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
5273 5370 fcsjm = String.valueOf(fcsjActural_ - fcsj_);
5274 5371 }
5275 5372 }
5276   - String[] dfsj_s =schedule.getDfsj().split(":");
5277   - Long dfsj_ = Long.parseLong(dfsj_s[0]) * 60 + Long.parseLong(dfsj_s[1]);
5278   - if ((dfsj_ - fcsjActural_) > 0) {
5279   - if(dfsj_ - fcsjActural_>1200){
5280   - dfsjm=String.valueOf(1440-(dfsj_ - fcsjActural_));
5281   - }else{
5282   - dfsjk = String.valueOf(dfsj_ - fcsjActural_);
5283   - }
5284   - } else {
5285   - if(fcsjActural_ - dfsj_>1200){
5286   - dfsjk= String.valueOf(1440-(fcsjActural_ - dfsj_));
5287   - }else{
5288   - dfsjm = String.valueOf(fcsjActural_ - dfsj_);
5289   - }
  5373 + if(df.equals("df")){
  5374 + String[] dfsj_s =schedule.getDfsj().split(":");
  5375 + Long dfsj_ = Long.parseLong(dfsj_s[0]) * 60 + Long.parseLong(dfsj_s[1]);
  5376 + if ((dfsj_ - fcsjActural_) > 0) {
  5377 + if(dfsj_ - fcsjActural_>1200){
  5378 + dfsjm=String.valueOf(1440-(dfsj_ - fcsjActural_));
  5379 + }else{
  5380 + dfsjk = String.valueOf(dfsj_ - fcsjActural_);
  5381 + }
  5382 + } else {
  5383 + if(fcsjActural_ - dfsj_>1200){
  5384 + dfsjk= String.valueOf(1440-(fcsjActural_ - dfsj_));
  5385 + }else{
  5386 + dfsjm = String.valueOf(fcsjActural_ - dfsj_);
  5387 + }
  5388 + }
5290 5389 }
5291 5390 }
5292 5391 if(df.equals("df")){
... ... @@ -6329,6 +6428,17 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
6329 6428  
6330 6429 return result;
6331 6430 }
  6431 +
  6432 + @Override
  6433 + public Map<String, String> getLevelsByLines(List<String> lines) {
  6434 + Map<String, String> result = new HashMap<String, String>(), currSchDate = dayOfSchedule.getCurrSchDate();
  6435 + for (String line : lines) {
  6436 + String level = BasicData.lineDate2Level.get(line + "_" + currSchDate.get(line));
  6437 + result.put(line, level == null ? "" : level);
  6438 + }
  6439 +
  6440 + return result;
  6441 + }
6332 6442  
6333 6443  
6334 6444 @Override
... ... @@ -6352,7 +6462,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
6352 6462 while (it.hasNext()) {
6353 6463 RepairReport rr = it.next();
6354 6464 repairReport(rr);
6355   - if (rr.getReportState() == 1) queue.remove(rr);
  6465 + if (rr.getReportState() == 1 || System.currentTimeMillis() - rr.getReportDate().getTime() > 86400000) queue.remove(rr);
6356 6466 }
6357 6467 } catch (Exception e) {
6358 6468 logger.error("维修上报重发错误", e);
... ...
src/main/java/com/bsth/service/report/CalcSheetService.java
... ... @@ -10,6 +10,7 @@ import com.bsth.service.BaseService;
10 10 public interface CalcSheetService extends BaseService<CalcSheet, Integer>{
11 11 public List<CalcSheet> countListCalcSheet(Map<String, Object> map);
12 12 public List<CalcSheet> calcListSheet(Map<String, Object> map);
  13 + public List<CalcSheet> calcListSheet_d(Map<String, Object> map);
13 14 public List<Sheet> calcSheet(Map<String, Object> map);
14 15 public List<Map<String, Object>> calcTurnoutrate(Map<String, Object> map);
15 16 public List<Map<String, Object>> calcTurnoutrateZgf(Map<String, Object> map);
... ...
src/main/java/com/bsth/service/report/impl/CalcSheetServiceImpl.java
... ... @@ -179,6 +179,70 @@ public class CalcSheetServiceImpl extends BaseServiceImpl&lt;CalcSheet, Integer&gt; im
179 179 String endDate=map.get("endDate").toString();
180 180 String sql="select * from bsth_c_calc_sheet where date >= '"+date+"' and "
181 181 + " date <= '"+endDate+"' and xl = '"+line+"' order by date";
  182 +
  183 + List<CalcSheet> list=jdbcTemplate.query(sql,
  184 + new RowMapper<CalcSheet>(){
  185 + @Override
  186 + public CalcSheet mapRow(ResultSet rs, int rowNum) throws SQLException {
  187 + CalcSheet s=new CalcSheet();
  188 + s.setGsdm(rs.getString("gsdm"));
  189 + s.setFgsdm(rs.getString("fgsdm"));
  190 + s.setXl(rs.getString("xl"));
  191 + s.setXlName(rs.getString("xl_name"));
  192 + s.setId(rs.getInt("id"));
  193 + s.setDate(rs.getString("date"));
  194 + s.setJhszfcs(rs.getString("jhszfcs"));
  195 + s.setSjszfczds(rs.getString("sjszfczds"));
  196 + s.setSzfczdl(rs.getString("szfczdl"));
  197 + s.setSjszddzds(rs.getString("sjszddzds"));
  198 + s.setSzddzdl(rs.getString("szddzdl"));
  199 + return s;
  200 + }
  201 + });
  202 + if(map.get("type").equals("export")){
  203 + List<Map<String, Object>> tempList = new ArrayList<Map<String, Object>>();
  204 + for (int i = 0; i < list.size(); i++) {
  205 + Map<String, Object> m = new HashMap<String, Object>();
  206 + CalcSheet c = list.get(i);
  207 + m.put("gs", c.getGsname());
  208 + m.put("fgs", c.getFgsname());
  209 + m.put("date", c.getDate());
  210 + m.put("line", c.getXlName());
  211 + m.put("bcs", c.getJhszfcs());
  212 + m.put("zdbcs", c.getSjszfczds());
  213 + m.put("zdlv", c.getSzfczdl()+"%");
  214 + m.put("ddzdbcs", c.getSjszddzds());
  215 + m.put("ddzdlv", c.getSzddzdl()+"%");
  216 + tempList.add(m);
  217 + }
  218 + List<Iterator<?>> listI = new ArrayList<Iterator<?>>();
  219 + Map<String, Object> m = new HashMap<String, Object>();
  220 + m.put("date", date);
  221 + m.put("endDate", endDate);
  222 + ReportUtils ee = new ReportUtils();
  223 + try {
  224 + listI.add(tempList.iterator());
  225 + String path = this.getClass().getResource("/").getPath() + "static/pages/forms/";
  226 + ee.excelReplace(listI, new Object[]{m}, path + "mould/" + "calcSheetList1.xls",
  227 + path + "export/发车到站准点率"+date.replaceAll("-", "")+"-"+endDate.replaceAll("-", "")+".xls");
  228 + } catch (Exception e) {
  229 + // TODO: handle exception
  230 + e.printStackTrace();
  231 + }
  232 + }
  233 + return list;
  234 + }
  235 +
  236 + @Override
  237 + public List<CalcSheet> calcListSheet_d(Map<String, Object> map) {
  238 + // TODO Auto-generated method stub
  239 + String line=map.get("line").toString();
  240 + String date=map.get("date").toString();
  241 + String endDate=map.get("endDate").toString();
  242 + String sql=" select b.* from (select date from bsth_c_calc_interval where date>='"+date+"' and date <='"+endDate+"'"
  243 + + " and xl_bm='"+line+"' and `level`='D' group by date ) a left join ( "
  244 + + "select * from bsth_c_calc_sheet where date >= '"+date+"' and "
  245 + + " date <= '"+endDate+"' and xl = '"+line+"' order by date ) b on a.date =b.date";
182 246 List<CalcSheet> list=jdbcTemplate.query(sql,
183 247 new RowMapper<CalcSheet>(){
184 248 @Override
... ...
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -852,12 +852,12 @@ public class ReportServiceImpl implements ReportService{
852 852 String sqlPc=" (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,ists,2 as xh FROM "
853 853 + " bsth_c_s_ttinfo_detail where ttinfo ='"+ttinfo+"' and "
854 854 + " fcsj <='"+minfcsj+"' and bc_type!='ldks'"
855   - + " and bc_type !='region') "
  855 + + " and bc_type !='region' and bc_type !='venting' and bc_type !='major') "
856 856 + " union "
857 857 + " (SELECT jhlc,fcsj,bcsj,bc_type,lp,xl_dir,ists,1 as xh FROM "
858 858 + " bsth_c_s_ttinfo_detail where ttinfo ='"+ttinfo+"' and "
859 859 + " fcsj > '"+minfcsj+"' and bc_type!='ldks' "
860   - + " and bc_type !='region') "
  860 + + " and bc_type !='region' and bc_type !='venting' and bc_type !='major') "
861 861 + " order by xh, lp,fcsj";
862 862 Map<String, Object> map=new HashMap<String,Object>();
863 863 List<Map<String, Object>> list= jdbcTemplate.query(sqlPc,
... ...
src/main/java/com/bsth/util/HttpClientUtils.java
... ... @@ -2,6 +2,7 @@ package com.bsth.util;
2 2  
3 3 import org.apache.http.HttpEntity;
4 4 import org.apache.http.client.config.RequestConfig;
  5 +import org.apache.http.client.entity.EntityBuilder;
5 6 import org.apache.http.client.methods.CloseableHttpResponse;
6 7 import org.apache.http.client.methods.HttpGet;
7 8 import org.apache.http.client.methods.HttpPost;
... ... @@ -63,7 +64,7 @@ public class HttpClientUtils {
63 64 HttpPost post = new HttpPost(url);
64 65  
65 66 post.setHeader("Accept", "application/json");
66   - post.setHeader("Content-Type", "application/json");
  67 + post.setHeader("Content-Type", "application/json;charset=UTF-8");
67 68 //超时时间
68 69 RequestConfig requestConfig = RequestConfig.custom()
69 70 .setConnectTimeout(2500).setConnectionRequestTimeout(2000)
... ...
src/main/java/com/bsth/util/ReportRegisterHTTPUtil.java 0 → 100644
  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 +}
0 46 \ No newline at end of file
... ...
src/main/java/com/bsth/util/ReportUtils.java
... ... @@ -115,6 +115,92 @@ public class ReportUtils {
115 115 }
116 116 }
117 117  
  118 +
  119 + /**
  120 + *
  121 + * @param sheetList 多sheet模板中,需要重复显示的行所需的数据
  122 + * @param tArray
  123 + * @param sourcePath 模板路径
  124 + * @param targetPath 生成路径
  125 + */
  126 + public void excelMoreSheetReplace(List<List<Iterator<?>>> sheetList, Object[] tArray,
  127 + String sourcePath, String targetPath) {
  128 + try {
  129 + // 把源文件放入流中
  130 + POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(
  131 + sourcePath));
  132 + HSSFWorkbook wb = new HSSFWorkbook(fs);
  133 + for (int s=0; s<sheetList.size(); s++){
  134 + List<Iterator<?>> list = sheetList.get(s);
  135 + if(tArray.length != 0 && tArray[0] instanceof java.util.Map){
  136 + Map<String, Object> m = (Map<String, Object>)tArray[0];
  137 + if(m.containsKey("sheetName"+s+1) && m.get("sheetName"+s+1)!=null
  138 + && m.get("sheetName"+s+1).toString().trim().length()!=0)
  139 + wb.setSheetName(0, m.get("sheetName"+s+1).toString());
  140 + }
  141 + HSSFSheet sheet = wb.getSheetAt(s);
  142 + HSSFRow row;
  143 + HSSFCell cell = null;
  144 + String key;
  145 + // 取得总行数
  146 + int rowNum = sheet.getLastRowNum();
  147 + // 取得总列数
  148 + int cellNum = sheet.getRow(0).getLastCellNum();
  149 +
  150 + // 遍历行
  151 + for (int i = 0; i <= rowNum; i++) {
  152 + row = sheet.getRow(i);
  153 + // 遍历列
  154 + for (int j = 0; j < cellNum; j++) {
  155 + if (row == null) {
  156 + continue;
  157 + }
  158 + cell = row.getCell(j);
  159 + if (cell == null) {
  160 + continue;
  161 + }
  162 + // 取得每列的内容,如果列内容是$key$格式,则替换内容
  163 + key = getCellValue(cell);
  164 + if (key != null && (key.indexOf("$") != -1 || key.indexOf("#list#") != -1)) {
  165 + // * 列中内容有#list#,则表示该行为模板行,需要以该行为模板
  166 + // * 例如:模板行格式 #list#0_0 $Car.id$
  167 + // * 第一个0表示需要在list中取iterator的索引值
  168 + // * 第二个0表示在iterator中取的第几个对象,如果不为0,则取下一个对象,而不是沿用前面获取的对象
  169 + // * $Car.id$表示所取的对象为Car的对象,并且取值为id的值
  170 + if (key.indexOf("#list#") != -1) {
  171 + key = key.replace("#list#", "").trim();
  172 + String[] lists = key.split(" ");
  173 + // 取得list中的索引值
  174 + int listIndex = Integer
  175 + .valueOf(lists[0].split("_")[0]);
  176 + Iterator<?> iterator = list.get(listIndex);
  177 + // 根据模板创建行并填充数据,返回增加的行数
  178 + int rowCount = iteratorFillCellValue(wb, sheet,
  179 + cell, iterator, i, rowNum, key);
  180 + rowNum += rowCount;
  181 + i += rowCount;
  182 + break;
  183 + } else {
  184 + // 直接填充数据的列,从对象数组中取得值,这里的数组不传值
  185 + getValueAndSetCellValue(cell, key, tArray, new String[]{""});
  186 + }
  187 + }
  188 +
  189 + }
  190 + }
  191 + }
  192 +
  193 + // 创建目标文件夹
  194 + createFolder(targetPath);
  195 + // 输出文件
  196 + FileOutputStream fileOut = new FileOutputStream(targetPath);
  197 + wb.write(fileOut);
  198 + fileOut.close();
  199 + } catch (Exception e) {
  200 + e.printStackTrace();
  201 + }
  202 + }
  203 +
118 204 /**
119 205 * 将file1中的一页sheet复制到file2中
120 206 *
... ... @@ -351,6 +437,9 @@ public class ReportUtils {
351 437 * 第一个0表示需要在list中取iterator的索引值
352 438 * 第二个0表示在iterator中取的第几个对象,如果不为0,则取下一个对象,而不是沿用前面获取的对象
353 439 */
  440 + if(key == null || key.equals("")){
  441 + obj = iterator.next();
  442 + }
354 443 if (key.indexOf("#list#") != -1 && key.indexOf("_0") == -1) {
355 444 if (iterator.hasNext()) {
356 445 obj = iterator.next();
... ...
src/main/resources/application-prodtest.properties
1   -server.port=9088
2   -#management.port= 9001
3   -#management.address= 127.0.0.1
4   -management.security.enabled=false
5   -management.context-path=/manage
6   -dubbo.use=true
7   -
8   -spring.jpa.hibernate.ddl-auto= update
9   -spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
10   -#DATABASE
11   -spring.jpa.database= MYSQL
12   -spring.jpa.show-sql= false
13   -spring.datasource.driver-class-name= com.mysql.jdbc.Driver
14   -spring.datasource.url= jdbc:mysql://10.10.150.24:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
15   -spring.datasource.username= root
16   -spring.datasource.password= root2jsp
17   -#DATASOURCE
18   -spring.datasource.max-active=100
19   -spring.datasource.max-idle=8
20   -spring.datasource.min-idle=8
21   -spring.datasource.initial-size=5
22   -
23   -spring.datasource.test-on-borrow=true
24   -spring.datasource.test-on-connect=true
25   -spring.datasource.test-on-return=true
26   -spring.datasource.test-while-idle=true
27   -spring.datasource.validation-query=select 1
28   -
29   -## gps client data
30   -http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all
31   -## gateway real data
32   -http.gps.real.url= http://10.10.200.79:8080/transport_server/rtgps/
33   -## gateway send directive
34   -http.send.directive = http://10.10.200.79:8080/transport_server/message/
35   -## wxsb
36   -#http.report.url.05= http://192.168.168.154:8088/ygjwsystem_j2ee/clbx/clbx_dd.do
37   -#http.report.url.22= http://192.168.168.154:8088/jgjwsystem_j2ee/clbx/clbx_dd.do
38   -#http.report.url.26= http://192.168.168.154:8088/nhjwsystem_j2ee/clbx/clbx_dd.do
39   -#http.report.url.55= http://192.168.168.154:8088/snjwsystem_j2ee/clbx/clbx_dd.do
40   -http.report.url.05= http://116.228.197.222:8081/ygjwsystem_j2ee/clbx/clbx_dd.do
41   -http.report.url.22= http://116.247.73.122:9098/jgjwsystem_j2ee/clbx/clbx_dd.do
42   -http.report.url.26= http://116.236.141.34:8088/nhjwsystem_j2ee/clbx/clbx_dd.do
  1 +server.port=9088
  2 +#management.port= 9001
  3 +#management.address= 127.0.0.1
  4 +management.security.enabled=false
  5 +management.context-path=/manage
  6 +dubbo.use=true
  7 +
  8 +spring.jpa.hibernate.ddl-auto= update
  9 +spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy
  10 +#DATABASE
  11 +spring.jpa.database= MYSQL
  12 +spring.jpa.show-sql= false
  13 +spring.datasource.driver-class-name= com.mysql.jdbc.Driver
  14 +spring.datasource.url= jdbc:mysql://10.10.150.24:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false
  15 +spring.datasource.username= root
  16 +spring.datasource.password= root2jsp
  17 +#DATASOURCE
  18 +spring.datasource.max-active=100
  19 +spring.datasource.max-idle=8
  20 +spring.datasource.min-idle=8
  21 +spring.datasource.initial-size=5
  22 +
  23 +spring.datasource.test-on-borrow=true
  24 +spring.datasource.test-on-connect=true
  25 +spring.datasource.test-on-return=true
  26 +spring.datasource.test-while-idle=true
  27 +spring.datasource.validation-query=select 1
  28 +
  29 +## gps client data
  30 +http.gps.real.cache.url= http://10.10.150.24:12580/realGps/all
  31 +## gateway real data
  32 +http.gps.real.url= http://10.10.200.79:8080/transport_server/rtgps/
  33 +## gateway send directive
  34 +http.send.directive = http://10.10.200.79:8080/transport_server/message/
  35 +## wxsb
  36 +#http.report.url.05= http://192.168.168.154:8088/ygjwsystem_j2ee/clbx/clbx_dd.do
  37 +#http.report.url.22= http://192.168.168.154:8088/jgjwsystem_j2ee/clbx/clbx_dd.do
  38 +#http.report.url.26= http://192.168.168.154:8088/nhjwsystem_j2ee/clbx/clbx_dd.do
  39 +#http.report.url.55= http://192.168.168.154:8088/snjwsystem_j2ee/clbx/clbx_dd.do
  40 +http.report.url.05= http://116.228.197.222:8081/ygjwsystem_j2ee/clbx/clbx_dd.do
  41 +http.report.url.22= http://116.247.73.122:9098/jgjwsystem_j2ee/clbx/clbx_dd.do
  42 +http.report.url.26= http://116.236.141.34:8088/nhjwsystem_j2ee/clbx/clbx_dd.do
43 43 http.report.url.55= http://180.168.216.248:8088/snjwsystem_j2ee/clbx/clbx_dd.do
44 44 \ No newline at end of file
... ...
src/main/resources/datatools/config-prodtest.properties
1   -# 配置数据导入导出用到的配置信息
2   -
3   -# 1、kettle配置文件路径(类路径)
4   -datatools.kettle_properties=/datatools/kettle.properties
5   -# 2、ktr文件通用配置变量(数据库连接,根据不同的环境需要修正)
6   -
7   -#数据库ip地址
8   -datatools.kvars_dbip=10.10.150.24
9   -#数据库用户名
10   -datatools.kvars_dbuname=root
11   -#数据库密码
12   -datatools.kvars_dbpwd=root2jsp
13   -#数据库库名
14   -datatools.kvars_dbdname=control
15   -
16   -# 3、上传数据配置信息
17   -# 上传文件目录配置(根据不同的环境需要修正)
18   -datatools.fileupload_dir=/home/bsth_control_u_d_files
19   -# ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正)
20   -datatools.trans_errordir=/home/bsth_control_u_d_files/erroroutput
21   -# 临时输出文件目录
22   -datatools.trans_tempdir=/home/bsth_control_u_d_files/temp
23   -# 模版文件目录
24   -datatools.trans_templatedir=/home/bsth_control_u_d_files/template
25   -
26   -##---------------------------- 导入数据ktr ----------------------------##
27   -# 车辆信息导入ktr转换
28   -datatools.cars_datainputktr=/datatools/ktrs/carsDataInput.ktr
29   -# 人员信息导入
30   -datatools.employees_datainputktr=/datatools/ktrs/employeesDataInput.ktr
31   -# 路牌信息导入
32   -datatools.guideboards_datainputktr=/datatools/ktrs/guideboardDataInput.ktr
33   -# 时刻表基础信息导入
34   -datatools.ttinfo_datainputktr=/datatools/ktrs/ttinfoDataInput.ktr
35   -# 时刻表明细信息导入(元数据)
36   -datatools.ttinfodetail_metadatainputktr=/datatools/ktrs/ttinfodetailDataInputMetaData.ktr
37   -# 时刻表明细编辑用数据
38   -datatools.ttinfodetail_foreditktr=/datatools/ktrs/ttinfodetailoutputforedit.ktr
39   -# 时刻表明细信息导入
40   -datatools.ttinfodetail_datainputktr=/datatools/ktrs/ttinfodetailDataInput.ktr
41   -# 时刻表明细信息导入2
42   -datatools.ttinfodetail_datainputktr2=/datatools/ktrs/ttinfodetailDataInput2.ktr
43   -# 时刻表明细信息导入2(版本化)
44   -datatools.ttinfodetail_datainputktr2version=/datatools/ktrs/ttinfodetailDataInput2_version.ktr
45   -# 时刻表明细信息导入2(版本化),使用生成时刻表格式
46   -datatools.ttinfodetail_datainputktr2version2=/datatools/ktrs/ttinfodetailDataInput2_version_2.ktr
47   -
48   -# 车辆配置信息导入
49   -datatools.carsconfig_datainputktr=/datatools/ktrs/carsConfigDataInput.ktr
50   -# 人员配置信息导入
51   -datatools.employeesconfig_datainputktr=/datatools/ktrs/employeesConfigDataInput.ktr
52   -
53   -# 排版规则信息导入
54   -datatools.schedulerule_datainputktr=/datatools/ktrs/scheduleRuleDataInput.ktr
55   -
56   -# 4、数据导出配置信息
57   -# 导出数据文件目录配置(根据不同的环境需要修正)
58   -datatools.fileoutput_dir=/home/bsth_control_u_d_files
59   -
60   -##---------------------------- 导出数据ktr -----------------------------##
61   -# 车辆信息导出ktr转换
62   -datatools.cars_dataoutputktr=/datatools/ktrs/carsDataOutput.ktr
63   -# 人员信息导出ktr转换
64   -datatools.employees_dataoutputktr=/datatools/ktrs/employeesDataOutput.ktr
65   -# 时刻表导出元数据ktr转换
66   -datatools.ttinfodetail_metaoutput=/datatools/ktrs/ttinfodetailDataOutputMetaData.ktr
67   -# 时刻表导出数据ktr转换
68   -datatools.ttinfodetail_output=/datatools/ktrs/ttinfodetailDataOutput.ktr
69   -# 排版规则导出数据ktr转换
70   -datatools.schedulerule_output=/datatools/ktrs/scheduleRuleDataOutput.ktr
71   -
72   -# 车辆配置信息导出ktr转换
73   -datatools.carsconfig_dataoutputktr=/datatools/ktrs/carsConfigDataOutput.ktr
74   -# 人员配置信息导出ktr转换
75   -datatools.employeesconfig_dataoutputktr=/datatools/ktrs/employeesConfigDataOutput.ktr
76   -
77   -# 路牌信息导出
78   -datatools.guideboards_dataoutputktr=/datatools/ktrs/guideboardDataOutput.ktr
79   -
80   -
81   -# TODO:
  1 +# 配置数据导入导出用到的配置信息
  2 +
  3 +# 1、kettle配置文件路径(类路径)
  4 +datatools.kettle_properties=/datatools/kettle.properties
  5 +# 2、ktr文件通用配置变量(数据库连接,根据不同的环境需要修正)
  6 +
  7 +#数据库ip地址
  8 +datatools.kvars_dbip=10.10.150.24
  9 +#数据库用户名
  10 +datatools.kvars_dbuname=root
  11 +#数据库密码
  12 +datatools.kvars_dbpwd=root2jsp
  13 +#数据库库名
  14 +datatools.kvars_dbdname=control
  15 +
  16 +# 3、上传数据配置信息
  17 +# 上传文件目录配置(根据不同的环境需要修正)
  18 +datatools.fileupload_dir=/home/bsth_control_u_d_files
  19 +# ktr转换文件,中配置的错误输出目录(根据不同的环境需要修正)
  20 +datatools.trans_errordir=/home/bsth_control_u_d_files/erroroutput
  21 +# 临时输出文件目录
  22 +datatools.trans_tempdir=/home/bsth_control_u_d_files/temp
  23 +# 模版文件目录
  24 +datatools.trans_templatedir=/home/bsth_control_u_d_files/template
  25 +
  26 +##---------------------------- 导入数据ktr ----------------------------##
  27 +# 车辆信息导入ktr转换
  28 +datatools.cars_datainputktr=/datatools/ktrs/carsDataInput.ktr
  29 +# 人员信息导入
  30 +datatools.employees_datainputktr=/datatools/ktrs/employeesDataInput.ktr
  31 +# 路牌信息导入
  32 +datatools.guideboards_datainputktr=/datatools/ktrs/guideboardDataInput.ktr
  33 +# 时刻表基础信息导入
  34 +datatools.ttinfo_datainputktr=/datatools/ktrs/ttinfoDataInput.ktr
  35 +# 时刻表明细信息导入(元数据)
  36 +datatools.ttinfodetail_metadatainputktr=/datatools/ktrs/ttinfodetailDataInputMetaData.ktr
  37 +# 时刻表明细编辑用数据
  38 +datatools.ttinfodetail_foreditktr=/datatools/ktrs/ttinfodetailoutputforedit.ktr
  39 +# 时刻表明细信息导入
  40 +datatools.ttinfodetail_datainputktr=/datatools/ktrs/ttinfodetailDataInput.ktr
  41 +# 时刻表明细信息导入2
  42 +datatools.ttinfodetail_datainputktr2=/datatools/ktrs/ttinfodetailDataInput2.ktr
  43 +# 时刻表明细信息导入2(版本化)
  44 +datatools.ttinfodetail_datainputktr2version=/datatools/ktrs/ttinfodetailDataInput2_version.ktr
  45 +# 时刻表明细信息导入2(版本化),使用生成时刻表格式
  46 +datatools.ttinfodetail_datainputktr2version2=/datatools/ktrs/ttinfodetailDataInput2_version_2.ktr
  47 +
  48 +# 车辆配置信息导入
  49 +datatools.carsconfig_datainputktr=/datatools/ktrs/carsConfigDataInput.ktr
  50 +# 人员配置信息导入
  51 +datatools.employeesconfig_datainputktr=/datatools/ktrs/employeesConfigDataInput.ktr
  52 +
  53 +# 排版规则信息导入
  54 +datatools.schedulerule_datainputktr=/datatools/ktrs/scheduleRuleDataInput.ktr
  55 +
  56 +# 4、数据导出配置信息
  57 +# 导出数据文件目录配置(根据不同的环境需要修正)
  58 +datatools.fileoutput_dir=/home/bsth_control_u_d_files
  59 +
  60 +##---------------------------- 导出数据ktr -----------------------------##
  61 +# 车辆信息导出ktr转换
  62 +datatools.cars_dataoutputktr=/datatools/ktrs/carsDataOutput.ktr
  63 +# 人员信息导出ktr转换
  64 +datatools.employees_dataoutputktr=/datatools/ktrs/employeesDataOutput.ktr
  65 +# 时刻表导出元数据ktr转换
  66 +datatools.ttinfodetail_metaoutput=/datatools/ktrs/ttinfodetailDataOutputMetaData.ktr
  67 +# 时刻表导出数据ktr转换
  68 +datatools.ttinfodetail_output=/datatools/ktrs/ttinfodetailDataOutput.ktr
  69 +# 排版规则导出数据ktr转换
  70 +datatools.schedulerule_output=/datatools/ktrs/scheduleRuleDataOutput.ktr
  71 +
  72 +# 车辆配置信息导出ktr转换
  73 +datatools.carsconfig_dataoutputktr=/datatools/ktrs/carsConfigDataOutput.ktr
  74 +# 人员配置信息导出ktr转换
  75 +datatools.employeesconfig_dataoutputktr=/datatools/ktrs/employeesConfigDataOutput.ktr
  76 +
  77 +# 路牌信息导出
  78 +datatools.guideboards_dataoutputktr=/datatools/ktrs/guideboardDataOutput.ktr
  79 +
  80 +
  81 +# TODO:
... ...
src/main/resources/dubbo/config-prod.properties
1   -# application名字
2   -spring.dubbo.application.name=bsth_control_v2
3   -# zookeeper注册中心地址
4   -spring.dubbo.registry=zookeeper://127.0.0.1:2181
5   -
6   -#----------- dubbo:consumer 性能调优选项 -------------#
7   -# 远程服务调用超时时间,单位毫秒,这里设置30分钟
8   -spring.dubbo.consumer.timeout=1800000
9   -# 远程服务调用重试次数,0表示不需要重试
10   -spring.dubbo.consumer.retries=0
11   -#----------- dubbo:consumer 服务治理选项 -------------#
12   -# 启动不检查提供者是否存在
13   -spring.dubbo.consumer.check=false
  1 +# application名字
  2 +spring.dubbo.application.name=bsth_control_v2
  3 +# zookeeper注册中心地址
  4 +spring.dubbo.registry=zookeeper://127.0.0.1:2181
  5 +
  6 +#----------- dubbo:consumer 性能调优选项 -------------#
  7 +# 远程服务调用超时时间,单位毫秒,这里设置30分钟
  8 +spring.dubbo.consumer.timeout=1800000
  9 +# 远程服务调用重试次数,0表示不需要重试
  10 +spring.dubbo.consumer.retries=0
  11 +#----------- dubbo:consumer 服务治理选项 -------------#
  12 +# 启动不检查提供者是否存在
  13 +spring.dubbo.consumer.check=false
... ...
src/main/resources/dubbo/config-prodtest.properties
1   -# application名字
2   -spring.dubbo.application.name=bsth_control_v2
3   -# zookeeper注册中心地址
4   -spring.dubbo.registry=zookeeper://127.0.0.1:2181
5   -
6   -#----------- dubbo:consumer 性能调优选项 -------------#
7   -# 远程服务调用超时时间,单位毫秒,这里设置30分钟
8   -spring.dubbo.consumer.timeout=1800000
9   -# 远程服务调用重试次数,0表示不需要重试
10   -spring.dubbo.consumer.retries=0
11   -#----------- dubbo:consumer 服务治理选项 -------------#
12   -# 启动不检查提供者是否存在
13   -spring.dubbo.consumer.check=false
  1 +# application名字
  2 +spring.dubbo.application.name=bsth_control_v2
  3 +# zookeeper注册中心地址
  4 +spring.dubbo.registry=zookeeper://127.0.0.1:2181
  5 +
  6 +#----------- dubbo:consumer 性能调优选项 -------------#
  7 +# 远程服务调用超时时间,单位毫秒,这里设置30分钟
  8 +spring.dubbo.consumer.timeout=1800000
  9 +# 远程服务调用重试次数,0表示不需要重试
  10 +spring.dubbo.consumer.retries=0
  11 +#----------- dubbo:consumer 服务治理选项 -------------#
  12 +# 启动不检查提供者是否存在
  13 +spring.dubbo.consumer.check=false
... ...
src/main/resources/static/pages/control/lineallot_v2/main.html
... ... @@ -484,13 +484,12 @@
484 484 $.each(items, function () {
485 485 ls_line_data.push(codeMapps[$(this).data('id')]);
486 486 });
487   - //将线路基础信息写入localStorage
488   - storage.setItem('lineControlItems', JSON.stringify(ls_line_data));
489 487 //监控模式还是主调模式
490 488 storage.setItem('operationMode', $('.pattern_type_label>input')[0].checked?1:0);
491 489  
492 490 //进入线调
493   - var eq = EventProxy.create('cache_route', 'check_line_config', function () {
  491 + var eq = EventProxy.create('cache_line_level', 'cache_mv_route', 'cache_route', 'check_line_config', function (lineLevel) {
  492 + debugger;
494 493 var newWinOpen = $('input','.new_window_open_label')[0].checked;
495 494 if(!newWinOpen)
496 495 top.window.location.href = "/real_control/v2";
... ... @@ -498,6 +497,13 @@
498 497 window.open("/real_control/v2");
499 498 $('#go_to_real_system_btn').html('已经尝试打开新窗口,如看不到,可能被浏览器阻止了');
500 499 }
  500 +
  501 + // 将线路级别赋值
  502 + $.each(ls_line_data, function () {
  503 + this.lineLevel = lineLevel[this.lineCode];
  504 + });
  505 + // 将线路基础信息写入localStorage
  506 + storage.setItem('lineControlItems', JSON.stringify(ls_line_data));
501 507 });
502 508  
503 509 //拼接线路编码
... ... @@ -508,15 +514,20 @@
508 514 //缓存路由
509 515 idx=idx.substr(0, idx.length - 1);
510 516  
511   - $.ajaxSettings.async = false;
  517 + $.get('/realSchedule/lineLevel', {idx: idx}, function (rs) {
  518 + if (rs) {
  519 + eq.emit('cache_line_level', rs);
  520 + }
  521 + });
  522 +
512 523 $.get('/realMap/findRouteAndVersionByLine', {idx: idx}, function (rs) {
513 524 if (rs) {
514 525 for(var lineCode in rs)
515 526 storage.setItem(lineCode + '_route', JSON.stringify(rs[lineCode]));
516   - //eq.emit('cache_route');
  527 + eq.emit('cache_mv_route');
517 528 }
518 529 });
519   - $.ajaxSettings.async = true;
  530 +
520 531 $.get('/realMap/findRouteByLine', {idx: idx}, function (rs) {
521 532 if (rs) {
522 533 for(var lineCode in rs)
... ...
src/main/resources/static/pages/forms/mould/report_register.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/forms/statement/scheduleDaily.html
... ... @@ -87,7 +87,7 @@
87 87 <td colspan="3">放站班次</td>
88 88 <td colspan="3">调头班次</td>
89 89 <td colspan="3">发生次数</td>
90   - <td rowspan="2">最大间隔时间()</td>
  90 + <td rowspan="2">最大间隔时间()</td>
91 91 <td colspan="5" rowspan="2">原因</td>
92 92 </tr>
93 93 <tr>
... ...
src/main/resources/static/pages/permission/authorize_all/user_auth.html
... ... @@ -79,6 +79,13 @@
79 79 <li><label><input class="uk-checkbox" type="checkbox" data-event="signal_state"> 信号标记</label></li>
80 80 </ul>
81 81 </div>
  82 + <div>
  83 + <h4>服务热线系统</h4>
  84 + <ul class="uk-list uk-list-large uk-list-divider">
  85 + <li><label><input class="uk-checkbox" type="checkbox" data-event="report_register"> 报备登记</label></li>
  86 + <li><label><input class="uk-checkbox" type="checkbox" data-event="form_report_register"> 报备登记报表</label></li>
  87 + </ul>
  88 + </div>
82 89  
83 90 </div>
84 91  
... ...
src/main/resources/static/pages/report/sheet/intervalCount.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title">
  21 + <h1>大间隔情况表</h1>
  22 + </div>
  23 +</div>
  24 +
  25 +<div class="row">
  26 + <div class="col-md-12">
  27 + <div class="portlet light porttlet-fit bordered">
  28 + <div class="portlet-title">
  29 + <form class="form-inline" action="">
  30 + <div style="display: inline-block; margin-left: 33px;" id="gsdmDiv">
  31 + <span class="item-label" style="width: 80px;">公司: </span>
  32 + <select class="form-control" name="company" id="gsdm" style="width: 180px;"></select>
  33 + </div>
  34 + <div style="display: inline-block; margin-left: 38px;" id="fgsdmDiv">
  35 + <span class="item-label" style="width: 80px;">分公司: </span>
  36 + <select class="form-control" name="subCompany" id="fgsdm" style="width: 180px;"></select>
  37 + </div>
  38 + <div style="display: inline-block;margin-left: 33px;">
  39 + <span class="item-label" style="width: 80px;">线路: </span>
  40 + <select class="form-control" name="line" id="line" style="width: 180px;"></select>
  41 + </div>
  42 + <div style="margin-top: 10px">
  43 + </div>
  44 + <div style="display: inline-block;margin-left: 33px;">
  45 + <span class="item-label" style="width: 80px;">等级: </span>
  46 + <select class="form-control" style="width: 180px;" id=levelType>
  47 + <option value="A,B,C">A,B,C级线路</option>
  48 + <option value="D">D级线路</option>
  49 + </select>
  50 + </div>
  51 + <div style="display: inline-block;">
  52 + <span class="item-label" style="width: 80px;margin-left: 24px;">开始时间: </span>
  53 + <input class="form-control" type="text" id="date" style="width: 180px;"/>
  54 + </div>
  55 + <div style="display: inline-block;">
  56 + <span class="item-label" style="width: 80px;margin-left: 24px;">结束时间: </span>
  57 + <input class="form-control" type="text" id="endDate" style="width: 180px;"/>
  58 + </div>
  59 +
  60 + <div class="form-group">
  61 + <input type="hidden" id="id"/>
  62 + <input class="btn btn-default" type="button" id="query" value="查询"/>
  63 + <input class="btn btn-default" type="button" id="export" value="导出"/>
  64 + </div>
  65 + </form>
  66 + </div>
  67 +
  68 + <div class="portlet-body">
  69 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  70 + <table class="table table-bordered table-hover table-checkable" id="forms">
  71 + <thead>
  72 + <tr>
  73 + <td>公司</td>
  74 + <td>分公司</td>
  75 + <td>线路</td>
  76 + <td>全日次数</td>
  77 + <td>高峰次数</td>
  78 + <td>早高峰次数</td>
  79 + <td>晚高峰次数</td>
  80 + <td>低谷次数</td>
  81 + <td>最大间隔时间</td>
  82 + <td>查看</td>
  83 + </tr>
  84 + </thead>
  85 + <tbody>
  86 + </tbody>
  87 + </table>
  88 +
  89 + <table class="table table-bordered table-hover table-checkable" style="display: none" id="forms_d">
  90 + <thead>
  91 + <tr>
  92 + <td>公司</td>
  93 + <td>分公司</td>
  94 + <td>线路</td>
  95 + <td>班次数</td>
  96 + <td>发车准点数</td>
  97 + <td>发车准点率</td>
  98 + <td>到站准点数</td>
  99 + <td>到站准点率</td>
  100 + <td>查看</td>
  101 + </tr>
  102 + </thead>
  103 + <tbody>
  104 + </tbody>
  105 + </table>
  106 +
  107 +
  108 + </div>
  109 +
  110 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 906px">
  111 + <input class="btn btn-default" style="display: none" type="button" id="export_1" value="导出"/>
  112 + <table class="table table-bordered table-hover table-checkable" style="display: none" id="forms_1">
  113 + <thead>
  114 + <tr >
  115 + <td>公司</td>
  116 + <td>分公司</td>
  117 + <td>日期</td>
  118 + <td>线路</td>
  119 + <td>当天等级</td>
  120 + <td>全日次数</td>
  121 + <td>高峰次数</td>
  122 + <td>早高峰次数</td>
  123 + <td>晚高峰次数</td>
  124 + <td>低谷次数</td>
  125 + <td>最大间隔</td>
  126 + <td>查看</td>
  127 + </tr>
  128 + </thead>
  129 + <tbody>
  130 + </tbody>
  131 + </table>
  132 +
  133 + <table class="table table-bordered table-hover table-checkable" style="display: none" id="forms_d_1">
  134 + <thead>
  135 + <tr>
  136 + <td>公司</td>
  137 + <td>分公司</td>
  138 + <td>日期</td>
  139 + <td>线路</td>
  140 + <td>班次数</td>
  141 + <td>发车准点次数</td>
  142 + <td>发车准点率</td>
  143 + <td>查看</td>
  144 + <td>到站准点次数</td>
  145 + <td>到站准点率</td>
  146 + <td>查看</td>
  147 + </tr>
  148 + </thead>
  149 + <tbody>
  150 + </tbody>
  151 + </table>
  152 + </div>
  153 + </div>
  154 + </div>
  155 + </div>
  156 +</div>
  157 +<script src="/pages/mforms/singledatas/jquery.table2excel.min.js"></script>
  158 +<script>
  159 + $(function(){
  160 + // 关闭左侧栏
  161 + if (!$('body').hasClass('page-sidebar-closed'))
  162 + $('.menu-toggler.sidebar-toggler').click();
  163 +
  164 + var d = new Date();
  165 + d.setTime(d.getTime() - 1*1000*60*60*24);
  166 + var year = d.getFullYear();
  167 + var month = d.getMonth() + 1;
  168 + var day = d.getDate();
  169 + if(month < 10)
  170 + month = "0"+month;
  171 + if(day < 10)
  172 + day = "0"+day;
  173 + var dateTime = year + "-" + month + "-" + day;
  174 + $("#date").datetimepicker({
  175 + format : 'YYYY-MM-DD',
  176 + locale : 'zh-cn',
  177 + maxDate : dateTime
  178 + });
  179 + $("#endDate").datetimepicker({
  180 + format : 'YYYY-MM-DD',
  181 + locale : 'zh-cn',
  182 + maxDate : dateTime
  183 + });
  184 + $("#date").val(dateTime);
  185 + $("#endDate").val(dateTime);
  186 +
  187 + var fage=false;
  188 + var obj = [];
  189 + var xlList;
  190 + $.get('/report/lineList',function(result){
  191 + xlList=result;
  192 +
  193 + $.get('/user/companyData', function(result){
  194 + obj = result;
  195 + var options = '';
  196 + for(var i = 0; i < obj.length; i++){
  197 + options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>';
  198 + }
  199 +
  200 + if(obj.length ==0){
  201 + $("#gsdmDiv").css('display','none');
  202 + }else if(obj.length ==1){
  203 + $("#gsdmDiv").css('display','none');
  204 + if(obj[0].children.length == 1 || obj[0].children.length ==0)
  205 + $('#fgsdmDiv').css('display','none');
  206 + }
  207 + $('#gsdm').html(options);
  208 +
  209 + updateCompany();
  210 + });
  211 + });
  212 +
  213 + $("#gsdm").on("change",updateCompany);
  214 + function updateCompany(){
  215 + var company = $('#gsdm').val();
  216 + var options = '';
  217 + for(var i = 0; i < obj.length; i++){
  218 + if(obj[i].companyCode == company){
  219 + var children = obj[i].children;
  220 + for(var j = 0; j < children.length; j++){
  221 + options += '<option value="'+children[j].code+'">'+children[j].name+'</option>';
  222 + }
  223 + }
  224 + }
  225 + $('#fgsdm').html(options);
  226 + }
  227 +
  228 + var tempData = {};
  229 + $.get('/report/lineList',function(xlList){
  230 + var data = [];
  231 + data.push({id: " ", text: "全部线路"});
  232 + $.get('/user/companyData', function(result){
  233 + for(var i = 0; i < result.length; i++){
  234 + var companyCode = result[i].companyCode;
  235 + var children = result[i].children;
  236 + for(var j = 0; j < children.length; j++){
  237 + var code = children[j].code;
  238 + for(var k=0;k < xlList.length;k++ ){
  239 + if(xlList[k]["fgsbm"]==code && xlList[k]["gsbm"]==companyCode){
  240 + data.push({id: xlList[k]["xlbm"], text: xlList[k]["xlname"]});
  241 + tempData[xlList[k]["xlbm"]] = companyCode+":"+code;
  242 + }
  243 + }
  244 + }
  245 + }
  246 + initPinYinSelect2('#line',data,'');
  247 +
  248 + });
  249 + });
  250 +
  251 + $("#line").on("change", function(){
  252 + if($("#line").val() == " "){
  253 + $("#gsdm").attr("disabled", false);
  254 + $("#fgsdm").attr("disabled", false);
  255 + } else {
  256 + var temp = tempData[$("#line").val()].split(":");
  257 + $("#gsdm").val(temp[0]);
  258 + updateCompany();
  259 + $("#fgsdm").val(temp[1]);
  260 + $("#gsdm").attr("disabled", true);
  261 + $("#fgsdm").attr("disabled", true);
  262 + }
  263 + });
  264 +
  265 + $("#export").attr('disabled',"true");
  266 +
  267 + //查询
  268 + $("#query").on('click',function(){
  269 + var line = $("#line").val();
  270 + var date = $("#date").val();
  271 + var endDate = $("#endDate").val();
  272 + var fgs=$('#fgsdm').val();
  273 + var gs=$('#gsdm').val();
  274 + var levelType=$('#levelType').val();
  275 + var i = layer.load(2);
  276 + $get('/calcInterval/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,levelType:levelType,type:'query'},function(result){
  277 + if(levelType=="D"){
  278 + var intervalList_d = template('intervalList_d',{list:result});
  279 + $('#forms_d tbody').html(intervalList_d);
  280 + $('.btn-intervalList_d').on('click', showSheetList);
  281 + $("#forms").hide();
  282 + $("#forms_d").show();
  283 + }else{
  284 + var intervalList = template('intervalList',{list:result});
  285 + $('#forms tbody').html(intervalList);
  286 + $('.btn-intervalList').on('click', showIntervalList);
  287 + $("#forms_d").hide();
  288 + $("#forms").show();
  289 + }
  290 + $("#forms_d_1").hide();
  291 + $("#forms_1").hide();
  292 + $("#export_1").hide();
  293 +
  294 + layer.close(i);
  295 + if(result.length == 0)
  296 + $("#export").attr('disabled',"true");
  297 + else
  298 + $("#export").removeAttr("disabled");
  299 + });
  300 + });
  301 +
  302 + //查询大间隔
  303 + function showIntervalList(){
  304 + var id = $(this).data('id');
  305 + var date = $("#date").val();
  306 + var endDate = $("#endDate").val();
  307 + $("#id").val(id);
  308 + $get('/calcInterval/listInterval',{line:id,date:date,endDate:endDate,type:'query'},function(result){
  309 + var intervalList = template('intervalList_1',{list:result});
  310 + $('#forms_1 tbody').html(intervalList);
  311 + $('.btn-intervalList_1').on('click', openIntervalList);
  312 + $("#forms_1").show();
  313 + $("#export_1").show();
  314 + $("html,body").animate({scrollTop:$("#forms_1").offset().top},1000);
  315 + });
  316 + }
  317 +
  318 +
  319 + function openIntervalList(){
  320 + var id = $(this).data('id');
  321 +
  322 + id += ","+$(this).data('date')+",1";
  323 + $.get('/pages/report/sheet/intervalList.html', function (content) {
  324 + layer.open({
  325 + type: 1,
  326 + area: ['800px', '600px'],
  327 + content: content,
  328 + title: '线路准点率详细',
  329 + shift: 5,
  330 + scrollbar: false,
  331 + success: function () {
  332 + $('#calcIntervalList').trigger('init', id);
  333 + }
  334 + });
  335 + });
  336 + }
  337 + //查询首站发车
  338 + function showSheetList(){
  339 + var id = $(this).data('id');
  340 + var date = $("#date").val();
  341 + var endDate = $("#endDate").val();
  342 + $("#id").val(id);
  343 + $get('/calcSheet/calcListSheet_d',{line:id,date:date,endDate:endDate,type:'query'},function(result){
  344 + var sheetList = template('sheetList_1',{list:result});
  345 + $('#forms_d_1 tbody').html(sheetList);
  346 + $('.btn-calcSheetList_1').on('click', opencalcSheetList);
  347 + $('.btn-calcSheetList_2').on('click', opencalcSheetList2);
  348 + $("#forms_d_1").show();
  349 + $("#export_1").show();
  350 + $("html,body").animate({scrollTop:$("#forms_d_1").offset().top},1000);
  351 + });
  352 + }
  353 +
  354 +
  355 + function opencalcSheetList(){
  356 + var id = $(this).data('id');
  357 + id += ","+$(this).data('date')+",1";
  358 + $.get('/pages/report/sheet/calcList.html', function (content) {
  359 + layer.open({
  360 + type: 1,
  361 + area: ['800px', '600px'],
  362 + content: content,
  363 + title: '线路准点率详细',
  364 + shift: 5,
  365 + scrollbar: false,
  366 + success: function () {
  367 + $('#calcSheetList').trigger('init', id);
  368 + }
  369 + });
  370 + });
  371 + }
  372 + function opencalcSheetList2(){
  373 + var id = $(this).data('id');
  374 + id += ","+$(this).data('date')+",2";
  375 + $.get('/pages/report/sheet/calcList.html', function (content) {
  376 + layer.open({
  377 + type: 1,
  378 + area: ['800px', '600px'],
  379 + content: content,
  380 + title: '线路准点率详细',
  381 + shift: 5,
  382 + scrollbar: false,
  383 + success: function () {
  384 + $('#calcSheetList').trigger('init', id);
  385 + }
  386 + });
  387 + });
  388 + }
  389 + $("#export").on("click",function(){
  390 + var line = $("#line").val();
  391 + var date = $("#date").val();
  392 + var endDate = $("#endDate").val();
  393 + var fgs=$('#fgsdm').val();
  394 + var gs=$('#gsdm').val();
  395 + var levelType=$('#levelType').val();
  396 + var lineName = $('#line option:selected').text();
  397 + if(lineName == "全部线路")
  398 + lineName = $('#fgsdm option:selected').text();
  399 + var i = layer.load(2);
  400 + $get('/calcInterval/countList',{line:line,date:date,endDate:endDate,gs:gs,fgs:fgs,levelType:levelType,type:"export",lineName:lineName},function(result){
  401 + var dateTime = "";
  402 + if(date == endDate){
  403 + dateTime = moment(date).format("YYYYMMDD");
  404 + } else {
  405 + dateTime = moment(date).format("YYYYMMDD")+"-"+
  406 + moment(endDate).format("YYYYMMDD");
  407 + }
  408 + if(levelType=="D"){
  409 + window.open("/downloadFile/download?fileName="
  410 + +dateTime+"-"+lineName+"-发车到站准点率");
  411 + }else{
  412 + window.open("/downloadFile/download?fileName="
  413 + +dateTime+"-"+lineName+"-大间隔汇总表");
  414 + }
  415 +
  416 + layer.close(i);
  417 + });
  418 + });
  419 +
  420 + $("#export_1").on("click",function(){
  421 + var id = $("#id").val();
  422 + var date = $("#date").val();
  423 + var endDate = $("#endDate").val();
  424 + var levelType=$("#levelType").val();
  425 + if(levelType=='D'){
  426 + var i = layer.load(2);
  427 + $get('/calcSheet/calcListSheet',{line:id,date:date,endDate:endDate,type:'export'},function(result){
  428 + window.open("/downloadFile/download?fileName=发车到站准点率"+moment(date).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD"));
  429 + layer.close(i);
  430 + });
  431 + }else{
  432 + $get('/calcInterval/listInterval',{line:id,date:date,endDate:endDate,type:'export'},function(result){
  433 + window.open("/downloadFile/download?fileName=大间距汇总表"+moment(date).format("YYYYMMDD")+"-"+moment(endDate).format("YYYYMMDD"));
  434 + layer.close(i);
  435 + });
  436 + }
  437 +
  438 + })
  439 +
  440 + });
  441 +</script>
  442 +<script type="text/html" id="intervalList">
  443 + {{each list as obj i}}
  444 + <tr>
  445 + <td>{{obj.gs}}</td>
  446 + <td>{{obj.fgs}}</td>
  447 + <td>{{obj.xlName}}</td>
  448 + <td>{{obj.djgAll}}</td>
  449 + <td>{{obj.djgGf}}</td>
  450 + <td>{{obj.djgZgf}}</td>
  451 + <td>{{obj.djgWgf}}</td>
  452 + <td>{{obj.djgDg}}</td>
  453 + <td>{{obj.djgTime}}</td>
  454 + <td>
  455 + <button type="button" class="btn btn-sm blue btn-intervalList"
  456 + data-id="{{obj.xlBm}}">查看</button>
  457 + </td>
  458 + </tr>
  459 + {{/each}}
  460 + {{if list.length == 0}}
  461 + <tr>
  462 + <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td>
  463 + </tr>
  464 + {{/if}}
  465 +</script>
  466 +
  467 +<script type="text/html" id="intervalList_d">
  468 + {{each list as obj i}}
  469 + <tr>
  470 + <td>{{obj.gs}}</td>
  471 + <td>{{obj.fgs}}</td>
  472 + <td>{{obj.xlName}}</td>
  473 + <td>{{obj.jhszfcs}}</td>
  474 + <td>{{obj.sjszfczds}}</td>
  475 + <td>{{obj.szfczdl}}</td>
  476 + <td>{{obj.sjszddzds}}</td>
  477 + <td>{{obj.szddzdl}}</td>
  478 + <td>
  479 + <button type="button" class="btn btn-sm blue btn-intervalList_d"
  480 + data-id="{{obj.xlBm}}">查看</button>
  481 + </td>
  482 + </tr>
  483 + {{/each}}
  484 + {{if list.length == 0}}
  485 + <tr>
  486 + <td colspan="9"><h6 class="muted">没有找到相关数据</h6></td>
  487 + </tr>
  488 + {{/if}}
  489 +</script>
  490 +
  491 +
  492 +<script type="text/html" id="intervalList_1">
  493 + {{each list as obj i}}
  494 + <tr>
  495 + <td>{{obj.gs}}</td>
  496 + <td>{{obj.fgs}}</td>
  497 + <td>{{obj.date}}</td>
  498 + <td>{{obj.xl}}</td>
  499 + <td>{{obj.level}}</td>
  500 + <td>{{obj.djgAll}}</td>
  501 + <td>{{obj.djgGf}}</td>
  502 + <td>{{obj.djgZgf}}</td>
  503 + <td>{{obj.djgWgf}}</td>
  504 + <td>{{obj.djgDg}}</td>
  505 + <td>{{obj.djgTime}}</td>
  506 + <td>
  507 + <button type="button" class="btn btn-sm blue btn-intervalList_1"
  508 + data-id="{{obj.xlBm}}" data-date="{{obj.date}}">详细</button>
  509 + </td>
  510 + </tr>
  511 + {{/each}}
  512 + {{if list.length == 0}}
  513 + <tr>
  514 + <td colspan="11"><h6 class="muted">没有找到相关数据</h6></td>
  515 + </tr>
  516 + {{/if}}
  517 +</script>
  518 +
  519 +<script type="text/html" id="sheetList_1">
  520 + {{each list as obj i}}
  521 + <tr>
  522 + <td>{{obj.gsname}}</td>
  523 + <td>{{obj.fgsname}}</td>
  524 + <td>{{obj.xlName}}</td>
  525 + <td>{{obj.date}}</td>
  526 + <td>{{obj.jhszfcs}}</td>
  527 + <td>{{obj.sjszfczds}}</td>
  528 + <td>{{obj.szfczdl}}</td>
  529 + <td>
  530 + <button type="button" class="btn btn-sm blue btn-calcSheetList_1"
  531 + data-id="{{obj.xl}}" data-date="{{obj.date}}">详细</button>
  532 + </td>
  533 + <td>{{obj.sjszddzds}}</td>
  534 + <td>{{obj.szddzdl}}</td>
  535 + <td>
  536 + <button type="button" class="btn btn-sm blue btn-calcSheetList_2"
  537 + data-id="{{obj.xl}}" data-date="{{obj.date}}" >详细</button>
  538 + </td>
  539 + </tr>
  540 + {{/each}}
  541 + {{if list.length == 0}}
  542 + <tr>
  543 + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
  544 + </tr>
  545 + {{/if}}
  546 + {{if list.length == 0}}
  547 + <tr>
  548 + <td colspan="7"><h6 class="muted">没有找到相关数据</h6></td>
  549 + </tr>
  550 + {{/if}}
  551 +</script>
  552 +
... ...
src/main/resources/static/pages/report/sheet/intervalList.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title" style="margin-left: 20px">
  21 + <button id="exportList">数据导出</button>
  22 + </div>
  23 +</div>
  24 +
  25 +<div class="row" id="calcIntervalList">
  26 + <div class="col-md-12">
  27 + <div class="portlet light porttlet-fit bordered">
  28 + <div class="portlet-body">
  29 + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 600px">
  30 + <table class="table table-bordered table-hover table-checkable" id="forms_2">
  31 + <thead>
  32 + <tr>
  33 + <td></td>
  34 + <td>日期</td>
  35 + <td>线路</td>
  36 + <td>站点</td>
  37 + <td>等级</td>
  38 + <td>计发</td>
  39 + <td>实发</td>
  40 + <td>计发</td>
  41 + <td>实发</td>
  42 + <td>间隔时间</td>
  43 + </tr>
  44 + </thead>
  45 +
  46 + <tbody>
  47 +
  48 + </tbody>
  49 + </table>
  50 + </div>
  51 + </div>
  52 + </div>
  53 + </div>
  54 +</div>
  55 +<script>
  56 + $(function(){
  57 + // 关闭左侧栏
  58 + if (!$('body').hasClass('page-sidebar-closed'))
  59 + $('.menu-toggler.sidebar-toggler').click();
  60 + var no="";
  61 + var dates="";
  62 + $("#calcIntervalList").on('init', function (e, id) {
  63 + no=id.split(",")[0];
  64 + dates = id.split(",")[1];
  65 + var i = layer.load(2);
  66 + $get('/calcInterval/interval',{line:no,date:dates,type:'query'},function(result){
  67 + layer.close(i);
  68 + var calcIntervalList_2 = template('calcIntervalList_2',{list:result});
  69 + $('#forms_2 tbody').html(calcIntervalList_2);
  70 + });
  71 + })
  72 + $("#exportList").on('click',function(){
  73 + var i = layer.load(2);
  74 + $get('/calcInterval/interval',{line:no,date:dates,type:'export'},function(result){
  75 + window.open("/downloadFile/download?fileName="+dates+"大间隔详细");
  76 + layer.close(i);
  77 + });
  78 + });
  79 +
  80 +
  81 + });
  82 +</script>
  83 +<script type="text/html" id="calcIntervalList_2">
  84 + {{each list as obj i}}
  85 + <tr >
  86 + <td>{{i+1}}</td>
  87 + <td>{{obj.date}}</td>
  88 + <td>{{obj.xlName}}</td>
  89 + <td>{{obj.station}}</td>
  90 + <td>{{obj.level}}</td>
  91 + <td>{{obj.jhfc1}}</td>
  92 + <td>{{obj.sjfc1}}</td>
  93 + <td>{{obj.jhfc2}}</td>
  94 + <td>{{obj.sjfc2}}</td>
  95 + <td>{{obj.subTime}}</td>
  96 + </tr>
  97 + {{/each}}
  98 + {{if list.length == 0}}
  99 + <tr>
  100 + <td colspan="10"><h6 class="muted">没有找到相关数据</h6></td>
  101 + </tr>
  102 + {{/if}}
  103 +</script>
0 104 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/fcxxwt.html
... ... @@ -182,8 +182,7 @@
182 182 (function() {
183 183 var adjustExps = ['配车', '保养', '故障', '肇事', '路阻', '纠纷', '缺人', '客稀', '缺车', '气候', '援外', '吊慢', '抽减', '其他'];
184 184 var reportTypes = [{name:"无到", code:"9101"}, {name:"无出", code:"9109"}, {name:"掉线", code:"9102"}, {name:"指令故障", code:"9103"}, {name:"车辆漂移", code:"9104"}];
185   - var modal = '#schedule-fcxxwt-modal'
186   - ,sch;
  185 + var modal = '#schedule-fcxxwt-modal', sch, isReport = false;
187 186 $(modal).on('init', function(e, data) {
188 187 e.stopPropagation();
189 188 sch=data.sch;
... ... @@ -216,6 +215,7 @@
216 215 for (var j = 0;j < reportTypes.length;j++) {
217 216 if (items[i] == reportTypes[j].name) {
218 217 $('input:checkbox[value=' + reportTypes[j].code + ']').prop('checked', true);
  218 + isReport = true;
219 219 }
220 220 }
221 221 }
... ... @@ -226,7 +226,7 @@
226 226 var f = $('form', modal).formValidation(gb_form_validation_opts);
227 227 f.on('success.form.fv', function(e) {
228 228 e.preventDefault();
229   - var data = $(this).serializeJSON();
  229 + var data = $(this).serializeJSON(), reportText = new Array();
230 230  
231 231 //校验实发实达时间
232 232 if(!validation_s_e_Time(data)){
... ... @@ -239,11 +239,40 @@
239 239 //修改里程
240 240 var editJhlc = data.jhlc != sch.jhlc && data.jhlc != 0;
241 241 // 修改报修类型为字符串
242   - if (data.reportTypes) data.reportTypes = data.reportTypes.join(";");
243 242 if(!data.adjustExps && (data.status==-1 || normalDestory || editJhlc)){
244 243 notify_err("当前操作需要选择调整原因!");
245 244 return;
246 245 }
  246 + if (data.reportTypes) {
  247 + for (var i = 0;i < data.reportTypes.length;i++) {
  248 + for (var j = 0;j < reportTypes.length;j++) {
  249 + if (data.reportTypes[i] == reportTypes[j].code) {
  250 + reportText.push(reportTypes[j].name);
  251 + break;
  252 + }
  253 + }
  254 + }
  255 + if (!isReport) {
  256 + layer.confirm('确定上报类型[' + reportText.join(';') + ']?', {
  257 + btn : [ '确定', '取消' ],
  258 + icon : 3,
  259 + skin : 'layui-layer-cfm-add'
  260 + }, function() {
  261 + layer.closeAll();
  262 + // 修改报修类型为字符串
  263 + data.reportTypes = data.reportTypes.join(";");
  264 + postData(data);
  265 + }, function() {
  266 + $('.uk-button-primary').attr('disabled', false);
  267 + });
  268 + return;
  269 + }
  270 +
  271 + data.reportTypes = data.reportTypes.join(";");
  272 + postData(data);
  273 + return;
  274 + }
  275 +
247 276 postData(data);
248 277 });
249 278  
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sftz.html
... ... @@ -14,7 +14,7 @@
14 14 <div class="uk-form-row">
15 15 <label class="uk-form-label" >车辆</label>
16 16 <div class="uk-form-controls">
17   - <input type="text" value="{{sch.clZbh}}" disabled>
  17 + <input type="text" name="clZbh" value="{{sch.clZbh}}" readonly>
18 18 </div>
19 19 </div>
20 20 </div>
... ... @@ -83,24 +83,65 @@
83 83  
84 84 <script>
85 85 (function() {
86   - var modal = '#schedule-sftz-modal',
87   - sch;
  86 + var modal = '#schedule-sftz-modal', sch, isReport = false;
88 87 var reportTypes = [{name:"无到", code:"9101"}, {name:"无出", code:"9109"}, {name:"掉线", code:"9102"}, {name:"指令故障", code:"9103"}, {name:"车辆漂移", code:"9104"}];
89 88 $(modal).on('init', function(e, data) {
90 89 e.stopPropagation();
91 90 sch = data.sch;
  91 + debugger;
92 92 var formHtml = template('schedule-sftz-form-temp', {sch: sch, reportTypes:reportTypes});
93 93 $('form', modal).html(formHtml);
  94 + $('input:checkbox').click(function(){
  95 + var remark = $('[name=remarks]').val(), title = $(this).prop("title");
  96 + if ($(this).prop('checked')) {
  97 + if (remark.indexOf(title) > -1) return;
  98 + $('[name=remarks]').val((remark ? remark + ";" : "") + title);
  99 + } else {
  100 + $('[name=remarks]').val(remark.replace(";" + title, "").replace(title + ";", "").replace(title, ""));
  101 + }
  102 + });
94 103  
95 104 //submit
96 105 var f = $('form', modal).formValidation(gb_form_validation_opts);
97 106 f.on('success.form.fv', function(e) {
98 107 e.preventDefault();
99   - var data = $(this).serializeJSON();
  108 + var data = $(this).serializeJSON(), reportText = new Array();
100 109  
101   - // 修改报修类型为字符串
102   - if (data.reportTypes) data.reportTypes = data.reportTypes.join(";");
103   - gb_common.$post('/realSchedule/realOutAdjust', data, function(rs) {
  110 + if (data.reportTypes) {
  111 + for (var i = 0;i < data.reportTypes.length;i++) {
  112 + for (var j = 0;j < reportTypes.length;j++) {
  113 + if (data.reportTypes[i] == reportTypes[j].code) {
  114 + reportText.push(reportTypes[j].name);
  115 + break;
  116 + }
  117 + }
  118 + }
  119 + if (!isReport) {
  120 + layer.confirm('确定上报类型[' + reportText.join(';') + ']?', {
  121 + btn : [ '确定', '取消' ],
  122 + icon : 3,
  123 + skin : 'layui-layer-cfm-add'
  124 + }, function() {
  125 + layer.closeAll();
  126 + // 修改报修类型为字符串
  127 + data.reportTypes = data.reportTypes.join(";");
  128 + postData(data);
  129 + }, function() {
  130 + $('.uk-button-primary').attr('disabled', false);
  131 + });
  132 + return;
  133 + }
  134 +
  135 + data.reportTypes = data.reportTypes.join(";");
  136 + postData(data);
  137 + return;
  138 + }
  139 +
  140 + postData(data);
  141 + });
  142 +
  143 + var postData = function (data) {
  144 + gb_common.$post('/realSchedule/realOutAdjust', data, function(rs) {
104 145 if (rs.ts) {
105 146 //更新前端数据
106 147 gb_schedule_table.updateSchedule(rs.ts);
... ... @@ -111,7 +152,7 @@
111 152 gb_schedule_table.calc_yfwf_num(sch.xlBm);
112 153 }
113 154 });
114   - });
  155 + }
115 156  
116 157 // 维修类型选中
117 158 var initReport = function() {
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/wxsb.html
... ... @@ -22,7 +22,7 @@
22 22 <div class="uk-form-row">
23 23 <label class="uk-form-label" >故障类型</label>
24 24 <div class="uk-form-controls">
25   - <select name="repairTypes"></select>
  25 + <select name="reportTypes"></select>
26 26 </div>
27 27 </div>
28 28 </div>
... ... @@ -35,8 +35,7 @@
35 35  
36 36 <script>
37 37 (function() {
38   - var modal = '#schedule-wxsb-modal'
39   - ,sch;
  38 + var modal = '#schedule-wxsb-modal', sch;
40 39  
41 40 $(modal).on('init', function(e, data) {
42 41 e.stopPropagation();
... ... @@ -46,23 +45,40 @@
46 45  
47 46 //报修类型字典
48 47 var opts = new Array();
49   - var repairTypes=[{name:"录像不连续", code:"9201"}, {name:"无录像", code:"9202"}, {name:"录像缺通告", code:"9203"}, {name:"无法调取录像", code:"9204"}, {name:"其它录像报修", code:"9209"}, {name:"黑屏", code:"9301"}, {name:"间歇性黑屏", code:"9302"}, {name:"中门视屏无", code:"9303"}, {name:"卡在启动界面", code:"9304"}, {name:"倒车视频无", code:"9305"}, {name:"启动后显示倒车", code:"9306"}, {name:"其它屏幕报修", code:"9309"}];
50   - for(var i = 0;i < repairTypes.length;i++){
51   - opts.push('<option value="'+repairTypes[i].code+'">'+repairTypes[i].name+'</option>');
  48 + var reportTypes = [{name:"录像不连续", code:"9201"}, {name:"无录像", code:"9202"}, {name:"录像缺通告", code:"9203"}, {name:"无法调取录像", code:"9204"}, {name:"其它录像报修", code:"9209"}, {name:"黑屏", code:"9301"}, {name:"间歇性黑屏", code:"9302"}, {name:"中门视屏无", code:"9303"}, {name:"卡在启动界面", code:"9304"}, {name:"倒车视频无", code:"9305"}, {name:"启动后显示倒车", code:"9306"}, {name:"其它屏幕报修", code:"9309"}];
  49 + for(var i = 0;i < reportTypes.length;i++){
  50 + opts.push('<option value="'+reportTypes[i].code+'">'+reportTypes[i].name+'</option>');
52 51 }
53   - $('[name=repairTypes]', modal).html(opts.join(""));
  52 + $('[name=reportTypes]', modal).html(opts.join(""));
54 53  
55 54 //submit
56 55 var f = $('form', modal).formValidation(gb_form_validation_opts);
57 56 f.on('success.form.fv', function(e) {
58 57 e.preventDefault();
59 58 $('[type=submit]', f).attr('disabled', 'disabled');
60   - var data = $(this).serializeJSON();
61   - gb_common.$post('/realSchedule/wxsb', data, function(rs){
62   - //更新班次信息
63   - notify_succ('操作成功!');
64   - UIkit.modal(modal).hide();
65   - });
  59 + var data = $(this).serializeJSON(), reportText = new Array();
  60 +
  61 + for (var j = 0;j < reportTypes.length;j++) {
  62 + if (data.reportTypes == reportTypes[j].code) {
  63 + reportText.push(reportTypes[j].name);
  64 + break;
  65 + }
  66 + }
  67 +
  68 + layer.confirm('确定上报类型[' + reportText.join(';') + ']?', {
  69 + btn : [ '确定', '取消' ],
  70 + icon : 3,
  71 + skin : 'layui-layer-cfm-add'
  72 + }, function() {
  73 + layer.closeAll();
  74 + gb_common.$post('/realSchedule/wxsb', data, function(rs){
  75 + //更新班次信息
  76 + notify_succ('操作成功!');
  77 + UIkit.modal(modal).hide();
  78 + });
  79 + }, function() {
  80 + $('.uk-button-primary').attr('disabled', false);
  81 + });
66 82 });
67 83 });
68 84 })();
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/add.html 0 → 100644
  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 +</div>
0 607 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/css/main.css 0 → 100644
  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 +}
0 211 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/list.html 0 → 100644
  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 +</div>
0 509 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/list2.html 0 → 100644
  1 +<style type="text/css">
  2 + .table-bordered {
  3 + border: 1px solid; }
  4 + .table-bordered > thead > tr > th,
  5 + .table-bordered > thead > tr > td,
  6 + .table-bordered > tbody > tr > th,
  7 + .table-bordered > tbody > tr > td,
  8 + .table-bordered > tfoot > tr > th,
  9 + .table-bordered > tfoot > tr > td {
  10 + border: 1px solid; }
  11 + .table-bordered > thead > tr > th,
  12 + .table-bordered > thead > tr > td {
  13 + border-bottom-width: 2px; }
  14 +
  15 + .table > tbody + tbody {
  16 + border-top: 1px solid; }
  17 +</style>
  18 +
  19 +<div class="page-head">
  20 + <div class="page-title">
  21 + <h1>报备登记报表</h1>
  22 + </div>
  23 +</div>
  24 +
  25 +<div class="row">
  26 + <div class="col-md-12">
  27 + <div class="portlet light porttlet-fit bordered">
  28 + <div class="portlet-title">
  29 + <form 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 0 → 100644
  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 +</div>
0 592 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/mould/report_register.xls 0 → 100644
No preview for this file type
src/main/resources/static/real_control_v2/fragments/north/nav/report_register/update.html 0 → 100644
  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 +</div>
0 615 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/north/tabs.html
... ... @@ -4,7 +4,7 @@
4 4 <li class="uk-active" ><a>主页</a></li>
5 5 <li id="north_tabs_map_btn"><a>地图</a></li>
6 6 {{each list as line i}}
7   - <li class="tab-line {{line.destroy==1?'destroy':''}}" data-code="{{line.lineCode}}"><a>{{line.name}}(<span id="badge_untreated_num_{{line.lineCode}}">0</span>, <span id="badge_yfwf_num_{{line.lineCode}}">0</span>)</a></li>
  7 + <li class="tab-line {{line.destroy==1?'destroy':''}}" data-code="{{line.lineCode}}"><a>{{line.name}}&nbsp;(<span id="badge_untreated_num_{{line.lineCode}}">0</span>, <span id="badge_yfwf_num_{{line.lineCode}}">0</span>, <span id="level_{{line.lineCode}}">{{line.lineLevel}}</span>)</a></li>
8 8 {{/each}}
9 9 </ul>
10 10 </script>
... ...
src/main/resources/static/real_control_v2/js/data/json/north_toolbar.json
... ... @@ -188,5 +188,22 @@
188 188 }
189 189  
190 190 ]
  191 + },
  192 + {
  193 + "id": 5,
  194 + "text": "服务热线系统",
  195 + "children": [
  196 + {
  197 + "id": 5.1,
  198 + "text": "报备登记",
  199 + "event": "report_register"
  200 + },
  201 + {
  202 + "id": 5.2,
  203 + "text": "报备登记报表",
  204 + "event": "form_report_register",
  205 + "icon": "uk-icon-table"
  206 + }
  207 + ]
191 208 }
192 209 ]
193 210 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/js/line_schedule/context_menu.js
... ... @@ -289,7 +289,7 @@ var gb_schedule_context_menu = (function () {
289 289 wxsb: function (sch) {
290 290 open_modal(folder + '/wxsb.html', {
291 291 sch: sch
292   - }, modal_opts);
  292 + }, {center: true, bgclose: false, modal: true});
293 293 }
294 294 };
295 295  
... ...
src/main/resources/static/real_control_v2/js/north/toolbar.js
... ... @@ -241,6 +241,13 @@ var gb_northToolbar = (function () {
241 241 },
242 242 form_shifday: function () {
243 243 gb_embed_form_hanlde.open_modal_form_fragment('/pages/mforms/shifdays/shifday.html', '班次车辆人员日统计');
  244 + },
  245 + form_report_register: function () {
  246 + // gb_embed_form_hanlde.open_modal_form_fragment('/pages/forms/statement/report_register/list2.html', '报备登记报表');
  247 + open_modal('/real_control_v2/fragments/north/nav/report_register/list.html', {}, modal_opts);
  248 + },
  249 + report_register: function () {
  250 + open_modal('/real_control_v2/fragments/north/nav/report_register/manage.html', {}, modal_opts);
244 251 }
245 252 };
246 253  
... ...