Commit 3bdf44c2b0c79a9580a14bee3c53a7964b05e19d
Merge branch 'jiading' of
http://222.66.0.204:8090/panzhaov5/bsth_control into jiading
Showing
11 changed files
with
356 additions
and
337 deletions
src/main/java/com/bsth/XDApplication.java
| 1 | package com.bsth; | 1 | package com.bsth; |
| 2 | 2 | ||
| 3 | import com.bsth.data.BasicData; | 3 | import com.bsth.data.BasicData; |
| 4 | +import com.bsth.data.LineVersionsData; | ||
| 4 | import com.bsth.data.ThreadMonotor; | 5 | import com.bsth.data.ThreadMonotor; |
| 5 | import com.bsth.data.car_out_info.UpdateDBThread; | 6 | import com.bsth.data.car_out_info.UpdateDBThread; |
| 6 | import com.bsth.data.directive.DirectivesPstThread; | 7 | import com.bsth.data.directive.DirectivesPstThread; |
| @@ -73,8 +74,8 @@ public class XDApplication implements CommandLineRunner { | @@ -73,8 +74,8 @@ public class XDApplication implements CommandLineRunner { | ||
| 73 | @Autowired | 74 | @Autowired |
| 74 | OfflineMonitorThread offlineMonitorThread; | 75 | OfflineMonitorThread offlineMonitorThread; |
| 75 | 76 | ||
| 76 | - //@Autowired | ||
| 77 | - //LineVersionsData lineVersionsData; | 77 | + @Autowired |
| 78 | + LineVersionsData lineVersionsData; | ||
| 78 | 79 | ||
| 79 | @Autowired | 80 | @Autowired |
| 80 | FixedEnableVerionsThread fixedEnableVerionsThread; | 81 | FixedEnableVerionsThread fixedEnableVerionsThread; |
| @@ -149,13 +150,13 @@ public class XDApplication implements CommandLineRunner { | @@ -149,13 +150,13 @@ public class XDApplication implements CommandLineRunner { | ||
| 149 | log.info("prodInit..."); | 150 | log.info("prodInit..."); |
| 150 | ScheduledExecutorService sexec = Application.mainServices; | 151 | ScheduledExecutorService sexec = Application.mainServices; |
| 151 | //安全驾驶 | 152 | //安全驾驶 |
| 152 | - sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS); | 153 | + //sexec.scheduleWithFixedDelay(safeDrivDataLoadThread, 180, 10, TimeUnit.SECONDS); |
| 153 | 154 | ||
| 154 | /** 线调业务 */ | 155 | /** 线调业务 */ |
| 155 | sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程 | 156 | sexec.scheduleWithFixedDelay(scheduleRefreshThread, 10, 120, TimeUnit.SECONDS);//班次更新线程 |
| 156 | sexec.scheduleWithFixedDelay(scheduleLateThread, 140, 30, TimeUnit.SECONDS);//检查班次误点 | 157 | sexec.scheduleWithFixedDelay(scheduleLateThread, 140, 30, TimeUnit.SECONDS);//检查班次误点 |
| 157 | gpsDataLoader.setFlag(-1); | 158 | gpsDataLoader.setFlag(-1); |
| 158 | - sexec.scheduleWithFixedDelay(gpsDataLoader, 100, 2, TimeUnit.SECONDS);//抓取GPS数据 | 159 | + sexec.scheduleWithFixedDelay(gpsDataLoader, 100, 3, TimeUnit.SECONDS);//抓取GPS数据 |
| 159 | 160 | ||
| 160 | sexec.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS);//GPS设备掉离线 | 161 | sexec.scheduleWithFixedDelay(offlineMonitorThread, 120, 60, TimeUnit.SECONDS);//GPS设备掉离线 |
| 161 | sexec.scheduleWithFixedDelay(schedulePstThread, 180, 10, TimeUnit.SECONDS);//班次延迟入库线程 | 162 | sexec.scheduleWithFixedDelay(schedulePstThread, 180, 10, TimeUnit.SECONDS);//班次延迟入库线程 |
| @@ -181,9 +182,9 @@ public class XDApplication implements CommandLineRunner { | @@ -181,9 +182,9 @@ public class XDApplication implements CommandLineRunner { | ||
| 181 | sexec.scheduleAtFixedRate(calcOilThread, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS); | 182 | sexec.scheduleAtFixedRate(calcOilThread, timeDiff / 1000, 60 * 60 * 24, TimeUnit.SECONDS); |
| 182 | 183 | ||
| 183 | //线路版本更新 | 184 | //线路版本更新 |
| 184 | - //sexec.scheduleWithFixedDelay(lineVersionsData, 60 * 5, 60 * 15, TimeUnit.SECONDS); | 185 | + sexec.scheduleWithFixedDelay(lineVersionsData, 60 * 5, 60 * 15, TimeUnit.SECONDS); |
| 185 | 186 | ||
| 186 | //线路版本更新 | 187 | //线路版本更新 |
| 187 | - sexec.scheduleWithFixedDelay(fixedEnableVerionsThread, 60 * 4, 60 * 2 , TimeUnit.SECONDS); | 188 | + //sexec.scheduleWithFixedDelay(fixedEnableVerionsThread, 60 * 4, 60 * 2 , TimeUnit.SECONDS); |
| 188 | } | 189 | } |
| 189 | } | 190 | } |
src/main/java/com/bsth/data/summary/entity/TempSchSituation.java
| 1 | -package com.bsth.data.summary.entity; | ||
| 2 | - | ||
| 3 | -import javax.persistence.Entity; | ||
| 4 | -import javax.persistence.Id; | ||
| 5 | -import javax.persistence.Table; | ||
| 6 | - | ||
| 7 | -/** | ||
| 8 | - * 临加情况 | ||
| 9 | - * Created by panzhao on 2017/10/31. | ||
| 10 | - */ | ||
| 11 | -@Entity | ||
| 12 | -@Table(name = "z_calc_temp_detail") | ||
| 13 | -public class TempSchSituation { | ||
| 14 | - | ||
| 15 | - @Id | ||
| 16 | - private Long id; | ||
| 17 | - | ||
| 18 | - private String rq; | ||
| 19 | - | ||
| 20 | - private String gsBm; | ||
| 21 | - | ||
| 22 | - private String fgsBm; | ||
| 23 | - | ||
| 24 | - private String lineCode; | ||
| 25 | - | ||
| 26 | - private String lineName; | ||
| 27 | - | ||
| 28 | - private String nbbm; | ||
| 29 | - | ||
| 30 | - private String jGh; | ||
| 31 | - | ||
| 32 | - private String sGh; | ||
| 33 | - | ||
| 34 | - private int size; | ||
| 35 | - | ||
| 36 | - private Double mileage; | ||
| 37 | - | ||
| 38 | - private Long t; | ||
| 39 | - | ||
| 40 | - private String remark; | ||
| 41 | - | ||
| 42 | - private String idsStr; | ||
| 43 | - | ||
| 44 | - public Long getId() { | ||
| 45 | - return id; | ||
| 46 | - } | ||
| 47 | - | ||
| 48 | - public void setId(Long id) { | ||
| 49 | - this.id = id; | ||
| 50 | - } | ||
| 51 | - | ||
| 52 | - public String getRq() { | ||
| 53 | - return rq; | ||
| 54 | - } | ||
| 55 | - | ||
| 56 | - public void setRq(String rq) { | ||
| 57 | - this.rq = rq; | ||
| 58 | - } | ||
| 59 | - | ||
| 60 | - public String getLineCode() { | ||
| 61 | - return lineCode; | ||
| 62 | - } | ||
| 63 | - | ||
| 64 | - public void setLineCode(String lineCode) { | ||
| 65 | - this.lineCode = lineCode; | ||
| 66 | - } | ||
| 67 | - | ||
| 68 | - public String getLineName() { | ||
| 69 | - return lineName; | ||
| 70 | - } | ||
| 71 | - | ||
| 72 | - public void setLineName(String lineName) { | ||
| 73 | - this.lineName = lineName; | ||
| 74 | - } | ||
| 75 | - | ||
| 76 | - public String getNbbm() { | ||
| 77 | - return nbbm; | ||
| 78 | - } | ||
| 79 | - | ||
| 80 | - public void setNbbm(String nbbm) { | ||
| 81 | - this.nbbm = nbbm; | ||
| 82 | - } | ||
| 83 | - | ||
| 84 | - public String getjGh() { | ||
| 85 | - return jGh; | ||
| 86 | - } | ||
| 87 | - | ||
| 88 | - public void setjGh(String jGh) { | ||
| 89 | - this.jGh = jGh; | ||
| 90 | - } | ||
| 91 | - | ||
| 92 | - public String getsGh() { | ||
| 93 | - return sGh; | ||
| 94 | - } | ||
| 95 | - | ||
| 96 | - public void setsGh(String sGh) { | ||
| 97 | - this.sGh = sGh; | ||
| 98 | - } | ||
| 99 | - | ||
| 100 | - public int getSize() { | ||
| 101 | - return size; | ||
| 102 | - } | ||
| 103 | - | ||
| 104 | - public void setSize(int size) { | ||
| 105 | - this.size = size; | ||
| 106 | - } | ||
| 107 | - | ||
| 108 | - public Double getMileage() { | ||
| 109 | - return mileage; | ||
| 110 | - } | ||
| 111 | - | ||
| 112 | - public void setMileage(Double mileage) { | ||
| 113 | - this.mileage = mileage; | ||
| 114 | - } | ||
| 115 | - | ||
| 116 | - public Long getT() { | ||
| 117 | - return t; | ||
| 118 | - } | ||
| 119 | - | ||
| 120 | - public void setT(Long t) { | ||
| 121 | - this.t = t; | ||
| 122 | - } | ||
| 123 | - | ||
| 124 | - public String getRemark() { | ||
| 125 | - return remark; | ||
| 126 | - } | ||
| 127 | - | ||
| 128 | - public void setRemark(String remark) { | ||
| 129 | - this.remark = remark; | ||
| 130 | - } | ||
| 131 | - | ||
| 132 | - public String getIdsStr() { | ||
| 133 | - return idsStr; | ||
| 134 | - } | ||
| 135 | - | ||
| 136 | - public void setIdsStr(String idsStr) { | ||
| 137 | - this.idsStr = idsStr; | ||
| 138 | - } | ||
| 139 | - | ||
| 140 | - public String getGsBm() { | ||
| 141 | - return gsBm; | ||
| 142 | - } | ||
| 143 | - | ||
| 144 | - public void setGsBm(String gsBm) { | ||
| 145 | - this.gsBm = gsBm; | ||
| 146 | - } | ||
| 147 | - | ||
| 148 | - public String getFgsBm() { | ||
| 149 | - return fgsBm; | ||
| 150 | - } | ||
| 151 | - | ||
| 152 | - public void setFgsBm(String fgsBm) { | ||
| 153 | - this.fgsBm = fgsBm; | ||
| 154 | - } | 1 | +package com.bsth.data.summary.entity; |
| 2 | + | ||
| 3 | +import javax.persistence.Entity; | ||
| 4 | +import javax.persistence.Id; | ||
| 5 | +import javax.persistence.Table; | ||
| 6 | + | ||
| 7 | +/** | ||
| 8 | + * 临加情况 | ||
| 9 | + * Created by panzhao on 2017/10/31. | ||
| 10 | + */ | ||
| 11 | +@Entity | ||
| 12 | +@Table(name = "z_calc_temp_detail") | ||
| 13 | +public class TempSchSituation { | ||
| 14 | + | ||
| 15 | + @Id | ||
| 16 | + private Long id; | ||
| 17 | + | ||
| 18 | + private String rq; | ||
| 19 | + | ||
| 20 | + private String gsBm; | ||
| 21 | + | ||
| 22 | + private String fgsBm; | ||
| 23 | + | ||
| 24 | + private String lineCode; | ||
| 25 | + | ||
| 26 | + private String lineName; | ||
| 27 | + | ||
| 28 | + private String nbbm; | ||
| 29 | + | ||
| 30 | + private String jGh; | ||
| 31 | + | ||
| 32 | + private String sGh; | ||
| 33 | + | ||
| 34 | + private int size; | ||
| 35 | + | ||
| 36 | + private Double mileage; | ||
| 37 | + | ||
| 38 | + private Long t; | ||
| 39 | + | ||
| 40 | + private String remark; | ||
| 41 | + | ||
| 42 | + private String idsStr; | ||
| 43 | + | ||
| 44 | + public Long getId() { | ||
| 45 | + return id; | ||
| 46 | + } | ||
| 47 | + | ||
| 48 | + public void setId(Long id) { | ||
| 49 | + this.id = id; | ||
| 50 | + } | ||
| 51 | + | ||
| 52 | + public String getRq() { | ||
| 53 | + return rq; | ||
| 54 | + } | ||
| 55 | + | ||
| 56 | + public void setRq(String rq) { | ||
| 57 | + this.rq = rq; | ||
| 58 | + } | ||
| 59 | + | ||
| 60 | + public String getLineCode() { | ||
| 61 | + return lineCode; | ||
| 62 | + } | ||
| 63 | + | ||
| 64 | + public void setLineCode(String lineCode) { | ||
| 65 | + this.lineCode = lineCode; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + public String getLineName() { | ||
| 69 | + return lineName; | ||
| 70 | + } | ||
| 71 | + | ||
| 72 | + public void setLineName(String lineName) { | ||
| 73 | + this.lineName = lineName; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + public String getNbbm() { | ||
| 77 | + return nbbm; | ||
| 78 | + } | ||
| 79 | + | ||
| 80 | + public void setNbbm(String nbbm) { | ||
| 81 | + this.nbbm = nbbm; | ||
| 82 | + } | ||
| 83 | + | ||
| 84 | + public String getjGh() { | ||
| 85 | + return jGh; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + public void setjGh(String jGh) { | ||
| 89 | + this.jGh = jGh; | ||
| 90 | + } | ||
| 91 | + | ||
| 92 | + public String getsGh() { | ||
| 93 | + return sGh; | ||
| 94 | + } | ||
| 95 | + | ||
| 96 | + public void setsGh(String sGh) { | ||
| 97 | + this.sGh = sGh; | ||
| 98 | + } | ||
| 99 | + | ||
| 100 | + public int getSize() { | ||
| 101 | + return size; | ||
| 102 | + } | ||
| 103 | + | ||
| 104 | + public void setSize(int size) { | ||
| 105 | + this.size = size; | ||
| 106 | + } | ||
| 107 | + | ||
| 108 | + public Double getMileage() { | ||
| 109 | + return mileage; | ||
| 110 | + } | ||
| 111 | + | ||
| 112 | + public void setMileage(Double mileage) { | ||
| 113 | + this.mileage = mileage; | ||
| 114 | + } | ||
| 115 | + | ||
| 116 | + public Long getT() { | ||
| 117 | + return t; | ||
| 118 | + } | ||
| 119 | + | ||
| 120 | + public void setT(Long t) { | ||
| 121 | + this.t = t; | ||
| 122 | + } | ||
| 123 | + | ||
| 124 | + public String getRemark() { | ||
| 125 | + return remark; | ||
| 126 | + } | ||
| 127 | + | ||
| 128 | + public void setRemark(String remark) { | ||
| 129 | + this.remark = remark; | ||
| 130 | + } | ||
| 131 | + | ||
| 132 | + public String getIdsStr() { | ||
| 133 | + return idsStr; | ||
| 134 | + } | ||
| 135 | + | ||
| 136 | + public void setIdsStr(String idsStr) { | ||
| 137 | + this.idsStr = idsStr; | ||
| 138 | + } | ||
| 139 | + | ||
| 140 | + public String getGsBm() { | ||
| 141 | + return gsBm; | ||
| 142 | + } | ||
| 143 | + | ||
| 144 | + public void setGsBm(String gsBm) { | ||
| 145 | + this.gsBm = gsBm; | ||
| 146 | + } | ||
| 147 | + | ||
| 148 | + public String getFgsBm() { | ||
| 149 | + return fgsBm; | ||
| 150 | + } | ||
| 151 | + | ||
| 152 | + public void setFgsBm(String fgsBm) { | ||
| 153 | + this.fgsBm = fgsBm; | ||
| 154 | + } | ||
| 155 | } | 155 | } |
| 156 | \ No newline at end of file | 156 | \ No newline at end of file |
src/main/java/com/bsth/data/summary/service/impl/TempSchSituationServiceImpl.java
| 1 | -package com.bsth.data.summary.service.impl; | ||
| 2 | - | ||
| 3 | -import com.bsth.data.summary.entity.TempSchSituation; | ||
| 4 | -import com.bsth.data.summary.service.TempSchSituationService; | ||
| 5 | -import com.bsth.data.utils.CustomStringUtils; | ||
| 6 | -import com.bsth.service.impl.BaseServiceImpl; | ||
| 7 | -import org.apache.poi.hssf.usermodel.HSSFWorkbook; | ||
| 8 | -import org.apache.poi.poifs.filesystem.POIFSFileSystem; | ||
| 9 | -import org.apache.poi.ss.usermodel.Row; | ||
| 10 | -import org.apache.poi.ss.usermodel.Sheet; | ||
| 11 | -import org.slf4j.Logger; | ||
| 12 | -import org.slf4j.LoggerFactory; | ||
| 13 | -import org.springframework.stereotype.Service; | ||
| 14 | - | ||
| 15 | -import javax.servlet.http.HttpServletRequest; | ||
| 16 | -import javax.servlet.http.HttpServletResponse; | ||
| 17 | -import java.io.FileInputStream; | ||
| 18 | -import java.io.OutputStream; | ||
| 19 | -import java.net.URLEncoder; | ||
| 20 | -import java.text.SimpleDateFormat; | ||
| 21 | -import java.util.*; | ||
| 22 | - | ||
| 23 | -/** | ||
| 24 | - * Created by panzhao on 2017/11/1. | ||
| 25 | - */ | ||
| 26 | -@Service | ||
| 27 | -public class TempSchSituationServiceImpl extends BaseServiceImpl<TempSchSituation, Long> implements TempSchSituationService { | ||
| 28 | - | ||
| 29 | - Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 30 | - | ||
| 31 | - @Override | ||
| 32 | - public Iterable<TempSchSituation> list(Map<String, Object> map) { | ||
| 33 | - List<TempSchSituation> list = (List<TempSchSituation>) super.list(map); | ||
| 34 | - | ||
| 35 | - //排序 | ||
| 36 | - Collections.sort(list, new Comparator<TempSchSituation>() { | ||
| 37 | - @Override | ||
| 38 | - public int compare(TempSchSituation o1, TempSchSituation o2) { | ||
| 39 | - int i = o1.getRq().compareTo(o2.getRq()); | ||
| 40 | - if (i != 0) | ||
| 41 | - return i; | ||
| 42 | - | ||
| 43 | - i = o1.getLineName().compareTo(o2.getLineName()); | ||
| 44 | - if (i != 0) | ||
| 45 | - return i; | ||
| 46 | - | ||
| 47 | - i = (int) (o1.getT() - o2.getT()); | ||
| 48 | - return i; | ||
| 49 | - } | ||
| 50 | - }); | ||
| 51 | - return list; | ||
| 52 | - } | ||
| 53 | - | ||
| 54 | - @Override | ||
| 55 | - public void excel(Map<String, Object> map, HttpServletRequest request, HttpServletResponse response) { | ||
| 56 | - try { | ||
| 57 | - map.put("rq_le", CustomStringUtils.maxEndTime(map.get("rq_ge").toString() | ||
| 58 | - , map.get("rq_le").toString(), 62)); | ||
| 59 | - | ||
| 60 | - List<TempSchSituation> list = (List<TempSchSituation>) super.list(map); | ||
| 61 | - | ||
| 62 | - if (list.size() == 0) { | ||
| 63 | - response.setHeader("Content-type", "text/html;charset=UTF-8"); | ||
| 64 | - response.getWriter().print("<span style='color:red;font-size:24px;'>根据查询条件没有搜索到数据,别导了!</span>"); | ||
| 65 | - return; | ||
| 66 | - } | ||
| 67 | - | ||
| 68 | - //排序 | ||
| 69 | - Collections.sort(list, new Comparator<TempSchSituation>() { | ||
| 70 | - @Override | ||
| 71 | - public int compare(TempSchSituation o1, TempSchSituation o2) { | ||
| 72 | - int i = o1.getRq().compareTo(o2.getRq()); | ||
| 73 | - if (i != 0) | ||
| 74 | - return i; | ||
| 75 | - | ||
| 76 | - i = o1.getLineName().compareTo(o2.getLineName()); | ||
| 77 | - if (i != 0) | ||
| 78 | - return i; | ||
| 79 | - | ||
| 80 | - i = (int) (o1.getT() - o2.getT()); | ||
| 81 | - return i; | ||
| 82 | - } | ||
| 83 | - }); | ||
| 84 | - | ||
| 85 | - //输出excel | ||
| 86 | - String basePath = Thread.currentThread().getContextClassLoader().getResource("").getPath(); | ||
| 87 | - String filePath = basePath + "/static/pages/summary/excel/临加明细情况.xls"; | ||
| 88 | - POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(filePath)); | ||
| 89 | - HSSFWorkbook wb = new HSSFWorkbook(fs); | ||
| 90 | - | ||
| 91 | - //写入数据 | ||
| 92 | - Sheet sheet = wb.getSheetAt(0); | ||
| 93 | - Row row; | ||
| 94 | - TempSchSituation tss; | ||
| 95 | - SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); | ||
| 96 | - for (int i = 0; i < list.size(); i++) { | ||
| 97 | - tss = list.get(i); | ||
| 98 | - row = sheet.createRow(i + 1); | ||
| 99 | - row.createCell(0).setCellValue(tss.getRq()); | ||
| 100 | - row.createCell(1).setCellValue(tss.getLineName()); | ||
| 101 | - row.createCell(2).setCellValue(tss.getNbbm()); | ||
| 102 | - row.createCell(3).setCellValue(tss.getjGh()); | ||
| 103 | - row.createCell(4).setCellValue(tss.getsGh()); | ||
| 104 | - row.createCell(5).setCellValue(tss.getSize()); | ||
| 105 | - row.createCell(6).setCellValue(tss.getMileage()); | ||
| 106 | - row.createCell(7).setCellValue(sdf.format(new Date(tss.getT()))); | ||
| 107 | - row.createCell(8).setCellValue(tss.getRemark()); | ||
| 108 | - } | ||
| 109 | - | ||
| 110 | - String name = "";//list.get(0).getLineName(); | ||
| 111 | - wb.setSheetName(0, name + "临加明细"); | ||
| 112 | - //response 输出 | ||
| 113 | - String filename = name + map.get("rq_ge") + "至" + map.get("rq_le") + "临加明细情况.xls"; | ||
| 114 | - response.setContentType("application/x-msdownload"); | ||
| 115 | - response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8")); | ||
| 116 | - | ||
| 117 | - OutputStream os = response.getOutputStream(); | ||
| 118 | - wb.write(os); | ||
| 119 | - os.flush(); | ||
| 120 | - os.close(); | ||
| 121 | - } catch (Exception e) { | ||
| 122 | - logger.error("", e); | ||
| 123 | - } | ||
| 124 | - } | 1 | +package com.bsth.data.summary.service.impl; |
| 2 | + | ||
| 3 | +import com.bsth.data.summary.entity.TempSchSituation; | ||
| 4 | +import com.bsth.data.summary.service.TempSchSituationService; | ||
| 5 | +import com.bsth.data.utils.CustomStringUtils; | ||
| 6 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 7 | +import org.apache.poi.hssf.usermodel.HSSFWorkbook; | ||
| 8 | +import org.apache.poi.poifs.filesystem.POIFSFileSystem; | ||
| 9 | +import org.apache.poi.ss.usermodel.Row; | ||
| 10 | +import org.apache.poi.ss.usermodel.Sheet; | ||
| 11 | +import org.slf4j.Logger; | ||
| 12 | +import org.slf4j.LoggerFactory; | ||
| 13 | +import org.springframework.stereotype.Service; | ||
| 14 | + | ||
| 15 | +import javax.servlet.http.HttpServletRequest; | ||
| 16 | +import javax.servlet.http.HttpServletResponse; | ||
| 17 | +import java.io.FileInputStream; | ||
| 18 | +import java.io.OutputStream; | ||
| 19 | +import java.net.URLEncoder; | ||
| 20 | +import java.text.SimpleDateFormat; | ||
| 21 | +import java.util.*; | ||
| 22 | + | ||
| 23 | +/** | ||
| 24 | + * Created by panzhao on 2017/11/1. | ||
| 25 | + */ | ||
| 26 | +@Service | ||
| 27 | +public class TempSchSituationServiceImpl extends BaseServiceImpl<TempSchSituation, Long> implements TempSchSituationService { | ||
| 28 | + | ||
| 29 | + Logger logger = LoggerFactory.getLogger(this.getClass()); | ||
| 30 | + | ||
| 31 | + @Override | ||
| 32 | + public Iterable<TempSchSituation> list(Map<String, Object> map) { | ||
| 33 | + List<TempSchSituation> list = (List<TempSchSituation>) super.list(map); | ||
| 34 | + | ||
| 35 | + //排序 | ||
| 36 | + Collections.sort(list, new Comparator<TempSchSituation>() { | ||
| 37 | + @Override | ||
| 38 | + public int compare(TempSchSituation o1, TempSchSituation o2) { | ||
| 39 | + int i = o1.getRq().compareTo(o2.getRq()); | ||
| 40 | + if (i != 0) | ||
| 41 | + return i; | ||
| 42 | + | ||
| 43 | + i = o1.getLineName().compareTo(o2.getLineName()); | ||
| 44 | + if (i != 0) | ||
| 45 | + return i; | ||
| 46 | + | ||
| 47 | + i = (int) (o1.getT() - o2.getT()); | ||
| 48 | + return i; | ||
| 49 | + } | ||
| 50 | + }); | ||
| 51 | + return list; | ||
| 52 | + } | ||
| 53 | + | ||
| 54 | + @Override | ||
| 55 | + public void excel(Map<String, Object> map, HttpServletRequest request, HttpServletResponse response) { | ||
| 56 | + try { | ||
| 57 | + map.put("rq_le", CustomStringUtils.maxEndTime(map.get("rq_ge").toString() | ||
| 58 | + , map.get("rq_le").toString(), 62)); | ||
| 59 | + | ||
| 60 | + List<TempSchSituation> list = (List<TempSchSituation>) super.list(map); | ||
| 61 | + | ||
| 62 | + if (list.size() == 0) { | ||
| 63 | + response.setHeader("Content-type", "text/html;charset=UTF-8"); | ||
| 64 | + response.getWriter().print("<span style='color:red;font-size:24px;'>根据查询条件没有搜索到数据,别导了!</span>"); | ||
| 65 | + return; | ||
| 66 | + } | ||
| 67 | + | ||
| 68 | + //排序 | ||
| 69 | + Collections.sort(list, new Comparator<TempSchSituation>() { | ||
| 70 | + @Override | ||
| 71 | + public int compare(TempSchSituation o1, TempSchSituation o2) { | ||
| 72 | + int i = o1.getRq().compareTo(o2.getRq()); | ||
| 73 | + if (i != 0) | ||
| 74 | + return i; | ||
| 75 | + | ||
| 76 | + i = o1.getLineName().compareTo(o2.getLineName()); | ||
| 77 | + if (i != 0) | ||
| 78 | + return i; | ||
| 79 | + | ||
| 80 | + i = (int) (o1.getT() - o2.getT()); | ||
| 81 | + return i; | ||
| 82 | + } | ||
| 83 | + }); | ||
| 84 | + | ||
| 85 | + //输出excel | ||
| 86 | + String basePath = Thread.currentThread().getContextClassLoader().getResource("").getPath(); | ||
| 87 | + String filePath = basePath + "/static/pages/summary/excel/临加明细情况.xls"; | ||
| 88 | + POIFSFileSystem fs = new POIFSFileSystem(new FileInputStream(filePath)); | ||
| 89 | + HSSFWorkbook wb = new HSSFWorkbook(fs); | ||
| 90 | + | ||
| 91 | + //写入数据 | ||
| 92 | + Sheet sheet = wb.getSheetAt(0); | ||
| 93 | + Row row; | ||
| 94 | + TempSchSituation tss; | ||
| 95 | + SimpleDateFormat sdf = new SimpleDateFormat("HH:mm"); | ||
| 96 | + for (int i = 0; i < list.size(); i++) { | ||
| 97 | + tss = list.get(i); | ||
| 98 | + row = sheet.createRow(i + 1); | ||
| 99 | + row.createCell(0).setCellValue(tss.getRq()); | ||
| 100 | + row.createCell(1).setCellValue(tss.getLineName()); | ||
| 101 | + row.createCell(2).setCellValue(tss.getNbbm()); | ||
| 102 | + row.createCell(3).setCellValue(tss.getjGh()); | ||
| 103 | + row.createCell(4).setCellValue(tss.getsGh()); | ||
| 104 | + row.createCell(5).setCellValue(tss.getSize()); | ||
| 105 | + row.createCell(6).setCellValue(tss.getMileage()); | ||
| 106 | + row.createCell(7).setCellValue(sdf.format(new Date(tss.getT()))); | ||
| 107 | + row.createCell(8).setCellValue(tss.getRemark()); | ||
| 108 | + } | ||
| 109 | + | ||
| 110 | + String name = "";//list.get(0).getLineName(); | ||
| 111 | + wb.setSheetName(0, name + "临加明细"); | ||
| 112 | + //response 输出 | ||
| 113 | + String filename = name + map.get("rq_ge") + "至" + map.get("rq_le") + "临加明细情况.xls"; | ||
| 114 | + response.setContentType("application/x-msdownload"); | ||
| 115 | + response.setHeader("content-disposition", "attachment;filename=" + URLEncoder.encode(filename, "UTF-8")); | ||
| 116 | + | ||
| 117 | + OutputStream os = response.getOutputStream(); | ||
| 118 | + wb.write(os); | ||
| 119 | + os.flush(); | ||
| 120 | + os.close(); | ||
| 121 | + } catch (Exception e) { | ||
| 122 | + logger.error("", e); | ||
| 123 | + } | ||
| 124 | + } | ||
| 125 | } | 125 | } |
| 126 | \ No newline at end of file | 126 | \ No newline at end of file |
src/main/resources/application-prod.properties
| 1 | -server.port=9088 | ||
| 2 | -management.port= 9001 | ||
| 3 | -management.address= 127.0.0.1 | ||
| 4 | - | ||
| 5 | -spring.jpa.hibernate.ddl-auto= none | ||
| 6 | -spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | ||
| 7 | -#DATABASE | ||
| 8 | -spring.jpa.database= MYSQL | ||
| 9 | -spring.jpa.show-sql= false | ||
| 10 | -spring.datasource.driver-class-name= com.mysql.jdbc.Driver | ||
| 11 | -spring.datasource.url= jdbc:mysql://192.168.160.222:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 12 | -spring.datasource.username= root | ||
| 13 | -spring.datasource.password= root2jsp | ||
| 14 | -#DATASOURCE | ||
| 15 | -spring.datasource.max-active=100 | ||
| 16 | -spring.datasource.max-idle=8 | ||
| 17 | -spring.datasource.min-idle=8 | ||
| 18 | -spring.datasource.initial-size=5 | ||
| 19 | - | ||
| 20 | -spring.datasource.test-on-borrow=true | ||
| 21 | -spring.datasource.test-on-connect=true | ||
| 22 | -spring.datasource.test-on-return=true | ||
| 23 | -spring.datasource.test-while-idle=true | ||
| 24 | -spring.datasource.validation-query=select 1 | ||
| 25 | - | ||
| 26 | -## gps client data | ||
| 27 | -http.gps.real.cache.url= http://192.168.160.153:12580/realGps/all | ||
| 28 | -## gateway real data | ||
| 29 | -http.gps.real.url= http://192.168.160.151:8080/transport_server/rtgps/ | ||
| 30 | -## gateway send directive | 1 | +server.port=9088 |
| 2 | +management.port= 9001 | ||
| 3 | +management.address= 127.0.0.1 | ||
| 4 | + | ||
| 5 | +spring.jpa.hibernate.ddl-auto= none | ||
| 6 | +spring.jpa.hibernate.naming_strategy= org.hibernate.cfg.ImprovedNamingStrategy | ||
| 7 | +#DATABASE | ||
| 8 | +spring.jpa.database= MYSQL | ||
| 9 | +spring.jpa.show-sql= false | ||
| 10 | +spring.datasource.driver-class-name= com.mysql.jdbc.Driver | ||
| 11 | +spring.datasource.url= jdbc:mysql://192.168.160.222:3306/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | ||
| 12 | +spring.datasource.username= root | ||
| 13 | +spring.datasource.password= root2jsp | ||
| 14 | +#DATASOURCE | ||
| 15 | +spring.datasource.max-active=100 | ||
| 16 | +spring.datasource.max-idle=8 | ||
| 17 | +spring.datasource.min-idle=8 | ||
| 18 | +spring.datasource.initial-size=5 | ||
| 19 | + | ||
| 20 | +spring.datasource.test-on-borrow=true | ||
| 21 | +spring.datasource.test-on-connect=true | ||
| 22 | +spring.datasource.test-on-return=true | ||
| 23 | +spring.datasource.test-while-idle=true | ||
| 24 | +spring.datasource.validation-query=select 1 | ||
| 25 | + | ||
| 26 | +## gps client data | ||
| 27 | +http.gps.real.cache.url= http://192.168.160.153:12580/realGps/all | ||
| 28 | +## gateway real data | ||
| 29 | +http.gps.real.url= http://192.168.160.151:8080/transport_server/rtgps/ | ||
| 30 | +## gateway send directive | ||
| 31 | http.send.directive = http://192.168.160.151:8080/transport_server/message/ | 31 | http.send.directive = http://192.168.160.151:8080/transport_server/message/ |
| 32 | \ No newline at end of file | 32 | \ No newline at end of file |
src/main/resources/ms-jdbc.properties
| 1 | -ms.mysql.driver= com.mysql.jdbc.Driver | ||
| 2 | -ms.mysql.url= jdbc:mysql://192.168.160.222:3306/ms?useUnicode=true&characterEncoding=utf-8 | ||
| 3 | -ms.mysql.username= root | 1 | +ms.mysql.driver= com.mysql.jdbc.Driver |
| 2 | +ms.mysql.url= jdbc:mysql://192.168.160.222:3306/ms?useUnicode=true&characterEncoding=utf-8 | ||
| 3 | +ms.mysql.username= root | ||
| 4 | ms.mysql.password= root2jsp | 4 | ms.mysql.password= root2jsp |
| 5 | \ No newline at end of file | 5 | \ No newline at end of file |
src/main/resources/static/pages/base/timesmodel/js/v2/ParameterObj.js
| @@ -390,9 +390,18 @@ var ParameterObj = function() { | @@ -390,9 +390,18 @@ var ParameterObj = function() { | ||
| 390 | */ | 390 | */ |
| 391 | getUpLastDtimeObj: function() { | 391 | getUpLastDtimeObj: function() { |
| 392 | _validInternal(); // 验证 | 392 | _validInternal(); // 验证 |
| 393 | - return this.toTimeObj( | 393 | + var oStartTime = this.toTimeObj( |
| 394 | + _firstLastDepartureTimeStrObj.up.firstVehicleDepartureTimeStr | ||
| 395 | + ); | ||
| 396 | + var oEndTime = this.toTimeObj( | ||
| 394 | _firstLastDepartureTimeStrObj.up.lastVehicleDepartureTimeStr | 397 | _firstLastDepartureTimeStrObj.up.lastVehicleDepartureTimeStr |
| 395 | ); | 398 | ); |
| 399 | + if (oEndTime.isBefore(oStartTime)) { | ||
| 400 | + // 如果末班车时间早于首班车时间,则末班车时间跨天,需要加1天 | ||
| 401 | + oEndTime.add(1, "day"); | ||
| 402 | + } | ||
| 403 | + | ||
| 404 | + return oEndTime; | ||
| 396 | }, | 405 | }, |
| 397 | /** | 406 | /** |
| 398 | * 获取下行首班时间对象。 | 407 | * 获取下行首班时间对象。 |
| @@ -410,9 +419,18 @@ var ParameterObj = function() { | @@ -410,9 +419,18 @@ var ParameterObj = function() { | ||
| 410 | */ | 419 | */ |
| 411 | getDownLastDTimeObj: function() { | 420 | getDownLastDTimeObj: function() { |
| 412 | _validInternal(); // 验证 | 421 | _validInternal(); // 验证 |
| 413 | - return this.toTimeObj( | 422 | + var oStartTime = this.toTimeObj( |
| 423 | + _firstLastDepartureTimeStrObj.down.firstVehicleDepartureTimeStr | ||
| 424 | + ); | ||
| 425 | + var oEndTime = this.toTimeObj( | ||
| 414 | _firstLastDepartureTimeStrObj.down.lastVehicleDepartureTimeStr | 426 | _firstLastDepartureTimeStrObj.down.lastVehicleDepartureTimeStr |
| 415 | ); | 427 | ); |
| 428 | + if (oEndTime.isBefore(oStartTime)) { | ||
| 429 | + // 如果末班车时间早于首班车时间,则末班车时间跨天,需要加1天 | ||
| 430 | + oEndTime.add(1, "day"); | ||
| 431 | + } | ||
| 432 | + | ||
| 433 | + return oEndTime; | ||
| 416 | }, | 434 | }, |
| 417 | 435 | ||
| 418 | //-------------- 获取吃饭时间 ----------------// | 436 | //-------------- 获取吃饭时间 ----------------// |
src/main/resources/static/pages/mforms/singledatas/jquery.table2excel.min.js
| 1 | -/* | ||
| 2 | - * jQuery table2excel - v1.1.1 | ||
| 3 | - * jQuery plugin to export an .xls file in browser from an HTML table | ||
| 4 | - * https://github.com/rainabba/jquery-table2excel | ||
| 5 | - * | ||
| 6 | - * Made by rainabba | ||
| 7 | - * Under MIT License | ||
| 8 | - */ | 1 | +/* |
| 2 | + * jQuery table2excel - v1.1.1 | ||
| 3 | + * jQuery plugin to export an .xls file in browser from an HTML table | ||
| 4 | + * https://github.com/rainabba/jquery-table2excel | ||
| 5 | + * | ||
| 6 | + * Made by rainabba | ||
| 7 | + * Under MIT License | ||
| 8 | + */ | ||
| 9 | !function(a,b,c,d){function e(b,c){this.element=b,this.settings=a.extend({},k,c),this._defaults=k,this._name=j,this.init()}function f(a){return a.filename?a.filename:"table2excel"}function g(a){var b=/(\s+alt\s*=\s*"([^"]*)"|\s+alt\s*=\s*'([^']*)')/i;return a.replace(/<img[^>]*>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}function h(a){return a.replace(/<a[^>]*>|<\/a>/gi,"")}function i(a){var b=/(\s+value\s*=\s*"([^"]*)"|\s+value\s*=\s*'([^']*)')/i;return a.replace(/<input[^>]*>|<\/input>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}var j="table2excel",k={exclude:".noExl",name:"Table2Excel",filename:"table2excel",fileext:".xls",exclude_img:!0,exclude_links:!0,exclude_inputs:!0};e.prototype={init:function(){var b=this;b.template={head:'<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8"><head>\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets>',sheet:{head:"<x:ExcelWorksheet><x:Name>",tail:"</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>"},mid:"</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e</head><body>",table:{head:"<table>",tail:"</table>"},foot:"</body></html>"},b.tableRows=[],a(b.element).each(function(c,d){var e="";a(d).find("tr").not(b.settings.exclude).each(function(c,d){e+="<tr>",a(d).find("td,th").not(b.settings.exclude).each(function(c,d){var f={rows:a(this).attr("rowspan"),cols:a(this).attr("colspan"),flag:a(d).find(b.settings.exclude)};f.flag.length>0?e+="<td> </td>":f.rows&f.cols?e+="<td>"+a(d).html()+"</td>":(e+="<td",f.rows>0&&(e+=" rowspan='"+f.rows+"' "),f.cols>0&&(e+=" colspan='"+f.cols+"' "),e+="/>"+a(d).html()+"</td>")}),e+="</tr>"}),b.settings.exclude_img&&(e=g(e)),b.settings.exclude_links&&(e=h(e)),b.settings.exclude_inputs&&(e=i(e)),b.tableRows.push(e)}),b.tableToExcel(b.tableRows,b.settings.name,b.settings.sheetName)},tableToExcel:function(d,e,g){var h,i,j,k=this,l="";if(k.format=function(a,b){return a.replace(/{(\w+)}/g,function(a,c){return b[c]})},g=void 0===g?"Sheet":g,k.ctx={worksheet:e||"Worksheet",table:d,sheetName:g},l=k.template.head,a.isArray(d))for(h in d)l+=k.template.sheet.head+g+h+k.template.sheet.tail;if(l+=k.template.mid,a.isArray(d))for(h in d)l+=k.template.table.head+"{table"+h+"}"+k.template.table.tail;l+=k.template.foot;for(h in d)k.ctx["table"+h]=d[h];if(delete k.ctx.table,!c.documentMode){var m=new Blob([k.format(l,k.ctx)],{type:"application/vnd.ms-excel"});b.URL=b.URL||b.webkitURL,i=b.URL.createObjectURL(m),j=c.createElement("a"),j.download=f(k.settings),j.href=i,c.body.appendChild(j),j.click(),c.body.removeChild(j)}else if("undefined"!=typeof Blob){l=k.format(l,k.ctx),l=[l];var n=new Blob(l,{type:"text/html"});b.navigator.msSaveBlob(n,f(k.settings))}else txtArea1.document.open("text/html","replace"),txtArea1.document.write(k.format(l,k.ctx)),txtArea1.document.close(),txtArea1.focus(),sa=txtArea1.document.execCommand("SaveAs",!0,f(k.settings));return!0}},a.fn[j]=function(b){var c=this;return c.each(function(){a.data(c,"plugin_"+j)||a.data(c,"plugin_"+j,new e(this,b))}),c}}(jQuery,window,document); | 9 | !function(a,b,c,d){function e(b,c){this.element=b,this.settings=a.extend({},k,c),this._defaults=k,this._name=j,this.init()}function f(a){return a.filename?a.filename:"table2excel"}function g(a){var b=/(\s+alt\s*=\s*"([^"]*)"|\s+alt\s*=\s*'([^']*)')/i;return a.replace(/<img[^>]*>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}function h(a){return a.replace(/<a[^>]*>|<\/a>/gi,"")}function i(a){var b=/(\s+value\s*=\s*"([^"]*)"|\s+value\s*=\s*'([^']*)')/i;return a.replace(/<input[^>]*>|<\/input>/gi,function(a){var c=b.exec(a);return null!==c&&c.length>=2?c[2]:""})}var j="table2excel",k={exclude:".noExl",name:"Table2Excel",filename:"table2excel",fileext:".xls",exclude_img:!0,exclude_links:!0,exclude_inputs:!0};e.prototype={init:function(){var b=this;b.template={head:'<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:excel" xmlns="http://www.w3.org/TR/REC-html40"><meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8"><head>\x3c!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets>',sheet:{head:"<x:ExcelWorksheet><x:Name>",tail:"</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet>"},mid:"</x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--\x3e</head><body>",table:{head:"<table>",tail:"</table>"},foot:"</body></html>"},b.tableRows=[],a(b.element).each(function(c,d){var e="";a(d).find("tr").not(b.settings.exclude).each(function(c,d){e+="<tr>",a(d).find("td,th").not(b.settings.exclude).each(function(c,d){var f={rows:a(this).attr("rowspan"),cols:a(this).attr("colspan"),flag:a(d).find(b.settings.exclude)};f.flag.length>0?e+="<td> </td>":f.rows&f.cols?e+="<td>"+a(d).html()+"</td>":(e+="<td",f.rows>0&&(e+=" rowspan='"+f.rows+"' "),f.cols>0&&(e+=" colspan='"+f.cols+"' "),e+="/>"+a(d).html()+"</td>")}),e+="</tr>"}),b.settings.exclude_img&&(e=g(e)),b.settings.exclude_links&&(e=h(e)),b.settings.exclude_inputs&&(e=i(e)),b.tableRows.push(e)}),b.tableToExcel(b.tableRows,b.settings.name,b.settings.sheetName)},tableToExcel:function(d,e,g){var h,i,j,k=this,l="";if(k.format=function(a,b){return a.replace(/{(\w+)}/g,function(a,c){return b[c]})},g=void 0===g?"Sheet":g,k.ctx={worksheet:e||"Worksheet",table:d,sheetName:g},l=k.template.head,a.isArray(d))for(h in d)l+=k.template.sheet.head+g+h+k.template.sheet.tail;if(l+=k.template.mid,a.isArray(d))for(h in d)l+=k.template.table.head+"{table"+h+"}"+k.template.table.tail;l+=k.template.foot;for(h in d)k.ctx["table"+h]=d[h];if(delete k.ctx.table,!c.documentMode){var m=new Blob([k.format(l,k.ctx)],{type:"application/vnd.ms-excel"});b.URL=b.URL||b.webkitURL,i=b.URL.createObjectURL(m),j=c.createElement("a"),j.download=f(k.settings),j.href=i,c.body.appendChild(j),j.click(),c.body.removeChild(j)}else if("undefined"!=typeof Blob){l=k.format(l,k.ctx),l=[l];var n=new Blob(l,{type:"text/html"});b.navigator.msSaveBlob(n,f(k.settings))}else txtArea1.document.open("text/html","replace"),txtArea1.document.write(k.format(l,k.ctx)),txtArea1.document.close(),txtArea1.focus(),sa=txtArea1.document.execCommand("SaveAs",!0,f(k.settings));return!0}},a.fn[j]=function(b){var c=this;return c.each(function(){a.data(c,"plugin_"+j)||a.data(c,"plugin_"+j,new e(this,b))}),c}}(jQuery,window,document); |
| 10 | \ No newline at end of file | 10 | \ No newline at end of file |
src/main/resources/static/real_control_v2/css/line_schedule.css
| @@ -97,7 +97,7 @@ | @@ -97,7 +97,7 @@ | ||
| 97 | } | 97 | } |
| 98 | 98 | ||
| 99 | .line-schedule-table dl dt:nth-of-type(3), .line-schedule-table dl dd:nth-of-type(3) { | 99 | .line-schedule-table dl dt:nth-of-type(3), .line-schedule-table dl dd:nth-of-type(3) { |
| 100 | - width: calc(2% + 66px); | 100 | + width: calc(3% + 66px); |
| 101 | position: relative; | 101 | position: relative; |
| 102 | } | 102 | } |
| 103 | .line-schedule-table dl dd:nth-of-type(3)>i{ | 103 | .line-schedule-table dl dd:nth-of-type(3)>i{ |
| @@ -118,7 +118,7 @@ | @@ -118,7 +118,7 @@ | ||
| 118 | } | 118 | } |
| 119 | 119 | ||
| 120 | .line-schedule-table dl dt:nth-of-type(6), .line-schedule-table dl dd:nth-of-type(6) { | 120 | .line-schedule-table dl dt:nth-of-type(6), .line-schedule-table dl dd:nth-of-type(6) { |
| 121 | - width: calc(13% + 18px); | 121 | + width: calc(12% + 18px); |
| 122 | /*color: #676767;*/ | 122 | /*color: #676767;*/ |
| 123 | } | 123 | } |
| 124 | 124 |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/main.html
| @@ -321,7 +321,7 @@ | @@ -321,7 +321,7 @@ | ||
| 321 | for(var i=0,p;p=parks[i++];) | 321 | for(var i=0,p;p=parks[i++];) |
| 322 | park_opts += '<option value="' + p.code + '">' + p.name + '</option>'; | 322 | park_opts += '<option value="' + p.code + '">' + p.name + '</option>'; |
| 323 | /*for (var code in parks) | 323 | /*for (var code in parks) |
| 324 | - park_opts += '<option value="' + code + '">' + parks[code] + '</option>';*/ | 324 | + park_opts += '<option value="' + code + '">' + parks[code] + '</option>';*/ |
| 325 | 325 | ||
| 326 | var qdz = $f('startStation', f), zdz = $f('endStation', f), mType = $f('mileageType', f); | 326 | var qdz = $f('startStation', f), zdz = $f('endStation', f), mType = $f('mileageType', f); |
| 327 | var domainsTemp; | 327 | var domainsTemp; |
| @@ -663,9 +663,9 @@ | @@ -663,9 +663,9 @@ | ||
| 663 | }); | 663 | }); |
| 664 | 664 | ||
| 665 | /*var rs = {}; | 665 | /*var rs = {}; |
| 666 | - $.each(array, function () { | ||
| 667 | - rs[this.code]=this.name; | ||
| 668 | - });*/ | 666 | + $.each(array, function () { |
| 667 | + rs[this.code]=this.name; | ||
| 668 | + });*/ | ||
| 669 | 669 | ||
| 670 | return array; | 670 | return array; |
| 671 | } | 671 | } |
src/main/resources/static/real_control_v2/fragments/north/nav/all_devices.html
| @@ -181,7 +181,7 @@ | @@ -181,7 +181,7 @@ | ||
| 181 | if(lineCode) | 181 | if(lineCode) |
| 182 | data.lineId=lineCode; | 182 | data.lineId=lineCode; |
| 183 | } | 183 | } |
| 184 | - $.get('/gps/real/all', data, function(rs) { | 184 | + $.get('/gps/real/all?t=' + Math.random(), data, function(rs) { |
| 185 | //数据转换 | 185 | //数据转换 |
| 186 | var code2Name=gb_data_basic.lineCode2NameAll(); | 186 | var code2Name=gb_data_basic.lineCode2NameAll(); |
| 187 | $.each(rs.list, function(){ | 187 | $.each(rs.list, function(){ |
src/main/resources/static/real_control_v2/fragments/north/nav/history_sch_maintain.html
| @@ -438,12 +438,12 @@ | @@ -438,12 +438,12 @@ | ||
| 438 | }); | 438 | }); |
| 439 | 439 | ||
| 440 | //统计路单 -娄高峰 | 440 | //统计路单 -娄高峰 |
| 441 | - /*gb_common.$get('/calcWaybill/generateNew', {date:rq, line: lineCode}, function () { | 441 | + gb_common.$get('/calcWaybill/generateNew', {date:rq, line: lineCode}, function () { |
| 442 | reCountEp.emitLater('calcWaybill'); | 442 | reCountEp.emitLater('calcWaybill'); |
| 443 | - });*/ | 443 | + }); |
| 444 | 444 | ||
| 445 | //统计油 -廖磊 | 445 | //统计油 -廖磊 |
| 446 | - gb_common.$post('/ylb/updateHistory', {date:rq, line: lineCode}, function () { | 446 | + gb_common.$post('/ylb/updateHistoryJd', {date:rq, line: lineCode}, function () { |
| 447 | reCountEp.emitLater('ylbUpdate'); | 447 | reCountEp.emitLater('ylbUpdate'); |
| 448 | }); | 448 | }); |
| 449 | 449 |