Commit 06ad4f9b06a05c95ccea27ad70625a82d0d8f531
1 parent
453efa15
浦东公交计划调度功能优化
1、计划排班时,添加时刻表路牌验证(验证路牌是否作废)
Showing
10 changed files
with
140 additions
and
67 deletions
src/main/java/com/bsth/repository/schedule/TTInfoDetailRepository.java
| @@ -47,6 +47,7 @@ public interface TTInfoDetailRepository extends BaseRepository<TTInfoDetail, Lon | @@ -47,6 +47,7 @@ public interface TTInfoDetailRepository extends BaseRepository<TTInfoDetail, Lon | ||
| 47 | @Query(value = "select tt from TTInfoDetail tt where tt.ttinfo.id = ?1 and tt.lp.id = ?2 order by tt.fcno asc") | 47 | @Query(value = "select tt from TTInfoDetail tt where tt.ttinfo.id = ?1 and tt.lp.id = ?2 order by tt.fcno asc") |
| 48 | List<TTInfoDetail> findBcdetails(Long ttinfoId, Long lpId); | 48 | List<TTInfoDetail> findBcdetails(Long ttinfoId, Long lpId); |
| 49 | 49 | ||
| 50 | + @Query(value = "select tt from TTInfoDetail tt left join fetch tt.lp where tt.ttinfo.id = ?1 ") | ||
| 50 | List<TTInfoDetail> findByTtinfoId(Long id); | 51 | List<TTInfoDetail> findByTtinfoId(Long id); |
| 51 | 52 | ||
| 52 | @Modifying | 53 | @Modifying |
src/main/java/com/bsth/service/schedule/impl/SchedulePlanServiceImpl.java
| @@ -205,7 +205,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | @@ -205,7 +205,7 @@ public class SchedulePlanServiceImpl extends BServiceImpl<SchedulePlan, Long> im | ||
| 205 | 205 | ||
| 206 | session.fireAllRules(); | 206 | session.fireAllRules(); |
| 207 | 207 | ||
| 208 | - session.dispose();; | 208 | + session.dispose(); |
| 209 | 209 | ||
| 210 | return result; | 210 | return result; |
| 211 | } | 211 | } |
src/main/java/com/bsth/service/schedule/impl/plan/kBase3/validate/timetable/ErrorBcCountFunction.java
| @@ -5,6 +5,10 @@ import org.apache.commons.lang3.StringUtils; | @@ -5,6 +5,10 @@ import org.apache.commons.lang3.StringUtils; | ||
| 5 | import org.kie.api.runtime.rule.AccumulateFunction; | 5 | import org.kie.api.runtime.rule.AccumulateFunction; |
| 6 | 6 | ||
| 7 | import java.io.*; | 7 | import java.io.*; |
| 8 | +import java.util.ArrayList; | ||
| 9 | +import java.util.HashMap; | ||
| 10 | +import java.util.List; | ||
| 11 | +import java.util.Map; | ||
| 8 | 12 | ||
| 9 | /** | 13 | /** |
| 10 | * Created by xu on 17/2/28. | 14 | * Created by xu on 17/2/28. |
| @@ -18,24 +22,68 @@ public class ErrorBcCountFunction implements AccumulateFunction { | @@ -18,24 +22,68 @@ public class ErrorBcCountFunction implements AccumulateFunction { | ||
| 18 | public void writeExternal(ObjectOutput out) throws IOException { | 22 | public void writeExternal(ObjectOutput out) throws IOException { |
| 19 | } | 23 | } |
| 20 | 24 | ||
| 21 | - protected static class ErrorCountData implements Externalizable { | ||
| 22 | - public long errorcount = 0; | 25 | + protected static class ErrorCountData implements Serializable { |
| 26 | + // TODO:这里暂时这样写,之后新版本去除 | ||
| 23 | public TTInfoDetail ttInfoDetail; | 27 | public TTInfoDetail ttInfoDetail; |
| 28 | + /** 错误班次map,key=ttinfodetailId value=ttinfodetail */ | ||
| 29 | + public Map<Long, TTInfoDetail> errorTtInfoDetailMap; | ||
| 30 | + // 空班次数 | ||
| 31 | + public Integer nullBcCount; | ||
| 32 | + /** 错误路牌map,key=路牌Id,value=路牌名字 */ | ||
| 33 | + public Map<Long, String> errorlpMap; | ||
| 24 | 34 | ||
| 25 | public ErrorCountData() { | 35 | public ErrorCountData() { |
| 36 | + nullBcCount = 0; | ||
| 37 | + errorTtInfoDetailMap = new HashMap<>(); | ||
| 38 | + errorlpMap = new HashMap<>(); | ||
| 26 | } | 39 | } |
| 27 | 40 | ||
| 28 | - @Override | ||
| 29 | - public void readExternal(ObjectInput in) throws IOException, ClassNotFoundException { | ||
| 30 | - errorcount = in.readLong(); | ||
| 31 | - ttInfoDetail = (TTInfoDetail) in.readObject(); | 41 | + public void accTTInfoDetail(TTInfoDetail ttInfoDetail) { |
| 42 | + // 计算错误班次 | ||
| 43 | + | ||
| 44 | + if (ttInfoDetail.getTtinfo() == null) { | ||
| 45 | + nullBcCount ++; | ||
| 46 | + return; | ||
| 47 | + } | ||
| 48 | + | ||
| 49 | + // 判定条件(数据库中的对应字段没有非空约束),与界面saTimeTable.js的validInfo方法对应 | ||
| 50 | + // 1、起点站编码,名字为空 | ||
| 51 | + // 2、终点站编码,名字为空 | ||
| 52 | + // 3、班次时间 | ||
| 53 | + // TODO:其他再议 | ||
| 54 | + if (StringUtils.isEmpty(ttInfoDetail.getQdzCode()) || | ||
| 55 | + StringUtils.isEmpty(ttInfoDetail.getQdzName()) || | ||
| 56 | + StringUtils.isEmpty(ttInfoDetail.getZdzCode()) || | ||
| 57 | + StringUtils.isEmpty(ttInfoDetail.getZdzName()) || | ||
| 58 | + (ttInfoDetail.getBcsj() == null) ) { | ||
| 59 | + | ||
| 60 | + errorTtInfoDetailMap.put(ttInfoDetail.getId(), ttInfoDetail); | ||
| 61 | + } | ||
| 62 | + | ||
| 63 | + // 计算错误路牌 | ||
| 64 | + if (ttInfoDetail.getLp().getIsCancel()) { | ||
| 65 | + errorlpMap.put(ttInfoDetail.getLp().getId(), ttInfoDetail.getLp().getLpName()); | ||
| 66 | + } | ||
| 32 | } | 67 | } |
| 33 | 68 | ||
| 34 | - @Override | ||
| 35 | - public void writeExternal(ObjectOutput out) throws IOException { | ||
| 36 | - out.writeLong(errorcount); | ||
| 37 | - out.writeObject(ttInfoDetail); | 69 | + public void reTTInfoDetail(TTInfoDetail ttInfoDetail) { |
| 70 | + if (ttInfoDetail.getTtinfo() == null) { | ||
| 71 | + nullBcCount --; | ||
| 72 | + return; | ||
| 73 | + } | ||
| 74 | + if (StringUtils.isEmpty(ttInfoDetail.getQdzCode()) || | ||
| 75 | + StringUtils.isEmpty(ttInfoDetail.getQdzName()) || | ||
| 76 | + StringUtils.isEmpty(ttInfoDetail.getZdzCode()) || | ||
| 77 | + StringUtils.isEmpty(ttInfoDetail.getZdzName()) || | ||
| 78 | + (ttInfoDetail.getBcsj() == null) ) { | ||
| 79 | + | ||
| 80 | + errorTtInfoDetailMap.remove(ttInfoDetail.getId()); | ||
| 81 | + } | ||
| 82 | + if (ttInfoDetail.getLp().getIsCancel()) { | ||
| 83 | + errorlpMap.remove(ttInfoDetail.getLp().getId()); | ||
| 84 | + } | ||
| 38 | } | 85 | } |
| 86 | + | ||
| 39 | } | 87 | } |
| 40 | 88 | ||
| 41 | @Override | 89 | @Override |
| @@ -44,60 +92,42 @@ public class ErrorBcCountFunction implements AccumulateFunction { | @@ -44,60 +92,42 @@ public class ErrorBcCountFunction implements AccumulateFunction { | ||
| 44 | } | 92 | } |
| 45 | 93 | ||
| 46 | @Override | 94 | @Override |
| 47 | - public void init(Serializable context) throws Exception { | ||
| 48 | - ErrorCountData errorCountData = (ErrorCountData) context; | ||
| 49 | - errorCountData.errorcount = 0; | ||
| 50 | - } | 95 | + public void init(Serializable context) throws Exception { } |
| 51 | 96 | ||
| 52 | @Override | 97 | @Override |
| 53 | public void accumulate(Serializable context, Object value) { | 98 | public void accumulate(Serializable context, Object value) { |
| 54 | ErrorCountData errorCountData = (ErrorCountData) context; | 99 | ErrorCountData errorCountData = (ErrorCountData) context; |
| 55 | TTInfoDetail ttInfoDetail = (TTInfoDetail) value; | 100 | TTInfoDetail ttInfoDetail = (TTInfoDetail) value; |
| 56 | - | ||
| 57 | - if (ttInfoDetail.getTtinfo() == null) { | ||
| 58 | - errorCountData.errorcount ++; | ||
| 59 | - return; | ||
| 60 | - } | ||
| 61 | - | ||
| 62 | - // 判定条件(数据库中的对应字段没有非空约束),与界面saTimeTable.js的validInfo方法对应 | ||
| 63 | - // 1、起点站编码,名字为空 | ||
| 64 | - // 2、终点站编码,名字为空 | ||
| 65 | - // 3、班次时间 | ||
| 66 | - // TODO:其他再议 | ||
| 67 | - if (StringUtils.isEmpty(ttInfoDetail.getQdzCode()) || | ||
| 68 | - StringUtils.isEmpty(ttInfoDetail.getQdzName()) || | ||
| 69 | - StringUtils.isEmpty(ttInfoDetail.getZdzCode()) || | ||
| 70 | - StringUtils.isEmpty(ttInfoDetail.getZdzName()) || | ||
| 71 | - (ttInfoDetail.getBcsj() == null) ) { | ||
| 72 | - | ||
| 73 | - errorCountData.errorcount ++; | ||
| 74 | - } | 101 | + errorCountData.accTTInfoDetail(ttInfoDetail); |
| 75 | } | 102 | } |
| 76 | 103 | ||
| 77 | @Override | 104 | @Override |
| 78 | public void reverse(Serializable context, Object value) throws Exception { | 105 | public void reverse(Serializable context, Object value) throws Exception { |
| 79 | ErrorCountData errorCountData = (ErrorCountData) context; | 106 | ErrorCountData errorCountData = (ErrorCountData) context; |
| 80 | TTInfoDetail ttInfoDetail = (TTInfoDetail) value; | 107 | TTInfoDetail ttInfoDetail = (TTInfoDetail) value; |
| 81 | - | ||
| 82 | - if (ttInfoDetail.getTtinfo() == null) { | ||
| 83 | - errorCountData.errorcount --; | ||
| 84 | - return; | ||
| 85 | - } | ||
| 86 | - | ||
| 87 | - if (StringUtils.isEmpty(ttInfoDetail.getQdzCode()) || | ||
| 88 | - StringUtils.isEmpty(ttInfoDetail.getQdzName()) || | ||
| 89 | - StringUtils.isEmpty(ttInfoDetail.getZdzCode()) || | ||
| 90 | - StringUtils.isEmpty(ttInfoDetail.getZdzName()) ) { | ||
| 91 | - | ||
| 92 | - errorCountData.errorcount --; | ||
| 93 | - } | ||
| 94 | - | 108 | + errorCountData.reTTInfoDetail(ttInfoDetail); |
| 95 | } | 109 | } |
| 96 | 110 | ||
| 97 | @Override | 111 | @Override |
| 98 | public Object getResult(Serializable context) throws Exception { | 112 | public Object getResult(Serializable context) throws Exception { |
| 99 | ErrorCountData errorCountData = (ErrorCountData) context; | 113 | ErrorCountData errorCountData = (ErrorCountData) context; |
| 100 | - return errorCountData.errorcount; | 114 | + |
| 115 | + // 错误班次数 | ||
| 116 | + Integer errorBcCount = errorCountData.nullBcCount + errorCountData.errorTtInfoDetailMap.values().size(); | ||
| 117 | + // 错误路牌数 | ||
| 118 | + Integer errorLpCount = errorCountData.errorlpMap.values().size(); | ||
| 119 | + // 错误路牌描述 | ||
| 120 | + List<String> errorLpInfoList = new ArrayList<>(); | ||
| 121 | + for (String lpName: errorCountData.errorlpMap.values()) { | ||
| 122 | + errorLpInfoList.add("路牌" + "[" + lpName + "]" + "已作废"); | ||
| 123 | + } | ||
| 124 | + | ||
| 125 | + List<Object> resultObj = new ArrayList<>(3); | ||
| 126 | + resultObj.add(errorBcCount); | ||
| 127 | + resultObj.add(errorLpCount); | ||
| 128 | + resultObj.add(errorLpInfoList); | ||
| 129 | + | ||
| 130 | + return resultObj; | ||
| 101 | } | 131 | } |
| 102 | 132 | ||
| 103 | @Override | 133 | @Override |
| @@ -107,6 +137,6 @@ public class ErrorBcCountFunction implements AccumulateFunction { | @@ -107,6 +137,6 @@ public class ErrorBcCountFunction implements AccumulateFunction { | ||
| 107 | 137 | ||
| 108 | @Override | 138 | @Override |
| 109 | public Class<?> getResultType() { | 139 | public Class<?> getResultType() { |
| 110 | - return Number.class; | 140 | + return List.class; |
| 111 | } | 141 | } |
| 112 | } | 142 | } |
src/main/java/com/bsth/service/schedule/impl/plan/kBase3/validate/timetable/Result.java
| @@ -35,7 +35,12 @@ public class Result { | @@ -35,7 +35,12 @@ public class Result { | ||
| 35 | private Long yybc; | 35 | private Long yybc; |
| 36 | 36 | ||
| 37 | /** 错误班次数 */ | 37 | /** 错误班次数 */ |
| 38 | - private Long errorbc; | 38 | + private Integer errorbc; |
| 39 | + | ||
| 40 | + /** 错误路牌数 */ | ||
| 41 | + private Integer errorlpCount; | ||
| 42 | + /** 错误路牌描述 */ | ||
| 43 | + private List<String> errorlpInfo; | ||
| 39 | 44 | ||
| 40 | public Long getTtid() { | 45 | public Long getTtid() { |
| 41 | return ttid; | 46 | return ttid; |
| @@ -85,14 +90,10 @@ public class Result { | @@ -85,14 +90,10 @@ public class Result { | ||
| 85 | this.yybc = yybc; | 90 | this.yybc = yybc; |
| 86 | } | 91 | } |
| 87 | 92 | ||
| 88 | - public Long getErrorbc() { | 93 | + public Integer getErrorbc() { |
| 89 | return errorbc; | 94 | return errorbc; |
| 90 | } | 95 | } |
| 91 | 96 | ||
| 92 | - public void setErrorbc(Long errorbc) { | ||
| 93 | - this.errorbc = errorbc; | ||
| 94 | - } | ||
| 95 | - | ||
| 96 | public Integer getLineVersion() { | 97 | public Integer getLineVersion() { |
| 97 | return lineVersion; | 98 | return lineVersion; |
| 98 | } | 99 | } |
| @@ -100,5 +101,25 @@ public class Result { | @@ -100,5 +101,25 @@ public class Result { | ||
| 100 | public void setLineVersion(Integer lineVersion) { | 101 | public void setLineVersion(Integer lineVersion) { |
| 101 | this.lineVersion = lineVersion; | 102 | this.lineVersion = lineVersion; |
| 102 | } | 103 | } |
| 104 | + | ||
| 105 | + public void setErrorbc(Integer errorbc) { | ||
| 106 | + this.errorbc = errorbc; | ||
| 107 | + } | ||
| 108 | + | ||
| 109 | + public Integer getErrorlpCount() { | ||
| 110 | + return errorlpCount; | ||
| 111 | + } | ||
| 112 | + | ||
| 113 | + public void setErrorlpCount(Integer errorlpCount) { | ||
| 114 | + this.errorlpCount = errorlpCount; | ||
| 115 | + } | ||
| 116 | + | ||
| 117 | + public List<String> getErrorlpInfo() { | ||
| 118 | + return errorlpInfo; | ||
| 119 | + } | ||
| 120 | + | ||
| 121 | + public void setErrorlpInfo(List<String> errorlpInfo) { | ||
| 122 | + this.errorlpInfo = errorlpInfo; | ||
| 123 | + } | ||
| 103 | } | 124 | } |
| 104 | } | 125 | } |
src/main/resources/application-dev.properties
| @@ -17,9 +17,9 @@ spring.datasource.driver-class-name= com.mysql.jdbc.Driver | @@ -17,9 +17,9 @@ spring.datasource.driver-class-name= com.mysql.jdbc.Driver | ||
| 17 | ##spring.datasource.url= jdbc:mysql://192.168.168.222/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 17 | ##spring.datasource.url= jdbc:mysql://192.168.168.222/control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 18 | #spring.datasource.username= root | 18 | #spring.datasource.username= root |
| 19 | #spring.datasource.password= | 19 | #spring.datasource.password= |
| 20 | -spring.datasource.url= jdbc:mysql://127.0.0.1/control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 20 | +spring.datasource.url= jdbc:mysql://127.0.0.1/test_control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 21 | spring.datasource.username= root | 21 | spring.datasource.username= root |
| 22 | -spring.datasource.password= root | 22 | +spring.datasource.password= |
| 23 | #spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false | 23 | #spring.datasource.url= jdbc:mysql://192.168.168.117/pd_control?useUnicode=true&characterEncoding=utf-8&useSSL=false |
| 24 | #spring.datasource.username= root | 24 | #spring.datasource.username= root |
| 25 | #spring.datasource.password= root | 25 | #spring.datasource.password= root |
| @@ -48,4 +48,4 @@ http.rfid.url= http://114.80.178.12:29000/rfid | @@ -48,4 +48,4 @@ http.rfid.url= http://114.80.178.12:29000/rfid | ||
| 48 | ## http ticketing interface | 48 | ## http ticketing interface |
| 49 | http.ticketing.interface= http://112.64.187.3:1080/gjService/request | 49 | http.ticketing.interface= http://112.64.187.3:1080/gjService/request |
| 50 | ## first last generate | 50 | ## first last generate |
| 51 | -ms.fl.generate=true | ||
| 52 | \ No newline at end of file | 51 | \ No newline at end of file |
| 52 | +ms.fl.generate=true |
src/main/resources/datatools/config-dev.properties
| @@ -10,7 +10,7 @@ datatools.kvars_dbuname=root | @@ -10,7 +10,7 @@ datatools.kvars_dbuname=root | ||
| 10 | #数据库密码 | 10 | #数据库密码 |
| 11 | datatools.kvars_dbpwd= | 11 | datatools.kvars_dbpwd= |
| 12 | #数据库库名 | 12 | #数据库库名 |
| 13 | -datatools.kvars_dbdname=control | 13 | +datatools.kvars_dbdname=test_control |
| 14 | 14 | ||
| 15 | # 3、上传数据配置信息 | 15 | # 3、上传数据配置信息 |
| 16 | # 上传文件目录配置(根据不同的环境需要修正) | 16 | # 上传文件目录配置(根据不同的环境需要修正) |
src/main/resources/rules/kBase3_validate_timetable.drl
| @@ -307,7 +307,7 @@ rule "statinfo_result" // 统计计算结果 | @@ -307,7 +307,7 @@ rule "statinfo_result" // 统计计算结果 | ||
| 307 | $inbc: Long() from accumulate (TTInfoDetail(bcType == "in") from $ttInfoDetails_wrap.getBcInfoList(), count()) | 307 | $inbc: Long() from accumulate (TTInfoDetail(bcType == "in") from $ttInfoDetails_wrap.getBcInfoList(), count()) |
| 308 | $outbc: Long() from accumulate (TTInfoDetail(bcType == "out") from $ttInfoDetails_wrap.getBcInfoList(), count()) | 308 | $outbc: Long() from accumulate (TTInfoDetail(bcType == "out") from $ttInfoDetails_wrap.getBcInfoList(), count()) |
| 309 | $yybc: Long() from accumulate (TTInfoDetail(bcType != "out", bcType != "in") from $ttInfoDetails_wrap.getBcInfoList(), count()) | 309 | $yybc: Long() from accumulate (TTInfoDetail(bcType != "out", bcType != "in") from $ttInfoDetails_wrap.getBcInfoList(), count()) |
| 310 | - $errorbc: Long() from accumulate ($ttd: TTInfoDetail() from $ttInfoDetails_wrap.getBcInfoList(), ecount($ttd)) | 310 | + $errorbc: List() from accumulate ($ttd: TTInfoDetail() from $ttInfoDetails_wrap.getBcInfoList(), ecount($ttd)) |
| 311 | then | 311 | then |
| 312 | log.info("时刻表={},id={},班次数={},进场={},出场={},营运={},错误={}", $statInfo.getTtname(), $statInfo.getTtid(), $allbc, $inbc, $outbc, $yybc, $errorbc); | 312 | log.info("时刻表={},id={},班次数={},进场={},出场={},营运={},错误={}", $statInfo.getTtname(), $statInfo.getTtid(), $allbc, $inbc, $outbc, $yybc, $errorbc); |
| 313 | 313 | ||
| @@ -315,7 +315,9 @@ rule "statinfo_result" // 统计计算结果 | @@ -315,7 +315,9 @@ rule "statinfo_result" // 统计计算结果 | ||
| 315 | $statInfo.setInbc($inbc); | 315 | $statInfo.setInbc($inbc); |
| 316 | $statInfo.setOutbc($outbc); | 316 | $statInfo.setOutbc($outbc); |
| 317 | $statInfo.setYybc($yybc); | 317 | $statInfo.setYybc($yybc); |
| 318 | - $statInfo.setErrorbc($errorbc); | 318 | + $statInfo.setErrorbc((Integer) $errorbc.get(0)); |
| 319 | + $statInfo.setErrorlpCount((Integer) $errorbc.get(1)); | ||
| 320 | + $statInfo.setErrorlpInfo((List<String>) $errorbc.get(2)); | ||
| 319 | 321 | ||
| 320 | int lineVersion = $ttInfoDetails_wrap.getLineVersion(); | 322 | int lineVersion = $ttInfoDetails_wrap.getLineVersion(); |
| 321 | $statInfo.setLineVersion(lineVersion); | 323 | $statInfo.setLineVersion(lineVersion); |
src/main/resources/static/pages/scheduleApp/module/common/dts2/scheduleplan/saScpdate.js
| @@ -125,6 +125,7 @@ angular.module('ScheduleApp').directive( | @@ -125,6 +125,7 @@ angular.module('ScheduleApp').directive( | ||
| 125 | scope[ctrlAs].$$ds = []; | 125 | scope[ctrlAs].$$ds = []; |
| 126 | 126 | ||
| 127 | var errorTTInfos = 0; | 127 | var errorTTInfos = 0; |
| 128 | + var errorLpCount = 0; | ||
| 128 | 129 | ||
| 129 | if (result && result.data && result.data.infos && result.data.infos.length > 0) { | 130 | if (result && result.data && result.data.infos && result.data.infos.length > 0) { |
| 130 | angular.forEach(result.data.infos, function(obj) { | 131 | angular.forEach(result.data.infos, function(obj) { |
| @@ -140,6 +141,8 @@ angular.module('ScheduleApp').directive( | @@ -140,6 +141,8 @@ angular.module('ScheduleApp').directive( | ||
| 140 | yybc: obj.yybc, | 141 | yybc: obj.yybc, |
| 141 | 142 | ||
| 142 | errorbc: obj.errorbc, | 143 | errorbc: obj.errorbc, |
| 144 | + errorlpCount: obj.errorlpCount, | ||
| 145 | + errorlpInfo: obj.errorlpInfo, | ||
| 143 | 146 | ||
| 144 | lineVersion: obj.lineVersion | 147 | lineVersion: obj.lineVersion |
| 145 | 148 | ||
| @@ -147,6 +150,8 @@ angular.module('ScheduleApp').directive( | @@ -147,6 +150,8 @@ angular.module('ScheduleApp').directive( | ||
| 147 | 150 | ||
| 148 | if (obj.errorbc > 0) { | 151 | if (obj.errorbc > 0) { |
| 149 | errorTTInfos ++; | 152 | errorTTInfos ++; |
| 153 | + } else if (obj.errorlpCount > 0) { | ||
| 154 | + errorLpCount ++; | ||
| 150 | } else { | 155 | } else { |
| 151 | ttinfonames.push(obj.ttname); | 156 | ttinfonames.push(obj.ttname); |
| 152 | ttinfoids.push(obj.ttid); | 157 | ttinfoids.push(obj.ttid); |
| @@ -156,6 +161,9 @@ angular.module('ScheduleApp').directive( | @@ -156,6 +161,9 @@ angular.module('ScheduleApp').directive( | ||
| 156 | if (errorTTInfos > 0) { | 161 | if (errorTTInfos > 0) { |
| 157 | scope[ctrlAs].$$internalmodel = undefined; | 162 | scope[ctrlAs].$$internalmodel = undefined; |
| 158 | scope[ctrlAs].error = "时刻表有错误班次"; | 163 | scope[ctrlAs].error = "时刻表有错误班次"; |
| 164 | + } else if (errorLpCount > 0) { | ||
| 165 | + scope[ctrlAs].$$internalmodel = undefined; | ||
| 166 | + scope[ctrlAs].error = "时刻表有错误路牌"; | ||
| 159 | } else { | 167 | } else { |
| 160 | scope[ctrlAs].$$internalmodel = "ok"; | 168 | scope[ctrlAs].$$internalmodel = "ok"; |
| 161 | scope[ctrlAs].ttinfonames = ttinfonames.join(","); | 169 | scope[ctrlAs].ttinfonames = ttinfonames.join(","); |
| @@ -228,4 +236,4 @@ angular.module('ScheduleApp').directive( | @@ -228,4 +236,4 @@ angular.module('ScheduleApp').directive( | ||
| 228 | }; | 236 | }; |
| 229 | } | 237 | } |
| 230 | ] | 238 | ] |
| 231 | -); | ||
| 232 | \ No newline at end of file | 239 | \ No newline at end of file |
| 240 | +); |
src/main/resources/static/pages/scheduleApp/module/common/dts2/scheduleplan/saScpdateTemplate.html
| @@ -56,6 +56,8 @@ | @@ -56,6 +56,8 @@ | ||
| 56 | <div><span ng-bind="info.ttname"></span></div> | 56 | <div><span ng-bind="info.ttname"></span></div> |
| 57 | <div><span>统计班次:{{info.allbc}}个,出场:{{info.outbc}}个,进场:{{info.inbc}}个,营运:{{info.yybc}}个</span></div> | 57 | <div><span>统计班次:{{info.allbc}}个,出场:{{info.outbc}}个,进场:{{info.inbc}}个,营运:{{info.yybc}}个</span></div> |
| 58 | <div><span>异常班次:{{info.errorbc}}个</span></div> | 58 | <div><span>异常班次:{{info.errorbc}}个</span></div> |
| 59 | + <div><span>异常路牌:{{info.errorlpCount}}个</span></div> | ||
| 60 | + <div><span>异常路牌描述:{{info.errorlpInfo.join(",")}}</span></div> | ||
| 59 | </script> | 61 | </script> |
| 60 | 62 | ||
| 61 | <div ng-repeat="info in $saScpdateCtrl.$$ds track by $index"> | 63 | <div ng-repeat="info in $saScpdateCtrl.$$ds track by $index"> |
| @@ -68,8 +70,8 @@ | @@ -68,8 +70,8 @@ | ||
| 68 | {{info.ttname}} | 70 | {{info.ttname}} |
| 69 | </a> | 71 | </a> |
| 70 | </h3> | 72 | </h3> |
| 71 | - <span class="glyphicon glyphicon-ok" aria-hidden="true" ng-if="info.errorbc == 0"></span> | ||
| 72 | - <span class="glyphicon glyphicon-remove" aria-hidden="true" ng-if="info.errorbc > 0"></span> | 73 | + <span class="glyphicon glyphicon-ok" aria-hidden="true" ng-if="info.errorbc == 0 && info.errorlpCount == 0"></span> |
| 74 | + <span class="glyphicon glyphicon-remove" aria-hidden="true" ng-if="info.errorbc > 0 || info.errorlpCount > 0"></span> | ||
| 73 | </div> | 75 | </div> |
| 74 | </div> | 76 | </div> |
| 75 | </div> | 77 | </div> |
| @@ -78,4 +80,4 @@ | @@ -78,4 +80,4 @@ | ||
| 78 | 80 | ||
| 79 | 81 | ||
| 80 | 82 | ||
| 81 | -</div> | ||
| 82 | \ No newline at end of file | 83 | \ No newline at end of file |
| 84 | +</div> |
src/main/resources/static/pages/scheduleApp/module/common/prj-common-directive.js
| @@ -5146,6 +5146,7 @@ angular.module('ScheduleApp').directive( | @@ -5146,6 +5146,7 @@ angular.module('ScheduleApp').directive( | ||
| 5146 | scope[ctrlAs].$$ds = []; | 5146 | scope[ctrlAs].$$ds = []; |
| 5147 | 5147 | ||
| 5148 | var errorTTInfos = 0; | 5148 | var errorTTInfos = 0; |
| 5149 | + var errorLpCount = 0; | ||
| 5149 | 5150 | ||
| 5150 | if (result && result.data && result.data.infos && result.data.infos.length > 0) { | 5151 | if (result && result.data && result.data.infos && result.data.infos.length > 0) { |
| 5151 | angular.forEach(result.data.infos, function(obj) { | 5152 | angular.forEach(result.data.infos, function(obj) { |
| @@ -5161,6 +5162,8 @@ angular.module('ScheduleApp').directive( | @@ -5161,6 +5162,8 @@ angular.module('ScheduleApp').directive( | ||
| 5161 | yybc: obj.yybc, | 5162 | yybc: obj.yybc, |
| 5162 | 5163 | ||
| 5163 | errorbc: obj.errorbc, | 5164 | errorbc: obj.errorbc, |
| 5165 | + errorlpCount: obj.errorlpCount, | ||
| 5166 | + errorlpInfo: obj.errorlpInfo, | ||
| 5164 | 5167 | ||
| 5165 | lineVersion: obj.lineVersion | 5168 | lineVersion: obj.lineVersion |
| 5166 | 5169 | ||
| @@ -5168,6 +5171,8 @@ angular.module('ScheduleApp').directive( | @@ -5168,6 +5171,8 @@ angular.module('ScheduleApp').directive( | ||
| 5168 | 5171 | ||
| 5169 | if (obj.errorbc > 0) { | 5172 | if (obj.errorbc > 0) { |
| 5170 | errorTTInfos ++; | 5173 | errorTTInfos ++; |
| 5174 | + } else if (obj.errorlpCount > 0) { | ||
| 5175 | + errorLpCount ++; | ||
| 5171 | } else { | 5176 | } else { |
| 5172 | ttinfonames.push(obj.ttname); | 5177 | ttinfonames.push(obj.ttname); |
| 5173 | ttinfoids.push(obj.ttid); | 5178 | ttinfoids.push(obj.ttid); |
| @@ -5177,6 +5182,9 @@ angular.module('ScheduleApp').directive( | @@ -5177,6 +5182,9 @@ angular.module('ScheduleApp').directive( | ||
| 5177 | if (errorTTInfos > 0) { | 5182 | if (errorTTInfos > 0) { |
| 5178 | scope[ctrlAs].$$internalmodel = undefined; | 5183 | scope[ctrlAs].$$internalmodel = undefined; |
| 5179 | scope[ctrlAs].error = "时刻表有错误班次"; | 5184 | scope[ctrlAs].error = "时刻表有错误班次"; |
| 5185 | + } else if (errorLpCount > 0) { | ||
| 5186 | + scope[ctrlAs].$$internalmodel = undefined; | ||
| 5187 | + scope[ctrlAs].error = "时刻表有错误路牌"; | ||
| 5180 | } else { | 5188 | } else { |
| 5181 | scope[ctrlAs].$$internalmodel = "ok"; | 5189 | scope[ctrlAs].$$internalmodel = "ok"; |
| 5182 | scope[ctrlAs].ttinfonames = ttinfonames.join(","); | 5190 | scope[ctrlAs].ttinfonames = ttinfonames.join(","); |
| @@ -5249,7 +5257,8 @@ angular.module('ScheduleApp').directive( | @@ -5249,7 +5257,8 @@ angular.module('ScheduleApp').directive( | ||
| 5249 | }; | 5257 | }; |
| 5250 | } | 5258 | } |
| 5251 | ] | 5259 | ] |
| 5252 | -); | 5260 | +); |
| 5261 | + | ||
| 5253 | /** | 5262 | /** |
| 5254 | * saSrule指令(非通用指令,只在排班计划form中使用)。 | 5263 | * saSrule指令(非通用指令,只在排班计划form中使用)。 |
| 5255 | * 属性如下: | 5264 | * 属性如下: |