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,7 +348,7 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | ||
| 348 | for (int r = 1; r < sheet.getRows(); r++) { | 348 | for (int r = 1; r < sheet.getRows(); r++) { |
| 349 | List<FcInfo> fcInfos = new ArrayList<>(); | 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 | int bc_ks = 0; // 空驶班次 | 353 | int bc_ks = 0; // 空驶班次 |
| 354 | int bc_yy = 0; // 营运班次 | 354 | int bc_yy = 0; // 营运班次 |
| @@ -373,7 +373,9 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | @@ -373,7 +373,9 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | ||
| 373 | 373 | ||
| 374 | String ists = content == null ? "" : content[9]; // 是否停驶 | 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 | if (StringUtils.isNotEmpty(fzdname)) | 380 | if (StringUtils.isNotEmpty(fzdname)) |
| 379 | headarrays[c] = fzdname; | 381 | headarrays[c] = fzdname; |
| @@ -407,10 +409,10 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | @@ -407,10 +409,10 @@ public class TTInfoDetailDataToolsImpl implements DataToolsService, TTInfoDetail | ||
| 407 | } | 409 | } |
| 408 | 410 | ||
| 409 | // 添加一列 空驶班次/空驶里程,fcsj放置数据 | 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 | // 添加一列 营运班次/营运里程,fcsj放置数据 | 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 | editInfo.getContents().add(fcInfos); | 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,6 +31,8 @@ public interface TTInfoDetailForEdit { | ||
| 31 | private String zdzCode; | 31 | private String zdzCode; |
| 32 | /** 是否停驶 */ | 32 | /** 是否停驶 */ |
| 33 | private Boolean ists; | 33 | private Boolean ists; |
| 34 | + /** 班次时间 */ | ||
| 35 | + private String bcsj; | ||
| 34 | 36 | ||
| 35 | public FcInfo() { | 37 | public FcInfo() { |
| 36 | } | 38 | } |
| @@ -43,7 +45,8 @@ public interface TTInfoDetailForEdit { | @@ -43,7 +45,8 @@ public interface TTInfoDetailForEdit { | ||
| 43 | String isfb, | 45 | String isfb, |
| 44 | String qdzCode, | 46 | String qdzCode, |
| 45 | String zdzCode, | 47 | String zdzCode, |
| 46 | - String ists) { | 48 | + String ists, |
| 49 | + String bcsj) { | ||
| 47 | this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str); | 50 | this.ttdid = StringUtils.isEmpty(ttdid_str) ? null : Long.valueOf(ttdid_str); |
| 48 | this.bc_type = bc_type; | 51 | this.bc_type = bc_type; |
| 49 | this.fcsj = fcsj; | 52 | this.fcsj = fcsj; |
| @@ -69,6 +72,10 @@ public interface TTInfoDetailForEdit { | @@ -69,6 +72,10 @@ public interface TTInfoDetailForEdit { | ||
| 69 | else | 72 | else |
| 70 | this.ists = false; | 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 | public Long getTtdid() { | 81 | public Long getTtdid() { |
| @@ -134,6 +141,14 @@ public interface TTInfoDetailForEdit { | @@ -134,6 +141,14 @@ public interface TTInfoDetailForEdit { | ||
| 134 | public void setIsts(Boolean ists) { | 141 | public void setIsts(Boolean ists) { |
| 135 | this.ists = ists; | 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,10 +59,16 @@ public class ErrorBcCountFunction implements AccumulateFunction { | ||
| 59 | return; | 59 | return; |
| 60 | } | 60 | } |
| 61 | 61 | ||
| 62 | + // 判定条件(数据库中的对应字段没有非空约束),与界面saTimeTable.js的validInfo方法对应 | ||
| 63 | + // 1、起点站编码,名字为空 | ||
| 64 | + // 2、终点站编码,名字为空 | ||
| 65 | + // 3、班次时间 | ||
| 66 | + // TODO:其他再议 | ||
| 62 | if (StringUtils.isEmpty(ttInfoDetail.getQdzCode()) || | 67 | if (StringUtils.isEmpty(ttInfoDetail.getQdzCode()) || |
| 63 | StringUtils.isEmpty(ttInfoDetail.getQdzName()) || | 68 | StringUtils.isEmpty(ttInfoDetail.getQdzName()) || |
| 64 | StringUtils.isEmpty(ttInfoDetail.getZdzCode()) || | 69 | StringUtils.isEmpty(ttInfoDetail.getZdzCode()) || |
| 65 | - StringUtils.isEmpty(ttInfoDetail.getZdzName()) ) { | 70 | + StringUtils.isEmpty(ttInfoDetail.getZdzName()) || |
| 71 | + (ttInfoDetail.getBcsj() == null) ) { | ||
| 66 | 72 | ||
| 67 | errorCountData.errorcount ++; | 73 | errorCountData.errorcount ++; |
| 68 | } | 74 | } |