package com.zy.asrs.entity.param;
|
|
import lombok.Data;
|
|
@Data
|
public class CarryParam {
|
//工作号
|
private String taskNo;
|
|
//入出库类型
|
private Integer ioType;
|
|
//优先级
|
private Integer taskPriority;
|
|
//容器编码
|
private String barcode;
|
|
//起点
|
private String startPoint;
|
|
//目标点
|
private String targetPoint;
|
|
//备注
|
private String meno;
|
|
public void updateLocNo(){
|
startPoint = getPut(startPoint);
|
targetPoint = getPut(targetPoint);
|
}
|
public void updateIoTyoe(Integer ioTypeOld){
|
switch (ioTypeOld){
|
case 1:
|
this.ioType = 2;
|
break;
|
case 2:
|
this.ioType = 3;
|
break;
|
case 3:
|
this.ioType = 1;
|
break;
|
default:
|
this.ioType = 3;
|
}
|
}
|
|
public String getPut(String point){
|
String[] split = point.split("-");
|
if (split.length == 5){
|
// String locNo = String.format("%02d", ) +
|
// String.format("%03d", split[3]) +
|
// String.format("%02d", split[4]);
|
|
return split[2]+"0"+split[3]+split[4];
|
} else {
|
return point;
|
}
|
}
|
|
public static String zerofill(String msg, Integer count){
|
if (msg.length() == count){
|
return msg;
|
} else if (msg.length() > count){
|
return msg.substring(0, 16);
|
} else {
|
StringBuilder msgBuilder = new StringBuilder(msg);
|
for (int i = 0; i<count-msg.length(); i++){
|
msgBuilder.insert(0,"0");
|
}
|
return msgBuilder.toString();
|
}
|
}
|
|
}
|