|
|
|
|
@ -3,6 +3,7 @@ package com.zhehekeji.web.service.client;
|
|
|
|
|
import com.zhehekeji.web.entity.CheckLog;
|
|
|
|
|
import com.zhehekeji.web.entity.Street;
|
|
|
|
|
import io.swagger.annotations.ApiModelProperty;
|
|
|
|
|
import io.swagger.models.auth.In;
|
|
|
|
|
import lombok.Data;
|
|
|
|
|
|
|
|
|
|
import javax.validation.constraints.NotEmpty;
|
|
|
|
|
@ -14,6 +15,10 @@ public class TransmissionPojo {
|
|
|
|
|
private String[] dataArray;
|
|
|
|
|
private String header;
|
|
|
|
|
private String streetNumber;//巷道标识符
|
|
|
|
|
|
|
|
|
|
private Integer row;//行
|
|
|
|
|
|
|
|
|
|
private String pcd;//点位文件路径
|
|
|
|
|
private String taskId;
|
|
|
|
|
private Integer checkId;
|
|
|
|
|
private Integer direction;//左右
|
|
|
|
|
@ -27,6 +32,7 @@ public class TransmissionPojo {
|
|
|
|
|
this.checkId = checkLog.getId();
|
|
|
|
|
this.streetNumber = street.getPlcId();
|
|
|
|
|
this.taskId = checkLog.getLotnum();
|
|
|
|
|
this.row = checkLog.getRow();
|
|
|
|
|
this.direction = checkLog.getDirection();
|
|
|
|
|
this.count = checkLog.getCount();
|
|
|
|
|
this.category = checkLog.getCategory().split("/")[0];
|
|
|
|
|
@ -49,7 +55,13 @@ public class TransmissionPojo {
|
|
|
|
|
data = data.replace(">", "");
|
|
|
|
|
this.dataArray = data.split("&");
|
|
|
|
|
this.header = dataArray[0];
|
|
|
|
|
if(dataArray[1].contains("/")) {
|
|
|
|
|
String[] dataArr = dataArray[1].split("/");
|
|
|
|
|
this.streetNumber = dataArr[0];
|
|
|
|
|
this.row = Integer.valueOf(dataArr[1]);
|
|
|
|
|
}else {
|
|
|
|
|
this.streetNumber = dataArray[1];
|
|
|
|
|
}
|
|
|
|
|
if (dataArray.length > 2) {
|
|
|
|
|
this.checkId = Integer.valueOf(dataArray[2]);
|
|
|
|
|
this.taskId = (dataArray[3]);
|
|
|
|
|
@ -65,11 +77,14 @@ public class TransmissionPojo {
|
|
|
|
|
this.picsPath = dataArray[8].split(";");
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
if (dataArray.length > 9) {
|
|
|
|
|
this.pcd = dataArray[9];
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public static void main(String[] args) {
|
|
|
|
|
TransmissionPojo transmissionPojo = new TransmissionPojo("RT&6&2121&1&S001&25&1&1.jpg;2.jpg>");
|
|
|
|
|
TransmissionPojo transmissionPojo = new TransmissionPojo("RTE&6/3&562493&2121&1&S001&25&1&1.jpg;2.jpg&1.pcd>");
|
|
|
|
|
System.out.println(transmissionPojo);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|