Commit 81fbda38d4a77f39e162954ac0abd84a952076d9

Authored by 徐烜
2 parents 32956ff6 325cff18

Update 2017_10_27

Showing 41 changed files with 2470 additions and 807 deletions
src/main/java/com/bsth/controller/LineController.java
... ... @@ -77,6 +77,22 @@ public class LineController extends BaseController<Line, Integer> {
77 77 return service.save(t);
78 78 }
79 79  
  80 + /**
  81 + *
  82 + * 更改
  83 + *
  84 + */
  85 + @RequestMapping(value="/update", method = RequestMethod.POST)
  86 + public Map<String, Object> update(Line l){
  87 + Map<String, Object> map = new HashMap<>();
  88 + if((l.getId().toString().length()) > 6 || service.lineCodeVerification(l.getLineCode()).equals("true") ) {
  89 +
  90 + map.put("status", ResponseCode.ERROR);
  91 + return map;
  92 + }
  93 + return service.save(l);
  94 + }
  95 +
80 96 @RequestMapping(value ="/findById" , method = RequestMethod.GET)
81 97 Line findByID(@RequestParam(defaultValue = "id") Integer id){
82 98 return service.findById(id);
... ...
src/main/java/com/bsth/controller/forms/ExportController.java
... ... @@ -186,7 +186,7 @@ public class ExportController {
186 186 m.put("i", i);
187 187 m.put("rQ", l.getrQ());
188 188 m.put("gS", l.getgS());
189   - m.put("xL", l.getxL());
  189 + m.put("xL", l.getXlmc());
190 190 m.put("clzbh", l.getClzbh());
191 191 m.put("jsy", l.getJsy());
192 192 m.put("jName", l.getjName());
... ...
src/main/java/com/bsth/controller/realcontrol/summary/FastAndSlowController.java 0 → 100644
  1 +package com.bsth.controller.realcontrol.summary;
  2 +
  3 +import com.bsth.controller.BaseController;
  4 +import com.bsth.data.summary.entity.FastAndSlow;
  5 +import com.bsth.data.summary.service.FastAndSlowService;
  6 +import org.springframework.beans.factory.annotation.Autowired;
  7 +import org.springframework.web.bind.annotation.PathVariable;
  8 +import org.springframework.web.bind.annotation.RequestMapping;
  9 +import org.springframework.web.bind.annotation.RequestParam;
  10 +import org.springframework.web.bind.annotation.RestController;
  11 +
  12 +import javax.servlet.http.HttpServletRequest;
  13 +import javax.servlet.http.HttpServletResponse;
  14 +
  15 +/**
  16 + * 快慢误点统计
  17 + * Created by panzhao on 2017/10/24.
  18 + */
  19 +@RestController
  20 +@RequestMapping("/summary/fastAndSlow")
  21 +public class FastAndSlowController extends BaseController<FastAndSlow, Long> {
  22 +
  23 + @Autowired
  24 + FastAndSlowService fastAndSlowService;
  25 +
  26 + @RequestMapping("/excel/{lineCode}")
  27 + public void excel(@PathVariable("lineCode") String lineCode, @RequestParam String st
  28 + , @RequestParam String et, @RequestParam int type, HttpServletRequest request, HttpServletResponse response) {
  29 + fastAndSlowService.excel(lineCode, st, et, type, request, response);
  30 + }
  31 +}
0 32 \ No newline at end of file
... ...
src/main/java/com/bsth/controller/schedule/TrafficManageController.java
... ... @@ -51,7 +51,16 @@ public class TrafficManageController {
51 51 @RequestMapping(value = "/setLD", method = RequestMethod.GET)
52 52 public String setLD() throws Exception {
53 53 try {
54   - return trManageService.setLD();
  54 + return trManageService.setLD(null);
  55 + } catch (Exception exp) {
  56 + throw new Exception(exp.getCause());
  57 + }
  58 + }
  59 +
  60 + @RequestMapping(value = "/setLDByDate", method = RequestMethod.GET)
  61 + public String setLDByDate(@RequestParam("theDate") String theDate) throws Exception {
  62 + try {
  63 + return trManageService.setLD(theDate);
55 64 } catch (Exception exp) {
56 65 throw new Exception(exp.getCause());
57 66 }
... ...
src/main/java/com/bsth/data/schedule/SchAttrCalculator.java
... ... @@ -221,7 +221,8 @@ public class SchAttrCalculator {
221 221 for (ScheduleRealInfo sch : list) {
222 222 //如果是出站既出场,忽略出场班次
223 223 if (outConfig == 2 && sch.getBcType().equals("out")
224   - && (!limitPark || park.equals(sch.getQdzCode())))
  224 + && (!limitPark || park.equals(sch.getQdzCode()))
  225 + && (sch.getBcsj()==0 || sch.getJhlcOrig().intValue()==0))
225 226 continue;
226 227  
227 228 //忽略烂班
... ... @@ -259,7 +260,8 @@ public class SchAttrCalculator {
259 260 for (ScheduleRealInfo sch : list) {
260 261 //如果是出站既出场,忽略出场班次
261 262 if (outConfig == 2 && isInout(sch)
262   - && (!limitPark || park.equals(sch.getQdzCode()) || park.equals(sch.getZdzCode())))
  263 + && (!limitPark || park.equals(sch.getQdzCode()) || park.equals(sch.getZdzCode()))
  264 + && (sch.getBcsj()==0 || sch.getJhlcOrig().intValue()==0))
263 265 continue;
264 266  
265 267 //忽略烂班
... ...
src/main/java/com/bsth/data/schedule/late_adjust/LateAdjustHandle.java
... ... @@ -135,6 +135,12 @@ public class LateAdjustHandle implements ApplicationContextAware{
135 135 if(sch == null)
136 136 return;
137 137  
  138 + //可能是延迟信号,gps时间没有误点
  139 + if(gps.getTimestamp() <= sch.getDfsjT()){
  140 + sch.setLate2(false);
  141 + lateSchMap.remove(sch.getClZbh());
  142 + return;
  143 + }
138 144 //进的是班次起点(名称一样即可)
139 145 gps.setStationName(BasicData.stationCode2NameMap.get(gps.getLineId() + "_" + gps.getUpDown() + "_" + gps.getStopNo()));
140 146 if(gps.getStationName().equals(sch.getQdzName())
... ...
src/main/java/com/bsth/data/summary/entity/FastAndSlow.java 0 → 100644
  1 +package com.bsth.data.summary.entity;
  2 +
  3 +import javax.persistence.Column;
  4 +import javax.persistence.Entity;
  5 +import javax.persistence.Id;
  6 +import javax.persistence.Table;
  7 +
  8 +/**
  9 + * 快慢误点
  10 + * Created by panzhao on 2017/10/24.
  11 + */
  12 +@Entity
  13 +@Table(name = "z_calc_fast_slow")
  14 +public class FastAndSlow {
  15 +
  16 + /**
  17 + * 班次ID
  18 + */
  19 + @Id
  20 + @Column(name = "s_id")
  21 + private Long id;
  22 +
  23 + /**
  24 + * 发车站点
  25 + */
  26 + private String stationName;
  27 +
  28 + /**
  29 + * 日期
  30 + */
  31 + @Column(name = "rq")
  32 + private String rq;
  33 +
  34 + /**
  35 + * 上下行
  36 + */
  37 + private int upDown;
  38 +
  39 + /**
  40 + * 计发时间
  41 + * HH:mm
  42 + */
  43 + private String fcsj;
  44 +
  45 + /**
  46 + * 待发时间
  47 + * HH:mm
  48 + */
  49 + private String dfsj;
  50 +
  51 + /**
  52 + * 实际发车时间
  53 + * HH:mm
  54 + */
  55 + private String fcsjActual;
  56 +
  57 + /**
  58 + * 计发快误点
  59 + */
  60 + private int fcsjFast;
  61 +
  62 + /**
  63 + * 计发慢误点
  64 + */
  65 + private int fcsjSlow;
  66 +
  67 + /**
  68 + * 待发快误点
  69 + */
  70 + private int dfsjFast;
  71 +
  72 + /**
  73 + * 待发慢误点
  74 + */
  75 + private int dfsjSlow;
  76 +
  77 + /**
  78 + * 计划终点时间
  79 + */
  80 + private String zdsj;
  81 +
  82 + /**
  83 + * 待发终点时间
  84 + */
  85 + private String zdsjDf;
  86 +
  87 + /**
  88 + * 实际终点时间
  89 + */
  90 + private String zdsjActual;
  91 +
  92 + /**
  93 + * 计发终点快误点
  94 + */
  95 + private int zdsjFast;
  96 +
  97 + /**
  98 + * 计发终点慢误点
  99 + */
  100 + private int zdsjSlow;
  101 +
  102 + /**
  103 + * 待发终点快误点
  104 + */
  105 + private int zdsjDfFast;
  106 +
  107 + /**
  108 + * 待发终点慢误点
  109 + */
  110 + private int zdsjDfSlow;
  111 +
  112 + @Column(name = "line_code")
  113 + private String lineCode;
  114 +
  115 + private Long t;
  116 +
  117 + public String getStationName() {
  118 + return stationName;
  119 + }
  120 +
  121 + public void setStationName(String stationName) {
  122 + this.stationName = stationName;
  123 + }
  124 +
  125 + public String getRq() {
  126 + return rq;
  127 + }
  128 +
  129 + public void setRq(String rq) {
  130 + this.rq = rq;
  131 + }
  132 +
  133 + public int getUpDown() {
  134 + return upDown;
  135 + }
  136 +
  137 + public void setUpDown(int upDown) {
  138 + this.upDown = upDown;
  139 + }
  140 +
  141 + public String getFcsj() {
  142 + return fcsj;
  143 + }
  144 +
  145 + public void setFcsj(String fcsj) {
  146 + this.fcsj = fcsj;
  147 + }
  148 +
  149 + public String getDfsj() {
  150 + return dfsj;
  151 + }
  152 +
  153 + public void setDfsj(String dfsj) {
  154 + this.dfsj = dfsj;
  155 + }
  156 +
  157 + public String getFcsjActual() {
  158 + return fcsjActual;
  159 + }
  160 +
  161 + public void setFcsjActual(String fcsjActual) {
  162 + this.fcsjActual = fcsjActual;
  163 + }
  164 +
  165 + public int getFcsjFast() {
  166 + return fcsjFast;
  167 + }
  168 +
  169 + public void setFcsjFast(int fcsjFast) {
  170 + this.fcsjFast = fcsjFast;
  171 + }
  172 +
  173 + public int getFcsjSlow() {
  174 + return fcsjSlow;
  175 + }
  176 +
  177 + public void setFcsjSlow(int fcsjSlow) {
  178 + this.fcsjSlow = fcsjSlow;
  179 + }
  180 +
  181 + public int getDfsjFast() {
  182 + return dfsjFast;
  183 + }
  184 +
  185 + public void setDfsjFast(int dfsjFast) {
  186 + this.dfsjFast = dfsjFast;
  187 + }
  188 +
  189 + public int getDfsjSlow() {
  190 + return dfsjSlow;
  191 + }
  192 +
  193 + public void setDfsjSlow(int dfsjSlow) {
  194 + this.dfsjSlow = dfsjSlow;
  195 + }
  196 +
  197 + public String getZdsj() {
  198 + return zdsj;
  199 + }
  200 +
  201 + public void setZdsj(String zdsj) {
  202 + this.zdsj = zdsj;
  203 + }
  204 +
  205 + public String getZdsjDf() {
  206 + return zdsjDf;
  207 + }
  208 +
  209 + public void setZdsjDf(String zdsjDf) {
  210 + this.zdsjDf = zdsjDf;
  211 + }
  212 +
  213 + public String getZdsjActual() {
  214 + return zdsjActual;
  215 + }
  216 +
  217 + public void setZdsjActual(String zdsjActual) {
  218 + this.zdsjActual = zdsjActual;
  219 + }
  220 +
  221 + public int getZdsjFast() {
  222 + return zdsjFast;
  223 + }
  224 +
  225 + public void setZdsjFast(int zdsjFast) {
  226 + this.zdsjFast = zdsjFast;
  227 + }
  228 +
  229 + public int getZdsjSlow() {
  230 + return zdsjSlow;
  231 + }
  232 +
  233 + public void setZdsjSlow(int zdsjSlow) {
  234 + this.zdsjSlow = zdsjSlow;
  235 + }
  236 +
  237 + public int getZdsjDfFast() {
  238 + return zdsjDfFast;
  239 + }
  240 +
  241 + public void setZdsjDfFast(int zdsjDfFast) {
  242 + this.zdsjDfFast = zdsjDfFast;
  243 + }
  244 +
  245 + public int getZdsjDfSlow() {
  246 + return zdsjDfSlow;
  247 + }
  248 +
  249 + public void setZdsjDfSlow(int zdsjDfSlow) {
  250 + this.zdsjDfSlow = zdsjDfSlow;
  251 + }
  252 +
  253 + public String getLineCode() {
  254 + return lineCode;
  255 + }
  256 +
  257 + public void setLineCode(String lineCode) {
  258 + this.lineCode = lineCode;
  259 + }
  260 +
  261 + public Long getId() {
  262 + return id;
  263 + }
  264 +
  265 + public void setId(Long id) {
  266 + this.id = id;
  267 + }
  268 +
  269 + public Long getT() {
  270 + return t;
  271 + }
  272 +
  273 + public void setT(Long t) {
  274 + this.t = t;
  275 + }
  276 +
  277 + public boolean isSlow() {
  278 + return this.fcsjSlow>0 || this.dfsjSlow>0 || this.zdsjSlow>0 || this.zdsjDfSlow>0;
  279 + }
  280 +
  281 + public boolean isFast() {
  282 + return this.fcsjFast>0 || this.dfsjFast>0 || this.zdsjFast>0 || this.zdsjDfFast>0;
  283 + }
  284 +}
0 285 \ No newline at end of file
... ...
src/main/java/com/bsth/data/summary/repository/FastAndSlowRepository.java 0 → 100644
  1 +package com.bsth.data.summary.repository;
  2 +
  3 +import com.bsth.data.summary.entity.FastAndSlow;
  4 +import com.bsth.repository.BaseRepository;
  5 +import org.springframework.stereotype.Repository;
  6 +
  7 +/**
  8 + * Created by panzhao on 2017/10/24.
  9 + */
  10 +@Repository
  11 +public interface FastAndSlowRepository extends BaseRepository<FastAndSlow, Long> {
  12 +}
... ...
src/main/java/com/bsth/data/summary/service/FastAndSlowService.java 0 → 100644
  1 +package com.bsth.data.summary.service;
  2 +
  3 +import com.bsth.data.summary.entity.FastAndSlow;
  4 +import com.bsth.service.BaseService;
  5 +
  6 +import javax.servlet.http.HttpServletRequest;
  7 +import javax.servlet.http.HttpServletResponse;
  8 +
  9 +/**
  10 + * Created by panzhao on 2017/10/24.
  11 + */
  12 +public interface FastAndSlowService extends BaseService<FastAndSlow, Long>{
  13 + void excel(String lineCode, String st, String et, int type, HttpServletRequest request, HttpServletResponse response);
  14 +}
0 15 \ No newline at end of file
... ...
src/main/java/com/bsth/data/summary/service/impl/FastAndSlowServiceImpl.java 0 → 100644
  1 +package com.bsth.data.summary.service.impl;
  2 +
  3 +import com.bsth.data.BasicData;
  4 +import com.bsth.data.summary.entity.FastAndSlow;
  5 +import com.bsth.data.summary.service.FastAndSlowService;
  6 +import com.bsth.data.utils.ConvertUtil;
  7 +import com.bsth.service.impl.BaseServiceImpl;
  8 +import com.google.common.collect.ArrayListMultimap;
  9 +import org.apache.poi.hssf.usermodel.HSSFWorkbook;
  10 +import org.apache.poi.poifs.filesystem.POIFSFileSystem;
  11 +import org.apache.poi.ss.usermodel.Row;
  12 +import org.apache.poi.ss.usermodel.Sheet;
  13 +import org.apache.poi.ss.util.CellRangeAddress;
  14 +import org.joda.time.format.DateTimeFormat;
  15 +import org.joda.time.format.DateTimeFormatter;
  16 +import org.slf4j.Logger;
  17 +import org.slf4j.LoggerFactory;
  18 +import org.springframework.stereotype.Service;
  19 +
  20 +import javax.servlet.http.HttpServletRequest;
  21 +import javax.servlet.http.HttpServletResponse;
  22 +import java.io.FileInputStream;
  23 +import java.io.OutputStream;
  24 +import java.net.URLEncoder;
  25 +import java.text.ParseException;
  26 +import java.text.SimpleDateFormat;
  27 +import java.util.*;
  28 +
  29 +/**
  30 + * Created by panzhao on 2017/10/24.
  31 + */
  32 +@Service
  33 +public class FastAndSlowServiceImpl extends BaseServiceImpl<FastAndSlow, Long> implements FastAndSlowService {
  34 +
  35 + Logger logger = LoggerFactory.getLogger(this.getClass());
  36 +
  37 + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd");
  38 +
  39 + @Override
  40 + public Iterable<FastAndSlow> list(Map<String, Object> map) {
  41 + try {
  42 + //最多5天
  43 + map.put("rq_le", maxEndTime(map.get("rq_ge").toString()
  44 + , map.get("rq_le").toString(), 5));
  45 +
  46 + List<FastAndSlow> list = (List) super.list(map);
  47 + String type = String.valueOf(map.get("type"));
  48 +
  49 + return filterByType(list, type);
  50 + } catch (Exception e) {
  51 + logger.error("", e);
  52 + }
  53 + return null;
  54 + }
  55 +
  56 + @Override
  57 + public void excel(String lineCode, String st, String et, int type, HttpServletRequest request, HttpServletResponse response) {
  58 + try {
  59 + Map<String, Object> params = new HashMap();
  60 + //最多31天
  61 + et = maxEndTime(st, et, 31);
  62 + params.put("rq_ge", st);
  63 + params.put("rq_le", et);
  64 + params.put("lineCode_eq", lineCode);
  65 + List<FastAndSlow> list = filterByType((List) super.list(params), type + "");
  66 +
  67 + if(list.size() == 0){
  68 + response.setHeader("Content-type", "text/html;charset=UTF-8");
  69 + response.getWriter().print("<span style='color:red;font-size:24px;'>根据查询条件没有搜索到数据,别导了!</span>");
  70 + return ;
  71 + }
  72 + //排序
  73 + Collections.sort(list, new Comparator<FastAndSlow>() {
  74 + @Override
  75 + public int compare(FastAndSlow fas1, FastAndSlow fas2) {
  76 + return (int) (fas1.getT() - fas2.getT());
  77 + }
  78 + });
  79 + //按日期分组
  80 + ArrayListMultimap<String, FastAndSlow> multimap =
  81 + new ConvertUtil<FastAndSlow>().groupMultiList(list, "_", FastAndSlow.class.getDeclaredField("rq"));
  82 + //输出excel
  83 + String basePath = Thread.currentThread().getContextClassLoader().getResource("").getPath();
  84 + String filePath = basePath + "/static/pages/summary/excel/快慢误点报表.xls";
  85 + POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(filePath));
  86 + HSSFWorkbook wb = new HSSFWorkbook(fs);
  87 +
  88 + //写入数据
  89 + List<String> ks = new ArrayList<>(multimap.keySet());
  90 + Collections.sort(ks);
  91 + for(int i = 0; i < ks.size(); i++){
  92 + Sheet sheet = wb.getSheetAt(i);
  93 + writeData(sheet, multimap.get(ks.get(i)));
  94 + //sheet name
  95 + wb.setSheetName(i, ks.get(i));
  96 + }
  97 + //删除多余的sheet
  98 + for(int i = ks.size(); i <31; i++){
  99 + wb.removeSheetAt(ks.size());
  100 + }
  101 +
  102 + //response 输出
  103 + String filename = BasicData.lineCode2NameMap.get(lineCode) + st + "至" + et + "快慢误点明细.xls";
  104 + response.setContentType("application/x-msdownload");
  105 + response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8"));
  106 +
  107 + OutputStream os = response.getOutputStream();
  108 + wb.write(os);
  109 + os.flush();
  110 + os.close();
  111 + } catch (Exception e) {
  112 + logger.error("", e);
  113 + }
  114 + }
  115 +
  116 + private void writeData(Sheet sheet, List<FastAndSlow> list) {
  117 + List<FastAndSlow> ups = new ArrayList<>()
  118 + ,downs = new ArrayList<>();
  119 + //前4行是表头
  120 + Row row;
  121 + row = sheet.getRow(0);
  122 + row.getCell(4).setCellValue(list.get(0).getRq());
  123 + row.getCell(13).setCellValue(BasicData.lineCode2NameMap.get(list.get(0).getLineCode()));
  124 + FastAndSlow fas;
  125 + for(int i = 0; i < list.size(); i++){
  126 + fas = list.get(i);
  127 + row = sheet.createRow(i + 4);
  128 + row.createCell(0).setCellValue(i + 1);
  129 + row.createCell(1).setCellValue(fas.getStationName());
  130 + row.createCell(2).setCellValue(fas.getUpDown());
  131 + row.createCell(3).setCellValue(fas.getFcsj());
  132 + row.createCell(4).setCellValue(fas.getDfsj());
  133 + row.createCell(5).setCellValue(fas.getFcsjActual());
  134 + row.createCell(6).setCellValue(fas.getFcsjFast());
  135 + row.createCell(7).setCellValue(fas.getFcsjSlow());
  136 + row.createCell(8).setCellValue(fas.getDfsjFast());
  137 + row.createCell(9).setCellValue(fas.getDfsjSlow());
  138 + row.createCell(10).setCellValue(fas.getZdsj());
  139 + row.createCell(11).setCellValue(fas.getZdsjDf());
  140 + row.createCell(12).setCellValue(fas.getZdsjActual());
  141 + row.createCell(13).setCellValue(fas.getZdsjFast());
  142 + row.createCell(14).setCellValue(fas.getZdsjSlow());
  143 + row.createCell(15).setCellValue(fas.getZdsjDfFast());
  144 + row.createCell(16).setCellValue(fas.getZdsjDfSlow());
  145 +
  146 + if(fas.getUpDown()==0)
  147 + ups.add(fas);
  148 + else
  149 + downs.add(fas);
  150 + }
  151 + //合计
  152 + int size = list.size();
  153 + row = sheet.createRow(size + 4);
  154 + row.createCell(1).setCellValue("发车:上行(计划快误点:"+jhfcFast(ups)+" 累计时间:"+jhfcFastTime(ups)+" 待发快误点:"+dffcFast(ups)+" 累计时间:"+dffcFastTime(ups)+") ");
  155 + row.createCell(9).setCellValue("下行(计划快误点:"+jhfcFast(downs)+" 累计时间:"+jhfcFastTime(downs)+" 待发快误点:"+dffcFast(downs)+" 累计时间:"+dffcFastTime(downs)+")");
  156 + row = sheet.createRow(size + 5);
  157 + row.createCell(1).setCellValue("发车:上行(计划慢误点:"+jhfcSlow(ups)+" 累计时间:"+jhfcSlowTime(ups)+" 待发慢误点:"+dffcSlow(ups)+" 累计时间:"+dffcSlowTime(ups)+") ");
  158 + row.createCell(9).setCellValue("下行(计划慢误点:"+jhfcSlow(downs)+" 累计时间:"+jhfcSlowTime(downs)+" 待发慢误点:"+dffcSlow(downs)+" 累计时间:"+dffcSlowTime(downs)+")");
  159 + row = sheet.createRow(size + 6);
  160 + row.createCell(1).setCellValue("到达:上行(计划快误点:"+jhzdFast(ups)+" 累计时间:"+jhzdFastTime(ups)+" 待发快误点:"+dfzdFast(ups)+" 累计时间:"+dfzdFastTime(ups)+") ");
  161 + row.createCell(9).setCellValue("下行(计划快误点:"+jhzdFast(downs)+" 累计时间:"+jhzdFastTime(downs)+" 待发快误点:"+dfzdFast(downs)+" 累计时间:"+dfzdFastTime(downs)+")");
  162 + row = sheet.createRow(size + 7);
  163 + row.createCell(1).setCellValue("到达:上行(计划慢误点:"+jhzdSlow(ups)+" 累计时间:"+jhzdSlowTime(ups)+" 待发慢误点:"+dfzdSlow(ups)+" 累计时间:"+dfzdSlowTime(ups)+") ");
  164 + row.createCell(9).setCellValue("下行(计划慢误点:"+jhzdSlow(downs)+" 累计时间:"+jhzdSlowTime(downs)+" 待发慢误点:"+dfzdSlow(downs)+" 累计时间:"+dfzdSlowTime(downs)+")");
  165 + //合并单元格
  166 + sheet.addMergedRegion(new CellRangeAddress(size + 4, size + 4, 1, 8));
  167 + sheet.addMergedRegion(new CellRangeAddress(size + 4, size + 4, 9, 16));
  168 + sheet.addMergedRegion(new CellRangeAddress(size + 5, size + 5, 1, 8));
  169 + sheet.addMergedRegion(new CellRangeAddress(size + 5, size + 5, 9, 16));
  170 + sheet.addMergedRegion(new CellRangeAddress(size + 6, size + 6, 1, 8));
  171 + sheet.addMergedRegion(new CellRangeAddress(size + 6, size + 6, 9, 16));
  172 + sheet.addMergedRegion(new CellRangeAddress(size + 7, size + 7, 1, 8));
  173 + sheet.addMergedRegion(new CellRangeAddress(size + 7, size + 7, 9, 16));
  174 +
  175 + sheet.addMergedRegion(new CellRangeAddress(size + 4, size + 7, 0, 0));
  176 + }
  177 +
  178 + private List<FastAndSlow> filterByType(List<FastAndSlow> all, String type) {
  179 + List rsList = new ArrayList();
  180 + if ("-1".equals(type)) {//慢误
  181 + for (FastAndSlow fas : all) {
  182 + if (fas.isSlow())
  183 + rsList.add(fas);
  184 + }
  185 + return rsList;
  186 + } else if ("1".equals(type)) {//快误
  187 + for (FastAndSlow fas : all) {
  188 + if (fas.isFast())
  189 + rsList.add(fas);
  190 + }
  191 + return rsList;
  192 + }
  193 + return all;
  194 + }
  195 +
  196 +
  197 + private String maxEndTime(String sStr, String eStr, int space) throws ParseException {
  198 + try {
  199 + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
  200 + long st = sdf.parse(sStr).getTime();
  201 + long et = sdf.parse(eStr).getTime();
  202 + long dayTime = 24 * 60 * 60 * 1000;
  203 + long spaceTime = dayTime * space;
  204 +
  205 + if (et - st > spaceTime) {
  206 + eStr = sdf.format(new Date(st + spaceTime));
  207 + }
  208 + } catch (Exception e) {
  209 + throw e;
  210 + }
  211 + return eStr;
  212 + }
  213 +
  214 + /**
  215 + * 计划发出快误点
  216 + * @param list
  217 + * @return
  218 + */
  219 + private int jhfcFast(List<FastAndSlow> list){
  220 + int count=0;
  221 + for(FastAndSlow fas : list){
  222 + if(fas.getFcsjFast() > 0)
  223 + count++;
  224 + }
  225 + return count;
  226 + }
  227 +
  228 + /**
  229 + * 计划终点快误点
  230 + * @param list
  231 + * @return
  232 + */
  233 + private int jhzdFast(List<FastAndSlow> list){
  234 + int count=0;
  235 + for(FastAndSlow fas : list){
  236 + if(fas.getZdsjFast() > 0)
  237 + count++;
  238 + }
  239 + return count;
  240 + }
  241 +
  242 + /**
  243 + * 待发发出快误点
  244 + * @param list
  245 + * @return
  246 + */
  247 + private int dffcFast(List<FastAndSlow> list){
  248 + int count=0;
  249 + for(FastAndSlow fas : list){
  250 + if(fas.getDfsjFast() > 0)
  251 + count++;
  252 + }
  253 + return count;
  254 + }
  255 +
  256 + /**
  257 + * 待发终点快误点
  258 + * @param list
  259 + * @return
  260 + */
  261 + private int dfzdFast(List<FastAndSlow> list){
  262 + int count=0;
  263 + for(FastAndSlow fas : list){
  264 + if(fas.getZdsjDfFast() > 0)
  265 + count++;
  266 + }
  267 + return count;
  268 + }
  269 +
  270 + //----------
  271 +
  272 + /**
  273 + * 计划发出慢误点
  274 + * @param list
  275 + * @return
  276 + */
  277 + private int jhfcSlow(List<FastAndSlow> list){
  278 + int count=0;
  279 + for(FastAndSlow fas : list){
  280 + if(fas.getFcsjSlow() > 0)
  281 + count++;
  282 + }
  283 + return count;
  284 + }
  285 +
  286 + /**
  287 + * 计划终点慢误点
  288 + * @param list
  289 + * @return
  290 + */
  291 + private int jhzdSlow(List<FastAndSlow> list){
  292 + int count=0;
  293 + for(FastAndSlow fas : list){
  294 + if(fas.getZdsjSlow() > 0)
  295 + count++;
  296 + }
  297 + return count;
  298 + }
  299 +
  300 + /**
  301 + * 待发发出慢误点
  302 + * @param list
  303 + * @return
  304 + */
  305 + private int dffcSlow(List<FastAndSlow> list){
  306 + int count=0;
  307 + for(FastAndSlow fas : list){
  308 + if(fas.getDfsjSlow() > 0)
  309 + count++;
  310 + }
  311 + return count;
  312 + }
  313 +
  314 + /**
  315 + * 待发终点慢误点
  316 + * @param list
  317 + * @return
  318 + */
  319 + private int dfzdSlow(List<FastAndSlow> list){
  320 + int count=0;
  321 + for(FastAndSlow fas : list){
  322 + if(fas.getZdsjDfSlow() > 0)
  323 + count++;
  324 + }
  325 + return count;
  326 + }
  327 + /**
  328 + * ################
  329 + */
  330 + /**
  331 + * 计划发出快误点
  332 + * @param list
  333 + * @return
  334 + */
  335 + private int jhfcFastTime(List<FastAndSlow> list){
  336 + int sum=0;
  337 + for(FastAndSlow fas : list){
  338 + sum+=fas.getFcsjFast();
  339 + }
  340 + return sum;
  341 + }
  342 +
  343 + /**
  344 + * 计划终点快误点
  345 + * @param list
  346 + * @return
  347 + */
  348 + private int jhzdFastTime(List<FastAndSlow> list){
  349 + int sum=0;
  350 + for(FastAndSlow fas : list){
  351 + sum+=fas.getZdsjFast();
  352 + }
  353 + return sum;
  354 + }
  355 +
  356 + /**
  357 + * 待发发出快误点
  358 + * @param list
  359 + * @return
  360 + */
  361 + private int dffcFastTime(List<FastAndSlow> list){
  362 + int sum=0;
  363 + for(FastAndSlow fas : list){
  364 + sum+=fas.getDfsjFast();
  365 + }
  366 + return sum;
  367 + }
  368 +
  369 + /**
  370 + * 待发终点快误点
  371 + * @param list
  372 + * @return
  373 + */
  374 + private int dfzdFastTime(List<FastAndSlow> list){
  375 + int sum=0;
  376 + for(FastAndSlow fas : list){
  377 + sum+=fas.getZdsjDfFast();
  378 + }
  379 + return sum;
  380 + }
  381 +
  382 + //----------
  383 +
  384 + /**
  385 + * 计划发出慢误点
  386 + * @param list
  387 + * @return
  388 + */
  389 + private int jhfcSlowTime(List<FastAndSlow> list){
  390 + int sum=0;
  391 + for(FastAndSlow fas : list){
  392 + sum+=fas.getFcsjSlow();
  393 + }
  394 + return sum;
  395 + }
  396 +
  397 + /**
  398 + * 计划终点慢误点
  399 + * @param list
  400 + * @return
  401 + */
  402 + private int jhzdSlowTime(List<FastAndSlow> list){
  403 + int sum=0;
  404 + for(FastAndSlow fas : list){
  405 + sum+=fas.getZdsjSlow();
  406 + }
  407 + return sum;
  408 + }
  409 +
  410 + /**
  411 + * 待发发出慢误点
  412 + * @param list
  413 + * @return
  414 + */
  415 + private int dffcSlowTime(List<FastAndSlow> list){
  416 + int sum=0;
  417 + for(FastAndSlow fas : list){
  418 + sum+=fas.getDfsjSlow();
  419 + }
  420 + return sum;
  421 + }
  422 +
  423 + /**
  424 + * 待发终点慢误点
  425 + * @param list
  426 + * @return
  427 + */
  428 + private int dfzdSlowTime(List<FastAndSlow> list){
  429 + int sum=0;
  430 + for(FastAndSlow fas : list){
  431 + sum+=fas.getZdsjDfSlow();
  432 + }
  433 + return sum;
  434 + }
  435 +}
0 436 \ No newline at end of file
... ...
src/main/java/com/bsth/data/utils/ConvertUtil.java 0 → 100644
  1 +package com.bsth.data.utils;
  2 +
  3 +import com.google.common.collect.ArrayListMultimap;
  4 +import org.joda.time.format.DateTimeFormat;
  5 +import org.joda.time.format.DateTimeFormatter;
  6 +import org.slf4j.Logger;
  7 +import org.slf4j.LoggerFactory;
  8 +
  9 +import java.lang.reflect.Field;
  10 +import java.util.*;
  11 +
  12 +/**
  13 + * 数据转换
  14 + * Created by panzhao on 2017/3/13.
  15 + */
  16 +public class ConvertUtil<T> {
  17 +
  18 + Logger logger = LoggerFactory.getLogger(this.getClass());
  19 + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyyMMdd");
  20 +
  21 + /**
  22 + * 根据指定字段 将 list 分组
  23 + *
  24 + * @param list
  25 + * @param separator 字段使用分隔符连接 组成key
  26 + * @param fields
  27 + * @return
  28 + */
  29 + public ArrayListMultimap<String, T> groupMultiList(List<T> list, String separator, Field... fields) {
  30 + ArrayListMultimap<String, T> multimap = ArrayListMultimap.create();
  31 +
  32 + String key;
  33 + //Object field;
  34 + try {
  35 + for (T t : list) {
  36 +
  37 + key = "";
  38 + for (Field f : fields) {
  39 + f.setAccessible(true);
  40 + if(null == f.get(t))
  41 + continue;
  42 + //日期类型格式化为 YYYY-MM-DD
  43 + if (f.getType().equals(Date.class))
  44 + key += (separator + fmtyyyyMMdd.print(((Date) f.get(t)).getTime()));
  45 + else
  46 + key += (separator + f.get(t).toString());
  47 + }
  48 + if(key.length() > 1)
  49 + key = key.substring(1);
  50 +
  51 + multimap.put(key, t);
  52 + }
  53 + } catch (Exception e) {
  54 + logger.error("", e);
  55 + }
  56 +
  57 + return multimap;
  58 + }
  59 +
  60 + /**
  61 + * 根据指定字段 将 list 分组
  62 + *
  63 + * @param list
  64 + * @param separator 字段使用分隔符连接 组成key
  65 + * @param fields
  66 + * @return
  67 + */
  68 + public Map<String, T> groupList(List<T> list, String separator, Field... fields) {
  69 + Map<String, T> map = new HashMap<>();
  70 +
  71 + String key;
  72 + //Object field;
  73 + try {
  74 + for (T t : list) {
  75 +
  76 + key = "";
  77 + for (Field f : fields) {
  78 + f.setAccessible(true);
  79 + //日期类型格式化为 YYYY-MM-DD
  80 + if (f.getType().equals(Date.class))
  81 + key += (separator + fmtyyyyMMdd.print(((Date) f.get(t)).getTime()));
  82 + else
  83 + key += (separator + f.get(t).toString());
  84 + }
  85 + key = key.substring(1);
  86 +
  87 + map.put(key, t);
  88 + }
  89 + } catch (Exception e) {
  90 + logger.error("", e);
  91 + }
  92 +
  93 + return map;
  94 + }
  95 +
  96 + /**
  97 + * 计算并集
  98 + *
  99 + * @param all
  100 + * @param sub
  101 + * @return
  102 + */
  103 + public List<String> calcUnion(Collection<String> all, Collection<String> sub) {
  104 + List<String> rs = new ArrayList<>();
  105 +
  106 + for (String str : all) {
  107 + if (sub.contains(str))
  108 + rs.add(str);
  109 + }
  110 + return rs;
  111 + }
  112 +
  113 + /**
  114 + * 计算补集
  115 + *
  116 + * @param all
  117 + * @param sub
  118 + * @return
  119 + */
  120 + public List<String> calcComplement(Collection<String> all, Collection<String> sub) {
  121 + List<String> rs = new ArrayList<>();
  122 +
  123 + for (String str : all) {
  124 + if (!sub.contains(str))
  125 + rs.add(str);
  126 + }
  127 + return rs;
  128 + }
  129 +}
... ...
src/main/java/com/bsth/entity/mcy_forms/Singledata.java
... ... @@ -7,6 +7,7 @@ public class Singledata {
7 7 private String gS;//所属公司
8 8  
9 9 private String xL;//线路
  10 + private String xlmc;//线路名称
10 11  
11 12 private String clzbh;//车号
12 13  
... ... @@ -141,6 +142,14 @@ public class Singledata {
141 142 public void setJhjl(String jhjl) {
142 143 this.jhjl = jhjl;
143 144 }
  145 +
  146 + public String getXlmc() {
  147 + return xlmc;
  148 + }
  149 +
  150 + public void setXlmc(String xlmc) {
  151 + this.xlmc = xlmc;
  152 + }
144 153  
145 154  
146 155  
... ...
src/main/java/com/bsth/repository/StationRouteRepository.java
... ... @@ -287,7 +287,7 @@ public interface StationRouteRepository extends BaseRepository&lt;StationRoute, Int
287 287 List<Map<String, String>> findAllLineWithYgc();
288 288  
289 289 @Modifying
290   - @Query(value="update bsth_c_stationroute set directions = case directions when 1 then 0 when 0 then 1 end where line_code = ?1 ", nativeQuery=true)
  290 + @Query(value="update bsth_c_stationroute set directions = case directions when 1 then 0 when 0 then 1 end where line = ?1 ", nativeQuery=true)
291 291 public void stationRouteDir(Integer line);
292 292  
293 293 @Modifying
... ...
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
... ... @@ -25,16 +25,16 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
25 25 @Query(value="select s from ScheduleRealInfo s where s.id = ?1 ")
26 26 ScheduleRealInfo scheduleById(Long id);
27 27  
28   - @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and bc_type not in ('in','out') order by (lpName+1),clZbh,realExecDate,dfsj")
  28 + @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr = ?2 and bc_type not in ('in','out') order by (lpName+1),clZbh,realExecDate,dfsj")
29 29 List<ScheduleRealInfo> scheduleDailyQp(String line,String date);
30 30  
31   - @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY s.id,s.jGh,s.clZbh,s.lpName order by (lpName+1)")
  31 + @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr = ?2 GROUP BY s.id,s.jGh,s.clZbh,s.lpName order by (lpName+1)")
32 32 List<ScheduleRealInfo> queryUserInfo(String line,String date);
33 33  
34   - @Query(value="select min(s.id), s.jGh,s.clZbh,s.lpName,s.jName from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY s.jGh,s.clZbh,s.lpName ,s.jName order by (lpName+1)")
  34 + @Query(value="select min(s.id), s.jGh,s.clZbh,s.lpName,s.jName from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr = ?2 GROUP BY s.jGh,s.clZbh,s.lpName ,s.jName order by (lpName+1)")
35 35 List<ScheduleRealInfo> queryUserInfo2(String line,String date);
36 36  
37   - @Query(value="select min(s.id), s.clZbh from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 GROUP BY s.clZbh ")
  37 + @Query(value="select min(s.id), s.clZbh from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr = ?2 GROUP BY s.clZbh ")
38 38 List<ScheduleRealInfo> queryUserInfo3(String line,String date);
39 39  
40 40 @Query(value="select s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 order by bcs")
... ... @@ -43,7 +43,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
43 43 //把sum(addMileage) 替换为0 数据表去掉了 add_mileage 字段
44 44 @Query(value="select new map(clZbh as clZbh,jGh as jGh,jName as jName,sum(jhlc) as zgl,"
45 45 + "0 as ksgl,count(jName) as bcs) from ScheduleRealInfo s where"
46   - + " s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 group by clZbh,jGh,jName")
  46 + + " s.xlBm = ?1 and s.scheduleDateStr = ?2 group by clZbh,jGh,jName")
47 47 List<Map<String, Object>> dailyInfo(String line,String date);
48 48  
49 49 @Query(value="select t.inside_code,d.sender,d.txt_content,d.timestamp,0 as xlbm from ("
... ... @@ -57,7 +57,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
57 57 @Query(value="SELECT r.xl_name,r.lp_name,r.cl_zbh,count(*) as cs "
58 58 + " FROM bsth_c_s_sp_info_real r RIGHT JOIN bsth_v_directive_60 d "
59 59 + " ON r.id = d.sch WHERE d.is_dispatch = 1 AND r.xl_bm like %?1% AND "
60   - + " DATE_FORMAT(r.schedule_date,'%Y-%m-%d') = ?2 and r.cl_zbh like %?3% group by "
  60 + + " r.schedule_date_str = ?2 and r.cl_zbh like %?3% group by "
61 61 + " lp_name,xl_name,cl_zbh",nativeQuery=true)
62 62 List<Object[]> historyMessageCount(String line,String date,String code);
63 63  
... ... @@ -72,7 +72,7 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
72 72 List<ScheduleRealInfo> findByDate(String dateStr);
73 73  
74 74 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
75   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and cl_zbh=?3 order by bcs")
  75 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr = ?2 and cl_zbh=?3 order by bcs")
76 76 List<ScheduleRealInfo> findByDate2(String line,String date,String clzbh);
77 77  
78 78 @Query(value="select count(jName) from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 and s.status = -1")
... ... @@ -84,17 +84,17 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
84 84 @Query(value="SELECT request_code,FROM_UNIXTIME(TIMESTAMP / 1000,'%Y-%m-%d %T') as TIMESTAMP ,device_id FROM bsth_v_report_80 WHERE FROM_UNIXTIME( TIMESTAMP / 1000,'%Y-%m-%d') = ?2 AND line_id = ?1 and device_id like %?3%",nativeQuery=true)
85 85 List<Object[]> account(String line,String date,String code);
86 86  
87   - @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDate >= str_to_date(?2,'%Y-%m-%d') "
88   - + " and s.scheduleDate <= str_to_date(?3,'%Y-%m-%d') and s.lpName like %?4% "
  87 + @Query(value="select s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr >= ?2 "
  88 + + " and s.scheduleDateStr <= ?3 and s.lpName like %?4% "
89 89 + " and clZbh like %?5% order by s.fcsj")
90 90 List<ScheduleRealInfo> correctForm(String line,String startDate,String endDate,String lpName,String code);
91 91  
92 92 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
93   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 and s.scheduleDate = str_to_date(?4,'%Y-%m-%d') and s.xlBm=?5 order by realExecDate,fcsj")
  93 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.lpName = ?3 and s.scheduleDateStr = ?4 and s.xlBm=?5 order by realExecDate,fcsj")
94 94 List<ScheduleRealInfo> queryListWaybill(String jName,String clZbh,String lpName,String date,String line);
95 95  
96 96 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
97   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.jGh = ?1 and s.clZbh = ?2 and s.lpName = ?3 and s.scheduleDate = str_to_date(?4,'%Y-%m-%d') and s.xlBm=?5 order by realExecDate,fcsj")
  97 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.jGh = ?1 and s.clZbh = ?2 and s.lpName = ?3 and s.scheduleDateStr = ?4 and s.xlBm=?5 order by realExecDate,fcsj")
98 98 List<ScheduleRealInfo> queryListWaybillXcld(String jGh,String clZbh,String lpName,String date,String line);
99 99  
100 100 // @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
... ... @@ -102,27 +102,27 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
102 102 // List<ScheduleRealInfo> queryListWaybill3(String jName,String clZbh,String date,String gsbm,String fgsbm);
103 103  
104 104 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
105   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by s.xlBm,s.clZbh,s.jGh,s.adjustExps,s.fcsj")
  105 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr = ?2 order by s.xlBm,s.clZbh,s.jGh,s.adjustExps,s.fcsj")
106 106 List<ScheduleRealInfo> scheduleByDateAndLineTjrb(String line,String date);
107 107  
108 108 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
109   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.xlDir=?3 and s.fcsjActual is not null and s.zdsjActual is not null order by s.realExecDate,s.fcsjActual")
  109 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr = ?2 and s.xlDir=?3 and s.fcsjActual is not null and s.zdsjActual is not null order by s.realExecDate,s.fcsjActual")
110 110 List<ScheduleRealInfo> scheduleByDateAndLineInOut(String line,String date,String zd);
111 111  
112 112 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
113   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.clZbh = ?1 and s.scheduleDate = str_to_date(?2,'%Y-%m-%d') and xlBm =?3 order by realExecDate,fcsj")
  113 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.clZbh = ?1 and s.scheduleDateStr = ?2 and xlBm =?3 order by realExecDate,fcsj")
114 114 List<ScheduleRealInfo> queryListWaybill2(String clZbh,String date,String line);
115 115  
116 116 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
117   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.jGh like %?1% and s.clZbh like %?2% and s.scheduleDate = str_to_date(?3,'%Y-%m-%d') and s.gsBm like %?4% and s.fgsBm like %?5% order by realExecDate,dfsj")
  117 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.jGh like %?1% and s.clZbh like %?2% and s.scheduleDateStr = ?3 and s.gsBm like %?4% and s.fgsBm like %?5% order by realExecDate,dfsj")
118 118 List<ScheduleRealInfo> queryListWaybill3(String jName,String clZbh,String date,String gsbm,String fgsbm);
119 119  
120 120 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
121   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between str_to_date(?3,'%Y-%m-%d') and str_to_date(?4,'%Y-%m-%d') order by bcs")
  121 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.jName = ?1 and s.clZbh = ?2 and s.scheduleDateStr >=?3 and s.scheduleDateStr <=?4 order by bcs")
122 122 List<ScheduleRealInfo> queryListWaybill4(String jName,String clZbh,String date,String enddate);
123 123  
124 124 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
125   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2")
  125 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr = ?2")
126 126 List<ScheduleRealInfo> scheduleDaily(String line,String date);
127 127  
128 128 @Query(value = "select count(*) from ScheduleRealInfo s where s.xlBm=?1 and s.scheduleDateStr=?2")
... ... @@ -139,66 +139,66 @@ public interface ScheduleRealInfoRepository extends BaseRepository&lt;ScheduleRealI
139 139  
140 140 //去掉了 xlBm is not null
141 141 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
142   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by s.xlDir,s.realExecDate,s.fcsj, lpName")
  142 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and s.scheduleDateStr = ?2 order by s.xlDir,s.realExecDate,s.fcsj, lpName")
143 143 List<ScheduleRealInfo> scheduleByDateAndLine(String line,String date);
144 144  
145 145 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
146   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm =?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by s.lpName, s.realExecDate,s.fcsj")
  146 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm =?1 and s.scheduleDateStr = ?2 order by s.lpName, s.realExecDate,s.fcsj")
147 147 List<ScheduleRealInfo> scheduleByDateAndLineQp(String line,String date);
148 148  
149 149  
150 150 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
151   - @Query(value="select DISTINCT s from ScheduleRealInfo s where gsBm like %?1% and fgsBm like %?2% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?3 order by s.xlDir,s.realExecDate,s.fcsj, s.lpName")
  151 + @Query(value="select DISTINCT s from ScheduleRealInfo s where gsBm like %?1% and fgsBm like %?2% and s.scheduleDateStr = ?3 order by s.xlDir,s.realExecDate,s.fcsj, s.lpName")
152 152 List<ScheduleRealInfo> scheduleByDateAndLineByGs_(String gsdm,String fgsdm,String date);
153 153  
154 154 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
155   - @Query(value="select DISTINCT s from ScheduleRealInfo s where gsBm like %?1% and fgsBm like %?2% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?3 and s.bcType not in ('in','out','ldks') order by s.xlDir,s.realExecDate,s.fcsj, s.lpName")
  155 + @Query(value="select DISTINCT s from ScheduleRealInfo s where gsBm like %?1% and fgsBm like %?2% and s.scheduleDateStr = ?3 and s.bcType not in ('in','out','ldks') order by s.xlDir,s.realExecDate,s.fcsj, s.lpName")
156 156 List<ScheduleRealInfo> scheduleByDateAndLineByGs(String gsdm,String fgsdm,String date);
157 157  
158 158 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
159   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 order by s.xlDir,s.realExecDate,s.fcsj, s.lpName")
  159 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr= ?2 order by s.xlDir,s.realExecDate,s.fcsj, s.lpName")
160 160 List<ScheduleRealInfo> scheduleByDateAndLineQp2(String line,String date);
161 161  
162 162 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
163   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.bcType not in ('in','out','ldks') order by s.xlBm,s.adjustExps,s.fcsj")
  163 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr = ?2 and s.bcType not in ('in','out','ldks') order by s.xlBm,s.adjustExps,s.fcsj")
164 164 List<ScheduleRealInfo> scheduleByDateAndLine2(String line,String date);
165 165  
166 166 //按月统计
167 167 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
168   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m') = ?2 and s.bcType not in ('in','out','ldks') order by s.xlBm")
  168 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and s.scheduleDateStr = ?2 and s.bcType not in ('in','out','ldks') order by s.xlBm")
169 169 List<ScheduleRealInfo> scheduleByDateAndLine3(String line,String date);
170 170  
171 171 //按照时间段统计
172 172 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
173   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 and gsBm like %?4% and fgsBm like %?5% order by s.xlBm")
  173 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm like %?1% and s.scheduleDateStr >= ?2 and s.scheduleDateStr<= ?3 and gsBm like %?4% and fgsBm like %?5% order by s.xlBm")
174 174 List<ScheduleRealInfo> scheduleByDateAndLineTj(String line,String date,String date2,String gsdm,String fgsdm);
175 175  
176 176 //按照时间段统计
177 177 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
178   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 order by s.xlBm")
  178 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr >= ?2 and s.scheduleDateStr<= ?3 order by s.xlBm")
179 179 List<ScheduleRealInfo> scheduleByDateAndLineTj2(String line,String date,String date2);
180 180 //月报表
181 181 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
182   - @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') between ?2 and ?3 order by s.xlBm")
  182 + @Query(value="select DISTINCT s from ScheduleRealInfo s where s.xlBm = ?1 and s.scheduleDateStr >= ?2 and s.scheduleDateStr<= ?3 order by s.xlBm")
183 183 List<ScheduleRealInfo> scheduleByDateAndLineYbb(String line,String date,String date2);
184 184  
185 185  
186   - @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,min(s.fcsj) as fcsj ) from ScheduleRealInfo s where s.xlBm like %?1% and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% and s.clZbh like %?5% GROUP BY xlBm,clZbh,jGh,scheduleDate ORDER BY clZbh,fcsj")
  186 + @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,min(s.fcsj) as fcsj ) from ScheduleRealInfo s where s.xlBm like %?1% and s.scheduleDateStr = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% and s.clZbh like %?5% GROUP BY xlBm,clZbh,jGh,scheduleDate ORDER BY clZbh,fcsj")
187 187 List<Map<String,Object>> yesterdayDataList(String line,String date,String gsbm,String fgsbm,String nbbm);
188 188  
189   - @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,min(s.fcsj) as fcsj ) from ScheduleRealInfo s where s.xlBm =?1 and DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% and s.clZbh like %?5% GROUP BY xlBm,clZbh,jGh,scheduleDate ORDER BY clZbh,fcsj")
  189 + @Query(value="select new map(s.scheduleDate as scheduleDate,s.xlBm as xlBm,s.clZbh as clZbh,s.jGh as jGh,min(s.fcsj) as fcsj ) from ScheduleRealInfo s where s.xlBm =?1 and s.scheduleDateStr = ?2 and s.gsBm like %?3% and s.fgsBm like %?4% and s.clZbh like %?5% GROUP BY xlBm,clZbh,jGh,scheduleDate ORDER BY clZbh,fcsj")
190 190 List<Map<String,Object>> yesterdayDataList_eq(String line,String date,String gsbm,String fgsbm,String nbbm);
191 191  
192   - @Query(value="select s from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 ORDER BY xlBm,lpName,clZbh,xlDir")
  192 + @Query(value="select s from ScheduleRealInfo s where s.scheduleDateStr = ?1 ORDER BY xlBm,lpName,clZbh,xlDir")
193 193 List<ScheduleRealInfo> setLD(String date);
194 194  
195   - @Query(value="select new map(xlBm as xlBm,lpName as lpName,clZbh as clZbh) from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 GROUP BY xlBm,lpName,clZbh ORDER BY xlBm,lpName,clZbh")
  195 + @Query(value="select new map(xlBm as xlBm,lpName as lpName,clZbh as clZbh) from ScheduleRealInfo s where s.scheduleDateStr = ?1 GROUP BY xlBm,lpName,clZbh ORDER BY xlBm,lpName,clZbh")
196 196 List<Map<String,Object>> setLDGroup(String date);
197 197  
198   - @Query(value="select new map(xlBm as xlBm,clZbh as clZbh) from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 GROUP BY xlBm,clZbh ORDER BY xlBm,clZbh")
  198 + @Query(value="select new map(xlBm as xlBm,clZbh as clZbh) from ScheduleRealInfo s where s.scheduleDateStr = ?1 GROUP BY xlBm,clZbh ORDER BY xlBm,clZbh")
199 199 List<Map<String,Object>> setLCYHGroup(String date);
200 200  
201   - @Query(value="select new map(xlBm as xlBm) from ScheduleRealInfo s where DATE_FORMAT(s.scheduleDate,'%Y-%m-%d') = ?1 GROUP BY xlBm ORDER BY xlBm")
  201 + @Query(value="select new map(xlBm as xlBm) from ScheduleRealInfo s where s.scheduleDateStr = ?1 GROUP BY xlBm ORDER BY xlBm")
202 202 List<Map<String,Object>> setDDRBGroup(String date);
203 203  
204 204 @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH)
... ...
src/main/java/com/bsth/service/TrafficManageService.java
... ... @@ -65,6 +65,8 @@ public interface TrafficManageService {
65 65 */
66 66 String setJHBC();
67 67  
  68 + String setLD(String theDate);
  69 +
68 70 String setLD();
69 71  
70 72 String setLDFile();
... ...
src/main/java/com/bsth/service/directive/DirectiveServiceImpl.java
... ... @@ -355,79 +355,84 @@ public class DirectiveServiceImpl extends BaseServiceImpl&lt;D60, Integer&gt; implemen
355 355 @Override
356 356 public Map<String, Object> findDirective(String nbbm, int dType, int page, int size) {
357 357 Map<String, Object> rsMap = new HashMap<>();
358   - List<Directive> list = new ArrayList<>();
359   -
360   - switch (dType) {
361   - case -1:
362   - //所有指令
363   - list = new ArrayList<>(dayOfDirectives.all());
364   - break;
365   - case 0:
366   - //调度指令
367   - Collection<D60> dptArray = dayOfDirectives.all60();
368   - for (D60 d60 : dptArray) {
369   - if (d60.isDispatch())
370   - list.add(d60);
371   - }
372   - break;
373   - case 1:
374   - //运营指令
375   - Collection<D60> yyArray = dayOfDirectives.all60();
376   - for (D60 d60 : yyArray) {
377   - if (d60 != null && d60.getData().getDispatchInstruct() == (short) 0x03
378   - && !d60.isDispatch())
379   - list.add(d60);
380   - }
381   - break;
382   - case 2:
383   - //线路切换指令
384   - list.addAll(dayOfDirectives.all64());
385   - break;
386   - case 3:
387   - //消息短语
388   - Collection<D60> dyArray = dayOfDirectives.all60();
389   - for (D60 d60 : dyArray) {
390   - if (d60 != null && d60.getData().getDispatchInstruct() == (short) 0x00
391   - && !d60.isDispatch())
392   - list.add(d60);
393   - }
394   - break;
395   - }
  358 + try{
  359 + List<Directive> list = new ArrayList<>();
  360 +
  361 + switch (dType) {
  362 + case -1:
  363 + //所有指令
  364 + list = new ArrayList<>(dayOfDirectives.all());
  365 + break;
  366 + case 0:
  367 + //调度指令
  368 + Collection<D60> dptArray = dayOfDirectives.all60();
  369 + for (D60 d60 : dptArray) {
  370 + if (d60.isDispatch())
  371 + list.add(d60);
  372 + }
  373 + break;
  374 + case 1:
  375 + //运营指令
  376 + Collection<D60> yyArray = dayOfDirectives.all60();
  377 + for (D60 d60 : yyArray) {
  378 + if (d60 != null && d60.getData().getDispatchInstruct() == (short) 0x03
  379 + && !d60.isDispatch())
  380 + list.add(d60);
  381 + }
  382 + break;
  383 + case 2:
  384 + //线路切换指令
  385 + list.addAll(dayOfDirectives.all64());
  386 + break;
  387 + case 3:
  388 + //消息短语
  389 + Collection<D60> dyArray = dayOfDirectives.all60();
  390 + for (D60 d60 : dyArray) {
  391 + if (d60 != null && d60.getData().getDispatchInstruct() == (short) 0x00
  392 + && !d60.isDispatch())
  393 + list.add(d60);
  394 + }
  395 + break;
  396 + }
396 397  
397   - // 时间倒序
398   - Collections.sort(list, new DayOfDirectives.DComparator());
399   - if (StringUtils.isNotBlank(nbbm)) {
400   - String deviceId = BasicData.deviceId2NbbmMap.inverse().get(nbbm);
401   - //按车辆过滤
402   - List<Directive> subList = new ArrayList<>();
403   - for (Directive d : list) {
404   - if (d.getDeviceId().equals(deviceId)) {
405   - subList.add(d);
  398 + // 时间倒序
  399 + Collections.sort(list, new DayOfDirectives.DComparator());
  400 + if (StringUtils.isNotBlank(nbbm)) {
  401 + String deviceId = BasicData.deviceId2NbbmMap.inverse().get(nbbm);
  402 + //按车辆过滤
  403 + List<Directive> subList = new ArrayList<>();
  404 + for (Directive d : list) {
  405 + if (d.getDeviceId().equals(deviceId)) {
  406 + subList.add(d);
  407 + }
406 408 }
  409 + list = subList;
407 410 }
408   - list = subList;
409   - }
410 411  
411   - int count = list.size();
412   - // 分页
413   - int s = page * size, e = s + size;
  412 + int count = list.size();
  413 + // 分页
  414 + int s = page * size, e = s + size;
414 415  
415   - if (e > count)
416   - e = count;
  416 + if (e > count)
  417 + e = count;
417 418  
418   - List<Directive> rs = list.subList(s, e);
  419 + List<Directive> rs = list.subList(s, e);
419 420  
420   - // 时间格式化,车辆自编号转换
421   - for (Directive d : rs) {
422   - if (d.getTimeHHmm() == null)
423   - d.setTimeHHmm(fmtHHmm.print(d.getTimestamp()));
424   - if (d.getNbbm() == null)
425   - d.setNbbm(BasicData.deviceId2NbbmMap.get(d.getDeviceId()));
426   - }
  421 + // 时间格式化,车辆自编号转换
  422 + for (Directive d : rs) {
  423 + if (d.getTimeHHmm() == null)
  424 + d.setTimeHHmm(fmtHHmm.print(d.getTimestamp()));
  425 + if (d.getNbbm() == null)
  426 + d.setNbbm(BasicData.deviceId2NbbmMap.get(d.getDeviceId()));
  427 + }
427 428  
428   - rsMap.put("list", rs);
429   - rsMap.put("totalPages", count % size == 0 ? (count / size - 1) : count / size);
430   - rsMap.put("page", page);
  429 + rsMap.put("list", rs);
  430 + rsMap.put("totalPages", count % size == 0 ? (count / size - 1) : count / size);
  431 + rsMap.put("page", page);
  432 + }catch (Exception e){
  433 + logger.error("", e);
  434 + throw e;
  435 + }
431 436 return rsMap;
432 437 }
433 438  
... ...
src/main/java/com/bsth/service/forms/impl/FormsServiceImpl.java
... ... @@ -201,7 +201,7 @@ public class FormsServiceImpl implements FormsService {
201 201 + " LEFT JOIN bsth_c_s_sp_info_real r on r.xl_bm=l.line_code"
202 202 + " where 1=1 ";
203 203 if(map.get("date").toString()!=""){
204   - sql+="and to_days(r.schedule_date)=to_days('"+map.get("date").toString() + "') ";
  204 + sql+="and r.schedule_date_str='"+map.get("date").toString() + "'";
205 205 }
206 206 if( map.get("line").toString()!=""){
207 207 sql+=" and l.line_code=" + map.get("line").toString();
... ... @@ -251,24 +251,14 @@ public class FormsServiceImpl implements FormsService {
251 251 }else{
252 252 sql += " r.cl_zbh";
253 253 }
254   - sql += " from bsth_c_s_sp_info_real r where 1=1 ";
255   - if(map.get("startDate")!=null&&!map.get("startDate").equals("")){
256   - sql+=" and to_days(r.schedule_date_str) BETWEEN to_days('" + map.get("startDate").toString() + "') ";
257   - }
258   -
259   - if(map.get("endDate")!=null&&!map.get("endDate").equals("")){
260   - sql+=" and to_days('" + map.get("endDate").toString() + "') ";
261   - }
  254 + sql += " from bsth_c_s_sp_info_real r where "
  255 + + " r.schedule_date_str >= '" + map.get("startDate").toString() + "' "
  256 + + " and r.schedule_date_str <='" + map.get("endDate").toString() + "' ";
262 257 if(map.get("line")!=null&&!map.get("line").equals("")){
263 258 sql+=" and r.xl_bm='"+ map.get("line").toString() + "' ";
264 259 }
265   -// sql+= " AND r.gs_bm is not null and r.bc_type not in('in','out')";
266   -// if(map.get("gsdmManth")!=null&&!map.get("gsdmManth").equals("")){
267   - sql+=" and r.gs_bm like'%"+gsdmManth+"%' ";
268   -// }
269   - if(map.get("fgsdmManth")!=null&&!map.get("fgsdmManth").equals("")){
270   - sql+=" and r.fgs_bm like'%"+fgsdmManth+"%' ";
271   - }
  260 + sql+=" and r.gs_bm like'%"+gsdmManth+"%' and r.fgs_bm like'%"+fgsdmManth+"%'";
  261 +
272 262 if(empnames.equals("驾驶员")){
273 263 sql += " GROUP BY "
274 264 + "r.j_name,r.j_gh";
... ... @@ -278,11 +268,6 @@ public class FormsServiceImpl implements FormsService {
278 268 sql += " GROUP BY r.cl_zbh";
279 269 }
280 270  
281   -// + ",r.gs_bm,r.gs_name,"
282   -// + "r.fgs_bm,r.fgs_name,r.bc_type ";
283   -
284   -// r.j_name,r.cl_zbh,r.j_gh,r.gs_bm,r.gs_name,"
285   -// + " r.fgs_bm,r.fgs_name,r.bc_type,r.s_name,r.lp_name
286 271 List<Shiftuehiclemanth> list = jdbcTemplate.query(sql, new RowMapper<Shiftuehiclemanth>() {
287 272  
288 273 @Override
... ... @@ -409,7 +394,7 @@ public class FormsServiceImpl implements FormsService {
409 394 + "IFNULL(r.s_name,'')as s_name,"
410 395 + " r.cl_zbh,r.xl_bm, r.j_gh,r.gs_bm,r.fgs_bm,r.lp_name "
411 396 + "FROM bsth_c_s_sp_info_real r where 1=1 "
412   - + " and to_days(r.schedule_date)=to_days('"+date + "') "
  397 + + " and r.schedule_date_str='"+date + "' "
413 398 + " and r.xl_bm like '%"+line+"%' "
414 399 + " and r.gs_bm like '%"+gsdmShif+"%' "
415 400 + " and r.fgs_bm like '%"+fgsdmShif+"%' ) t"
... ... @@ -547,19 +532,6 @@ public class FormsServiceImpl implements FormsService {
547 532 if(map.get("fgsdm")!=null){
548 533 fgs =map.get("fgsdm").toString();
549 534 }
550   - /*String sql = " select c.*,l.line_code from bsth_c_chtoch c LEFT JOIN bsth_c_line l on c.xl=l.name WHERE 1=1 ";
551   - if (!map.get("startDate").toString().equals(" ") && !map.get("endDate").toString().equals(" ")) {
552   - sql += "and DATE_FORMAT( c.rq,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '"
553   - + map.get("endDate").toString() + "'";
554   - }
555   - if (!map.get("line").equals("")) {
556   - sql += "and line_code='" + map.get("line") + "'";
557   - }
558   - if (map.get("sel").equals("2")) {
559   - sql += " and c.pcch!=c.pcry";
560   - } else if (map.get("sel").equals("1")) {
561   - sql += " and c.jhgh!=c.sjgh";
562   - }*/
563 535  
564 536 String sql="select * from bsth_c_chtoch where rq BETWEEN '"+ map.get("startDate").toString()+"' "
565 537 + " and '"+map.get("endDate").toString() +"'";
... ... @@ -630,19 +602,6 @@ public class FormsServiceImpl implements FormsService {
630 602  
631 603 // rq = rq2 + "-" + rq3;
632 604 startDate = map.get("startDate").toString();
633   -// endDate = map.get("endDate").toString();
634   -// String sql = "select t.*,y.yh,y.jzl from ("
635   -// + " select r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm"
636   -// + " from bsth_c_s_sp_info_real r where r.schedule_date_str "
637   -// + " BETWEEN '"+startDate+"' and '"+endDate+"' and r.xl_bm='"+map.get("line").toString()+"' "
638   -// + " AND r.gs_bm is not null and r.gs_bm='"+map.get("gsdmSing").toString()+"' "
639   -// + " and r.fgs_bm='"+map.get("fgsdmSing").toString()+"' "
640   -// + " group by r.xl_bm,r.xl_name,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm) t "
641   -// + " LEFT JOIN (select a.nbbm,a.jsy,SUM(a.yh) as yh,SUM(a.jzl) as jzl "
642   -// + " from bsth_c_ylb a where a.rq BETWEEN '"+startDate+"' and '"+endDate+"'and "
643   -// + " a.ssgsdm='"+map.get("gsdmSing").toString()+"' and a.fgsdm='"+map.get("fgsdmSing").toString()+"' "
644   -// + "group by a.nbbm,a.jsy) y"
645   -// + " on y.nbbm=t.cl_zbh and y.jsy= t.j_gh";
646 605  
647 606 String sql="select r.s_gh,r.s_name, "
648 607 + " r.xl_bm,r.cl_zbh,r.j_gh,r.j_name,r.gs_bm,r.fgs_bm"
... ... @@ -775,19 +734,28 @@ public class FormsServiceImpl implements FormsService {
775 734 String line=y.getXlbm();
776 735 String clzbh=y.getNbbm();
777 736 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
  737 + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>();
778 738 for (int j = 0; j < listReal.size(); j++) {
779 739 ScheduleRealInfo s=listReal.get(j);
780 740 if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh)
781 741 &&s.getXlBm().equals(line)){
782 742 newList.add(s);
  743 + Set<ChildTaskPlan> cts = s.getcTasks();
  744 + if(cts != null && cts.size() > 0){
  745 + newList_.add(s);
  746 + }else{
  747 + if(s.getZdsjActual()!=null){
  748 + newList_.add(s);
  749 + }
  750 + }
783 751 }
784 752 }
785 753 double jhgl=culateMileageService.culateJhgl(newList);
786 754 double jhjcc=culateMileageService.culateJhJccgl(newList);
787   - double yygl=culateMileageService.culateSjgl(newList);
788   - double ljgl=culateMileageService.culateLjgl(newList);
789   - double ksgl=culateMileageService.culateKsgl(newList);
790   - double jcgl=culateMileageService.culateJccgl(newList);
  755 + double yygl=culateMileageService.culateSjgl(newList_);
  756 + double ljgl=culateMileageService.culateLjgl(newList_);
  757 + double ksgl=culateMileageService.culateKsgl(newList_);
  758 + double jcgl=culateMileageService.culateJccgl(newList_);
791 759  
792 760 double zyygl=Arith.add(yygl, ljgl);
793 761 double zksgl=Arith.add(ksgl, jcgl);
... ... @@ -797,7 +765,8 @@ public class FormsServiceImpl implements FormsService {
797 765  
798 766 sin.setEmptMileage(String.valueOf(zksgl));
799 767 sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc)));
800   - sin.setxL(BasicData.lineCode2NameMap.get(y.getXlbm()));
  768 + sin.setxL(y.getXlbm());
  769 + sin.setXlmc(BasicData.lineCode2NameMap.get(y.getXlbm()));
801 770 sin.setClzbh(clzbh);
802 771 sin.setJsy(jsy);
803 772 sin.setrQ(startDate);
... ... @@ -819,19 +788,28 @@ public class FormsServiceImpl implements FormsService {
819 788 String line=y.getXlbm();
820 789 String clzbh=y.getNbbm();
821 790 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
  791 + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>();
822 792 for (int j = 0; j < listReal.size(); j++) {
823 793 ScheduleRealInfo s=listReal.get(j);
824 794 if(s.getjGh().equals(jsy) && s.getClZbh().equals(clzbh)
825 795 &&s.getXlBm().equals(line)){
826 796 newList.add(s);
  797 + Set<ChildTaskPlan> cts = s.getcTasks();
  798 + if(cts != null && cts.size() > 0){
  799 + newList_.add(s);
  800 + }else{
  801 + if(s.getZdsjActual()!=null){
  802 + newList_.add(s);
  803 + }
  804 + }
827 805 }
828 806 }
829 807 double jhgl=culateMileageService.culateJhgl(newList);
830 808 double jhjcc=culateMileageService.culateJhJccgl(newList);
831   - double yygl=culateMileageService.culateSjgl(newList);
832   - double ljgl=culateMileageService.culateLjgl(newList);
833   - double ksgl=culateMileageService.culateKsgl(newList);
834   - double jcgl=culateMileageService.culateJccgl(newList);
  809 + double yygl=culateMileageService.culateSjgl(newList_);
  810 + double ljgl=culateMileageService.culateLjgl(newList_);
  811 + double ksgl=culateMileageService.culateKsgl(newList_);
  812 + double jcgl=culateMileageService.culateJccgl(newList_);
835 813  
836 814 double zyygl=Arith.add(yygl, ljgl);
837 815 double zksgl=Arith.add(ksgl, jcgl);
... ... @@ -841,7 +819,8 @@ public class FormsServiceImpl implements FormsService {
841 819  
842 820 sin.setEmptMileage(String.valueOf(zksgl));
843 821 sin.setJhjl(String.valueOf(Arith.add(jhgl,jhjcc)));
844   - sin.setxL(BasicData.lineCode2NameMap.get(y.getXlbm()));
  822 + sin.setxL(y.getXlbm());
  823 + sin.setXlmc(BasicData.lineCode2NameMap.get(y.getXlbm()));
845 824 sin.setClzbh(clzbh);
846 825 sin.setJsy(jsy);
847 826 sin.setrQ(startDate);
... ... @@ -855,10 +834,10 @@ public class FormsServiceImpl implements FormsService {
855 834 listD.add(sin);
856 835 }
857 836  
858   - Collections.sort(listY,new SingledataByXlbm());
859   - Collections.sort(listD,new SingledataByXlbm());
860   - list.addAll(listY);
861   - list.addAll(listD);
  837 + Collections.sort(listY,new SingledataByXlbm());
  838 + Collections.sort(listD,new SingledataByXlbm());
  839 + list.addAll(listY);
  840 + list.addAll(listD);
862 841 }else{
863 842 String sql="select r.s_gh,r.s_name, "
864 843 + " r.xl_bm,r.cl_zbh,r.gs_bm,r.fgs_bm"
... ... @@ -894,19 +873,29 @@ public class FormsServiceImpl implements FormsService {
894 873 String line=sin.getxL();
895 874 String clzbh=sin.getClzbh();
896 875 List<ScheduleRealInfo> newList=new ArrayList<ScheduleRealInfo>();
  876 + List<ScheduleRealInfo> newList_=new ArrayList<ScheduleRealInfo>();
  877 +
897 878 for (int j = 0; j < listReal.size(); j++) {
898 879 ScheduleRealInfo s=listReal.get(j);
899 880 if(s.getsGh().equals(jsy) && s.getClZbh().equals(clzbh)
900 881 &&s.getXlBm().equals(line)){
901 882 newList.add(s);
  883 + Set<ChildTaskPlan> cts = s.getcTasks();
  884 + if(cts != null && cts.size() > 0){
  885 + newList_.add(s);
  886 + }else{
  887 + if(s.getZdsjActual()!=null){
  888 + newList_.add(s);
  889 + }
  890 + }
902 891 }
903 892 }
904 893 double jhgl=culateMileageService.culateJhgl(newList);
905 894 double jhjcc=culateMileageService.culateJhJccgl(newList);
906   - double yygl=culateMileageService.culateSjgl(newList);
907   - double ljgl=culateMileageService.culateLjgl(newList);
908   - double ksgl=culateMileageService.culateKsgl(newList);
909   - double jcgl=culateMileageService.culateJccgl(newList);
  895 + double yygl=culateMileageService.culateSjgl(newList_);
  896 + double ljgl=culateMileageService.culateLjgl(newList_);
  897 + double ksgl=culateMileageService.culateKsgl(newList_);
  898 + double jcgl=culateMileageService.culateJccgl(newList_);
910 899  
911 900 double zyygl=Arith.add(yygl, ljgl);
912 901 double zksgl=Arith.add(ksgl, jcgl);
... ... @@ -1210,8 +1199,8 @@ public class FormsServiceImpl implements FormsService {
1210 1199  
1211 1200 String sql = "select gs_name, fgs_name, cl_zbh, fcsj, bc_type, xl_bm, xl_name, schedule_date"
1212 1201 + " from bsth_c_s_sp_info where gs_bm = '"+company+"' and fgs_bm = '"+subCompany+"' "
1213   - + "and DATE_FORMAT(schedule_date,'%Y-%m-%d') >= '"+startDate+"' "
1214   - + "and DATE_FORMAT(schedule_date,'%Y-%m-%d') <= '"+endDate+"' ";
  1202 + + "and schedule_date_str >= '"+startDate+"' "
  1203 + + "and schedule_date_str <= '"+endDate+"' ";
1215 1204 if(line.trim().length() != 0){
1216 1205 sql += "and xl_bm = '"+line+"' ";
1217 1206 }
... ... @@ -1367,8 +1356,8 @@ public class FormsServiceImpl implements FormsService {
1367 1356  
1368 1357 String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,a.bc_type from "
1369 1358 + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type"
1370   - + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"
1371   - + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='"
  1359 + + " from bsth_c_s_sp_info" + " where schedule_date_str >= '"
  1360 + + map.get("startDate").toString() + "' and schedule_date_str <='" + map.get("endDate").toString() + "' and xl_bm='"
1372 1361 + map.get("line").toString() + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out')"
1373 1362 + " and gs_bm='"+ map.get("gsdmEcecut").toString() + "'"
1374 1363 + " and fgs_bm='"+ map.get("fgsdmEcecut").toString() + "'"
... ... @@ -1376,7 +1365,7 @@ public class FormsServiceImpl implements FormsService {
1376 1365 + " ) a left JOIN ("
1377 1366 + "SELECT COUNT(*) as xlgs,b.gs_bm,b.fgs_bm,b.xl_bm,b.xl_name,b.gs_name,b.fgs_name, b.sbc,b.sxl ,b.scl "
1378 1367 + "from bsth_c_line t RIGHT JOIN (select gs_bm,fgs_bm,xl_bm,xl_name,gs_name,fgs_name, count(*) as sbc,COUNT(DISTINCT xl_bm) as sxl ,COUNT(DISTINCT cl_zbh) as scl,bc_type from bsth_c_s_sp_info_real "
1379   - + "where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '" + map.get("startDate").toString() + "' and '"
  1368 + + "where schedule_date_str >= '" + map.get("startDate").toString() + "' and schedule_date_str <= '"
1380 1369 + map.get("endDate").toString() + "' and xl_bm='" + map.get("line").toString()
1381 1370 + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out') "
1382 1371 // + " GROUP BY gs_bm,fgs_bm,xl_bm,gs_name,fgs_name,bc_type"
... ... @@ -1451,8 +1440,8 @@ public class FormsServiceImpl implements FormsService {
1451 1440  
1452 1441 String sql = " select b.xlgs, a.gs_bm,a.gs_name, a.fgs_bm,a.fgs_name , a.xl_bm,b.xl_name,b.sbc,b.sxl,b.scl,a.jbc ,a.jxl ,a.jcl,a.gslsbm,a.fgsbm,a.bc_type from "
1453 1442 + " (select count(DISTINCT gs_bm) gslsbm, gs_bm, count(DISTINCT fgs_bm) fgsbm,fgs_bm,gs_name,fgs_name ,xl_bm, count(*) as jbc,COUNT(DISTINCT xl_bm) as jxl ,COUNT(DISTINCT cl_zbh) as jcl,bc_type"
1454   - + " from bsth_c_s_sp_info" + " where DATE_FORMAT(schedule_date,'%Y-%m-%d') BETWEEN '"
1455   - + map.get("startDate").toString() + "' and '" + map.get("endDate").toString() + "' and xl_bm='"
  1443 + + " from bsth_c_s_sp_info" + " where schedule_date_str >= '"
  1444 + + map.get("startDate").toString() + "' and schedule_date_str<= '" + map.get("endDate").toString() + "' and xl_bm='"
1456 1445 + map.get("line").toString() + "' AND gs_bm is not null AND bc_type NOT IN ('in', 'out') "
1457 1446 + " and gs_bm='"+ map.get("gsdmAllline").toString() + "'"
1458 1447 + " and fgs_bm='"+ map.get("fgsdmAllline").toString() + "'"
... ...
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
... ... @@ -17,7 +17,6 @@ import java.util.List;
17 17 import java.util.Map;
18 18 import java.util.Set;
19 19  
20   -import org.apache.commons.lang3.StringEscapeUtils;
21 20 import org.springframework.beans.factory.annotation.Autowired;
22 21 import org.springframework.jdbc.core.BeanPropertyRowMapper;
23 22 import org.springframework.jdbc.core.JdbcTemplate;
... ... @@ -25,7 +24,6 @@ import org.springframework.jdbc.core.RowMapper;
25 24 import org.springframework.stereotype.Service;
26 25  
27 26 import com.alibaba.fastjson.JSONArray;
28   -import com.alibaba.fastjson.JSONObject;
29 27 import com.bsth.data.BasicData;
30 28 import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto;
31 29 import com.bsth.entity.realcontrol.ChildTaskPlan;
... ... @@ -1715,13 +1713,13 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1715 1713 }
1716 1714 }
1717 1715 boolean flag = true;
1718   - if(jhlc.toString().equals("0")){
  1716 + if(jhlc.doubleValue() == 0d){
1719 1717 flag = false;
1720 1718 }
1721 1719 tempMap.put("date", Date);
1722 1720 tempMap.put("company", companyName);
1723 1721 tempMap.put("subCompany", subCompanyName);
1724   - tempMap.put("times", times);
  1722 + tempMap.put("times", sfqr == 1 ? times : "全日");
1725 1723 tempMap.put("line", key);
1726 1724 tempMap.put("jhbc", jhbc);
1727 1725 tempMap.put("sjbc", sjbc);
... ... @@ -1732,37 +1730,37 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1732 1730 tempMap.put("lcbfb", df.format(flag?sjlc.divide(jhlc, 4, BigDecimal.ROUND_HALF_UP).doubleValue()*100:0)+"%");
1733 1731 tempMap.put("lzbc", lzbc);
1734 1732 tempMap.put("lzlc", lzlc.doubleValue());
1735   - tempMap.put("lzbfb", df.format(flag?(double)lzbc/jhbc*100:0)+"%");
  1733 + tempMap.put("lzbfb", df.format(jhbc>0?(double)lzbc/jhbc*100:0)+"%");
1736 1734 tempMap.put("dmbc", dmbc);
1737 1735 tempMap.put("dmlc", dmlc.doubleValue());
1738   - tempMap.put("dmbfb", df.format(flag?(double)dmbc/jhbc*100:0)+"%");
  1736 + tempMap.put("dmbfb", df.format(jhbc>0?(double)dmbc/jhbc*100:0)+"%");
1739 1737 tempMap.put("gzbc", gzbc);
1740 1738 tempMap.put("gzlc", gzlc.doubleValue());
1741   - tempMap.put("gzbfb", df.format(flag?(double)gzbc/jhbc*100:0)+"%");
  1739 + tempMap.put("gzbfb", df.format(jhbc>0?(double)gzbc/jhbc*100:0)+"%");
1742 1740 tempMap.put("jfbc", jfbc);
1743 1741 tempMap.put("jflc", jflc.doubleValue());
1744   - tempMap.put("jfbfb", df.format(flag?(double)jfbc/jhbc*100:0)+"%");
  1742 + tempMap.put("jfbfb", df.format(jhbc>0?(double)jfbc/jhbc*100:0)+"%");
1745 1743 tempMap.put("zsbc", zsbc);
1746 1744 tempMap.put("zslc", zslc.doubleValue());
1747   - tempMap.put("zsbfb", df.format(flag?(double)zsbc/jhbc*100:0)+"%");
  1745 + tempMap.put("zsbfb", df.format(jhbc>0?(double)zsbc/jhbc*100:0)+"%");
1748 1746 tempMap.put("qrbc", qrbc);
1749 1747 tempMap.put("qrlc", qrlc.doubleValue());
1750   - tempMap.put("qrbfb", df.format(flag?(double)qrbc/jhbc*100:0)+"%");
  1748 + tempMap.put("qrbfb", df.format(jhbc>0?(double)qrbc/jhbc*100:0)+"%");
1751 1749 tempMap.put("qcbc", qcbc);
1752 1750 tempMap.put("qclc", qclc.doubleValue());
1753   - tempMap.put("qcbfb", df.format(flag?(double)qcbc/jhbc*100:0)+"%");
  1751 + tempMap.put("qcbfb", df.format(jhbc>0?(double)qcbc/jhbc*100:0)+"%");
1754 1752 tempMap.put("kxbc", kxbc);
1755 1753 tempMap.put("kxlc", kxlc.doubleValue());
1756   - tempMap.put("kxbfb", df.format(flag?(double)kxbc/jhbc*100:0)+"%");
  1754 + tempMap.put("kxbfb", df.format(jhbc>0?(double)kxbc/jhbc*100:0)+"%");
1757 1755 tempMap.put("qhbc", qhbc);
1758 1756 tempMap.put("qhlc", qhlc.doubleValue());
1759   - tempMap.put("qhbfb", df.format(flag?(double)qhbc/jhbc*100:0)+"%");
  1757 + tempMap.put("qhbfb", df.format(jhbc>0?(double)qhbc/jhbc*100:0)+"%");
1760 1758 tempMap.put("wybc", wybc);
1761 1759 tempMap.put("wylc", wylc.doubleValue());
1762   - tempMap.put("wybfb", df.format(flag?(double)wybc/jhbc*100:0)+"%");
  1760 + tempMap.put("wybfb", df.format(jhbc>0?(double)wybc/jhbc*100:0)+"%");
1763 1761 tempMap.put("qtbc", qtbc);
1764 1762 tempMap.put("qtlc", qtlc.doubleValue());
1765   - tempMap.put("qtbfb", df.format(flag?(double)qtbc/jhbc*100:0)+"%");
  1763 + tempMap.put("qtbfb", df.format(jhbc>0?(double)qtbc/jhbc*100:0)+"%");
1766 1764  
1767 1765 resList.add(tempMap);
1768 1766 }
... ... @@ -1784,7 +1782,6 @@ public class BusIntervalServiceImpl implements BusIntervalService {
1784 1782 e.printStackTrace();
1785 1783 }
1786 1784 }
1787   - System.out.println(map);
1788 1785  
1789 1786 return resList;
1790 1787 }
... ...
src/main/java/com/bsth/service/impl/TrafficManageServiceImpl.java
... ... @@ -279,14 +279,30 @@ public class TrafficManageServiceImpl implements TrafficManageService{
279 279 }
280 280  
281 281 /**
  282 + * 上传路单 指定日期 yyyy-MM-dd
  283 + * @param theDate
  284 + * @return
  285 + */
  286 + public String setLD(String theDate){
  287 + return uploadLD(theDate);
  288 + }
  289 +
  290 + /**
  291 + * 上传路单 上传前一天的路单
  292 + * @return
  293 + */
  294 + public String setLD(){
  295 + return uploadLD(null);
  296 + }
  297 + /**
282 298 * 上传路单
283 299 * @return 上传成功标识
284 300 */
285   - public String setLD(){
  301 + private String uploadLD(String theDate){
286 302 String result = "failure";
287 303 Line line;
288 304 // 取昨天 的日期
289   - String date = sdfnyr.format(DateUtils.addDays(new Date(), -1));
  305 + String date = theDate == null ?sdfnyr.format(DateUtils.addDays(new Date(), -1)) : theDate;
290 306 StringBuffer sf = new StringBuffer();
291 307 String str;
292 308 try {
... ...
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
... ... @@ -24,6 +24,7 @@ import com.bsth.data.utils.CustomStringUtils;
24 24 import com.bsth.entity.Cars;
25 25 import com.bsth.entity.Line;
26 26 import com.bsth.entity.Personnel;
  27 +import com.bsth.entity.mcy_forms.Waybillday;
27 28 import com.bsth.entity.oil.Dlb;
28 29 import com.bsth.entity.oil.Ylb;
29 30 import com.bsth.entity.oil.Ylxxb;
... ... @@ -246,7 +247,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
246 247  
247 248 schedule.setDfsjAll(dfsj);
248 249 schedule.setDfAuto(false);
249   - schedule.setRemarks(remarks);
  250 + if("1".equals(opType))
  251 + schedule.setRemarks(remarks);
250 252  
251 253 List<ScheduleRealInfo> ts = new ArrayList<>();
252 254 ts.add(schedule);
... ... @@ -788,13 +790,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
788 790 + " select min(s.id) as id,s.j_Gh as jGh,s.cl_Zbh as clZbh, "
789 791 + " s.lp_Name as lpName,s.j_Name as jName,max(s.schedule_date_str) as dateStr ,"
790 792 + " min(s.fcsj) as fcsj,1 as px from bsth_c_s_sp_info_real s where "
791   - + " s.xl_Bm = '"+line+"' and DATE_FORMAT(s.schedule_Date,'%Y-%m-%d') ='"+date+"'"
  793 + + " s.xl_Bm = '"+line+"' and s.schedule_date_str ='"+date+"'"
792 794 + " GROUP BY s.j_Gh,s.cl_Zbh,s.lp_Name ,s.j_Name ) x where x.fcsj >'"+minfcsj+"'"
793 795 + " UNION "
794 796 + " select * from ( select min(s.id) as id,s.j_Gh as jGh,s.cl_Zbh as clZbh, "
795 797 + " s.lp_Name as lpName,s.j_Name as jName, max(s.schedule_date_str) as dateStr,"
796 798 + " min(s.fcsj) as fcsj,2 as px from bsth_c_s_sp_info_real s "
797   - + " where s.xl_Bm = '"+line+"' and DATE_FORMAT(s.schedule_Date,'%Y-%m-%d') ='"+date+"'"
  799 + + " where s.xl_Bm = '"+line+"' and s.schedule_date_str ='"+date+"'"
798 800 + " GROUP BY s.j_Gh,s.cl_Zbh,s.lp_Name ,s.j_Name "
799 801 + " ) y where y.fcsj <='"+minfcsj+"') z order by (" + state + "),dateStr,px " + type;
800 802 List<ScheduleRealInfo> list = jdbcTemplate.query(sqlPlan,
... ... @@ -2943,17 +2945,13 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2943 2945 }else{
2944 2946 yesterdayDataList=scheduleRealInfoRepository.yesterdayDataList_eq(line, date,gsbm,fgsbm,nbbm);
2945 2947 }
2946   -
2947   -// System.out.println("shijian2:"+new Date());
2948   - // List<ScheduleRealInfo> list = scheduleRealInfoRepository.scheduleByDateAndLine(line, date);
  2948 + System.out.println("time2:"+new Date());
  2949 +
2949 2950 List<ScheduleRealInfo> lists = scheduleRealInfoRepository.queryListWaybill3(jGh, nbbm, date,gsbm,fgsbm);
2950   -// System.out.println("shijian3:"+new Date());
2951 2951 for (int x = 0; x < yesterdayDataList.size(); x++) {
2952 2952 String jName = yesterdayDataList.get(x).get("jGh").toString();
2953 2953 String clZbh = yesterdayDataList.get(x).get("clZbh").toString();
2954 2954 String xlbm = yesterdayDataList.get(x).get("xlBm").toString();
2955   -// double jhlc = 0, yygl = 0, ksgl = 0, tempJhlc = 0, jcclc = 0;
2956   - double addMileage = 0, remMileage = 0;
2957 2955 Map<String, Object> map = new HashMap<String, Object>();
2958 2956 boolean fage = true;
2959 2957 String company="";
... ... @@ -2976,13 +2974,11 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2976 2974 listS.add(scheduleRealInfo);
2977 2975 }
2978 2976 }
2979   - listS.add(scheduleRealInfo);
2980 2977 }
2981 2978 }
2982 2979  
2983 2980 yesterdayDataList.get(x).put("company", company);
2984 2981 yesterdayDataList.get(x).put("bCompany", bCompany);
2985   -// Double zgl=Arith.add(yygl,ksgl);
2986 2982 Double ljgl=culateMieageService.culateLjgl(listS);
2987 2983 Double sjgl=culateMieageService.culateSjgl(listS);
2988 2984 Double ksgl=culateMieageService.culateKsgl(listS);
... ... @@ -2993,15 +2989,6 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
2993 2989 yesterdayDataList.get(x).put("totalKilometers", zlc);
2994 2990  
2995 2991 }
2996   - /* List<Map<String, Object>> yesterdayDataLists = new ArrayList<Map<String, Object>>();
2997   -
2998   - for (int i = 0; i < yesterdayDataList.size(); i++) {
2999   - Map<String, Object> map=yesterdayDataList.get(i);
3000   - Double zlc=map.get("totalKilometers")==null?0.0:Double.parseDouble(map.get("totalKilometers").toString());
3001   -// if(zlc>0){
3002   - yesterdayDataLists.add(map);
3003   -// }
3004   - }*/
3005 2992 //增加顺序号
3006 2993 for (int i = 0; i < yesterdayDataList.size(); i++) {
3007 2994 if (i == 0) {
... ... @@ -3743,6 +3730,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3743 3730 Double jcyl = 0.0;
3744 3731 Double yh = 0.0;
3745 3732 Double jzl = 0.0;
  3733 + Double zlc=0.0;
3746 3734 List<Ylb> listYlb = ylbRepository.queryListYlb(fcrq, s.getClZbh(), s.getjGh(),xlbm);
3747 3735 List<Dlb> listDlb = dlbRepository.queryListDlb(fcrq, s.getClZbh(), s.getjGh(),xlbm);
3748 3736 if(listYlb.size()>0){
... ... @@ -3753,6 +3741,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3753 3741 jcyl=Arith.add(jcyl, y.getJzyl());
3754 3742 yh =Arith.add(yh ,y.getYh());
3755 3743 jzl =Arith.add(jzl, y.getJzl());
  3744 + zlc =Arith.add(zlc, y.getZlc());
3756 3745 }
3757 3746 }else{
3758 3747 type=1;
... ... @@ -3762,6 +3751,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3762 3751 jcyl=Arith.add(jcyl, d.getJzcd());
3763 3752 yh =Arith.add(yh ,d.getHd());
3764 3753 jzl =Arith.add(jzl, d.getCdl());
  3754 + zlc =Arith.add(zlc, d.getZlc());
3765 3755 }
3766 3756 }
3767 3757  
... ... @@ -3772,7 +3762,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl&lt;ScheduleRealInf
3772 3762 map.put("ccyl", ccyl);
3773 3763 map.put("jcyl", jcyl);
3774 3764 map.put("type", type);
3775   -
  3765 + map.put("zlc", zlc);
3776 3766 map.put("xlName", s.getXlName());
3777 3767 map.put("clZbh", s.getClZbh());
3778 3768 map.put("plate", BasicData.nbbmCompanyPlateMap.get(s.getClZbh()));
... ...
src/main/java/com/bsth/service/report/CulateMileageService.java
... ... @@ -13,12 +13,16 @@ public interface CulateMileageService {
13 13  
14 14 List<Map<String,Object>> jobLjqk(List<ScheduleRealInfo> lists);
15 15 double culateLjgl(List<ScheduleRealInfo> lists);
  16 + double culateLjgl_(List<ScheduleRealInfo> lists,String item);
16 17 int culateLjbc(List<ScheduleRealInfo> lists,String item);
17 18  
18 19 double culateJhgl(List<ScheduleRealInfo> lists);
  20 + double culateJhgl_(List<ScheduleRealInfo> lists,String item);
  21 +
19 22 int culateJhbc(List<ScheduleRealInfo> lists,String item);
20 23  
21 24 double culateSjgl(List<ScheduleRealInfo> lists);
  25 + double culateSjgl_(List<ScheduleRealInfo> lists,String item);
22 26 int culateSjbc(List<ScheduleRealInfo> lists,String item);
23 27  
24 28 double culateKsgl(List<ScheduleRealInfo> lists);
... ... @@ -32,8 +36,9 @@ public interface CulateMileageService {
32 36  
33 37 Map<String, Object> culateDjg(List<ScheduleRealInfo> lists,String line);
34 38  
  39 + Map<String, Object> culateWdbcs(List<ScheduleRealInfo> lists);
35 40  
36   -
  41 + int culateDtfzbc(List<ScheduleRealInfo> lists,String type,String status,String item);
37 42 //以下计算方法供新报表使用
38 43 Map<String, Double> culateSjlcMap(List<ScheduleRealInfo> lists);//计划内营运and计划外营运
39 44  
... ...
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
... ... @@ -261,6 +261,108 @@ public class CulateMileageServiceImpl implements CulateMileageService{
261 261 }
262 262  
263 263 @Override
  264 + public double culateLjgl_(List<ScheduleRealInfo> lists,String item) {
  265 + // TODO Auto-generated method stub
  266 + double ljgl=0;
  267 + for (int i = 0; i < lists.size(); i++) {
  268 + ScheduleRealInfo scheduleRealInfo=lists.get(i);
  269 + if (!isInOut(scheduleRealInfo)) {
  270 + if(!scheduleRealInfo.isDestroy()){
  271 + String time = "";
  272 + if (scheduleRealInfo.getFcsjActual() != null) {
  273 + time = scheduleRealInfo.getFcsjActual();
  274 + }
  275 + if (time.equals("")) {
  276 + if (scheduleRealInfo.getDfsj() != null) {
  277 + time = scheduleRealInfo.getDfsj();
  278 + }
  279 + }
  280 + if(!time.equals("")){
  281 + String[] fcsjStr = time.split(":");
  282 + long fcsj = Long.parseLong(fcsjStr[0]) * 60 + Long.parseLong(fcsjStr[1]);
  283 + if(scheduleRealInfo.isSflj()){
  284 + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
  285 + if(childTaskPlans.isEmpty()){
  286 + if(item.equals("zgf")){
  287 + if(fcsj>=zgf1 && fcsj<=zgf2){
  288 + ljgl=Arith.add(ljgl,scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc());
  289 + }
  290 + }
  291 + if(item.equals("wgf")){
  292 + if(fcsj>=wgf1 && fcsj<=wgf2){
  293 + ljgl=Arith.add(ljgl,scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc());
  294 + }
  295 + }
  296 + }else{
  297 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  298 + while (it.hasNext()) {
  299 + ChildTaskPlan childTaskPlan = it.next();
  300 + if(childTaskPlan.getMileageType().equals("service")){
  301 + if (!childTaskPlan.isDestroy()) {
  302 + Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage();
  303 + if(item.equals("zgf")){
  304 + if(fcsj>=zgf1 && fcsj<=zgf2){
  305 + ljgl=Arith.add(ljgl,jhgl);
  306 + }
  307 + }
  308 + if(item.equals("wgf")){
  309 + if(fcsj>=wgf1 && fcsj<=wgf2){
  310 + ljgl=Arith.add(ljgl,jhgl);
  311 + }
  312 + }
  313 + }
  314 + }
  315 + }
  316 + }
  317 + }else{
  318 + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
  319 + if(childTaskPlans.isEmpty()){
  320 + double jhlc=scheduleRealInfo.getJhlc()==null?0:scheduleRealInfo.getJhlc();
  321 + double jhlcOrig=scheduleRealInfo.getJhlcOrig()==null?0:scheduleRealInfo.getJhlcOrig();
  322 + double zjlc=Arith.sub(jhlc, jhlcOrig);
  323 + if(zjlc>0){
  324 + if(item.equals("zgf")){
  325 + if(fcsj>=zgf1 && fcsj<=zgf2){
  326 + ljgl=Arith.add(zjlc, ljgl);
  327 + }
  328 + }
  329 + if(item.equals("wgf")){
  330 + if(fcsj>=wgf1 && fcsj<=wgf2){
  331 + ljgl=Arith.add(zjlc, ljgl);
  332 + }
  333 + }
  334 + }
  335 + }else{
  336 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  337 + while (it.hasNext()) {
  338 + ChildTaskPlan childTaskPlan = it.next();
  339 + if("service".equals(childTaskPlan.getMileageType())&&"临加".equals(childTaskPlan.getType1())){
  340 + if (!childTaskPlan.isDestroy()) {
  341 + Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage();
  342 + if(item.equals("zgf")){
  343 + if(fcsj>=zgf1 && fcsj<=zgf2){
  344 + ljgl=Arith.add(ljgl,jhgl);
  345 + }
  346 + }
  347 + if(item.equals("wgf")){
  348 + if(fcsj>=wgf1 && fcsj<=wgf2){
  349 + ljgl=Arith.add(ljgl,jhgl);
  350 + }
  351 + }
  352 + }
  353 + }
  354 + }
  355 + }
  356 + }
  357 + }
  358 + }
  359 +
  360 + }
  361 + }
  362 + return ljgl;
  363 + }
  364 +
  365 + @Override
264 366 public double culateLjgl(List<ScheduleRealInfo> lists) {
265 367 // TODO Auto-generated method stub
266 368 double ljgl=0;
... ... @@ -368,6 +470,32 @@ public class CulateMileageServiceImpl implements CulateMileageService{
368 470 }
369 471 return jhgl;
370 472 }
  473 +
  474 + @Override
  475 + public double culateJhgl_(List<ScheduleRealInfo> lists,String item) {
  476 + // TODO Auto-generated method stub
  477 + double jhgl=0;
  478 + for (int i = 0; i < lists.size(); i++) {
  479 + ScheduleRealInfo scheduleRealInfo=lists.get(i);
  480 + if (!isInOut(scheduleRealInfo)) {
  481 + if(!scheduleRealInfo.isSflj()){
  482 + String[] fcsjStr = scheduleRealInfo.getFcsj().split(":");
  483 + long fcsj= Long.parseLong(fcsjStr[0])*60+Long.parseLong(fcsjStr[1]);
  484 + if(item.equals("zgf")){
  485 + if(fcsj>=zgf1 && fcsj<=zgf2){
  486 + jhgl=Arith.add(jhgl,scheduleRealInfo.getJhlcOrig()==null?0:scheduleRealInfo.getJhlcOrig());
  487 + }
  488 + }
  489 + if(item.equals("wgf")){
  490 + if(fcsj>=wgf1 && fcsj<=wgf2){
  491 + jhgl=Arith.add(jhgl,scheduleRealInfo.getJhlcOrig()==null?0:scheduleRealInfo.getJhlcOrig());
  492 + }
  493 + }
  494 + }
  495 + }
  496 + }
  497 + return jhgl;
  498 + }
371 499  
372 500 @Override
373 501 public int culateJhbc(List<ScheduleRealInfo> lists,String item) {
... ... @@ -434,6 +562,85 @@ public class CulateMileageServiceImpl implements CulateMileageService{
434 562 }
435 563 return sjgl;
436 564 }
  565 +
  566 + @Override
  567 + public double culateSjgl_(List<ScheduleRealInfo> lists, String item) {
  568 + // TODO Auto-generated method stub
  569 + double sjgl = 0;
  570 + for (int i = 0; i < lists.size(); i++) {
  571 + ScheduleRealInfo scheduleRealInfo = lists.get(i);
  572 + if (!isInOut(scheduleRealInfo)) {
  573 + Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks();
  574 + if (!scheduleRealInfo.isSflj()) {
  575 + String time = "";
  576 + if (scheduleRealInfo.getFcsjActual() != null) {
  577 + time = scheduleRealInfo.getFcsjActual();
  578 + }
  579 + if (time.equals("")) {
  580 + if (scheduleRealInfo.getDfsj() != null) {
  581 + time = scheduleRealInfo.getDfsj();
  582 + }
  583 + }
  584 + if (!time.equals("")) {
  585 + String[] fcsjStr = time.split(":");
  586 + long fcsj = Long.parseLong(fcsjStr[0]) * 60 + Long.parseLong(fcsjStr[1]);
  587 + if (childTaskPlans.isEmpty()) {
  588 + if (!scheduleRealInfo.isDestroy()) {
  589 + double jhlcOrig = scheduleRealInfo.getJhlcOrig() == null ? 0
  590 + : scheduleRealInfo.getJhlcOrig();
  591 + double jhlc = scheduleRealInfo.getJhlc() == null ? 0 : scheduleRealInfo.getJhlc();
  592 +
  593 + if(item.equals("zgf")){
  594 + if(fcsj>=zgf1 && fcsj<=zgf2){
  595 + if (jhlc - jhlcOrig > 0) {
  596 + sjgl = Arith.add(sjgl, jhlcOrig);
  597 + } else {
  598 + sjgl = Arith.add(sjgl, jhlc);
  599 + }
  600 + }
  601 + }
  602 + if(item.equals("wgf")){
  603 + if(fcsj>=wgf1 && fcsj<=wgf2){
  604 + if (jhlc - jhlcOrig > 0) {
  605 + sjgl = Arith.add(sjgl, jhlcOrig);
  606 + } else {
  607 + sjgl = Arith.add(sjgl, jhlc);
  608 + }
  609 + }
  610 + }
  611 +
  612 +
  613 + }
  614 + } else {
  615 + Iterator<ChildTaskPlan> it = childTaskPlans.iterator();
  616 + while (it.hasNext()) {
  617 + ChildTaskPlan childTaskPlan = it.next();
  618 + if (childTaskPlan.getMileageType().equals("service")
  619 + && "正常".equals(childTaskPlan.getType1())) {
  620 + if (!childTaskPlan.isDestroy()) {
  621 + Float jhgl = childTaskPlan.getMileage() == null ? 0
  622 + : childTaskPlan.getMileage();
  623 +
  624 + if(item.equals("zgf")){
  625 + if(fcsj>=zgf1 && fcsj<=zgf2){
  626 + sjgl = Arith.add(sjgl, jhgl);
  627 + }
  628 + }
  629 + if(item.equals("wgf")){
  630 + if(fcsj>=wgf1 && fcsj<=wgf2){
  631 + sjgl = Arith.add(sjgl, jhgl);
  632 + }
  633 + }
  634 + }
  635 + }
  636 + }
  637 + }
  638 + }
  639 + }
  640 + }
  641 + }
  642 + return sjgl;
  643 + }
437 644  
438 645 @Override
439 646 public int culateSjbc(List<ScheduleRealInfo> lists,String item) {
... ... @@ -460,7 +667,21 @@ public class CulateMileageServiceImpl implements CulateMileageService{
460 667 if(!time.equals("")){
461 668 String[] fcsjStr = time.split(":");
462 669 long fcsj= Long.parseLong(fcsjStr[0])*60+Long.parseLong(fcsjStr[1]);
463   - if(childTaskPlans.isEmpty()){
  670 + if(scheduleRealInfo.getStatus()!=-1){
  671 + if(item.equals("zgf")){
  672 + if(fcsj>=zgf1 && fcsj<=zgf2){
  673 + sjbc++;
  674 + }
  675 + }else if(item.equals("wgf")){
  676 + if(fcsj>=wgf1 && fcsj<=wgf2){
  677 + sjbc++;
  678 + }
  679 + }else{
  680 + sjbc++;
  681 + }
  682 +
  683 + }
  684 + /*if(childTaskPlans.isEmpty()){
464 685 if(scheduleRealInfo.getStatus()!=-1){
465 686 if(item.equals("zgf")){
466 687 if(fcsj>=zgf1 && fcsj<=zgf2){
... ... @@ -515,7 +736,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{
515 736 sjbc++;
516 737 }
517 738 }
518   - }
  739 + }*/
519 740 }
520 741 }
521 742 }
... ... @@ -578,6 +799,108 @@ public class CulateMileageServiceImpl implements CulateMileageService{
578 799 return jcclc;
579 800 }
580 801  
  802 +
  803 + @Override
  804 + public int culateDtfzbc(List<ScheduleRealInfo> lists,String type,String status,String item){
  805 + int bc=0;
  806 + for (int i = 0; i < lists.size(); i++) {
  807 + ScheduleRealInfo s=lists.get(i);
  808 + if(s.getBcType().equals(type)){
  809 + if(status.equals("jh")){
  810 + String fcsjs=s.getFcsj();
  811 + String[] fcsjStr = fcsjs.split(":");
  812 + long fcsj = Long.parseLong(fcsjStr[0]) * 60 + Long.parseLong(fcsjStr[1]);
  813 + if(item.equals("zgf")){
  814 + if(fcsj>zgf1&&fcsj<zgf2)
  815 + bc++;
  816 +
  817 + }else if(item.equals("wgf")){
  818 + if(fcsj>wgf1&&fcsj<wgf2)
  819 + bc++;
  820 + }else{
  821 + bc++;
  822 + }
  823 + }else{
  824 + if(s.getFcsjActual()!=null){
  825 + if(!s.isDestroy()){
  826 + String fcsjs=s.getFcsjActual();
  827 + String[] fcsjStr = fcsjs.split(":");
  828 + long fcsj = Long.parseLong(fcsjStr[0]) * 60 + Long.parseLong(fcsjStr[1]);
  829 + if(item.equals("zgf")){
  830 + if(fcsj>zgf1&&fcsj<zgf2)
  831 + bc++;
  832 + }else if(item.equals("wgf")){
  833 + if(fcsj>wgf1&&fcsj<wgf2)
  834 + bc++;
  835 + }else{
  836 + bc++;
  837 + }
  838 + }
  839 + }
  840 +
  841 + }
  842 + }
  843 + }
  844 +
  845 + return bc;
  846 + }
  847 + @Override
  848 + public Map<String, Object> culateWdbcs(List<ScheduleRealInfo> lists){
  849 + int sxk=0,sxkzgf=0,sxkwgf=0,sxm=0,sxmzgf=0,sxmwgf=0,xxk=0,
  850 + xxkzgf=0,xxkwgf=0,xxm=0,xxmzgf=0,xxmwgf=0;
  851 + for (int i = 0; i < lists.size(); i++) {
  852 + ScheduleRealInfo s=lists.get(i);
  853 + if(s.getFcsjActual()!=null){
  854 + String xlDir=s.getXlDir();
  855 + String fcsjs=s.getFcsj();
  856 + String[] fcsjStr = fcsjs.split(":");
  857 + long fcsj = Long.parseLong(fcsjStr[0]) * 60 + Long.parseLong(fcsjStr[1]);
  858 + String fcsjActuals=s.getFcsjActual();
  859 + String[] fcsjActualsStr = fcsjActuals.split(":");
  860 + long fcsjActual = Long.parseLong(fcsjActualsStr[0]) * 60 + Long.parseLong(fcsjActualsStr[1]);
  861 +
  862 + if("0".equals(xlDir)){
  863 +
  864 + if(fcsj-fcsjActual>1){
  865 + sxk++;
  866 + if(fcsj>zgf1&&fcsj<zgf2)
  867 + sxkzgf++;
  868 + if(fcsj>wgf1&&fcsj<wgf2)
  869 + sxkwgf++;
  870 + }
  871 + if(fcsjActual-fcsj>3){
  872 + sxm++;
  873 + if(fcsj>zgf1&&fcsj<zgf2)
  874 + sxmzgf++;
  875 + if(fcsj>wgf1&&fcsj<wgf2)
  876 + sxmwgf++;
  877 + }
  878 + }else{
  879 + if(fcsj-fcsjActual>1){
  880 + xxk++;
  881 + if(fcsj>zgf1&&fcsj<zgf2)
  882 + xxkzgf++;
  883 + if(fcsj>wgf1&&fcsj<wgf2)
  884 + xxkwgf++;
  885 + }
  886 + if(fcsjActual-fcsj>3){
  887 + xxm++;
  888 + if(fcsj>zgf1&&fcsj<zgf2)
  889 + xxmzgf++;
  890 + if(fcsj>wgf1&&fcsj<wgf2)
  891 + xxmwgf++;
  892 + }
  893 + }
  894 + }
  895 + }
  896 + Map<String, Object> m=new HashMap<String,Object>();
  897 + m.put("sxk", sxk);m.put("sxkzgf",sxkzgf );m.put("sxkwgf", sxkwgf);
  898 + m.put("sxm",sxm );m.put("sxmzgf", sxmzgf);m.put("sxmwgf", sxmwgf);
  899 + m.put("xxk", xxk);m.put("xxkzgf", xxkzgf);m.put("xxkwgf", xxkwgf);
  900 + m.put("xxm", xxm);m.put("xxmzgf", xxmzgf);m.put("xxmwgf", xxmwgf);
  901 + return m;
  902 + }
  903 +
581 904 @Override
582 905 public double culateJhJccgl(List<ScheduleRealInfo> lists) {
583 906 // TODO Auto-generated method stub
... ...
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
... ... @@ -1909,16 +1909,43 @@ public class ReportServiceImpl implements ReportService{
1909 1909 }
1910 1910  
1911 1911 List<ScheduleRealInfo> sList=scheduleRealInfoRepository.scheduleByDateAndLineTjrb(line, date);
1912   - Map<String, Object> newMap=new HashMap<String,Object>();
  1912 + Map<String, Object> newMap=culateService.culateWdbcs(sList);
1913 1913 newMap.put("jhbc", culateService.culateJhbc(sList,""));
  1914 + newMap.put("jhbczgf", culateService.culateJhbc(sList,"zgf"));
  1915 + newMap.put("jhbcwgf", culateService.culateJhbc(sList,"wgf"));
1914 1916 newMap.put("jhgl", culateService.culateJhgl(sList));
  1917 + newMap.put("jhglzgf", culateService.culateJhgl_(sList,"zgf"));
  1918 + newMap.put("jhglwgf", culateService.culateJhgl_(sList,"wgf"));
  1919 +
1915 1920 newMap.put("sjbc", culateService.culateSjbc(sList,""));
  1921 + newMap.put("sjbczgf", culateService.culateSjbc(sList,"zgf"));
  1922 + newMap.put("sjbcwgf", culateService.culateSjbc(sList,"wgf"));
1916 1923 newMap.put("sjgl", culateService.culateSjgl(sList));
  1924 + newMap.put("sjglzgf", culateService.culateSjgl_(sList,"zgf"));
  1925 + newMap.put("sjglwgf", culateService.culateSjgl_(sList,"wgf"));
  1926 +
1917 1927 newMap.put("lbgl", culateService.culateLbgl(sList));
1918 1928 newMap.put("lbbc", culateService.culateLbbc(sList));
1919 1929 newMap.put("ljgl", culateService.culateLjgl(sList));
  1930 + newMap.put("ljglzgf", culateService.culateLjgl_(sList,"zgf"));
  1931 + newMap.put("ljglwgf", culateService.culateLjgl_(sList,"wgf"));
  1932 +
1920 1933 newMap.put("ljbc", culateService.culateLjbc(sList,""));
1921 1934 newMap.put("ksgl", culateService.culateKsgl(sList));
  1935 +
  1936 + newMap.put("jhfbbc",culateService.culateDtfzbc(sList, "venting", "jh", ""));
  1937 + newMap.put("jhfbbczgf",culateService.culateDtfzbc(sList, "venting", "jh", "zgf"));
  1938 + newMap.put("jhfbbcwgf",culateService.culateDtfzbc(sList, "venting", "jh", "wgf"));
  1939 + newMap.put("sjfbbc",culateService.culateDtfzbc(sList, "venting", "sj", ""));
  1940 + newMap.put("sjfbbczgf",culateService.culateDtfzbc(sList, "venting", "sj", "zgf"));
  1941 + newMap.put("sjfbbcwgf",culateService.culateDtfzbc(sList, "venting", "sj", "wgf"));
  1942 +
  1943 + newMap.put("jhdtbc",culateService.culateDtfzbc(sList, "major", "jh", ""));
  1944 + newMap.put("jhdtbczgf",culateService.culateDtfzbc(sList, "major", "jh", "zgf"));
  1945 + newMap.put("jhdtbcwgf",culateService.culateDtfzbc(sList, "major", "jh", "wgf"));
  1946 + newMap.put("sjdtbc",culateService.culateDtfzbc(sList, "major", "sj", ""));
  1947 + newMap.put("sjdtbczgf",culateService.culateDtfzbc(sList, "major", "sj", "zgf"));
  1948 + newMap.put("sjdtbcwgf",culateService.culateDtfzbc(sList, "major", "sj", "wgf"));
1922 1949 return newMap;
1923 1950 }
1924 1951 @Override
... ...
src/main/resources/static/index.html
1 1 <!DOCTYPE html>
2 2 <html lang="zh">
3 3 <head>
4   - <meta name="renderer" content="webkit" />
5   - <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
6   - <meta charset="UTF-8">
7   - <title>调度系统</title>
8   -
9   - <meta http-equiv="Pragma" content="no-cache">
10   - <meta http-equiv="Cache-control" content="no-cache">
11   - <meta http-equiv="Cache" content="no-cache">
12   -
13   - <!-- Font Awesome 图标字体 -->
14   - <link
15   - href="/metronic_v4.5.4/plugins/font-awesome/css/font-awesome.min.css"
16   - rel="stylesheet" type="text/css" />
17   - <!-- Bootstrap style -->
18   - <link href="/metronic_v4.5.4/plugins/bootstrap/css/bootstrap.min.css"
19   - rel="stylesheet" type="text/css" />
20   - <!-- jsTree 数插件 -->
21   - <link
22   - href="/metronic_v4.5.4/plugins/jstree/dist/themes/default/style.min.css"
23   - rel="stylesheet" type="text/css" />
24   - <!-- MULTI-select 多选下拉框美化 -->
25   - <link
26   - href="/metronic_v4.5.4/plugins/jquery-multi-select/css/multi-select.css"
27   - rel="stylesheet" type="text/css" />
28   -
29   - <!-- editable -->
30   - <link
31   - href="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/css/bootstrap-editable.css"
32   - rel="stylesheet" type="text/css" />
33   - <!-- METRONIC style -->
34   - <link href="/metronic_v4.5.4/layout4/css/themes/light.min.css"
35   - rel="stylesheet" type="text/css" id="style_color" />
36   - <link href="/metronic_v4.5.4/css/components.css" rel="stylesheet"
37   - type="text/css" />
38   - <link href="/metronic_v4.5.4/css/plugins.css" rel="stylesheet"
39   - type="text/css" />
40   - <link href="/metronic_v4.5.4/layout4/css/layout.min.css"
41   - rel="stylesheet" type="text/css" />
42   - <link href="/metronic_v4.5.4/layout4/css/custom.min.css"
43   - rel="stylesheet" type="text/css" />
44   - <!-- select2 下拉框插件 -->
45   - <link href="/metronic_v4.5.4/plugins/select2/css/select2.min.css"
46   - rel="stylesheet" type="text/css" />
47   - <link
48   - href="/metronic_v4.5.4/plugins/select2/css/select2-bootstrap.min.css"
49   - rel="stylesheet" type="text/css" />
50   - <!-- layer 弹层 插件 -->
51   - <link href="/assets/plugins/layer-v2.4/layer/skin/layer.css"
52   - rel="stylesheet" type="text/css" />
53   - <!-- fileinput 上传 插件 -->
54   - <link href="/assets/plugins/fileinput/css/fileinput.min.css"
55   - rel="stylesheet" type="text/css" />
56   - <!-- iCheck 单选框和复选框 -->
57   - <link href="/metronic_v4.5.4/plugins/icheck/skins/all.css"
58   - rel="stylesheet" type="text/css" />
59   - <!-- 日期控件 -->
60   - <link
61   - href="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/css/bootstrap-datetimepicker.min.css"
62   - rel="stylesheet" type="text/css" />
63   - <!-- table 表格控件 -->
64   - <link rel="stylesheet"
65   - href="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css"
66   - type="text/css" />
67   - <link href="/metronic_v4.5.4/plugins/bootstrap-tagsinput/bootstrap-tagsinput.css" rel="stylesheet" type="text/css"/>
68   - <!-- handsontable样式 -->
69   - <link rel="stylesheet"
70   - href="/assets/bower_components/handsontable/dist/handsontable.full.css" />
71   - <!-- sweetalert样式 -->
72   - <link rel="stylesheet"
73   - href="/assets/bower_components/sweetalert/dist/sweetalert.css" />
74   - <!-- schedule计划调度AngularJS模块主css -->
75   - <link rel="stylesheet" href="/pages/scheduleApp/module/common/main.css"
76   - type="text/css" />
77   -
78   - <!-- CSS动画 -->
79   - <link
80   - href="/metronic_v4.5.4/plugins/tipso/css/animate.css"
81   - rel="stylesheet" type="text/css" />
82   -
83   - <!-- 提示工具样式 -->
84   - <link
85   - href="/metronic_v4.5.4/plugins/tipso/css/tipso.css"
86   - rel="stylesheet" type="text/css" />
87   -
88   - <style type="text/css">
89   - .searchForm {
90   -
91   - }
92   -
93   - .searchForm .form-group .control-label {
94   - padding-right: 0px;
95   - text-align: right;
96   - margin-top: 7px;
97   - }
98   -
99   - .searchForm .form-group>div {
100   - padding-left: 10px;
101   - padding-right: 0px;
102   - }
103   -
104   - .searchForm .row>div {
105   - padding-left: 0px;
106   - padding-right: 0px;
107   - padding: 5px 0 5px 0;
108   - width: 270px;
109   - display: inline-block;
110   - }
111   -
112   - .searchForm .form-actions {
113   -
114   - }
115   -
116   - tr.row-active td {
117   - border-bottom: 1px solid blue !important;
118   - color: blue;
119   - }
120   -
121   - .ms-container .ms-selectable li.ms-elem-selectable,.ms-container .ms-selection li.ms-elem-selection
122   - {
123   - font-size: 14px;
124   - }
125   -
126   - .ms-container .ms-selectable li.ms-elem-selectable,.ms-container .ms-selection li.ms-elem-selection
127   - {
128   - padding: 6px 26px;
129   - }
130   -
131   - .ms-container .ms-list {
132   - height: 306px;
133   - }
134   -
135   - .ms-container .ms-selectable,.ms-container .ms-selection {
136   - width: 47%;
137   - }
138   -
139   - .ms-container {
140   - width: 470px;
141   - margin: auto;
142   - }
143   -
144   - .multi-custom-header-left {
145   - text-align: center;
146   - padding: 7px;
147   - color: #3B3F51;
148   - }
149   -
150   - .multi-custom-header-right {
151   - text-align: center;
152   - padding: 7px;
153   - font-weight: bold;
154   - color: #36C6D3;
155   - }
156   -
157   - .mt-element-list .list-simple.mt-list-container ul>.mt-list-item>.list-item-content
158   - {
159   - padding: 0 55px 0 0px;
160   - }
161   -
162   - .mt-element-list .list-simple.mt-list-container ul>.mt-list-item {
163   - padding: 3.3px 0;
164   - }
165   -
166   - #route-container {
167   - display: none;
168   - }
169   -
170   - .page-content.active {
171   - display: block !important;
172   - }
173   -
174   - .page-header.navbar .page-logo .logo-default {
175   - margin: 0;
176   - }
177   -
178   - .page-header.navbar .top-menu .navbar-nav>li.dropdown.open .dropdown-toggle
179   - {
180   - background-color: #284a99;
181   - }
182   -
183   - .page-header.navbar .page-logo {
184   - padding-right: 10px;
185   - }
186   -
187   - .page-logo .logo-default.logo-default-text {
188   - font-weight: 600;
189   - color: white !important;
190   - margin-top: 19px !important;
191   - font-size: 24px;
192   - text-decoration: none;
193   - }
194   -
195   - .page-logo .logo-default.logo-default-text:HOVER {
196   - color: #dedede !important;
197   - }
198   - </style>
199   -
200   - <!-- ocLazyLoading载入文件的位置 -->
201   - <link id="ng_load_plugins_before" />
  4 +<meta name="renderer" content="webkit" />
  5 +<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
  6 +<meta charset="UTF-8">
  7 +<title>调度系统</title>
  8 +
  9 +<meta http-equiv="Pragma" content="no-cache">
  10 +<meta http-equiv="Cache-control" content="no-cache">
  11 +<meta http-equiv="Cache" content="no-cache">
  12 +
  13 +<!-- Font Awesome 图标字体 -->
  14 +<link
  15 + href="/metronic_v4.5.4/plugins/font-awesome/css/font-awesome.min.css"
  16 + rel="stylesheet" type="text/css" />
  17 +<!-- Bootstrap style -->
  18 +<link href="/metronic_v4.5.4/plugins/bootstrap/css/bootstrap.min.css"
  19 + rel="stylesheet" type="text/css" />
  20 +<!-- jsTree 数插件 -->
  21 +<link
  22 + href="/metronic_v4.5.4/plugins/jstree/dist/themes/default/style.min.css"
  23 + rel="stylesheet" type="text/css" />
  24 +<!-- MULTI-select 多选下拉框美化 -->
  25 +<link
  26 + href="/metronic_v4.5.4/plugins/jquery-multi-select/css/multi-select.css"
  27 + rel="stylesheet" type="text/css" />
  28 +
  29 +<!-- editable -->
  30 +<link
  31 + href="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/css/bootstrap-editable.css"
  32 + rel="stylesheet" type="text/css" />
  33 +<!-- METRONIC style -->
  34 +<link href="/metronic_v4.5.4/layout4/css/themes/light.min.css"
  35 + rel="stylesheet" type="text/css" id="style_color" />
  36 +<link href="/metronic_v4.5.4/css/components.css" rel="stylesheet"
  37 + type="text/css" />
  38 +<link href="/metronic_v4.5.4/css/plugins.css" rel="stylesheet"
  39 + type="text/css" />
  40 +<link href="/metronic_v4.5.4/layout4/css/layout.min.css"
  41 + rel="stylesheet" type="text/css" />
  42 +<link href="/metronic_v4.5.4/layout4/css/custom.min.css"
  43 + rel="stylesheet" type="text/css" />
  44 +<!-- select2 下拉框插件 -->
  45 +<link href="/metronic_v4.5.4/plugins/select2/css/select2.min.css"
  46 + rel="stylesheet" type="text/css" />
  47 +<link
  48 + href="/metronic_v4.5.4/plugins/select2/css/select2-bootstrap.min.css"
  49 + rel="stylesheet" type="text/css" />
  50 +<!-- layer 弹层 插件 -->
  51 +<link href="/assets/plugins/layer-v2.4/layer/skin/layer.css"
  52 + rel="stylesheet" type="text/css" />
  53 +<!-- fileinput 上传 插件 -->
  54 +<link href="/assets/plugins/fileinput/css/fileinput.min.css"
  55 + rel="stylesheet" type="text/css" />
  56 +<!-- iCheck 单选框和复选框 -->
  57 +<link href="/metronic_v4.5.4/plugins/icheck/skins/all.css"
  58 + rel="stylesheet" type="text/css" />
  59 +<!-- 日期控件 -->
  60 +<link
  61 + href="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/css/bootstrap-datetimepicker.min.css"
  62 + rel="stylesheet" type="text/css" />
  63 +<!-- table 表格控件 -->
  64 +<link rel="stylesheet"
  65 + href="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.css"
  66 + type="text/css" />
  67 +<link href="/metronic_v4.5.4/plugins/bootstrap-tagsinput/bootstrap-tagsinput.css" rel="stylesheet" type="text/css"/>
  68 +<!-- handsontable样式 -->
  69 +<link rel="stylesheet"
  70 + href="/assets/bower_components/handsontable/dist/handsontable.full.css" />
  71 +<!-- sweetalert样式 -->
  72 +<link rel="stylesheet"
  73 + href="/assets/bower_components/sweetalert/dist/sweetalert.css" />
  74 +<!-- schedule计划调度AngularJS模块主css -->
  75 +<link rel="stylesheet" href="/pages/scheduleApp/module/common/main.css"
  76 + type="text/css" />
  77 + <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" merge="plugins"/>
  78 +
  79 +<!-- CSS动画 -->
  80 +<link
  81 + href="/metronic_v4.5.4/plugins/tipso/css/animate.css"
  82 + rel="stylesheet" type="text/css" />
  83 +
  84 +<!-- 提示工具样式 -->
  85 +<link
  86 + href="/metronic_v4.5.4/plugins/tipso/css/tipso.css"
  87 + rel="stylesheet" type="text/css" />
  88 +
  89 +<style type="text/css">
  90 +.searchForm {
  91 +
  92 +}
  93 +
  94 +.searchForm .form-group .control-label {
  95 + padding-right: 0px;
  96 + text-align: right;
  97 + margin-top: 7px;
  98 +}
  99 +
  100 +.searchForm .form-group>div {
  101 + padding-left: 10px;
  102 + padding-right: 0px;
  103 +}
  104 +
  105 +.searchForm .row>div {
  106 + padding-left: 0px;
  107 + padding-right: 0px;
  108 + padding: 5px 0 5px 0;
  109 + width: 270px;
  110 + display: inline-block;
  111 +}
  112 +
  113 +.searchForm .form-actions {
  114 +
  115 +}
  116 +
  117 +tr.row-active td {
  118 + border-bottom: 1px solid blue !important;
  119 + color: blue;
  120 +}
  121 +
  122 +.ms-container .ms-selectable li.ms-elem-selectable,.ms-container .ms-selection li.ms-elem-selection
  123 + {
  124 + font-size: 14px;
  125 +}
  126 +
  127 +.ms-container .ms-selectable li.ms-elem-selectable,.ms-container .ms-selection li.ms-elem-selection
  128 + {
  129 + padding: 6px 26px;
  130 +}
  131 +
  132 +.ms-container .ms-list {
  133 + height: 306px;
  134 +}
  135 +
  136 +.ms-container .ms-selectable,.ms-container .ms-selection {
  137 + width: 47%;
  138 +}
  139 +
  140 +.ms-container {
  141 + width: 470px;
  142 + margin: auto;
  143 +}
  144 +
  145 +.multi-custom-header-left {
  146 + text-align: center;
  147 + padding: 7px;
  148 + color: #3B3F51;
  149 +}
  150 +
  151 +.multi-custom-header-right {
  152 + text-align: center;
  153 + padding: 7px;
  154 + font-weight: bold;
  155 + color: #36C6D3;
  156 +}
  157 +
  158 +.mt-element-list .list-simple.mt-list-container ul>.mt-list-item>.list-item-content
  159 + {
  160 + padding: 0 55px 0 0px;
  161 +}
  162 +
  163 +.mt-element-list .list-simple.mt-list-container ul>.mt-list-item {
  164 + padding: 3.3px 0;
  165 +}
  166 +
  167 +#route-container {
  168 + display: none;
  169 +}
  170 +
  171 +.page-content.active {
  172 + display: block !important;
  173 +}
  174 +
  175 +.page-header.navbar .page-logo .logo-default {
  176 + margin: 0;
  177 +}
  178 +
  179 +.page-header.navbar .top-menu .navbar-nav>li.dropdown.open .dropdown-toggle
  180 + {
  181 + background-color: #284a99;
  182 +}
  183 +
  184 +.page-header.navbar .page-logo {
  185 + padding-right: 10px;
  186 +}
  187 +
  188 +.page-logo .logo-default.logo-default-text {
  189 + font-weight: 600;
  190 + color: white !important;
  191 + margin-top: 19px !important;
  192 + font-size: 24px;
  193 + text-decoration: none;
  194 +}
  195 +
  196 +.page-logo .logo-default.logo-default-text:HOVER {
  197 + color: #dedede !important;
  198 +}
  199 +
  200 + body,.page-content-wrapper,#pjax-container{
  201 + height: 100%;
  202 + }
  203 + html{
  204 + height: 90%;
  205 + }
  206 + .page-container{
  207 + height: 100%;
  208 + }
  209 +</style>
  210 +
  211 +<!-- ocLazyLoading载入文件的位置 -->
  212 +<link id="ng_load_plugins_before" />
202 213  
203 214 </head>
204 215 <body
205   - class="page-container-bg-solid page-header-fixed page-sidebar-closed-hide-logo page-sidebar-fixed">
206   -<div class="page-header navbar navbar-fixed-top"
207   - style="background: linear-gradient(to bottom, #124e78, #125688);">
208   - <div class="page-header-inner ">
209   - <!-- LOGO -->
210   - <div class="page-logo">
211   - <a href="index.html" class="logo-default logo-default-text">
212   - 闵行公交调度系统 </a>
213   - <div class="menu-toggler sidebar-toggler"></div>
214   - </div>
215   - <!-- END LOGO -->
216   - <a href="javascript:;" class="menu-toggler responsive-toggler"
217   - data-toggle="collapse" data-target=".navbar-collapse"> </a>
218   - <div class="page-top">
219   - <div class="top-menu">
220   - <ul class="nav navbar-nav pull-right">
221   - <!-- 信息通知区 -->
222   - <li
223   - class="dropdown dropdown-extended dropdown-notification dropdown-dark"
224   - id="header_notification_bar"><a href="javascript:;"
225   - class="dropdown-toggle" data-toggle="dropdown"
226   - data-hover="dropdown" data-close-others="true"> <i
227   - class="fa fa-bell"></i> <span class="badge badge-success">
  216 + class="page-container-bg-solid page-header-fixed page-sidebar-closed-hide-logo page-sidebar-fixed">
  217 + <div class="page-header navbar navbar-fixed-top"
  218 + style="background: linear-gradient(to bottom, #124e78, #125688);">
  219 + <div class="page-header-inner ">
  220 + <!-- LOGO -->
  221 + <div class="page-logo">
  222 + <a href="index.html" class="logo-default logo-default-text">
  223 + 闵行公交调度系统 </a>
  224 + <div class="menu-toggler sidebar-toggler"></div>
  225 + </div>
  226 + <!-- END LOGO -->
  227 + <a href="javascript:;" class="menu-toggler responsive-toggler"
  228 + data-toggle="collapse" data-target=".navbar-collapse"> </a>
  229 + <div class="page-top">
  230 + <div class="top-menu">
  231 + <ul class="nav navbar-nav pull-right">
  232 + <!-- 信息通知区 -->
  233 + <li
  234 + class="dropdown dropdown-extended dropdown-notification dropdown-dark"
  235 + id="header_notification_bar"><a href="javascript:;"
  236 + class="dropdown-toggle" data-toggle="dropdown"
  237 + data-hover="dropdown" data-close-others="true"> <i
  238 + class="fa fa-bell"></i> <span class="badge badge-success">
228 239 0 </span>
229   - </a>
230   - <ul class="dropdown-menu" style="max-width: 345px; width: 345px;">
231   - <li class="external">
232   - <h3>
233   - 今日 <span class="bold">0 条</span> 通知
234   - </h3> <a href="javascript:;">查看全部</a>
235   - </li>
236   - <li>
237   - <ul class="dropdown-menu-list scroller" style="height: 250px;"
238   - data-handle-color="#637283">
239   - </ul>
240   - </li>
241   - </ul></li>
242   - <li class="dropdown dropdown-user dropdown-dark"><a
243   - href="javascript:;" class="dropdown-toggle"
244   - data-toggle="dropdown" data-hover="dropdown"
245   - data-close-others="true"> <span id="indexTopUName"
246   - class="username username-hide-on-mobile"
247   - style="vertical-align: middle;"> <i class="fa fa-user"></i></span>
248   - </a>
249   - <ul class="dropdown-menu dropdown-menu-default">
250   - <li><a href="javascript:;"> <i class="fa fa-user"></i>
251   - 我的信息
252   - </a></li>
253   - <li><a href="javascript:;" id="changePWD"> <i
254   - class="fa fa-unlock-alt"></i> 修改密码
255   - </a></li>
256   - <li class="divider"></li>
257   - <li><a href="javascript:;"> <i class="fa fa-lock"></i>
258   - 锁屏
259   - </a></li>
260   - <li><a href="/logout"> <i class="fa fa-key"></i> 注销登陆
261   - </a></li>
262   - </ul></li>
263   - </ul>
264   - </div>
265   - </div>
266   - </div>
267   -</div>
268   -<div class="page-container">
269   - <div class="page-sidebar-wrapper">
270   - <div class="page-sidebar navbar-collapse collapse">
271   - <ul class="page-sidebar-menu page-sidebar-menu-fixed"
272   - data-keep-expanded="false" data-auto-scroll="true"
273   - data-slide-speed="200" id="leftMenuSidebar">
274   - </ul>
275   - </div>
276   - </div>
277   - <div class="page-content-wrapper">
278   - <div id="pjax-container" class="page-content"></div>
279   -
280   - <div id="route-container">
281   - <div ng-app="ScheduleApp">
282   - <div ng-controller="ScheduleAppController">
283   -
284   - <!-- loading widget -->
285   - <div id="loadingWidget" class="flyover mask" loading-widget>
286   - <div class="alert alert-info">
287   - <strong>载入中......</strong>
288   - </div>
289   - </div>
290   -
291   - <div ui-view class="uv"></div>
292   - </div>
293   - </div>
294   - </div>
295   - </div>
296   -</div>
297   -
298   -<script id="menu_list_temp" type="text/html">
  240 + </a>
  241 + <ul class="dropdown-menu" style="max-width: 345px; width: 345px;">
  242 + <li class="external">
  243 + <h3>
  244 + 今日 <span class="bold">0 条</span> 通知
  245 + </h3> <a href="javascript:;">查看全部</a>
  246 + </li>
  247 + <li>
  248 + <ul class="dropdown-menu-list scroller" style="height: 250px;"
  249 + data-handle-color="#637283">
  250 + </ul>
  251 + </li>
  252 + </ul></li>
  253 + <li class="dropdown dropdown-user dropdown-dark"><a
  254 + href="javascript:;" class="dropdown-toggle"
  255 + data-toggle="dropdown" data-hover="dropdown"
  256 + data-close-others="true"> <span id="indexTopUName"
  257 + class="username username-hide-on-mobile"
  258 + style="vertical-align: middle;"> <i class="fa fa-user"></i></span>
  259 + </a>
  260 + <ul class="dropdown-menu dropdown-menu-default">
  261 + <li><a href="javascript:;"> <i class="fa fa-user"></i>
  262 + 我的信息
  263 + </a></li>
  264 + <li><a href="javascript:;" id="changePWD"> <i
  265 + class="fa fa-unlock-alt"></i> 修改密码
  266 + </a></li>
  267 + <li class="divider"></li>
  268 + <li><a href="javascript:;"> <i class="fa fa-lock"></i>
  269 + 锁屏
  270 + </a></li>
  271 + <li><a href="/logout"> <i class="fa fa-key"></i> 注销登陆
  272 + </a></li>
  273 + </ul></li>
  274 + </ul>
  275 + </div>
  276 + </div>
  277 + </div>
  278 + </div>
  279 + <div class="page-container">
  280 + <div class="page-sidebar-wrapper">
  281 + <div class="page-sidebar navbar-collapse collapse">
  282 + <ul class="page-sidebar-menu page-sidebar-menu-fixed"
  283 + data-keep-expanded="false" data-auto-scroll="true"
  284 + data-slide-speed="200" id="leftMenuSidebar">
  285 + </ul>
  286 + </div>
  287 + </div>
  288 + <div class="page-content-wrapper">
  289 + <div id="pjax-container" class="page-content"></div>
  290 +
  291 + <div id="route-container">
  292 + <div ng-app="ScheduleApp">
  293 + <div ng-controller="ScheduleAppController">
  294 +
  295 + <!-- loading widget -->
  296 + <div id="loadingWidget" class="flyover mask" loading-widget>
  297 + <div class="alert alert-info">
  298 + <strong>载入中......</strong>
  299 + </div>
  300 + </div>
  301 +
  302 + <div ui-view class="uv"></div>
  303 + </div>
  304 + </div>
  305 + </div>
  306 + </div>
  307 + </div>
  308 +
  309 + <script id="menu_list_temp" type="text/html">
299 310 {{each list as group i}}
300 311 <li class="heading">
301 312 <h3 class="uppercase">{{group.name}}</h3>
... ... @@ -327,83 +338,83 @@
327 338 {{/each}}
328 339  
329 340 </script>
330   -<script>
  341 + <script>
331 342 delete window.require;
332 343 delete window.exports;
333 344 delete window.module;
334 345 </script>
335   -<!-- jQuery -->
336   -<script src="/metronic_v4.5.4/plugins/jquery.min.js" data-exclude=1></script>
337   -<!-- bootstrap -->
338   -<script src="/metronic_v4.5.4/plugins/bootstrap/js/bootstrap.min.js"
339   - data-exclude=1></script>
340   -<script src="/pages/forms/statement/js/jquery.autocompleter.js"></script>
341   -<script src="/pages/forms/statement/js/jquery.PrintArea.js"></script>
342   -<!-- MTRONIC JS -->
343   -<script src="/metronic_v4.5.4/scripts/app.min.js" data-exclude=1></script>
344   -<script src="/metronic_v4.5.4/layout4/scripts/layout.min.js"
345   - data-exclude=1></script>
346   -<!-- 虚拟滚动条 -->
347   -<script
348   - src="/metronic_v4.5.4/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
349   -<!-- jsTree 树插件 -->
350   -<script src="/metronic_v4.5.4/plugins/jstree/dist/jstree.min.js"></script>
351   -<!-- bootstrap-hover-dropDown -->
352   -<script
353   - src="/metronic_v4.5.4/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"></script>
354   -<!-- jquery.validate 表单验证 -->
355   -<script
356   - src="/metronic_v4.5.4/plugins/jquery-validation/js/jquery.validate.min.js"></script>
357   -<script
358   - src="/metronic_v4.5.4/plugins/jquery-validation/js/localization/messages_zh.js"></script>
359   -<!-- 向导式插件 -->
360   -<script
361   - src="/metronic_v4.5.4//plugins/bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script>
362   -<!-- iCheck 单选框和复选框 -->
363   -<script src="/metronic_v4.5.4/plugins/icheck/icheck.min.js"></script>
364   -<!-- select2 下拉框 -->
365   -<script src="/metronic_v4.5.4/plugins/select2/js/select2.full.min.js"></script>
366   -<!-- MULTI SELECT 多选下拉框 -->
367   -<script
368   - src="/metronic_v4.5.4/plugins/jquery-multi-select/js/jquery.multi-select.js"></script>
369   -<!-- editable.js -->
370   -<script
371   - src="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.min.js"></script>
372   -<!-- PJAX -->
373   -<script src="/assets/plugins/jquery.pjax.js"></script>
374   -<!-- layer 弹层 -->
375   -<script src="/assets/plugins/layer-v2.4/layer/layer.js" data-exclude=1></script>
376   -<!-- fileinput 上传 -->
377   -<script src="/assets/plugins/fileinput/canvas-to-blob.min.js"></script>
378   -<script src="/assets/plugins/fileinput/purify.min.js"></script>
379   -<script src="/assets/plugins/fileinput/sortable.min.js"></script>
380   -<script src="/assets/plugins/fileinput/fileinput.min.js"></script>
381   -<script src="/assets/plugins/fileinput/fileinput_locale_zh.js"></script>
382   -<!-- jquery.purl URL解析 -->
383   -<script src="/assets/plugins/purl.js"></script>
384   -<!-- jquery.serializejson JSON序列化插件 -->
385   -<script src="/assets/plugins/jquery.serializejson.js"></script>
386   -<!-- art-template 模版引擎 -->
387   -<script src="/assets/plugins/template.js"></script>
388   -<!-- jquery.pageinator 分页 -->
389   -<script src="/assets/plugins/jqPaginator.min.js"></script>
390   -<!-- moment.js 日期处理类库 -->
391   -<script src="/assets/plugins/moment-with-locales.js"></script>
392   -
393   -<script src="/assets/plugins/pinyin.js"></script>
394   -<!-- 日期控件 -->
395   -<script
396   - src="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/js/bootstrap-datetimepicker.min.js"></script>
397   -<!-- 表格控件 -->
398   -<script src="/metronic_v4.5.4/plugins/bootstrap-tagsinput/bootstrap-tagsinput.min.js"></script>
399   -<!-- 统计图控件 -->
400   -<!--<script src="/assets/global/getEchart.js"></script>
401   -<script src="/assets/global/echarts.js"></script> -->
402   -<script src="/assets/js/common.js"></script>
403   -<script src="/assets/js/dictionary.js"></script>
404   -<!-- tipso JS -->
405   -<script src="/metronic_v4.5.4/plugins/tipso/js/tipso.js"></script>
406   -<script data-exclude=1>
  346 + <!-- jQuery -->
  347 + <script src="/metronic_v4.5.4/plugins/jquery.min.js" data-exclude=1></script>
  348 + <!-- bootstrap -->
  349 + <script src="/metronic_v4.5.4/plugins/bootstrap/js/bootstrap.min.js"
  350 + data-exclude=1></script>
  351 + <script src="/pages/forms/statement/js/jquery.autocompleter.js"></script>
  352 + <script src="/pages/forms/statement/js/jquery.PrintArea.js"></script>
  353 + <!-- MTRONIC JS -->
  354 + <script src="/metronic_v4.5.4/scripts/app.min.js" data-exclude=1></script>
  355 + <script src="/metronic_v4.5.4/layout4/scripts/layout.min.js"
  356 + data-exclude=1></script>
  357 + <!-- 虚拟滚动条 -->
  358 + <script
  359 + src="/metronic_v4.5.4/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script>
  360 + <!-- jsTree 树插件 -->
  361 + <script src="/metronic_v4.5.4/plugins/jstree/dist/jstree.min.js"></script>
  362 + <!-- bootstrap-hover-dropDown -->
  363 + <script
  364 + src="/metronic_v4.5.4/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"></script>
  365 + <!-- jquery.validate 表单验证 -->
  366 + <script
  367 + src="/metronic_v4.5.4/plugins/jquery-validation/js/jquery.validate.min.js"></script>
  368 + <script
  369 + src="/metronic_v4.5.4/plugins/jquery-validation/js/localization/messages_zh.js"></script>
  370 + <!-- 向导式插件 -->
  371 + <script
  372 + src="/metronic_v4.5.4//plugins/bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script>
  373 + <!-- iCheck 单选框和复选框 -->
  374 + <script src="/metronic_v4.5.4/plugins/icheck/icheck.min.js"></script>
  375 + <!-- select2 下拉框 -->
  376 + <script src="/metronic_v4.5.4/plugins/select2/js/select2.full.min.js"></script>
  377 + <!-- MULTI SELECT 多选下拉框 -->
  378 + <script
  379 + src="/metronic_v4.5.4/plugins/jquery-multi-select/js/jquery.multi-select.js"></script>
  380 + <!-- editable.js -->
  381 + <script
  382 + src="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.min.js"></script>
  383 + <!-- PJAX -->
  384 + <script src="/assets/plugins/jquery.pjax.js"></script>
  385 + <!-- layer 弹层 -->
  386 + <script src="/assets/plugins/layer-v2.4/layer/layer.js" data-exclude=1></script>
  387 + <!-- fileinput 上传 -->
  388 + <script src="/assets/plugins/fileinput/canvas-to-blob.min.js"></script>
  389 + <script src="/assets/plugins/fileinput/purify.min.js"></script>
  390 + <script src="/assets/plugins/fileinput/sortable.min.js"></script>
  391 + <script src="/assets/plugins/fileinput/fileinput.min.js"></script>
  392 + <script src="/assets/plugins/fileinput/fileinput_locale_zh.js"></script>
  393 + <!-- jquery.purl URL解析 -->
  394 + <script src="/assets/plugins/purl.js"></script>
  395 + <!-- jquery.serializejson JSON序列化插件 -->
  396 + <script src="/assets/plugins/jquery.serializejson.js"></script>
  397 + <!-- art-template 模版引擎 -->
  398 + <script src="/assets/plugins/template.js"></script>
  399 + <!-- jquery.pageinator 分页 -->
  400 + <script src="/assets/plugins/jqPaginator.min.js"></script>
  401 + <!-- moment.js 日期处理类库 -->
  402 + <script src="/assets/plugins/moment-with-locales.js"></script>
  403 +
  404 + <script src="/assets/plugins/pinyin.js"></script>
  405 + <!-- 日期控件 -->
  406 + <script
  407 + src="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/js/bootstrap-datetimepicker.min.js"></script>
  408 + <!-- 表格控件 -->
  409 + <script src="/metronic_v4.5.4/plugins/bootstrap-tagsinput/bootstrap-tagsinput.min.js"></script>
  410 + <!-- 统计图控件 -->
  411 + <!--<script src="/assets/global/getEchart.js"></script>
  412 + <script src="/assets/global/echarts.js"></script> -->
  413 + <script src="/assets/js/common.js"></script>
  414 + <script src="/assets/js/dictionary.js"></script>
  415 + <!-- tipso JS -->
  416 + <script src="/metronic_v4.5.4/plugins/tipso/js/tipso.js"></script>
  417 + <script data-exclude=1>
407 418 //初始打开的片段地址
408 419 var initFragment = "^_^initFragment^_^";
409 420 //静态文件目录
... ... @@ -545,79 +556,82 @@
545 556 }
546 557  
547 558 </script>
548   -<!-- d3 -->
549   -<script src="/assets/js/d3.min.js" data-exclude=1></script>
550   -<!-- webSocket JS -->
551   -<script src="/assets/js/sockjs.min.js"></script>
552   -
553   -<!-- TODO:angularJS相关库 -->
554   -
555   -<!-- angularJS相关库 -->
556   -<!-- 这个是基于angularjs 1.4.10修改的版本,主要是修改了history控制部分,用于兼容route和pjax的同时操作history的冲突 -->
557   -<script src="/assets/js/angular.js" data-autocephaly=1></script>
558   -<script src="/assets/bower_components/angular-i18n/angular-locale_zh-cn.js" data-autocephaly=1></script>
559   -<script
560   - src="/assets/bower_components/angular-resource/angular-resource.min.js"
561   - data-exclude=1></script>
562   -<script
563   - src="/assets/bower_components/angular-sanitize/angular-sanitize.min.js"
564   - data-exclude=1></script>
565   -<script
  559 + <!-- d3 -->
  560 + <script src="/assets/js/d3.min.js" data-exclude=1></script>
  561 + <!-- webSocket JS -->
  562 + <script src="/assets/js/sockjs.min.js"></script>
  563 +
  564 + <!-- TODO:angularJS相关库 -->
  565 +
  566 + <!-- angularJS相关库 -->
  567 + <!-- 这个是基于angularjs 1.4.10修改的版本,主要是修改了history控制部分,用于兼容route和pjax的同时操作history的冲突 -->
  568 + <script src="/assets/js/angular.js" data-autocephaly=1></script>
  569 + <script src="/assets/bower_components/angular-i18n/angular-locale_zh-cn.js" data-autocephaly=1></script>
  570 + <script
  571 + src="/assets/bower_components/angular-resource/angular-resource.min.js"
  572 + data-exclude=1></script>
  573 + <script
  574 + src="/assets/bower_components/angular-sanitize/angular-sanitize.min.js"
  575 + data-exclude=1></script>
  576 + <script
566 577 src="/assets/bower_components/angular-animate/angular-animate.min.js"
567 578 data-exclude=1></script>
568   -<script
569   - src="/assets/bower_components/angular-touch/angular-touch.min.js"
570   - data-exclude=1></script>
571   -<script
572   - src="/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js"
573   - data-exclude=1></script>
574   -<script
575   - src="/assets/bower_components/oclazyload/dist/ocLazyLoad.min.js"
576   - data-exclude=1></script>
577   -<script
578   - src="/assets/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"
579   - data-exclude=1></script>
580   -<!-- handsontable相关js -->
581   -<script
582   - src="/assets/bower_components/handsontable/dist/handsontable.full.js"></script>
583   -<script
584   - src="/assets/bower_components/ngHandsontable/dist/ngHandsontable.js"></script>
585   -<!-- sweetalert相关js -->
586   -<script src="/assets/bower_components/sweetalert/dist/sweetalert.min.js"></script>
587   -<script src="/assets/bower_components/ng-sweet-alert/ng-sweet-alert.js"></script>
588   -
589   -<!-- schedule计划调度AngularJS模块主JS -->
590   -<script src="/pages/scheduleApp/module/common/main.js" data-exclude=1></script>
591   -<script
592   - src="/pages/scheduleApp/module/common/prj-common-globalservice.js"
593   - data-exclude=1></script>
594   -<script src="/pages/scheduleApp/module/common/prj-common-filter.js"
595   - data-exclude=1></script>
596   -<script src="/pages/scheduleApp/module/common/prj-common-directive.js"
597   - data-exclude=1></script>
598   -<script
599   - src="/pages/scheduleApp/module/common/prj-common-ui-route-state.js"
600   - data-exclude=1></script>
601   -
602   -<!-- 地图相关 -->
603   -<!-- 百度 -->
604   -<script
605   - src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"
606   - data-exclude=1></script>
607   -<script
608   - src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js"
609   - data-exclude=1></script>
610   -<script type="text/javascript"
611   - src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js"
612   - data-exclude=1></script>
613   -<script type="text/javascript"
614   - src="http://api.map.baidu.com/library/RichMarker/1.2/src/RichMarker_min.js "
615   - data-exclude=1></script>
616   -<script src="/assets/js/baidu/TextIconOverlay.js" data-exclude=1></script>
617   -<script src="/assets/js/baidu//MarkerClusterer.js" data-exclude=1></script>
618   -<!-- 高德 -->
619   -<script
620   - src="http://webapi.amap.com/maps?v=1.3&key=16cb1c5043847e09ef9edafdd77befda"
621   - data-exclude=1></script>
  579 + <script
  580 + src="/assets/bower_components/angular-touch/angular-touch.min.js"
  581 + data-exclude=1></script>
  582 + <script
  583 + src="/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js"
  584 + data-exclude=1></script>
  585 + <script
  586 + src="/assets/bower_components/oclazyload/dist/ocLazyLoad.min.js"
  587 + data-exclude=1></script>
  588 + <script
  589 + src="/assets/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js"
  590 + data-exclude=1></script>
  591 + <!-- handsontable相关js -->
  592 + <script
  593 + src="/assets/bower_components/handsontable/dist/handsontable.full.js"></script>
  594 + <script
  595 + src="/assets/bower_components/ngHandsontable/dist/ngHandsontable.js"></script>
  596 + <!-- sweetalert相关js -->
  597 + <script src="/assets/bower_components/sweetalert/dist/sweetalert.min.js"></script>
  598 + <script src="/assets/bower_components/ng-sweet-alert/ng-sweet-alert.js"></script>
  599 +
  600 + <!-- schedule计划调度AngularJS模块主JS -->
  601 + <script src="/pages/scheduleApp/module/common/main.js" data-exclude=1></script>
  602 + <script
  603 + src="/pages/scheduleApp/module/common/prj-common-globalservice.js"
  604 + data-exclude=1></script>
  605 + <script src="/pages/scheduleApp/module/common/prj-common-filter.js"
  606 + data-exclude=1></script>
  607 + <script src="/pages/scheduleApp/module/common/prj-common-directive.js"
  608 + data-exclude=1></script>
  609 + <script
  610 + src="/pages/scheduleApp/module/common/prj-common-ui-route-state.js"
  611 + data-exclude=1></script>
  612 +
  613 + <!-- 地图相关 -->
  614 + <!-- 百度 -->
  615 + <script
  616 + src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"
  617 + data-exclude=1></script>
  618 + <script
  619 + src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js"
  620 + data-exclude=1></script>
  621 + <script type="text/javascript"
  622 + src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js"
  623 + data-exclude=1></script>
  624 + <script type="text/javascript"
  625 + src="http://api.map.baidu.com/library/RichMarker/1.2/src/RichMarker_min.js "
  626 + data-exclude=1></script>
  627 + <script src="/assets/js/baidu/TextIconOverlay.js" data-exclude=1></script>
  628 + <script src="/assets/js/baidu//MarkerClusterer.js" data-exclude=1></script>
  629 + <!-- 高德 -->
  630 + <script
  631 + src="http://webapi.amap.com/maps?v=1.3&key=16cb1c5043847e09ef9edafdd77befda"
  632 + data-exclude=1></script>
  633 +
  634 + <script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" merge="plugins"></script>
  635 +
622 636 </body>
623 637 </html>
624 638 \ No newline at end of file
... ...
src/main/resources/static/pages/base/line/js/line-edit-form.js
... ... @@ -100,7 +100,6 @@
100 100 selectTemp(function(){
101 101 /** 根据ID查询详细信息 */
102 102 $get('/line/' + lineId ,null, function(result){
103   - debugger;
104 103 // 如果不为空
105 104 if(result) {
106 105 // 定义日期格式
... ... @@ -244,20 +243,6 @@
244 243 if(lineCode[0].id == lineId) {
245 244 // 提交
246 245 submit();
247   - } else {
248   - /*// 定义已有的线路编码
249   - var oldCode = params.lineCode;
250   - // 重新设置提交参数线路编码值
251   - params.lineCode = lineId;
252   - // 弹出选择框;确认则提交;取消则返回
253   - layer.confirm('线路编码【'+oldCode+'】已存在!自动顺延为如下:<br>线路编码:'+lineId, {
254   - btn : [ '确认提示并提交', '取消' ]
255   - }, submit);
256   - */
257   - layer.open({
258   - title: '消息提示'
259   - ,content: '线路编码【'+params.lineCode+'】已存在,请重新输入编码!'
260   - });
261 246 }
262 247 } else {
263 248 // 提交
... ... @@ -267,16 +252,16 @@
267 252 // 提交
268 253 function submit() {
269 254 // 添加数据
270   - $post('/line', params, function(result) {
  255 + $post('/line/update', params, function(result) {
271 256 // 如果返回结果不为空
272 257 if(result){
273 258 // 返回状态码为"SUCCESS" ,则添加成功;返回状态码为"ERROR" ,则添加失败
274 259 if(result.status=='SUCCESS') {
275 260 // 弹出添加成功提示消息
276   - layer.msg('添加成功...');
  261 + layer.msg('修改成功...');
277 262 } else if(result.status=='ERROR') {
278 263 // 弹出添加失败提示消息
279   - layer.msg('添加失败...');
  264 + layer.msg('修改失败...');
280 265 }
281 266 }
282 267 // 返回list.html页面
... ...
src/main/resources/static/pages/base/station/js/station-list-edit.js
... ... @@ -7,6 +7,8 @@
7 7 */
8 8  
9 9 (function(){
  10 + // 关闭左侧栏
  11 + if (!$('body').hasClass('page-sidebar-closed')) {$('.menu-toggler.sidebar-toggler').click();}
10 12 // 获取参站点路由路ID
11 13 var no = [];
12 14 no = $.url().param('no').split(",");
... ...
src/main/resources/static/pages/base/timesmodel/js/strategy/strategy-headway.js
... ... @@ -500,4 +500,5 @@ var StrategyHeadway = function() {
500 500 };
501 501  
502 502 return headWayF;
  503 +
503 504 }();
504 505 \ No newline at end of file
... ...
src/main/resources/static/pages/electricity/list/list.html
... ... @@ -190,7 +190,7 @@
190 190  
191 191 </td>
192 192 <td>
193   - {{obj.jsy}}
  193 + {{obj.jsy}}/{{obj.name}}
194 194 </td>
195 195 <td>
196 196  
... ...
src/main/resources/static/pages/forms/mould/jobSummary.xls
No preview for this file type
src/main/resources/static/pages/forms/statement/jobSummary.html
... ... @@ -121,69 +121,9 @@
121 121 <td colspan="3">6:31~8:30</td>
122 122 <td colspan="3">16:01~18:00</td>
123 123 </tr>
124   - <tr>
125   - <td colspan="2">班次</td>
126   - <td><label id="jhbc"></label></td>
127   - <td><label id="sjbc"></label></td>
128   - <td colspan="3">&nbsp;</td>
129   - <td colspan="3">&nbsp;</td>
130   - </tr>
131   - <tr>
132   - <td colspan="2">公里</td>
133   - <td><label id="jhgl"></label></td>
134   - <td><label id="sjgl"></label></td>
135   - <td colspan="3">&nbsp;</td>
136   - <td colspan="3">&nbsp;</td>
137   - </tr>
138   - <tr>
139   - <td colspan="2">临加</td>
140   - <td>&nbsp;</td>
141   - <td><label id="sjljgl"></label></td>
142   - <td colspan="3">&nbsp;</td>
143   - <td colspan="3">&nbsp;</td>
144   - </tr>
145   - <tr>
146   - <td colspan="2">上行快误点</td>
147   - <td>&nbsp;</td>
148   - <td>&nbsp;</td>
149   - <td colspan="3">&nbsp;</td>
150   - <td colspan="3">&nbsp;</td>
151   - </tr>
152   - <tr>
153   - <td colspan="2">上行慢误点</td>
154   - <td>&nbsp;</td>
155   - <td>&nbsp;</td>
156   - <td colspan="3">&nbsp;</td>
157   - <td colspan="3">&nbsp;</td>
158   - </tr>
159   - <tr>
160   - <td colspan="2">下行快误点</td>
161   - <td>&nbsp;</td>
162   - <td>&nbsp;</td>
163   - <td colspan="3">&nbsp;</td>
164   - <td colspan="3">&nbsp;</td>
165   - </tr>
166   - <tr>
167   - <td colspan="2">下行慢误点</td>
168   - <td>&nbsp;</td>
169   - <td>&nbsp;</td>
170   - <td colspan="3">&nbsp;</td>
171   - <td colspan="3">&nbsp;</td>
172   - </tr>
173   - <tr>
174   - <td colspan="2">放班班次</td>
175   - <td>&nbsp;</td>
176   - <td>&nbsp;</td>
177   - <td colspan="3">&nbsp;</td>
178   - <td colspan="3">&nbsp;</td>
179   - </tr>
180   - <tr>
181   - <td colspan="2">调头班次</td>
182   - <td>&nbsp;</td>
183   - <td>&nbsp;</td>
184   - <td colspan="3">&nbsp;</td>
185   - <td colspan="3">&nbsp;</td>
186   - </tr>
  124 + <tbody class="list_xxsj">
  125 +
  126 + </tbody>
187 127 </table>
188 128 </div>
189 129 </div>
... ... @@ -327,25 +267,16 @@
327 267 })
328 268  
329 269 $get('/report/jobLjqk',{line:line,date:date},function(result){
330   - var list_lbqk = template('list_ljqk',{list:result});
  270 + var list_ljqk = template('list_ljqk',{list:result});
331 271 // 把渲染好的模版html文本追加到表格中
332   - $('#forms .list_ljqk').html(list_lbqk);
  272 + $('#forms .list_ljqk').html(list_ljqk);
333 273 })
334 274  
335 275 $get('/report/jobHzxx',{line:line,date:date},function(result){
336   - $("#jhbc").html(result.jhbc);
337   - $("#sjbc").html(result.sjbc)
338   - $("#jhgl").html(result.jhgl);
339   - $("#sjgl").html(result.sjgl)
340   - $("#sjljgl").html(result.ljgl);
341   -
342   - //临加
343   - $("#ljbcs").html(result.ljbc);
344   - $("#ljgls").html(result.ljgl)
345   -
346   - //烂班
347   - $("#lbbcs").html(result.lbbc);
348   - $("#lbgls").html(result.lbgl)
  276 + console
  277 + var list_xxsj=template('list_xxsj',result);
  278 + $('#forms .list_xxsj').html(list_xxsj);
  279 +
349 280 })
350 281  
351 282 }
... ... @@ -413,3 +344,69 @@
413 344 </tr>
414 345 {{/if}}
415 346 </script>
  347 +
  348 +<script type="text/html" id="list_xxsj">
  349 + <tr>
  350 + <td colspan="2">班次</td>
  351 + <td>{{jhbc}}</td>
  352 + <td>{{sjbc}}</td>
  353 + <td colspan="3">{{sjbczgf}}</td>
  354 + <td colspan="3">{{sjbcwgf}}</td>
  355 + </tr>
  356 + <tr>
  357 + <td colspan="2">公里</td>
  358 + <td>{{jhgl}}</td>
  359 + <td>{{sjgl}}</td>
  360 + <td colspan="3">{{sjglzgf}}</td>
  361 + <td colspan="3">{{sjglwgf}}</td>
  362 + </tr>
  363 + <tr>
  364 + <td colspan="2">临加</td>
  365 + <td>&nbsp;</td>
  366 + <td>{{ljgl}}</td>
  367 + <td colspan="3">{{ljglzgf}}</td>
  368 + <td colspan="3">{{ljglwgf}}</td>
  369 + </tr>
  370 + <tr>
  371 + <td colspan="2">上行快误点</td>
  372 + <td>&nbsp;</td>
  373 + <td>{{sxk}}</td>
  374 + <td colspan="3">{{sxkzgf}}</td>
  375 + <td colspan="3">{{sxkwgf}}</td>
  376 + </tr>
  377 + <tr>
  378 + <td colspan="2">上行慢误点</td>
  379 + <td></td>
  380 + <td>{{sxm}}</td>
  381 + <td colspan="3">{{sxmzgf}}</td>
  382 + <td colspan="3">{{sxmwgf}}</td>
  383 + </tr>
  384 + <tr>
  385 + <td colspan="2">下行快误点</td>
  386 + <td>&nbsp;</td>
  387 + <td>{{xxk}}</td>
  388 + <td colspan="3">{{xxkzgf}}</td>
  389 + <td colspan="3">{{xxkwgf}}</td>
  390 + </tr>
  391 + <tr>
  392 + <td colspan="2">下行慢误点</td>
  393 + <td>&nbsp;</td>
  394 + <td>{{xxm}}</td>
  395 + <td colspan="3">{{xxmzgf}}</td>
  396 + <td colspan="3">{{xxmwgf}}</td>
  397 + </tr>
  398 + <tr>
  399 + <td colspan="2">放班班次</td>
  400 + <td>{{jhfbbc}}</td>
  401 + <td>{{sjfbbc}}</td>
  402 + <td colspan="3">{{sjfbbczgf}}</td>
  403 + <td colspan="3">{{sjfbbcwgf}}</td>
  404 + </tr>
  405 + <tr>
  406 + <td colspan="2">调头班次</td>
  407 + <td>{{jhdtbc}}</td>
  408 + <td>{{sjdtbc}}</td>
  409 + <td colspan="3">{{sjdtbczgf}}</td>
  410 + <td colspan="3">{{sjdtbcwgf}}</td>
  411 + </tr>
  412 +</script>
... ...
src/main/resources/static/pages/mforms/singledatas/singledata.html
... ... @@ -221,7 +221,7 @@
221 221 <td>{{i+1}}</td>
222 222 <td>{{obj.rQ}}</td>
223 223 <td>{{obj.gS}}</td>
224   - <td>{{obj.xL}}</td>
  224 + <td>{{obj.xlmc}}</td>
225 225 <td>{{obj.clzbh}}</td>
226 226 <td>{{obj.jsy}}</td>
227 227 <td>{{obj.jName}}</td>
... ...
src/main/resources/static/pages/oil/list_ph.html
... ... @@ -1049,8 +1049,7 @@ onkeyup=&quot;this.value=this.value.replace(/[^(\d||/.)]/g,&#39;&#39;).replace(&#39;.&#39;,&#39;$#$&#39;).rep
1049 1049 }
1050 1050 function moveDown(){
1051 1051 var row=mouseInfo["row"];
1052   - var col=mouseInfo["col"];
1053   -
  1052 + var col=mouseInfo["col"];
1054 1053 var key=moveArray[parseInt(row)+1][col];
1055 1054 if(document.getElementById(key)!=undefined)
1056 1055 {
... ...
src/main/resources/static/pages/summary/excel/快慢误点报表.xls 0 → 100644
No preview for this file type
src/main/resources/static/pages/summary/fast_and_slow/data.html
1 1 <div class="ct_data_body_wrap">
2 2 <div class="uk-card uk-card-default uk-card-body ct_rq_left">
3   - <ul uk-scrollspy-nav="closest: li; scroll: true; offset: 100"
4   - class="uk-nav uk-nav-default tm-nav uk-nav-parent-icon">
5   - <li class="uk-active"><a href="#table_20171010">2017-10-10</a></li>
6   - <li><a href="#table_20171011">2017-10-11</a></li>
7   - <li><a href="#table_20171012">2017-10-12</a></li>
8   - <li><a href="#table_20171013">2017-10-13</a></li>
9   - <li><a href="#table_20171014">2017-10-14</a></li>
10   - <li><a href="#table_20171015">2017-10-15</a></li>
11   - <li><a href="#table_20171016">2017-10-16</a></li>
12   - </ul>
  3 + <ul uk-scrollspy-nav="closest: li; scroll: true; offset: 285" class="uk-nav uk-nav-default tm-nav uk-nav-parent-icon"></ul>
13 4 </div>
14 5  
15   - <div class="uk-card uk-card-default uk-card-body ct_right_tables">
16   - <div id="table_20171010">
17   - <table>
  6 + <div class="uk-card uk-card-default uk-card-body ct_right_tables" >
18 7  
19   - </table>
20   - </div>
21 8 </div>
22 9  
  10 + <script id="fast_and_slow_left_rq_temp" type="text/html">
  11 + {{each listMap as obj k}}
  12 + <li><a href="#table_{{k}}">{{k}}</a></li>
  13 + {{/each}}
  14 + </script>
  15 +
  16 + <script id="fast_and_slow_right_body_temp" type="text/html">
  17 + <div>
  18 + <div class="data_table_wrap head">
  19 + <table cellspacing="1" class="data_table">
  20 + <col />
  21 + <col width="14%"/>
  22 + <col width="4%"/>
  23 + <col width="6%"/>
  24 + <col width="6%"/>
  25 + <col width="6%"/>
  26 + <col width="5%"/>
  27 + <col width="5%"/>
  28 + <col width="5%"/>
  29 + <col width="5%"/>
  30 + <col width="6%"/>
  31 + <col width="6%"/>
  32 + <col width="6%"/>
  33 + <col width="5%"/>
  34 + <col width="5%"/>
  35 + <col width="5%"/>
  36 + <col width="5%"/>
  37 + <tr>
  38 + <td rowspan="3">序号</td>
  39 + <td rowspan="3">发车站点</td>
  40 + <td rowspan="3">方向</td>
  41 + <td colspan="7">发车时间</td>
  42 + <td colspan="7">到达时间</td>
  43 + </tr>
  44 + <tr>
  45 + <td rowspan="2">计划发车<br>时间</td>
  46 + <td rowspan="2">待发发车<br>时间</td>
  47 + <td rowspan="2">实际发车<br>时间</td>
  48 + <td colspan="2">计划</td>
  49 + <td colspan="2">待发</td>
  50 + <td rowspan="2">计划应到<br>时间</td>
  51 + <td rowspan="2">待发应到<br>时间</td>
  52 + <td rowspan="2">实际到达<br>时间</td>
  53 + <td colspan="2">计划</td>
  54 + <td colspan="2">待发</td>
  55 + </tr>
  56 + <tr>
  57 + <td>快</td>
  58 + <td>慢</td>
  59 + <td>快</td>
  60 + <td>慢</td>
  61 + <td>快</td>
  62 + <td>慢</td>
  63 + <td>快</td>
  64 + <td>慢</td>
  65 + </tr>
  66 + </table>
  67 + </div>
  68 + {{each listMap as obj k}}
  69 + <h4><a>{{k}}</a></h4>
  70 + <div class="data_table_wrap data" id="table_{{k}}">
  71 + <table cellspacing="1" class="data_table">
  72 + <col />
  73 + <col width="14%"/>
  74 + <col width="4%"/>
  75 + <col width="6%"/>
  76 + <col width="6%"/>
  77 + <col width="6%"/>
  78 + <col width="5%"/>
  79 + <col width="5%"/>
  80 + <col width="5%"/>
  81 + <col width="5%"/>
  82 + <col width="6%"/>
  83 + <col width="6%"/>
  84 + <col width="6%"/>
  85 + <col width="5%"/>
  86 + <col width="5%"/>
  87 + <col width="5%"/>
  88 + <col width="5%"/>
  89 + {{each listMap[k] as obj i}}
  90 + <tr>
  91 + <td>{{i+1}}</td>
  92 + <td>{{obj.stationName}}</td>
  93 + <td class="cell_dir_{{obj.upDown}}">{{obj.upDown==0?"上行":"下行"}}</td>
  94 + <td>{{obj.fcsj}}</td>
  95 + <td>{{obj.dfsj}}</td>
  96 + <td>{{obj.fcsjActual}}</td>
  97 + <td>{{obj.fcsjFast}}</td>
  98 + <td>{{obj.fcsjSlow}}</td>
  99 + <td>{{obj.dfsjFast}}</td>
  100 + <td>{{obj.dfsjSlow}}</td>
  101 + <td>{{obj.zdsj}}</td>
  102 + <td>{{obj.zdsjDf}}</td>
  103 + <td>{{obj.zdsjActual}}</td>
  104 + <td>{{obj.zdsjFast}}</td>
  105 + <td>{{obj.zdsjSlow}}</td>
  106 + <td>{{obj.zdsjDfFast}}</td>
  107 + <td>{{obj.zdsjDfSlow}}</td>
  108 + </tr>
  109 + {{/each}}
  110 + <tr>
  111 + <td rowspan="4">合计:</td>
  112 + <td colspan="8" class="count_col">发车:上行(计划快误点:<a class="c_c_0">{{countMap[k][0]['fast'][0]}}</a> &nbsp;累计时间:<a class="c_c_0">{{timeCountMap[k][0]['fast'][0]}}</a> &nbsp;待发快误点:<a class="c_c_0">{{countMap[k][0]['fast'][1]}}</a> &nbsp;累计时间:<a class="c_c_0">{{timeCountMap[k][0]['fast'][1]}}</a>)</td>
  113 + <td colspan="8" class="count_col">发车:下行(计划快误点:<a class="c_c_1">{{countMap[k][1]['fast'][0]}}</a> &nbsp;累计时间:<a class="c_c_1">{{timeCountMap[k][1]['fast'][0]}}</a> 待发快误点:<a class="c_c_1">{{countMap[k][1]['fast'][1]}}</a> &nbsp;累计时间:<a class="c_c_1">{{timeCountMap[k][1]['fast'][1]}}</a>)</td>
  114 + </tr>
  115 + <tr>
  116 + <td colspan="8" class="count_col">发车:上行(计划慢误点:<a class="c_c_0">{{countMap[k][0]['slow'][0]}}</a> &nbsp;累计时间:<a class="c_c_0">{{timeCountMap[k][0]['slow'][0]}}</a> &nbsp;待发慢误点:<a class="c_c_0">{{countMap[k][0]['slow'][1]}}</a> &nbsp;累计时间:<a class="c_c_0">{{timeCountMap[k][0]['slow'][1]}}</a>)</td>
  117 + <td colspan="8" class="count_col">发车:下行(计划慢误点:<a class="c_c_1">{{countMap[k][1]['slow'][0]}}</a> &nbsp;累计时间:<a class="c_c_1">{{timeCountMap[k][1]['slow'][0]}}</a> &nbsp;待发慢误点:<a class="c_c_1">{{countMap[k][1]['slow'][1]}}</a> &nbsp;累计时间:<a class="c_c_1">{{timeCountMap[k][1]['slow'][1]}}</a>)</td>
  118 + </tr>
  119 + <tr>
  120 + <td colspan="8" class="count_col">到达:上行(计划快误点:<a class="c_c_0">{{countMap[k][0]['fast'][2]}}</a> &nbsp;累计时间:<a class="c_c_0">{{timeCountMap[k][0]['fast'][2]}}</a> &nbsp;待发快误点:<a class="c_c_0">{{countMap[k][0]['fast'][3]}}</a> &nbsp;累计时间:<a class="c_c_0">{{timeCountMap[k][0]['fast'][3]}}</a>)</td>
  121 + <td colspan="8" class="count_col">到达:下行(计划快误点:<a class="c_c_1">{{countMap[k][1]['fast'][2]}}</a> &nbsp;累计时间:<a class="c_c_1">{{timeCountMap[k][1]['fast'][2]}}</a> &nbsp;待发快误点:<a class="c_c_1">{{countMap[k][1]['fast'][3]}}</a> &nbsp;累计时间:<a class="c_c_1">{{timeCountMap[k][1]['fast'][3]}}</a>)</td>
  122 + </tr>
  123 + <tr>
  124 + <td colspan="8" class="count_col">到达:上行(计划慢误点:<a class="c_c_0">{{countMap[k][0]['slow'][2]}}</a> &nbsp;累计时间:<a class="c_c_0">{{timeCountMap[k][0]['slow'][2]}}</a> &nbsp;待发慢误点:<a class="c_c_0">{{countMap[k][0]['slow'][3]}}</a> &nbsp;累计时间:<a class="c_c_0">{{timeCountMap[k][0]['slow'][3]}}</a>)</td>
  125 + <td colspan="8" class="count_col">到达:下行(计划慢误点:<a class="c_c_1">{{countMap[k][1]['slow'][2]}}</a> &nbsp;累计时间:<a class="c_c_1">{{timeCountMap[k][1]['slow'][2]}}</a> &nbsp;待发慢误点:<a class="c_c_1">{{countMap[k][1]['slow'][3]}}</a> &nbsp;累计时间:<a class="c_c_1">{{timeCountMap[k][1]['slow'][3]}}</a>)</td>
  126 + </tr>
  127 + </table>
  128 + </div>
  129 + <br>
  130 + {{/each}}
  131 + </div>
  132 + </script>
23 133 <script>
24 134 (function () {
25   - var wrap = '.ct_data_body_wrap';
  135 + var wrap = '.ct_data_body_wrap',
  136 + listMap, countMap={}, timeCountMap={};
26 137  
27 138 $(wrap).on('init', function (e, data) {
28 139 e.stopPropagation();
29   - console.log('data init');
  140 + listMap = data.listMap;
30 141  
  142 + //统计
  143 + for(var rq in listMap){
  144 + /**
  145 + * 2017-10-20:[{fast: [发车, 待发, 计划终点,待发终点], slow: [发车, 待发, 计划终点,待发终点]},{}]
  146 + */
  147 + countMap[rq]=[{fast:[0,0,0,0], slow:[0,0,0,0]}, {fast:[0,0,0,0], slow:[0,0,0,0]}];
  148 + timeCountMap[rq]=[{fast:[0,0,0,0], slow:[0,0,0,0]}, {fast:[0,0,0,0], slow:[0,0,0,0]}];
  149 + for(var i=0,obj;obj=listMap[rq][i++];){
  150 + countDetail(countMap[rq], obj);
  151 + sumTime(timeCountMap[rq], obj);
  152 + }
  153 + }
  154 +
  155 + //左侧日期list
  156 + $('.ct_rq_left>ul',wrap).html(template('fast_and_slow_left_rq_temp', {listMap: listMap}));
  157 + //右侧
  158 + $('.ct_right_tables',wrap).html(template('fast_and_slow_right_body_temp', {listMap: listMap, countMap: countMap, timeCountMap: timeCountMap}));
31 159 });
  160 +
  161 +
  162 + function countDetail(json, obj) {
  163 + var i = obj.upDown;
  164 + if(obj.fcsjFast)
  165 + json[i]['fast'][0]++;
  166 + if(obj.dfsjFast)
  167 + json[i]['fast'][1]++;
  168 + if(obj.zdsjFast)
  169 + json[i]['fast'][2]++;
  170 + if(obj.zdsjDfFast)
  171 + json[i]['fast'][3]++;
  172 +
  173 + if(obj.fcsjSlow)
  174 + json[i]['slow'][0]++;
  175 + if(obj.dfsjSlow)
  176 + json[i]['slow'][1]++;
  177 + if(obj.zdsjSlow)
  178 + json[i]['slow'][2]++;
  179 + if(obj.zdsjDfSlow)
  180 + json[i]['slow'][3]++;
  181 + }
  182 +
  183 + function sumTime(json, obj) {
  184 + var i = obj.upDown;
  185 + json[i]['fast'][0]+=obj.fcsjFast;
  186 + json[i]['fast'][1]+=obj.dfsjFast;
  187 + json[i]['fast'][2]+=obj.zdsjFast;
  188 + json[i]['fast'][3]+=obj.zdsjDfFast;
  189 + json[i]['slow'][0]+=obj.fcsjSlow;
  190 + json[i]['slow'][1]+=obj.dfsjSlow;
  191 + json[i]['slow'][2]+=obj.zdsjSlow;
  192 + json[i]['slow'][3]+=obj.zdsjDfSlow;
  193 + }
32 194 })();
33 195 </script>
34 196 </div>
35 197 \ No newline at end of file
... ...
src/main/resources/static/pages/summary/fast_and_slow/main.html
... ... @@ -18,7 +18,7 @@
18 18 }
19 19  
20 20 .ct_cont{
21   - height: calc(100% - 35px);
  21 + margin-top: 132px;
22 22 }
23 23  
24 24 .ct_cont>div>div.uk-card{
... ... @@ -94,16 +94,17 @@
94 94 width: 200px;
95 95 display: inline-block;
96 96 vertical-align: top;
97   - height: 99%;
98   - height: calc(100% - 5px);
  97 + height: calc(100% - 184px);
  98 + position: fixed;
  99 + left: 25px;
99 100 }
100 101  
101 102 .ct_right_tables{
102 103 width: calc(100% - 220px);
103 104 display: inline-block;
104   - margin-left: 12px;
105   - height: 99%;
106   - height: calc(100% - 5px);
  105 + margin-left: 232px;
  106 + padding: 25px;
  107 + margin-bottom: 18px;
107 108 }
108 109  
109 110 .tm-nav>li a{
... ... @@ -120,7 +121,95 @@
120 121 top: 15px;
121 122 }
122 123 .uk-nav-default>li.uk-active>a {
123   - color: #222;
  124 + color: blue;
  125 + font-weight: 600;
  126 + }
  127 +
  128 + .data_table_wrap{
  129 + min-width: 1170px;
  130 + }
  131 +
  132 + .ct_right_tables table{
  133 + background: #8c8c8c;
  134 + width: 100%;
  135 + text-align: center;
  136 + font-size: 14px;
  137 + table-layout: fixed;
  138 + color: #000;
  139 + }
  140 +
  141 + .ct_right_tables table td{
  142 + background: #fff;
  143 + height: 32px;
  144 + overflow: hidden;
  145 + text-overflow: ellipsis;
  146 + white-space: nowrap;
  147 + }
  148 +
  149 + .ct_right_tables table td.count_col{
  150 + text-align: left;
  151 + height: 40px;
  152 + text-indent:15px;
  153 + font-size: 14px !important;
  154 + font-weight: 400;
  155 + }
  156 +
  157 + .data_table_wrap.head{
  158 + position: fixed;
  159 + width: calc(100% - 300px);
  160 + top: 155px;
  161 + padding-top: 25px;
  162 + background: #fff;
  163 + }
  164 +
  165 + .ct_right_tables .data_table_wrap.head table tr:nth-child(-n+3) td{
  166 + background: #ededed;
  167 + }
  168 +
  169 + .ct_right_tables table tr:nth-last-child(1) td,
  170 + .ct_right_tables table tr:nth-last-child(2) td,
  171 + .ct_right_tables table tr:nth-last-child(3) td,
  172 + .ct_right_tables table tr:nth-last-child(4) td{
  173 + background: #ededed;
  174 + }
  175 +
  176 + .ct_fixed_header{
  177 + position: fixed;
  178 + width: 100%;
  179 + top: 0;
  180 + background: #fff;
  181 + z-index: 2;
  182 + padding-top: 25px;
  183 + }
  184 +
  185 + .ct_right_tables h2{
  186 + margin-bottom: 10px;
  187 + }
  188 +
  189 + .data_table_wrap:nth-child(2) {
  190 + margin-top: 91px;
  191 + }
  192 +
  193 + .cell_dir_0{
  194 + color: #0000ff96;
  195 + font-weight: 600;
  196 + font-size: 12px;
  197 + }
  198 + .cell_dir_1{
  199 + color: #ff00009e;
  200 + font-weight: 600;
  201 + font-size: 12px;
  202 + }
  203 +
  204 + .count_col .c_c_0{
  205 + color: #0000ffe0;
  206 + }
  207 +
  208 + .count_col .c_c_1{
  209 + color: #ff0000d1;
  210 + }
  211 + .ct_cont{
  212 + display: none;
124 213 }
125 214 </style>
126 215 </head>
... ... @@ -130,8 +219,8 @@
130 219 <div uk-spinner></div>
131 220 </div>
132 221 <div class="ct_page" style="display: none;">
133   - <h3 class="uk-heading-line uk-heading-bullet"><span>快慢误点统计</span></h3>
134   - <div class="ct_cont" >
  222 + <div class="ct_fixed_header">
  223 + <h3 class="uk-heading-line uk-heading-bullet"><span>快慢误点统计</span></h3>
135 224 <div class="ct_search_form_wrap">
136 225 <form>
137 226 <div class="ct_field">
... ... @@ -154,26 +243,27 @@
154 243 </div>
155 244 <div class="ct_field">
156 245 <label>日期范围:
157   - <input class="uk-input" name="rq" style="width: 200px;">
  246 + <input class="uk-input" name="rq" style="width: 200px;" >
158 247 </label>
159 248 </div>
160 249 <div class="ct_field">
161   - <label><input class="uk-radio" type="radio" name="type" checked> 全部</label>&nbsp;
162   - <label><input class="uk-radio" type="radio" name="type"> 快误</label>&nbsp;
163   - <label><input class="uk-radio" type="radio" name="type"> 慢误</label>
  250 + <label><input class="uk-radio" type="radio" name="type" value="0" checked> 全部</label>&nbsp;
  251 + <label><input class="uk-radio" type="radio" name="type" value="1"> 快误</label>&nbsp;
  252 + <label><input class="uk-radio" type="radio" name="type" value="-1"> 慢误</label>
164 253 </div>
165 254 <div class="ct_field">
166   - <button class="uk-button uk-button-primary search"><i uk-icon="icon: search"></i>搜索</button>
  255 + <button class="uk-button uk-button-primary search"><i uk-icon="icon: search" ></i>搜索</button>
167 256 </div>
168 257 <div class="ct_field ct_field_bottom">
169   - <button class="uk-button uk-button-text" style="padding: 0 5px;">导出数据</button>
  258 + <button class="uk-button uk-button-text export_excel" style="padding: 0 5px;">导出数据</button>
170 259 </div>
171 260 <div class="ct_field ct_field_bottom">
172   - <span uk-icon="icon: question" title="统计 “正常”、“区间”、“放站” 班次" uk-tooltip="pos: bottom"></span>
  261 + <span uk-icon="icon: question" title="快1慢3; 排除进出场班次<br>一次至多查询5天的数据,如需更大查询范围,请导出" uk-tooltip="pos: bottom"></span>
173 262 </div>
174 263 </form>
175 264 </div>
176   -
  265 + </div>
  266 + <div class="ct_cont" >
177 267 <div class="ct_cont_body">
178 268 </div>
179 269 </div>
... ... @@ -210,15 +300,11 @@
210 300 $('.ct_cont_body').html(rs);
211 301 });
212 302  
213   - //点击搜索按钮
214   - $('.search', f).on('click', function () {
215   - $('.ct_data_body_wrap').trigger('init');
216   - });
217 303  
218 304 //日期选择框
219 305 var fs='YYYY-MM-DD'
220   - , ets=moment().format(fs)
221   - , sts=moment().subtract(7, 'days').format(fs);
  306 + , ets=moment().subtract(1, 'days').format(fs)
  307 + , sts=moment().subtract(6, 'days').format(fs);
222 308 flatpickr('.ct_search_form_wrap [name=rq]', {
223 309 mode: "range", dateFormat: "Y-m-d","locale": "zh", defaultDate: [sts, ets]
224 310 });
... ... @@ -276,6 +362,63 @@
276 362 }
277 363 $('[name=lineCode_eq]', f).html(opts);
278 364 });
  365 +
  366 + /**
  367 + * 点击搜索
  368 + */
  369 + $('.search', f).on('click', function () {
  370 + var that = this;
  371 + $(that).attr('disabled', 'disabled');
  372 + var params = serializeFormJSON();
  373 + $('.ct_cont').hide();
  374 + $.get('/summary/fastAndSlow/all', params, function (rs) {
  375 + $(that).removeAttr('disabled');
  376 + //按日期分组
  377 + var listMap = groupBy(rs, 'rq');
  378 + $('.ct_data_body_wrap').trigger('init', {listMap: listMap});
  379 + if(!rs || rs.length==0)
  380 + return UIkit.notification('没有搜索到相关数据!!', 'danger');
  381 + $('.ct_cont').show();
  382 + });
  383 + });
  384 +
  385 + function serializeFormJSON() {
  386 + var data = f.serializeJSON();
  387 + if(!data.rq)
  388 + return UIkit.notification('你必须选择时间范围!', 'danger');
  389 +
  390 + var sDate = data.rq.substr(0, 10),
  391 + eDate = data.rq.substr(13);
  392 +
  393 + return {lineCode_eq: data.lineCode_eq, rq_ge: sDate, rq_le: eDate, order: 't',type: data.type};
  394 + }
  395 +
  396 + f.on('submit', function (e) {
  397 + return false;
  398 + });
  399 +
  400 + var groupBy = function (list, field) {
  401 + var rs = {},
  402 + key;
  403 + $.each(list, function () {
  404 + key = this[field];
  405 + if (!rs[key])
  406 + rs[key] = [];
  407 +
  408 + rs[key].push(this);
  409 + });
  410 +
  411 + return rs;
  412 + };
  413 +
  414 + /**
  415 + * 导出
  416 + */
  417 + $('.export_excel').on('click', function () {
  418 + var params = serializeFormJSON();
  419 +
  420 + window.open('/summary/fastAndSlow/excel/' + params.lineCode_eq + "?st="+params.rq_ge+"&et="+params.rq_le+"&type="+params.type);
  421 + });
279 422 })();
280 423 </script>
281 424 </body>
... ...
src/main/resources/static/pages/summary/work_hours/list.html
... ... @@ -262,8 +262,8 @@
262 262 }
263 263  
264 264 //日期选择器
265   - $('[name=rq_eq]', f).val('2017-10-10');
266   - flatpickr('.ct_search_form_wrap [name=rq_eq]', {"locale": "zh", maxDate: '2017-10-16', minDate: '2017-07-01'});
  265 + $('[name=rq_eq]', f).val('2017-10-23');
  266 + flatpickr('.ct_search_form_wrap [name=rq_eq]', {"locale": "zh", maxDate: '2017-10-23', minDate: '2017-07-01'});
267 267  
268 268 var comps;
269 269 //构建公司级联下拉框
... ...
src/main/resources/static/real_control_v2/css/main.css
... ... @@ -1736,4 +1736,22 @@ dl.active&gt;dd.disabled{
1736 1736 color: #a6a6a6;
1737 1737 text-indent: 7px;
1738 1738 padding-bottom: 5px;
  1739 +}
  1740 +
  1741 +.cancel_link{
  1742 + font-size: 12px;
  1743 + margin-left: 15px;
  1744 + vertical-align: bottom;
  1745 + color: #8d8d8d;
  1746 + text-decoration: underline;
  1747 + position: absolute;
  1748 + right: 0;
  1749 +}
  1750 +
  1751 +.edit_link{
  1752 + font-size: 12px;
  1753 + margin-left: 15px;
  1754 + vertical-align: bottom;
  1755 + color: #ff2f2f;
  1756 + text-decoration: underline;
1739 1757 }
1740 1758 \ No newline at end of file
... ...
src/main/resources/static/real_control_v2/fragments/line_schedule/sys_mailbox.html
... ... @@ -20,7 +20,8 @@
20 20 </h5>
21 21 <code>{{t.fcsjActual}}</code>
22 22 <div class="uk-button-group">
23   - <a class="uk-button uk-button-mini uk-button-primary" >确定</a>
  23 + <a class="uk-button uk-button-mini uk-button-primary" data-line="{{t.xlBm}}">确定</a>
  24 + <a class="cancel_link" data-id="{{t.id}}" data-line="{{t.xlBm}}"><i class="uk-icon-remove"></i> 撤销</a>
24 25 </div>
25 26 </div>
26 27 </script>
... ... @@ -38,7 +39,9 @@
38 39 </h5>
39 40 <code>{{t.zdsjActual}}</code>
40 41 <div class="uk-button-group">
41   - <a class="uk-button uk-button-mini uk-button-primary" >确定</a>
  42 + <a class="uk-button uk-button-mini uk-button-primary" data-line="{{t.xlBm}}">确定</a>
  43 + <a class="edit_link" data-type="1" data-id="{{t.id}}" data-line="{{t.xlBm}}">编辑</a>
  44 + <a class="cancel_link" data-type="1" data-id="{{t.id}}" data-line="{{t.xlBm}}"><i class="uk-icon-remove"></i> 撤销</a>
42 45 </div>
43 46 </div>
44 47 </div>
... ...
src/main/resources/static/real_control_v2/js/line_schedule/context_menu.js
... ... @@ -95,7 +95,7 @@ var gb_schedule_context_menu = (function () {
95 95 sch: sch
96 96 }, modal_opts);
97 97 },
98   - cxsf: function (sch) {
  98 + cxsf: function (sch, cb) {
99 99 if (!sch.fcsjActual)
100 100 return notify_err('车辆未实发,无法执行该操作!');
101 101  
... ... @@ -108,6 +108,8 @@ var gb_schedule_context_menu = (function () {
108 108 notify_succ('撤销实发操作成功!');
109 109 //calc 应发未发
110 110 gb_schedule_table.calc_yfwf_num(sch.xlBm);
  111 +
  112 + cb && cb();
111 113 });
112 114 }, '确认撤销实发');
113 115 },
... ... @@ -176,7 +178,7 @@ var gb_schedule_context_menu = (function () {
176 178 sch: sch
177 179 }, modal_opts);
178 180 },
179   - cxzx: function (sch) {
  181 + cxzx: function (sch, cb) {
180 182 if (!sch.zdsjActual && !sch.fcsjActual)
181 183 return notify_err('车辆未执行,无法撤销执行!');
182 184  
... ... @@ -187,6 +189,8 @@ var gb_schedule_context_menu = (function () {
187 189 }, function (rs) {
188 190 gb_schedule_table.updateSchedule(rs.ts);
189 191 notify_succ('撤销执行成功!');
  192 +
  193 + cb && cb();
190 194 });
191 195 }, '确认撤销执行');
192 196 },
... ...
src/main/resources/static/real_control_v2/js/main.js
... ... @@ -47,7 +47,7 @@ var gb_main_ep = new EventProxy(),
47 47 $('li.map-panel', '#main-tab-content').load('/real_control_v2/mapmonitor/real.html');
48 48 }, 1000);
49 49 //弹出更新说明
50   - //showUpdateDescription();
  50 + showUpdateDescription();
51 51 });
52 52  
53 53 function g_emit(id) {
... ... @@ -168,8 +168,8 @@ var disabled_submit_btn = function (form) {
168 168 function showUpdateDescription() {
169 169 //更新说明
170 170 var updateDescription = {
171   - date: '2017-09-28',
172   - text: '<h5>1、修复了一个bug,该bug曾导致,出场时间设置为请求出场的线路,有几率早出场时间会误跳至分班班次!</h5>'
  171 + date: '2017-10-25',
  172 + text: '<h5>1、修正了双击调整待发时,备注会被清空的bug。!</h5><h5>2、现在发车和到站信使可以撤销和编辑。</h5>'
173 173 };
174 174  
175 175 var storage = window.localStorage
... ...
src/main/resources/static/real_control_v2/js/websocket/sch_websocket.js
... ... @@ -218,9 +218,8 @@ var gb_sch_websocket = (function () {
218 218 $(document).on('click', '.sys-mailbox .sys-note-42 .uk-button-primary', function (e) {
219 219 e.stopPropagation();
220 220 $(this).parents('.sys-note-42').remove();
221   -
222 221 var size = $(this).parents('.sys-mailbox').find('.sys-mail-item').length
223   - , lineCode = $(this).parents('li.line_schedule').data('id');
  222 + , lineCode = $(this).data('line');
224 223  
225 224 $('#badge_untreated_num_' + lineCode).text(size);
226 225 });
... ... @@ -233,7 +232,7 @@ var gb_sch_websocket = (function () {
233 232 var dl = gb_schedule_table.scroToDl(sch);
234 233 //高亮
235 234 gb_schedule_table.reset_drag_active_all(dl);
236   - dl.addClass('relevance-active intimity');
  235 + dl.addClass('relevance-active intimity').find('dd:eq(5)').trigger('click');
237 236 });
238 237  
239 238 //80同意
... ... @@ -295,6 +294,41 @@ var gb_sch_websocket = (function () {
295 294 gb_data_gps.deviceOffline(msg.gps);
296 295 }
297 296  
  297 + /**
  298 + * 信号撤销
  299 + */
  300 + $(document).on('click','.sys-note-42 .cancel_link', function () {
  301 + var id = $(this).data('id'),
  302 + lineCode = $(this).data('line');
  303 +
  304 + var sch = gb_schedule_table.findScheduleByLine(lineCode)[id];
  305 + if(!sch)
  306 + return;
  307 +
  308 + var confirmBtn = $(this).parent().find('.uk-button-primary');
  309 + var type = $(this).data('type');
  310 + var fun = type==1?gb_schedule_context_menu.cxzx:gb_schedule_context_menu.cxsf;
  311 +
  312 + fun(sch, function () {
  313 + confirmBtn.trigger('click');
  314 + });
  315 + });
  316 +
  317 + /**
  318 + * 到站信号修改
  319 + */
  320 + $(document).on('click', '.sys-note-42 .edit_link', function () {
  321 + var id = $(this).data('id'),
  322 + lineCode = $(this).data('line');
  323 +
  324 + var sch = gb_schedule_table.findScheduleByLine(lineCode)[id];
  325 + if(!sch)
  326 + return;
  327 +
  328 + var nextSch = gb_schedule_table.getNextSch(sch);
  329 + gb_schedule_context_menu.dftz(nextSch);
  330 + });
  331 +
298 332 return {
299 333 sock: function () {
300 334 return schSock;
... ...