Commit 244d55e9fa0df41a56613c9d2c68ce05588da357
Update
Showing
33 changed files
with
2666 additions
and
1477 deletions
Too many changes to show.
To preserve performance only 33 of 49 files are displayed.
src/main/java/com/bsth/controller/LineController.java
| @@ -47,6 +47,16 @@ public class LineController extends BaseController<Line, Integer> { | @@ -47,6 +47,16 @@ public class LineController extends BaseController<Line, Integer> { | ||
| 47 | } | 47 | } |
| 48 | 48 | ||
| 49 | /** | 49 | /** |
| 50 | + * 验证线路编码是否存在 | ||
| 51 | + * | ||
| 52 | + * @return Map < {valid: true }:是否通过验证> | ||
| 53 | + */ | ||
| 54 | + @RequestMapping(value = "lineCodeVerification", method = RequestMethod.GET) | ||
| 55 | + public String lineCodeVerification(@RequestParam(defaultValue = "lineCode") String lineCode) { | ||
| 56 | + return service.lineCodeVerification(lineCode); | ||
| 57 | + } | ||
| 58 | + | ||
| 59 | + /** | ||
| 50 | * | 60 | * |
| 51 | * 保存 | 61 | * 保存 |
| 52 | * | 62 | * |
| @@ -59,7 +69,7 @@ public class LineController extends BaseController<Line, Integer> { | @@ -59,7 +69,7 @@ public class LineController extends BaseController<Line, Integer> { | ||
| 59 | t.setId(Integer.valueOf(t.getLineCode())); | 69 | t.setId(Integer.valueOf(t.getLineCode())); |
| 60 | 70 | ||
| 61 | } | 71 | } |
| 62 | - if( (t.getId().toString().length()) > 6) { | 72 | + if( (t.getId().toString().length()) > 6 || service.lineCodeVerification(t.getLineCode()).equals("false") ) { |
| 63 | 73 | ||
| 64 | map.put("status", ResponseCode.ERROR); | 74 | map.put("status", ResponseCode.ERROR); |
| 65 | return map; | 75 | return map; |
src/main/java/com/bsth/controller/report/ReportController.java
| @@ -82,7 +82,8 @@ public class ReportController { | @@ -82,7 +82,8 @@ public class ReportController { | ||
| 82 | @RequestMapping(value="/queryStrinon" ,method = RequestMethod.GET) | 82 | @RequestMapping(value="/queryStrinon" ,method = RequestMethod.GET) |
| 83 | public List<StationRoute> queryStrinon(@RequestParam String line, | 83 | public List<StationRoute> queryStrinon(@RequestParam String line, |
| 84 | @RequestParam int zd){ | 84 | @RequestParam int zd){ |
| 85 | - return service.queryStrinon(line,zd); | 85 | + List<StationRoute> list=service.queryStrinon(line,zd); |
| 86 | + return list; | ||
| 86 | } | 87 | } |
| 87 | //根据排班查到离站 | 88 | //根据排班查到离站 |
| 88 | @RequestMapping(value="/queryInOutStrtion" ,method = RequestMethod.GET) | 89 | @RequestMapping(value="/queryInOutStrtion" ,method = RequestMethod.GET) |
src/main/java/com/bsth/data/directive/DayOfDirectives.java
| @@ -156,7 +156,7 @@ public class DayOfDirectives { | @@ -156,7 +156,7 @@ public class DayOfDirectives { | ||
| 156 | Collection<D60> d60s = d60Map.values(); | 156 | Collection<D60> d60s = d60Map.values(); |
| 157 | List<D60> rem60List = new ArrayList<>(); | 157 | List<D60> rem60List = new ArrayList<>(); |
| 158 | for(D60 d60 : d60s){ | 158 | for(D60 d60 : d60s){ |
| 159 | - if(d60.getDeviceId().equals(device)) | 159 | + if(device.equals(d60.getDeviceId())) |
| 160 | rem60List.add(d60); | 160 | rem60List.add(d60); |
| 161 | } | 161 | } |
| 162 | //清除60数据 | 162 | //清除60数据 |
| @@ -173,7 +173,7 @@ public class DayOfDirectives { | @@ -173,7 +173,7 @@ public class DayOfDirectives { | ||
| 173 | Collection<D64> d64s = d64Map.values(); | 173 | Collection<D64> d64s = d64Map.values(); |
| 174 | List<D64> rem64List = new ArrayList<>(); | 174 | List<D64> rem64List = new ArrayList<>(); |
| 175 | for(D64 d64 : d64s){ | 175 | for(D64 d64 : d64s){ |
| 176 | - if(d64.getDeviceId().equals(device)) | 176 | + if(device.equals(d64.getDeviceId())) |
| 177 | rem64List.add(d64); | 177 | rem64List.add(d64); |
| 178 | } | 178 | } |
| 179 | 179 |
src/main/java/com/bsth/data/gpsdata/arrival/handlers/InOutStationSignalHandle.java
| @@ -175,7 +175,7 @@ public class InOutStationSignalHandle extends SignalHandle{ | @@ -175,7 +175,7 @@ public class InOutStationSignalHandle extends SignalHandle{ | ||
| 175 | dayOfSchedule.save(sch); | 175 | dayOfSchedule.save(sch); |
| 176 | 176 | ||
| 177 | //清理应发未发标记 | 177 | //清理应发未发标记 |
| 178 | - LateAdjustHandle.remove(sch); | 178 | + LateAdjustHandle.remove(sch.getClZbh()); |
| 179 | 179 | ||
| 180 | if(!gps.isService() && !dayOfSchedule.emptyService(sch)){ | 180 | if(!gps.isService() && !dayOfSchedule.emptyService(sch)){ |
| 181 | //切换成营运状态 | 181 | //切换成营运状态 |
| @@ -358,6 +358,8 @@ public class InOutStationSignalHandle extends SignalHandle{ | @@ -358,6 +358,8 @@ public class InOutStationSignalHandle extends SignalHandle{ | ||
| 358 | //通知客户端 | 358 | //通知客户端 |
| 359 | sendUtils.sendZdsj(sch, lpNext, doneSum); | 359 | sendUtils.sendZdsj(sch, lpNext, doneSum); |
| 360 | logger.info("车辆:" + sch.getClZbh() + " 班次:" + sch.getDfsj() + "到终点, 时间:" + sch.getZdsjActual()); | 360 | logger.info("车辆:" + sch.getClZbh() + " 班次:" + sch.getDfsj() + "到终点, 时间:" + sch.getZdsjActual()); |
| 361 | + //清除车辆误点调整监听 | ||
| 362 | + LateAdjustHandle.remove(sch.getClZbh()); | ||
| 361 | //准备执行下一个班次 | 363 | //准备执行下一个班次 |
| 362 | if (next != null) { | 364 | if (next != null) { |
| 363 | //将gps转换为下一个班次走向的站内信号 | 365 | //将gps转换为下一个班次走向的站内信号 |
| @@ -482,7 +484,7 @@ public class InOutStationSignalHandle extends SignalHandle{ | @@ -482,7 +484,7 @@ public class InOutStationSignalHandle extends SignalHandle{ | ||
| 482 | boolean limitPark = StringUtils.isNotEmpty(park); | 484 | boolean limitPark = StringUtils.isNotEmpty(park); |
| 483 | 485 | ||
| 484 | 486 | ||
| 485 | - if (next.getBcType().equals("in") && config.getOutConfig() == 2 && (next.getBcsj()==0 || next.getJhlcOrig().equals(0)) | 487 | + if (next.getBcType().equals("in") && config.getOutConfig() == 2 && (next.getBcsj()==0 || next.getJhlcOrig().intValue()==0) |
| 486 | && (!limitPark || park.equals(next.getZdzCode()))) { | 488 | && (!limitPark || park.equals(next.getZdzCode()))) { |
| 487 | 489 | ||
| 488 | next.setFcsjActualAll(sch.getZdsjActualTime()); | 490 | next.setFcsjActualAll(sch.getZdsjActualTime()); |
src/main/java/com/bsth/data/gpsdata/recovery/GpsDataRecovery.java
| @@ -84,7 +84,7 @@ public class GpsDataRecovery implements ApplicationContextAware { | @@ -84,7 +84,7 @@ public class GpsDataRecovery implements ApplicationContextAware { | ||
| 84 | Calendar calendar = Calendar.getInstance(); | 84 | Calendar calendar = Calendar.getInstance(); |
| 85 | int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR); | 85 | int dayOfYear = calendar.get(Calendar.DAY_OF_YEAR); |
| 86 | 86 | ||
| 87 | - String sql = "select DEVICE_ID,LAT,LON,TS,SPEED_GPS,LINE_ID,SERVICE_STATE from bsth_c_gps_info where days_year=267";// + dayOfYear; | 87 | + String sql = "select DEVICE_ID,LAT,LON,TS,SPEED_GPS,LINE_ID,SERVICE_STATE from bsth_c_gps_info where days_year=285";// + dayOfYear; |
| 88 | JdbcTemplate jdbcTemplate = new JdbcTemplate(DBUtils_MS.getDataSource()); | 88 | JdbcTemplate jdbcTemplate = new JdbcTemplate(DBUtils_MS.getDataSource()); |
| 89 | 89 | ||
| 90 | List<GpsEntity> list = | 90 | List<GpsEntity> list = |
src/main/java/com/bsth/data/pilot80/PilotReport.java
| @@ -162,6 +162,15 @@ public class PilotReport { | @@ -162,6 +162,15 @@ public class PilotReport { | ||
| 162 | 162 | ||
| 163 | LineConfig conf = lineConfigData.get(sch.getXlBm()); | 163 | LineConfig conf = lineConfigData.get(sch.getXlBm()); |
| 164 | if (conf.getOutConfig() == 1) { | 164 | if (conf.getOutConfig() == 1) { |
| 165 | + | ||
| 166 | + try{ | ||
| 167 | + //最大允许时间阈值 2 小时 | ||
| 168 | + if(Math.abs(d80.getTimestamp() - sch.getDfsjT()) > 1000 * 60 * 60 * 2) | ||
| 169 | + return; | ||
| 170 | + }catch (Exception e){ | ||
| 171 | + logger.error("", e); | ||
| 172 | + } | ||
| 173 | + | ||
| 165 | //为相关班次写入请求出场时间 | 174 | //为相关班次写入请求出场时间 |
| 166 | sch.setFcsjActualAll(d80.getTimestamp()); | 175 | sch.setFcsjActualAll(d80.getTimestamp()); |
| 167 | 176 |
src/main/java/com/bsth/data/schedule/late_adjust/LateAdjustHandle.java
| @@ -102,12 +102,26 @@ public class LateAdjustHandle implements ApplicationContextAware{ | @@ -102,12 +102,26 @@ public class LateAdjustHandle implements ApplicationContextAware{ | ||
| 102 | sch.setLate2(false); | 102 | sch.setLate2(false); |
| 103 | sch.setLateMinute(0); | 103 | sch.setLateMinute(0); |
| 104 | sch.setDfAuto(false); | 104 | sch.setDfAuto(false); |
| 105 | + | ||
| 106 | + logger.info("移除误点调整 -" + sch.getClZbh()); | ||
| 105 | } | 107 | } |
| 106 | }catch (Exception e){ | 108 | }catch (Exception e){ |
| 107 | logger.error("", e); | 109 | logger.error("", e); |
| 108 | } | 110 | } |
| 109 | } | 111 | } |
| 110 | 112 | ||
| 113 | + public static void remove(String nbbm){ | ||
| 114 | + if(lateSchMap.containsKey(nbbm)){ | ||
| 115 | + ScheduleRealInfo sch = lateSchMap.get(nbbm); | ||
| 116 | + sch.setLate2(false); | ||
| 117 | + sch.setLateMinute(0); | ||
| 118 | + sch.setDfAuto(false); | ||
| 119 | + | ||
| 120 | + lateSchMap.remove(nbbm); | ||
| 121 | + logger.info("移除误点调整 nbbm -" + nbbm); | ||
| 122 | + } | ||
| 123 | + } | ||
| 124 | + | ||
| 111 | /** | 125 | /** |
| 112 | * 车辆到站 | 126 | * 车辆到站 |
| 113 | * @param gps | 127 | * @param gps |
| @@ -127,10 +141,17 @@ public class LateAdjustHandle implements ApplicationContextAware{ | @@ -127,10 +141,17 @@ public class LateAdjustHandle implements ApplicationContextAware{ | ||
| 127 | /*&& sch.getLateMinute() > 0*/){ | 141 | /*&& sch.getLateMinute() > 0*/){ |
| 128 | //自动调整待发 到达时间 + 停靠时间 | 142 | //自动调整待发 到达时间 + 停靠时间 |
| 129 | long dt = Arith.addLong(gps.getTimestamp(), (sch.getLateMinute() * 60 * 1000)); | 143 | long dt = Arith.addLong(gps.getTimestamp(), (sch.getLateMinute() * 60 * 1000)); |
| 130 | - sch.setDfsjAll(dt); | ||
| 131 | - sch.setDfAuto(true); | ||
| 132 | - //取消应发未到标记 | ||
| 133 | - sch.setLate2(false); | 144 | + |
| 145 | + //超过2小时最大阈值,放弃 -临时代码,待删除 | ||
| 146 | + if(Math.abs(dt - sch.getDfsjT()) > 1000 * 60 * 60 * 2){ | ||
| 147 | + logger.info(sch.getClZbh() + " 超过误点调整阈值,放弃"); | ||
| 148 | + } | ||
| 149 | + else{ | ||
| 150 | + sch.setDfsjAll(dt); | ||
| 151 | + sch.setDfAuto(true); | ||
| 152 | + //取消应发未到标记 | ||
| 153 | + sch.setLate2(false); | ||
| 154 | + } | ||
| 134 | 155 | ||
| 135 | lateSchMap.remove(sch.getClZbh()); | 156 | lateSchMap.remove(sch.getClZbh()); |
| 136 | logger.info("【应发未到】车辆到站 " + sch.getClZbh() + " -" + sch.getDfsj() + " -到站时间:" + gps.getTimestamp() + " -停靠时间:" + sch.getLateMinute() + " -自动设置的待发时间:" + dt); | 157 | logger.info("【应发未到】车辆到站 " + sch.getClZbh() + " -" + sch.getDfsj() + " -到站时间:" + gps.getTimestamp() + " -停靠时间:" + sch.getLateMinute() + " -自动设置的待发时间:" + dt); |
src/main/java/com/bsth/service/LineService.java
| 1 | package com.bsth.service; | 1 | package com.bsth.service; |
| 2 | 2 | ||
| 3 | +import java.util.Map; | ||
| 4 | + | ||
| 3 | import org.springframework.web.bind.annotation.RequestMapping; | 5 | import org.springframework.web.bind.annotation.RequestMapping; |
| 4 | import org.springframework.web.bind.annotation.RequestMethod; | 6 | import org.springframework.web.bind.annotation.RequestMethod; |
| 5 | 7 | ||
| @@ -32,4 +34,6 @@ public interface LineService extends BaseService<Line, Integer> { | @@ -32,4 +34,6 @@ public interface LineService extends BaseService<Line, Integer> { | ||
| 32 | Line findByLineCode(String lineCode); | 34 | Line findByLineCode(String lineCode); |
| 33 | 35 | ||
| 34 | Line findById(Integer id); | 36 | Line findById(Integer id); |
| 37 | + | ||
| 38 | + String lineCodeVerification(String lineCode); | ||
| 35 | } | 39 | } |
src/main/java/com/bsth/service/impl/BusIntervalServiceImpl.java
| @@ -1645,73 +1645,79 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -1645,73 +1645,79 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 1645 | } | 1645 | } |
| 1646 | for(String key : keyMap.keySet()){ | 1646 | for(String key : keyMap.keySet()){ |
| 1647 | Map<String, Object> tempMap = new HashMap<String, Object>(); | 1647 | Map<String, Object> tempMap = new HashMap<String, Object>(); |
| 1648 | - int jhbc = 0; | ||
| 1649 | - int sjbc = 0; | ||
| 1650 | - int jhlc = 0; | ||
| 1651 | - int sjlc = 0; | ||
| 1652 | - int lzbc = 0, lzlc = 0, dmbc = 0, dmlc = 0, | ||
| 1653 | - gzbc = 0, gzlc = 0, jfbc = 0, jflc = 0, | ||
| 1654 | - zsbc = 0, zslc = 0, qrbc = 0, qrlc = 0, | ||
| 1655 | - qcbc = 0, qclc = 0, kxbc = 0, kxlc = 0, | ||
| 1656 | - qhbc = 0, qhlc = 0, wybc = 0, wylc = 0; | ||
| 1657 | - int qtbc = 0, qtlc = 0; | 1648 | + int jhbc = 0, sjbc = 0, |
| 1649 | + lzbc = 0, dmbc = 0, | ||
| 1650 | + gzbc = 0, jfbc = 0, zsbc = 0, | ||
| 1651 | + qrbc = 0, qcbc = 0, kxbc = 0, | ||
| 1652 | + qhbc = 0, wybc = 0, qtbc = 0; | ||
| 1653 | + BigDecimal jhlc = new BigDecimal("0"), sjlc = new BigDecimal("0"), | ||
| 1654 | + lzlc = new BigDecimal("0"), dmlc = new BigDecimal("0"), | ||
| 1655 | + gzlc = new BigDecimal("0"), jflc = new BigDecimal("0"), | ||
| 1656 | + zslc = new BigDecimal("0"), qrlc = new BigDecimal("0"), | ||
| 1657 | + qclc = new BigDecimal("0"), kxlc = new BigDecimal("0"), | ||
| 1658 | + qhlc = new BigDecimal("0"), wylc = new BigDecimal("0"), | ||
| 1659 | + qtlc = new BigDecimal("0"); | ||
| 1658 | String companyName = "", subCompanyName = ""; | 1660 | String companyName = "", subCompanyName = ""; |
| 1659 | for(ScheduleRealInfo schedule : keyMap.get(key)){ | 1661 | for(ScheduleRealInfo schedule : keyMap.get(key)){ |
| 1660 | if(schedule.getGsName() != null && companyName.length() == 0) | 1662 | if(schedule.getGsName() != null && companyName.length() == 0) |
| 1661 | companyName = schedule.getGsName(); | 1663 | companyName = schedule.getGsName(); |
| 1662 | if(schedule.getFgsName() != null && subCompanyName.length() == 0) | 1664 | if(schedule.getFgsName() != null && subCompanyName.length() == 0) |
| 1663 | subCompanyName = schedule.getFgsName(); | 1665 | subCompanyName = schedule.getFgsName(); |
| 1664 | - double lc = 0d; | 1666 | + BigDecimal lc = new BigDecimal("0"); |
| 1665 | if(schedule.getJhlcOrig() != null && schedule.getJhlcOrig() > 0.1d){ | 1667 | if(schedule.getJhlcOrig() != null && schedule.getJhlcOrig() > 0.1d){ |
| 1666 | - lc = schedule.getJhlcOrig(); | 1668 | + lc = new BigDecimal("0"+schedule.getJhlcOrig()); |
| 1667 | } else { | 1669 | } else { |
| 1668 | - lc = schedule.getJhlc(); | 1670 | + lc = new BigDecimal("0"+schedule.getJhlc()); |
| 1669 | } | 1671 | } |
| 1670 | 1672 | ||
| 1671 | if(!schedule.isSflj()){ | 1673 | if(!schedule.isSflj()){ |
| 1672 | jhbc++; | 1674 | jhbc++; |
| 1673 | - jhlc += lc; | 1675 | + jhlc = jhlc.add(lc); |
| 1674 | } | 1676 | } |
| 1675 | if(schedule.getStatus() != -1){ | 1677 | if(schedule.getStatus() != -1){ |
| 1676 | sjbc++; | 1678 | sjbc++; |
| 1677 | - sjlc += lc; | 1679 | + sjlc = sjlc.add(lc); |
| 1678 | } else if(schedule.getStatus() == -1){ | 1680 | } else if(schedule.getStatus() == -1){ |
| 1679 | if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("路阻") != -1){ | 1681 | if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("路阻") != -1){ |
| 1680 | lzbc++; | 1682 | lzbc++; |
| 1681 | - lzlc += lc; | 1683 | + lzlc = lzlc.add(lc); |
| 1682 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("吊慢") != -1){ | 1684 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("吊慢") != -1){ |
| 1683 | dmbc++; | 1685 | dmbc++; |
| 1684 | - dmlc += lc; | 1686 | + dmlc = dmlc.add(lc); |
| 1685 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("故障") != -1){ | 1687 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("故障") != -1){ |
| 1686 | gzbc++; | 1688 | gzbc++; |
| 1687 | - gzlc += lc; | 1689 | + gzlc = gzlc.add(lc); |
| 1688 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("纠纷") != -1){ | 1690 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("纠纷") != -1){ |
| 1689 | jfbc++; | 1691 | jfbc++; |
| 1690 | - jflc += lc; | 1692 | + jflc = jflc.add(lc); |
| 1691 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("肇事") != -1){ | 1693 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("肇事") != -1){ |
| 1692 | zsbc++; | 1694 | zsbc++; |
| 1693 | - zslc += lc; | 1695 | + zslc = zslc.add(lc); |
| 1694 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("缺人") != -1){ | 1696 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("缺人") != -1){ |
| 1695 | qrbc++; | 1697 | qrbc++; |
| 1696 | - qrlc += lc; | 1698 | + qrlc = qrlc.add(lc); |
| 1697 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("缺车") != -1){ | 1699 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("缺车") != -1){ |
| 1698 | qcbc++; | 1700 | qcbc++; |
| 1699 | - qclc += lc; | 1701 | + qclc = qclc.add(lc); |
| 1700 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("客稀") != -1){ | 1702 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("客稀") != -1){ |
| 1701 | kxbc++; | 1703 | kxbc++; |
| 1702 | - kxlc += lc; | 1704 | + kxlc = kxlc.add(lc); |
| 1703 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("气候") != -1){ | 1705 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("气候") != -1){ |
| 1704 | qhbc++; | 1706 | qhbc++; |
| 1705 | - qhlc += lc; | 1707 | + qhlc = qhlc.add(lc); |
| 1706 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("外援") != -1){ | 1708 | }else if(schedule.getAdjustExps() != null && schedule.getAdjustExps().indexOf("外援") != -1){ |
| 1707 | wybc++; | 1709 | wybc++; |
| 1708 | - wylc += lc; | 1710 | + wylc = wylc.add(lc); |
| 1709 | } else { | 1711 | } else { |
| 1710 | qtbc++; | 1712 | qtbc++; |
| 1711 | - qtlc += lc; | 1713 | + qtlc = qtlc.add(lc); |
| 1712 | } | 1714 | } |
| 1713 | } | 1715 | } |
| 1714 | } | 1716 | } |
| 1717 | + boolean flag = true; | ||
| 1718 | + if(jhlc.toString().equals("0")){ | ||
| 1719 | + flag = false; | ||
| 1720 | + } | ||
| 1715 | tempMap.put("date", Date); | 1721 | tempMap.put("date", Date); |
| 1716 | tempMap.put("company", companyName); | 1722 | tempMap.put("company", companyName); |
| 1717 | tempMap.put("subCompany", subCompanyName); | 1723 | tempMap.put("subCompany", subCompanyName); |
| @@ -1720,42 +1726,43 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -1720,42 +1726,43 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 1720 | tempMap.put("jhbc", jhbc); | 1726 | tempMap.put("jhbc", jhbc); |
| 1721 | tempMap.put("sjbc", sjbc); | 1727 | tempMap.put("sjbc", sjbc); |
| 1722 | tempMap.put("bcbfb", df.format(jhbc>0?(double)sjbc/jhbc*100:0)+"%"); | 1728 | tempMap.put("bcbfb", df.format(jhbc>0?(double)sjbc/jhbc*100:0)+"%"); |
| 1723 | - tempMap.put("jhlc", jhlc); | ||
| 1724 | - tempMap.put("sjlc", sjlc); | ||
| 1725 | - tempMap.put("lcbfb", df.format(jhlc>0?(double)sjlc/jhlc*100:0)+"%"); | 1729 | + tempMap.put("jhlc", jhlc.doubleValue()); |
| 1730 | + tempMap.put("sjlc", sjlc.doubleValue()); | ||
| 1731 | +// tempMap.put("lcbfb", df.format(flag?(double)sjlc/jhlc*100:0)+"%"); | ||
| 1732 | + tempMap.put("lcbfb", df.format(flag?sjlc.divide(jhlc, 4, BigDecimal.ROUND_HALF_UP).doubleValue()*100:0)+"%"); | ||
| 1726 | tempMap.put("lzbc", lzbc); | 1733 | tempMap.put("lzbc", lzbc); |
| 1727 | - tempMap.put("lzlc", lzlc); | ||
| 1728 | - tempMap.put("lzbfb", df.format(jhlc>0?(double)lzbc/jhbc*100:0)+"%"); | 1734 | + tempMap.put("lzlc", lzlc.doubleValue()); |
| 1735 | + tempMap.put("lzbfb", df.format(flag?(double)lzbc/jhbc*100:0)+"%"); | ||
| 1729 | tempMap.put("dmbc", dmbc); | 1736 | tempMap.put("dmbc", dmbc); |
| 1730 | - tempMap.put("dmlc", dmlc); | ||
| 1731 | - tempMap.put("dmbfb", df.format(jhlc>0?(double)dmbc/jhbc*100:0)+"%"); | 1737 | + tempMap.put("dmlc", dmlc.doubleValue()); |
| 1738 | + tempMap.put("dmbfb", df.format(flag?(double)dmbc/jhbc*100:0)+"%"); | ||
| 1732 | tempMap.put("gzbc", gzbc); | 1739 | tempMap.put("gzbc", gzbc); |
| 1733 | - tempMap.put("gzlc", gzlc); | ||
| 1734 | - tempMap.put("gzbfb", df.format(jhlc>0?(double)gzbc/jhbc*100:0)+"%"); | 1740 | + tempMap.put("gzlc", gzlc.doubleValue()); |
| 1741 | + tempMap.put("gzbfb", df.format(flag?(double)gzbc/jhbc*100:0)+"%"); | ||
| 1735 | tempMap.put("jfbc", jfbc); | 1742 | tempMap.put("jfbc", jfbc); |
| 1736 | - tempMap.put("jflc", jflc); | ||
| 1737 | - tempMap.put("jfbfb", df.format(jhlc>0?(double)jfbc/jhbc*100:0)+"%"); | 1743 | + tempMap.put("jflc", jflc.doubleValue()); |
| 1744 | + tempMap.put("jfbfb", df.format(flag?(double)jfbc/jhbc*100:0)+"%"); | ||
| 1738 | tempMap.put("zsbc", zsbc); | 1745 | tempMap.put("zsbc", zsbc); |
| 1739 | - tempMap.put("zslc", zslc); | ||
| 1740 | - tempMap.put("zsbfb", df.format(jhlc>0?(double)zsbc/jhbc*100:0)+"%"); | 1746 | + tempMap.put("zslc", zslc.doubleValue()); |
| 1747 | + tempMap.put("zsbfb", df.format(flag?(double)zsbc/jhbc*100:0)+"%"); | ||
| 1741 | tempMap.put("qrbc", qrbc); | 1748 | tempMap.put("qrbc", qrbc); |
| 1742 | - tempMap.put("qrlc", qrlc); | ||
| 1743 | - tempMap.put("qrbfb", df.format(jhlc>0?(double)qrbc/jhbc*100:0)+"%"); | 1749 | + tempMap.put("qrlc", qrlc.doubleValue()); |
| 1750 | + tempMap.put("qrbfb", df.format(flag?(double)qrbc/jhbc*100:0)+"%"); | ||
| 1744 | tempMap.put("qcbc", qcbc); | 1751 | tempMap.put("qcbc", qcbc); |
| 1745 | - tempMap.put("qclc", qclc); | ||
| 1746 | - tempMap.put("qcbfb", df.format(jhlc>0?(double)qcbc/jhbc*100:0)+"%"); | 1752 | + tempMap.put("qclc", qclc.doubleValue()); |
| 1753 | + tempMap.put("qcbfb", df.format(flag?(double)qcbc/jhbc*100:0)+"%"); | ||
| 1747 | tempMap.put("kxbc", kxbc); | 1754 | tempMap.put("kxbc", kxbc); |
| 1748 | - tempMap.put("kxlc", kxlc); | ||
| 1749 | - tempMap.put("kxbfb", df.format(jhlc>0?(double)kxbc/jhbc*100:0)+"%"); | 1755 | + tempMap.put("kxlc", kxlc.doubleValue()); |
| 1756 | + tempMap.put("kxbfb", df.format(flag?(double)kxbc/jhbc*100:0)+"%"); | ||
| 1750 | tempMap.put("qhbc", qhbc); | 1757 | tempMap.put("qhbc", qhbc); |
| 1751 | - tempMap.put("qhlc", qhlc); | ||
| 1752 | - tempMap.put("qhbfb", df.format(jhlc>0?(double)qhbc/jhbc*100:0)+"%"); | 1758 | + tempMap.put("qhlc", qhlc.doubleValue()); |
| 1759 | + tempMap.put("qhbfb", df.format(flag?(double)qhbc/jhbc*100:0)+"%"); | ||
| 1753 | tempMap.put("wybc", wybc); | 1760 | tempMap.put("wybc", wybc); |
| 1754 | - tempMap.put("wylc", wylc); | ||
| 1755 | - tempMap.put("wybfb", df.format(jhlc>0?(double)wybc/jhbc*100:0)+"%"); | 1761 | + tempMap.put("wylc", wylc.doubleValue()); |
| 1762 | + tempMap.put("wybfb", df.format(flag?(double)wybc/jhbc*100:0)+"%"); | ||
| 1756 | tempMap.put("qtbc", qtbc); | 1763 | tempMap.put("qtbc", qtbc); |
| 1757 | - tempMap.put("qtlc", qtlc); | ||
| 1758 | - tempMap.put("qtbfb", df.format(jhlc>0?(double)qtbc/jhbc*100:0)+"%"); | 1764 | + tempMap.put("qtlc", qtlc.doubleValue()); |
| 1765 | + tempMap.put("qtbfb", df.format(flag?(double)qtbc/jhbc*100:0)+"%"); | ||
| 1759 | 1766 | ||
| 1760 | resList.add(tempMap); | 1767 | resList.add(tempMap); |
| 1761 | } | 1768 | } |
| @@ -1777,6 +1784,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | @@ -1777,6 +1784,7 @@ public class BusIntervalServiceImpl implements BusIntervalService { | ||
| 1777 | e.printStackTrace(); | 1784 | e.printStackTrace(); |
| 1778 | } | 1785 | } |
| 1779 | } | 1786 | } |
| 1787 | + System.out.println(map); | ||
| 1780 | 1788 | ||
| 1781 | return resList; | 1789 | return resList; |
| 1782 | } | 1790 | } |
src/main/java/com/bsth/service/impl/LineServiceImpl.java
| 1 | package com.bsth.service.impl; | 1 | package com.bsth.service.impl; |
| 2 | 2 | ||
| 3 | +import java.util.HashMap; | ||
| 4 | +import java.util.Map; | ||
| 5 | + | ||
| 3 | import org.springframework.beans.factory.annotation.Autowired; | 6 | import org.springframework.beans.factory.annotation.Autowired; |
| 4 | import org.springframework.stereotype.Service; | 7 | import org.springframework.stereotype.Service; |
| 5 | 8 | ||
| @@ -50,4 +53,14 @@ public class LineServiceImpl extends BaseServiceImpl<Line, Integer> implements L | @@ -50,4 +53,14 @@ public class LineServiceImpl extends BaseServiceImpl<Line, Integer> implements L | ||
| 50 | return repository.findOne(id); | 53 | return repository.findOne(id); |
| 51 | } | 54 | } |
| 52 | 55 | ||
| 56 | + @Override | ||
| 57 | + public String lineCodeVerification(String lineCode) { | ||
| 58 | + String state = "true"; | ||
| 59 | + Line line = repository.findByLineCode(lineCode); | ||
| 60 | + if(line != null){ | ||
| 61 | + state = "false"; | ||
| 62 | + } | ||
| 63 | + return state; | ||
| 64 | + } | ||
| 65 | + | ||
| 53 | } | 66 | } |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -246,7 +246,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -246,7 +246,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 246 | 246 | ||
| 247 | schedule.setDfsjAll(dfsj); | 247 | schedule.setDfsjAll(dfsj); |
| 248 | schedule.setDfAuto(false); | 248 | schedule.setDfAuto(false); |
| 249 | - schedule.addRemarks(remarks); | 249 | + schedule.setRemarks(remarks); |
| 250 | 250 | ||
| 251 | List<ScheduleRealInfo> ts = new ArrayList<>(); | 251 | List<ScheduleRealInfo> ts = new ArrayList<>(); |
| 252 | ts.add(schedule); | 252 | ts.add(schedule); |
| @@ -2968,6 +2968,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -2968,6 +2968,14 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 2968 | bCompany=scheduleRealInfo.getFgsBm(); | 2968 | bCompany=scheduleRealInfo.getFgsBm(); |
| 2969 | fage = false; | 2969 | fage = false; |
| 2970 | } | 2970 | } |
| 2971 | + Set<ChildTaskPlan> cts = scheduleRealInfo.getcTasks(); | ||
| 2972 | + if(cts != null && cts.size() > 0){ | ||
| 2973 | + listS.add(scheduleRealInfo); | ||
| 2974 | + }else{ | ||
| 2975 | + if(scheduleRealInfo.getZdsjActual()!=null){ | ||
| 2976 | + listS.add(scheduleRealInfo); | ||
| 2977 | + } | ||
| 2978 | + } | ||
| 2971 | listS.add(scheduleRealInfo); | 2979 | listS.add(scheduleRealInfo); |
| 2972 | } | 2980 | } |
| 2973 | } | 2981 | } |
src/main/java/com/bsth/service/report/impl/CulateMileageServiceImpl.java
| @@ -71,29 +71,59 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -71,29 +71,59 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 71 | 71 | ||
| 72 | } else { | 72 | } else { |
| 73 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | 73 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); |
| 74 | - while (it.hasNext()) { | ||
| 75 | - ChildTaskPlan childTaskPlan = it.next(); | ||
| 76 | - if (childTaskPlan.isDestroy()) { | ||
| 77 | - String destroyReason = ""; | ||
| 78 | - if (childTaskPlan.getDestroyReason() == "" || childTaskPlan.getDestroyReason() == null) { | ||
| 79 | - destroyReason = "其他"; | ||
| 80 | - } else { | ||
| 81 | - destroyReason = childTaskPlan.getDestroyReason(); | 74 | + if (scheduleRealInfo.getStatus() == -1) { |
| 75 | + double zlblc=0.0; | ||
| 76 | + while (it.hasNext()) { | ||
| 77 | + ChildTaskPlan childTaskPlan = it.next(); | ||
| 78 | + if(childTaskPlan.getMileageType().equals("service")){ | ||
| 79 | + if (childTaskPlan.isDestroy()) { | ||
| 80 | + zlblc=Arith.add(zlblc,childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage()); | ||
| 81 | + } | ||
| 82 | + } | ||
| 83 | + } | ||
| 84 | + Map<String, Object> newMap = new HashMap<String, Object>(); | ||
| 85 | + String adjustExps = ""; | ||
| 86 | + if (scheduleRealInfo.getAdjustExps() == "" || scheduleRealInfo.getAdjustExps() == null) { | ||
| 87 | + adjustExps = "其他"; | ||
| 88 | + } else { | ||
| 89 | + adjustExps = scheduleRealInfo.getAdjustExps(); | ||
| 90 | + } | ||
| 91 | + newMap.put("nr", adjustExps); | ||
| 92 | + newMap.put("lp", scheduleRealInfo.getLpName()); | ||
| 93 | + newMap.put("nbbm", scheduleRealInfo.getClZbh()); | ||
| 94 | + newMap.put("jgh", scheduleRealInfo.getjGh()); | ||
| 95 | + newMap.put("dz", scheduleRealInfo.getQdzName()); | ||
| 96 | + newMap.put("sj", scheduleRealInfo.getFcsj()); | ||
| 97 | + newMap.put("lbbc", 1); | ||
| 98 | + newMap.put("lblc", zlblc); | ||
| 99 | + newMap.put("jyqp", scheduleRealInfo.getRealMileage()); | ||
| 100 | + list.add(newMap); | ||
| 101 | + }else{ | ||
| 102 | + while (it.hasNext()) { | ||
| 103 | + ChildTaskPlan childTaskPlan = it.next(); | ||
| 104 | + if (childTaskPlan.isDestroy()) { | ||
| 105 | + String destroyReason = ""; | ||
| 106 | + if (childTaskPlan.getDestroyReason() == "" || childTaskPlan.getDestroyReason() == null) { | ||
| 107 | + destroyReason = "其他"; | ||
| 108 | + } else { | ||
| 109 | + destroyReason = childTaskPlan.getDestroyReason(); | ||
| 110 | + } | ||
| 111 | + Map<String, Object> newMap = new HashMap<String, Object>(); | ||
| 112 | + newMap.put("nr", destroyReason); | ||
| 113 | + newMap.put("lp", scheduleRealInfo.getLpName()); | ||
| 114 | + newMap.put("nbbm", scheduleRealInfo.getClZbh()); | ||
| 115 | + newMap.put("jgh", scheduleRealInfo.getjGh()); | ||
| 116 | + newMap.put("dz", childTaskPlan.getStartStationName()); | ||
| 117 | + newMap.put("sj", childTaskPlan.getStartDate()); | ||
| 118 | + newMap.put("lbbc", 0); | ||
| 119 | + newMap.put("lblc", childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage()); | ||
| 120 | + newMap.put("jyqp", scheduleRealInfo.getRealMileage()); | ||
| 121 | + list.add(newMap); | ||
| 82 | } | 122 | } |
| 83 | - Map<String, Object> newMap = new HashMap<String, Object>(); | ||
| 84 | - newMap.put("nr", destroyReason); | ||
| 85 | - newMap.put("lp", scheduleRealInfo.getLpName()); | ||
| 86 | - newMap.put("nbbm", scheduleRealInfo.getClZbh()); | ||
| 87 | - newMap.put("jgh", scheduleRealInfo.getjGh()); | ||
| 88 | - newMap.put("dz", childTaskPlan.getStartStationName()); | ||
| 89 | - newMap.put("sj", childTaskPlan.getStartDate()); | ||
| 90 | - newMap.put("lbbc", 0); | ||
| 91 | - newMap.put("lblc", childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage()); | ||
| 92 | - newMap.put("jyqp", scheduleRealInfo.getRealMileage()); | ||
| 93 | - list.add(newMap); | ||
| 94 | - | ||
| 95 | } | 123 | } |
| 96 | } | 124 | } |
| 125 | + | ||
| 126 | + | ||
| 97 | } | 127 | } |
| 98 | } | 128 | } |
| 99 | } | 129 | } |
| @@ -168,12 +198,12 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -168,12 +198,12 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 168 | for (int i = 0; i < lists.size(); i++) { | 198 | for (int i = 0; i < lists.size(); i++) { |
| 169 | ScheduleRealInfo scheduleRealInfo=lists.get(i); | 199 | ScheduleRealInfo scheduleRealInfo=lists.get(i); |
| 170 | if (!isInOut(scheduleRealInfo)) { | 200 | if (!isInOut(scheduleRealInfo)) { |
| 171 | - Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); | ||
| 172 | - if(childTaskPlans.isEmpty()){ | 201 | +// Set<ChildTaskPlan> childTaskPlans = scheduleRealInfo.getcTasks(); |
| 202 | +// if(childTaskPlans.isEmpty()){ | ||
| 173 | if(scheduleRealInfo.getStatus() == -1){ | 203 | if(scheduleRealInfo.getStatus() == -1){ |
| 174 | lbbc++; | 204 | lbbc++; |
| 175 | } | 205 | } |
| 176 | - } | 206 | +// } |
| 177 | /*else{ | 207 | /*else{ |
| 178 | if(scheduleRealInfo.getStatus() == -1){ | 208 | if(scheduleRealInfo.getStatus() == -1){ |
| 179 | boolean fage=true; | 209 | boolean fage=true; |
| @@ -263,6 +293,17 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -263,6 +293,17 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 263 | if(zjlc>0){ | 293 | if(zjlc>0){ |
| 264 | ljgl=Arith.add(zjlc, ljgl); | 294 | ljgl=Arith.add(zjlc, ljgl); |
| 265 | } | 295 | } |
| 296 | + }else{ | ||
| 297 | + Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | ||
| 298 | + while (it.hasNext()) { | ||
| 299 | + ChildTaskPlan childTaskPlan = it.next(); | ||
| 300 | + if("service".equals(childTaskPlan.getMileageType())&&"临加".equals(childTaskPlan.getType1())){ | ||
| 301 | + if (!childTaskPlan.isDestroy()) { | ||
| 302 | + Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | ||
| 303 | + ljgl=Arith.add(ljgl,jhgl); | ||
| 304 | + } | ||
| 305 | + } | ||
| 306 | + } | ||
| 266 | } | 307 | } |
| 267 | } | 308 | } |
| 268 | } | 309 | } |
| @@ -380,7 +421,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | @@ -380,7 +421,7 @@ public class CulateMileageServiceImpl implements CulateMileageService{ | ||
| 380 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | 421 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); |
| 381 | while (it.hasNext()) { | 422 | while (it.hasNext()) { |
| 382 | ChildTaskPlan childTaskPlan = it.next(); | 423 | ChildTaskPlan childTaskPlan = it.next(); |
| 383 | - if(childTaskPlan.getMileageType().equals("service")){ | 424 | + if(childTaskPlan.getMileageType().equals("service")&&"正常".equals(childTaskPlan.getType1())){ |
| 384 | if (!childTaskPlan.isDestroy()) { | 425 | if (!childTaskPlan.isDestroy()) { |
| 385 | Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); | 426 | Float jhgl=childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage(); |
| 386 | sjgl=Arith.add(sjgl,jhgl); | 427 | sjgl=Arith.add(sjgl,jhgl); |
src/main/java/com/bsth/service/report/impl/ReportServiceImpl.java
| @@ -1727,14 +1727,41 @@ public class ReportServiceImpl implements ReportService{ | @@ -1727,14 +1727,41 @@ public class ReportServiceImpl implements ReportService{ | ||
| 1727 | 1727 | ||
| 1728 | } else { | 1728 | } else { |
| 1729 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); | 1729 | Iterator<ChildTaskPlan> it = childTaskPlans.iterator(); |
| 1730 | - /*if (scheduleRealInfo.getStatus() == -1) { | 1730 | + if (scheduleRealInfo.getStatus() == -1) { |
| 1731 | + double zlblc=0.0; | ||
| 1732 | + while (it.hasNext()) { | ||
| 1733 | + ChildTaskPlan childTaskPlan = it.next(); | ||
| 1734 | + if(childTaskPlan.getMileageType().equals("service")){ | ||
| 1735 | + if (childTaskPlan.isDestroy()) { | ||
| 1736 | + zlblc=Arith.add(zlblc,childTaskPlan.getMileage()==null?0:childTaskPlan.getMileage()); | ||
| 1737 | + } | ||
| 1738 | + } | ||
| 1739 | + } | ||
| 1740 | + Map<String, Object> newMap = new HashMap<String, Object>(); | ||
| 1741 | + String adjustExps = ""; | ||
| 1742 | + if (scheduleRealInfo.getAdjustExps() == "" || scheduleRealInfo.getAdjustExps() == null) { | ||
| 1743 | + adjustExps = "其他"; | ||
| 1744 | + } else { | ||
| 1745 | + adjustExps = scheduleRealInfo.getAdjustExps(); | ||
| 1746 | + } | ||
| 1747 | + newMap.put("nr", adjustExps); | ||
| 1748 | + newMap.put("lp", scheduleRealInfo.getLpName()); | ||
| 1749 | + newMap.put("nbbm", scheduleRealInfo.getClZbh()); | ||
| 1750 | + newMap.put("jgh", scheduleRealInfo.getjGh()); | ||
| 1751 | + newMap.put("dz", scheduleRealInfo.getQdzName()); | ||
| 1752 | + newMap.put("sj", scheduleRealInfo.getFcsj()); | ||
| 1753 | + newMap.put("lbbc", 1); | ||
| 1754 | + newMap.put("lblc", zlblc); | ||
| 1755 | + newMap.put("jyqp", scheduleRealInfo.getRealMileage()); | ||
| 1756 | + list.add(newMap); | ||
| 1757 | + } else { | ||
| 1731 | while (it.hasNext()) { | 1758 | while (it.hasNext()) { |
| 1732 | ChildTaskPlan childTaskPlan = it.next(); | 1759 | ChildTaskPlan childTaskPlan = it.next(); |
| 1733 | if (childTaskPlan.isDestroy()) { | 1760 | if (childTaskPlan.isDestroy()) { |
| 1734 | String destroyReason = ""; | 1761 | String destroyReason = ""; |
| 1735 | - if ( childTaskPlan.getDestroyReason() == null) { | 1762 | + if (childTaskPlan.getDestroyReason() == null) { |
| 1736 | destroyReason = "其他"; | 1763 | destroyReason = "其他"; |
| 1737 | - }else if(childTaskPlan.getDestroyReason().equals("")){ | 1764 | + } else if (childTaskPlan.getDestroyReason().equals("")) { |
| 1738 | destroyReason = "其他"; | 1765 | destroyReason = "其他"; |
| 1739 | } else { | 1766 | } else { |
| 1740 | destroyReason = childTaskPlan.getDestroyReason(); | 1767 | destroyReason = childTaskPlan.getDestroyReason(); |
| @@ -1747,41 +1774,14 @@ public class ReportServiceImpl implements ReportService{ | @@ -1747,41 +1774,14 @@ public class ReportServiceImpl implements ReportService{ | ||
| 1747 | newMap.put("dz", childTaskPlan.getStartStationName()); | 1774 | newMap.put("dz", childTaskPlan.getStartStationName()); |
| 1748 | newMap.put("sj", childTaskPlan.getStartDate()); | 1775 | newMap.put("sj", childTaskPlan.getStartDate()); |
| 1749 | newMap.put("gzf", " "); | 1776 | newMap.put("gzf", " "); |
| 1750 | - newMap.put("lbbc", 1); | 1777 | + newMap.put("lbbc", 0); |
| 1751 | newMap.put("lblc", childTaskPlan.getMileage()); | 1778 | newMap.put("lblc", childTaskPlan.getMileage()); |
| 1752 | newMap.put("jyqp", childTaskPlan.getRemarks()); | 1779 | newMap.put("jyqp", childTaskPlan.getRemarks()); |
| 1753 | list.add(newMap); | 1780 | list.add(newMap); |
| 1754 | 1781 | ||
| 1755 | } | 1782 | } |
| 1756 | } | 1783 | } |
| 1757 | - }else{*/ | ||
| 1758 | - while (it.hasNext()) { | ||
| 1759 | - ChildTaskPlan childTaskPlan = it.next(); | ||
| 1760 | - if (childTaskPlan.isDestroy()) { | ||
| 1761 | - String destroyReason = ""; | ||
| 1762 | - if ( childTaskPlan.getDestroyReason() == null) { | ||
| 1763 | - destroyReason = "其他"; | ||
| 1764 | - }else if(childTaskPlan.getDestroyReason().equals("")){ | ||
| 1765 | - destroyReason = "其他"; | ||
| 1766 | - } else { | ||
| 1767 | - destroyReason = childTaskPlan.getDestroyReason(); | ||
| 1768 | - } | ||
| 1769 | - Map<String, Object> newMap = new HashMap<String, Object>(); | ||
| 1770 | - newMap.put("nr", destroyReason); | ||
| 1771 | - newMap.put("lp", scheduleRealInfo.getLpName()); | ||
| 1772 | - newMap.put("nbbm", scheduleRealInfo.getClZbh()); | ||
| 1773 | - newMap.put("jgh", scheduleRealInfo.getjGh()); | ||
| 1774 | - newMap.put("dz", childTaskPlan.getStartStationName()); | ||
| 1775 | - newMap.put("sj", childTaskPlan.getStartDate()); | ||
| 1776 | - newMap.put("gzf", " "); | ||
| 1777 | - newMap.put("lbbc", 0); | ||
| 1778 | - newMap.put("lblc", childTaskPlan.getMileage()); | ||
| 1779 | - newMap.put("jyqp", childTaskPlan.getRemarks()); | ||
| 1780 | - list.add(newMap); | ||
| 1781 | - | ||
| 1782 | - } | ||
| 1783 | } | 1784 | } |
| 1784 | -// } | ||
| 1785 | 1785 | ||
| 1786 | } | 1786 | } |
| 1787 | } | 1787 | } |
| @@ -2051,12 +2051,13 @@ public class ReportServiceImpl implements ReportService{ | @@ -2051,12 +2051,13 @@ public class ReportServiceImpl implements ReportService{ | ||
| 2051 | String d1=date+" "+minfcsj+":01"; | 2051 | String d1=date+" "+minfcsj+":01"; |
| 2052 | // Date dates2=simpleDateFormat.parse(date+" 23:59:59"); | 2052 | // Date dates2=simpleDateFormat.parse(date+" 23:59:59"); |
| 2053 | date1=dates1.getTime(); | 2053 | date1=dates1.getTime(); |
| 2054 | -// date2=dates2.getTime(); | 2054 | + |
| 2055 | cal.setTime(dates1); | 2055 | cal.setTime(dates1); |
| 2056 | int weeks_year1 = cal.get(Calendar.WEEK_OF_YEAR); | 2056 | int weeks_year1 = cal.get(Calendar.WEEK_OF_YEAR); |
| 2057 | cal.add(cal.DATE,1);//把日期往后增加一天.整数往后推,负数往前移动 | 2057 | cal.add(cal.DATE,1);//把日期往后增加一天.整数往后推,负数往前移动 |
| 2058 | int weeks_year2 = cal.get(Calendar.WEEK_OF_YEAR); | 2058 | int weeks_year2 = cal.get(Calendar.WEEK_OF_YEAR); |
| 2059 | Date dates2=cal.getTime(); | 2059 | Date dates2=cal.getTime(); |
| 2060 | + date2=dates2.getTime(); | ||
| 2060 | String d2=simpleDateFormat.format(dates2); | 2061 | String d2=simpleDateFormat.format(dates2); |
| 2061 | /*String sql="select *,UNIX_TIMESTAMP(times) as ts from bsth_c_arrival_info where times >= '"+d1 +"'and " | 2062 | /*String sql="select *,UNIX_TIMESTAMP(times) as ts from bsth_c_arrival_info where times >= '"+d1 +"'and " |
| 2062 | + " times <='"+d2+"' and line_id = '"+line+"' and up_down = '"+zd+"'" | 2063 | + " times <='"+d2+"' and line_id = '"+line+"' and up_down = '"+zd+"'" |
src/main/resources/rules/legacy/shiftloop_fb_2.drl
| 1 | -package com.bsth.service.schedule.shiftloop; | ||
| 2 | - | ||
| 3 | -import org.joda.time.*; | ||
| 4 | -import java.util.*; | ||
| 5 | - | ||
| 6 | -import com.bsth.service.schedule.rules.ttinfo.LpInfoResult_output; | ||
| 7 | - | ||
| 8 | -import com.bsth.service.schedule.utils.Md5Util; | ||
| 9 | - | ||
| 10 | -import com.bsth.service.schedule.rules.shiftloop.ScheduleCalcuParam_input; | ||
| 11 | -import com.bsth.service.schedule.rules.shiftloop.ScheduleRule_input; | ||
| 12 | -import com.bsth.service.schedule.rules.shiftloop.ScheduleRule_Type; | ||
| 13 | -import com.bsth.service.schedule.rules.shiftloop.ScheduleResult_output; | ||
| 14 | -import com.bsth.service.schedule.rules.shiftloop.ScheduleResults_output; | ||
| 15 | - | ||
| 16 | -import com.bsth.entity.schedule.temp.SchedulePlanRuleResult; | ||
| 17 | - | ||
| 18 | -import com.bsth.service.schedule.rules.ScheduleRuleService; | ||
| 19 | - | ||
| 20 | -import org.slf4j.Logger; | ||
| 21 | - | ||
| 22 | -global Logger log; | ||
| 23 | -global ScheduleResults_output scheduleResult; | ||
| 24 | -global ScheduleRuleService scheduleRuleService; | ||
| 25 | - | ||
| 26 | -/* | ||
| 27 | - 存在(翻班格式) | ||
| 28 | -*/ | ||
| 29 | - | ||
| 30 | -//------------------------- 第一阶段、计算规则准备数据(天数) ----------------------------// | ||
| 31 | - | ||
| 32 | -declare Calcu_days_result_pre | ||
| 33 | - ruleId: String // 规则Id | ||
| 34 | - ruleMd5: String // 规则md5 | ||
| 35 | - ruleEcCount: Integer // 人员范围个数 | ||
| 36 | - | ||
| 37 | - calcu_index_lp : Integer // 计算之后路牌的起始索引 | ||
| 38 | - calcu_index_ry : Integer // 计算之后人员的起始索引 | ||
| 39 | - | ||
| 40 | - // 1、第一部分循环需要用到的数据(当开始日期大于启用日期的时候才有) | ||
| 41 | - calcu_start_date_1: DateTime // 第一部分开始计算日期 | ||
| 42 | - calcu_end_date_1: DateTime // 第一部分结束计算日期 | ||
| 43 | - | ||
| 44 | - // 2、第二部分循环需要用到的数据 | ||
| 45 | - sdays : Integer // 总共需要排班的天数 | ||
| 46 | - calcu_start_date_2 : DateTime // 开始计算日期 | ||
| 47 | - calcu_end_date_2 : DateTime // 结束计算日期 | ||
| 48 | - | ||
| 49 | -end | ||
| 50 | - | ||
| 51 | -/* | ||
| 52 | - 计算启用日期,开始计算日期,结束计算日期,相差天数 | ||
| 53 | - 1、规则启用日期小于开始计算日期 | ||
| 54 | - 2、规则启用日期大于等于开始日期,小于等于结束日期 | ||
| 55 | -*/ | ||
| 56 | -// 1、启用日期 < 开始日期 | ||
| 57 | -rule "calcu_days_1_" | ||
| 58 | - salience 1000 | ||
| 59 | - when | ||
| 60 | - ScheduleCalcuParam_input( | ||
| 61 | - fromDate.isBefore(toDate) || fromDate.isEqual(toDate), | ||
| 62 | - $fromDate : fromDate, | ||
| 63 | - $toDate : toDate, | ||
| 64 | - $xlId: xlId | ||
| 65 | - ) | ||
| 66 | - $sri: ScheduleRule_input( | ||
| 67 | - $ruleId : ruleId, $qyrq : qyrq, | ||
| 68 | - $lpindex : startGbdIndex, $ryindex: startEIndex) | ||
| 69 | - eval($qyrq.isBefore($fromDate)) | ||
| 70 | - then | ||
| 71 | - scheduleResult.setXlid($xlId); | ||
| 72 | - | ||
| 73 | - // 构造Calcu_days_result_pre,用于路牌 | ||
| 74 | - Calcu_days_result_pre cdrp = new Calcu_days_result_pre(); | ||
| 75 | - cdrp.setRuleId($ruleId); | ||
| 76 | - cdrp.setCalcu_index_lp($lpindex); | ||
| 77 | - cdrp.setCalcu_index_ry($ryindex); | ||
| 78 | - cdrp.setCalcu_start_date_1($qyrq); | ||
| 79 | - cdrp.setCalcu_end_date_1($fromDate); | ||
| 80 | - Period p2 = new Period($fromDate, $toDate, PeriodType.days()); | ||
| 81 | - cdrp.setSdays(p2.getDays() + 1); | ||
| 82 | - cdrp.setCalcu_start_date_2($fromDate); | ||
| 83 | - cdrp.setCalcu_end_date_2($toDate); | ||
| 84 | - | ||
| 85 | - /** | ||
| 86 | - * 规则md5值(不使用id判定,使用md5判定) | ||
| 87 | - * 使用,启用日期,路牌范围,结合生成md5编码 | ||
| 88 | - */ | ||
| 89 | - String ruleMd5 = Md5Util.getMd5( | ||
| 90 | - String.valueOf($qyrq.getMillis()) + | ||
| 91 | - "_" + | ||
| 92 | - $sri.getSelf().getLpIds() + | ||
| 93 | - "_" + | ||
| 94 | - $sri.getSelf().getLpStart().toString() | ||
| 95 | - ); | ||
| 96 | - cdrp.setRuleMd5(ruleMd5); | ||
| 97 | - // 人员范围个数 | ||
| 98 | - cdrp.setRuleEcCount($sri.getEmployeeConfigIds().size()); | ||
| 99 | - | ||
| 100 | - insert(cdrp); | ||
| 101 | - | ||
| 102 | -// log.info("总共需要排班的天数 sdays={} ruleId={} from={} to={}", (p2.getDays() + 1), $ruleId, $fromDate, $toDate); | ||
| 103 | - | ||
| 104 | -end | ||
| 105 | - | ||
| 106 | -// 启用日期 属于 [开始日期,结束日期] | ||
| 107 | -rule "calcu_days_2_" | ||
| 108 | - salience 1000 | ||
| 109 | - when | ||
| 110 | - ScheduleCalcuParam_input( | ||
| 111 | - fromDate.isBefore(toDate) || fromDate.isEqual(toDate), | ||
| 112 | - $fromDate : fromDate, | ||
| 113 | - $toDate : toDate, | ||
| 114 | - $xlId: xlId | ||
| 115 | - ) | ||
| 116 | - $sri: ScheduleRule_input( | ||
| 117 | - $ruleId : ruleId, $qyrq : qyrq, | ||
| 118 | - $lpindex : startGbdIndex, $ryindex: startEIndex) | ||
| 119 | - eval((!$qyrq.isBefore($fromDate)) && (!$qyrq.isAfter($toDate))) | ||
| 120 | - then | ||
| 121 | - scheduleResult.setXlid($xlId); | ||
| 122 | - | ||
| 123 | - // 构造Calcu_days_result_pre,用于路牌 | ||
| 124 | - Calcu_days_result_pre cdrp = new Calcu_days_result_pre(); | ||
| 125 | - cdrp.setRuleId($ruleId); | ||
| 126 | - cdrp.setCalcu_index_lp($lpindex); | ||
| 127 | - cdrp.setCalcu_index_ry($ryindex); | ||
| 128 | - cdrp.setCalcu_start_date_1($qyrq); | ||
| 129 | - cdrp.setCalcu_end_date_1($qyrq); | ||
| 130 | - Period p2 = new Period($qyrq, $toDate, PeriodType.days()); | ||
| 131 | - cdrp.setSdays(p2.getDays() + 1); | ||
| 132 | - cdrp.setCalcu_start_date_2($qyrq); | ||
| 133 | - cdrp.setCalcu_end_date_2($toDate); | ||
| 134 | - | ||
| 135 | - /** | ||
| 136 | - * 规则md5值(不使用id判定,使用md5判定) | ||
| 137 | - * 使用,启用日期,路牌范围,结合生成md5编码 | ||
| 138 | - */ | ||
| 139 | - String ruleMd5 = Md5Util.getMd5( | ||
| 140 | - String.valueOf($qyrq.getMillis()) + | ||
| 141 | - "_" + | ||
| 142 | - $sri.getSelf().getLpIds() + | ||
| 143 | - "_" + | ||
| 144 | - $sri.getSelf().getLpStart().toString() | ||
| 145 | - ); | ||
| 146 | - cdrp.setRuleMd5(ruleMd5); | ||
| 147 | - // 人员范围个数 | ||
| 148 | - cdrp.setRuleEcCount($sri.getEmployeeConfigIds().size()); | ||
| 149 | - | ||
| 150 | - insert(cdrp); | ||
| 151 | - | ||
| 152 | -// log.info("总共需要排班的天数 sdays={} ruleId={} from={} to={}", (p2.getDays() + 1), $ruleId, $qyrq, $toDate); | ||
| 153 | - | ||
| 154 | -end | ||
| 155 | - | ||
| 156 | -// 使用已经排过班的数据修正Calcu_days_result_pre | ||
| 157 | -// 1、避免每次从规则的启用日期开始算 | ||
| 158 | -// 2、时刻表会不停的修正,如果每次都从规则启用日期开始算,会出错 | ||
| 159 | - | ||
| 160 | -declare SchedulePlanRuleResult_wrap | ||
| 161 | - ruleId: String // 规则Id | ||
| 162 | - ruleMd5: String // 规则md5编码 | ||
| 163 | - scheduleDate: DateTime // 排班日期 | ||
| 164 | - | ||
| 165 | - isUsed: Boolean = false // 是否被使用过 | ||
| 166 | - | ||
| 167 | - self: SchedulePlanRuleResult; // 原始对象数据 | ||
| 168 | -end | ||
| 169 | - | ||
| 170 | -rule "Calcu_SchedulePlanRuleResult_wrap" | ||
| 171 | - salience 950 | ||
| 172 | - when | ||
| 173 | - ScheduleCalcuParam_input( | ||
| 174 | - fromDate.isBefore(toDate) || fromDate.isEqual(toDate), | ||
| 175 | - $fromDate : fromDate, | ||
| 176 | - $toDate : toDate, | ||
| 177 | - $xlId: xlId, | ||
| 178 | - $self: schedulePlan | ||
| 179 | - ) | ||
| 180 | - eval($self.getIsHistoryPlanFirst() == true) // 是否使用历史排班标识 | ||
| 181 | - $sprr: SchedulePlanRuleResult() from scheduleRuleService.findLastByXl($xlId, $fromDate.toDate()) | ||
| 182 | - eval($sprr.getQyrq() != null) | ||
| 183 | - | ||
| 184 | - then | ||
| 185 | - // 创建班序历史结果数据 | ||
| 186 | - SchedulePlanRuleResult_wrap schedulePlanRuleResult_wrap = new SchedulePlanRuleResult_wrap(); | ||
| 187 | - schedulePlanRuleResult_wrap.setRuleId($sprr.getRuleId()); | ||
| 188 | - schedulePlanRuleResult_wrap.setScheduleDate(new DateTime($sprr.getScheduleDate())); | ||
| 189 | - schedulePlanRuleResult_wrap.setSelf($sprr); | ||
| 190 | - | ||
| 191 | - // 规则Md5编码 | ||
| 192 | - String md5 = Md5Util.getMd5( | ||
| 193 | - String.valueOf($sprr.getQyrq().getTime()) + | ||
| 194 | - "_" + | ||
| 195 | - $sprr.getGids() + | ||
| 196 | - "_" + | ||
| 197 | - $sprr.getOrigingidindex() | ||
| 198 | - ); | ||
| 199 | - | ||
| 200 | -// System.out.println("修改后的md5:" + md5 + "车辆:" + $sprr.getCcZbh()); | ||
| 201 | - | ||
| 202 | - schedulePlanRuleResult_wrap.setRuleMd5(md5); | ||
| 203 | - | ||
| 204 | - insert(schedulePlanRuleResult_wrap); | ||
| 205 | -end | ||
| 206 | - | ||
| 207 | - | ||
| 208 | -// 1、启用日期 < 开始日期 | ||
| 209 | -// 2、如果最近的排班规则历史时间在 (启用日期,开始日期) 之间,需要重新修正预处理数据 | ||
| 210 | -rule "calcu_days_1_with_result" | ||
| 211 | - no-loop | ||
| 212 | - salience 960 | ||
| 213 | - when | ||
| 214 | - $cdrp: Calcu_days_result_pre( | ||
| 215 | - calcu_start_date_1.isBefore(calcu_start_date_2), | ||
| 216 | - $ruleId: ruleId, | ||
| 217 | - $ruleMd5: ruleMd5, | ||
| 218 | - $ruleEcCount: ruleEcCount | ||
| 219 | - ) | ||
| 220 | - $srrr_wrap: SchedulePlanRuleResult_wrap( | ||
| 221 | -// ruleId == $ruleId, | ||
| 222 | - ruleMd5 == $ruleMd5, | ||
| 223 | - scheduleDate.isAfter($cdrp.calcu_start_date_1), | ||
| 224 | - scheduleDate.isBefore($cdrp.calcu_start_date_2), | ||
| 225 | - isUsed == false, | ||
| 226 | - $scheduleDate: scheduleDate, | ||
| 227 | - $self: self | ||
| 228 | - ) | ||
| 229 | - then | ||
| 230 | - // 修正排班数据 | ||
| 231 | -// log.info("准备修正 ruleId={} historyDate={}", $ruleId, $scheduleDate); | ||
| 232 | - | ||
| 233 | - // 路牌范围起始index使用历史数据 | ||
| 234 | - $cdrp.setCalcu_index_lp(Integer.valueOf($self.getGidindex())); | ||
| 235 | - // 人员范围起始index,需要判定,如果长度都是一样的,使用历史的,否则不更新,使用最新的 | ||
| 236 | - String history_ecids = $self.getEcids(); | ||
| 237 | - if ($ruleEcCount == history_ecids.split(",").length) { | ||
| 238 | - $cdrp.setCalcu_index_ry(Integer.valueOf($self.getEcindex())); | ||
| 239 | - } | ||
| 240 | - | ||
| 241 | - $cdrp.setCalcu_start_date_1($scheduleDate); | ||
| 242 | - update($cdrp); | ||
| 243 | - | ||
| 244 | - $srrr_wrap.setIsUsed(true); | ||
| 245 | - update($srrr_wrap); | ||
| 246 | - | ||
| 247 | -end | ||
| 248 | - | ||
| 249 | - | ||
| 250 | - | ||
| 251 | -//------------------------- 第二阶段、计算规则准备数据2(第一组循环) ----------------------------// | ||
| 252 | -rule "Calcu_loop1_1_" // 路牌在时刻表中存在,就翻 | ||
| 253 | - salience 900 | ||
| 254 | - when | ||
| 255 | - $cdrp: Calcu_days_result_pre( | ||
| 256 | - calcu_start_date_1.isBefore(calcu_end_date_1), | ||
| 257 | - $csd1: calcu_start_date_1, | ||
| 258 | - $ced1: calcu_end_date_1, | ||
| 259 | - $ruleId: ruleId, | ||
| 260 | - $lpindex: calcu_index_lp, | ||
| 261 | - $ryindex: calcu_index_ry | ||
| 262 | - ) | ||
| 263 | - $sri: ScheduleRule_input( | ||
| 264 | - ruleId == $ruleId, | ||
| 265 | - $gids: guideboardIds, | ||
| 266 | - $lprangesize : guideboardIds.size(), | ||
| 267 | - $ryrangesize: employeeConfigIds.size() | ||
| 268 | - ) | ||
| 269 | - $liro: LpInfoResult_output( | ||
| 270 | - dateTime.isEqual($csd1), | ||
| 271 | - $gids.get($lpindex) == lpId, | ||
| 272 | - $lpId: lpId | ||
| 273 | - ) | ||
| 274 | - then | ||
| 275 | - $cdrp.setCalcu_index_lp(($lpindex + 1) % $lprangesize); | ||
| 276 | - $cdrp.setCalcu_index_ry(($ryindex + 1) % $ryrangesize); | ||
| 277 | - $cdrp.setCalcu_start_date_1($csd1.plusDays(1)); | ||
| 278 | - | ||
| 279 | -// log.info("Calcu_loop1_1_ ruleId={}, calcu_index_lp/ry={}/{}", | ||
| 280 | -// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry()); | ||
| 281 | - | ||
| 282 | - update($cdrp); | ||
| 283 | -end | ||
| 284 | - | ||
| 285 | -rule "Calcu_loop1_2_" // 路牌在时刻表中不存在,就不翻 | ||
| 286 | - salience 900 | ||
| 287 | - when | ||
| 288 | - $cdrp: Calcu_days_result_pre( | ||
| 289 | - calcu_start_date_1.isBefore(calcu_end_date_1), | ||
| 290 | - $csd1: calcu_start_date_1, | ||
| 291 | - $ced1: calcu_end_date_1, | ||
| 292 | - $ruleId: ruleId | ||
| 293 | - ) | ||
| 294 | - $sri: ScheduleRule_input( | ||
| 295 | - ruleId == $ruleId, | ||
| 296 | - $rangesize : guideboardIds.size() | ||
| 297 | - ) | ||
| 298 | - then | ||
| 299 | - $cdrp.setCalcu_start_date_1($csd1.plusDays(1)); | ||
| 300 | - | ||
| 301 | -// log.info("Calcu_loop1_2_ ruleId={}, calcu_index_lp/ry={}/{}", | ||
| 302 | -// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry()); | ||
| 303 | - | ||
| 304 | - update($cdrp); | ||
| 305 | -end | ||
| 306 | - | ||
| 307 | -//------------------------- 第三阶段、计算规则准备数据2(第二组循环) ----------------------------// | ||
| 308 | -rule "Calcu_loop2_1_" // 路牌在时刻表中存在,就翻 | ||
| 309 | - salience 800 | ||
| 310 | - when | ||
| 311 | - ScheduleCalcuParam_input($sp: schedulePlan, $xlid: xlId) | ||
| 312 | - $cdrp: Calcu_days_result_pre( | ||
| 313 | - calcu_start_date_1.isEqual(calcu_end_date_1), | ||
| 314 | - calcu_start_date_2.isBefore(calcu_end_date_2) || calcu_start_date_2.isEqual(calcu_end_date_2), | ||
| 315 | - $csd2: calcu_start_date_2, | ||
| 316 | - $ced2: calcu_end_date_2, | ||
| 317 | - $ruleId: ruleId, | ||
| 318 | - $lpindex: calcu_index_lp, | ||
| 319 | - $ryindex: calcu_index_ry | ||
| 320 | - ) | ||
| 321 | - $sri: ScheduleRule_input( | ||
| 322 | - ruleId == $ruleId, | ||
| 323 | - $cid: carConfigId, | ||
| 324 | - $gids: guideboardIds, | ||
| 325 | - $eids: employeeConfigIds, | ||
| 326 | - $lprangesize : guideboardIds.size(), | ||
| 327 | - $ryrangesize: employeeConfigIds.size(), | ||
| 328 | - $srf: self | ||
| 329 | - ) | ||
| 330 | - $liro: LpInfoResult_output( | ||
| 331 | - dateTime.isEqual($csd2), | ||
| 332 | - $gids.get($lpindex) == lpId, | ||
| 333 | - $lpId: lpId, | ||
| 334 | - $ttinfoId: ttInfoId, | ||
| 335 | - $ttinfoName: ttInfoName | ||
| 336 | - ) | ||
| 337 | - then | ||
| 338 | - ScheduleResult_output ro = new ScheduleResult_output(); | ||
| 339 | - ro.setRuleId($ruleId); | ||
| 340 | - ro.setSd($csd2); | ||
| 341 | - ro.setGuideboardId(String.valueOf($gids.get($lpindex))); | ||
| 342 | - ro.setEmployeeConfigId(String.valueOf($eids.get($ryindex))); | ||
| 343 | - ro.setCarConfigId($cid); | ||
| 344 | - ro.setXlId($xlid); | ||
| 345 | - | ||
| 346 | - // 类型 | ||
| 347 | - ro.setsType($sri.getsType()); | ||
| 348 | - | ||
| 349 | - scheduleResult.getResults().add(ro); | ||
| 350 | - | ||
| 351 | -// log.info("gogoogogogogo"); | ||
| 352 | - | ||
| 353 | - $cdrp.setCalcu_index_lp(($lpindex + 1) % $lprangesize); | ||
| 354 | - $cdrp.setCalcu_index_ry(($ryindex + 1) % $ryrangesize); | ||
| 355 | - $cdrp.setCalcu_start_date_2($csd2.plusDays(1)); | ||
| 356 | - | ||
| 357 | - if ($sri.getsType() == ScheduleRule_Type.NORMAL) { | ||
| 358 | - // 保存排班规则循环结果 --> SchedulePlanRuleResult | ||
| 359 | - SchedulePlanRuleResult schedulePlanRuleResult = new SchedulePlanRuleResult($sp); | ||
| 360 | -// schedulePlanRuleResult.setXlId(String.valueOf($srf.getXl().getId())); | ||
| 361 | - schedulePlanRuleResult.setXlId($srf.getXl().getId()); | ||
| 362 | - schedulePlanRuleResult.setXlName($srf.getXl().getName()); | ||
| 363 | - schedulePlanRuleResult.setRuleId($ruleId); | ||
| 364 | - schedulePlanRuleResult.setCcId($cid); | ||
| 365 | - schedulePlanRuleResult.setCcZbh($srf.getCarConfigInfo().getCl().getInsideCode()); | ||
| 366 | - schedulePlanRuleResult.setGids($srf.getLpIds()); // 参与md5计算 | ||
| 367 | - schedulePlanRuleResult.setGnames($srf.getLpNames()); | ||
| 368 | - schedulePlanRuleResult.setGidindex(String.valueOf($lpindex)); | ||
| 369 | - schedulePlanRuleResult.setEcids($srf.getRyConfigIds()); | ||
| 370 | - schedulePlanRuleResult.setEcdbbms($srf.getRyDbbms()); | ||
| 371 | - schedulePlanRuleResult.setEcindex(String.valueOf($ryindex)); | ||
| 372 | - schedulePlanRuleResult.setScheduleDate($csd2.toDate()); | ||
| 373 | - schedulePlanRuleResult.setTtinfoId($ttinfoId); | ||
| 374 | - schedulePlanRuleResult.setTtinfoName($ttinfoName); | ||
| 375 | - schedulePlanRuleResult.setQyrq($sri.getQyrq().toDate()); // 参与md5计算 | ||
| 376 | - schedulePlanRuleResult.setOrigingidindex(String.valueOf($sri.getSelf().getLpStart())); // 参与md5计算 | ||
| 377 | - | ||
| 378 | - scheduleResult.getSchedulePlanRuleResults().add(schedulePlanRuleResult); | ||
| 379 | - } | ||
| 380 | - | ||
| 381 | - | ||
| 382 | - | ||
| 383 | -// log.info("Calcu_loop2_1_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}", | ||
| 384 | -// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2); | ||
| 385 | - | ||
| 386 | - update($cdrp); | ||
| 387 | -end | ||
| 388 | - | ||
| 389 | -rule "Calcu_loop2_2_" // 路牌在时刻表中不存在,就不翻 | ||
| 390 | - salience 800 | ||
| 391 | - when | ||
| 392 | - ScheduleCalcuParam_input($sp: schedulePlan, $xlid: xlId) | ||
| 393 | - $cdrp: Calcu_days_result_pre( | ||
| 394 | - calcu_start_date_1.isEqual(calcu_end_date_1), | ||
| 395 | - calcu_start_date_2.isBefore(calcu_end_date_2) || calcu_start_date_2.isEqual(calcu_end_date_2), | ||
| 396 | - $csd2: calcu_start_date_2, | ||
| 397 | - $ced2: calcu_end_date_2, | ||
| 398 | - $ruleId: ruleId, | ||
| 399 | - $lpindex: calcu_index_lp, | ||
| 400 | - $ryindex: calcu_index_ry | ||
| 401 | - ) | ||
| 402 | - $sri: ScheduleRule_input( | ||
| 403 | - ruleId == $ruleId, | ||
| 404 | - $cid: carConfigId, | ||
| 405 | - $gids: guideboardIds, | ||
| 406 | - $eids: employeeConfigIds, | ||
| 407 | - $srf: self | ||
| 408 | - ) | ||
| 409 | - then | ||
| 410 | - ScheduleResult_output ro = new ScheduleResult_output(); | ||
| 411 | - ro.setRuleId($ruleId); | ||
| 412 | - ro.setSd($csd2); | ||
| 413 | - ro.setGuideboardId(String.valueOf($gids.get($lpindex))); | ||
| 414 | - ro.setEmployeeConfigId(String.valueOf($eids.get($ryindex))); | ||
| 415 | - ro.setCarConfigId($cid); | ||
| 416 | - ro.setXlId($xlid); | ||
| 417 | - | ||
| 418 | - // 类型 | ||
| 419 | - ro.setsType($sri.getsType()); | ||
| 420 | - | ||
| 421 | - scheduleResult.getResults().add(ro); | ||
| 422 | - | ||
| 423 | - $cdrp.setCalcu_start_date_2($csd2.plusDays(1)); | ||
| 424 | - | ||
| 425 | -// // 保存排班规则循环结果 --> SchedulePlanRuleResult | ||
| 426 | -// SchedulePlanRuleResult schedulePlanRuleResult = new SchedulePlanRuleResult($sp); | ||
| 427 | -// schedulePlanRuleResult.setXlId(String.valueOf($srf.getXl().getId())); | ||
| 428 | -// schedulePlanRuleResult.setXlName($srf.getXl().getName()); | ||
| 429 | -// schedulePlanRuleResult.setRuleId($ruleId); | ||
| 430 | -// schedulePlanRuleResult.setCcId($cid); | ||
| 431 | -// schedulePlanRuleResult.setCcZbh($srf.getCarConfigInfo().getCl().getInsideCode()); | ||
| 432 | -// schedulePlanRuleResult.setGids($srf.getLpIds()); | ||
| 433 | -// schedulePlanRuleResult.setGnames($srf.getLpNames()); | ||
| 434 | -// schedulePlanRuleResult.setGidindex(String.valueOf($lpindex)); | ||
| 435 | -// schedulePlanRuleResult.setEcids($srf.getRyConfigIds()); | ||
| 436 | -// schedulePlanRuleResult.setEcdbbms($srf.getRyDbbms()); | ||
| 437 | -// schedulePlanRuleResult.setEcindex(String.valueOf($ryindex)); | ||
| 438 | -// schedulePlanRuleResult.setScheduleDate($csd2.toDate()); | ||
| 439 | -// | ||
| 440 | -// scheduleResult.getSchedulePlanRuleResults().add(schedulePlanRuleResult); | ||
| 441 | - | ||
| 442 | -// log.info("Calcu_loop2_2_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}", | ||
| 443 | -// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2); | ||
| 444 | - | ||
| 445 | - update($cdrp); | ||
| 446 | -end | ||
| 447 | - | ||
| 448 | - | ||
| 449 | - | ||
| 450 | - | ||
| 451 | - | ||
| 452 | - | 1 | +package com.bsth.service.schedule.shiftloop; |
| 2 | + | ||
| 3 | +import org.joda.time.*; | ||
| 4 | +import java.util.*; | ||
| 5 | + | ||
| 6 | +import com.bsth.service.schedule.rules.ttinfo.LpInfoResult_output; | ||
| 7 | + | ||
| 8 | +import com.bsth.service.schedule.utils.Md5Util; | ||
| 9 | + | ||
| 10 | +import com.bsth.service.schedule.rules.shiftloop.ScheduleCalcuParam_input; | ||
| 11 | +import com.bsth.service.schedule.rules.shiftloop.ScheduleRule_input; | ||
| 12 | +import com.bsth.service.schedule.rules.shiftloop.ScheduleRule_Type; | ||
| 13 | +import com.bsth.service.schedule.rules.shiftloop.ScheduleResult_output; | ||
| 14 | +import com.bsth.service.schedule.rules.shiftloop.ScheduleResults_output; | ||
| 15 | + | ||
| 16 | +import com.bsth.entity.schedule.temp.SchedulePlanRuleResult; | ||
| 17 | + | ||
| 18 | +import com.bsth.service.schedule.rules.ScheduleRuleService; | ||
| 19 | + | ||
| 20 | +import org.slf4j.Logger; | ||
| 21 | + | ||
| 22 | +global Logger log; | ||
| 23 | +global ScheduleResults_output scheduleResult; | ||
| 24 | +global ScheduleRuleService scheduleRuleService; | ||
| 25 | + | ||
| 26 | +/* | ||
| 27 | + 存在(翻班格式) | ||
| 28 | +*/ | ||
| 29 | + | ||
| 30 | +//------------------------- 第一阶段、计算规则准备数据(天数) ----------------------------// | ||
| 31 | + | ||
| 32 | +declare Calcu_days_result_pre | ||
| 33 | + ruleId: String // 规则Id | ||
| 34 | + ruleMd5: String // 规则md5 | ||
| 35 | + ruleEcCount: Integer // 人员范围个数 | ||
| 36 | + | ||
| 37 | + calcu_index_lp : Integer // 计算之后路牌的起始索引 | ||
| 38 | + calcu_index_ry : Integer // 计算之后人员的起始索引 | ||
| 39 | + | ||
| 40 | + // 1、第一部分循环需要用到的数据(当开始日期大于启用日期的时候才有) | ||
| 41 | + calcu_start_date_1: DateTime // 第一部分开始计算日期 | ||
| 42 | + calcu_end_date_1: DateTime // 第一部分结束计算日期 | ||
| 43 | + | ||
| 44 | + // 2、第二部分循环需要用到的数据 | ||
| 45 | + sdays : Integer // 总共需要排班的天数 | ||
| 46 | + calcu_start_date_2 : DateTime // 开始计算日期 | ||
| 47 | + calcu_end_date_2 : DateTime // 结束计算日期 | ||
| 48 | + | ||
| 49 | +end | ||
| 50 | + | ||
| 51 | +/* | ||
| 52 | + 计算启用日期,开始计算日期,结束计算日期,相差天数 | ||
| 53 | + 1、规则启用日期小于开始计算日期 | ||
| 54 | + 2、规则启用日期大于等于开始日期,小于等于结束日期 | ||
| 55 | +*/ | ||
| 56 | +// 1、启用日期 < 开始日期 | ||
| 57 | +rule "calcu_days_1_" | ||
| 58 | + salience 1000 | ||
| 59 | + when | ||
| 60 | + ScheduleCalcuParam_input( | ||
| 61 | + fromDate.isBefore(toDate) || fromDate.isEqual(toDate), | ||
| 62 | + $fromDate : fromDate, | ||
| 63 | + $toDate : toDate, | ||
| 64 | + $xlId: xlId | ||
| 65 | + ) | ||
| 66 | + $sri: ScheduleRule_input( | ||
| 67 | + $ruleId : ruleId, $qyrq : qyrq, | ||
| 68 | + $lpindex : startGbdIndex, $ryindex: startEIndex) | ||
| 69 | + eval($qyrq.isBefore($fromDate)) | ||
| 70 | + then | ||
| 71 | + scheduleResult.setXlid($xlId); | ||
| 72 | + | ||
| 73 | + // 构造Calcu_days_result_pre,用于路牌 | ||
| 74 | + Calcu_days_result_pre cdrp = new Calcu_days_result_pre(); | ||
| 75 | + cdrp.setRuleId($ruleId); | ||
| 76 | + cdrp.setCalcu_index_lp($lpindex); | ||
| 77 | + cdrp.setCalcu_index_ry($ryindex); | ||
| 78 | + cdrp.setCalcu_start_date_1($qyrq); | ||
| 79 | + cdrp.setCalcu_end_date_1($fromDate); | ||
| 80 | + Period p2 = new Period($fromDate, $toDate, PeriodType.days()); | ||
| 81 | + cdrp.setSdays(p2.getDays() + 1); | ||
| 82 | + cdrp.setCalcu_start_date_2($fromDate); | ||
| 83 | + cdrp.setCalcu_end_date_2($toDate); | ||
| 84 | + | ||
| 85 | + /** | ||
| 86 | + * 规则md5值(不使用id判定,使用md5判定) | ||
| 87 | + * 使用,启用日期,路牌范围,结合生成md5编码 | ||
| 88 | + */ | ||
| 89 | + String ruleMd5 = Md5Util.getMd5( | ||
| 90 | + String.valueOf($qyrq.getMillis()) + | ||
| 91 | + "_" + | ||
| 92 | + $sri.getSelf().getLpIds() + | ||
| 93 | + "_" + | ||
| 94 | + $sri.getSelf().getLpStart().toString() | ||
| 95 | + ); | ||
| 96 | + cdrp.setRuleMd5(ruleMd5); | ||
| 97 | + // 人员范围个数 | ||
| 98 | + cdrp.setRuleEcCount($sri.getEmployeeConfigIds().size()); | ||
| 99 | + | ||
| 100 | + insert(cdrp); | ||
| 101 | + | ||
| 102 | +// log.info("总共需要排班的天数 sdays={} ruleId={} from={} to={}", (p2.getDays() + 1), $ruleId, $fromDate, $toDate); | ||
| 103 | + | ||
| 104 | +end | ||
| 105 | + | ||
| 106 | +// 启用日期 属于 [开始日期,结束日期] | ||
| 107 | +rule "calcu_days_2_" | ||
| 108 | + salience 1000 | ||
| 109 | + when | ||
| 110 | + ScheduleCalcuParam_input( | ||
| 111 | + fromDate.isBefore(toDate) || fromDate.isEqual(toDate), | ||
| 112 | + $fromDate : fromDate, | ||
| 113 | + $toDate : toDate, | ||
| 114 | + $xlId: xlId | ||
| 115 | + ) | ||
| 116 | + $sri: ScheduleRule_input( | ||
| 117 | + $ruleId : ruleId, $qyrq : qyrq, | ||
| 118 | + $lpindex : startGbdIndex, $ryindex: startEIndex) | ||
| 119 | + eval((!$qyrq.isBefore($fromDate)) && (!$qyrq.isAfter($toDate))) | ||
| 120 | + then | ||
| 121 | + scheduleResult.setXlid($xlId); | ||
| 122 | + | ||
| 123 | + // 构造Calcu_days_result_pre,用于路牌 | ||
| 124 | + Calcu_days_result_pre cdrp = new Calcu_days_result_pre(); | ||
| 125 | + cdrp.setRuleId($ruleId); | ||
| 126 | + cdrp.setCalcu_index_lp($lpindex); | ||
| 127 | + cdrp.setCalcu_index_ry($ryindex); | ||
| 128 | + cdrp.setCalcu_start_date_1($qyrq); | ||
| 129 | + cdrp.setCalcu_end_date_1($qyrq); | ||
| 130 | + Period p2 = new Period($qyrq, $toDate, PeriodType.days()); | ||
| 131 | + cdrp.setSdays(p2.getDays() + 1); | ||
| 132 | + cdrp.setCalcu_start_date_2($qyrq); | ||
| 133 | + cdrp.setCalcu_end_date_2($toDate); | ||
| 134 | + | ||
| 135 | + /** | ||
| 136 | + * 规则md5值(不使用id判定,使用md5判定) | ||
| 137 | + * 使用,启用日期,路牌范围,结合生成md5编码 | ||
| 138 | + */ | ||
| 139 | + String ruleMd5 = Md5Util.getMd5( | ||
| 140 | + String.valueOf($qyrq.getMillis()) + | ||
| 141 | + "_" + | ||
| 142 | + $sri.getSelf().getLpIds() + | ||
| 143 | + "_" + | ||
| 144 | + $sri.getSelf().getLpStart().toString() | ||
| 145 | + ); | ||
| 146 | + cdrp.setRuleMd5(ruleMd5); | ||
| 147 | + // 人员范围个数 | ||
| 148 | + cdrp.setRuleEcCount($sri.getEmployeeConfigIds().size()); | ||
| 149 | + | ||
| 150 | + insert(cdrp); | ||
| 151 | + | ||
| 152 | +// log.info("总共需要排班的天数 sdays={} ruleId={} from={} to={}", (p2.getDays() + 1), $ruleId, $qyrq, $toDate); | ||
| 153 | + | ||
| 154 | +end | ||
| 155 | + | ||
| 156 | +// 使用已经排过班的数据修正Calcu_days_result_pre | ||
| 157 | +// 1、避免每次从规则的启用日期开始算 | ||
| 158 | +// 2、时刻表会不停的修正,如果每次都从规则启用日期开始算,会出错 | ||
| 159 | + | ||
| 160 | +declare SchedulePlanRuleResult_wrap | ||
| 161 | + ruleId: String // 规则Id | ||
| 162 | + ruleMd5: String // 规则md5编码 | ||
| 163 | + scheduleDate: DateTime // 排班日期 | ||
| 164 | + | ||
| 165 | + isUsed: Boolean = false // 是否被使用过 | ||
| 166 | + | ||
| 167 | + self: SchedulePlanRuleResult; // 原始对象数据 | ||
| 168 | +end | ||
| 169 | + | ||
| 170 | +rule "Calcu_SchedulePlanRuleResult_wrap" | ||
| 171 | + salience 950 | ||
| 172 | + when | ||
| 173 | + ScheduleCalcuParam_input( | ||
| 174 | + fromDate.isBefore(toDate) || fromDate.isEqual(toDate), | ||
| 175 | + $fromDate : fromDate, | ||
| 176 | + $toDate : toDate, | ||
| 177 | + $xlId: xlId, | ||
| 178 | + $self: schedulePlan | ||
| 179 | + ) | ||
| 180 | + eval($self.getIsHistoryPlanFirst() == true) // 是否使用历史排班标识 | ||
| 181 | + $sprr: SchedulePlanRuleResult() from scheduleRuleService.findLastByXl($xlId, $fromDate.toDate()) | ||
| 182 | + eval($sprr.getQyrq() != null) | ||
| 183 | + | ||
| 184 | + then | ||
| 185 | + // 创建班序历史结果数据 | ||
| 186 | + SchedulePlanRuleResult_wrap schedulePlanRuleResult_wrap = new SchedulePlanRuleResult_wrap(); | ||
| 187 | + schedulePlanRuleResult_wrap.setRuleId($sprr.getRuleId()); | ||
| 188 | + schedulePlanRuleResult_wrap.setScheduleDate(new DateTime($sprr.getScheduleDate())); | ||
| 189 | + schedulePlanRuleResult_wrap.setSelf($sprr); | ||
| 190 | + | ||
| 191 | + // 规则Md5编码 | ||
| 192 | + String md5 = Md5Util.getMd5( | ||
| 193 | + String.valueOf($sprr.getQyrq().getTime()) + | ||
| 194 | + "_" + | ||
| 195 | + $sprr.getGids() + | ||
| 196 | + "_" + | ||
| 197 | + $sprr.getOrigingidindex() | ||
| 198 | + ); | ||
| 199 | + | ||
| 200 | +// System.out.println("修改后的md5:" + md5 + "车辆:" + $sprr.getCcZbh()); | ||
| 201 | + | ||
| 202 | + schedulePlanRuleResult_wrap.setRuleMd5(md5); | ||
| 203 | + | ||
| 204 | + insert(schedulePlanRuleResult_wrap); | ||
| 205 | +end | ||
| 206 | + | ||
| 207 | + | ||
| 208 | +// 1、启用日期 < 开始日期 | ||
| 209 | +// 2、如果最近的排班规则历史时间在 (启用日期,开始日期) 之间,需要重新修正预处理数据 | ||
| 210 | +rule "calcu_days_1_with_result" | ||
| 211 | + no-loop | ||
| 212 | + salience 960 | ||
| 213 | + when | ||
| 214 | + $cdrp: Calcu_days_result_pre( | ||
| 215 | + calcu_start_date_1.isBefore(calcu_start_date_2), | ||
| 216 | + $ruleId: ruleId, | ||
| 217 | + $ruleMd5: ruleMd5, | ||
| 218 | + $ruleEcCount: ruleEcCount | ||
| 219 | + ) | ||
| 220 | + $srrr_wrap: SchedulePlanRuleResult_wrap( | ||
| 221 | +// ruleId == $ruleId, | ||
| 222 | + ruleMd5 == $ruleMd5, | ||
| 223 | + scheduleDate.isAfter($cdrp.calcu_start_date_1), | ||
| 224 | + scheduleDate.isBefore($cdrp.calcu_start_date_2), | ||
| 225 | + isUsed == false, | ||
| 226 | + $scheduleDate: scheduleDate, | ||
| 227 | + $self: self | ||
| 228 | + ) | ||
| 229 | + then | ||
| 230 | + // 修正排班数据 | ||
| 231 | +// log.info("准备修正 ruleId={} historyDate={}", $ruleId, $scheduleDate); | ||
| 232 | + | ||
| 233 | + // 路牌范围起始index使用历史数据 | ||
| 234 | + $cdrp.setCalcu_index_lp(Integer.valueOf($self.getGidindex())); | ||
| 235 | + // 人员范围起始index,需要判定,如果长度都是一样的,使用历史的,否则不更新,使用最新的 | ||
| 236 | + String history_ecids = $self.getEcids(); | ||
| 237 | + if ($ruleEcCount == history_ecids.split(",").length) { | ||
| 238 | + $cdrp.setCalcu_index_ry(Integer.valueOf($self.getEcindex())); | ||
| 239 | + } | ||
| 240 | + | ||
| 241 | + $cdrp.setCalcu_start_date_1($scheduleDate); | ||
| 242 | + update($cdrp); | ||
| 243 | + | ||
| 244 | + $srrr_wrap.setIsUsed(true); | ||
| 245 | + update($srrr_wrap); | ||
| 246 | + | ||
| 247 | +end | ||
| 248 | + | ||
| 249 | + | ||
| 250 | + | ||
| 251 | +//------------------------- 第二阶段、计算规则准备数据2(第一组循环) ----------------------------// | ||
| 252 | +rule "Calcu_loop1_1_" // 路牌在时刻表中存在,就翻 | ||
| 253 | + salience 900 | ||
| 254 | + when | ||
| 255 | + $cdrp: Calcu_days_result_pre( | ||
| 256 | + calcu_start_date_1.isBefore(calcu_end_date_1), | ||
| 257 | + $csd1: calcu_start_date_1, | ||
| 258 | + $ced1: calcu_end_date_1, | ||
| 259 | + $ruleId: ruleId, | ||
| 260 | + $lpindex: calcu_index_lp, | ||
| 261 | + $ryindex: calcu_index_ry | ||
| 262 | + ) | ||
| 263 | + $sri: ScheduleRule_input( | ||
| 264 | + ruleId == $ruleId, | ||
| 265 | + $gids: guideboardIds, | ||
| 266 | + $lprangesize : guideboardIds.size(), | ||
| 267 | + $ryrangesize: employeeConfigIds.size() | ||
| 268 | + ) | ||
| 269 | + $liro: LpInfoResult_output( | ||
| 270 | + dateTime.isEqual($csd1), | ||
| 271 | + $gids.get($lpindex) == lpId, | ||
| 272 | + $lpId: lpId | ||
| 273 | + ) | ||
| 274 | + then | ||
| 275 | + $cdrp.setCalcu_index_lp(($lpindex + 1) % $lprangesize); | ||
| 276 | + $cdrp.setCalcu_index_ry(($ryindex + 1) % $ryrangesize); | ||
| 277 | + $cdrp.setCalcu_start_date_1($csd1.plusDays(1)); | ||
| 278 | + | ||
| 279 | +// log.info("Calcu_loop1_1_ ruleId={}, calcu_index_lp/ry={}/{}", | ||
| 280 | +// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry()); | ||
| 281 | + | ||
| 282 | + update($cdrp); | ||
| 283 | +end | ||
| 284 | + | ||
| 285 | +rule "Calcu_loop1_2_" // 路牌在时刻表中不存在,就不翻 | ||
| 286 | + salience 900 | ||
| 287 | + when | ||
| 288 | + $cdrp: Calcu_days_result_pre( | ||
| 289 | + calcu_start_date_1.isBefore(calcu_end_date_1), | ||
| 290 | + $csd1: calcu_start_date_1, | ||
| 291 | + $ced1: calcu_end_date_1, | ||
| 292 | + $ruleId: ruleId | ||
| 293 | + ) | ||
| 294 | + $sri: ScheduleRule_input( | ||
| 295 | + ruleId == $ruleId, | ||
| 296 | + $rangesize : guideboardIds.size() | ||
| 297 | + ) | ||
| 298 | + then | ||
| 299 | + $cdrp.setCalcu_start_date_1($csd1.plusDays(1)); | ||
| 300 | + | ||
| 301 | +// log.info("Calcu_loop1_2_ ruleId={}, calcu_index_lp/ry={}/{}", | ||
| 302 | +// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry()); | ||
| 303 | + | ||
| 304 | + update($cdrp); | ||
| 305 | +end | ||
| 306 | + | ||
| 307 | +//------------------------- 第三阶段、计算规则准备数据2(第二组循环) ----------------------------// | ||
| 308 | +rule "Calcu_loop2_1_" // 路牌在时刻表中存在,就翻 | ||
| 309 | + salience 800 | ||
| 310 | + when | ||
| 311 | + ScheduleCalcuParam_input($sp: schedulePlan, $xlid: xlId) | ||
| 312 | + $cdrp: Calcu_days_result_pre( | ||
| 313 | + calcu_start_date_1.isEqual(calcu_end_date_1), | ||
| 314 | + calcu_start_date_2.isBefore(calcu_end_date_2) || calcu_start_date_2.isEqual(calcu_end_date_2), | ||
| 315 | + $csd2: calcu_start_date_2, | ||
| 316 | + $ced2: calcu_end_date_2, | ||
| 317 | + $ruleId: ruleId, | ||
| 318 | + $lpindex: calcu_index_lp, | ||
| 319 | + $ryindex: calcu_index_ry | ||
| 320 | + ) | ||
| 321 | + $sri: ScheduleRule_input( | ||
| 322 | + ruleId == $ruleId, | ||
| 323 | + $cid: carConfigId, | ||
| 324 | + $gids: guideboardIds, | ||
| 325 | + $eids: employeeConfigIds, | ||
| 326 | + $lprangesize : guideboardIds.size(), | ||
| 327 | + $ryrangesize: employeeConfigIds.size(), | ||
| 328 | + $srf: self | ||
| 329 | + ) | ||
| 330 | + $liro: LpInfoResult_output( | ||
| 331 | + dateTime.isEqual($csd2), | ||
| 332 | + $gids.get($lpindex) == lpId, | ||
| 333 | + $lpId: lpId, | ||
| 334 | + $ttinfoId: ttInfoId, | ||
| 335 | + $ttinfoName: ttInfoName | ||
| 336 | + ) | ||
| 337 | + then | ||
| 338 | + ScheduleResult_output ro = new ScheduleResult_output(); | ||
| 339 | + ro.setRuleId($ruleId); | ||
| 340 | + ro.setSd($csd2); | ||
| 341 | + ro.setGuideboardId(String.valueOf($gids.get($lpindex))); | ||
| 342 | + ro.setEmployeeConfigId(String.valueOf($eids.get($ryindex))); | ||
| 343 | + ro.setCarConfigId($cid); | ||
| 344 | + ro.setXlId($xlid); | ||
| 345 | + | ||
| 346 | + // 类型 | ||
| 347 | + ro.setsType($sri.getsType()); | ||
| 348 | + | ||
| 349 | + scheduleResult.getResults().add(ro); | ||
| 350 | + | ||
| 351 | +// log.info("gogoogogogogo"); | ||
| 352 | + | ||
| 353 | + $cdrp.setCalcu_index_lp(($lpindex + 1) % $lprangesize); | ||
| 354 | + $cdrp.setCalcu_index_ry(($ryindex + 1) % $ryrangesize); | ||
| 355 | + $cdrp.setCalcu_start_date_2($csd2.plusDays(1)); | ||
| 356 | + | ||
| 357 | + if ($sri.getsType() == ScheduleRule_Type.NORMAL) { | ||
| 358 | + // 保存排班规则循环结果 --> SchedulePlanRuleResult | ||
| 359 | + SchedulePlanRuleResult schedulePlanRuleResult = new SchedulePlanRuleResult($sp); | ||
| 360 | +// schedulePlanRuleResult.setXlId(String.valueOf($srf.getXl().getId())); | ||
| 361 | + schedulePlanRuleResult.setXlId($srf.getXl().getId()); | ||
| 362 | + schedulePlanRuleResult.setXlName($srf.getXl().getName()); | ||
| 363 | + schedulePlanRuleResult.setRuleId($ruleId); | ||
| 364 | + schedulePlanRuleResult.setCcId($cid); | ||
| 365 | + schedulePlanRuleResult.setCcZbh($srf.getCarConfigInfo().getCl().getInsideCode()); | ||
| 366 | + schedulePlanRuleResult.setGids($srf.getLpIds()); // 参与md5计算 | ||
| 367 | + schedulePlanRuleResult.setGnames($srf.getLpNames()); | ||
| 368 | + schedulePlanRuleResult.setGidindex(String.valueOf($lpindex)); | ||
| 369 | + schedulePlanRuleResult.setEcids($srf.getRyConfigIds()); | ||
| 370 | + schedulePlanRuleResult.setEcdbbms($srf.getRyDbbms()); | ||
| 371 | + schedulePlanRuleResult.setEcindex(String.valueOf($ryindex)); | ||
| 372 | + schedulePlanRuleResult.setScheduleDate($csd2.toDate()); | ||
| 373 | + schedulePlanRuleResult.setTtinfoId($ttinfoId); | ||
| 374 | + schedulePlanRuleResult.setTtinfoName($ttinfoName); | ||
| 375 | + schedulePlanRuleResult.setQyrq($sri.getQyrq().toDate()); // 参与md5计算 | ||
| 376 | + schedulePlanRuleResult.setOrigingidindex(String.valueOf($sri.getSelf().getLpStart())); // 参与md5计算 | ||
| 377 | + | ||
| 378 | + scheduleResult.getSchedulePlanRuleResults().add(schedulePlanRuleResult); | ||
| 379 | + } | ||
| 380 | + | ||
| 381 | + | ||
| 382 | + | ||
| 383 | +// log.info("Calcu_loop2_1_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}", | ||
| 384 | +// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2); | ||
| 385 | + | ||
| 386 | + update($cdrp); | ||
| 387 | +end | ||
| 388 | + | ||
| 389 | +rule "Calcu_loop2_2_" // 路牌在时刻表中不存在,就不翻 | ||
| 390 | + salience 800 | ||
| 391 | + when | ||
| 392 | + ScheduleCalcuParam_input($sp: schedulePlan, $xlid: xlId) | ||
| 393 | + $cdrp: Calcu_days_result_pre( | ||
| 394 | + calcu_start_date_1.isEqual(calcu_end_date_1), | ||
| 395 | + calcu_start_date_2.isBefore(calcu_end_date_2) || calcu_start_date_2.isEqual(calcu_end_date_2), | ||
| 396 | + $csd2: calcu_start_date_2, | ||
| 397 | + $ced2: calcu_end_date_2, | ||
| 398 | + $ruleId: ruleId, | ||
| 399 | + $lpindex: calcu_index_lp, | ||
| 400 | + $ryindex: calcu_index_ry | ||
| 401 | + ) | ||
| 402 | + $sri: ScheduleRule_input( | ||
| 403 | + ruleId == $ruleId, | ||
| 404 | + $cid: carConfigId, | ||
| 405 | + $gids: guideboardIds, | ||
| 406 | + $eids: employeeConfigIds, | ||
| 407 | + $srf: self | ||
| 408 | + ) | ||
| 409 | + then | ||
| 410 | + ScheduleResult_output ro = new ScheduleResult_output(); | ||
| 411 | + ro.setRuleId($ruleId); | ||
| 412 | + ro.setSd($csd2); | ||
| 413 | + ro.setGuideboardId(String.valueOf($gids.get($lpindex))); | ||
| 414 | + ro.setEmployeeConfigId(String.valueOf($eids.get($ryindex))); | ||
| 415 | + ro.setCarConfigId($cid); | ||
| 416 | + ro.setXlId($xlid); | ||
| 417 | + | ||
| 418 | + // 类型 | ||
| 419 | + ro.setsType($sri.getsType()); | ||
| 420 | + | ||
| 421 | + scheduleResult.getResults().add(ro); | ||
| 422 | + | ||
| 423 | + $cdrp.setCalcu_start_date_2($csd2.plusDays(1)); | ||
| 424 | + | ||
| 425 | +// // 保存排班规则循环结果 --> SchedulePlanRuleResult | ||
| 426 | +// SchedulePlanRuleResult schedulePlanRuleResult = new SchedulePlanRuleResult($sp); | ||
| 427 | +// schedulePlanRuleResult.setXlId(String.valueOf($srf.getXl().getId())); | ||
| 428 | +// schedulePlanRuleResult.setXlName($srf.getXl().getName()); | ||
| 429 | +// schedulePlanRuleResult.setRuleId($ruleId); | ||
| 430 | +// schedulePlanRuleResult.setCcId($cid); | ||
| 431 | +// schedulePlanRuleResult.setCcZbh($srf.getCarConfigInfo().getCl().getInsideCode()); | ||
| 432 | +// schedulePlanRuleResult.setGids($srf.getLpIds()); | ||
| 433 | +// schedulePlanRuleResult.setGnames($srf.getLpNames()); | ||
| 434 | +// schedulePlanRuleResult.setGidindex(String.valueOf($lpindex)); | ||
| 435 | +// schedulePlanRuleResult.setEcids($srf.getRyConfigIds()); | ||
| 436 | +// schedulePlanRuleResult.setEcdbbms($srf.getRyDbbms()); | ||
| 437 | +// schedulePlanRuleResult.setEcindex(String.valueOf($ryindex)); | ||
| 438 | +// schedulePlanRuleResult.setScheduleDate($csd2.toDate()); | ||
| 439 | +// | ||
| 440 | +// scheduleResult.getSchedulePlanRuleResults().add(schedulePlanRuleResult); | ||
| 441 | + | ||
| 442 | +// log.info("Calcu_loop2_2_ ruleId={}, calcu_index_lp/ry={}/{}, from={}, to={}", | ||
| 443 | +// $ruleId, $cdrp.getCalcu_index_lp(), $cdrp.getCalcu_index_ry(), $csd2, $ced2); | ||
| 444 | + | ||
| 445 | + update($cdrp); | ||
| 446 | +end | ||
| 447 | + | ||
| 448 | + | ||
| 449 | + | ||
| 450 | + | ||
| 451 | + | ||
| 452 | + |
src/main/resources/static/index.html
| 1 | <!DOCTYPE html> | 1 | <!DOCTYPE html> |
| 2 | <html lang="zh"> | 2 | <html lang="zh"> |
| 3 | <head> | 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 | - | ||
| 199 | - body,.page-content-wrapper,#pjax-container{ | ||
| 200 | - height: 100%; | ||
| 201 | - } | ||
| 202 | - html{ | ||
| 203 | - height: 90%; | ||
| 204 | - } | ||
| 205 | - .page-container{ | ||
| 206 | - height: 100%; | ||
| 207 | - } | ||
| 208 | -</style> | ||
| 209 | - | ||
| 210 | -<!-- ocLazyLoading载入文件的位置 --> | ||
| 211 | -<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 | + | ||
| 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" /> | ||
| 212 | 202 | ||
| 213 | </head> | 203 | </head> |
| 214 | <body | 204 | <body |
| 215 | - class="page-container-bg-solid page-header-fixed page-sidebar-closed-hide-logo page-sidebar-fixed"> | ||
| 216 | - <div class="page-header navbar navbar-fixed-top" | ||
| 217 | - style="background: linear-gradient(to bottom, #124e78, #125688);"> | ||
| 218 | - <div class="page-header-inner "> | ||
| 219 | - <!-- LOGO --> | ||
| 220 | - <div class="page-logo"> | ||
| 221 | - <a href="index.html" class="logo-default logo-default-text"> | ||
| 222 | - 闵行公交调度系统 </a> | ||
| 223 | - <div class="menu-toggler sidebar-toggler"></div> | ||
| 224 | - </div> | ||
| 225 | - <!-- END LOGO --> | ||
| 226 | - <a href="javascript:;" class="menu-toggler responsive-toggler" | ||
| 227 | - data-toggle="collapse" data-target=".navbar-collapse"> </a> | ||
| 228 | - <div class="page-top"> | ||
| 229 | - <div class="top-menu"> | ||
| 230 | - <ul class="nav navbar-nav pull-right"> | ||
| 231 | - <!-- 信息通知区 --> | ||
| 232 | - <li | ||
| 233 | - class="dropdown dropdown-extended dropdown-notification dropdown-dark" | ||
| 234 | - id="header_notification_bar"><a href="javascript:;" | ||
| 235 | - class="dropdown-toggle" data-toggle="dropdown" | ||
| 236 | - data-hover="dropdown" data-close-others="true"> <i | ||
| 237 | - class="fa fa-bell"></i> <span class="badge badge-success"> | 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"> | ||
| 238 | 0 </span> | 228 | 0 </span> |
| 239 | - </a> | ||
| 240 | - <ul class="dropdown-menu" style="max-width: 345px; width: 345px;"> | ||
| 241 | - <li class="external"> | ||
| 242 | - <h3> | ||
| 243 | - 今日 <span class="bold">0 条</span> 通知 | ||
| 244 | - </h3> <a href="javascript:;">查看全部</a> | ||
| 245 | - </li> | ||
| 246 | - <li> | ||
| 247 | - <ul class="dropdown-menu-list scroller" style="height: 250px;" | ||
| 248 | - data-handle-color="#637283"> | ||
| 249 | - </ul> | ||
| 250 | - </li> | ||
| 251 | - </ul></li> | ||
| 252 | - <li class="dropdown dropdown-user dropdown-dark"><a | ||
| 253 | - href="javascript:;" class="dropdown-toggle" | ||
| 254 | - data-toggle="dropdown" data-hover="dropdown" | ||
| 255 | - data-close-others="true"> <span id="indexTopUName" | ||
| 256 | - class="username username-hide-on-mobile" | ||
| 257 | - style="vertical-align: middle;"> <i class="fa fa-user"></i></span> | ||
| 258 | - </a> | ||
| 259 | - <ul class="dropdown-menu dropdown-menu-default"> | ||
| 260 | - <li><a href="javascript:;"> <i class="fa fa-user"></i> | ||
| 261 | - 我的信息 | ||
| 262 | - </a></li> | ||
| 263 | - <li><a href="javascript:;" id="changePWD"> <i | ||
| 264 | - class="fa fa-unlock-alt"></i> 修改密码 | ||
| 265 | - </a></li> | ||
| 266 | - <li class="divider"></li> | ||
| 267 | - <li><a href="javascript:;"> <i class="fa fa-lock"></i> | ||
| 268 | - 锁屏 | ||
| 269 | - </a></li> | ||
| 270 | - <li><a href="/logout"> <i class="fa fa-key"></i> 注销登陆 | ||
| 271 | - </a></li> | ||
| 272 | - </ul></li> | ||
| 273 | - </ul> | ||
| 274 | - </div> | ||
| 275 | - </div> | ||
| 276 | - </div> | ||
| 277 | - </div> | ||
| 278 | - <div class="page-container"> | ||
| 279 | - <div class="page-sidebar-wrapper"> | ||
| 280 | - <div class="page-sidebar navbar-collapse collapse"> | ||
| 281 | - <ul class="page-sidebar-menu page-sidebar-menu-fixed" | ||
| 282 | - data-keep-expanded="false" data-auto-scroll="true" | ||
| 283 | - data-slide-speed="200" id="leftMenuSidebar"> | ||
| 284 | - </ul> | ||
| 285 | - </div> | ||
| 286 | - </div> | ||
| 287 | - <div class="page-content-wrapper"> | ||
| 288 | - <div id="pjax-container" class="page-content"></div> | ||
| 289 | - | ||
| 290 | - <div id="route-container"> | ||
| 291 | - <div ng-app="ScheduleApp"> | ||
| 292 | - <div ng-controller="ScheduleAppController"> | ||
| 293 | - | ||
| 294 | - <!-- loading widget --> | ||
| 295 | - <div id="loadingWidget" class="flyover mask" loading-widget> | ||
| 296 | - <div class="alert alert-info"> | ||
| 297 | - <strong>载入中......</strong> | ||
| 298 | - </div> | ||
| 299 | - </div> | ||
| 300 | - | ||
| 301 | - <div ui-view class="uv"></div> | ||
| 302 | - </div> | ||
| 303 | - </div> | ||
| 304 | - </div> | ||
| 305 | - </div> | ||
| 306 | - </div> | ||
| 307 | - | ||
| 308 | - <script id="menu_list_temp" type="text/html"> | 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"> | ||
| 309 | {{each list as group i}} | 299 | {{each list as group i}} |
| 310 | <li class="heading"> | 300 | <li class="heading"> |
| 311 | <h3 class="uppercase">{{group.name}}</h3> | 301 | <h3 class="uppercase">{{group.name}}</h3> |
| @@ -337,83 +327,83 @@ tr.row-active td { | @@ -337,83 +327,83 @@ tr.row-active td { | ||
| 337 | {{/each}} | 327 | {{/each}} |
| 338 | 328 | ||
| 339 | </script> | 329 | </script> |
| 340 | - <script> | 330 | +<script> |
| 341 | delete window.require; | 331 | delete window.require; |
| 342 | delete window.exports; | 332 | delete window.exports; |
| 343 | delete window.module; | 333 | delete window.module; |
| 344 | </script> | 334 | </script> |
| 345 | - <!-- jQuery --> | ||
| 346 | - <script src="/metronic_v4.5.4/plugins/jquery.min.js" data-exclude=1></script> | ||
| 347 | - <!-- bootstrap --> | ||
| 348 | - <script src="/metronic_v4.5.4/plugins/bootstrap/js/bootstrap.min.js" | ||
| 349 | - data-exclude=1></script> | ||
| 350 | - <script src="/pages/forms/statement/js/jquery.autocompleter.js"></script> | ||
| 351 | - <script src="/pages/forms/statement/js/jquery.PrintArea.js"></script> | ||
| 352 | - <!-- MTRONIC JS --> | ||
| 353 | - <script src="/metronic_v4.5.4/scripts/app.min.js" data-exclude=1></script> | ||
| 354 | - <script src="/metronic_v4.5.4/layout4/scripts/layout.min.js" | ||
| 355 | - data-exclude=1></script> | ||
| 356 | - <!-- 虚拟滚动条 --> | ||
| 357 | - <script | ||
| 358 | - src="/metronic_v4.5.4/plugins/jquery-slimscroll/jquery.slimscroll.min.js"></script> | ||
| 359 | - <!-- jsTree 树插件 --> | ||
| 360 | - <script src="/metronic_v4.5.4/plugins/jstree/dist/jstree.min.js"></script> | ||
| 361 | - <!-- bootstrap-hover-dropDown --> | ||
| 362 | - <script | ||
| 363 | - src="/metronic_v4.5.4/plugins/bootstrap-hover-dropdown/bootstrap-hover-dropdown.min.js"></script> | ||
| 364 | - <!-- jquery.validate 表单验证 --> | ||
| 365 | - <script | ||
| 366 | - src="/metronic_v4.5.4/plugins/jquery-validation/js/jquery.validate.min.js"></script> | ||
| 367 | - <script | ||
| 368 | - src="/metronic_v4.5.4/plugins/jquery-validation/js/localization/messages_zh.js"></script> | ||
| 369 | - <!-- 向导式插件 --> | ||
| 370 | - <script | ||
| 371 | - src="/metronic_v4.5.4//plugins/bootstrap-wizard/jquery.bootstrap.wizard.min.js"></script> | ||
| 372 | - <!-- iCheck 单选框和复选框 --> | ||
| 373 | - <script src="/metronic_v4.5.4/plugins/icheck/icheck.min.js"></script> | ||
| 374 | - <!-- select2 下拉框 --> | ||
| 375 | - <script src="/metronic_v4.5.4/plugins/select2/js/select2.full.min.js"></script> | ||
| 376 | - <!-- MULTI SELECT 多选下拉框 --> | ||
| 377 | - <script | ||
| 378 | - src="/metronic_v4.5.4/plugins/jquery-multi-select/js/jquery.multi-select.js"></script> | ||
| 379 | - <!-- editable.js --> | ||
| 380 | - <script | ||
| 381 | - src="/metronic_v4.5.4/plugins/bootstrap-editable/bootstrap-editable/js/bootstrap-editable.min.js"></script> | ||
| 382 | - <!-- PJAX --> | ||
| 383 | - <script src="/assets/plugins/jquery.pjax.js"></script> | ||
| 384 | - <!-- layer 弹层 --> | ||
| 385 | - <script src="/assets/plugins/layer-v2.4/layer/layer.js" data-exclude=1></script> | ||
| 386 | - <!-- fileinput 上传 --> | ||
| 387 | - <script src="/assets/plugins/fileinput/canvas-to-blob.min.js"></script> | ||
| 388 | - <script src="/assets/plugins/fileinput/purify.min.js"></script> | ||
| 389 | - <script src="/assets/plugins/fileinput/sortable.min.js"></script> | ||
| 390 | - <script src="/assets/plugins/fileinput/fileinput.min.js"></script> | ||
| 391 | - <script src="/assets/plugins/fileinput/fileinput_locale_zh.js"></script> | ||
| 392 | - <!-- jquery.purl URL解析 --> | ||
| 393 | - <script src="/assets/plugins/purl.js"></script> | ||
| 394 | - <!-- jquery.serializejson JSON序列化插件 --> | ||
| 395 | - <script src="/assets/plugins/jquery.serializejson.js"></script> | ||
| 396 | - <!-- art-template 模版引擎 --> | ||
| 397 | - <script src="/assets/plugins/template.js"></script> | ||
| 398 | - <!-- jquery.pageinator 分页 --> | ||
| 399 | - <script src="/assets/plugins/jqPaginator.min.js"></script> | ||
| 400 | - <!-- moment.js 日期处理类库 --> | ||
| 401 | - <script src="/assets/plugins/moment-with-locales.js"></script> | ||
| 402 | - | ||
| 403 | - <script src="/assets/plugins/pinyin.js"></script> | ||
| 404 | - <!-- 日期控件 --> | ||
| 405 | - <script | ||
| 406 | - src="/metronic_v4.5.4/plugins/bootstrap-datetimepicker-2/js/bootstrap-datetimepicker.min.js"></script> | ||
| 407 | - <!-- 表格控件 --> | ||
| 408 | - <script src="/metronic_v4.5.4/plugins/bootstrap-tagsinput/bootstrap-tagsinput.min.js"></script> | ||
| 409 | - <!-- 统计图控件 --> | ||
| 410 | - <!--<script src="/assets/global/getEchart.js"></script> | ||
| 411 | - <script src="/assets/global/echarts.js"></script> --> | ||
| 412 | - <script src="/assets/js/common.js"></script> | ||
| 413 | - <script src="/assets/js/dictionary.js"></script> | ||
| 414 | - <!-- tipso JS --> | ||
| 415 | - <script src="/metronic_v4.5.4/plugins/tipso/js/tipso.js"></script> | ||
| 416 | - <script data-exclude=1> | 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> | ||
| 417 | //初始打开的片段地址 | 407 | //初始打开的片段地址 |
| 418 | var initFragment = "^_^initFragment^_^"; | 408 | var initFragment = "^_^initFragment^_^"; |
| 419 | //静态文件目录 | 409 | //静态文件目录 |
| @@ -555,79 +545,79 @@ tr.row-active td { | @@ -555,79 +545,79 @@ tr.row-active td { | ||
| 555 | } | 545 | } |
| 556 | 546 | ||
| 557 | </script> | 547 | </script> |
| 558 | - <!-- d3 --> | ||
| 559 | - <script src="/assets/js/d3.min.js" data-exclude=1></script> | ||
| 560 | - <!-- webSocket JS --> | ||
| 561 | - <script src="/assets/js/sockjs.min.js"></script> | ||
| 562 | - | ||
| 563 | - <!-- TODO:angularJS相关库 --> | ||
| 564 | - | ||
| 565 | - <!-- angularJS相关库 --> | ||
| 566 | - <!-- 这个是基于angularjs 1.4.10修改的版本,主要是修改了history控制部分,用于兼容route和pjax的同时操作history的冲突 --> | ||
| 567 | - <script src="/assets/js/angular.js" data-autocephaly=1></script> | ||
| 568 | - <script src="/assets/bower_components/angular-i18n/angular-locale_zh-cn.js" data-autocephaly=1></script> | ||
| 569 | - <script | ||
| 570 | - src="/assets/bower_components/angular-resource/angular-resource.min.js" | ||
| 571 | - data-exclude=1></script> | ||
| 572 | - <script | ||
| 573 | - src="/assets/bower_components/angular-sanitize/angular-sanitize.min.js" | ||
| 574 | - data-exclude=1></script> | ||
| 575 | - <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 | ||
| 576 | src="/assets/bower_components/angular-animate/angular-animate.min.js" | 566 | src="/assets/bower_components/angular-animate/angular-animate.min.js" |
| 577 | data-exclude=1></script> | 567 | data-exclude=1></script> |
| 578 | - <script | ||
| 579 | - src="/assets/bower_components/angular-touch/angular-touch.min.js" | ||
| 580 | - data-exclude=1></script> | ||
| 581 | - <script | ||
| 582 | - src="/assets/bower_components/angular-ui-router/release/angular-ui-router.min.js" | ||
| 583 | - data-exclude=1></script> | ||
| 584 | - <script | ||
| 585 | - src="/assets/bower_components/oclazyload/dist/ocLazyLoad.min.js" | ||
| 586 | - data-exclude=1></script> | ||
| 587 | - <script | ||
| 588 | - src="/assets/bower_components/angular-bootstrap/ui-bootstrap-tpls.min.js" | ||
| 589 | - data-exclude=1></script> | ||
| 590 | - <!-- handsontable相关js --> | ||
| 591 | - <script | ||
| 592 | - src="/assets/bower_components/handsontable/dist/handsontable.full.js"></script> | ||
| 593 | - <script | ||
| 594 | - src="/assets/bower_components/ngHandsontable/dist/ngHandsontable.js"></script> | ||
| 595 | - <!-- sweetalert相关js --> | ||
| 596 | - <script src="/assets/bower_components/sweetalert/dist/sweetalert.min.js"></script> | ||
| 597 | - <script src="/assets/bower_components/ng-sweet-alert/ng-sweet-alert.js"></script> | ||
| 598 | - | ||
| 599 | - <!-- schedule计划调度AngularJS模块主JS --> | ||
| 600 | - <script src="/pages/scheduleApp/module/common/main.js" data-exclude=1></script> | ||
| 601 | - <script | ||
| 602 | - src="/pages/scheduleApp/module/common/prj-common-globalservice.js" | ||
| 603 | - data-exclude=1></script> | ||
| 604 | - <script src="/pages/scheduleApp/module/common/prj-common-filter.js" | ||
| 605 | - data-exclude=1></script> | ||
| 606 | - <script src="/pages/scheduleApp/module/common/prj-common-directive.js" | ||
| 607 | - data-exclude=1></script> | ||
| 608 | - <script | ||
| 609 | - src="/pages/scheduleApp/module/common/prj-common-ui-route-state.js" | ||
| 610 | - data-exclude=1></script> | ||
| 611 | - | ||
| 612 | - <!-- 地图相关 --> | ||
| 613 | - <!-- 百度 --> | ||
| 614 | - <!--<script--> | ||
| 615 | - <!--src="http://api.map.baidu.com/api?v=2.0&ak=IGGrr4UjwIYzatoCRFKEL8sT"--> | ||
| 616 | - <!--data-exclude=1></script>--> | ||
| 617 | - <!--<script--> | ||
| 618 | - <!--src="http://api.map.baidu.com/library/TrafficControl/1.4/src/TrafficControl_min.js"--> | ||
| 619 | - <!--data-exclude=1></script>--> | ||
| 620 | - <!--<script type="text/javascript"--> | ||
| 621 | - <!--src="http://api.map.baidu.com/library/DrawingManager/1.4/src/DrawingManager_min.js"--> | ||
| 622 | - <!--data-exclude=1></script>--> | ||
| 623 | - <!--<script type="text/javascript"--> | ||
| 624 | - <!--src="http://api.map.baidu.com/library/RichMarker/1.2/src/RichMarker_min.js "--> | ||
| 625 | - <!--data-exclude=1></script>--> | ||
| 626 | - <!--<script src="/assets/js/baidu/TextIconOverlay.js" data-exclude=1></script>--> | ||
| 627 | - <!--<script src="/assets/js/baidu//MarkerClusterer.js" data-exclude=1></script>--> | ||
| 628 | - <!--<!– 高德 –>--> | ||
| 629 | - <!--<script--> | ||
| 630 | - <!--src="http://webapi.amap.com/maps?v=1.3&key=16cb1c5043847e09ef9edafdd77befda"--> | ||
| 631 | - <!--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> | ||
| 632 | </body> | 622 | </body> |
| 633 | </html> | 623 | </html> |
| 634 | \ No newline at end of file | 624 | \ No newline at end of file |
src/main/resources/static/pages/base/line/js/line-add-form.js
| @@ -94,7 +94,13 @@ $(function(){ | @@ -94,7 +94,13 @@ $(function(){ | ||
| 94 | // 需要验证的表单元素 | 94 | // 需要验证的表单元素 |
| 95 | rules : { | 95 | rules : { |
| 96 | 'name' : {required : true,maxlength: 30},// 线路名称 必填项、 最大长度. | 96 | 'name' : {required : true,maxlength: 30},// 线路名称 必填项、 最大长度. |
| 97 | - 'lineCode' : {required : true,maxlength: 6},// 线路编码 必填项、最大长度. | 97 | + 'lineCode' : {required : true,maxlength: 6,digits:true ,remote:{type: 'GET', |
| 98 | + url: '/line/lineCodeVerification', | ||
| 99 | + data:{'lineCode':function(){ return $("#lineCodeInput").val();}}, | ||
| 100 | + dataFilter: function (data,type) { | ||
| 101 | + return data; //要返回data 否则会影响到后续验证 并且阻碍提交【即使验证通过】,也不会提交 | ||
| 102 | + }, | ||
| 103 | + delay: 2000}},// 线路编码 必填项、最大长度. | ||
| 98 | 'company' : {required : true,maxlength: 30},// 所属公司 必填项、最大长度. | 104 | 'company' : {required : true,maxlength: 30},// 所属公司 必填项、最大长度. |
| 99 | 'brancheCompany' : {required : true,maxlength: 30},// 所属分公司 必填项、最大长度. | 105 | 'brancheCompany' : {required : true,maxlength: 30},// 所属分公司 必填项、最大长度. |
| 100 | 'level' : {required : true,maxlength: 30},// 线路等级 必填项、最大长度. | 106 | 'level' : {required : true,maxlength: 30},// 线路等级 必填项、最大长度. |
| @@ -119,7 +125,11 @@ $(function(){ | @@ -119,7 +125,11 @@ $(function(){ | ||
| 119 | 'history' : {maxlength: 200},// 线路沿革 输入长度最多是 200 的字符串(汉字算一个字符)。 | 125 | 'history' : {maxlength: 200},// 线路沿革 输入长度最多是 200 的字符串(汉字算一个字符)。 |
| 120 | 'descriptions' : {maxlength: 200}// 描述/说明 输入长度最多是 200 的字符串(汉字算一个字符)。 | 126 | 'descriptions' : {maxlength: 200}// 描述/说明 输入长度最多是 200 的字符串(汉字算一个字符)。 |
| 121 | }, | 127 | }, |
| 122 | - | 128 | + messages:{ |
| 129 | + 'lineCode':{ | ||
| 130 | + remote: '此线路编码已存在!' | ||
| 131 | + } | ||
| 132 | + }, | ||
| 123 | /** | 133 | /** |
| 124 | * 类型:Callback。当未通过验证的表单提交时,可以在该回调函数中处理一些事情。 | 134 | * 类型:Callback。当未通过验证的表单提交时,可以在该回调函数中处理一些事情。 |
| 125 | * | 135 | * |
| @@ -183,12 +193,12 @@ $(function(){ | @@ -183,12 +193,12 @@ $(function(){ | ||
| 183 | 193 | ||
| 184 | // 隐藏错误提示 | 194 | // 隐藏错误提示 |
| 185 | error.hide(); | 195 | error.hide(); |
| 186 | - | ||
| 187 | // 表单序列化 | 196 | // 表单序列化 |
| 188 | var params = form.serializeJSON(); | 197 | var params = form.serializeJSON(); |
| 198 | + submit(); | ||
| 189 | 199 | ||
| 190 | // 查询线路编码的顺延号 | 200 | // 查询线路编码的顺延号 |
| 191 | - $get('/line/all', {lineCode_prefixLike: params.lineCode},function(lineCode){ | 201 | + /*$get('/line/all', {lineCode_eq: params.lineCode},function(lineCode){ |
| 192 | 202 | ||
| 193 | // 定义返回值的长度 | 203 | // 定义返回值的长度 |
| 194 | var len = lineCode.length; | 204 | var len = lineCode.length; |
| @@ -196,7 +206,7 @@ $(function(){ | @@ -196,7 +206,7 @@ $(function(){ | ||
| 196 | // 如果大于零,则已存在录入的线路编码;否则不存在 | 206 | // 如果大于零,则已存在录入的线路编码;否则不存在 |
| 197 | if(len > 0) { | 207 | if(len > 0) { |
| 198 | 208 | ||
| 199 | - /*// 定义已有的线路编码 | 209 | + // 定义已有的线路编码 |
| 200 | var oldCode = params.lineCode; | 210 | var oldCode = params.lineCode; |
| 201 | 211 | ||
| 202 | // 自动获取线路编码 | 212 | // 自动获取线路编码 |
| @@ -210,7 +220,7 @@ $(function(){ | @@ -210,7 +220,7 @@ $(function(){ | ||
| 210 | btn : [ '确认提示并提交', '取消' ] | 220 | btn : [ '确认提示并提交', '取消' ] |
| 211 | }, submit); | 221 | }, submit); |
| 212 | 222 | ||
| 213 | - });*/ | 223 | + }); |
| 214 | layer.open({ | 224 | layer.open({ |
| 215 | title: '消息提示' | 225 | title: '消息提示' |
| 216 | ,content: '线路编码【'+params.lineCode+'】已存在,请重新输入编码!' | 226 | ,content: '线路编码【'+params.lineCode+'】已存在,请重新输入编码!' |
| @@ -221,7 +231,7 @@ $(function(){ | @@ -221,7 +231,7 @@ $(function(){ | ||
| 221 | submit(); | 231 | submit(); |
| 222 | 232 | ||
| 223 | } | 233 | } |
| 224 | - }); | 234 | + });*/ |
| 225 | 235 | ||
| 226 | 236 | ||
| 227 | // 提交 | 237 | // 提交 |
| @@ -229,7 +239,6 @@ $(function(){ | @@ -229,7 +239,6 @@ $(function(){ | ||
| 229 | 239 | ||
| 230 | // 添加数据 | 240 | // 添加数据 |
| 231 | $post('/line', params, function(result) { | 241 | $post('/line', params, function(result) { |
| 232 | - | ||
| 233 | // 如果返回结果不为空 | 242 | // 如果返回结果不为空 |
| 234 | if(result){ | 243 | if(result){ |
| 235 | 244 |
src/main/resources/static/pages/base/line/list.html
| @@ -5,7 +5,7 @@ | @@ -5,7 +5,7 @@ | ||
| 5 | <div class="page-title"> | 5 | <div class="page-title"> |
| 6 | <h1>线路信息</h1> | 6 | <h1>线路信息</h1> |
| 7 | </div> | 7 | </div> |
| 8 | - | 8 | +</div> |
| 9 | <!-- 片段标题 END --> | 9 | <!-- 片段标题 END --> |
| 10 | 10 | ||
| 11 | <!-- 线路信息导航栏组件 START --> | 11 | <!-- 线路信息导航栏组件 START --> |
| @@ -154,7 +154,6 @@ | @@ -154,7 +154,6 @@ | ||
| 154 | </div> | 154 | </div> |
| 155 | </div> | 155 | </div> |
| 156 | </div> | 156 | </div> |
| 157 | -</div> | ||
| 158 | <!-- | 157 | <!-- |
| 159 | 158 | ||
| 160 | <td style="vertical-align: middle;"> | 159 | <td style="vertical-align: middle;"> |
src/main/resources/static/pages/base/stationroute/js/stationroute-list-function.js
| @@ -277,6 +277,7 @@ var PublicFunctions = function () { | @@ -277,6 +277,7 @@ var PublicFunctions = function () { | ||
| 277 | 277 | ||
| 278 | /** @param directionV_ :方向 */ | 278 | /** @param directionV_ :方向 */ |
| 279 | stationRevoke : function(directionV_) { | 279 | stationRevoke : function(directionV_) { |
| 280 | + debugger | ||
| 280 | // 获取树选中节点对象 | 281 | // 获取树选中节点对象 |
| 281 | var obj = PublicFunctions.getCurrSelNode(directionV_); | 282 | var obj = PublicFunctions.getCurrSelNode(directionV_); |
| 282 | // 是否选中,选中节点是否为站点 | 283 | // 是否选中,选中节点是否为站点 |
| @@ -298,9 +299,9 @@ var PublicFunctions = function () { | @@ -298,9 +299,9 @@ var PublicFunctions = function () { | ||
| 298 | // 关闭弹出框 | 299 | // 关闭弹出框 |
| 299 | layer.close(index); | 300 | layer.close(index); |
| 300 | if(result.status=='SUCCESS'){ | 301 | if(result.status=='SUCCESS'){ |
| 301 | - layer.msg('撤销上行站点【'+obj[0].text+'】成功!'); | 302 | + layer.msg('撤销'+(directionV_==0?"上行":"下行")+'站点【'+obj[0].text+'】成功!'); |
| 302 | }else{ | 303 | }else{ |
| 303 | - layer.msg('撤销上行站点【'+obj[0].text+'】失败!'); | 304 | + layer.msg('撤销'+(directionV_==0?"上行":"下行")+'站点【'+obj[0].text+'】失败!'); |
| 304 | } | 305 | } |
| 305 | WorldsBMap.clearMarkAndOverlays(); | 306 | WorldsBMap.clearMarkAndOverlays(); |
| 306 | var Line = LineObj.getLineObj(); | 307 | var Line = LineObj.getLineObj(); |
src/main/resources/static/pages/oil/list_ph.html
| 1 | +<style type="text/css"> | ||
| 2 | + #ylbtable table>tr> td { | ||
| 3 | + white-space: nowrap; | ||
| 4 | + overflow: hidden; | ||
| 5 | + text-overflow: ellipsis; | ||
| 6 | + } | ||
| 7 | + | ||
| 8 | +</style> | ||
| 1 | <div class="page-head"> | 9 | <div class="page-head"> |
| 2 | <div class="page-title"> | 10 | <div class="page-title"> |
| 3 | <h1>进出场存油量</h1> | 11 | <h1>进出场存油量</h1> |
| @@ -9,244 +17,258 @@ | @@ -9,244 +17,258 @@ | ||
| 9 | <li><span class="active">用油管理</span> <i class="fa fa-circle"></i></li> | 17 | <li><span class="active">用油管理</span> <i class="fa fa-circle"></i></li> |
| 10 | <li><span class="active">进出场存油量</span></li> | 18 | <li><span class="active">进出场存油量</span></li> |
| 11 | </ul> | 19 | </ul> |
| 20 | +<div id="ll_oil_list" | ||
| 21 | + class=" row col-md-12 portlet light porttlet-fit portlet-datatable bordered" style="height: calc(100% - 100px);background-color: #fff"> | ||
| 22 | + <!-- Begin: life time stats --> | ||
| 23 | + <div class="portlet-title" > | ||
| 24 | + <div class="caption"> | ||
| 25 | + <i class="fa fa-fire-extinguisher"></i> <span | ||
| 26 | + class="caption-subject font-dark sbold uppercase">进出场存油量表</span> | ||
| 27 | + </div> | ||
| 28 | + <div class="actions"> | ||
| 29 | + <a class="btn btn-circle blue" href="add.html" data-pjax><i | ||
| 30 | + class="fa fa-plus"></i> 添加</a> | ||
| 31 | + <button type="button" class="btn btn-circle blue" id="removeButton"> | ||
| 32 | + <i class="fa fa-trash-o"></i> 删除 | ||
| 33 | + </button> | ||
| 34 | + <button type="button" class="btn btn-circle blue" id="sortButton"> | ||
| 35 | + <i class="fa fa-minus-square"></i> 拆分 | ||
| 36 | + </button> | ||
| 37 | + <button type="button" class="btn btn-circle blue" id="saveButton"> | ||
| 38 | + <i class="fa fa-check-circle"></i> 保存 | ||
| 39 | + </button> | ||
| 40 | + <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> --> | ||
| 41 | + <div class="btn-group"> | ||
| 42 | + <a class="btn red btn-outline btn-circle" href="javascript:;" | ||
| 43 | + data-toggle="dropdown"> <i class="fa fa-share"></i> <span | ||
| 44 | + class="hidden-xs"> 系统工具 </span> <i class="fa fa-angle-down"></i> | ||
| 45 | + </a> | ||
| 46 | + <ul class="dropdown-menu pull-right" id="datatable_ajax_tools"> | ||
| 47 | + <li><a href="javascript:;" data-action="0" class="tool-action" | ||
| 48 | + id="obtain"> <i class="fa fa-hourglass-half"></i> 获取加/存油信息 | ||
| 49 | + </a></li> | ||
| 50 | + <li><a href="javascript:;" data-action="1" class="tool-action" | ||
| 51 | + id="outAndIn"> <i class="fa fa-pencil"></i> 油耗计算(进场=出场) | ||
| 52 | + </a></li> | ||
| 53 | + <li><a href="javascript:;" id="checkYl" data-action="3" | ||
| 54 | + class="tool-action"> <i class="fa fa-gg-circle"></i> | ||
| 55 | + 核对加注量(有加油无里程) | ||
| 56 | + </a></li> | ||
| 57 | + <li class="divider"></li> | ||
| 58 | + <li><a href="javascript:;" data-action="3" class="tool-action" | ||
| 59 | + id="export"> <i class="fa fa-file-excel-o"></i> 导出Excel | ||
| 60 | + </a></li> | ||
| 61 | + </ul> | ||
| 62 | + </div> | ||
| 63 | + </div> | ||
| 64 | + <div> | ||
| 65 | + <table | ||
| 66 | + class="table table-striped table-bordered table-hover table-checkable" | ||
| 67 | + id="datatable_ylb" style="table-layout: fixed;margin-bottom: 0px"> | ||
| 68 | + <thead> | ||
| 69 | + <tr role="row" class="filter"> | ||
| 70 | + <td colspan="2"> | ||
| 71 | + <div style="float: right;"> 公司 </div> | ||
| 72 | + </td> | ||
| 73 | + <td colspan="3"> | ||
| 74 | + <div style="float: left; width: 150px"> | ||
| 75 | + <select class="form-control" name="ssgsdm_like" | ||
| 76 | + id="ylbListGsdmId"></select> | ||
| 77 | + </div> | ||
| 78 | + </td> | ||
| 79 | + <td colspan="2"> | ||
| 80 | + <div style="float: right;"> 分公司 </div> | ||
| 81 | + </td> | ||
| 82 | + <td colspan="4"> | ||
| 83 | + <div style="float: left;"> | ||
| 84 | + <select class="form-control" name="fgsdm_like" | ||
| 85 | + id="ylbListFgsdmId" style="width: 150px"></select> | ||
| 86 | + </div> | ||
| 87 | + </td> | ||
| 88 | + <td> | ||
| 89 | + <div style="float: right;">日期</div> | ||
| 90 | + </td> | ||
| 91 | + <td colspan="3"> | ||
| 92 | + <div style="float: left;"> | ||
| 93 | + <input type="text" style="width: 120px" name="rq" id="rq" /> | ||
| 94 | + </div> | ||
| 95 | + </td> | ||
| 96 | + <td rowspan="2" colspan="2"> | ||
| 97 | + <div style="float: left;"> | ||
| 98 | + | ||
| 99 | + <button | ||
| 100 | + class="btn btn-sm green btn-outline filter-submit margin-bottom" | ||
| 101 | + style="margin-right: 0px"> | ||
| 102 | + <i class="fa fa-search"></i> 搜索 | ||
| 103 | + </button> | ||
| 104 | + <!-- <button class="btn btn-sm red btn-outline filter-cancel" style="margin-right:0px"> --> | ||
| 105 | + <!-- <i class="fa fa-times"></i> 重置 --> | ||
| 106 | + <!-- </button> --> | ||
| 12 | 107 | ||
| 13 | -<div class="row" id="ll_oil_list"> | ||
| 14 | - <div class="col-md-12"> | ||
| 15 | - <!-- Begin: life time stats --> | ||
| 16 | - <div class="portlet light portlet-fit portlet-datatable bordered"> | ||
| 17 | - <div class="portlet-title"> | ||
| 18 | - <div class="caption"> | ||
| 19 | - <i class="fa fa-fire-extinguisher"></i> <span | ||
| 20 | - class="caption-subject font-dark sbold uppercase">进出场存油量表</span> | ||
| 21 | - </div> | ||
| 22 | - <div class="actions"> | ||
| 23 | - <a class="btn btn-circle blue" href="add.html" data-pjax><i class="fa fa-plus"></i> 添加</a> | ||
| 24 | - <button type="button" class="btn btn-circle blue" id="removeButton"><i class="fa fa-trash-o"></i> 删除</button> | ||
| 25 | - <button type="button" class="btn btn-circle blue" id="sortButton"><i class="fa fa-minus-square"></i> | ||
| 26 | - 拆分 | ||
| 27 | - </button> | ||
| 28 | - <button type="button" class="btn btn-circle blue" id="saveButton"><i class="fa fa-check-circle"></i> | ||
| 29 | - 保存 | ||
| 30 | - </button> | ||
| 31 | - <!-- <button type="button" class="btn btn-circle red" disabled="disabled" id="removeButton"><i class="fa fa-trash"></i> 删除用户</button> --> | ||
| 32 | - <div class="btn-group"> | ||
| 33 | - <a class="btn red btn-outline btn-circle" href="javascript:;" | ||
| 34 | - data-toggle="dropdown"> <i class="fa fa-share"></i> <span | ||
| 35 | - class="hidden-xs"> 系统工具 </span> <i class="fa fa-angle-down"></i> | ||
| 36 | - </a> | ||
| 37 | - <ul class="dropdown-menu pull-right" id="datatable_ajax_tools"> | ||
| 38 | - <li><a href="javascript:;" data-action="0" | ||
| 39 | - class="tool-action" id="obtain"> <i class="fa fa-hourglass-half"></i> 获取加/存油信息 | ||
| 40 | - </a></li> | ||
| 41 | - <li><a href="javascript:;" data-action="1" | ||
| 42 | - class="tool-action" id="outAndIn"> <i class="fa fa-pencil"></i> 油耗计算(进场=出场) | ||
| 43 | - </a></li> | ||
| 44 | - <li><a href="javascript:;" id="checkYl" data-action="3" | ||
| 45 | - class="tool-action"> <i class="fa fa-gg-circle"></i> | ||
| 46 | - 核对加注量(有加油无里程) | ||
| 47 | - </a></li> | ||
| 48 | - <li class="divider"></li> | ||
| 49 | - <li><a href="javascript:;" data-action="3" | ||
| 50 | - class="tool-action" id="export"> <i class="fa fa-file-excel-o"></i> | ||
| 51 | - 导出Excel | ||
| 52 | - </a></li> | ||
| 53 | - </ul> | ||
| 54 | - </div> | ||
| 55 | - </div> | ||
| 56 | - </div> | ||
| 57 | - <div class="portlet-body"> | ||
| 58 | - <div class="table-container" style="margin-top: 10px"> | ||
| 59 | - <table | ||
| 60 | - class="table table-striped table-bordered table-hover table-checkable" | ||
| 61 | - id="datatable_ylb"> | ||
| 62 | - <thead > | ||
| 63 | - <tr role="row" class="filter"> | ||
| 64 | - <td colspan="2"> | ||
| 65 | - <div style="float: right; " > 公司 </div> | ||
| 66 | - </td> | ||
| 67 | - <td colspan="3"> | ||
| 68 | - <div style="float: left;width: 150px"> | ||
| 69 | - <select class="form-control" name="ssgsdm_like" | ||
| 70 | - id="ylbListGsdmId"></select> | ||
| 71 | - </div> | ||
| 72 | - </td> | ||
| 73 | - <td colspan="2"> | ||
| 74 | - <div style="float: right; " > 分公司 </div> | ||
| 75 | - </td> | ||
| 76 | - <td colspan="4"> | ||
| 77 | - <div style="float: left;"> | ||
| 78 | - <select class="form-control" name="fgsdm_like" | ||
| 79 | - id="ylbListFgsdmId" style="width: 150px"></select> | ||
| 80 | - </div> | ||
| 81 | - </td> | ||
| 82 | - <td > | ||
| 83 | - <div style="float: right; ">日期</div> | ||
| 84 | - </td> | ||
| 85 | - <td colspan="3"> | ||
| 86 | - <div style="float: left;"> | ||
| 87 | - <input type="text" style="width: 120px" name="rq" id="rq" /> | ||
| 88 | - </div> | ||
| 89 | - </td> | ||
| 90 | - <td rowspan="2" colspan="2"> | ||
| 91 | - <div style="float: left;"> | ||
| 92 | - <button | ||
| 93 | - class="btn btn-sm green btn-outline filter-submit margin-bottom" | ||
| 94 | - style="margin-right: 0px"> | ||
| 95 | - <i class="fa fa-search"></i> 搜索 | ||
| 96 | - </button> <!-- <button class="btn btn-sm red btn-outline filter-cancel" style="margin-right:0px"> --> | ||
| 97 | - <!-- <i class="fa fa-times"></i> 重置 --> | ||
| 98 | - <!-- </button> --> | 108 | + </div> |
| 109 | + </td> | ||
| 110 | + </tr> | ||
| 111 | + <tr class="filter2"> | ||
| 112 | + <td colspan="2"> | ||
| 113 | + <div style="float: right;"> 线路</div> | ||
| 114 | + </td> | ||
| 115 | + <td colspan="3"> | ||
| 116 | + <div style="float: left;"> | ||
| 117 | + <select class="form-control" name="xlbm_like" id="xlbm" | ||
| 118 | + style="width: 150px;"></select> | ||
| 119 | + </div> | ||
| 120 | + </td> | ||
| 121 | + <td colspan="2"> | ||
| 122 | + <div style="float: right;"> 内部编码</div> | ||
| 123 | + </td> | ||
| 124 | + <td colspan="4"> | ||
| 125 | + <div style="float: left;"> | ||
| 126 | + <select class="form-control" name="nbbm_eq" id="nbbm" | ||
| 127 | + style="width: 120px;"></select> | ||
| 128 | + </div> | ||
| 129 | + <div style="float: left;"> | ||
| 130 | + <button class="btn btn-sm #000 btn-outline filter-cancel" | ||
| 131 | + style="margin-right: 0px"> | ||
| 132 | + <i class="fa fa-times"></i> | ||
| 133 | + </button> | ||
| 134 | + </div> | ||
| 135 | + </td> | ||
| 136 | + <td> | ||
| 137 | + <div style="float: right;">类型</div> | ||
| 138 | + </td> | ||
| 139 | + <td colspan="3"> | ||
| 140 | + <div style="float: left;"> | ||
| 141 | + <select class="form-control" name="sxtj"> | ||
| 142 | + <option value="0">全部</option> | ||
| 143 | + <option value="1">一车一单</option> | ||
| 144 | + <option value="2">一车多单</option> | ||
| 145 | + <option value="3">有加油没里程</option> | ||
| 146 | + <option value="4">有里程没加油</option> | ||
| 147 | + </select> | ||
| 148 | + </div> | ||
| 99 | 149 | ||
| 100 | - </div> | ||
| 101 | - </td> | ||
| 102 | - </tr> | ||
| 103 | - <tr class="filter2"> | ||
| 104 | - <td colspan="2"> | ||
| 105 | - <div style="float: right; "> 线路</div> | ||
| 106 | - </td> | ||
| 107 | - <td colspan="3"> | ||
| 108 | - <div style="float: left;"> | ||
| 109 | - <select class="form-control" name="xlbm_like" id="xlbm" | ||
| 110 | - style="width: 150px;"></select> | ||
| 111 | - </div> | ||
| 112 | - </td> | ||
| 113 | - <td colspan="2"> | ||
| 114 | - <div style="float: right;"> 内部编码</div> | ||
| 115 | - </td> | ||
| 116 | - <td colspan="4"> | ||
| 117 | - <div style="float: left;"> | ||
| 118 | - <select class="form-control" name="nbbm_eq" id="nbbm" | ||
| 119 | - style="width: 120px;"></select> | ||
| 120 | - </div> | ||
| 121 | - <div style="float: left;"> | ||
| 122 | - <button class="btn btn-sm #000 btn-outline filter-cancel" | ||
| 123 | - style="margin-right: 0px"> | ||
| 124 | - <i class="fa fa-times"></i> | ||
| 125 | - </button> | ||
| 126 | - </div> | ||
| 127 | - </td> | ||
| 128 | - <td > | ||
| 129 | - <div style="float: right;"> | ||
| 130 | - 类型 | ||
| 131 | - </div> | ||
| 132 | - </td> | ||
| 133 | - <td colspan="3"> | ||
| 134 | - <div style="float: left;"> | ||
| 135 | - <select class="form-control" name="sxtj"> | ||
| 136 | - <option value="0">全部</option> | ||
| 137 | - <option value="1">一车一单</option> | ||
| 138 | - <option value="2">一车多单</option> | ||
| 139 | - <option value="3">有加油没里程</option> | ||
| 140 | - <option value="4">有里程没加油</option> | ||
| 141 | - </select> | ||
| 142 | - </div> | ||
| 143 | - | ||
| 144 | - </td> | ||
| 145 | - </tr> | ||
| 146 | - <tr> | ||
| 147 | - <td colspan="17"> | ||
| 148 | - <div style="float: left;"> | ||
| 149 | - 总计 | ||
| 150 | - | ||
| 151 | - 加注量: <label id="sumJzl"></label> | ||
| 152 | - | ||
| 153 | - 耗油量: <label id="sumYh"></label> | ||
| 154 | - | ||
| 155 | - 损耗量: <label id="sumSh"></label> | ||
| 156 | - </div> | ||
| 157 | - </td> | ||
| 158 | - </tr> | ||
| 159 | - <tr role="row" class="heading"> | ||
| 160 | - <th width="2%">#</th> | ||
| 161 | - <th width="8%">日期</th> | ||
| 162 | - <th width="5%">公司</th> | ||
| 163 | - <th width="8%">线路</th> | ||
| 164 | - <th width="5%">自编号</th> | ||
| 165 | - <th width="6%">驾驶员</th> | ||
| 166 | - <th width="4%">加油量</th> | ||
| 167 | - <th width="4%">出场存油</th> | ||
| 168 | - <th width="4%">进场存油</th> | ||
| 169 | - <th width="5%">油耗</th> | ||
| 170 | - <th width="5%">燃油类型</th> | ||
| 171 | - <th width="4%">尿素</th> | ||
| 172 | - <th width="5%">耗损原因</th> | ||
| 173 | - <th width="5%">耗损油量</th> | ||
| 174 | - <th width="5%">当日总里程</th> | ||
| 175 | - <th width="5%">数据类型</th> | ||
| 176 | - <th width="5%">百公里油耗</th> | ||
| 177 | -<!-- <th width="5%">操作</th> --> | ||
| 178 | - </tr> | ||
| 179 | - </thead> | ||
| 180 | - <tbody></tbody> | ||
| 181 | - </table> | ||
| 182 | - <div style="text-align: right;"> | ||
| 183 | - <ul id="pagination" class="pagination"></ul> | ||
| 184 | - </div> | ||
| 185 | - </div> | ||
| 186 | - </div> | ||
| 187 | - </div> | ||
| 188 | - </div> | ||
| 189 | -</div> | 150 | + </td> |
| 151 | + </tr> | ||
| 152 | + <tr> | ||
| 153 | + <td colspan="17"> | ||
| 154 | + <div style="float: left;"> | ||
| 155 | + 总计 加注量: <label id="sumJzl"></label> | ||
| 156 | + 耗油量: <label id="sumYh"></label> | ||
| 157 | + 损耗量: <label id="sumSh"></label> | ||
| 158 | + </div> | ||
| 159 | + </td> | ||
| 160 | + </tr> | ||
| 161 | + | ||
| 162 | + </thead> | ||
| 190 | 163 | ||
| 164 | + </table> | ||
| 165 | + </div> | ||
| 166 | + </div> | ||
| 167 | + | ||
| 168 | + <div id="ylbtable" class="portlet-body table-container " style="height: calc(100% + 100px);overflow: hidden;position: absolute;background: #fff;"> | ||
| 169 | + | ||
| 170 | + <table | ||
| 171 | + class="table table-striped table-bordered table-hover table-checkable" | ||
| 172 | + style="table-layout: fixed;margin-bottom: 0px;"> | ||
| 173 | + <thead> | ||
| 174 | + <tr role="row" class="heading"> | ||
| 175 | + <td width="40px"> | ||
| 176 | + <input type="checkbox" id="selectAll" class="group-checkable icheck" > | ||
| 177 | + </td> | ||
| 178 | + <td width="40px">序号</td> | ||
| 179 | + <td width="8%">日期</td> | ||
| 180 | + <td width="5%">公司</td> | ||
| 181 | + <td width="8%">线路</td> | ||
| 182 | + <td width="5%">自编号</td> | ||
| 183 | + <td width="7%">驾驶员</td> | ||
| 184 | + <td width="4%">加油量</td> | ||
| 185 | + <td width="5%">出场存油</td> | ||
| 186 | + <td width="5%">进场存油</td> | ||
| 187 | + <td width="5%">油耗</td> | ||
| 188 | + <td width="8%">燃油类型</td> | ||
| 189 | + <td width="4%">尿素</td> | ||
| 190 | + <td width="8%">耗损原因</td> | ||
| 191 | + <td width="5%">耗损油量</td> | ||
| 192 | + <td width="5%">当日总里程</td> | ||
| 193 | + <td width="5%">数据类型</td> | ||
| 194 | + <td >百公里油耗</td> | ||
| 195 | + </tr> | ||
| 196 | + </thead> | ||
| 197 | + </table> | ||
| 198 | + <div id="datatable_ylb_body_div" style="display: block;position:absolute;overflow: auto;height: calc(100% - 80px);"> | ||
| 199 | + <table | ||
| 200 | + class="table table-striped table-bordered table-hover table-checkable" | ||
| 201 | + id="datatable_ylb_body" | ||
| 202 | + style="table-layout: fixed; overflow: auto; "> | ||
| 203 | + <tbody></tbody> | ||
| 204 | + </table> | ||
| 205 | + </div> | ||
| 206 | + | ||
| 207 | + | ||
| 208 | + <div style="text-align: right;"> | ||
| 209 | + <ul id="pagination" class="pagination"></ul> | ||
| 210 | + </div> | ||
| 211 | + </div> | ||
| 212 | +</div> | ||
| 191 | <script id="ylb_list_temp" type="text/html"> | 213 | <script id="ylb_list_temp" type="text/html"> |
| 192 | {{each list as obj i}} | 214 | {{each list as obj i}} |
| 193 | <tr> | 215 | <tr> |
| 194 | - <td style="vertical-align: middle;"> | 216 | + <td style="vertical-align: middle;" width="40px"> |
| 195 | <input type="checkbox" name="id" class="group-checkable icheck" data-id="{{obj.id}}"> | 217 | <input type="checkbox" name="id" class="group-checkable icheck" data-id="{{obj.id}}"> |
| 196 | </td> | 218 | </td> |
| 197 | - | ||
| 198 | - <td> | 219 | + <td width="40px">{{i+1}}</td> |
| 220 | + <td width="8%"> | ||
| 199 | {{obj.rq}} | 221 | {{obj.rq}} |
| 200 | </td> | 222 | </td> |
| 201 | - <td> | 223 | + <td width="5%"> |
| 202 | {{obj.fgsname}} | 224 | {{obj.fgsname}} |
| 203 | </td> | 225 | </td> |
| 204 | - <td> | 226 | + <td width="8%"> |
| 205 | {{obj.xlname}} | 227 | {{obj.xlname}} |
| 206 | </td> | 228 | </td> |
| 207 | - <td> | 229 | + <td width="5%"> |
| 208 | <lable data-id="{{obj.id}}" class="in_carpark_nbbm">{{obj.nbbm}}</lable> | 230 | <lable data-id="{{obj.id}}" class="in_carpark_nbbm">{{obj.nbbm}}</lable> |
| 209 | 231 | ||
| 210 | </td> | 232 | </td> |
| 211 | - <td> | 233 | + <td width="7%"> |
| 212 | {{obj.jsy}}/{{obj.name}} | 234 | {{obj.jsy}}/{{obj.name}} |
| 213 | </td> | 235 | </td> |
| 214 | - <td> | 236 | + <td width="4%"> |
| 215 | 237 | ||
| 216 | - <lable data-id="{{obj.id}}" class="in_carpark_jzl"> {{obj.jzl}}</lable> | 238 | + <lable data-id="{{obj.id}}" class="in_carpark_jzl"> {{obj.jzl}}</lable> |
| 217 | </td> | 239 | </td> |
| 218 | - <td> | 240 | + <td width="5%"> |
| 219 | 241 | ||
| 220 | - <input data-id="{{obj.id}}" href="javascript:;" class="in_carpark_czyl" | ||
| 221 | - type="text" value=" {{obj.czyl}}" style=" width:45px" | 242 | + <input data-id="{{obj.id}}" id="{{(i+1)}}_1" href="javascript:;" class="in_carpark_czyl yl_sxzy" |
| 243 | + type="text" value=" {{obj.czyl}}" style=" width:100%" | ||
| 222 | onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')" | 244 | onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')" |
| 223 | onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"> | 245 | onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"> |
| 224 | </td> | 246 | </td> |
| 225 | - <td> | ||
| 226 | - <input data-id="{{obj.id}}" href="javascript:;" class="in_carpark_jzyl" | ||
| 227 | - type="text" value=" {{obj.jzyl}}" style=" width:45px" | 247 | + <td width="5%"> |
| 248 | + <input data-id="{{obj.id}}" id="{{(i+1)}}_2" href="javascript:;" class="in_carpark_jzyl yl_sxzy" | ||
| 249 | + type="text" value=" {{obj.jzyl}}" style=" width:100%" | ||
| 228 | onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')" | 250 | onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')" |
| 229 | onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"> | 251 | onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"> |
| 230 | </td> | 252 | </td> |
| 231 | - <td> | 253 | + <td width="5%"> |
| 232 | 254 | ||
| 233 | - <input data-id="{{obj.id}}" href="javascript:;" class="in_carpark_yh" | ||
| 234 | - type="text" value="{{obj.yh}}" style=" width:50px" disabled="true" readOnly="true" /> | 255 | + <input data-id="{{obj.id}}" id="{{(i+1)}}_3" href="javascript:;" class="in_carpark_yh yl_sxzy" |
| 256 | + type="text" value="{{obj.yh}}" style=" width:100%" readOnly="true" /> | ||
| 235 | </td> | 257 | </td> |
| 236 | - <td> | ||
| 237 | - <select data-id="{{obj.id}}" class="in_carpark_rylx" style=" width:80px" > | 258 | + <td width="8%"> |
| 259 | + <select data-id="{{obj.id}}" class="in_carpark_rylx" style=" width:100%" > | ||
| 238 | <option value='0' {{if obj.rylx==0}} selected = 'selected' {{/if}}>0号柴油</option> | 260 | <option value='0' {{if obj.rylx==0}} selected = 'selected' {{/if}}>0号柴油</option> |
| 239 | <option value='1' {{if obj.rylx==1}} selected = 'selected' {{/if}}>负10号柴油</option> | 261 | <option value='1' {{if obj.rylx==1}} selected = 'selected' {{/if}}>负10号柴油</option> |
| 240 | </select> | 262 | </select> |
| 241 | </td> | 263 | </td> |
| 242 | - <td> | 264 | + <td width="4%"> |
| 243 | <input data-id="{{obj.id}}" href="javascript:;" | 265 | <input data-id="{{obj.id}}" href="javascript:;" |
| 244 | - class="in_carpark_ns" type="text" value=" {{obj.ns}}" style=" width:40px" | 266 | + class="in_carpark_ns yl_sxzy" id="{{(i+1)}}_4" type="text" value=" {{obj.ns}}" style=" width:100%" |
| 245 | onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')" | 267 | onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')" |
| 246 | onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"> | 268 | onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')"> |
| 247 | </td> | 269 | </td> |
| 248 | - <td> | ||
| 249 | - <select data-id="{{obj.id}}" class="in_carpark_shyy" style=" width:80px"> | 270 | + <td width="8%"> |
| 271 | + <select data-id="{{obj.id}}" class="in_carpark_shyy" style=" width:100%" > | ||
| 250 | <option value='0' {{if obj.shyy==0}} selected = 'selected' {{/if}}>请选择</option> | 272 | <option value='0' {{if obj.shyy==0}} selected = 'selected' {{/if}}>请选择</option> |
| 251 | <option value='1' {{if obj.shyy==1}} selected = 'selected' {{/if}}>票务用油</option> | 273 | <option value='1' {{if obj.shyy==1}} selected = 'selected' {{/if}}>票务用油</option> |
| 252 | <option value='2' {{if obj.shyy==2}} selected = 'selected' {{/if}}>保养用油</option> | 274 | <option value='2' {{if obj.shyy==2}} selected = 'selected' {{/if}}>保养用油</option> |
| @@ -258,23 +280,23 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -258,23 +280,23 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 258 | <option value='8' {{if obj.shyy==8}} selected = 'selected' {{/if}}>车间(小修)</option> | 280 | <option value='8' {{if obj.shyy==8}} selected = 'selected' {{/if}}>车间(小修)</option> |
| 259 | </select> | 281 | </select> |
| 260 | </td> | 282 | </td> |
| 261 | - <td> | ||
| 262 | - <input data-id="{{obj.id}}" href="javascript:;" class="in_carpark_shyl" | ||
| 263 | - value={{obj.sh}} style=" width:40px" type="text" | 283 | + <td width="5%"> |
| 284 | + <input data-id="{{obj.id}}" id="{{(i+1)}}_5" href="javascript:;" class="in_carpark_shyl yl_sxzy" | ||
| 285 | + value={{obj.sh}} style=" width:100%" type="text" | ||
| 264 | onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')" | 286 | onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')" |
| 265 | onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')" /> | 287 | onafterpaste="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').replace(/\./g,'').replace('$#$','.')" /> |
| 266 | 288 | ||
| 267 | </td> | 289 | </td> |
| 268 | - <td> | 290 | + <td width="5%"> |
| 269 | {{obj.zlc}} | 291 | {{obj.zlc}} |
| 270 | </td> | 292 | </td> |
| 271 | - <td> | 293 | + <td width="5%"> |
| 272 | <select data-id="{{obj.id}}" class="in_carpark_yhlx"> | 294 | <select data-id="{{obj.id}}" class="in_carpark_yhlx"> |
| 273 | <option value='0' {{if obj.yhlx==0}} selected = 'selected' {{/if}}>手录</option> | 295 | <option value='0' {{if obj.yhlx==0}} selected = 'selected' {{/if}}>手录</option> |
| 274 | <option value='1' {{if obj.yhlx==1}} selected = 'selected' {{/if}}>拆分</option> | 296 | <option value='1' {{if obj.yhlx==1}} selected = 'selected' {{/if}}>拆分</option> |
| 275 | </select> | 297 | </select> |
| 276 | </td> | 298 | </td> |
| 277 | - <td> | 299 | + <td > |
| 278 | {{obj.bglyh}} | 300 | {{obj.bglyh}} |
| 279 | </td> | 301 | </td> |
| 280 | </tr> | 302 | </tr> |
| @@ -293,7 +315,7 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -293,7 +315,7 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 293 | //$('.in_carpark_jzyl[data-id='+id+']', '#ll_oil_list') | 315 | //$('.in_carpark_jzyl[data-id='+id+']', '#ll_oil_list') |
| 294 | 316 | ||
| 295 | $("#checkYl").on('click', function () { | 317 | $("#checkYl").on('click', function () { |
| 296 | - console.log("核对加注量"); | 318 | + //console.log("核对加注量"); |
| 297 | if ($("#rq").val() != "") { | 319 | if ($("#rq").val() != "") { |
| 298 | var params=getParamsList(); | 320 | var params=getParamsList(); |
| 299 | var i = layer.load(2); | 321 | var i = layer.load(2); |
| @@ -308,7 +330,7 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -308,7 +330,7 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 308 | 330 | ||
| 309 | //进场等于出场 | 331 | //进场等于出场 |
| 310 | $("#outAndIn").on('click', function () { | 332 | $("#outAndIn").on('click', function () { |
| 311 | - console.log("进场油量等于出场油量"); | 333 | + // console.log("进场油量等于出场油量"); |
| 312 | if ($("#rq").val() != "") { | 334 | if ($("#rq").val() != "") { |
| 313 | var params=getParamsList(); | 335 | var params=getParamsList(); |
| 314 | var i = layer.load(2); | 336 | var i = layer.load(2); |
| @@ -380,6 +402,112 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -380,6 +402,112 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 380 | //拆分 | 402 | //拆分 |
| 381 | $("#sortButton").on('click', function () { | 403 | $("#sortButton").on('click', function () { |
| 382 | if ($("#rq").val() != "") { | 404 | if ($("#rq").val() != "") { |
| 405 | + //拆分前先保存全部 | ||
| 406 | + var ylArray = []; | ||
| 407 | + $('input.icheck').each(function(){ | ||
| 408 | + var map = {}; | ||
| 409 | + var id=$(this).data('id'); | ||
| 410 | + var nbbm =$('.in_carpark_nbbm[data-id='+id+']', '#ll_oil_list').html(); | ||
| 411 | + var jzl =$('.in_carpark_jzl[data-id='+id+']', '#ll_oil_list').html(); | ||
| 412 | + if(jzl=="" || jzl ==null){ | ||
| 413 | + jzl=0; | ||
| 414 | + } | ||
| 415 | + var czyl=$('.in_carpark_czyl[data-id='+id+']', '#ll_oil_list').val(); | ||
| 416 | + if(czyl=="" || czyl==null){ | ||
| 417 | + czyl=0; | ||
| 418 | + } | ||
| 419 | + var jzyl=$('.in_carpark_jzyl[data-id='+id+']', '#ll_oil_list').val(); | ||
| 420 | + if(jzyl=="" || jzyl==null){ | ||
| 421 | + jzyl=0; | ||
| 422 | + } | ||
| 423 | + | ||
| 424 | + var sh = $('.in_carpark_shyl[data-id='+id+']', '#ll_oil_list').val(); | ||
| 425 | + if(sh=="" || sh==null){ | ||
| 426 | + sh=0; | ||
| 427 | + } | ||
| 428 | + | ||
| 429 | + var shyy = $('.in_carpark_shyy[data-id='+id+']', '#ll_oil_list').val(); | ||
| 430 | + var ns = $('.in_carpark_ns[data-id='+id+']', '#ll_oil_list').val(); | ||
| 431 | + if(ns=="" || ns==null){ | ||
| 432 | + ns=0; | ||
| 433 | + } | ||
| 434 | + | ||
| 435 | + var rylx= $('.in_carpark_rylx[data-id='+id+']', '#ll_oil_list').val(); | ||
| 436 | + var yhlx = $('.in_carpark_yhlx[data-id='+id+']', '#ll_oil_list').val(); | ||
| 437 | + | ||
| 438 | + map['id']=id; | ||
| 439 | + map['jzl']=jzl; | ||
| 440 | + map['czyl']=czyl; | ||
| 441 | + map['jzyl']=jzyl; | ||
| 442 | + map['sh']=sh; | ||
| 443 | + map['shyy']=shyy; | ||
| 444 | + map['ns']=ns; | ||
| 445 | + map['rylx']=rylx; | ||
| 446 | + map['yhlx']=yhlx; | ||
| 447 | + map['nbbm']=nbbm; | ||
| 448 | + map['rq']=$("#rq").val(); | ||
| 449 | + ylArray.push(map); | ||
| 450 | + }) | ||
| 451 | + var params = {}; | ||
| 452 | + params['ylbList']=JSON.stringify(ylArray); | ||
| 453 | + | ||
| 454 | + | ||
| 455 | + //拆分操作 | ||
| 456 | + var ylArray2 = []; | ||
| 457 | + var nbbm=""; | ||
| 458 | + var msg=""; | ||
| 459 | + $('input.icheck:checked').each(function(){ | ||
| 460 | + var map = {}; | ||
| 461 | + var id=$(this).data('id'); | ||
| 462 | + var clzbh =$('.in_carpark_nbbm[data-id='+id+']', '#ll_oil_list').html(); | ||
| 463 | + if(nbbm.indexOf(clzbh)>-1){ | ||
| 464 | + if(msg==""){ | ||
| 465 | + msg += clzbh; | ||
| 466 | + }else{ | ||
| 467 | + msg += ","+clzbh; | ||
| 468 | + } | ||
| 469 | + }else{ | ||
| 470 | + nbbm +=clzbh; | ||
| 471 | + var jzyl=$('.in_carpark_jzyl[data-id='+id+']', '#ll_oil_list').val(); | ||
| 472 | + var sh = $('.in_carpark_shyl[data-id='+id+']', '#ll_oil_list').val(); | ||
| 473 | + var shyy = $('.in_carpark_shyy[data-id='+id+']', '#ll_oil_list').val(); | ||
| 474 | + var ns = $('.in_carpark_ns[data-id='+id+']', '#ll_oil_list').val(); | ||
| 475 | + var rylx= $('.in_carpark_rylx[data-id='+id+']', '#ll_oil_list').val(); | ||
| 476 | + map['id']=id; | ||
| 477 | + map['jzyl']=jzyl; | ||
| 478 | + map['sh']=sh; | ||
| 479 | + map['shyy']=shyy; | ||
| 480 | + map['ns']=ns; | ||
| 481 | + map['rylx']=rylx; | ||
| 482 | + ylArray2.push(map); | ||
| 483 | + } | ||
| 484 | + | ||
| 485 | + }) ; | ||
| 486 | + if(msg!=""){ | ||
| 487 | + layer.msg('内部编码为:【'+msg +'】的车辆请选择一条数据进行拆分.'); | ||
| 488 | + }else{ | ||
| 489 | + var params2 = {}; | ||
| 490 | + params2['ylbList']=JSON.stringify(ylArray2); | ||
| 491 | + var i = layer.load(2); | ||
| 492 | + //保存操作 | ||
| 493 | + $post('/ylb/saveYlbList', params, function () { | ||
| 494 | + //拆分操作 | ||
| 495 | + $post('/ylb/sort', params2, function () { | ||
| 496 | + layer.close(i); | ||
| 497 | + var params1 =getParamsList(); | ||
| 498 | + jsDoQuery(params1, true); | ||
| 499 | + }); | ||
| 500 | + }); | ||
| 501 | + } | ||
| 502 | + | ||
| 503 | + } else { | ||
| 504 | + layer.msg('请选择日期.'); | ||
| 505 | + } | ||
| 506 | + }) | ||
| 507 | + | ||
| 508 | + /* //拆分 | ||
| 509 | + $("#sortButton").on('click', function () { | ||
| 510 | + if ($("#rq").val() != "") { | ||
| 383 | var ylArray = []; | 511 | var ylArray = []; |
| 384 | var nbbm=""; | 512 | var nbbm=""; |
| 385 | var msg=""; | 513 | var msg=""; |
| @@ -424,36 +552,13 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -424,36 +552,13 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 424 | 552 | ||
| 425 | } | 553 | } |
| 426 | 554 | ||
| 427 | - /* var id = $('input.icheck:checked').data('id'); | ||
| 428 | - | ||
| 429 | - if (typeof(id) == 'undefined') { | ||
| 430 | - layer.msg("请选择一行进行拆分"); | ||
| 431 | - } else { | ||
| 432 | - //获取输入的进场存油 | ||
| 433 | - var jzyl = $('.in_carpark_jzyl[data-id='+id+']', '#ll_oil_list').html(); | ||
| 434 | - var sh = $('.in_carpark_shyl[data-id='+id+']', '#ll_oil_list').html(); | ||
| 435 | - var shyy = $('.in_carpark_shyy[data-id='+id+']', '#ll_oil_list').val(); | ||
| 436 | - // $("#jzyl" + id).html(); | ||
| 437 | - var params = {}; | ||
| 438 | - params['jzyl'] = jzyl; | ||
| 439 | - params['sh'] =sh; | ||
| 440 | - params['shyy']=shyy; | ||
| 441 | - params['id'] = id; | ||
| 442 | - var i = layer.load(2); | ||
| 443 | - $get('/ylb/sort', params, function () { | ||
| 444 | - layer.close(i); | ||
| 445 | - var params1 =getParamsList(); | ||
| 446 | - jsDoQuery(params1, true); | ||
| 447 | - }); | ||
| 448 | - | ||
| 449 | - } */ | ||
| 450 | } else { | 555 | } else { |
| 451 | layer.msg('请选择日期.'); | 556 | layer.msg('请选择日期.'); |
| 452 | } | 557 | } |
| 453 | - }) | 558 | + }) */ |
| 454 | //获取加存信息 | 559 | //获取加存信息 |
| 455 | $("#obtain").on('click', function () { | 560 | $("#obtain").on('click', function () { |
| 456 | - console.log("获取加存"); | 561 | + //console.log("获取加存"); |
| 457 | if ($("#rq").val() != "") { | 562 | if ($("#rq").val() != "") { |
| 458 | var params =getParamsList(); | 563 | var params =getParamsList(); |
| 459 | 564 | ||
| @@ -493,8 +598,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -493,8 +598,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 493 | layer.msg('请选择公司和分公司.'); | 598 | layer.msg('请选择公司和分公司.'); |
| 494 | }else { | 599 | }else { |
| 495 | var params = getParamsList(); | 600 | var params = getParamsList(); |
| 496 | - | ||
| 497 | - | ||
| 498 | page = 0; | 601 | page = 0; |
| 499 | jsDoQuery(params, true); | 602 | jsDoQuery(params, true); |
| 500 | } | 603 | } |
| @@ -526,8 +629,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -526,8 +629,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 526 | return params; | 629 | return params; |
| 527 | } | 630 | } |
| 528 | 631 | ||
| 529 | -// var gsqxdm=""; | ||
| 530 | - | ||
| 531 | var xlList; | 632 | var xlList; |
| 532 | var obj=[]; | 633 | var obj=[]; |
| 533 | $.get('/report/lineList',function(result){ | 634 | $.get('/report/lineList',function(result){ |
| @@ -535,32 +636,17 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -535,32 +636,17 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 535 | $.get('/user/companyData', function(result){ | 636 | $.get('/user/companyData', function(result){ |
| 536 | obj = result; | 637 | obj = result; |
| 537 | var options=""; | 638 | var options=""; |
| 538 | - // = '<option value="">请选择</option>'; | ||
| 539 | for(var i = 0; i < obj.length; i++){ | 639 | for(var i = 0; i < obj.length; i++){ |
| 540 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | 640 | options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; |
| 541 | - // setFgsqx(obj[i].companyCode); | ||
| 542 | } | 641 | } |
| 543 | $('#ylbListGsdmId').html(options); | 642 | $('#ylbListGsdmId').html(options); |
| 544 | updateCompany(); | 643 | updateCompany(); |
| 545 | }); | 644 | }); |
| 546 | }) | 645 | }) |
| 547 | - /* function setFgsqx(gs){ | ||
| 548 | - var company =gs | ||
| 549 | - var options = ''; | ||
| 550 | - for(var i = 0; i < obj.length; i++){ | ||
| 551 | - if(obj[i].companyCode == company){ | ||
| 552 | - var children = obj[i].children; | ||
| 553 | - for(var j = 0; j < children.length; j++){ | ||
| 554 | - gsqxdm +=company+""+children[j].code+","; | ||
| 555 | - } | ||
| 556 | - } | ||
| 557 | - } | ||
| 558 | - } */ | ||
| 559 | $("#ylbListGsdmId").on("change",updateCompany); | 646 | $("#ylbListGsdmId").on("change",updateCompany); |
| 560 | function updateCompany(){ | 647 | function updateCompany(){ |
| 561 | var company = $('#ylbListGsdmId').val(); | 648 | var company = $('#ylbListGsdmId').val(); |
| 562 | var options =""; | 649 | var options =""; |
| 563 | -// = '<option value="">请选择</option>'; | ||
| 564 | for(var i = 0; i < obj.length; i++){ | 650 | for(var i = 0; i < obj.length; i++){ |
| 565 | if(obj[i].companyCode == company){ | 651 | if(obj[i].companyCode == company){ |
| 566 | var children = obj[i].children; | 652 | var children = obj[i].children; |
| @@ -576,6 +662,7 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -576,6 +662,7 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 576 | /* | 662 | /* |
| 577 | * 获取数据 p: 要提交的参数, pagination: 是否重新分页 | 663 | * 获取数据 p: 要提交的参数, pagination: 是否重新分页 |
| 578 | */ | 664 | */ |
| 665 | + var moveArray=new Array(); //存放文本框数组 | ||
| 579 | function jsDoQuery(p, pagination) { | 666 | function jsDoQuery(p, pagination) { |
| 580 | var params = {}; | 667 | var params = {}; |
| 581 | if (p) | 668 | if (p) |
| @@ -584,50 +671,29 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -584,50 +671,29 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 584 | params['order'] = 'nbbm'; | 671 | params['order'] = 'nbbm'; |
| 585 | params['page'] = page; | 672 | params['page'] = page; |
| 586 | params['rq'] = $("#rq").val(); | 673 | params['rq'] = $("#rq").val(); |
| 587 | - | ||
| 588 | - /* var ylbGsdm=$("#ylbListGsdmId").val(); | ||
| 589 | - var ylbFgsdm=$("#ylbListFgsdmId").val(); | ||
| 590 | - if(ylbGsdm==''|| ylbGsdm==null){ | ||
| 591 | - params['concat(ssgsdm,fgsdm)_in']=gsqxdm; | ||
| 592 | - }else{ | ||
| 593 | - if(ylbFgsdm==''||ylbFgsdm==null){ | ||
| 594 | - var fgsqx1=''; | ||
| 595 | - for(var i = 0; i < obj.length; i++){ | ||
| 596 | - if(obj[i].companyCode == ylbGsdm){ | ||
| 597 | - var children = obj[i].children; | ||
| 598 | - for(var j = 0; j < children.length; j++){ | ||
| 599 | - fgsqx1 +=children[j].code+","; | ||
| 600 | - } | ||
| 601 | - } | ||
| 602 | - } | ||
| 603 | - params['fgsdm_in']=fgsqx1; | ||
| 604 | - } | ||
| 605 | - } */ | ||
| 606 | - | 674 | + |
| 607 | var l = layer.load(2); | 675 | var l = layer.load(2); |
| 608 | $get('/ylb/ylbList', params, function (data) { | 676 | $get('/ylb/ylbList', params, function (data) { |
| 609 | - | 677 | + |
| 678 | + for(var i=1;i<data.length;i++){ | ||
| 679 | + moveArray[i]=new Array(); | ||
| 680 | + for(var j=1;j<6;j++){ | ||
| 681 | + moveArray[i][j]=i+"_"+j; | ||
| 682 | + } | ||
| 683 | + } | ||
| 610 | $.each(data, function (i, obj) { | 684 | $.each(data, function (i, obj) { |
| 611 | obj.rq = moment(obj.rq).format("YYYY-MM-DD"); | 685 | obj.rq = moment(obj.rq).format("YYYY-MM-DD"); |
| 612 | }); | 686 | }); |
| 613 | var bodyHtm = template('ylb_list_temp', {list:data}); | 687 | var bodyHtm = template('ylb_list_temp', {list:data}); |
| 614 | - $('#datatable_ylb tbody').html(bodyHtm); | ||
| 615 | - /* $('#datatable_ylb tbody').html(bodyHtm) | ||
| 616 | - .find('.icheck').iCheck(icheckOptions) | ||
| 617 | - .on('ifChanged', iCheckChange); | ||
| 618 | - if (pagination && data.content.length > 0) { | ||
| 619 | - //重新分页 | ||
| 620 | - initPagination = true; | ||
| 621 | - showPagination(data); | ||
| 622 | - } */ | 688 | + |
| 689 | + $('#datatable_ylb_body tbody').html(bodyHtm); | ||
| 690 | + $('.yl_sxzy').on('mouseup', yhSxzy); | ||
| 623 | layer.close(l); | 691 | layer.close(l); |
| 624 | $get('/ylb/sumYlb',params,function(returns){ | 692 | $get('/ylb/sumYlb',params,function(returns){ |
| 625 | $("#sumJzl").html(returns.jzl); | 693 | $("#sumJzl").html(returns.jzl); |
| 626 | $("#sumYh").html(returns.yh); | 694 | $("#sumYh").html(returns.yh); |
| 627 | $("#sumSh").html(returns.sh); | 695 | $("#sumSh").html(returns.sh); |
| 628 | }); | 696 | }); |
| 629 | -// startOptJzylLink($('#ll_oil_list .in_carpark_jzyl')); | ||
| 630 | -// startOptShylLink($('#ll_oil_list .in_carpark_shyl')); | ||
| 631 | $('input').on('input propertychange',function(){ | 697 | $('input').on('input propertychange',function(){ |
| 632 | var id=$(this).data('id'); | 698 | var id=$(this).data('id'); |
| 633 | var jzl =$('.in_carpark_jzl[data-id='+id+']', '#ll_oil_list').html(); | 699 | var jzl =$('.in_carpark_jzl[data-id='+id+']', '#ll_oil_list').html(); |
| @@ -754,11 +820,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -754,11 +820,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 754 | tr.addClass('row-active'); | 820 | tr.addClass('row-active'); |
| 755 | else | 821 | else |
| 756 | tr.removeClass('row-active'); | 822 | tr.removeClass('row-active'); |
| 757 | - | ||
| 758 | - /* if($('#datatable_resource input.icheck:checked').length == 1) | ||
| 759 | - $('#removeButton').removeAttr('disabled'); | ||
| 760 | - else | ||
| 761 | - $('#removeButton').attr('disabled', 'disabled'); */ | ||
| 762 | } | 823 | } |
| 763 | 824 | ||
| 764 | function showPagination(data) { | 825 | function showPagination(data) { |
| @@ -785,7 +846,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -785,7 +846,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 785 | }); | 846 | }); |
| 786 | } | 847 | } |
| 787 | 848 | ||
| 788 | - | ||
| 789 | //删除 | 849 | //删除 |
| 790 | $('#removeButton').on('click', function () { | 850 | $('#removeButton').on('click', function () { |
| 791 | var idArray = []; | 851 | var idArray = []; |
| @@ -814,18 +874,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -814,18 +874,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 814 | } | 874 | } |
| 815 | } | 875 | } |
| 816 | }); | 876 | }); |
| 817 | - | ||
| 818 | - //搜索线路 | ||
| 819 | - /* $.get('/basic/lineCode2Name',function(result){ | ||
| 820 | - var data=[]; | ||
| 821 | - data.push({id: " ", text: "全部线路"}); | ||
| 822 | - for(var code in result){ | ||
| 823 | - data.push({id: code, text: result[code]}); | ||
| 824 | - } | ||
| 825 | - initPinYinSelect2('#xlbm',data,''); | ||
| 826 | - | ||
| 827 | - }) */ | ||
| 828 | - | ||
| 829 | 877 | ||
| 830 | $("#ylbListFgsdmId").on("change",initXl); | 878 | $("#ylbListFgsdmId").on("change",initXl); |
| 831 | function initXl(){ | 879 | function initXl(){ |
| @@ -852,13 +900,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -852,13 +900,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 852 | initPinYinSelect2('#xlbm',data,''); | 900 | initPinYinSelect2('#xlbm',data,''); |
| 853 | fage=true; | 901 | fage=true; |
| 854 | } | 902 | } |
| 855 | -// $("#ylbListGsdmId").on("change",initNbbm); | ||
| 856 | -// $("#ylbListFgsdmId").on("change",initNbbm); | ||
| 857 | -// $("#xlbm").on("change",initNbbm); | ||
| 858 | -// function initNbbm(){ | ||
| 859 | -// var gsbm=$('#ylbListGsdmId').val(), | ||
| 860 | -// var fgsbm=$('#ylbListFgsdmId').val(), | ||
| 861 | -// var xlbm=$('#xlbm').val(); | ||
| 862 | 903 | ||
| 863 | $("#xlbm").on("change",initCl); | 904 | $("#xlbm").on("change",initCl); |
| 864 | function initCl(){ | 905 | function initCl(){ |
| @@ -910,7 +951,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -910,7 +951,6 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 910 | } | 951 | } |
| 911 | // } | 952 | // } |
| 912 | 953 | ||
| 913 | - | ||
| 914 | //导出 | 954 | //导出 |
| 915 | 955 | ||
| 916 | $("#export").on("click", function () { | 956 | $("#export").on("click", function () { |
| @@ -923,6 +963,103 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | @@ -923,6 +963,103 @@ onkeyup="this.value=this.value.replace(/[^(\d||/.)]/g,'').replace('.','$#$').rep | ||
| 923 | layer.msg('请选择日期.'); | 963 | layer.msg('请选择日期.'); |
| 924 | } | 964 | } |
| 925 | }); | 965 | }); |
| 966 | + | ||
| 967 | + //表格滚动条 | ||
| 968 | + var modal='#ylbtable'; | ||
| 969 | + $('#datatable_ylb_body_div', modal).perfectScrollbar({suppressScrollX: true}); | ||
| 970 | + | ||
| 971 | + //全选 全不选 | ||
| 972 | + $("#selectAll").on("click", function () { | ||
| 973 | + if ($(this).is(":checked")) { | ||
| 974 | + $("[name=id]:checkbox").prop("checked", true); | ||
| 975 | + } else { | ||
| 976 | + $("[name=id]:checkbox").prop("checked", false); | ||
| 977 | + } | ||
| 978 | + }); | ||
| 979 | + | ||
| 980 | + | ||
| 981 | + //键盘上下左右移动 | ||
| 982 | + var mouseInfo={}; //存放鼠标的当前位置 | ||
| 983 | + function yhSxzy(){ | ||
| 984 | + tdid=$(this).attr('id'); | ||
| 985 | + var rc=tdid.split("_"); | ||
| 986 | + mouseInfo["row"]=rc[0]; | ||
| 987 | + mouseInfo["col"]=rc[1]; | ||
| 988 | + } | ||
| 989 | + | ||
| 990 | + document.body.onkeydown=function(e){ //监听鼠标操作 | ||
| 991 | + e=window.event||e; | ||
| 992 | + switch(e.keyCode){ | ||
| 993 | + case 37: //左键 | ||
| 994 | + moveLeft(); | ||
| 995 | + break; | ||
| 996 | + case 38: //向上键 | ||
| 997 | + moveUp(); | ||
| 998 | + break; | ||
| 999 | + case 39: //右键 | ||
| 1000 | + moveRight(); | ||
| 1001 | + break; | ||
| 1002 | + case 40: //向下键 | ||
| 1003 | + moveDown(); | ||
| 1004 | + break; | ||
| 1005 | + default: | ||
| 1006 | + break; | ||
| 1007 | + } | ||
| 1008 | + } | ||
| 1009 | + | ||
| 1010 | + function moveLeft(){ | ||
| 1011 | + var row=mouseInfo["row"]; | ||
| 1012 | + var col=mouseInfo["col"]; | ||
| 1013 | + | ||
| 1014 | + var key=moveArray[row][col-1]; | ||
| 1015 | + if(document.getElementById(key)!=undefined) | ||
| 1016 | + { | ||
| 1017 | + var textFiled=document.getElementById(key); | ||
| 1018 | + textFiled.focus(false, 1000); | ||
| 1019 | + textFiled.select(); | ||
| 1020 | + mouseInfo["col"]=parseInt(col)-1; | ||
| 1021 | + } | ||
| 1022 | + | ||
| 1023 | + } | ||
| 1024 | + function moveRight(){ | ||
| 1025 | + var row=mouseInfo["row"]; | ||
| 1026 | + var col=mouseInfo["col"]; | ||
| 1027 | + | ||
| 1028 | + var key=moveArray[row][parseInt(col)+1]; | ||
| 1029 | + if(document.getElementById(key)!=undefined) | ||
| 1030 | + { | ||
| 1031 | + var textFiled=document.getElementById(key); | ||
| 1032 | + textFiled.focus(false, 1000); | ||
| 1033 | + textFiled.select(); | ||
| 1034 | + mouseInfo["col"]=parseInt(col)+1; | ||
| 1035 | + } | ||
| 1036 | + } | ||
| 1037 | + function moveUp(){ | ||
| 1038 | + var row=mouseInfo["row"]; | ||
| 1039 | + var col=mouseInfo["col"]; | ||
| 1040 | + | ||
| 1041 | + var key=moveArray[parseInt(row)-1][col]; | ||
| 1042 | + if(document.getElementById(key)!=undefined) | ||
| 1043 | + { | ||
| 1044 | + var textFiled=document.getElementById(key); | ||
| 1045 | + textFiled.focus(false, 1000); | ||
| 1046 | + textFiled.select(); | ||
| 1047 | + mouseInfo["row"]=parseInt(row)-1; | ||
| 1048 | + } | ||
| 1049 | + } | ||
| 1050 | + function moveDown(){ | ||
| 1051 | + var row=mouseInfo["row"]; | ||
| 1052 | + var col=mouseInfo["col"]; | ||
| 1053 | + | ||
| 1054 | + var key=moveArray[parseInt(row)+1][col]; | ||
| 1055 | + if(document.getElementById(key)!=undefined) | ||
| 1056 | + { | ||
| 1057 | + var textFiled=document.getElementById(key); | ||
| 1058 | + textFiled.focus(false, 1000); | ||
| 1059 | + textFiled.select(); | ||
| 1060 | + mouseInfo["row"]=parseInt(row)+1; | ||
| 1061 | + } | ||
| 1062 | + } | ||
| 926 | 1063 | ||
| 927 | }); | 1064 | }); |
| 928 | -</script> | ||
| 929 | \ No newline at end of file | 1065 | \ No newline at end of file |
| 1066 | +</script> |
src/main/resources/static/pages/report/inoutstation/inoutstation.html
| @@ -70,14 +70,14 @@ | @@ -70,14 +70,14 @@ | ||
| 70 | </div> | 70 | </div> |
| 71 | <div style="display: inline-block; margin-left: 5px;"> | 71 | <div style="display: inline-block; margin-left: 5px;"> |
| 72 | <input class="btn btn-default" type="button" id="query" value="查询" /> | 72 | <input class="btn btn-default" type="button" id="query" value="查询" /> |
| 73 | -<!-- <input class="btn btn-default" type="button" id="export" value="导出" /> --> | 73 | + <a class="btn btn-default" data-type="xls" href="javascript:;" id="export" >导出</a> |
| 74 | </div> | 74 | </div> |
| 75 | </div> | 75 | </div> |
| 76 | 76 | ||
| 77 | </form> | 77 | </form> |
| 78 | </div> | 78 | </div> |
| 79 | <div class="portlet-body" > | 79 | <div class="portlet-body" > |
| 80 | - <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 506px;height: 400px"> | 80 | + <div class="table-container" style="margin-top: 10px;overflow:auto;min-width: 506px;"> |
| 81 | <table class="table table-bordered table-hover table-checkable" id="forms"> | 81 | <table class="table table-bordered table-hover table-checkable" id="forms"> |
| 82 | <tbody class="ludan_ll_1"> | 82 | <tbody class="ludan_ll_1"> |
| 83 | 83 | ||
| @@ -113,78 +113,6 @@ | @@ -113,78 +113,6 @@ | ||
| 113 | initPinYinSelect2('#line',data,''); | 113 | initPinYinSelect2('#line',data,''); |
| 114 | 114 | ||
| 115 | }) | 115 | }) |
| 116 | - /* var fage=false; | ||
| 117 | - var obj = []; | ||
| 118 | - var xlList; | ||
| 119 | - $.get('/report/lineList',function(result){ | ||
| 120 | - xlList=result; | ||
| 121 | - | ||
| 122 | - $.get('/user/companyData', function(result){ | ||
| 123 | - obj = result; | ||
| 124 | - console.log(obj); | ||
| 125 | - var options = ''; | ||
| 126 | - for(var i = 0; i < obj.length; i++){ | ||
| 127 | - options += '<option value="'+obj[i].companyCode+'">'+obj[i].companyName+'</option>'; | ||
| 128 | - } | ||
| 129 | - | ||
| 130 | - if(obj.length ==0){ | ||
| 131 | - $("#gsdmDiv").css('display','none'); | ||
| 132 | - }else if(obj.length ==1){ | ||
| 133 | - $("#gsdmDiv").css('display','none'); | ||
| 134 | - if(obj[0].children.length == 1 || obj[0].children.length ==0) | ||
| 135 | - $('#fgsdmDiv').css('display','none'); | ||
| 136 | - } | ||
| 137 | - $('#gsdm').html(options); | ||
| 138 | - | ||
| 139 | - updateCompany(); | ||
| 140 | - }); | ||
| 141 | - }); | ||
| 142 | - | ||
| 143 | - $("#gsdm").on("change",updateCompany); | ||
| 144 | - function updateCompany(){ | ||
| 145 | - var company = $('#gsdm').val(); | ||
| 146 | - var options = ''; | ||
| 147 | - for(var i = 0; i < obj.length; i++){ | ||
| 148 | - if(obj[i].companyCode == company){ | ||
| 149 | - var children = obj[i].children; | ||
| 150 | - for(var j = 0; j < children.length; j++){ | ||
| 151 | - options += '<option value="'+children[j].code+'">'+children[j].name+'</option>'; | ||
| 152 | - } | ||
| 153 | - } | ||
| 154 | - } | ||
| 155 | - $('#fgsdm').html(options); | ||
| 156 | - initXl(); | ||
| 157 | - initCl(); | ||
| 158 | - } | ||
| 159 | - | ||
| 160 | - | ||
| 161 | - | ||
| 162 | - | ||
| 163 | - $("#fgsdm").on("change",initXl); | ||
| 164 | - function initXl(){ | ||
| 165 | - var data=[]; | ||
| 166 | - if(fage){ | ||
| 167 | - $("#line").select2("destroy").html(''); | ||
| 168 | - } | ||
| 169 | - var fgs=$('#fgsdm').val(); | ||
| 170 | - var gs=$('#gsdm').val(); | ||
| 171 | - for(var i=0;i<xlList.length;i++){ | ||
| 172 | - if(gs!=""){ | ||
| 173 | - if(fgs!=""){ | ||
| 174 | - if(xlList[i]["fgsbm"]==fgs && xlList[i]["gsbm"]==gs){ | ||
| 175 | - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]}); | ||
| 176 | - } | ||
| 177 | - }else{ | ||
| 178 | - if(xlList[i]["gsbm"]==gs){ | ||
| 179 | - data.push({id: xlList[i]["xlbm"], text: xlList[i]["xlname"]}); | ||
| 180 | - } | ||
| 181 | - } | ||
| 182 | - } | ||
| 183 | - } | ||
| 184 | - initPinYinSelect2('#line',data,''); | ||
| 185 | - fage=true; | ||
| 186 | - } | ||
| 187 | - */ | ||
| 188 | 116 | ||
| 189 | $("#query").on("click",function(){ | 117 | $("#query").on("click",function(){ |
| 190 | var line = $("#line").val(); | 118 | var line = $("#line").val(); |
| @@ -198,12 +126,11 @@ | @@ -198,12 +126,11 @@ | ||
| 198 | }else if(zdlx=="" || zdlx==null){ | 126 | }else if(zdlx=="" || zdlx==null){ |
| 199 | layer.msg("请选择方向"); | 127 | layer.msg("请选择方向"); |
| 200 | }else{ | 128 | }else{ |
| 201 | - $get('/report/queryStrinon',{line:line,zd:zdlx},function(result){ | ||
| 202 | - $get('/report/queryInOutStrtion',{line:line,date:date,zd:zdlx,lzsj:lzsj},function(result2){ | ||
| 203 | - console.log(result2); | ||
| 204 | - /* getTime(result); */ | ||
| 205 | - var ludan_ll_1 = template('ludan_ll_1',{list:result2,lists:result}); | ||
| 206 | - // 把渲染好的模版html文本追加到表格中 | 129 | + $get('/report/queryStrinon',{line:line,zd:zdlx},function(result){ |
| 130 | + $get('/report/queryInOutStrtions',{line:line,date:date,zd:zdlx,lzsj:lzsj},function(result2){ | ||
| 131 | +// /* getTime(result); */ | ||
| 132 | + var ludan_ll_1 = template('ludan_ll_1',{lists:result,list:result2}); | ||
| 133 | +// // 把渲染好的模版html文本追加到表格中 | ||
| 207 | $('#forms .ludan_ll_1').html(ludan_ll_1); | 134 | $('#forms .ludan_ll_1').html(ludan_ll_1); |
| 208 | }); | 135 | }); |
| 209 | }); | 136 | }); |
| @@ -242,51 +169,49 @@ | @@ -242,51 +169,49 @@ | ||
| 242 | 169 | ||
| 243 | 170 | ||
| 244 | 171 | ||
| 245 | - $("#export").on("click",function(){ | ||
| 246 | - var rq=$("#date").val(); | ||
| 247 | - var line=$("#line").val(); | ||
| 248 | - var nbbm=$("#nbbm").val(); | ||
| 249 | - var fcsj=$("#fcsj_xx").val(); | ||
| 250 | - var ddsj=$("#ddsj_xx").val(); | ||
| 251 | - if(fcsj==""){ | ||
| 252 | - layer.msg("没数据"); | ||
| 253 | - }else{ | ||
| 254 | - $get('/report/exportQueryListZdxx',{clzbh:nbbm,date:rq,line:line,fcsj:fcsj,ddsj:ddsj},function(result){ | ||
| 255 | - window.open("/downloadFile/download?fileName=班次到离站"); | ||
| 256 | - }); | 172 | + |
| 173 | + var $exportLink = document.getElementById('export'); | ||
| 174 | + $exportLink.addEventListener('click', function(e){ | ||
| 175 | + e.preventDefault(); | ||
| 176 | + if(e.target.nodeName === "A"){ | ||
| 177 | + tableExport('forms', '班次到离站', e.target.getAttribute('data-type')); | ||
| 257 | } | 178 | } |
| 179 | + | ||
| 258 | 180 | ||
| 259 | - }); | 181 | + |
| 182 | + }, false); | ||
| 260 | 183 | ||
| 261 | }); | 184 | }); |
| 262 | 185 | ||
| 263 | </script> | 186 | </script> |
| 264 | <script type="text/html" id="ludan_ll_1"> | 187 | <script type="text/html" id="ludan_ll_1"> |
| 265 | {{each list as obj i}} | 188 | {{each list as obj i}} |
| 266 | - | ||
| 267 | <tr> | 189 | <tr> |
| 268 | - <td>{{obj.bc}}</td> | ||
| 269 | - <td><label>{{obj.nbbm}}</label></td> | ||
| 270 | - {{each lists as o j}} | ||
| 271 | - {{if i==0}} | ||
| 272 | - <td> | ||
| 273 | - <label>{{obj[(o.stationCode)+'in']}} | ||
| 274 | - ({{obj[(o.stationCode)+'out']}}) | ||
| 275 | - </label> | ||
| 276 | - </td> | ||
| 277 | - {{else}} | ||
| 278 | - <td {{if obj[o.stationCode] =='y'}}style="color: red"{{/if}}> | ||
| 279 | - {{if obj[(o.stationCode)+'in']!=''}} | ||
| 280 | - <label> I {{obj[(o.stationCode)+'in']}}</label> | ||
| 281 | - {{/if}} | ||
| 282 | - <br/> | 190 | + {{if i==0}} |
| 191 | + <td>序号</td> | ||
| 192 | + <td>内部编码</label></td> | ||
| 193 | + {{else}} | ||
| 194 | + <td>{{i}}</td> | ||
| 195 | + <td><label>{{obj.nbbm}}</label></td> | ||
| 196 | + {{/if}} | ||
| 197 | + {{each lists as o j}} | ||
| 198 | + {{if i==0}} | ||
| 199 | + <td> | ||
| 200 | + <label>{{obj[(o.stationCode)+'in']}} | ||
| 201 | + ({{obj[(o.stationCode)+'out']}}) | ||
| 202 | + </label> | ||
| 203 | + </td> | ||
| 204 | + {{else}} | ||
| 205 | + <td {{if obj[o.stationCode] =='y'}}style="color: red"{{/if}}> | ||
| 206 | + {{if obj[(o.stationCode)+'in']!=''}} | ||
| 207 | + <label> I {{obj[(o.stationCode)+'in']}}</label> | ||
| 208 | + {{/if}}<br/> | ||
| 283 | {{if obj[(o.stationCode)+'out']!=''}} | 209 | {{if obj[(o.stationCode)+'out']!=''}} |
| 284 | - <label> O {{obj[(o.stationCode)+'out']}}</label> | 210 | + <label> O {{obj[(o.stationCode)+'out']}}</label> |
| 285 | {{/if}} | 211 | {{/if}} |
| 286 | </td> | 212 | </td> |
| 287 | {{/if}} | 213 | {{/if}} |
| 288 | {{/each}} | 214 | {{/each}} |
| 289 | - | ||
| 290 | </tr> | 215 | </tr> |
| 291 | {{/each}} | 216 | {{/each}} |
| 292 | {{if list.length == 0}} | 217 | {{if list.length == 0}} |
| @@ -295,3 +220,8 @@ | @@ -295,3 +220,8 @@ | ||
| 295 | </tr> | 220 | </tr> |
| 296 | {{/if}} | 221 | {{/if}} |
| 297 | </script> | 222 | </script> |
| 223 | + | ||
| 224 | +<script src="/pages/report/inoutstation/js/Blob.js" ></script> | ||
| 225 | +<script src="/pages/report/inoutstation/js/FileSaver.js" ></script> | ||
| 226 | +<script src="/pages/report/inoutstation/js/tableExport.js" ></script> | ||
| 227 | + |
src/main/resources/static/pages/report/inoutstation/js/Blob.js
0 → 100644
| 1 | +/* Blob.js | ||
| 2 | + * A Blob implementation. | ||
| 3 | + * 2014-07-24 | ||
| 4 | + * | ||
| 5 | + * By Eli Grey, http://eligrey.com | ||
| 6 | + * By Devin Samarin, https://github.com/dsamarin | ||
| 7 | + * License: X11/MIT | ||
| 8 | + * See https://github.com/eligrey/Blob.js/blob/master/LICENSE.md | ||
| 9 | + */ | ||
| 10 | + | ||
| 11 | +/*global self, unescape */ | ||
| 12 | +/*jslint bitwise: true, regexp: true, confusion: true, es5: true, vars: true, white: true, | ||
| 13 | + plusplus: true */ | ||
| 14 | + | ||
| 15 | +/*! @source http://purl.eligrey.com/github/Blob.js/blob/master/Blob.js */ | ||
| 16 | + | ||
| 17 | +(function (view) { | ||
| 18 | + "use strict"; | ||
| 19 | + | ||
| 20 | + view.URL = view.URL || view.webkitURL; | ||
| 21 | + | ||
| 22 | + if (view.Blob && view.URL) { | ||
| 23 | + try { | ||
| 24 | + new Blob; | ||
| 25 | + return; | ||
| 26 | + } catch (e) {} | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + // Internally we use a BlobBuilder implementation to base Blob off of | ||
| 30 | + // in order to support older browsers that only have BlobBuilder | ||
| 31 | + var BlobBuilder = view.BlobBuilder || view.WebKitBlobBuilder || view.MozBlobBuilder || (function(view) { | ||
| 32 | + var | ||
| 33 | + get_class = function(object) { | ||
| 34 | + return Object.prototype.toString.call(object).match(/^\[object\s(.*)\]$/)[1]; | ||
| 35 | + } | ||
| 36 | + , FakeBlobBuilder = function BlobBuilder() { | ||
| 37 | + this.data = []; | ||
| 38 | + } | ||
| 39 | + , FakeBlob = function Blob(data, type, encoding) { | ||
| 40 | + this.data = data; | ||
| 41 | + this.size = data.length; | ||
| 42 | + this.type = type; | ||
| 43 | + this.encoding = encoding; | ||
| 44 | + } | ||
| 45 | + , FBB_proto = FakeBlobBuilder.prototype | ||
| 46 | + , FB_proto = FakeBlob.prototype | ||
| 47 | + , FileReaderSync = view.FileReaderSync | ||
| 48 | + , FileException = function(type) { | ||
| 49 | + this.code = this[this.name = type]; | ||
| 50 | + } | ||
| 51 | + , file_ex_codes = ( | ||
| 52 | + "NOT_FOUND_ERR SECURITY_ERR ABORT_ERR NOT_READABLE_ERR ENCODING_ERR " | ||
| 53 | + + "NO_MODIFICATION_ALLOWED_ERR INVALID_STATE_ERR SYNTAX_ERR" | ||
| 54 | + ).split(" ") | ||
| 55 | + , file_ex_code = file_ex_codes.length | ||
| 56 | + , real_URL = view.URL || view.webkitURL || view | ||
| 57 | + , real_create_object_URL = real_URL.createObjectURL | ||
| 58 | + , real_revoke_object_URL = real_URL.revokeObjectURL | ||
| 59 | + , URL = real_URL | ||
| 60 | + , btoa = view.btoa | ||
| 61 | + , atob = view.atob | ||
| 62 | + | ||
| 63 | + , ArrayBuffer = view.ArrayBuffer | ||
| 64 | + , Uint8Array = view.Uint8Array | ||
| 65 | + | ||
| 66 | + , origin = /^[\w-]+:\/*\[?[\w\.:-]+\]?(?::[0-9]+)?/ | ||
| 67 | + ; | ||
| 68 | + FakeBlob.fake = FB_proto.fake = true; | ||
| 69 | + while (file_ex_code--) { | ||
| 70 | + FileException.prototype[file_ex_codes[file_ex_code]] = file_ex_code + 1; | ||
| 71 | + } | ||
| 72 | + // Polyfill URL | ||
| 73 | + if (!real_URL.createObjectURL) { | ||
| 74 | + URL = view.URL = function(uri) { | ||
| 75 | + var | ||
| 76 | + uri_info = document.createElementNS("http://www.w3.org/1999/xhtml", "a") | ||
| 77 | + , uri_origin | ||
| 78 | + ; | ||
| 79 | + uri_info.href = uri; | ||
| 80 | + if (!("origin" in uri_info)) { | ||
| 81 | + if (uri_info.protocol.toLowerCase() === "data:") { | ||
| 82 | + uri_info.origin = null; | ||
| 83 | + } else { | ||
| 84 | + uri_origin = uri.match(origin); | ||
| 85 | + uri_info.origin = uri_origin && uri_origin[1]; | ||
| 86 | + } | ||
| 87 | + } | ||
| 88 | + return uri_info; | ||
| 89 | + }; | ||
| 90 | + } | ||
| 91 | + URL.createObjectURL = function(blob) { | ||
| 92 | + var | ||
| 93 | + type = blob.type | ||
| 94 | + , data_URI_header | ||
| 95 | + ; | ||
| 96 | + if (type === null) { | ||
| 97 | + type = "application/octet-stream"; | ||
| 98 | + } | ||
| 99 | + if (blob instanceof FakeBlob) { | ||
| 100 | + data_URI_header = "data:" + type; | ||
| 101 | + if (blob.encoding === "base64") { | ||
| 102 | + return data_URI_header + ";base64," + blob.data; | ||
| 103 | + } else if (blob.encoding === "URI") { | ||
| 104 | + return data_URI_header + "," + decodeURIComponent(blob.data); | ||
| 105 | + } if (btoa) { | ||
| 106 | + return data_URI_header + ";base64," + btoa(blob.data); | ||
| 107 | + } else { | ||
| 108 | + return data_URI_header + "," + encodeURIComponent(blob.data); | ||
| 109 | + } | ||
| 110 | + } else if (real_create_object_URL) { | ||
| 111 | + return real_create_object_URL.call(real_URL, blob); | ||
| 112 | + } | ||
| 113 | + }; | ||
| 114 | + URL.revokeObjectURL = function(object_URL) { | ||
| 115 | + if (object_URL.substring(0, 5) !== "data:" && real_revoke_object_URL) { | ||
| 116 | + real_revoke_object_URL.call(real_URL, object_URL); | ||
| 117 | + } | ||
| 118 | + }; | ||
| 119 | + FBB_proto.append = function(data/*, endings*/) { | ||
| 120 | + var bb = this.data; | ||
| 121 | + // decode data to a binary string | ||
| 122 | + if (Uint8Array && (data instanceof ArrayBuffer || data instanceof Uint8Array)) { | ||
| 123 | + var | ||
| 124 | + str = "" | ||
| 125 | + , buf = new Uint8Array(data) | ||
| 126 | + , i = 0 | ||
| 127 | + , buf_len = buf.length | ||
| 128 | + ; | ||
| 129 | + for (; i < buf_len; i++) { | ||
| 130 | + str += String.fromCharCode(buf[i]); | ||
| 131 | + } | ||
| 132 | + bb.push(str); | ||
| 133 | + } else if (get_class(data) === "Blob" || get_class(data) === "File") { | ||
| 134 | + if (FileReaderSync) { | ||
| 135 | + var fr = new FileReaderSync; | ||
| 136 | + bb.push(fr.readAsBinaryString(data)); | ||
| 137 | + } else { | ||
| 138 | + // async FileReader won't work as BlobBuilder is sync | ||
| 139 | + throw new FileException("NOT_READABLE_ERR"); | ||
| 140 | + } | ||
| 141 | + } else if (data instanceof FakeBlob) { | ||
| 142 | + if (data.encoding === "base64" && atob) { | ||
| 143 | + bb.push(atob(data.data)); | ||
| 144 | + } else if (data.encoding === "URI") { | ||
| 145 | + bb.push(decodeURIComponent(data.data)); | ||
| 146 | + } else if (data.encoding === "raw") { | ||
| 147 | + bb.push(data.data); | ||
| 148 | + } | ||
| 149 | + } else { | ||
| 150 | + if (typeof data !== "string") { | ||
| 151 | + data += ""; // convert unsupported types to strings | ||
| 152 | + } | ||
| 153 | + // decode UTF-16 to binary string | ||
| 154 | + bb.push(unescape(encodeURIComponent(data))); | ||
| 155 | + } | ||
| 156 | + }; | ||
| 157 | + FBB_proto.getBlob = function(type) { | ||
| 158 | + if (!arguments.length) { | ||
| 159 | + type = null; | ||
| 160 | + } | ||
| 161 | + return new FakeBlob(this.data.join(""), type, "raw"); | ||
| 162 | + }; | ||
| 163 | + FBB_proto.toString = function() { | ||
| 164 | + return "[object BlobBuilder]"; | ||
| 165 | + }; | ||
| 166 | + FB_proto.slice = function(start, end, type) { | ||
| 167 | + var args = arguments.length; | ||
| 168 | + if (args < 3) { | ||
| 169 | + type = null; | ||
| 170 | + } | ||
| 171 | + return new FakeBlob( | ||
| 172 | + this.data.slice(start, args > 1 ? end : this.data.length) | ||
| 173 | + , type | ||
| 174 | + , this.encoding | ||
| 175 | + ); | ||
| 176 | + }; | ||
| 177 | + FB_proto.toString = function() { | ||
| 178 | + return "[object Blob]"; | ||
| 179 | + }; | ||
| 180 | + FB_proto.close = function() { | ||
| 181 | + this.size = 0; | ||
| 182 | + delete this.data; | ||
| 183 | + }; | ||
| 184 | + return FakeBlobBuilder; | ||
| 185 | + }(view)); | ||
| 186 | + | ||
| 187 | + view.Blob = function(blobParts, options) { | ||
| 188 | + var type = options ? (options.type || "") : ""; | ||
| 189 | + var builder = new BlobBuilder(); | ||
| 190 | + if (blobParts) { | ||
| 191 | + for (var i = 0, len = blobParts.length; i < len; i++) { | ||
| 192 | + builder.append(blobParts[i]); | ||
| 193 | + } | ||
| 194 | + } | ||
| 195 | + return builder.getBlob(type); | ||
| 196 | + }; | ||
| 197 | +}(typeof self !== "undefined" && self || typeof window !== "undefined" && window || this.content || this)); |
src/main/resources/static/pages/report/inoutstation/js/FileSaver.js
0 → 100644
| 1 | +/* FileSaver.js | ||
| 2 | + * A saveAs() FileSaver implementation. | ||
| 3 | + * 2014-08-29 | ||
| 4 | + * | ||
| 5 | + * By Eli Grey, http://eligrey.com | ||
| 6 | + * License: X11/MIT | ||
| 7 | + * See https://github.com/eligrey/FileSaver.js/blob/master/LICENSE.md | ||
| 8 | + */ | ||
| 9 | + | ||
| 10 | +/*global self */ | ||
| 11 | +/*jslint bitwise: true, indent: 4, laxbreak: true, laxcomma: true, smarttabs: true, plusplus: true */ | ||
| 12 | + | ||
| 13 | +/*! @source http://purl.eligrey.com/github/FileSaver.js/blob/master/FileSaver.js */ | ||
| 14 | + | ||
| 15 | +var saveAs = saveAs | ||
| 16 | + // IE 10+ (native saveAs) | ||
| 17 | + || (typeof navigator !== "undefined" && | ||
| 18 | + navigator.msSaveOrOpenBlob && navigator.msSaveOrOpenBlob.bind(navigator)) | ||
| 19 | + // Everyone else | ||
| 20 | + || (function(view) { | ||
| 21 | + "use strict"; | ||
| 22 | + // IE <10 is explicitly unsupported | ||
| 23 | + if (typeof navigator !== "undefined" && | ||
| 24 | + /MSIE [1-9]\./.test(navigator.userAgent)) { | ||
| 25 | + return; | ||
| 26 | + } | ||
| 27 | + var | ||
| 28 | + doc = view.document | ||
| 29 | + // only get URL when necessary in case Blob.js hasn't overridden it yet | ||
| 30 | + , get_URL = function() { | ||
| 31 | + return view.URL || view.webkitURL || view; | ||
| 32 | + } | ||
| 33 | + , save_link = doc.createElementNS("http://www.w3.org/1999/xhtml", "a") | ||
| 34 | + , can_use_save_link = "download" in save_link | ||
| 35 | + , click = function(node) { | ||
| 36 | + var event = doc.createEvent("MouseEvents"); | ||
| 37 | + event.initMouseEvent( | ||
| 38 | + "click", true, false, view, 0, 0, 0, 0, 0 | ||
| 39 | + , false, false, false, false, 0, null | ||
| 40 | + ); | ||
| 41 | + node.dispatchEvent(event); | ||
| 42 | + } | ||
| 43 | + , webkit_req_fs = view.webkitRequestFileSystem | ||
| 44 | + , req_fs = view.requestFileSystem || webkit_req_fs || view.mozRequestFileSystem | ||
| 45 | + , throw_outside = function(ex) { | ||
| 46 | + (view.setImmediate || view.setTimeout)(function() { | ||
| 47 | + throw ex; | ||
| 48 | + }, 0); | ||
| 49 | + } | ||
| 50 | + , force_saveable_type = "application/octet-stream" | ||
| 51 | + , fs_min_size = 0 | ||
| 52 | + // See https://code.google.com/p/chromium/issues/detail?id=375297#c7 for | ||
| 53 | + // the reasoning behind the timeout and revocation flow | ||
| 54 | + , arbitrary_revoke_timeout = 10 | ||
| 55 | + , revoke = function(file) { | ||
| 56 | + var revoker = function() { | ||
| 57 | + if (typeof file === "string") { // file is an object URL | ||
| 58 | + get_URL().revokeObjectURL(file); | ||
| 59 | + } else { // file is a File | ||
| 60 | + file.remove(); | ||
| 61 | + } | ||
| 62 | + }; | ||
| 63 | + if (view.chrome) { | ||
| 64 | + revoker(); | ||
| 65 | + } else { | ||
| 66 | + setTimeout(revoker, arbitrary_revoke_timeout); | ||
| 67 | + } | ||
| 68 | + } | ||
| 69 | + , dispatch = function(filesaver, event_types, event) { | ||
| 70 | + event_types = [].concat(event_types); | ||
| 71 | + var i = event_types.length; | ||
| 72 | + while (i--) { | ||
| 73 | + var listener = filesaver["on" + event_types[i]]; | ||
| 74 | + if (typeof listener === "function") { | ||
| 75 | + try { | ||
| 76 | + listener.call(filesaver, event || filesaver); | ||
| 77 | + } catch (ex) { | ||
| 78 | + throw_outside(ex); | ||
| 79 | + } | ||
| 80 | + } | ||
| 81 | + } | ||
| 82 | + } | ||
| 83 | + , FileSaver = function(blob, name) { | ||
| 84 | + // First try a.download, then web filesystem, then object URLs | ||
| 85 | + var | ||
| 86 | + filesaver = this | ||
| 87 | + , type = blob.type | ||
| 88 | + , blob_changed = false | ||
| 89 | + , object_url | ||
| 90 | + , target_view | ||
| 91 | + , dispatch_all = function() { | ||
| 92 | + dispatch(filesaver, "writestart progress write writeend".split(" ")); | ||
| 93 | + } | ||
| 94 | + // on any filesys errors revert to saving with object URLs | ||
| 95 | + , fs_error = function() { | ||
| 96 | + // don't create more object URLs than needed | ||
| 97 | + if (blob_changed || !object_url) { | ||
| 98 | + object_url = get_URL().createObjectURL(blob); | ||
| 99 | + } | ||
| 100 | + if (target_view) { | ||
| 101 | + target_view.location.href = object_url; | ||
| 102 | + } else { | ||
| 103 | + var new_tab = view.open(object_url, "_blank"); | ||
| 104 | + if (new_tab == undefined && typeof safari !== "undefined") { | ||
| 105 | + //Apple do not allow window.open, see http://bit.ly/1kZffRI | ||
| 106 | + view.location.href = object_url | ||
| 107 | + } | ||
| 108 | + } | ||
| 109 | + filesaver.readyState = filesaver.DONE; | ||
| 110 | + dispatch_all(); | ||
| 111 | + revoke(object_url); | ||
| 112 | + } | ||
| 113 | + , abortable = function(func) { | ||
| 114 | + return function() { | ||
| 115 | + if (filesaver.readyState !== filesaver.DONE) { | ||
| 116 | + return func.apply(this, arguments); | ||
| 117 | + } | ||
| 118 | + }; | ||
| 119 | + } | ||
| 120 | + , create_if_not_found = {create: true, exclusive: false} | ||
| 121 | + , slice | ||
| 122 | + ; | ||
| 123 | + filesaver.readyState = filesaver.INIT; | ||
| 124 | + if (!name) { | ||
| 125 | + name = "download"; | ||
| 126 | + } | ||
| 127 | + if (can_use_save_link) { | ||
| 128 | + object_url = get_URL().createObjectURL(blob); | ||
| 129 | + save_link.href = object_url; | ||
| 130 | + save_link.download = name; | ||
| 131 | + click(save_link); | ||
| 132 | + filesaver.readyState = filesaver.DONE; | ||
| 133 | + dispatch_all(); | ||
| 134 | + revoke(object_url); | ||
| 135 | + return; | ||
| 136 | + } | ||
| 137 | + // Object and web filesystem URLs have a problem saving in Google Chrome when | ||
| 138 | + // viewed in a tab, so I force save with application/octet-stream | ||
| 139 | + // http://code.google.com/p/chromium/issues/detail?id=91158 | ||
| 140 | + // Update: Google errantly closed 91158, I submitted it again: | ||
| 141 | + // https://code.google.com/p/chromium/issues/detail?id=389642 | ||
| 142 | + if (view.chrome && type && type !== force_saveable_type) { | ||
| 143 | + slice = blob.slice || blob.webkitSlice; | ||
| 144 | + blob = slice.call(blob, 0, blob.size, force_saveable_type); | ||
| 145 | + blob_changed = true; | ||
| 146 | + } | ||
| 147 | + // Since I can't be sure that the guessed media type will trigger a download | ||
| 148 | + // in WebKit, I append .download to the filename. | ||
| 149 | + // https://bugs.webkit.org/show_bug.cgi?id=65440 | ||
| 150 | + if (webkit_req_fs && name !== "download") { | ||
| 151 | + name += ".download"; | ||
| 152 | + } | ||
| 153 | + if (type === force_saveable_type || webkit_req_fs) { | ||
| 154 | + target_view = view; | ||
| 155 | + } | ||
| 156 | + if (!req_fs) { | ||
| 157 | + fs_error(); | ||
| 158 | + return; | ||
| 159 | + } | ||
| 160 | + fs_min_size += blob.size; | ||
| 161 | + req_fs(view.TEMPORARY, fs_min_size, abortable(function(fs) { | ||
| 162 | + fs.root.getDirectory("saved", create_if_not_found, abortable(function(dir) { | ||
| 163 | + var save = function() { | ||
| 164 | + dir.getFile(name, create_if_not_found, abortable(function(file) { | ||
| 165 | + file.createWriter(abortable(function(writer) { | ||
| 166 | + writer.onwriteend = function(event) { | ||
| 167 | + target_view.location.href = file.toURL(); | ||
| 168 | + filesaver.readyState = filesaver.DONE; | ||
| 169 | + dispatch(filesaver, "writeend", event); | ||
| 170 | + revoke(file); | ||
| 171 | + }; | ||
| 172 | + writer.onerror = function() { | ||
| 173 | + var error = writer.error; | ||
| 174 | + if (error.code !== error.ABORT_ERR) { | ||
| 175 | + fs_error(); | ||
| 176 | + } | ||
| 177 | + }; | ||
| 178 | + "writestart progress write abort".split(" ").forEach(function(event) { | ||
| 179 | + writer["on" + event] = filesaver["on" + event]; | ||
| 180 | + }); | ||
| 181 | + writer.write(blob); | ||
| 182 | + filesaver.abort = function() { | ||
| 183 | + writer.abort(); | ||
| 184 | + filesaver.readyState = filesaver.DONE; | ||
| 185 | + }; | ||
| 186 | + filesaver.readyState = filesaver.WRITING; | ||
| 187 | + }), fs_error); | ||
| 188 | + }), fs_error); | ||
| 189 | + }; | ||
| 190 | + dir.getFile(name, {create: false}, abortable(function(file) { | ||
| 191 | + // delete file if it already exists | ||
| 192 | + file.remove(); | ||
| 193 | + save(); | ||
| 194 | + }), abortable(function(ex) { | ||
| 195 | + if (ex.code === ex.NOT_FOUND_ERR) { | ||
| 196 | + save(); | ||
| 197 | + } else { | ||
| 198 | + fs_error(); | ||
| 199 | + } | ||
| 200 | + })); | ||
| 201 | + }), fs_error); | ||
| 202 | + }), fs_error); | ||
| 203 | + } | ||
| 204 | + , FS_proto = FileSaver.prototype | ||
| 205 | + , saveAs = function(blob, name) { | ||
| 206 | + return new FileSaver(blob, name); | ||
| 207 | + } | ||
| 208 | + ; | ||
| 209 | + FS_proto.abort = function() { | ||
| 210 | + var filesaver = this; | ||
| 211 | + filesaver.readyState = filesaver.DONE; | ||
| 212 | + dispatch(filesaver, "abort"); | ||
| 213 | + }; | ||
| 214 | + FS_proto.readyState = FS_proto.INIT = 0; | ||
| 215 | + FS_proto.WRITING = 1; | ||
| 216 | + FS_proto.DONE = 2; | ||
| 217 | + | ||
| 218 | + FS_proto.error = | ||
| 219 | + FS_proto.onwritestart = | ||
| 220 | + FS_proto.onprogress = | ||
| 221 | + FS_proto.onwrite = | ||
| 222 | + FS_proto.onabort = | ||
| 223 | + FS_proto.onerror = | ||
| 224 | + FS_proto.onwriteend = | ||
| 225 | + null; | ||
| 226 | + | ||
| 227 | + return saveAs; | ||
| 228 | +}( | ||
| 229 | + typeof self !== "undefined" && self | ||
| 230 | + || typeof window !== "undefined" && window | ||
| 231 | + || this.content | ||
| 232 | +)); | ||
| 233 | +// `self` is undefined in Firefox for Android content script context | ||
| 234 | +// while `this` is nsIContentFrameMessageManager | ||
| 235 | +// with an attribute `content` that corresponds to the window | ||
| 236 | + | ||
| 237 | +if (typeof module !== "undefined" && module !== null) { | ||
| 238 | + module.exports = saveAs; | ||
| 239 | +} else if ((typeof define !== "undefined" && define !== null) && (define.amd != null)) { | ||
| 240 | + define([], function() { | ||
| 241 | + return saveAs; | ||
| 242 | + }); | ||
| 243 | +} |
src/main/resources/static/pages/report/inoutstation/js/tableExport.js
0 → 100644
| 1 | + | ||
| 2 | + | ||
| 3 | +(function(view){ | ||
| 4 | + "use strict"; | ||
| 5 | + var characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/='; | ||
| 6 | + var fromCharCode = String.fromCharCode; | ||
| 7 | + var INVALID_CHARACTER_ERR = ( function() { | ||
| 8 | + // fabricate a suitable error object | ||
| 9 | + try { | ||
| 10 | + document.createElement('$'); | ||
| 11 | + } catch (error) { | ||
| 12 | + return error; | ||
| 13 | + } | ||
| 14 | + }()); | ||
| 15 | + | ||
| 16 | + // encoder | ||
| 17 | + var btoa = function(string) { | ||
| 18 | + var a, b, b1, b2, b3, b4, c, i = 0, len = string.length, max = Math.max, result = ''; | ||
| 19 | + | ||
| 20 | + while (i < len) { | ||
| 21 | + a = string.charCodeAt(i++) || 0; | ||
| 22 | + b = string.charCodeAt(i++) || 0; | ||
| 23 | + c = string.charCodeAt(i++) || 0; | ||
| 24 | + | ||
| 25 | + if (max(a, b, c) > 0xFF) { | ||
| 26 | + throw INVALID_CHARACTER_ERR; | ||
| 27 | + } | ||
| 28 | + | ||
| 29 | + b1 = (a >> 2) & 0x3F; | ||
| 30 | + b2 = ((a & 0x3) << 4) | ((b >> 4) & 0xF); | ||
| 31 | + b3 = ((b & 0xF) << 2) | ((c >> 6) & 0x3); | ||
| 32 | + b4 = c & 0x3F; | ||
| 33 | + | ||
| 34 | + if (!b) { | ||
| 35 | + b3 = b4 = 64; | ||
| 36 | + } else if (!c) { | ||
| 37 | + b4 = 64; | ||
| 38 | + } | ||
| 39 | + result += characters.charAt(b1) + characters.charAt(b2) + characters.charAt(b3) + characters.charAt(b4); | ||
| 40 | + } | ||
| 41 | + return result; | ||
| 42 | + }; | ||
| 43 | + | ||
| 44 | + //获取dom文本 | ||
| 45 | + var getText = function( el ){ | ||
| 46 | + var s = el.textContent || el.innerText; | ||
| 47 | + return s == null ? "" : s.replace( /^\s*(.*?)\s+$/, "$1"); | ||
| 48 | + }; | ||
| 49 | + view.tableExport = function(tableId, filename, type){ | ||
| 50 | + var doc = view.document, | ||
| 51 | + table = doc.getElementById(tableId), | ||
| 52 | + charSet = doc.characterSet | ||
| 53 | + | ||
| 54 | + var uri = { | ||
| 55 | + json: 'application/json;charset='+charSet, | ||
| 56 | + txt: 'csv/txt;charset='+charSet, | ||
| 57 | + csv: 'csv/txt;charset='+charSet, | ||
| 58 | + doc: 'application/vnd.ms-doc', | ||
| 59 | + excel: 'application/vnd.ms-excel' | ||
| 60 | + }; | ||
| 61 | + | ||
| 62 | + var base64 = function(s) { | ||
| 63 | + return btoa(unescape(encodeURIComponent(s))); | ||
| 64 | + }; | ||
| 65 | + var template = function(s, c) { | ||
| 66 | + return s.replace(/{(\w+)}/g, function(m, p) { | ||
| 67 | + return c[p]; | ||
| 68 | + }); | ||
| 69 | + }; | ||
| 70 | + | ||
| 71 | + var get_blob = function() { | ||
| 72 | + return view.Blob; | ||
| 73 | + } | ||
| 74 | + | ||
| 75 | + var fixCSVField = function(value) { | ||
| 76 | + var fixedValue = value; | ||
| 77 | + var addQuotes = (value.indexOf(',') !== -1) || (value.indexOf('\r') !== -1) || (value.indexOf('\n') !== -1); | ||
| 78 | + var replaceDoubleQuotes = (value.indexOf('"') !== -1); | ||
| 79 | + | ||
| 80 | + if (replaceDoubleQuotes) { | ||
| 81 | + fixedValue = fixedValue.replace(/"/g, '""'); | ||
| 82 | + } | ||
| 83 | + if (addQuotes || replaceDoubleQuotes) { | ||
| 84 | + fixedValue = '"' + fixedValue + '"'; | ||
| 85 | + } | ||
| 86 | + return fixedValue; | ||
| 87 | + }; | ||
| 88 | + | ||
| 89 | + var saveData = function(data){ | ||
| 90 | + var BB = get_blob(); | ||
| 91 | + saveAs(new BB([data], {type: uri[type]}), filename + "."+type); | ||
| 92 | + }; | ||
| 93 | + | ||
| 94 | + var toCSV = function(){ | ||
| 95 | + var data = "\ufeff"; | ||
| 96 | + for (var i = 0, row; row = table.rows[i]; i++) { | ||
| 97 | + for (var j = 0, col; col = row.cells[j]; j++) { | ||
| 98 | + data = data + (j ? ',' : '') + fixCSVField(getText(col)); | ||
| 99 | + } | ||
| 100 | + data = data + "\r\n"; | ||
| 101 | + } | ||
| 102 | + saveData(data); | ||
| 103 | + }; | ||
| 104 | + | ||
| 105 | + var toJson = function(){ | ||
| 106 | + var jsonHeaderArray = []; | ||
| 107 | + | ||
| 108 | + if(table.tHead){ | ||
| 109 | + for(var i =0,col; col = table.tHead.rows[0].cells[i]; i++){ | ||
| 110 | + jsonHeaderArray.push(getText(col)); | ||
| 111 | + } | ||
| 112 | + } | ||
| 113 | + | ||
| 114 | + var jsonArray = []; | ||
| 115 | + if(table.tBodies){ | ||
| 116 | + for(var j=0,tbody; tbody = table.tBodies[j]; j++){ | ||
| 117 | + for(var k =0, rowb; rowb= tbody.rows[k]; k++){ | ||
| 118 | + var len = jsonArray.length; | ||
| 119 | + jsonArray[len] = []; | ||
| 120 | + for (var g = 0, colb; colb = rowb.cells[g]; g++) { | ||
| 121 | + jsonArray[len].push(getText(colb)); | ||
| 122 | + } | ||
| 123 | + } | ||
| 124 | + } | ||
| 125 | + } | ||
| 126 | + | ||
| 127 | + var jsonExportArray = { | ||
| 128 | + header: jsonHeaderArray, | ||
| 129 | + data: jsonArray | ||
| 130 | + }; | ||
| 131 | + saveData(JSON.stringify(jsonExportArray)); | ||
| 132 | + }; | ||
| 133 | + | ||
| 134 | + var toOffice = function(){ | ||
| 135 | + var tmpl = '<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:x="urn:schemas-microsoft-com:office:'+type+'" xmlns="http://www.w3.org/TR/REC-html40">'; | ||
| 136 | + tmpl += '<head><meta charset="'+charSet+'" /><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>'; | ||
| 137 | + tmpl += '{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]-->'; | ||
| 138 | + tmpl += '</head><body><table>{table}</table></body></html>'; | ||
| 139 | + var office = '', | ||
| 140 | + maph = [['<thead><tr>', '</tr></thead>'], ['<tbody><tr>', '</tr></tbody>'], ['<tr>', '</tr>']], | ||
| 141 | + mapb = [['<th>', '</th>'],['<td>', '</td>']], | ||
| 142 | + flag = +!table.tHead, | ||
| 143 | + com = 1 - flag; | ||
| 144 | + | ||
| 145 | + for(var i=0, row; row = table.rows[i]; i++){ | ||
| 146 | + flag = i > com ? 2 : flag; | ||
| 147 | + office += maph[flag][0]; | ||
| 148 | + for(var j =0, col; col = row.cells[j]; j++){ | ||
| 149 | + office += mapb[+!!flag][0]+ getText(col) +mapb[+!!flag][1]; | ||
| 150 | + } | ||
| 151 | + office += maph[flag][1]; | ||
| 152 | + flag++; | ||
| 153 | + } | ||
| 154 | + saveData(template(tmpl, {worksheet: 'Worksheet', table: office})); | ||
| 155 | + }; | ||
| 156 | + | ||
| 157 | + var typeMap = { | ||
| 158 | + json : toJson, | ||
| 159 | + txt: toCSV, | ||
| 160 | + csv: toCSV, | ||
| 161 | + doc: toOffice, | ||
| 162 | + docx: toOffice, | ||
| 163 | + xls: toOffice, | ||
| 164 | + xlsx: toOffice | ||
| 165 | + }; | ||
| 166 | + | ||
| 167 | + typeMap[type](); | ||
| 168 | + }; | ||
| 169 | + | ||
| 170 | +})(window); | ||
| 0 | \ No newline at end of file | 171 | \ No newline at end of file |
src/main/resources/static/pages/summary/fast_and_slow/data.html
0 → 100644
| 1 | +<div class="ct_data_body_wrap"> | ||
| 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> | ||
| 13 | + </div> | ||
| 14 | + | ||
| 15 | + <div class="uk-card uk-card-default uk-card-body ct_right_tables"> | ||
| 16 | + <div id="table_20171010"> | ||
| 17 | + <table> | ||
| 18 | + | ||
| 19 | + </table> | ||
| 20 | + </div> | ||
| 21 | + </div> | ||
| 22 | + | ||
| 23 | + <script> | ||
| 24 | + (function () { | ||
| 25 | + var wrap = '.ct_data_body_wrap'; | ||
| 26 | + | ||
| 27 | + $(wrap).on('init', function (e, data) { | ||
| 28 | + e.stopPropagation(); | ||
| 29 | + console.log('data init'); | ||
| 30 | + | ||
| 31 | + }); | ||
| 32 | + })(); | ||
| 33 | + </script> | ||
| 34 | +</div> | ||
| 0 | \ No newline at end of file | 35 | \ No newline at end of file |
src/main/resources/static/pages/summary/fast_and_slow/f_a_s_wrap.html
0 → 100644
src/main/resources/static/pages/summary/fast_and_slow/main.html
0 → 100644
| 1 | +<!DOCTYPE html> | ||
| 2 | +<html lang="zh-cn"> | ||
| 3 | + | ||
| 4 | +<head> | ||
| 5 | + <meta charset="UTF-8"> | ||
| 6 | + <link rel="stylesheet" href="/assets/plugins/uk3.0/uikit.min.css"/> | ||
| 7 | + <link rel="stylesheet" href="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.css" /> | ||
| 8 | + <!-- flatpickr --> | ||
| 9 | + <link rel="stylesheet" href="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.css"> | ||
| 10 | + <style> | ||
| 11 | + html,body{ | ||
| 12 | + height: 100%; | ||
| 13 | + } | ||
| 14 | + .ct_page{ | ||
| 15 | + padding: 25px 15px; | ||
| 16 | + height: 100%; | ||
| 17 | + height: calc(100% - 50px); | ||
| 18 | + } | ||
| 19 | + | ||
| 20 | + .ct_cont{ | ||
| 21 | + height: calc(100% - 35px); | ||
| 22 | + } | ||
| 23 | + | ||
| 24 | + .ct_cont>div>div.uk-card{ | ||
| 25 | + height: 99%; | ||
| 26 | + } | ||
| 27 | + | ||
| 28 | + .loading{ | ||
| 29 | + height: 100%; | ||
| 30 | + text-align: center; | ||
| 31 | + } | ||
| 32 | + .loading .uk-spinner{ | ||
| 33 | + margin-top: 200px; | ||
| 34 | + } | ||
| 35 | + .loading circle{ | ||
| 36 | + stroke: red; | ||
| 37 | + } | ||
| 38 | + | ||
| 39 | + .ps-container > .ps-scrollbar-x-rail, .ps-container > .ps-scrollbar-y-rail{ | ||
| 40 | + opacity: 0.6 !important; | ||
| 41 | + padding: 0 !important; | ||
| 42 | + } | ||
| 43 | + | ||
| 44 | + .ct_search_form_wrap{ | ||
| 45 | + border-bottom: 1px solid #e5e5e5; | ||
| 46 | + padding: 10px 0 25px 10px; | ||
| 47 | + } | ||
| 48 | + .ct_search_form_wrap .ct_field{ | ||
| 49 | + display: inline-block; | ||
| 50 | + margin: 0 5px; | ||
| 51 | + } | ||
| 52 | + | ||
| 53 | + .ct_search_form_wrap .ct_field label{ | ||
| 54 | + font-size: 14px; | ||
| 55 | + } | ||
| 56 | + | ||
| 57 | + .ct_search_form_wrap .ct_field input[type=text]{ | ||
| 58 | + width: 110px; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + .ct_search_form_wrap .ct_field select{ | ||
| 62 | + width: auto; | ||
| 63 | + min-width: 100px; | ||
| 64 | + } | ||
| 65 | + | ||
| 66 | + .ct_search_form_wrap .uk-button{ | ||
| 67 | + padding: 0 14px; | ||
| 68 | + } | ||
| 69 | + | ||
| 70 | + .ct_search_form_wrap .uk-button i{ | ||
| 71 | + vertical-align: middle; | ||
| 72 | + margin-top: -2px; | ||
| 73 | + margin-right: 7px; | ||
| 74 | + } | ||
| 75 | + | ||
| 76 | + .ct_field.ct_field_bottom{ | ||
| 77 | + vertical-align: bottom; | ||
| 78 | + font-size: 12px; | ||
| 79 | + margin-left: 0; | ||
| 80 | + } | ||
| 81 | + | ||
| 82 | + .ct_cont_body{ | ||
| 83 | + height: calc(100% - 88px); | ||
| 84 | + width: 100%; | ||
| 85 | + padding-top: 12px; | ||
| 86 | + } | ||
| 87 | + | ||
| 88 | + .ct_data_body_wrap{ | ||
| 89 | + height: 100%; | ||
| 90 | + width: 100%; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + .ct_rq_left{ | ||
| 94 | + width: 200px; | ||
| 95 | + display: inline-block; | ||
| 96 | + vertical-align: top; | ||
| 97 | + height: 99%; | ||
| 98 | + height: calc(100% - 5px); | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + .ct_right_tables{ | ||
| 102 | + width: calc(100% - 220px); | ||
| 103 | + display: inline-block; | ||
| 104 | + margin-left: 12px; | ||
| 105 | + height: 99%; | ||
| 106 | + height: calc(100% - 5px); | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + .tm-nav>li a{ | ||
| 110 | + position: relative; | ||
| 111 | + font-size: 15px; | ||
| 112 | + } | ||
| 113 | + .tm-nav>li.uk-active>a:before { | ||
| 114 | + content: ""; | ||
| 115 | + position: absolute; | ||
| 116 | + width: 15px; | ||
| 117 | + border-top: 1px solid #1e87f0; | ||
| 118 | + z-index: 9; | ||
| 119 | + right: 60px; | ||
| 120 | + top: 15px; | ||
| 121 | + } | ||
| 122 | + .uk-nav-default>li.uk-active>a { | ||
| 123 | + color: #222; | ||
| 124 | + } | ||
| 125 | + </style> | ||
| 126 | +</head> | ||
| 127 | + | ||
| 128 | +<body> | ||
| 129 | +<div class="loading"> | ||
| 130 | + <div uk-spinner></div> | ||
| 131 | +</div> | ||
| 132 | +<div class="ct_page" style="display: none;"> | ||
| 133 | + <h3 class="uk-heading-line uk-heading-bullet"><span>快慢误点统计</span></h3> | ||
| 134 | + <div class="ct_cont" > | ||
| 135 | + <div class="ct_search_form_wrap"> | ||
| 136 | + <form> | ||
| 137 | + <div class="ct_field"> | ||
| 138 | + <label>公司: | ||
| 139 | + <select class="uk-select" name="companyId_eq"> | ||
| 140 | + </select> | ||
| 141 | + </label> | ||
| 142 | + </div> | ||
| 143 | + <div class="ct_field"> | ||
| 144 | + <label>分公司: | ||
| 145 | + <select class="uk-select" name="subCompanyId_eq"> | ||
| 146 | + </select> | ||
| 147 | + </label> | ||
| 148 | + </div> | ||
| 149 | + <div class="ct_field"> | ||
| 150 | + <label>线路: | ||
| 151 | + <select class="uk-select" name="lineCode_eq"> | ||
| 152 | + </select> | ||
| 153 | + </label> | ||
| 154 | + </div> | ||
| 155 | + <div class="ct_field"> | ||
| 156 | + <label>日期范围: | ||
| 157 | + <input class="uk-input" name="rq" style="width: 200px;"> | ||
| 158 | + </label> | ||
| 159 | + </div> | ||
| 160 | + <div class="ct_field"> | ||
| 161 | + <label><input class="uk-radio" type="radio" name="type" checked> 全部</label> | ||
| 162 | + <label><input class="uk-radio" type="radio" name="type"> 快误</label> | ||
| 163 | + <label><input class="uk-radio" type="radio" name="type"> 慢误</label> | ||
| 164 | + </div> | ||
| 165 | + <div class="ct_field"> | ||
| 166 | + <button class="uk-button uk-button-primary search"><i uk-icon="icon: search"></i>搜索</button> | ||
| 167 | + </div> | ||
| 168 | + <div class="ct_field ct_field_bottom"> | ||
| 169 | + <button class="uk-button uk-button-text" style="padding: 0 5px;">导出数据</button> | ||
| 170 | + </div> | ||
| 171 | + <div class="ct_field ct_field_bottom"> | ||
| 172 | + <span uk-icon="icon: question" title="统计 “正常”、“区间”、“放站” 班次" uk-tooltip="pos: bottom"></span> | ||
| 173 | + </div> | ||
| 174 | + </form> | ||
| 175 | + </div> | ||
| 176 | + | ||
| 177 | + <div class="ct_cont_body"> | ||
| 178 | + </div> | ||
| 179 | + </div> | ||
| 180 | +</div> | ||
| 181 | + | ||
| 182 | +<script src="/metronic_v4.5.4/plugins/jquery.min.js"></script> | ||
| 183 | +<script src="/assets/plugins/uk3.0/uikit.min.js"></script> | ||
| 184 | +<script src="/assets/plugins/uk3.0/uikit-icons.min.js"></script> | ||
| 185 | +<script src="/real_control_v2/assets/plugins/perfect-scrollbar/perfect-scrollbar.jquery.js" ></script> | ||
| 186 | +<!-- EventProxy --> | ||
| 187 | +<script src="/assets/js/eventproxy.js"></script> | ||
| 188 | +<!-- art-template 模版引擎 --> | ||
| 189 | +<script src="/assets/plugins/template.js"></script> | ||
| 190 | +<script src="/real_control_v2/assets/plugins/moment/moment.min.js"></script> | ||
| 191 | +<!-- jquery.serializejson JSON序列化插件 --> | ||
| 192 | +<script src="/assets/plugins/jquery.serializejson.js" merge="plugins"></script> | ||
| 193 | +<!-- flatpickr --> | ||
| 194 | +<script src="/real_control_v2/assets/plugins/flatpickr/flatpickr.min.js" ></script> | ||
| 195 | +<script src="/real_control_v2/assets/plugins/flatpickr/l10n/zh.js" ></script> | ||
| 196 | +<script> | ||
| 197 | + | ||
| 198 | +(function () { | ||
| 199 | + //var data_dom; | ||
| 200 | + var f = $('form', ''); | ||
| 201 | + var ep = EventProxy.create('query_comps', 'query_lines', function () { | ||
| 202 | + $('[name=companyId_eq]', f).trigger('change');//公司change | ||
| 203 | + //query(); | ||
| 204 | + | ||
| 205 | + $('.loading').remove(); | ||
| 206 | + $('.ct_page').show(); | ||
| 207 | + }); | ||
| 208 | + | ||
| 209 | + $.get('/pages/summary/fast_and_slow/data.html', function (rs) { | ||
| 210 | + $('.ct_cont_body').html(rs); | ||
| 211 | + }); | ||
| 212 | + | ||
| 213 | + //点击搜索按钮 | ||
| 214 | + $('.search', f).on('click', function () { | ||
| 215 | + $('.ct_data_body_wrap').trigger('init'); | ||
| 216 | + }); | ||
| 217 | + | ||
| 218 | + //日期选择框 | ||
| 219 | + var fs='YYYY-MM-DD' | ||
| 220 | + , ets=moment().format(fs) | ||
| 221 | + , sts=moment().subtract(7, 'days').format(fs); | ||
| 222 | + flatpickr('.ct_search_form_wrap [name=rq]', { | ||
| 223 | + mode: "range", dateFormat: "Y-m-d","locale": "zh", defaultDate: [sts, ets] | ||
| 224 | + }); | ||
| 225 | + var comps; | ||
| 226 | + //构建公司级联下拉框 | ||
| 227 | + $.get('/user/companyData', function (rs) { | ||
| 228 | + comps = rs; | ||
| 229 | + var opts = ''; | ||
| 230 | + for(var i=0,obj;obj=comps[i++];){ | ||
| 231 | + opts += '<option value="'+obj.companyCode+'">'+obj.companyName+'</option>'; | ||
| 232 | + } | ||
| 233 | + $('[name=companyId_eq]', f).html(opts); | ||
| 234 | + ep.emit('query_comps'); | ||
| 235 | + }); | ||
| 236 | + var lineMapps; | ||
| 237 | + //加载线路信息 | ||
| 238 | + $.get('/line/all', {'destroy_eq': 0}, function (rs) { | ||
| 239 | + rs.sort(function (a, b) { | ||
| 240 | + return a.name.localeCompare(b.name); | ||
| 241 | + }); | ||
| 242 | + lineMapps={}; | ||
| 243 | + var k; | ||
| 244 | + $.each(rs, function () { | ||
| 245 | + k = this.company+'_'+this.brancheCompany; | ||
| 246 | + if(!lineMapps[k]) | ||
| 247 | + lineMapps[k]=[]; | ||
| 248 | + lineMapps[k].push(this); | ||
| 249 | + }); | ||
| 250 | + | ||
| 251 | + ep.emit('query_lines'); | ||
| 252 | + }); | ||
| 253 | + | ||
| 254 | + $('[name=companyId_eq]', f).on('change', function () { | ||
| 255 | + var code = $(this).val(), subs=[]; | ||
| 256 | + $.each(comps, function () { | ||
| 257 | + if(this.companyCode==code) | ||
| 258 | + subs=this.children; | ||
| 259 | + }); | ||
| 260 | + | ||
| 261 | + var opts=''; | ||
| 262 | + $.each(subs, function () { | ||
| 263 | + opts += '<option value="'+this.code+'">'+this.name+'</option>'; | ||
| 264 | + }); | ||
| 265 | + $('[name=subCompanyId_eq]', f).html(opts).trigger('change'); | ||
| 266 | + }); | ||
| 267 | + | ||
| 268 | + $('[name=subCompanyId_eq]', f).on('change', function () { | ||
| 269 | + var k = $('[name=companyId_eq]', f).val() + '_' + $(this).val(); | ||
| 270 | + var array = lineMapps[k]; | ||
| 271 | + var opts = ''; | ||
| 272 | + if(array){ | ||
| 273 | + $.each(array, function () { | ||
| 274 | + opts += '<option value="'+this.lineCode+'">'+this.name+'</option>'; | ||
| 275 | + }); | ||
| 276 | + } | ||
| 277 | + $('[name=lineCode_eq]', f).html(opts); | ||
| 278 | + }); | ||
| 279 | +})(); | ||
| 280 | +</script> | ||
| 281 | +</body> | ||
| 282 | +</html> | ||
| 0 | \ No newline at end of file | 283 | \ No newline at end of file |
src/main/resources/static/pages/summary/work_hours/list.html
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | } | 18 | } |
| 19 | 19 | ||
| 20 | .ct_cont{ | 20 | .ct_cont{ |
| 21 | - height: calc(100% - 41px); | 21 | + height: calc(100% - 35px); |
| 22 | } | 22 | } |
| 23 | 23 | ||
| 24 | .ct_cont>div>div.uk-card{ | 24 | .ct_cont>div>div.uk-card{ |
| @@ -122,7 +122,7 @@ | @@ -122,7 +122,7 @@ | ||
| 122 | <div uk-spinner></div> | 122 | <div uk-spinner></div> |
| 123 | </div> | 123 | </div> |
| 124 | <div class="ct_page" style="display: none;"> | 124 | <div class="ct_page" style="display: none;"> |
| 125 | - <h2 class="uk-heading-line uk-heading-bullet"><span>工时统计</span></h2> | 125 | + <h3 class="uk-heading-line uk-heading-bullet"><span>工时统计</span></h3> |
| 126 | <div class="ct_cont" > | 126 | <div class="ct_cont" > |
| 127 | <div class="ct_search_form_wrap"> | 127 | <div class="ct_search_form_wrap"> |
| 128 | <form> | 128 | <form> |
| @@ -141,7 +141,6 @@ | @@ -141,7 +141,6 @@ | ||
| 141 | <div class="ct_field"> | 141 | <div class="ct_field"> |
| 142 | <label>线路: | 142 | <label>线路: |
| 143 | <select class="uk-select" name="lineCode_eq"> | 143 | <select class="uk-select" name="lineCode_eq"> |
| 144 | - <option value="81101">航头4路</option> | ||
| 145 | </select> | 144 | </select> |
| 146 | </label> | 145 | </label> |
| 147 | </div> | 146 | </div> |
| @@ -263,8 +262,8 @@ | @@ -263,8 +262,8 @@ | ||
| 263 | } | 262 | } |
| 264 | 263 | ||
| 265 | //日期选择器 | 264 | //日期选择器 |
| 266 | - $('[name=rq_eq]', f).val('2017-09-24'); | ||
| 267 | - flatpickr('.ct_search_form_wrap [name=rq_eq]', {"locale": "zh", maxDate: '2017-09-24', minDate: '2017-07-01'}); | 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'}); | ||
| 268 | 267 | ||
| 269 | var comps; | 268 | var comps; |
| 270 | //构建公司级联下拉框 | 269 | //构建公司级联下拉框 |
src/main/resources/static/real_control_v2/css/handicapped_style.css
0 → 100644
| 1 | +/** 为残疾人提供的一份样式 , .ct_table.line-schedule-table dl dt*/ | ||
| 2 | + | ||
| 3 | +.ct_table.line-schedule-table dl dd{ | ||
| 4 | + border-right-color: #000000 !important; | ||
| 5 | + border-top: 1px solid #000000 !important; | ||
| 6 | + color: #000000; | ||
| 7 | +} | ||
| 8 | + | ||
| 9 | +.schedule-body .ct_table.line-schedule-table dl:nth-child(even){ | ||
| 10 | + background: rgba(114, 197, 210, 0.33) !important; | ||
| 11 | +} | ||
| 12 | + | ||
| 13 | +.tl-yzx{ | ||
| 14 | + background: rgb(151, 151, 223) !important; | ||
| 15 | +} | ||
| 16 | + | ||
| 17 | +.tl-zzzx { | ||
| 18 | + background: rgb(152, 217, 54) !important; | ||
| 19 | +} | ||
| 20 | + | ||
| 21 | +.tl-xxfc { | ||
| 22 | + background: rgb(15, 220, 220) !important; | ||
| 23 | +} | ||
| 24 | + | ||
| 25 | +.ct_table>.ct_table_body{ | ||
| 26 | + border-bottom: 1px solid #000000 !important; | ||
| 27 | +} |
src/main/resources/static/real_control_v2/css/main.css
| @@ -1141,6 +1141,10 @@ dl.intimity span.late-badge{ | @@ -1141,6 +1141,10 @@ dl.intimity span.late-badge{ | ||
| 1141 | color: red; | 1141 | color: red; |
| 1142 | } | 1142 | } |
| 1143 | 1143 | ||
| 1144 | +.tip_task_list dl.service.temp_add{ | ||
| 1145 | + color: #9C27B0; | ||
| 1146 | +} | ||
| 1147 | + | ||
| 1144 | .tip_task_list dl span{ | 1148 | .tip_task_list dl span{ |
| 1145 | margin: 0; | 1149 | margin: 0; |
| 1146 | width: auto; | 1150 | width: auto; |
| @@ -1411,10 +1415,11 @@ ul.left_tabs_lg li{ | @@ -1411,10 +1415,11 @@ ul.left_tabs_lg li{ | ||
| 1411 | border-bottom: none; | 1415 | border-bottom: none; |
| 1412 | } | 1416 | } |
| 1413 | 1417 | ||
| 1414 | -.add_range_wrap>.err_panel{ | ||
| 1415 | - font-size: 16px; | ||
| 1416 | - color: #a44a4a; | 1418 | +.err_panel{ |
| 1419 | + font-size: 12px; | ||
| 1420 | + color: #7e7d7d; | ||
| 1417 | font-family: 微软雅黑; | 1421 | font-family: 微软雅黑; |
| 1422 | + margin-top: 5px; | ||
| 1418 | } | 1423 | } |
| 1419 | 1424 | ||
| 1420 | #schedule-lp_change-modal .ct_table dl{ | 1425 | #schedule-lp_change-modal .ct_table dl{ |
| @@ -1458,6 +1463,16 @@ ul.left_tabs_lg li{ | @@ -1458,6 +1463,16 @@ ul.left_tabs_lg li{ | ||
| 1458 | background: #ffffff; | 1463 | background: #ffffff; |
| 1459 | } | 1464 | } |
| 1460 | 1465 | ||
| 1466 | +.sub_task_form_v2.service_form.temp_service:before{ | ||
| 1467 | + content: '营运 (临加)'; | ||
| 1468 | + color: #9C27B0; | ||
| 1469 | + background: #ffffff; | ||
| 1470 | +} | ||
| 1471 | + | ||
| 1472 | +.sub_task_form_v2.service_form.temp_service { | ||
| 1473 | + background: #faf0fd; | ||
| 1474 | +} | ||
| 1475 | + | ||
| 1461 | .sub_task_form_v2.empty_form:before{ | 1476 | .sub_task_form_v2.empty_form:before{ |
| 1462 | content: '空驶'; | 1477 | content: '空驶'; |
| 1463 | color: #928f92; | 1478 | color: #928f92; |
| @@ -1699,4 +1714,26 @@ dl.active>dd.disabled{ | @@ -1699,4 +1714,26 @@ dl.active>dd.disabled{ | ||
| 1699 | 1714 | ||
| 1700 | .display_hide{ | 1715 | .display_hide{ |
| 1701 | display: none; | 1716 | display: none; |
| 1717 | +} | ||
| 1718 | + | ||
| 1719 | +.ct_eye_icon{ | ||
| 1720 | + font-size: 16px; | ||
| 1721 | + cursor: pointer; | ||
| 1722 | +} | ||
| 1723 | + | ||
| 1724 | +.ct_eye_icon.active{ | ||
| 1725 | + color: #444; | ||
| 1726 | +} | ||
| 1727 | + | ||
| 1728 | +#tempScheduleContent .forms::-webkit-scrollbar { | ||
| 1729 | + width: 19px; | ||
| 1730 | + height: 16px; | ||
| 1731 | +} | ||
| 1732 | + | ||
| 1733 | +.range_2_normal_tt{ | ||
| 1734 | + margin-bottom: 15px; | ||
| 1735 | + border-top: 1px dashed #c7c7c7; | ||
| 1736 | + color: #a6a6a6; | ||
| 1737 | + text-indent: 7px; | ||
| 1738 | + padding-bottom: 5px; | ||
| 1702 | } | 1739 | } |
| 1703 | \ No newline at end of file | 1740 | \ No newline at end of file |
src/main/resources/static/real_control_v2/fragments/line_schedule/badge_tooltip.html
| @@ -10,7 +10,7 @@ | @@ -10,7 +10,7 @@ | ||
| 10 | <dt>备注</dt> | 10 | <dt>备注</dt> |
| 11 | </dl> | 11 | </dl> |
| 12 | {{each tasks as t i}} | 12 | {{each tasks as t i}} |
| 13 | - <dl class="{{t.mileageType}} {{if t.destroy}}destroy{{/if}}"> | 13 | + <dl class="{{t.mileageType}} {{if t.destroy}}destroy{{/if}} {{if t.type1=='临加'}}temp_add{{/if}}"> |
| 14 | <dd> | 14 | <dd> |
| 15 | {{if t.mileageType=="service"}} | 15 | {{if t.mileageType=="service"}} |
| 16 | 营运 | 16 | 营运 |
| @@ -23,6 +23,8 @@ | @@ -23,6 +23,8 @@ | ||
| 23 | <span>(进场)</span> | 23 | <span>(进场)</span> |
| 24 | {{else if t.type2==3}} | 24 | {{else if t.type2==3}} |
| 25 | <span>(出场)</span> | 25 | <span>(出场)</span> |
| 26 | + {{else if t.type1=='临加'}} | ||
| 27 | + <span>(临加)</span> | ||
| 26 | {{/if}} | 28 | {{/if}} |
| 27 | </dd> | 29 | </dd> |
| 28 | <dd> | 30 | <dd> |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/dftz.html
| @@ -44,7 +44,7 @@ | @@ -44,7 +44,7 @@ | ||
| 44 | <div class="uk-form-row ct-stacked"> | 44 | <div class="uk-form-row ct-stacked"> |
| 45 | <label class="uk-form-label" for="form-s-t">备注<small class="font-danger">(不超过20个字符)</small></label> | 45 | <label class="uk-form-label" for="form-s-t">备注<small class="font-danger">(不超过20个字符)</small></label> |
| 46 | <div class="uk-form-controls"> | 46 | <div class="uk-form-controls"> |
| 47 | - <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="20" ></textarea> | 47 | + <textarea id="form-s-t" cols="30" rows="5" name="remarks" data-fv-stringlength="true" data-fv-stringlength-max="20" >{{remarks}}</textarea> |
| 48 | </div> | 48 | </div> |
| 49 | </div> | 49 | </div> |
| 50 | </div> | 50 | </div> |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/fcxxwt.html
| @@ -197,15 +197,19 @@ | @@ -197,15 +197,19 @@ | ||
| 197 | return; | 197 | return; |
| 198 | } | 198 | } |
| 199 | 199 | ||
| 200 | - if(!data.adjustExps && (data.status==-1 | ||
| 201 | - || (data.jhlc==0 && sch.bcType != 'in' && sch.bcType != 'out'))){ | 200 | + //正常班次里程修改为0 |
| 201 | + var normalDestory = data.jhlc==0 && sch.bcType != 'in' && sch.bcType != 'out'; | ||
| 202 | + //修改里程 | ||
| 203 | + var editJhlc = data.jhlc != sch.jhlc && data.jhlc != 0; | ||
| 204 | + if(!data.adjustExps && (data.status==-1 || normalDestory || editJhlc)){ | ||
| 202 | notify_err("当前操作需要选择调整原因!"); | 205 | notify_err("当前操作需要选择调整原因!"); |
| 203 | return; | 206 | return; |
| 204 | } | 207 | } |
| 205 | 208 | ||
| 206 | //里程有修改 | 209 | //里程有修改 |
| 207 | - if(data.jhlc != sch.jhlc && data.jhlc != 0){ | ||
| 208 | - var confHtml = '<h4 style="color: #c04c4c;margin-bottom: 9px;">确认要将班次里程由'+sch.jhlc+' 修改为'+data.jhlc+' </h4><small>备注:</small>'; | 210 | + //if(data.jhlc != sch.jhlc && data.jhlc != 0){ |
| 211 | + | ||
| 212 | + /*var confHtml = '<h4 style="color: #c04c4c;margin-bottom: 9px;">确认要将班次里程由'+sch.jhlc+' 修改为'+data.jhlc+' </h4><small>备注:</small>'; | ||
| 209 | UIkit.modal.prompt(confHtml, data.remarks, function(remarks){ | 213 | UIkit.modal.prompt(confHtml, data.remarks, function(remarks){ |
| 210 | if(remarks){ | 214 | if(remarks){ |
| 211 | //在这里写操作日志 | 215 | //在这里写操作日志 |
| @@ -221,10 +225,10 @@ | @@ -221,10 +225,10 @@ | ||
| 221 | Ok: '确定修改公里并保存', | 225 | Ok: '确定修改公里并保存', |
| 222 | Cancel: '取消' | 226 | Cancel: '取消' |
| 223 | } | 227 | } |
| 224 | - }); | ||
| 225 | - } | ||
| 226 | - else | ||
| 227 | - postData(data); | 228 | + });*/ |
| 229 | + //} | ||
| 230 | + //else | ||
| 231 | + postData(data); | ||
| 228 | }); | 232 | }); |
| 229 | 233 | ||
| 230 | var postData = function (data) { | 234 | var postData = function (data) { |
src/main/resources/static/real_control_v2/fragments/line_schedule/context_menu/sub_task_v2/add_custom.html
| @@ -3,7 +3,7 @@ | @@ -3,7 +3,7 @@ | ||
| 3 | <span class="plus_icon_span"> | 3 | <span class="plus_icon_span"> |
| 4 | <i class="uk-icon-plus"></i> | 4 | <i class="uk-icon-plus"></i> |
| 5 | </span> | 5 | </span> |
| 6 | - <form class="uk-form remarks_form"> | 6 | +<!-- <form class="uk-form remarks_form"> |
| 7 | <div class="uk-grid"> | 7 | <div class="uk-grid"> |
| 8 | <div class="uk-width-1-1"> | 8 | <div class="uk-width-1-1"> |
| 9 | <div class="uk-form-row ct-stacked"> | 9 | <div class="uk-form-row ct-stacked"> |
| @@ -14,7 +14,7 @@ | @@ -14,7 +14,7 @@ | ||
| 14 | </div> | 14 | </div> |
| 15 | </div> | 15 | </div> |
| 16 | </div> | 16 | </div> |
| 17 | - </form> | 17 | + </form>--> |
| 18 | <div class="uk-modal-footer uk-text-right" style="margin-top: 5px;"> | 18 | <div class="uk-modal-footer uk-text-right" style="margin-top: 5px;"> |
| 19 | <button type="button" class="uk-button uk-modal-close">取消</button> | 19 | <button type="button" class="uk-button uk-modal-close">取消</button> |
| 20 | <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> 保存</button> | 20 | <button type="submit" class="uk-button uk-button-primary"><i class="uk-icon-check"></i> 保存</button> |
| @@ -76,7 +76,7 @@ | @@ -76,7 +76,7 @@ | ||
| 76 | e.preventDefault(); | 76 | e.preventDefault(); |
| 77 | 77 | ||
| 78 | dataArray.push($.extend($(this).serializeJSON(), gb_common.getDisabledVal(this) | 78 | dataArray.push($.extend($(this).serializeJSON(), gb_common.getDisabledVal(this) |
| 79 | - , {remarks: $('#form-s-t',wrap).val(), 'schedule.id': sch.id})); | 79 | + , {/*remarks: $('#form-s-t',wrap).val(), */'schedule.id': sch.id})); |
| 80 | $(this).data('valid', true); | 80 | $(this).data('valid', true); |
| 81 | 81 | ||
| 82 | if(allValidSuccess()){ | 82 | if(allValidSuccess()){ |
| @@ -93,21 +93,21 @@ | @@ -93,21 +93,21 @@ | ||
| 93 | } | 93 | } |
| 94 | var data = dataArray[i]; | 94 | var data = dataArray[i]; |
| 95 | //营运里程为0的不保存 | 95 | //营运里程为0的不保存 |
| 96 | - if(data.mileageType == 'service' && data.mileage==0){ | 96 | + /*if(data.mileageType == 'service' && data.mileage==0){ |
| 97 | i++; | 97 | i++; |
| 98 | f(); | 98 | f(); |
| 99 | } | 99 | } |
| 100 | - else{ | 100 | + else{*/ |
| 101 | //营运子任务不写备注 | 101 | //营运子任务不写备注 |
| 102 | - if(data.mileageType == 'service' && !data.destroy) | ||
| 103 | - data.remarks = ''; | 102 | + /*if(data.mileageType == 'service' && !data.destroy) |
| 103 | + data.remarks = '';*/ | ||
| 104 | gb_common.$post('/childTask', data, function (rs) { | 104 | gb_common.$post('/childTask', data, function (rs) { |
| 105 | notify_succ('子任务添加成功'); | 105 | notify_succ('子任务添加成功'); |
| 106 | rst = rs.t; | 106 | rst = rs.t; |
| 107 | i++; | 107 | i++; |
| 108 | f(); | 108 | f(); |
| 109 | }); | 109 | }); |
| 110 | - } | 110 | + //} |
| 111 | })(); | 111 | })(); |
| 112 | } | 112 | } |
| 113 | }); | 113 | }); |
| @@ -130,6 +130,14 @@ | @@ -130,6 +130,14 @@ | ||
| 130 | function $f(name, f) { | 130 | function $f(name, f) { |
| 131 | return $('[name=' + name + ']', f); | 131 | return $('[name=' + name + ']', f); |
| 132 | } | 132 | } |
| 133 | + | ||
| 134 | + /** | ||
| 135 | + * 备注级联 | ||
| 136 | + */ | ||
| 137 | + $(wrap).on('input', '[name=remarks]', function () { | ||
| 138 | + var nfs = $(this).parents('.sub_task_form_v2').nextAll('.sub_task_form_v2'); | ||
| 139 | + $('[name=remarks]', nfs).val($(this).val()); | ||
| 140 | + }); | ||
| 133 | })(); | 141 | })(); |
| 134 | </script> | 142 | </script> |
| 135 | </div> | 143 | </div> |
| 136 | \ No newline at end of file | 144 | \ No newline at end of file |