Commit f3579e30bb11a0bdaf210c1ca633b9945213a24d
1 parent
448de2e9
Update
Showing
8 changed files
with
71 additions
and
7 deletions
src/main/java/com/bsth/entity/schedule/SchedulePlanInfo.java
| ... | ... | @@ -178,10 +178,21 @@ public class SchedulePlanInfo { |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | // 对应路牌套跑 |
| 181 | - public void setRerunInfoDylp(CarConfigInfo cc, EmployeeConfigInfo ec, String useType) { | |
| 181 | + public void setRerunInfoDylp(CarConfigInfo cc, List ec, String useType, String useHrType) { | |
| 182 | 182 | if ("hr".equals(useType)) { |
| 183 | 183 | // 关联的驾驶员 |
| 184 | - EmployeeConfigInfo employeeConfigInfo = ec; | |
| 184 | + EmployeeConfigInfo employeeConfigInfo = null; | |
| 185 | + if ("all".equals(useHrType)) { | |
| 186 | + employeeConfigInfo = (EmployeeConfigInfo) ec.get(0); | |
| 187 | + } else if ("zb".equals(useHrType)) { | |
| 188 | + employeeConfigInfo = (EmployeeConfigInfo) ec.get(0); | |
| 189 | + } else if ("wb".equals(useHrType)) { | |
| 190 | + if (ec.size() > 1) { | |
| 191 | + employeeConfigInfo = (EmployeeConfigInfo) ec.get(1); | |
| 192 | + } else { | |
| 193 | + employeeConfigInfo = (EmployeeConfigInfo) ec.get(0); | |
| 194 | + } | |
| 195 | + } | |
| 185 | 196 | |
| 186 | 197 | this.j = employeeConfigInfo.getJsy().getId(); |
| 187 | 198 | // this.jGh = employeeConfigInfo.getJsy().getJobCode(); |
| ... | ... | @@ -219,7 +230,18 @@ public class SchedulePlanInfo { |
| 219 | 230 | this.clZbh = cc.getCl().getInsideCode(); // 自编号/内部编号 |
| 220 | 231 | |
| 221 | 232 | // 关联的驾驶员 |
| 222 | - EmployeeConfigInfo employeeConfigInfo = ec; | |
| 233 | + EmployeeConfigInfo employeeConfigInfo = null; | |
| 234 | + if ("all".equals(useHrType)) { | |
| 235 | + employeeConfigInfo = (EmployeeConfigInfo) ec.get(0); | |
| 236 | + } else if ("zb".equals(useHrType)) { | |
| 237 | + employeeConfigInfo = (EmployeeConfigInfo) ec.get(0); | |
| 238 | + } else if ("wb".equals(useHrType)) { | |
| 239 | + if (ec.size() > 1) { | |
| 240 | + employeeConfigInfo = (EmployeeConfigInfo) ec.get(1); | |
| 241 | + } else { | |
| 242 | + employeeConfigInfo = (EmployeeConfigInfo) ec.get(0); | |
| 243 | + } | |
| 244 | + } | |
| 223 | 245 | |
| 224 | 246 | this.j = employeeConfigInfo.getJsy().getId(); |
| 225 | 247 | // this.jGh = employeeConfigInfo.getJsy().getJobCode(); | ... | ... |
src/main/java/com/bsth/entity/schedule/rule/RerunRule.java
| ... | ... | @@ -70,6 +70,8 @@ public class RerunRule extends BEntity { |
| 70 | 70 | private GuideboardInfo useLp; |
| 71 | 71 | /** 对应路牌替换类型,hr;换人,hc:换车,all:换人换车 */ |
| 72 | 72 | private String useType; |
| 73 | + /** 使用换人类型(zb:早班的人,wb:晚班的人,all:不分早晚班) */ | |
| 74 | + private String useHrtype; | |
| 73 | 75 | |
| 74 | 76 | //--------- 对应班车 ----------/ |
| 75 | 77 | /** 车辆配置 */ |
| ... | ... | @@ -261,4 +263,12 @@ public class RerunRule extends BEntity { |
| 261 | 263 | public void setUseType(String useType) { |
| 262 | 264 | this.useType = useType; |
| 263 | 265 | } |
| 266 | + | |
| 267 | + public String getUseHrtype() { | |
| 268 | + return useHrtype; | |
| 269 | + } | |
| 270 | + | |
| 271 | + public void setUseHrtype(String useHrtype) { | |
| 272 | + this.useHrtype = useHrtype; | |
| 273 | + } | |
| 264 | 274 | } | ... | ... |
src/main/java/com/bsth/service/schedule/rules/ScheduleRuleServiceImpl.java
| ... | ... | @@ -45,6 +45,7 @@ public class ScheduleRuleServiceImpl implements ScheduleRuleService { |
| 45 | 45 | ", use_xl as s_dylp_xl " + |
| 46 | 46 | ", use_lp as s_dylp_lp " + |
| 47 | 47 | ", use_type as s_dylp_type " + |
| 48 | + ", use_hrtype as s_dylp_hrtype " + | |
| 48 | 49 | ", cl as s_dybc_cl " + |
| 49 | 50 | ", cl_zbh as s_dybc_clzbh " + |
| 50 | 51 | ", j as s_dybc_j " + |
| ... | ... | @@ -76,6 +77,7 @@ public class ScheduleRuleServiceImpl implements ScheduleRuleService { |
| 76 | 77 | rerunRule_input.setS_xl(String.valueOf(resultSet.getInt("s_dylp_xl"))); |
| 77 | 78 | rerunRule_input.setS_lp(String.valueOf(resultSet.getLong("s_dylp_lp"))); |
| 78 | 79 | rerunRule_input.setUsetype(resultSet.getString("s_dylp_type")); |
| 80 | + rerunRule_input.setUserhrtype(resultSet.getString("s_dylp_hrtype")); | |
| 79 | 81 | } else if ("dybc".equals(resultSet.getString("type"))) { |
| 80 | 82 | rerunRule_input.setCl(resultSet.getInt("s_dybc_cl")); |
| 81 | 83 | rerunRule_input.setZbh(resultSet.getString("s_dybc_clzbh")); | ... | ... |
src/main/java/com/bsth/service/schedule/rules/rerun/RerunRule_input.java
| ... | ... | @@ -13,6 +13,7 @@ public class RerunRule_input { |
| 13 | 13 | private String s_xl; // 对应路牌,线路Id |
| 14 | 14 | private String s_lp; // 对应路牌,路牌Id |
| 15 | 15 | private String usetype; // 对应路牌替换类型 |
| 16 | + private String userhrtype; // 对应路牌换人类型 | |
| 16 | 17 | |
| 17 | 18 | private Integer cl; // 对应班车,车辆Id |
| 18 | 19 | private String zbh; // 对应班车,车辆自编号 |
| ... | ... | @@ -150,4 +151,12 @@ public class RerunRule_input { |
| 150 | 151 | public void setUsetype(String usetype) { |
| 151 | 152 | this.usetype = usetype; |
| 152 | 153 | } |
| 154 | + | |
| 155 | + public String getUserhrtype() { | |
| 156 | + return userhrtype; | |
| 157 | + } | |
| 158 | + | |
| 159 | + public void setUserhrtype(String userhrtype) { | |
| 160 | + this.userhrtype = userhrtype; | |
| 161 | + } | |
| 153 | 162 | } | ... | ... |
src/main/resources/rules/rerun.drl
| ... | ... | @@ -100,7 +100,7 @@ declare Dylp_ScheduleResult_output_wrap |
| 100 | 100 | sd: DateTime // 日期 |
| 101 | 101 | lp: String // 路牌 |
| 102 | 102 | cc: CarConfigInfo // 使用的车辆配置 |
| 103 | - ec: EmployeeConfigInfo // 使用的人员配置 | |
| 103 | + ec: List // 使用的人员配置 List<EmployeeConfigInfo> | |
| 104 | 104 | end |
| 105 | 105 | |
| 106 | 106 | rule "calcu_Dylp_ScheduleResult_output_wrap" |
| ... | ... | @@ -116,7 +116,13 @@ rule "calcu_Dylp_ScheduleResult_output_wrap" |
| 116 | 116 | wrap.setSd($sr.getSd()); |
| 117 | 117 | wrap.setLp($sr.getGuideboardId()); |
| 118 | 118 | wrap.setCc((CarConfigInfo) $ccmap.get($sr.getCarConfigId())); |
| 119 | - wrap.setEc((EmployeeConfigInfo) $ecmap.get($sr.getEmployeeConfigId())); | |
| 119 | + | |
| 120 | + List ecs = new ArrayList(); | |
| 121 | + String[] ecids = $sr.getEmployeeConfigId().split("-"); // 分班的人 | |
| 122 | + for (int i = 0; i < ecids.length; i++) { | |
| 123 | + ecs.add($ecmap.get(ecids[i])); | |
| 124 | + } | |
| 125 | + wrap.setEc(ecs); | |
| 120 | 126 | |
| 121 | 127 | // log.info("xlid = {}", $xlId); |
| 122 | 128 | |
| ... | ... | @@ -135,7 +141,7 @@ rule "calcu_Dylp_rerun_update_dylp" |
| 135 | 141 | ttinfo == $ttinfo.toString(), |
| 136 | 142 | lp == $lp.toString(), |
| 137 | 143 | fcsj == $fcsj, |
| 138 | - $sxl: s_xl, $slp: s_lp, $type: usetype | |
| 144 | + $sxl: s_xl, $slp: s_lp, $type: usetype, $hrtype: userhrtype | |
| 139 | 145 | ) |
| 140 | 146 | $dsro: Dylp_ScheduleResult_output_wrap( |
| 141 | 147 | xlId == $sxl, |
| ... | ... | @@ -145,7 +151,7 @@ rule "calcu_Dylp_rerun_update_dylp" |
| 145 | 151 | then |
| 146 | 152 | // log.info("TODO:测试 {}", $fcsj); |
| 147 | 153 | |
| 148 | - $spi.setRerunInfoDylp($dsro.getCc(), $dsro.getEc(), $type); | |
| 154 | + $spi.setRerunInfoDylp($dsro.getCc(), $dsro.getEc(), $type, $hrtype); | |
| 149 | 155 | |
| 150 | 156 | end |
| 151 | 157 | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/edit.html
| ... | ... | @@ -182,6 +182,13 @@ |
| 182 | 182 | <sa-Radiogroup model="ctrl.rerunManageForSave.useType" dicgroup="dylptype" name="useType"></sa-Radiogroup> |
| 183 | 183 | </div> |
| 184 | 184 | </div> |
| 185 | + <div class="form-group has-success has-feedback" | |
| 186 | + ng-if="ctrl.rerunManageForSave.rerunType == 'dylp' && (ctrl.rerunManageForSave.useType == 'all' || ctrl.rerunManageForSave.useType == 'hr')"> | |
| 187 | + <label class="col-md-2 control-label">换人类型:</label> | |
| 188 | + <div class="col-md-3"> | |
| 189 | + <sa-Radiogroup model="ctrl.rerunManageForSave.useHrtype" dicgroup="dylphrtype" name="useHrype"></sa-Radiogroup> | |
| 190 | + </div> | |
| 191 | + </div> | |
| 185 | 192 | |
| 186 | 193 | |
| 187 | 194 | <div class="form-group has-success has-feedback" ng-if="ctrl.rerunManageForSave.rerunType == 'dybc'"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/form.html
| ... | ... | @@ -182,6 +182,13 @@ |
| 182 | 182 | <sa-Radiogroup model="ctrl.rerunManageForSave.useType" dicgroup="dylptype" name="useType"></sa-Radiogroup> |
| 183 | 183 | </div> |
| 184 | 184 | </div> |
| 185 | + <div class="form-group has-success has-feedback" | |
| 186 | + ng-if="ctrl.rerunManageForSave.rerunType == 'dylp' && (ctrl.rerunManageForSave.useType == 'all' || ctrl.rerunManageForSave.useType == 'hr')"> | |
| 187 | + <label class="col-md-2 control-label">换人类型:</label> | |
| 188 | + <div class="col-md-3"> | |
| 189 | + <sa-Radiogroup model="ctrl.rerunManageForSave.useHrtype" dicgroup="dylphrtype" name="useHrype"></sa-Radiogroup> | |
| 190 | + </div> | |
| 191 | + </div> | |
| 185 | 192 | |
| 186 | 193 | |
| 187 | 194 | <div class="form-group has-success has-feedback" ng-if="ctrl.rerunManageForSave.rerunType == 'dybc'"> | ... | ... |
src/main/resources/static/pages/scheduleApp/module/core/rerunManage/module.js
| ... | ... | @@ -170,6 +170,7 @@ angular.module('ScheduleApp').controller( |
| 170 | 170 | // 初始表单,从查询条件中获取线路id |
| 171 | 171 | self.rerunManageForSave.rerunXl.id = service.getSearchCondition()['rerunXl.id_eq']; |
| 172 | 172 | self.rerunManageForSave.useType = "all"; |
| 173 | + self.rerunManageForSave.useHrtype = "all"; | |
| 173 | 174 | } |
| 174 | 175 | |
| 175 | 176 | // 提交方法 | ... | ... |