Commit 919d2d82d5a75fd4310913fad9c54b5049028166
1 parent
136a8f3a
加入班次修正日志
Showing
16 changed files
with
1128 additions
and
9 deletions
src/main/java/com/bsth/XDApplication.java
| @@ -97,7 +97,7 @@ public class XDApplication implements CommandLineRunner { | @@ -97,7 +97,7 @@ public class XDApplication implements CommandLineRunner { | ||
| 97 | //实际排班延迟入库线程 | 97 | //实际排班延迟入库线程 |
| 98 | //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS); | 98 | //sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS); |
| 99 | //班次修正日志延迟入库 | 99 | //班次修正日志延迟入库 |
| 100 | - //sexec.scheduleWithFixedDelay(seiPstThread, 60, 60, TimeUnit.SECONDS); | 100 | + //sexec.scheduleWithFixedDelay(seiPstThread, 60, 30, TimeUnit.SECONDS); |
| 101 | 101 | ||
| 102 | //线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作) | 102 | //线程监听(防止重要的线程阻塞、异常结束。以及部分主备切换工作) |
| 103 | //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS); | 103 | //sexec.scheduleWithFixedDelay(threadMonotor, 240, 60, TimeUnit.SECONDS); |
| @@ -115,7 +115,7 @@ public class XDApplication implements CommandLineRunner { | @@ -115,7 +115,7 @@ public class XDApplication implements CommandLineRunner { | ||
| 115 | //班次更新线程 | 115 | //班次更新线程 |
| 116 | sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); | 116 | sexec.scheduleWithFixedDelay(scheduleRefreshThread, 15, 240, TimeUnit.SECONDS); |
| 117 | //班次延迟入库线程 | 117 | //班次延迟入库线程 |
| 118 | - sexec.scheduleWithFixedDelay(schedulePstThread, 60, 15, TimeUnit.SECONDS); | 118 | + sexec.scheduleWithFixedDelay(schedulePstThread, 60, 10, TimeUnit.SECONDS); |
| 119 | //班次修正日志延迟入库 | 119 | //班次修正日志延迟入库 |
| 120 | sexec.scheduleWithFixedDelay(seiPstThread, 60, 60, TimeUnit.SECONDS); | 120 | sexec.scheduleWithFixedDelay(seiPstThread, 60, 60, TimeUnit.SECONDS); |
| 121 | //检查班次误点 | 121 | //检查班次误点 |
src/main/java/com/bsth/controller/realcontrol/SchEditInfoController.java
0 → 100644
| 1 | +package com.bsth.controller.realcontrol; | ||
| 2 | + | ||
| 3 | +import com.bsth.controller.BaseController; | ||
| 4 | +import com.bsth.data.schedule.edit_logs.entity.SchEditInfo; | ||
| 5 | +import com.bsth.data.schedule.edit_logs.service.SchEditInfoService; | ||
| 6 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 7 | +import org.springframework.web.bind.annotation.RequestMapping; | ||
| 8 | +import org.springframework.web.bind.annotation.RequestMethod; | ||
| 9 | +import org.springframework.web.bind.annotation.RequestParam; | ||
| 10 | +import org.springframework.web.bind.annotation.RestController; | ||
| 11 | + | ||
| 12 | +import java.util.Map; | ||
| 13 | + | ||
| 14 | +/** | ||
| 15 | + * 班次修正记录 | ||
| 16 | + * Created by panzhao on 2017/5/22. | ||
| 17 | + */ | ||
| 18 | +@RestController | ||
| 19 | +@RequestMapping("schEditInfo") | ||
| 20 | +public class SchEditInfoController extends BaseController<SchEditInfo, Long>{ | ||
| 21 | + | ||
| 22 | + @Autowired | ||
| 23 | + SchEditInfoService editInfoService; | ||
| 24 | + | ||
| 25 | + @RequestMapping(value = "/_list", method = RequestMethod.GET) | ||
| 26 | + public Map<String, Object> _list(@RequestParam String rq, @RequestParam String lineCode,@RequestParam Map<String, String> map) { | ||
| 27 | + return editInfoService._list(rq, lineCode, map); | ||
| 28 | + } | ||
| 29 | +} |
src/main/java/com/bsth/controller/realcontrol/ScheduleRealInfoController.java
| @@ -433,10 +433,12 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | @@ -433,10 +433,12 @@ public class ScheduleRealInfoController extends BaseController<ScheduleRealInfo, | ||
| 433 | * @return | 433 | * @return |
| 434 | */ | 434 | */ |
| 435 | @RequestMapping("dateArray") | 435 | @RequestMapping("dateArray") |
| 436 | - public List<String> dateArray(){ | 436 | + public List<String> dateArray(@RequestParam(defaultValue = "0") int c){ |
| 437 | List<String> rs = new ArrayList<>(); | 437 | List<String> rs = new ArrayList<>(); |
| 438 | 438 | ||
| 439 | - long t = new Date().getTime() - ONE_DAY - (1000 * 60 * 60 * 2); | 439 | + long t = new Date().getTime(); |
| 440 | + if(c != 1) | ||
| 441 | + t -= ONE_DAY - (1000 * 60 * 60 * 2); | ||
| 440 | for(int i = 0; i < 10; i ++){ | 442 | for(int i = 0; i < 10; i ++){ |
| 441 | rs.add(fmtyyyyMMdd.print(t)); | 443 | rs.add(fmtyyyyMMdd.print(t)); |
| 442 | t -= ONE_DAY; | 444 | t -= ONE_DAY; |
src/main/java/com/bsth/data/schedule/edit_logs/ScheduleModifyLogger.java
| @@ -2,9 +2,11 @@ package com.bsth.data.schedule.edit_logs; | @@ -2,9 +2,11 @@ package com.bsth.data.schedule.edit_logs; | ||
| 2 | 2 | ||
| 3 | import com.alibaba.fastjson.JSONArray; | 3 | import com.alibaba.fastjson.JSONArray; |
| 4 | import com.alibaba.fastjson.JSONObject; | 4 | import com.alibaba.fastjson.JSONObject; |
| 5 | +import com.bsth.controller.realcontrol.dto.ChangePersonCar; | ||
| 5 | import com.bsth.data.schedule.edit_logs.entity.EditType; | 6 | import com.bsth.data.schedule.edit_logs.entity.EditType; |
| 6 | import com.bsth.data.schedule.edit_logs.entity.SchEditInfo; | 7 | import com.bsth.data.schedule.edit_logs.entity.SchEditInfo; |
| 7 | import com.bsth.entity.realcontrol.ScheduleRealInfo; | 8 | import com.bsth.entity.realcontrol.ScheduleRealInfo; |
| 9 | +import org.apache.commons.lang3.StringUtils; | ||
| 8 | import org.slf4j.Logger; | 10 | import org.slf4j.Logger; |
| 9 | import org.slf4j.LoggerFactory; | 11 | import org.slf4j.LoggerFactory; |
| 10 | 12 | ||
| @@ -87,7 +89,136 @@ public class ScheduleModifyLogger { | @@ -87,7 +89,136 @@ public class ScheduleModifyLogger { | ||
| 87 | } | 89 | } |
| 88 | } | 90 | } |
| 89 | 91 | ||
| 92 | + /** | ||
| 93 | + * 实发调整 | ||
| 94 | + * @param sch | ||
| 95 | + * @param nowSfsj | ||
| 96 | + * @param remarks | ||
| 97 | + */ | ||
| 98 | + public static void sftz(ScheduleRealInfo sch, String nowSfsj ,String remarks){ | ||
| 99 | + try { | ||
| 100 | + SchEditInfo sei = SchEditInfo.getInstance(sch); | ||
| 101 | + sei.setRemarks(remarks); | ||
| 102 | + sei.setType(EditType.SFTZ); | ||
| 103 | + //detail | ||
| 104 | + JSONObject jobj = new JSONObject(); | ||
| 105 | + jobj.put("old", sch.getFcsjActual()); | ||
| 106 | + jobj.put("now", nowSfsj); | ||
| 107 | + | ||
| 108 | + sei.setJsonArray(jobj.toJSONString()); | ||
| 109 | + put(sei); | ||
| 110 | + }catch (Exception e){ | ||
| 111 | + log.error("", e); | ||
| 112 | + } | ||
| 113 | + } | ||
| 114 | + | ||
| 115 | + /** | ||
| 116 | + * 撤销烂班 | ||
| 117 | + * @param sch | ||
| 118 | + */ | ||
| 119 | + public static void cxlb(ScheduleRealInfo sch){ | ||
| 120 | + try { | ||
| 121 | + SchEditInfo sei = SchEditInfo.getInstance(sch); | ||
| 122 | + sei.setType(EditType.CXLB); | ||
| 123 | + | ||
| 124 | + put(sei); | ||
| 125 | + }catch (Exception e){ | ||
| 126 | + log.error("", e); | ||
| 127 | + } | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + /** | ||
| 131 | + * 撤销执行 | ||
| 132 | + * @param sch | ||
| 133 | + */ | ||
| 134 | + public static void cxzx(ScheduleRealInfo sch){ | ||
| 135 | + try { | ||
| 136 | + SchEditInfo sei = SchEditInfo.getInstance(sch); | ||
| 137 | + sei.setType(EditType.CXZX); | ||
| 138 | + | ||
| 139 | + //detail | ||
| 140 | + JSONObject obj = new JSONObject(); | ||
| 141 | + if(StringUtils.isNotEmpty(sch.getFcsjActual())) | ||
| 142 | + obj.put("old_sfsj", sch.getFcsjActual()); | ||
| 143 | + | ||
| 144 | + if(StringUtils.isNotEmpty(sch.getZdsjActual())) | ||
| 145 | + obj.put("old_sdsj", sch.getZdsjActual()); | ||
| 146 | + | ||
| 147 | + sei.setJsonArray(obj.toJSONString()); | ||
| 148 | + put(sei); | ||
| 149 | + }catch (Exception e){ | ||
| 150 | + log.error("", e); | ||
| 151 | + } | ||
| 152 | + } | ||
| 153 | + | ||
| 154 | + /** | ||
| 155 | + * 撤销实发 | ||
| 156 | + * @param sch | ||
| 157 | + */ | ||
| 158 | + public static void cxsf(ScheduleRealInfo sch) { | ||
| 159 | + try { | ||
| 160 | + SchEditInfo sei = SchEditInfo.getInstance(sch); | ||
| 161 | + sei.setType(EditType.CXSF); | ||
| 162 | + | ||
| 163 | + //detail | ||
| 164 | + JSONObject obj = new JSONObject(); | ||
| 165 | + obj.put("old_sfsj", sch.getFcsjActual()); | ||
| 166 | + | ||
| 167 | + sei.setJsonArray(obj.toJSONString()); | ||
| 168 | + put(sei); | ||
| 169 | + }catch (Exception e){ | ||
| 170 | + log.error("", e); | ||
| 171 | + } | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + /** | ||
| 175 | + * 调整人车 | ||
| 176 | + * @param sch | ||
| 177 | + * @param cpc | ||
| 178 | + */ | ||
| 179 | + public static void tzrc(ScheduleRealInfo sch, ChangePersonCar cpc) { | ||
| 180 | + try { | ||
| 181 | + String newNbbm = cpc.getClZbh(); | ||
| 182 | + String newJsy = cpc.getJsy(); | ||
| 183 | + String oldJsy = sch.getjGh()+"/"+sch.getjName(); | ||
| 184 | + | ||
| 185 | + if(newNbbm == null && newJsy == null) | ||
| 186 | + return; | ||
| 187 | + if(newNbbm != null && newJsy != null | ||
| 188 | + && newNbbm.equals(sch.getClZbh()) && newJsy.equals(oldJsy)) | ||
| 189 | + return; | ||
| 190 | + | ||
| 191 | + | ||
| 192 | + SchEditInfo sei = SchEditInfo.getInstance(sch); | ||
| 193 | + sei.setType(EditType.TZRC); | ||
| 194 | + | ||
| 195 | + //detail | ||
| 196 | + JSONObject jobj = new JSONObject(); | ||
| 197 | + if(StringUtils.isNotEmpty(newNbbm)){ | ||
| 198 | + jobj.put("old_nbbm", sch.getClZbh()); | ||
| 199 | + jobj.put("now_nbbm", newNbbm); | ||
| 200 | + } | ||
| 201 | + | ||
| 202 | + if(StringUtils.isNotEmpty(newJsy)){ | ||
| 203 | + jobj.put("old_jsy", sch.getjGh() + "/" + sch.getjName()); | ||
| 204 | + jobj.put("now_jsy", newJsy); | ||
| 205 | + } | ||
| 206 | + | ||
| 207 | + if(StringUtils.isNotEmpty(cpc.getSpy()) && cpc.getSpy().length() > 3){ | ||
| 208 | + jobj.put("old_spy", sch.getsGh() + "/" + sch.getsName()); | ||
| 209 | + jobj.put("now_spy", cpc.getSpy()); | ||
| 210 | + } | ||
| 211 | + | ||
| 212 | + sei.setJsonArray(jobj.toJSONString()); | ||
| 213 | + put(sei); | ||
| 214 | + }catch (Exception e){ | ||
| 215 | + log.error("", e); | ||
| 216 | + } | ||
| 217 | + } | ||
| 218 | + | ||
| 90 | public static void put(SchEditInfo sei){ | 219 | public static void put(SchEditInfo sei){ |
| 91 | list.add(sei); | 220 | list.add(sei); |
| 92 | } | 221 | } |
| 222 | + | ||
| 223 | + | ||
| 93 | } | 224 | } |
| 94 | \ No newline at end of file | 225 | \ No newline at end of file |
src/main/java/com/bsth/data/schedule/edit_logs/SeiPstThread.java
| @@ -7,7 +7,9 @@ import org.slf4j.LoggerFactory; | @@ -7,7 +7,9 @@ import org.slf4j.LoggerFactory; | ||
| 7 | import org.springframework.beans.factory.annotation.Autowired; | 7 | import org.springframework.beans.factory.annotation.Autowired; |
| 8 | import org.springframework.stereotype.Component; | 8 | import org.springframework.stereotype.Component; |
| 9 | 9 | ||
| 10 | +import java.util.ArrayList; | ||
| 10 | import java.util.LinkedList; | 11 | import java.util.LinkedList; |
| 12 | +import java.util.List; | ||
| 11 | 13 | ||
| 12 | /** | 14 | /** |
| 13 | * 班次修正日志入库 | 15 | * 班次修正日志入库 |
| @@ -24,6 +26,7 @@ public class SeiPstThread extends Thread{ | @@ -24,6 +26,7 @@ public class SeiPstThread extends Thread{ | ||
| 24 | @Override | 26 | @Override |
| 25 | public void run() { | 27 | public void run() { |
| 26 | try{ | 28 | try{ |
| 29 | + List<SchEditInfo> pstList = new ArrayList<>(); | ||
| 27 | LinkedList<SchEditInfo> list = ScheduleModifyLogger.list; | 30 | LinkedList<SchEditInfo> list = ScheduleModifyLogger.list; |
| 28 | SchEditInfo sei; | 31 | SchEditInfo sei; |
| 29 | for(int i = 0; i < 1000; i ++){ | 32 | for(int i = 0; i < 1000; i ++){ |
| @@ -31,9 +34,12 @@ public class SeiPstThread extends Thread{ | @@ -31,9 +34,12 @@ public class SeiPstThread extends Thread{ | ||
| 31 | if(sei == null) | 34 | if(sei == null) |
| 32 | break; | 35 | break; |
| 33 | else{ | 36 | else{ |
| 34 | - repository.save(sei); | 37 | + //repository.save(sei); |
| 38 | + pstList.add(sei); | ||
| 35 | } | 39 | } |
| 36 | } | 40 | } |
| 41 | + | ||
| 42 | + repository.save(pstList); | ||
| 37 | }catch (Exception e){ | 43 | }catch (Exception e){ |
| 38 | log.error("", e); | 44 | log.error("", e); |
| 39 | } | 45 | } |
src/main/java/com/bsth/data/schedule/edit_logs/entity/EditType.java
src/main/java/com/bsth/data/schedule/edit_logs/entity/SchEditInfo.java
| @@ -28,6 +28,9 @@ public class SchEditInfo { | @@ -28,6 +28,9 @@ public class SchEditInfo { | ||
| 28 | */ | 28 | */ |
| 29 | private String timeStr; | 29 | private String timeStr; |
| 30 | 30 | ||
| 31 | + /** 时间戳 */ | ||
| 32 | + private long ts; | ||
| 33 | + | ||
| 31 | private String lineCode; | 34 | private String lineCode; |
| 32 | 35 | ||
| 33 | private String gsbm; | 36 | private String gsbm; |
| @@ -134,13 +137,13 @@ public class SchEditInfo { | @@ -134,13 +137,13 @@ public class SchEditInfo { | ||
| 134 | 137 | ||
| 135 | @Transient | 138 | @Transient |
| 136 | private static DateTimeFormatter fmtHHmm = DateTimeFormat.forPattern("HH:mm"); | 139 | private static DateTimeFormatter fmtHHmm = DateTimeFormat.forPattern("HH:mm"); |
| 137 | - @Transient | ||
| 138 | - private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd"); | 140 | + /* @Transient |
| 141 | + private static DateTimeFormatter fmtyyyyMMdd = DateTimeFormat.forPattern("yyyy-MM-dd");*/ | ||
| 139 | public static SchEditInfo getInstance(ScheduleRealInfo sch){ | 142 | public static SchEditInfo getInstance(ScheduleRealInfo sch){ |
| 140 | SchEditInfo sei = new SchEditInfo(); | 143 | SchEditInfo sei = new SchEditInfo(); |
| 141 | long t = System.currentTimeMillis(); | 144 | long t = System.currentTimeMillis(); |
| 142 | 145 | ||
| 143 | - sei.setRq(fmtyyyyMMdd.print(t)); | 146 | + sei.setTs(t); |
| 144 | sei.setTimeStr(fmtHHmm.print(t)); | 147 | sei.setTimeStr(fmtHHmm.print(t)); |
| 145 | 148 | ||
| 146 | SysUser user = SecurityUtils.getCurrentUser(); | 149 | SysUser user = SecurityUtils.getCurrentUser(); |
| @@ -148,6 +151,7 @@ public class SchEditInfo { | @@ -148,6 +151,7 @@ public class SchEditInfo { | ||
| 148 | sei.setUser(user.getUserName()); | 151 | sei.setUser(user.getUserName()); |
| 149 | 152 | ||
| 150 | if(sch != null){ | 153 | if(sch != null){ |
| 154 | + sei.setRq(sch.getScheduleDateStr()); | ||
| 151 | sei.setSchId(sch.getId()); | 155 | sei.setSchId(sch.getId()); |
| 152 | sei.setLineCode(sch.getXlBm()); | 156 | sei.setLineCode(sch.getXlBm()); |
| 153 | sei.setGsbm(sch.getGsBm()); | 157 | sei.setGsbm(sch.getGsBm()); |
| @@ -179,4 +183,12 @@ public class SchEditInfo { | @@ -179,4 +183,12 @@ public class SchEditInfo { | ||
| 179 | public void setFgsbm(String fgsbm) { | 183 | public void setFgsbm(String fgsbm) { |
| 180 | this.fgsbm = fgsbm; | 184 | this.fgsbm = fgsbm; |
| 181 | } | 185 | } |
| 186 | + | ||
| 187 | + public long getTs() { | ||
| 188 | + return ts; | ||
| 189 | + } | ||
| 190 | + | ||
| 191 | + public void setTs(long ts) { | ||
| 192 | + this.ts = ts; | ||
| 193 | + } | ||
| 182 | } | 194 | } |
src/main/java/com/bsth/data/schedule/edit_logs/service/SchEditInfoService.java
0 → 100644
| 1 | +package com.bsth.data.schedule.edit_logs.service; | ||
| 2 | + | ||
| 3 | +import com.bsth.data.schedule.edit_logs.entity.SchEditInfo; | ||
| 4 | +import com.bsth.service.BaseService; | ||
| 5 | + | ||
| 6 | +import java.util.Map; | ||
| 7 | + | ||
| 8 | +/** | ||
| 9 | + * Created by panzhao on 2017/5/22. | ||
| 10 | + */ | ||
| 11 | +public interface SchEditInfoService extends BaseService<SchEditInfo, Long> { | ||
| 12 | + | ||
| 13 | + Map<String, Object> _list(String rq, String lineCode, Map<String, String> map); | ||
| 14 | +} |
src/main/java/com/bsth/data/schedule/edit_logs/service/SchEditInfoServiceImpl.java
0 → 100644
| 1 | +package com.bsth.data.schedule.edit_logs.service; | ||
| 2 | + | ||
| 3 | +import com.bsth.common.ResponseCode; | ||
| 4 | +import com.bsth.data.schedule.edit_logs.entity.SchEditInfo; | ||
| 5 | +import com.bsth.data.schedule.edit_logs.service.dto.SchEditInfoDto; | ||
| 6 | +import com.bsth.service.impl.BaseServiceImpl; | ||
| 7 | +import com.bsth.util.BatchSaveUtils; | ||
| 8 | +import org.apache.commons.lang3.StringUtils; | ||
| 9 | +import org.slf4j.Logger; | ||
| 10 | +import org.slf4j.LoggerFactory; | ||
| 11 | +import org.springframework.beans.factory.annotation.Autowired; | ||
| 12 | +import org.springframework.jdbc.core.BeanPropertyRowMapper; | ||
| 13 | +import org.springframework.jdbc.core.JdbcTemplate; | ||
| 14 | +import org.springframework.stereotype.Service; | ||
| 15 | + | ||
| 16 | +import java.util.HashMap; | ||
| 17 | +import java.util.List; | ||
| 18 | +import java.util.Map; | ||
| 19 | +import java.util.Set; | ||
| 20 | + | ||
| 21 | +/** | ||
| 22 | + * Created by panzhao on 2017/5/22. | ||
| 23 | + */ | ||
| 24 | +@Service | ||
| 25 | +public class SchEditInfoServiceImpl extends BaseServiceImpl<SchEditInfo, Long> implements SchEditInfoService{ | ||
| 26 | + | ||
| 27 | + Logger log = LoggerFactory.getLogger(this.getClass()); | ||
| 28 | + | ||
| 29 | + @Autowired | ||
| 30 | + JdbcTemplate jdbcTemplate; | ||
| 31 | + | ||
| 32 | + public Map<String, Object> _list(String rq, String lineCode, Map<String, String> map) { | ||
| 33 | + | ||
| 34 | + Map<String, Object> rs = new HashMap(); | ||
| 35 | + try { | ||
| 36 | + //拼接除rq、lineCode 外的其他where 条件 | ||
| 37 | + map.remove("rq"); | ||
| 38 | + map.remove("lineCode"); | ||
| 39 | + String cont = "", v; | ||
| 40 | + Set<String> ks = map.keySet(); | ||
| 41 | + for(String k : ks){ | ||
| 42 | + v =map.get(k); | ||
| 43 | + if(StringUtils.isNotEmpty(v)) | ||
| 44 | + cont += " and t2." + BatchSaveUtils.propertyToField(k) + "='" + v + "'"; | ||
| 45 | + } | ||
| 46 | + String sql = "select t1.*, t2.fcsj,t2.lp_name,t2.cl_zbh,t2.j_gh,t2.j_name,t2.xl_dir,t2.real_exec_date from (select * from logger_sch_modify where rq=? and line_code=? ) t1 INNER JOIN bsth_c_s_sp_info_real t2 on t1.sch_id=t2.id where 1=1 " + cont; | ||
| 47 | + | ||
| 48 | + List<SchEditInfoDto> list = jdbcTemplate.query(sql, new BeanPropertyRowMapper(SchEditInfoDto.class), rq, lineCode); | ||
| 49 | + | ||
| 50 | + rs.put("status", ResponseCode.SUCCESS); | ||
| 51 | + rs.put("list", list); | ||
| 52 | + }catch (Exception e){ | ||
| 53 | + log.error("", e); | ||
| 54 | + rs.put("status", ResponseCode.ERROR); | ||
| 55 | + rs.put("msg", e.getMessage()); | ||
| 56 | + } | ||
| 57 | + return rs; | ||
| 58 | + } | ||
| 59 | +} |
src/main/java/com/bsth/data/schedule/edit_logs/service/dto/SchEditInfoDto.java
0 → 100644
| 1 | +package com.bsth.data.schedule.edit_logs.service.dto; | ||
| 2 | + | ||
| 3 | +/** | ||
| 4 | + * Created by panzhao on 2017/5/22. | ||
| 5 | + */ | ||
| 6 | +public class SchEditInfoDto { | ||
| 7 | + | ||
| 8 | + private long id; | ||
| 9 | + /*** 日期 yyyy-MM-dd*/ | ||
| 10 | + private String rq; | ||
| 11 | + | ||
| 12 | + /*** 时间 HH:mm*/ | ||
| 13 | + private String timeStr; | ||
| 14 | + | ||
| 15 | + private String lineCode; | ||
| 16 | + | ||
| 17 | + private String gsbm; | ||
| 18 | + | ||
| 19 | + private String fgsbm; | ||
| 20 | + | ||
| 21 | + /*** 班次ID*/ | ||
| 22 | + private long schId; | ||
| 23 | + | ||
| 24 | + /*** 类型*/ | ||
| 25 | + private String type; | ||
| 26 | + | ||
| 27 | + private String type2; | ||
| 28 | + /*** 操作人 @system 系统/用户名*/ | ||
| 29 | + private String user; | ||
| 30 | + | ||
| 31 | + /*** 操作明细*/ | ||
| 32 | + private String jsonArray; | ||
| 33 | + | ||
| 34 | + private String remarks; | ||
| 35 | + | ||
| 36 | + /** 路牌 */ | ||
| 37 | + private String lpName; | ||
| 38 | + | ||
| 39 | + /** 驾驶员工号 */ | ||
| 40 | + private String jGh; | ||
| 41 | + | ||
| 42 | + /** 驾驶员姓名 */ | ||
| 43 | + private String jName; | ||
| 44 | + | ||
| 45 | + /** 车辆自编号 */ | ||
| 46 | + private String clZbh; | ||
| 47 | + | ||
| 48 | + /** 计发时间 */ | ||
| 49 | + private String fcsj; | ||
| 50 | + | ||
| 51 | + /** 上下行 */ | ||
| 52 | + private int xlDir; | ||
| 53 | + | ||
| 54 | + /** 实际执行日期 */ | ||
| 55 | + private String realExecDate; | ||
| 56 | + | ||
| 57 | + public long getId() { | ||
| 58 | + return id; | ||
| 59 | + } | ||
| 60 | + | ||
| 61 | + public void setId(long id) { | ||
| 62 | + this.id = id; | ||
| 63 | + } | ||
| 64 | + | ||
| 65 | + public String getRq() { | ||
| 66 | + return rq; | ||
| 67 | + } | ||
| 68 | + | ||
| 69 | + public void setRq(String rq) { | ||
| 70 | + this.rq = rq; | ||
| 71 | + } | ||
| 72 | + | ||
| 73 | + public String getTimeStr() { | ||
| 74 | + return timeStr; | ||
| 75 | + } | ||
| 76 | + | ||
| 77 | + public void setTimeStr(String timeStr) { | ||
| 78 | + this.timeStr = timeStr; | ||
| 79 | + } | ||
| 80 | + | ||
| 81 | + public String getLineCode() { | ||
| 82 | + return lineCode; | ||
| 83 | + } | ||
| 84 | + | ||
| 85 | + public void setLineCode(String lineCode) { | ||
| 86 | + this.lineCode = lineCode; | ||
| 87 | + } | ||
| 88 | + | ||
| 89 | + public String getGsbm() { | ||
| 90 | + return gsbm; | ||
| 91 | + } | ||
| 92 | + | ||
| 93 | + public void setGsbm(String gsbm) { | ||
| 94 | + this.gsbm = gsbm; | ||
| 95 | + } | ||
| 96 | + | ||
| 97 | + public String getFgsbm() { | ||
| 98 | + return fgsbm; | ||
| 99 | + } | ||
| 100 | + | ||
| 101 | + public void setFgsbm(String fgsbm) { | ||
| 102 | + this.fgsbm = fgsbm; | ||
| 103 | + } | ||
| 104 | + | ||
| 105 | + public long getSchId() { | ||
| 106 | + return schId; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + public void setSchId(long schId) { | ||
| 110 | + this.schId = schId; | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + public String getType2() { | ||
| 114 | + return type2; | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + public void setType2(String type2) { | ||
| 118 | + this.type2 = type2; | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + public String getUser() { | ||
| 122 | + return user; | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + public void setUser(String user) { | ||
| 126 | + this.user = user; | ||
| 127 | + } | ||
| 128 | + | ||
| 129 | + public String getJsonArray() { | ||
| 130 | + return jsonArray; | ||
| 131 | + } | ||
| 132 | + | ||
| 133 | + public void setJsonArray(String jsonArray) { | ||
| 134 | + this.jsonArray = jsonArray; | ||
| 135 | + } | ||
| 136 | + | ||
| 137 | + public String getRemarks() { | ||
| 138 | + return remarks; | ||
| 139 | + } | ||
| 140 | + | ||
| 141 | + public void setRemarks(String remarks) { | ||
| 142 | + this.remarks = remarks; | ||
| 143 | + } | ||
| 144 | + | ||
| 145 | + public String getLpName() { | ||
| 146 | + return lpName; | ||
| 147 | + } | ||
| 148 | + | ||
| 149 | + public void setLpName(String lpName) { | ||
| 150 | + this.lpName = lpName; | ||
| 151 | + } | ||
| 152 | + | ||
| 153 | + public String getjGh() { | ||
| 154 | + return jGh; | ||
| 155 | + } | ||
| 156 | + | ||
| 157 | + public void setjGh(String jGh) { | ||
| 158 | + this.jGh = jGh; | ||
| 159 | + } | ||
| 160 | + | ||
| 161 | + public String getjName() { | ||
| 162 | + return jName; | ||
| 163 | + } | ||
| 164 | + | ||
| 165 | + public void setjName(String jName) { | ||
| 166 | + this.jName = jName; | ||
| 167 | + } | ||
| 168 | + | ||
| 169 | + | ||
| 170 | + public String getRealExecDate() { | ||
| 171 | + return realExecDate; | ||
| 172 | + } | ||
| 173 | + | ||
| 174 | + public void setRealExecDate(String realExecDate) { | ||
| 175 | + this.realExecDate = realExecDate; | ||
| 176 | + } | ||
| 177 | + | ||
| 178 | + public String getType() { | ||
| 179 | + return type; | ||
| 180 | + } | ||
| 181 | + | ||
| 182 | + public void setType(String type) { | ||
| 183 | + this.type = type; | ||
| 184 | + } | ||
| 185 | + | ||
| 186 | + public String getClZbh() { | ||
| 187 | + return clZbh; | ||
| 188 | + } | ||
| 189 | + | ||
| 190 | + public void setClZbh(String clZbh) { | ||
| 191 | + this.clZbh = clZbh; | ||
| 192 | + } | ||
| 193 | + | ||
| 194 | + public String getFcsj() { | ||
| 195 | + return fcsj; | ||
| 196 | + } | ||
| 197 | + | ||
| 198 | + public void setFcsj(String fcsj) { | ||
| 199 | + this.fcsj = fcsj; | ||
| 200 | + } | ||
| 201 | + | ||
| 202 | + public int getXlDir() { | ||
| 203 | + return xlDir; | ||
| 204 | + } | ||
| 205 | + | ||
| 206 | + public void setXlDir(int xlDir) { | ||
| 207 | + this.xlDir = xlDir; | ||
| 208 | + } | ||
| 209 | +} |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -1050,6 +1050,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1050,6 +1050,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1050 | sch.setRealExecDate(sch.getScheduleDateStr()); | 1050 | sch.setRealExecDate(sch.getScheduleDateStr()); |
| 1051 | } | 1051 | } |
| 1052 | 1052 | ||
| 1053 | + //日志记录 | ||
| 1054 | + ScheduleModifyLogger.sftz(sch, fcsjActual, remarks); | ||
| 1055 | + | ||
| 1053 | sch.setFcsjActualAll(fcsjActual); | 1056 | sch.setFcsjActualAll(fcsjActual); |
| 1054 | sch.addRemarks(remarks); | 1057 | sch.addRemarks(remarks); |
| 1055 | sch.calcStatus(); | 1058 | sch.calcStatus(); |
| @@ -1085,6 +1088,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1085,6 +1088,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1085 | rs.put("status", ResponseCode.ERROR); | 1088 | rs.put("status", ResponseCode.ERROR); |
| 1086 | rs.put("msg", "未烂班,无法撤销!"); | 1089 | rs.put("msg", "未烂班,无法撤销!"); |
| 1087 | } else { | 1090 | } else { |
| 1091 | + //日志记录 | ||
| 1092 | + ScheduleModifyLogger.cxlb(sch); | ||
| 1093 | + | ||
| 1088 | sch.setStatus(0); | 1094 | sch.setStatus(0); |
| 1089 | sch.setRemarks("");//清空备注 | 1095 | sch.setRemarks("");//清空备注 |
| 1090 | sch.setJhlc(sch.getJhlcOrig()); | 1096 | sch.setJhlc(sch.getJhlcOrig()); |
| @@ -1124,6 +1130,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1124,6 +1130,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1124 | break; | 1130 | break; |
| 1125 | } | 1131 | } |
| 1126 | }*/ | 1132 | }*/ |
| 1133 | + //日志记录 | ||
| 1134 | + ScheduleModifyLogger.cxsf(sch); | ||
| 1127 | 1135 | ||
| 1128 | sch.clearFcsjActual(); | 1136 | sch.clearFcsjActual(); |
| 1129 | rs.put("status", ResponseCode.SUCCESS); | 1137 | rs.put("status", ResponseCode.SUCCESS); |
| @@ -3202,6 +3210,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -3202,6 +3210,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 3202 | 3210 | ||
| 3203 | //为换人换车情况表写入数据 | 3211 | //为换人换车情况表写入数据 |
| 3204 | schModifyLog.saveChangetochange(sch, cpc); | 3212 | schModifyLog.saveChangetochange(sch, cpc); |
| 3213 | + //日志记录 | ||
| 3214 | + ScheduleModifyLogger.tzrc(sch, cpc); | ||
| 3205 | 3215 | ||
| 3206 | if (StringUtils.isNotEmpty(cpc.getJsy())) { | 3216 | if (StringUtils.isNotEmpty(cpc.getJsy())) { |
| 3207 | //换驾驶员 | 3217 | //换驾驶员 |
| @@ -4565,6 +4575,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -4565,6 +4575,8 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 4565 | rs.put("status", ResponseCode.ERROR); | 4575 | rs.put("status", ResponseCode.ERROR); |
| 4566 | rs.put("msg", "班次未执行,无法撤销!"); | 4576 | rs.put("msg", "班次未执行,无法撤销!"); |
| 4567 | } else { | 4577 | } else { |
| 4578 | + //日志记录 | ||
| 4579 | + ScheduleModifyLogger.cxzx(sch); | ||
| 4568 | 4580 | ||
| 4569 | sch.clearFcsjActual(); | 4581 | sch.clearFcsjActual(); |
| 4570 | sch.clearZdsjActual(); | 4582 | sch.clearZdsjActual(); |
src/main/resources/static/real_control_v2/css/north.css
| @@ -365,4 +365,120 @@ | @@ -365,4 +365,120 @@ | ||
| 365 | font-size: 18px !important; | 365 | font-size: 18px !important; |
| 366 | font-family: Microsoft Yahei !important; | 366 | font-family: Microsoft Yahei !important; |
| 367 | color: blue !important; | 367 | color: blue !important; |
| 368 | +} | ||
| 369 | + | ||
| 370 | + | ||
| 371 | + | ||
| 372 | +.sch-edit-info-table dl dt:nth-of-type(1), .sch-edit-info-table dl dd:nth-of-type(1) { | ||
| 373 | + width: 4%; | ||
| 374 | +} | ||
| 375 | +.sch-edit-info-table dl dd:nth-of-type(1){ | ||
| 376 | + background: #eae8e8; | ||
| 377 | + border-right: 1px solid #b3b3b3; | ||
| 378 | + text-align: center; | ||
| 379 | + text-indent: -3px; | ||
| 380 | + color: #000; | ||
| 381 | +} | ||
| 382 | +.sch-edit-info-table dl dt:nth-of-type(2), .sch-edit-info-table dl dd:nth-of-type(2) { | ||
| 383 | + width: 4%; | ||
| 384 | +} | ||
| 385 | + | ||
| 386 | +.sch-edit-info-table dl dt:nth-of-type(3), .sch-edit-info-table dl dd:nth-of-type(3) { | ||
| 387 | + width: 8%; | ||
| 388 | +} | ||
| 389 | + | ||
| 390 | +.sch-edit-info-table dl dt:nth-of-type(4), .sch-edit-info-table dl dd:nth-of-type(4) { | ||
| 391 | + width: 12%; | ||
| 392 | +} | ||
| 393 | +.sch-edit-info-table dl dt:nth-of-type(5), .sch-edit-info-table dl dd:nth-of-type(5) { | ||
| 394 | + width: 8%; | ||
| 395 | +} | ||
| 396 | +.sch-edit-info-table dl dt:nth-of-type(6), .sch-edit-info-table dl dd:nth-of-type(6) { | ||
| 397 | + width: 64%; | ||
| 398 | +} | ||
| 399 | + | ||
| 400 | +.sch-edit-info-table dl:nth-of-type(odd){ | ||
| 401 | + | ||
| 402 | +} | ||
| 403 | + | ||
| 404 | +.ct-badge { | ||
| 405 | + display: inline-block; | ||
| 406 | + font-size: 12px; | ||
| 407 | + text-indent: 0; | ||
| 408 | + padding: 2px 3px 2px; | ||
| 409 | + height: 15px; | ||
| 410 | + line-height: 17px; | ||
| 411 | + border-bottom: 1px dotted; | ||
| 412 | +} | ||
| 413 | + | ||
| 414 | +.ct-badge.ct-badge-DFTZ{ | ||
| 415 | + color: #3bb540; | ||
| 416 | +} | ||
| 417 | + | ||
| 418 | +.ct-badge.ct-badge-DFTZ:hover{ | ||
| 419 | + background: #3bb540; | ||
| 420 | + color: #fff; | ||
| 421 | +} | ||
| 422 | + | ||
| 423 | +.ct-badge.ct-badge-SFTZ{ | ||
| 424 | + color: #3bb540; | ||
| 425 | +} | ||
| 426 | + | ||
| 427 | +.ct-badge.ct-badge-SFTZ:hover{ | ||
| 428 | + background: #3bb540; | ||
| 429 | + color: #fff; | ||
| 430 | +} | ||
| 431 | + | ||
| 432 | +.ct-badge.ct-badge-FCXXWT { | ||
| 433 | + color: #2844e0; | ||
| 434 | +} | ||
| 435 | + | ||
| 436 | +.ct-badge.ct-badge-FCXXWT:hover{ | ||
| 437 | + background: #2844e0; | ||
| 438 | + color: #fff; | ||
| 439 | +} | ||
| 440 | + | ||
| 441 | +.ct-badge.ct-badge-JHLB { | ||
| 442 | + color: #f92970; | ||
| 443 | +} | ||
| 444 | + | ||
| 445 | +.edit-info-tip p { | ||
| 446 | + margin: 0 0 5px 0; | ||
| 447 | + font-size: 14px; | ||
| 448 | +} | ||
| 449 | + | ||
| 450 | +.edit-info-tip p.text { | ||
| 451 | + padding: 0px 0px 7px 0; | ||
| 452 | + border-bottom: 1px solid #dddddc; | ||
| 453 | +} | ||
| 454 | + | ||
| 455 | +.edit-info-tip p.sub_text{ | ||
| 456 | + color: #807f7f; | ||
| 457 | +} | ||
| 458 | + | ||
| 459 | +.ct-badge.ct-badge-CXLB{ | ||
| 460 | + color: grey; | ||
| 461 | +} | ||
| 462 | + | ||
| 463 | +.ct-badge.ct-badge-CXSF:hover{ | ||
| 464 | + background: #cccccc; | ||
| 465 | +} | ||
| 466 | + | ||
| 467 | +.ct-badge.ct-badge-CXZX:hover{ | ||
| 468 | + background: #cccccc; | ||
| 469 | +} | ||
| 470 | + | ||
| 471 | +.ct-badge.ct-badge-JHLB:hover{ | ||
| 472 | + background: #f92970; | ||
| 473 | + color: #fff; | ||
| 474 | +} | ||
| 475 | + | ||
| 476 | + | ||
| 477 | +.ct-badge.ct-badge-TZRC { | ||
| 478 | + color: #97a50f; | ||
| 479 | +} | ||
| 480 | + | ||
| 481 | +.ct-badge.ct-badge-TZRC:hover{ | ||
| 482 | + background: #97a50f; | ||
| 483 | + color: #fff; | ||
| 368 | } | 484 | } |
| 369 | \ No newline at end of file | 485 | \ No newline at end of file |
src/main/resources/static/real_control_v2/fragments/north/nav/history_sch_maintain.html
| 1 | <div class="uk-modal ct_move_modal" id="history-sch-maintain-modal"> | 1 | <div class="uk-modal ct_move_modal" id="history-sch-maintain-modal"> |
| 2 | <div class="uk-modal-dialog" style="width: 1180px;"> | 2 | <div class="uk-modal-dialog" style="width: 1180px;"> |
| 3 | <a href="" class="uk-modal-close uk-close"></a> | 3 | <a href="" class="uk-modal-close uk-close"></a> |
| 4 | + <div class="uk-modal-header"> | ||
| 4 | <h2>历史路单维护</h2> | 5 | <h2>历史路单维护</h2> |
| 6 | + </div> | ||
| 5 | 7 | ||
| 6 | <div style="padding-left: 12px;margin: 20px 0"> | 8 | <div style="padding-left: 12px;margin: 20px 0"> |
| 7 | <ul class="uk-subnav uk-subnav-pill h-s-time"> | 9 | <ul class="uk-subnav uk-subnav-pill h-s-time"> |
src/main/resources/static/real_control_v2/fragments/north/nav/sch_edit_info/list.html
0 → 100644
| 1 | +<div class="uk-modal ct_move_modal" id="history-sch-edit-info-modal"> | ||
| 2 | + <div class="uk-modal-dialog" style="width: 1280px;"> | ||
| 3 | + <a href="" class="uk-modal-close uk-close"></a> | ||
| 4 | + <div class="uk-modal-header"> | ||
| 5 | + <h2>班次修正记录</h2> | ||
| 6 | + </div> | ||
| 7 | + | ||
| 8 | + <div style="padding-left: 12px;margin: 20px 0"> | ||
| 9 | + <ul class="uk-subnav uk-subnav-pill h-s-time"> | ||
| 10 | + </ul> | ||
| 11 | + </div> | ||
| 12 | + | ||
| 13 | + <div style="padding-left: 12px;"> | ||
| 14 | + <ul class="uk-subnav uk-subnav-pill h-s-line"> | ||
| 15 | + </ul> | ||
| 16 | + </div> | ||
| 17 | + | ||
| 18 | + <div class="uk-panel uk-panel-box uk-panel-box-primary"> | ||
| 19 | + <form class="uk-form search-form"> | ||
| 20 | + <fieldset data-uk-margin> | ||
| 21 | + <span class="horizontal-field">路牌</span> | ||
| 22 | + <select name="lpName" style="width: 80px;"></select> | ||
| 23 | + <span class="horizontal-field">上下行</span> | ||
| 24 | + <select name="xlDir"> | ||
| 25 | + <option value="">全部</option> | ||
| 26 | + <option value="0">上行</option> | ||
| 27 | + <option value="1">下行</option> | ||
| 28 | + </select> | ||
| 29 | + | ||
| 30 | + <span class="horizontal-field">车辆</span> | ||
| 31 | + <div class="uk-autocomplete uk-form autocomplete-cars"> | ||
| 32 | + <input type="text" name="clZbh" placeholder="车辆自编号"> | ||
| 33 | + </div> | ||
| 34 | + <span class="horizontal-field">驾驶员</span> | ||
| 35 | + <div class="uk-autocomplete uk-form autocomplete-jsy"> | ||
| 36 | + <input type="text" name="jGh" placeholder="驾驶员"> | ||
| 37 | + </div> | ||
| 38 | + <button class="uk-button">检索</button> | ||
| 39 | + | ||
| 40 | + <label style="float: right;font-size: 12px;color: #989797;"> | ||
| 41 | + <input type="checkbox" disabled> 显示系统修正记录 | ||
| 42 | + </label> | ||
| 43 | + </fieldset> | ||
| 44 | + </form> | ||
| 45 | + </div> | ||
| 46 | + | ||
| 47 | + <div class="ct_table_wrap ct_table_no_border edit-info-table-wrap" style="height: 510px;"> | ||
| 48 | + <div class="ct_table sch-edit-info-table"> | ||
| 49 | + <div class="ct_table_head"> | ||
| 50 | + <dl> | ||
| 51 | + <dt>序号</dt> | ||
| 52 | + <dt>路牌</dt> | ||
| 53 | + <dt>车辆</dt> | ||
| 54 | + <dt>驾驶员</dt> | ||
| 55 | + <dt>计发</dt> | ||
| 56 | + <dt>修正记录</dt> | ||
| 57 | + </dl> | ||
| 58 | + </div> | ||
| 59 | + <div class="ct_table_body"> | ||
| 60 | + </div> | ||
| 61 | + </div> | ||
| 62 | + </div> | ||
| 63 | + | ||
| 64 | + <div class="load-panel"> | ||
| 65 | + <i class="uk-icon-spinner uk-icon-spin"></i> | ||
| 66 | + 正在加载数据 | ||
| 67 | + </div> | ||
| 68 | + </div> | ||
| 69 | + | ||
| 70 | + <script id="history-sch-edit-info-temp" type="text/html"> | ||
| 71 | + {{each list as obj i}} | ||
| 72 | + <dl> | ||
| 73 | + <dd>{{i + 1}}</dd> | ||
| 74 | + <dd>{{obj.lpName}}</dd> | ||
| 75 | + <dd>{{obj.clZbh}}</dd> | ||
| 76 | + <dd>{{obj.jGh}}/{{obj.jName}}</dd> | ||
| 77 | + <dd>{{obj.fcsj}}</dd> | ||
| 78 | + <dd> | ||
| 79 | + {{each obj.editArray as e j}} | ||
| 80 | + <div class="ct-badge ct-badge-{{e.type}}" data-id="{{e.id}}"> | ||
| 81 | + {{e.timeStr}}{{e.typeStr}} | ||
| 82 | + </div> | ||
| 83 | + {{/each}} | ||
| 84 | + </dd> | ||
| 85 | + </dl> | ||
| 86 | + {{/each}} | ||
| 87 | + </script> | ||
| 88 | + | ||
| 89 | + <!-- 待发调整 tip --> | ||
| 90 | + <script id="edit-info-tip-dftz-temp" type="text/html"> | ||
| 91 | + <div class="edit-info-tip"> | ||
| 92 | + <p class="text">待发时间从 {{jsonArray.old}} 调整为 {{jsonArray.now}}</p> | ||
| 93 | + <p class="sub_text">调整人:{{user}} 调整时间:{{timeStr}}</p> | ||
| 94 | + {{if remarks!=null && remarks != ''}} | ||
| 95 | + <p class="sub_text">备注:{{remarks}}</p> | ||
| 96 | + {{/if}} | ||
| 97 | + </div> | ||
| 98 | + </script> | ||
| 99 | + | ||
| 100 | + <!-- 实发调整 --> | ||
| 101 | + <script id="edit-info-tip-sftz-temp" type="text/html"> | ||
| 102 | + <div class="edit-info-tip"> | ||
| 103 | + <p class="text">实发时间由 {{jsonArray.old==null?'无':jsonArray.old}} 调整为 {{jsonArray.now}}</p> | ||
| 104 | + <p class="sub_text">调整人:{{user}} 调整时间:{{timeStr}}</p> | ||
| 105 | + {{if remarks!=null && remarks != ''}} | ||
| 106 | + <p class="sub_text">备注:{{remarks}}</p> | ||
| 107 | + {{/if}} | ||
| 108 | + </div> | ||
| 109 | + </script> | ||
| 110 | + | ||
| 111 | + | ||
| 112 | + <!-- 发车信息微调 tip --> | ||
| 113 | + <script id="edit-info-tip-fcxxwt-temp" type="text/html"> | ||
| 114 | + <div class="edit-info-tip"> | ||
| 115 | + {{each jsonArray as obj i}} | ||
| 116 | + <p class="text">{{obj.title}} 由 {{obj.old==null?'无':obj.old}} 调整为 {{obj.now}}</p> | ||
| 117 | + {{/each}} | ||
| 118 | + <p class="sub_text">调整人:{{user}} 调整时间:{{timeStr}}</p> | ||
| 119 | + {{if remarks!=null && remarks != ''}} | ||
| 120 | + <p class="sub_text">备注:{{remarks}}</p> | ||
| 121 | + {{/if}} | ||
| 122 | + </div> | ||
| 123 | + </script> | ||
| 124 | + | ||
| 125 | + <!-- 撤销实发tip --> | ||
| 126 | + <script id="edit-info-tip-cxsf-temp" type="text/html"> | ||
| 127 | + <div class="edit-info-tip"> | ||
| 128 | + <p class="text">将实发时间 {{jsonArray.old_sfsj}} 撤销</p> | ||
| 129 | + <p class="sub_text">调整人:{{user}} 调整时间:{{timeStr}}</p> | ||
| 130 | + {{if remarks!=null && remarks != ''}} | ||
| 131 | + <p class="sub_text">备注:{{remarks}}</p> | ||
| 132 | + {{/if}} | ||
| 133 | + </div> | ||
| 134 | + </script> | ||
| 135 | + | ||
| 136 | + <!-- 撤销执行 --> | ||
| 137 | + <script id="edit-info-tip-cxzx-temp" type="text/html"> | ||
| 138 | + <div class="edit-info-tip"> | ||
| 139 | + {{if jsonArray.old_sfsj != null}} | ||
| 140 | + <p class="text">将实发时间 {{jsonArray.old_sfsj}} 撤销</p> | ||
| 141 | + {{/if}} | ||
| 142 | + {{if jsonArray.old_sdsj != null}} | ||
| 143 | + <p class="text">将实达时间 {{jsonArray.old_sdsj}} 撤销</p> | ||
| 144 | + {{/if}} | ||
| 145 | + <p class="sub_text">调整人:{{user}} 调整时间:{{timeStr}}</p> | ||
| 146 | + {{if remarks!=null && remarks != ''}} | ||
| 147 | + <p class="sub_text">备注:{{remarks}}</p> | ||
| 148 | + {{/if}} | ||
| 149 | + </div> | ||
| 150 | + </script> | ||
| 151 | + | ||
| 152 | + <!-- 调整人车 --> | ||
| 153 | + <script id="edit-info-tip-tzrc-temp" type="text/html"> | ||
| 154 | + <div class="edit-info-tip"> | ||
| 155 | + {{if jsonArray.now_jsy != null}} | ||
| 156 | + <p class="text">驾驶员从 {{jsonArray.old_jsy}} 调整为 {{jsonArray.now_jsy}}</p> | ||
| 157 | + {{/if}} | ||
| 158 | + {{if jsonArray.now_nbbm != null}} | ||
| 159 | + <p class="text">车辆从 {{jsonArray.old_nbbm}} 调整为 {{jsonArray.now_nbbm}}</p> | ||
| 160 | + {{/if}} | ||
| 161 | + {{if jsonArray.now_spy != null}} | ||
| 162 | + <p class="text">售票员从 {{jsonArray.old_spy}} 调整为 {{jsonArray.now_spy}}</p> | ||
| 163 | + {{/if}} | ||
| 164 | + | ||
| 165 | + <p class="sub_text">调整人:{{user}} 调整时间:{{timeStr}}</p> | ||
| 166 | + {{if remarks!=null && remarks != ''}} | ||
| 167 | + <p class="sub_text">备注:{{remarks}}</p> | ||
| 168 | + {{/if}} | ||
| 169 | + </div> | ||
| 170 | + </script> | ||
| 171 | + | ||
| 172 | + <script> | ||
| 173 | + (function () { | ||
| 174 | + var modal = '#history-sch-edit-info-modal'; | ||
| 175 | + var etInfos={};//id映射 | ||
| 176 | + | ||
| 177 | + //滚动条 | ||
| 178 | + //$('.history-sch-wrap', modal).perfectScrollbar({suppressScrollX: true}); | ||
| 179 | + //history-sch-wrap | ||
| 180 | + $(modal).on('init', function (e, data) { | ||
| 181 | + e.stopPropagation(); | ||
| 182 | + $.get('/realSchedule/dateArray?c=1', function (rs) { | ||
| 183 | + //日期tab | ||
| 184 | + var tsStr = ''; | ||
| 185 | + $.each(rs, function (i) { | ||
| 186 | + tsStr += '<li ' + (i == 0 ? 'class="uk-active"' : '') + '><a>' + this + '</a></li>'; | ||
| 187 | + }); | ||
| 188 | + $('.h-s-time', modal).html(tsStr); | ||
| 189 | + | ||
| 190 | + //线路tab | ||
| 191 | + var xlStr = ''; | ||
| 192 | + $.each(gb_data_basic.activeLines, function (i) { | ||
| 193 | + xlStr += '<li ' + (i == 0 ? 'class="uk-active"' : '') + ' data-id="' + this.lineCode + '"><a>' + this.name + '</a></li>'; | ||
| 194 | + }); | ||
| 195 | + $('.h-s-line', modal).html(xlStr); | ||
| 196 | + | ||
| 197 | + clearLpSelect(); | ||
| 198 | + //reLoadLp=true; | ||
| 199 | + jsQuery(); | ||
| 200 | + }); | ||
| 201 | + }); | ||
| 202 | + | ||
| 203 | + $(modal).on('refresh', jsQuery); | ||
| 204 | + | ||
| 205 | + $(modal).on('click', '.h-s-time li,.h-s-line li', function () { | ||
| 206 | + if(loading) | ||
| 207 | + return; | ||
| 208 | + $(this).parent().find('li.uk-active').removeClass('uk-active'); | ||
| 209 | + $(this).addClass('uk-active'); | ||
| 210 | + clearLpSelect(); | ||
| 211 | + //检索之前将滚动条置顶 | ||
| 212 | + $('.edit-info-table-wrap', modal)[0].scrollTop = 0; | ||
| 213 | + jsQuery(); | ||
| 214 | + }); | ||
| 215 | + | ||
| 216 | + $('.search-form', modal).on('submit', function (e) { | ||
| 217 | + try { | ||
| 218 | + //检索之前将滚动条置顶 | ||
| 219 | + $('.edit-info-table-wrap', modal)[0].scrollTop = 0; | ||
| 220 | + jsQuery(); | ||
| 221 | + }catch(e){ | ||
| 222 | + console.log(e); | ||
| 223 | + } | ||
| 224 | + return false; | ||
| 225 | + }); | ||
| 226 | + | ||
| 227 | + var reLoadLp; | ||
| 228 | + var nbbmArray,jsyArray,lpArray,loading; | ||
| 229 | + function jsQuery() { | ||
| 230 | + var data = $('.search-form', modal).serializeJSON(); | ||
| 231 | + var rq = $('.h-s-time li.uk-active', modal).text(), | ||
| 232 | + lineCode = $('.h-s-line li.uk-active', modal).data('id'); | ||
| 233 | + data.rq = rq; | ||
| 234 | + data.lineCode = lineCode; | ||
| 235 | + if(data.jGh.indexOf('/')!=-1){ | ||
| 236 | + var jsy=data.jGh.split('/'); | ||
| 237 | + data.jGh=jsy[0]; | ||
| 238 | + data.jName=jsy[1]; | ||
| 239 | + } | ||
| 240 | + | ||
| 241 | + $('.load-panel', modal).show(); | ||
| 242 | + loading=true; | ||
| 243 | + gb_common.$get('/schEditInfo/_list', data, function (rs) { | ||
| 244 | + etInfos = {}; | ||
| 245 | + $.each(rs.list, function () { | ||
| 246 | + this.jsonArray = JSON.parse(this.jsonArray); | ||
| 247 | + etInfos[this.id] = this; | ||
| 248 | + }); | ||
| 249 | + //根据班次ID合并修正操作 | ||
| 250 | + var list = mergeData(rs.list).sort(sortFun); | ||
| 251 | + | ||
| 252 | + var htmlStr = template('history-sch-edit-info-temp', {list: list}); | ||
| 253 | + | ||
| 254 | + $('.sch-edit-info-table .ct_table_body', modal).html(htmlStr); | ||
| 255 | + $('.load-panel', modal).hide(); | ||
| 256 | + loading=false; | ||
| 257 | + }); | ||
| 258 | + } | ||
| 259 | + | ||
| 260 | + function clearLpSelect() { | ||
| 261 | + $('[name=lpName_eq]', modal).val('').html(''); | ||
| 262 | + reLoadLp = true; | ||
| 263 | + } | ||
| 264 | + | ||
| 265 | + //nbbm autocomplete | ||
| 266 | + var carAutoCom=$('.autocomplete-cars', modal); | ||
| 267 | + UIkit.autocomplete(carAutoCom, { | ||
| 268 | + minLength: 1, | ||
| 269 | + delay: 50, | ||
| 270 | + source: function(release) { | ||
| 271 | + var q = $('input', carAutoCom).val().toUpperCase() | ||
| 272 | + ,rs = [], | ||
| 273 | + count = 0; | ||
| 274 | + $.each(nbbmArray, function () { | ||
| 275 | + if(this.value.indexOf(q) != -1){ | ||
| 276 | + rs.push(this); | ||
| 277 | + count++; | ||
| 278 | + } | ||
| 279 | + if (count >= 15) | ||
| 280 | + return false; | ||
| 281 | + }); | ||
| 282 | + release && release(rs); | ||
| 283 | + } | ||
| 284 | + }); | ||
| 285 | + | ||
| 286 | + //jsy autocomplete | ||
| 287 | + var jsyAutoCom=$('.autocomplete-jsy', modal); | ||
| 288 | + UIkit.autocomplete(jsyAutoCom, { | ||
| 289 | + minLength: 1, | ||
| 290 | + delay: 50, | ||
| 291 | + source: function(release) { | ||
| 292 | + var q = $('input', jsyAutoCom).val().toUpperCase() | ||
| 293 | + ,rs = [], | ||
| 294 | + count = 0; | ||
| 295 | + | ||
| 296 | + $.each(jsyArray, function() { | ||
| 297 | + if (this.value.indexOf(q) != -1 || this.fullChars.indexOf(q) != -1 || this.camelChars.indexOf(q) != -1){ | ||
| 298 | + rs.push(this); | ||
| 299 | + count++; | ||
| 300 | + } | ||
| 301 | + | ||
| 302 | + if (count >= 10) | ||
| 303 | + return false; | ||
| 304 | + }); | ||
| 305 | + release && release(rs); | ||
| 306 | + } | ||
| 307 | + }); | ||
| 308 | + | ||
| 309 | + function distinctByField(arr, f){ | ||
| 310 | + if(!f) | ||
| 311 | + f = 'value'; | ||
| 312 | + var rs = {}; | ||
| 313 | + $.each(arr, function () { | ||
| 314 | + rs[this[f]]=this; | ||
| 315 | + }); | ||
| 316 | + return gb_common.get_vals(rs); | ||
| 317 | + } | ||
| 318 | + | ||
| 319 | + function mergeData(list) { | ||
| 320 | + var rs = {}; | ||
| 321 | + $.each(list, function () { | ||
| 322 | + if(rs[this.schId]){ | ||
| 323 | + rs[this.schId]['editArray'].push(subData(this)); | ||
| 324 | + } | ||
| 325 | + else{ | ||
| 326 | + rs[this.schId] = { | ||
| 327 | + schId: this.schId, | ||
| 328 | + clZbh: this.clZbh, | ||
| 329 | + fcsj: this.fcsj, | ||
| 330 | + gsbm: this.gsbm, | ||
| 331 | + fgsbm: this.fgsbm, | ||
| 332 | + lineCode: this.lineCode, | ||
| 333 | + lpName: this.lpName, | ||
| 334 | + jGh: this.jGh, | ||
| 335 | + jName: this.jName, | ||
| 336 | + realExecDate: this.realExecDate, | ||
| 337 | + editArray: [subData(this)] | ||
| 338 | + } | ||
| 339 | + } | ||
| 340 | + }); | ||
| 341 | + return gb_common.get_vals(rs); | ||
| 342 | + } | ||
| 343 | + | ||
| 344 | + var types = {'DFTZ': '待发调整', 'FCXXWT':'发车信息微调', 'JHLB': '计划烂班', 'CXLB': '撤销烂班', 'CXZX': '撤销执行', 'CXSF': '撤销实发', 'SFTZ': '实发调整', 'TZRC': '调整人车'}; | ||
| 345 | + function subData(data){ | ||
| 346 | + return { | ||
| 347 | + id: data.id, | ||
| 348 | + type: data.type, | ||
| 349 | + typeStr: types[data.type]?types[data.type]:data.type, | ||
| 350 | + type2: data.type2, | ||
| 351 | + user: data.user, | ||
| 352 | + jsonArray: data.jsonArray, | ||
| 353 | + remarks: data.remarks, | ||
| 354 | + timeStr: data.timeStr | ||
| 355 | + } | ||
| 356 | + } | ||
| 357 | + gb_ct_table.fixedHead($('.ct_table_wrap', modal)); | ||
| 358 | + | ||
| 359 | + | ||
| 360 | + /** | ||
| 361 | + * 鼠标悬停、显示详细 | ||
| 362 | + */ | ||
| 363 | + var _opts = { | ||
| 364 | + show:{ready: true, delay: 300}, | ||
| 365 | + position: {viewport: $(window), my: 'top center', at: 'bottom center'}, | ||
| 366 | + hide: {fixed: true, delay: 300}, | ||
| 367 | + events: { | ||
| 368 | + hidden: function(event, api) { | ||
| 369 | + $(this).qtip('destroy', true); | ||
| 370 | + } | ||
| 371 | + } | ||
| 372 | + }; | ||
| 373 | + //待发调整tip | ||
| 374 | + $(modal).on('mouseenter', '.ct-badge.ct-badge-DFTZ', function() { | ||
| 375 | + $(this).qtip({ | ||
| 376 | + show: _opts.show, | ||
| 377 | + content: { | ||
| 378 | + title: '待发调整', | ||
| 379 | + text: function() { | ||
| 380 | + var obj = etInfos[$(this).data('id')]; | ||
| 381 | + return template('edit-info-tip-dftz-temp', obj); | ||
| 382 | + } | ||
| 383 | + }, | ||
| 384 | + position: _opts.position, | ||
| 385 | + style: { | ||
| 386 | + classes: 'qtip-green qtip-rounded qtip-shadow sch-badge-tip' | ||
| 387 | + }, | ||
| 388 | + hide: _opts.hide, | ||
| 389 | + events: _opts.events | ||
| 390 | + }); | ||
| 391 | + }); | ||
| 392 | + | ||
| 393 | + //实发调整tip | ||
| 394 | + $(modal).on('mouseenter', '.ct-badge.ct-badge-SFTZ', function() { | ||
| 395 | + $(this).qtip({ | ||
| 396 | + show: _opts.show, | ||
| 397 | + content: { | ||
| 398 | + title: '实发调整', | ||
| 399 | + text: function() { | ||
| 400 | + var obj = etInfos[$(this).data('id')]; | ||
| 401 | + return template('edit-info-tip-sftz-temp', obj); | ||
| 402 | + } | ||
| 403 | + }, | ||
| 404 | + position: _opts.position, | ||
| 405 | + style: { | ||
| 406 | + classes: 'qtip-green qtip-rounded qtip-shadow sch-badge-tip' | ||
| 407 | + }, | ||
| 408 | + hide: _opts.hide, | ||
| 409 | + events: _opts.events | ||
| 410 | + }); | ||
| 411 | + }); | ||
| 412 | + | ||
| 413 | + //发车信息微调tip | ||
| 414 | + $(modal).on('mouseenter', '.ct-badge.ct-badge-FCXXWT', function() { | ||
| 415 | + $(this).qtip({ | ||
| 416 | + show: _opts.show, | ||
| 417 | + content: { | ||
| 418 | + title: '发车信息微调', | ||
| 419 | + text: function() { | ||
| 420 | + var obj = etInfos[$(this).data('id')]; | ||
| 421 | + return template('edit-info-tip-fcxxwt-temp', obj); | ||
| 422 | + } | ||
| 423 | + }, | ||
| 424 | + position: _opts.position, | ||
| 425 | + style: { | ||
| 426 | + classes: 'qtip-blue qtip-rounded qtip-shadow sch-badge-tip' | ||
| 427 | + }, | ||
| 428 | + hide: _opts.hide, | ||
| 429 | + events: _opts.events | ||
| 430 | + }); | ||
| 431 | + }); | ||
| 432 | + | ||
| 433 | + //撤销实发tip | ||
| 434 | + $(modal).on('mouseenter', '.ct-badge.ct-badge-CXSF', function() { | ||
| 435 | + $(this).qtip({ | ||
| 436 | + show: _opts.show, | ||
| 437 | + content: { | ||
| 438 | + title: '撤销实发', | ||
| 439 | + text: function() { | ||
| 440 | + var obj = etInfos[$(this).data('id')]; | ||
| 441 | + return template('edit-info-tip-cxsf-temp', obj); | ||
| 442 | + } | ||
| 443 | + }, | ||
| 444 | + position: _opts.position, | ||
| 445 | + style: { | ||
| 446 | + classes: 'qtip-light qtip-rounded qtip-shadow sch-badge-tip' | ||
| 447 | + }, | ||
| 448 | + hide: _opts.hide, | ||
| 449 | + events: _opts.events | ||
| 450 | + }); | ||
| 451 | + }); | ||
| 452 | + | ||
| 453 | + //撤销执行tip | ||
| 454 | + $(modal).on('mouseenter', '.ct-badge.ct-badge-CXZX', function() { | ||
| 455 | + $(this).qtip({ | ||
| 456 | + show: _opts.show, | ||
| 457 | + content: { | ||
| 458 | + title: '撤销执行', | ||
| 459 | + text: function() { | ||
| 460 | + var obj = etInfos[$(this).data('id')]; | ||
| 461 | + return template('edit-info-tip-cxzx-temp', obj); | ||
| 462 | + } | ||
| 463 | + }, | ||
| 464 | + position: _opts.position, | ||
| 465 | + style: { | ||
| 466 | + classes: 'qtip-light qtip-rounded qtip-shadow sch-badge-tip' | ||
| 467 | + }, | ||
| 468 | + hide: _opts.hide, | ||
| 469 | + events: _opts.events | ||
| 470 | + }); | ||
| 471 | + }); | ||
| 472 | + | ||
| 473 | + //计划烂班tip | ||
| 474 | + $(modal).on('mouseenter', '.ct-badge.ct-badge-JHLB', function() { | ||
| 475 | + $(this).qtip({ | ||
| 476 | + show: _opts.show, | ||
| 477 | + content: { | ||
| 478 | + text: function() { | ||
| 479 | + var obj = etInfos[$(this).data('id')]; | ||
| 480 | + return obj.remarks; | ||
| 481 | + } | ||
| 482 | + }, | ||
| 483 | + position: _opts.position, | ||
| 484 | + style: { | ||
| 485 | + classes: 'qtip-red qtip-rounded qtip-shadow sch-badge-tip' | ||
| 486 | + }, | ||
| 487 | + hide: _opts.hide, | ||
| 488 | + events: _opts.events | ||
| 489 | + }); | ||
| 490 | + }); | ||
| 491 | + | ||
| 492 | + //调整人车tip | ||
| 493 | + $(modal).on('mouseenter', '.ct-badge.ct-badge-TZRC', function() { | ||
| 494 | + $(this).qtip({ | ||
| 495 | + show: _opts.show, | ||
| 496 | + content: { | ||
| 497 | + title: '调整人车', | ||
| 498 | + text: function() { | ||
| 499 | + var obj = etInfos[$(this).data('id')]; | ||
| 500 | + console.log('obj', obj); | ||
| 501 | + return template('edit-info-tip-tzrc-temp', obj); | ||
| 502 | + } | ||
| 503 | + }, | ||
| 504 | + position: _opts.position, | ||
| 505 | + style: { | ||
| 506 | + classes: 'qtip-rounded qtip-shadow sch-badge-tip' | ||
| 507 | + }, | ||
| 508 | + hide: _opts.hide, | ||
| 509 | + events: _opts.events | ||
| 510 | + }); | ||
| 511 | + }); | ||
| 512 | + | ||
| 513 | + | ||
| 514 | + function sortFun(a, b) { | ||
| 515 | + return (a.realExecDate + a.fcsj).localeCompare(b.realExecDate + b.fcsj); | ||
| 516 | + } | ||
| 517 | + })(); | ||
| 518 | + </script> | ||
| 519 | +</div> | ||
| 0 | \ No newline at end of file | 520 | \ No newline at end of file |
src/main/resources/static/real_control_v2/js/data/json/north_toolbar.json
src/main/resources/static/real_control_v2/js/north/toolbar.js
| @@ -228,6 +228,9 @@ var gb_northToolbar = (function () { | @@ -228,6 +228,9 @@ var gb_northToolbar = (function () { | ||
| 228 | }, | 228 | }, |
| 229 | data_move_and_verification: function () { | 229 | data_move_and_verification: function () { |
| 230 | open_modal('/real_control_v2/fragments/north/nav/dataManager/dataMoveAndVerification.html', {}, modal_opts); | 230 | open_modal('/real_control_v2/fragments/north/nav/dataManager/dataMoveAndVerification.html', {}, modal_opts); |
| 231 | + }, | ||
| 232 | + sch_edit_info: function () { | ||
| 233 | + open_modal('/real_control_v2/fragments/north/nav/sch_edit_info/list.html', {}, modal_opts); | ||
| 231 | } | 234 | } |
| 232 | }; | 235 | }; |
| 233 | 236 |