Commit 44bac07fe72b2b378ff769d5de1cc955bb86c596
1 parent
b6957fef
PSM-12
Showing
11 changed files
with
26 additions
and
11 deletions
src/main/java/com/bsth/entity/schedule/SchedulePlanInfo.java
| ... | ... | @@ -240,6 +240,11 @@ public class SchedulePlanInfo { |
| 240 | 240 | this.jhlc = ttInfoDetail.getJhlc(); // 计划里程 |
| 241 | 241 | this.bcsj = ttInfoDetail.getBcsj(); // 班次时间 |
| 242 | 242 | |
| 243 | + // 使用的时刻表id | |
| 244 | + this.ttInfo = ttInfoDetail.getTtinfo().getId(); | |
| 245 | + // 使用的时刻表名字 | |
| 246 | + this.ttInfoName = ttInfoDetail.getTtinfo().getName(); | |
| 247 | + | |
| 243 | 248 | } |
| 244 | 249 | |
| 245 | 250 | ... | ... |
src/main/java/com/bsth/entity/search/PredicatesBuilder.java
| ... | ... | @@ -38,6 +38,9 @@ public class PredicatesBuilder { |
| 38 | 38 | } else if (String.class.isAssignableFrom(leftType) && |
| 39 | 39 | (String.class.isAssignableFrom(rightType) || Number.class.isAssignableFrom(rightType))) { // String == String/Number |
| 40 | 40 | return cb.equal(expression, object); |
| 41 | + } else if (Boolean.class.isAssignableFrom(leftType) && | |
| 42 | + Boolean.class.isAssignableFrom(rightType)) { | |
| 43 | + return cb.equal(expression, object); | |
| 41 | 44 | } else if (Date.class.isAssignableFrom(leftType) && |
| 42 | 45 | Date.class.isAssignableFrom(rightType)) { // Date == Date |
| 43 | 46 | return cb.equal(expression, object); | ... | ... |
src/main/java/com/bsth/service/schedule/rules/strategy/IStrategyImpl.java
| ... | ... | @@ -21,6 +21,7 @@ import org.slf4j.Logger; |
| 21 | 21 | import org.slf4j.LoggerFactory; |
| 22 | 22 | import org.springframework.beans.factory.annotation.Autowired; |
| 23 | 23 | import org.springframework.stereotype.Service; |
| 24 | +import org.springframework.util.CollectionUtils; | |
| 24 | 25 | |
| 25 | 26 | import java.util.*; |
| 26 | 27 | |
| ... | ... | @@ -50,8 +51,14 @@ public class IStrategyImpl implements IStrategy { |
| 50 | 51 | |
| 51 | 52 | @Override |
| 52 | 53 | public Line getLine(Integer xlId) { |
| 53 | - Line xl = lineService.findById(xlId); // 查找线路具体信息 | |
| 54 | - return xl; | |
| 54 | + Map<String, Object> param = new HashMap<>(); | |
| 55 | + param.put("id_eq", xlId); | |
| 56 | + param.put("destroy_eq", 0); // 未撤销 | |
| 57 | + List<Line> lines = (List<Line>) lineService.list(param); | |
| 58 | + if (CollectionUtils.isEmpty(lines)) { | |
| 59 | + throw new RuntimeException("线路找不到,可能已经撤销!"); | |
| 60 | + } | |
| 61 | + return lines.get(0); | |
| 55 | 62 | } |
| 56 | 63 | |
| 57 | 64 | @Override | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/ttInfoDetailManage/edit-detail.html
src/main/resources/static/pages/scheduleApp/module/core/ttInfoDetailManage/edit.html
src/main/resources/static/pages/scheduleApp/module/core/ttInfoDetailManage/form.html
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/detail.html
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/edit.html
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/form.html
src/main/resources/static/pages/scheduleApp/module/core/ttInfoManage/index.html
src/test/java/com/bsth/service/schedule/rules/DroolsRulesTest.java
| ... | ... | @@ -58,7 +58,7 @@ public class DroolsRulesTest { |
| 58 | 58 | session.dispose(); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | - @Test | |
| 61 | +// @Test | |
| 62 | 62 | public void ttinfoDrlTest() throws Exception { |
| 63 | 63 | logger.info("------------ttinfoDrlTest 测试---------------"); |
| 64 | 64 | |
| ... | ... | @@ -133,7 +133,7 @@ public class DroolsRulesTest { |
| 133 | 133 | |
| 134 | 134 | } |
| 135 | 135 | |
| 136 | -// @Test | |
| 136 | + @Test | |
| 137 | 137 | public void shiftloopDrlTest() throws Exception { |
| 138 | 138 | // 1、创建session,内部配置的是stateful |
| 139 | 139 | KieSession session = kieBase.newKieSession(); | ... | ... |