Commit e3e011f6e8090925f9d3c15ad56fc9662947824b
1 parent
f92fbfdb
1
Showing
5 changed files
with
17 additions
and
6 deletions
src/main/java/com/bsth/data/zndd/AutomaticSch.java
| @@ -189,7 +189,7 @@ public class AutomaticSch { | @@ -189,7 +189,7 @@ public class AutomaticSch { | ||
| 189 | // 发车误点 | 189 | // 发车误点 |
| 190 | if (t.getFcsj() != null && t.getFcsjActual() != null && t.getBcType().equals("normal") && t.getRemarks() == null){ | 190 | if (t.getFcsj() != null && t.getFcsjActual() != null && t.getBcType().equals("normal") && t.getRemarks() == null){ |
| 191 | Long sst = ((t.getFcsjActualTime() - t.getFcsjT()) / 1000 / 60); | 191 | Long sst = ((t.getFcsjActualTime() - t.getFcsjT()) / 1000 / 60); |
| 192 | - Long dfsj = t.getDfsjT() / 1000 ; | 192 | + Long fcsj = t.getFcsjT() / 1000 ; |
| 193 | Long sfsj = t.getFcsjActualTime() / 1000; | 193 | Long sfsj = t.getFcsjActualTime() / 1000; |
| 194 | //获取车辆状态 gps没有的情况下,或者车辆状态异常的情况 | 194 | //获取车辆状态 gps没有的情况下,或者车辆状态异常的情况 |
| 195 | //判定gps发送时间和现在时间作对比 | 195 | //判定gps发送时间和现在时间作对比 |
| @@ -202,13 +202,13 @@ public class AutomaticSch { | @@ -202,13 +202,13 @@ public class AutomaticSch { | ||
| 202 | (gps.getAbnormalStatus() != null && gps.getAbnormalStatus().equals("offline"))){ | 202 | (gps.getAbnormalStatus() != null && gps.getAbnormalStatus().equals("offline"))){ |
| 203 | //实发快一慢三 | 203 | //实发快一慢三 |
| 204 | /* if (sst <= 3 && sst >= -1){*/ | 204 | /* if (sst <= 3 && sst >= -1){*/ |
| 205 | - if(dfsj.equals(sfsj)) | 205 | + if(fcsj.equals(sfsj)) |
| 206 | continue; | 206 | continue; |
| 207 | //快1 | 207 | //快1 |
| 208 | - if(sfsj < dfsj && dfsj - sfsj <= 60*4) | 208 | + if(sfsj < fcsj && fcsj - sfsj <= 60 * 1) |
| 209 | continue; | 209 | continue; |
| 210 | //慢3 | 210 | //慢3 |
| 211 | - if(dfsj < sfsj && sfsj - dfsj <= 60 *6) | 211 | + if(fcsj < sfsj && sfsj - fcsj <= 60 *3) |
| 212 | continue; | 212 | continue; |
| 213 | 213 | ||
| 214 | 214 |
src/main/java/com/bsth/repository/realcontrol/ScheduleRealInfoRepository.java
| @@ -252,4 +252,13 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | @@ -252,4 +252,13 @@ public interface ScheduleRealInfoRepository extends BaseRepository<ScheduleRealI | ||
| 252 | @Query(value = "select r.xl_bm as line,r.cl_zbh as nbbm,r.j_gh as jGh,r.s_gh as sGh from bsth_c_s_sp_info_real r where r.schedule_date_str BETWEEN ?1 and ?2 " + | 252 | @Query(value = "select r.xl_bm as line,r.cl_zbh as nbbm,r.j_gh as jGh,r.s_gh as sGh from bsth_c_s_sp_info_real r where r.schedule_date_str BETWEEN ?1 and ?2 " + |
| 253 | "and if( ?3 is not null , r.xl_bm = ?3 , r.gs_bm = ?4 and r.fgs_bm =?5) group by r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh", nativeQuery = true) | 253 | "and if( ?3 is not null , r.xl_bm = ?3 , r.gs_bm = ?4 and r.fgs_bm =?5) group by r.xl_bm,r.cl_zbh,r.j_gh,r.s_gh", nativeQuery = true) |
| 254 | List<Map<String, Object>> querySchedule2(String date1, String date2,String line ,String gsdm ,String fgsdm); | 254 | List<Map<String, Object>> querySchedule2(String date1, String date2,String line ,String gsdm ,String fgsdm); |
| 255 | + | ||
| 256 | + /** | ||
| 257 | + * 根据日期获取班次信息 | ||
| 258 | + * @param schDate | ||
| 259 | + * @return | ||
| 260 | + */ | ||
| 261 | + @EntityGraph(value = "scheduleRealInfo_cTasks", type = EntityGraph.EntityGraphType.FETCH) | ||
| 262 | + @Query("select DISTINCT s from ScheduleRealInfo s where s.scheduleDateStr=?1") | ||
| 263 | + List<ScheduleRealInfo> findAllSchDate(String schDate); | ||
| 255 | } | 264 | } |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -1623,6 +1623,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1623,6 +1623,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1623 | String text = sch.getFcsj()+"的班次进行了实发调整"; | 1623 | String text = sch.getFcsj()+"的班次进行了实发调整"; |
| 1624 | lz.setText(text); | 1624 | lz.setText(text); |
| 1625 | lz.setCreateBy(SecurityUtils.getCurrentUser().getId()); | 1625 | lz.setCreateBy(SecurityUtils.getCurrentUser().getId()); |
| 1626 | + lz.setCreateDate(new Date()); | ||
| 1626 | loggerZnddRepository.save(lz); | 1627 | loggerZnddRepository.save(lz); |
| 1627 | 1628 | ||
| 1628 | //通知页面刷新 | 1629 | //通知页面刷新 |
| @@ -1723,6 +1724,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1723,6 +1724,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1723 | String text = sch.getFcsj()+"的班次进行了实发撤销调整"; | 1724 | String text = sch.getFcsj()+"的班次进行了实发撤销调整"; |
| 1724 | lz.setText(text); | 1725 | lz.setText(text); |
| 1725 | lz.setCreateBy(SecurityUtils.getCurrentUser().getId()); | 1726 | lz.setCreateBy(SecurityUtils.getCurrentUser().getId()); |
| 1727 | + lz.setCreateDate(new Date()); | ||
| 1726 | loggerZnddRepository.save(lz); | 1728 | loggerZnddRepository.save(lz); |
| 1727 | } | 1729 | } |
| 1728 | } catch (Exception e) { | 1730 | } catch (Exception e) { |
src/main/resources/static/real_control_v2/zndd/type/sftz_1.html
| @@ -40,7 +40,7 @@ | @@ -40,7 +40,7 @@ | ||
| 40 | 40 | ||
| 41 | gb_common.$post('/realSchedule/realOutAdjust_zndd', { | 41 | gb_common.$post('/realSchedule/realOutAdjust_zndd', { |
| 42 | id: sch.sch.id, | 42 | id: sch.sch.id, |
| 43 | - remarks:"_智能调度-实发调整", | 43 | + remarks:"_自动调度实发调整-车辆掉线", |
| 44 | fcsjActual:data.fcsjActual, | 44 | fcsjActual:data.fcsjActual, |
| 45 | }, function (rs) { | 45 | }, function (rs) { |
| 46 | gb_schedule_table.updateSchedule(rs.ts); | 46 | gb_schedule_table.updateSchedule(rs.ts); |
src/main/resources/static/real_control_v2/zndd/type/ycsf.html
| @@ -242,7 +242,7 @@ | @@ -242,7 +242,7 @@ | ||
| 242 | <div class="uk-form-row"> | 242 | <div class="uk-form-row"> |
| 243 | <label class="uk-form-label">备注</label> | 243 | <label class="uk-form-label">备注</label> |
| 244 | <div class="uk-form-controls"> | 244 | <div class="uk-form-controls"> |
| 245 | - <input value="{{sch.remarks}}_智能调度-异常实发" disabled> | 245 | + <input value="{{sch.remarks}}_智能调度-异常实发" name ="remarks"> |
| 246 | </div> | 246 | </div> |
| 247 | </div> | 247 | </div> |
| 248 | </div> | 248 | </div> |