Commit 79ca90c3dd42e2fa4c08eb8a0af0a24666907c96
1 parent
c3bea204
update
Showing
4 changed files
with
9 additions
and
4 deletions
src/main/java/com/bsth/data/schedule/DayOfSchedule.java
| @@ -46,7 +46,7 @@ public class DayOfSchedule implements CommandLineRunner { | @@ -46,7 +46,7 @@ public class DayOfSchedule implements CommandLineRunner { | ||
| 46 | 46 | ||
| 47 | Logger logger = LoggerFactory.getLogger(this.getClass()); | 47 | Logger logger = LoggerFactory.getLogger(this.getClass()); |
| 48 | 48 | ||
| 49 | - //按线路分组的 “计划” 排班数据 | 49 | + //按线路分组的 “原始计划” 排班数据 |
| 50 | public static Map<String, List<SchedulePlanInfo>> schedulePlanMap; | 50 | public static Map<String, List<SchedulePlanInfo>> schedulePlanMap; |
| 51 | 51 | ||
| 52 | // 按车辆分组的班次数据 | 52 | // 按车辆分组的班次数据 |
src/main/java/com/bsth/entity/realcontrol/ScheduleRealInfo.java
| @@ -463,6 +463,9 @@ public class ScheduleRealInfo { | @@ -463,6 +463,9 @@ public class ScheduleRealInfo { | ||
| 463 | 463 | ||
| 464 | public void setJhlc(Double jhlc) { | 464 | public void setJhlc(Double jhlc) { |
| 465 | this.jhlc = jhlc; | 465 | this.jhlc = jhlc; |
| 466 | + //临加班次 计划公里 和 实际计划公里一样 | ||
| 467 | + if(this.isSflj()) | ||
| 468 | + this.setJhlcOrig(this.getJhlc()); | ||
| 466 | } | 469 | } |
| 467 | 470 | ||
| 468 | public String getSjlc() { | 471 | public String getSjlc() { |
src/main/java/com/bsth/repository/sys/DutyEmployeeRepository.java
| @@ -13,6 +13,7 @@ import java.util.List; | @@ -13,6 +13,7 @@ import java.util.List; | ||
| 13 | @Repository | 13 | @Repository |
| 14 | public interface DutyEmployeeRepository extends BaseRepository<DutyEmployee, Long>{ | 14 | public interface DutyEmployeeRepository extends BaseRepository<DutyEmployee, Long>{ |
| 15 | 15 | ||
| 16 | - @Query("select t from DutyEmployee t where t.codeIdx like %?1% and t.ts > ?2 and t.ts < ?3") | 16 | + //@Query("select t from DutyEmployee t where t.codeIdx like %?1% and t.ts > ?2 and t.ts < ?3") |
| 17 | + @Query("select t from DutyEmployee t where t.codeIdx like %?1% and t.ts < ?3") | ||
| 17 | List<DutyEmployee> findByLineAndTime(String lineCode, long st, long et); | 18 | List<DutyEmployee> findByLineAndTime(String lineCode, long st, long et); |
| 18 | } | 19 | } |
src/main/java/com/bsth/service/realcontrol/impl/ScheduleRealInfoServiceImpl.java
| @@ -341,7 +341,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -341,7 +341,7 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 341 | t.setLate(false); | 341 | t.setLate(false); |
| 342 | t.setDfsj(t.getFcsj()); | 342 | t.setDfsj(t.getFcsj()); |
| 343 | t.setZdsjT(sdfyyyyMMddHHmm.parse(schDate + t.getZdsj()).getTime()); | 343 | t.setZdsjT(sdfyyyyMMddHHmm.parse(schDate + t.getZdsj()).getTime()); |
| 344 | - | 344 | + t.setJhlcOrig(t.getJhlc()); |
| 345 | 345 | ||
| 346 | //班次历时 | 346 | //班次历时 |
| 347 | t.setBcsj(DateUtils.calcHHmmDiff(t.getFcsj(), t.getZdsj()) / 1000 / 60); | 347 | t.setBcsj(DateUtils.calcHHmmDiff(t.getFcsj(), t.getZdsj()) / 1000 / 60); |
| @@ -1066,8 +1066,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | @@ -1066,8 +1066,9 @@ public class ScheduleRealInfoServiceImpl extends BaseServiceImpl<ScheduleRealInf | ||
| 1066 | if (StringUtils.isNotEmpty(jhlc)) { | 1066 | if (StringUtils.isNotEmpty(jhlc)) { |
| 1067 | if(Double.parseDouble(jhlc) == 0 && sch.getJhlcOrig() != 0) | 1067 | if(Double.parseDouble(jhlc) == 0 && sch.getJhlcOrig() != 0) |
| 1068 | destroy(sch.getId() + "", "", map.get("adjustExps").toString()); | 1068 | destroy(sch.getId() + "", "", map.get("adjustExps").toString()); |
| 1069 | - else | 1069 | + else{ |
| 1070 | sch.setJhlc(Double.parseDouble(jhlc)); | 1070 | sch.setJhlc(Double.parseDouble(jhlc)); |
| 1071 | + } | ||
| 1071 | } | 1072 | } |
| 1072 | } | 1073 | } |
| 1073 | 1074 |