Commit cb98ba6b81bfb5fc62051432af1ad17f5d6954f6
1 parent
ed9bb7ee
PSM-12
Showing
1 changed file
with
11 additions
and
1 deletions
src/main/java/com/bsth/entity/schedule/SchedulePlanInfo.java
| ... | ... | @@ -3,6 +3,7 @@ package com.bsth.entity.schedule; |
| 3 | 3 | import com.bsth.entity.Line; |
| 4 | 4 | import com.bsth.entity.sys.SysUser; |
| 5 | 5 | import com.bsth.service.schedule.rules.shiftloop.ScheduleResult_output; |
| 6 | +import org.apache.commons.lang3.StringUtils; | |
| 6 | 7 | |
| 7 | 8 | import javax.persistence.*; |
| 8 | 9 | import java.util.Date; |
| ... | ... | @@ -183,7 +184,16 @@ public class SchedulePlanInfo { |
| 183 | 184 | |
| 184 | 185 | // 关联的车辆信息 |
| 185 | 186 | this.cl = carConfigInfo.getCl().getId(); // 车辆id |
| 186 | - this.clZbh = carConfigInfo.getCl().getInsideCode(); // 自编号/内部编号 | |
| 187 | +// this.clZbh = carConfigInfo.getCl().getInsideCode(); // 自编号/内部编号 | |
| 188 | + // 有时候自编号是内部编号的一部分,由-隔开,需要处理一下 | |
| 189 | + if (StringUtils.isNotEmpty(carConfigInfo.getCl().getInsideCode())) { | |
| 190 | + String[] incode_temp = carConfigInfo.getCl().getInsideCode().split("-"); | |
| 191 | + if (incode_temp.length > 1) { | |
| 192 | + this.clZbh = incode_temp[1]; | |
| 193 | + } else { | |
| 194 | + this.clZbh = incode_temp[0]; | |
| 195 | + } | |
| 196 | + } | |
| 187 | 197 | |
| 188 | 198 | // TODO:报道时间,出场时间没有 |
| 189 | 199 | // 关联的驾驶员 | ... | ... |