|
|
|
@ -8,6 +8,7 @@ import lombok.Data;
|
|
|
|
|
|
|
|
|
|
|
|
import javax.validation.constraints.NotEmpty;
|
|
|
|
import javax.validation.constraints.NotEmpty;
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
import javax.validation.constraints.NotNull;
|
|
|
|
|
|
|
|
import java.util.UUID;
|
|
|
|
|
|
|
|
|
|
|
|
@Data
|
|
|
|
@Data
|
|
|
|
public class TransmissionPojo {
|
|
|
|
public class TransmissionPojo {
|
|
|
|
@ -17,6 +18,7 @@ public class TransmissionPojo {
|
|
|
|
private String streetNumber;//巷道标识符
|
|
|
|
private String streetNumber;//巷道标识符
|
|
|
|
|
|
|
|
|
|
|
|
private Integer row;//行
|
|
|
|
private Integer row;//行
|
|
|
|
|
|
|
|
private Integer column;//列
|
|
|
|
|
|
|
|
|
|
|
|
private String pcd;//点位文件路径
|
|
|
|
private String pcd;//点位文件路径
|
|
|
|
private String taskId;
|
|
|
|
private String taskId;
|
|
|
|
@ -33,19 +35,31 @@ public class TransmissionPojo {
|
|
|
|
this.streetNumber = street.getPlcId();
|
|
|
|
this.streetNumber = street.getPlcId();
|
|
|
|
this.taskId = checkLog.getLotnum();
|
|
|
|
this.taskId = checkLog.getLotnum();
|
|
|
|
this.row = checkLog.getRow();
|
|
|
|
this.row = checkLog.getRow();
|
|
|
|
|
|
|
|
this.column = checkLog.getColumn();
|
|
|
|
this.direction = checkLog.getDirection();
|
|
|
|
this.direction = checkLog.getDirection();
|
|
|
|
this.count = checkLog.getCount();
|
|
|
|
this.count = checkLog.getCount();
|
|
|
|
this.category = checkLog.getCategory().split("/")[0];
|
|
|
|
this.category = checkLog.getCategory().split("/")[0];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public TransmissionPojo( Street street,Integer row , Integer column){
|
|
|
|
|
|
|
|
this.streetNumber = street.getPlcId();
|
|
|
|
|
|
|
|
this.row = row;
|
|
|
|
|
|
|
|
this.column = column;
|
|
|
|
|
|
|
|
this.checkId = 0;
|
|
|
|
|
|
|
|
this.taskId = "0";
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public String toString(TransmissionType type) {
|
|
|
|
public String toString(TransmissionType type) {
|
|
|
|
this.header = type.toString();
|
|
|
|
this.header = type.toString();
|
|
|
|
if (type == TransmissionType.ST) {
|
|
|
|
if (type == TransmissionType.ST) {
|
|
|
|
return "ST&" + streetNumber + "&" + checkId + "&" + taskId + "&" + direction ;
|
|
|
|
return "ST&" + streetNumber + "&" + checkId + "&" + taskId + "&" + direction ;
|
|
|
|
}else if (type == TransmissionType.GPS) {
|
|
|
|
}else if (type == TransmissionType.GPS) {
|
|
|
|
return "GPS&" + streetNumber +"/"+row+ "&" + checkId + "&" + taskId + "&" + direction+ "&" + category + "&" + count;
|
|
|
|
return "GPS&" + streetNumber +"/"+row +"/"+column+ "&" + checkId + "&" + taskId + "&" + direction+ "&" + category + "&" + count;
|
|
|
|
}else if (type == TransmissionType.RTS) {
|
|
|
|
}else if (type == TransmissionType.RTS) {
|
|
|
|
return "RTS&" + streetNumber +"/"+row+ "&" + checkId + "&" + taskId + "&" + direction + "&" + category + "&" + count;
|
|
|
|
return "RTS&" + streetNumber +"/"+row +"/"+column+ "&" + checkId + "&" + taskId + "&" + direction + "&" + category + "&" + count;
|
|
|
|
|
|
|
|
}else if (type == TransmissionType.SGPS) {
|
|
|
|
|
|
|
|
return "SRTS&" + streetNumber +"/"+row +"/"+column+ "&" + checkId + "&" + taskId + "&" + direction ;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return "";
|
|
|
|
return "";
|
|
|
|
}
|
|
|
|
}
|
|
|
|
@ -59,6 +73,7 @@ public class TransmissionPojo {
|
|
|
|
String[] dataArr = dataArray[1].split("/");
|
|
|
|
String[] dataArr = dataArray[1].split("/");
|
|
|
|
this.streetNumber = dataArr[0];
|
|
|
|
this.streetNumber = dataArr[0];
|
|
|
|
this.row = Integer.valueOf(dataArr[1]);
|
|
|
|
this.row = Integer.valueOf(dataArr[1]);
|
|
|
|
|
|
|
|
this.column = Integer.valueOf(dataArr[2]);
|
|
|
|
}else {
|
|
|
|
}else {
|
|
|
|
this.streetNumber = dataArray[1];
|
|
|
|
this.streetNumber = dataArray[1];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|