Commit e202f5347dd0483a027e09acb96ff2b809d7ce9e
1 parent
5ff4f17c
1、修改时刻表编辑用ktr,将bcsj字段加入
2、修改时刻表编辑对应服务,将bcsj加入 3、修改drools关于时刻表验证规则,加入bcsj验证 4、修改前端时刻表编辑指令和相关controll,添加bcsj指令 5、修改前端时刻表编辑指令,修改isValid验证逻辑
Showing
3 changed files
with
29 additions
and
6 deletions
Too many changes to show.
To preserve performance only 3 of 8 files are displayed.
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailDataToolsImpl.java
| ... | ... | @@ -348,7 +348,7 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail |
| 348 | 348 | for (int r = 1; r < sheet.getRows(); r++) { |
| 349 | 349 | List<FcInfo> fcInfos = new ArrayList<>(); |
| 350 | 350 | // 每行第一列都是路牌 |
| 351 | - fcInfos.add(new FcInfo(null, null, sheet.getCell(0, r).getContents(), null, null, null, null, null)); // 用fcsj放置路牌显示 | |
| 351 | + fcInfos.add(new FcInfo(null, null, sheet.getCell(0, r).getContents(), null, null, null, null, null, null)); // 用fcsj放置路牌显示 | |
| 352 | 352 | |
| 353 | 353 | int bc_ks = 0; // 空驶班次 |
| 354 | 354 | int bc_yy = 0; // 营运班次 |
| ... | ... | @@ -373,7 +373,9 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail |
| 373 | 373 | |
| 374 | 374 | String ists = content == null ? "" : content[9]; // 是否停驶 |
| 375 | 375 | |
| 376 | - FcInfo fcInfo = new FcInfo(ttdid_str, bctype, fcsj, xldir, isfb, qdzCode, zdzCode, ists); | |
| 376 | + String bcsj = content == null ? "" : content[10]; // 班次时间 | |
| 377 | + | |
| 378 | + FcInfo fcInfo = new FcInfo(ttdid_str, bctype, fcsj, xldir, isfb, qdzCode, zdzCode, ists, bcsj); | |
| 377 | 379 | |
| 378 | 380 | if (StringUtils.isNotEmpty(fzdname)) |
| 379 | 381 | headarrays[c] = fzdname; |
| ... | ... | @@ -407,10 +409,10 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail |
| 407 | 409 | } |
| 408 | 410 | |
| 409 | 411 | // 添加一列 空驶班次/空驶里程,fcsj放置数据 |
| 410 | - fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_ks, lc_ks), null, null, null, null, null)); | |
| 412 | + fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_ks, lc_ks), null, null, null, null, null, null)); | |
| 411 | 413 | |
| 412 | 414 | // 添加一列 营运班次/营运里程,fcsj放置数据 |
| 413 | - fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_yy, lc_yy), null, null, null, null, null)); | |
| 415 | + fcInfos.add(new FcInfo(null, null, String.format("%d/%.3f", bc_yy, lc_yy), null, null, null, null, null, null)); | |
| 414 | 416 | |
| 415 | 417 | editInfo.getContents().add(fcInfos); |
| 416 | 418 | } | ... | ... |
src/main/java/com/bsth/service/schedule/datatools/TTInfoDetailForEdit.java
| ... | ... | @@ -31,6 +31,8 @@ public interface TTInfoDetailForEdit { |
| 31 | 31 | private String zdzCode; |
| 32 | 32 | /** 是否停驶 */ |
| 33 | 33 | private Boolean ists; |
| 34 | + /** 班次时间 */ | |
| 35 | + private String bcsj; | |
| 34 | 36 | |
| 35 | 37 | public FcInfo() { |
| 36 | 38 | } |
| ... | ... | @@ -43,7 +45,8 @@ public interface TTInfoDetailForEdit { |
| 43 | 45 | String isfb, |
| 44 | 46 | String qdzCode, |
| 45 | 47 | String zdzCode, |
| 46 | - String ists) { | |
| 48 | + String ists, | |
| 49 | + String bcsj) { | |
| 47 | 50 | this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str); |
| 48 | 51 | this.bc_type = bc_type; |
| 49 | 52 | this.fcsj = fcsj; |
| ... | ... | @@ -69,6 +72,10 @@ public interface TTInfoDetailForEdit { |
| 69 | 72 | else |
| 70 | 73 | this.ists = false; |
| 71 | 74 | |
| 75 | + if (StringUtils.isNotEmpty(bcsj) && !"null".equals(bcsj)) { | |
| 76 | + this.bcsj = bcsj; | |
| 77 | + } | |
| 78 | + | |
| 72 | 79 | } |
| 73 | 80 | |
| 74 | 81 | public Long getTtdid() { |
| ... | ... | @@ -134,6 +141,14 @@ public interface TTInfoDetailForEdit { |
| 134 | 141 | public void setIsts(Boolean ists) { |
| 135 | 142 | this.ists = ists; |
| 136 | 143 | } |
| 144 | + | |
| 145 | + public String getBcsj() { | |
| 146 | + return bcsj; | |
| 147 | + } | |
| 148 | + | |
| 149 | + public void setBcsj(String bcsj) { | |
| 150 | + this.bcsj = bcsj; | |
| 151 | + } | |
| 137 | 152 | } |
| 138 | 153 | |
| 139 | 154 | /** | ... | ... |
src/main/java/com/bsth/service/schedule/impl/plan/kBase3/validate/timetable/ErrorBcCountFunction.java
| ... | ... | @@ -59,10 +59,16 @@ public class ErrorBcCountFunction implements AccumulateFunction { |
| 59 | 59 | return; |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | + // 判定条件(数据库中的对应字段没有非空约束),与界面saTimeTable.js的validInfo方法对应 | |
| 63 | + // 1、起点站编码,名字为空 | |
| 64 | + // 2、终点站编码,名字为空 | |
| 65 | + // 3、班次时间 | |
| 66 | + // TODO:其他再议 | |
| 62 | 67 | if (StringUtils.isEmpty(ttInfoDetail.getQdzCode()) || |
| 63 | 68 | StringUtils.isEmpty(ttInfoDetail.getQdzName()) || |
| 64 | 69 | StringUtils.isEmpty(ttInfoDetail.getZdzCode()) || |
| 65 | - StringUtils.isEmpty(ttInfoDetail.getZdzName()) ) { | |
| 70 | + StringUtils.isEmpty(ttInfoDetail.getZdzName()) || | |
| 71 | + (ttInfoDetail.getBcsj() == null) ) { | |
| 66 | 72 | |
| 67 | 73 | errorCountData.errorcount ++; |
| 68 | 74 | } | ... | ... |