Commit 6b4e6d80a671368e459e684c31799f86a54c8cfc
1 parent
7347716c
Update
Showing
2 changed files
with
35 additions
and
3 deletions
src/main/java/com/bsth/entity/schedule/SchedulePlanInfo.java
| @@ -2,6 +2,7 @@ package com.bsth.entity.schedule; | @@ -2,6 +2,7 @@ package com.bsth.entity.schedule; | ||
| 2 | 2 | ||
| 3 | import com.bsth.entity.Line; | 3 | import com.bsth.entity.Line; |
| 4 | import com.bsth.entity.sys.SysUser; | 4 | import com.bsth.entity.sys.SysUser; |
| 5 | +import com.bsth.service.schedule.rules.rerun.RerunRule_input; | ||
| 5 | import com.bsth.service.schedule.rules.shiftloop.ScheduleResult_output; | 6 | import com.bsth.service.schedule.rules.shiftloop.ScheduleResult_output; |
| 6 | import org.apache.commons.lang3.StringUtils; | 7 | import org.apache.commons.lang3.StringUtils; |
| 7 | 8 | ||
| @@ -164,7 +165,20 @@ public class SchedulePlanInfo { | @@ -164,7 +165,20 @@ public class SchedulePlanInfo { | ||
| 164 | 165 | ||
| 165 | public SchedulePlanInfo() {} | 166 | public SchedulePlanInfo() {} |
| 166 | 167 | ||
| 167 | - public void setRerunInfo(CarConfigInfo cc, EmployeeConfigInfo ec) { | 168 | + // 对应班车套跑 |
| 169 | + public void setRerunInfoDybc(RerunRule_input rerunRule_input) { | ||
| 170 | + this.cl = rerunRule_input.getCl(); | ||
| 171 | + this.clZbh = rerunRule_input.getZbh(); | ||
| 172 | + this.j = rerunRule_input.getJ(); | ||
| 173 | + this.jGh = rerunRule_input.getJgh(); | ||
| 174 | + this.jName = rerunRule_input.getJname(); | ||
| 175 | + this.s = rerunRule_input.getS(); | ||
| 176 | + this.sGh = rerunRule_input.getSgh(); | ||
| 177 | + this.sName = rerunRule_input.getSname(); | ||
| 178 | + } | ||
| 179 | + | ||
| 180 | + // 对应路牌套跑 | ||
| 181 | + public void setRerunInfoDylp(CarConfigInfo cc, EmployeeConfigInfo ec) { | ||
| 168 | // 关联的车辆信息 | 182 | // 关联的车辆信息 |
| 169 | this.cl = cc.getCl().getId(); // 车辆id | 183 | this.cl = cc.getCl().getId(); // 车辆id |
| 170 | this.clZbh = cc.getCl().getInsideCode(); // 自编号/内部编号 | 184 | this.clZbh = cc.getCl().getInsideCode(); // 自编号/内部编号 |
src/main/resources/rules/rerun.drl
| @@ -122,7 +122,7 @@ rule "calcu_Dylp_ScheduleResult_output_wrap" | @@ -122,7 +122,7 @@ rule "calcu_Dylp_ScheduleResult_output_wrap" | ||
| 122 | end | 122 | end |
| 123 | 123 | ||
| 124 | //-------------------- 第三阶段、套跑线路,替换班次的车辆,人员 --------------------// | 124 | //-------------------- 第三阶段、套跑线路,替换班次的车辆,人员 --------------------// |
| 125 | -rule "calcu_Dylp_rerun_update" | 125 | +rule "calcu_Dylp_rerun_update_dylp" |
| 126 | salience 800 | 126 | salience 800 |
| 127 | // no-loop | 127 | // no-loop |
| 128 | when | 128 | when |
| @@ -143,10 +143,28 @@ rule "calcu_Dylp_rerun_update" | @@ -143,10 +143,28 @@ rule "calcu_Dylp_rerun_update" | ||
| 143 | then | 143 | then |
| 144 | // log.info("TODO:测试 {}", $fcsj); | 144 | // log.info("TODO:测试 {}", $fcsj); |
| 145 | 145 | ||
| 146 | - $spi.setRerunInfo($dsro.getCc(), $dsro.getEc()); | 146 | + $spi.setRerunInfoDylp($dsro.getCc(), $dsro.getEc()); |
| 147 | 147 | ||
| 148 | end | 148 | end |
| 149 | 149 | ||
| 150 | +rule "calcu_Dylp_rerun_update_dybc" | ||
| 151 | + salience 700 | ||
| 152 | + when | ||
| 153 | + $spi: SchedulePlanInfo($xlid: xl, $sd: scheduleDate, $lp: lp, $fcsj: fcsj, $ttinfo: ttInfo) | ||
| 154 | + $ri: RerunRule_input( | ||
| 155 | + type == "dybc", | ||
| 156 | + xl == $xlid.toString(), | ||
| 157 | + ttinfo == $ttinfo.toString(), | ||
| 158 | + lp == $lp.toString(), | ||
| 159 | + fcsj == $fcsj | ||
| 160 | + ) | ||
| 161 | + | ||
| 162 | + then | ||
| 163 | + | ||
| 164 | + $spi.setRerunInfoDybc($ri); | ||
| 165 | + | ||
| 166 | + | ||
| 167 | +end | ||
| 150 | 168 | ||
| 151 | 169 | ||
| 152 | 170 |