Commit cb98ba6b81bfb5fc62051432af1ad17f5d6954f6

Authored by 徐烜
1 parent ed9bb7ee

PSM-12

src/main/java/com/bsth/entity/schedule/SchedulePlanInfo.java
@@ -3,6 +3,7 @@ package com.bsth.entity.schedule; @@ -3,6 +3,7 @@ package com.bsth.entity.schedule;
3 import com.bsth.entity.Line; 3 import com.bsth.entity.Line;
4 import com.bsth.entity.sys.SysUser; 4 import com.bsth.entity.sys.SysUser;
5 import com.bsth.service.schedule.rules.shiftloop.ScheduleResult_output; 5 import com.bsth.service.schedule.rules.shiftloop.ScheduleResult_output;
  6 +import org.apache.commons.lang3.StringUtils;
6 7
7 import javax.persistence.*; 8 import javax.persistence.*;
8 import java.util.Date; 9 import java.util.Date;
@@ -183,7 +184,16 @@ public class SchedulePlanInfo { @@ -183,7 +184,16 @@ public class SchedulePlanInfo {
183 184
184 // 关联的车辆信息 185 // 关联的车辆信息
185 this.cl = carConfigInfo.getCl().getId(); // 车辆id 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 // TODO:报道时间,出场时间没有 198 // TODO:报道时间,出场时间没有
189 // 关联的驾驶员 199 // 关联的驾驶员