Commit a2bfe059 zshaohui

上传库位模板和查询 增加机种字段

1 个父辈 04e819a3
......@@ -443,6 +443,7 @@ public class StorageController {
titles.add("w");
titles.add("pn");
titles.add("whcode");
titles.add("model");
for(int i=1;i<=10;i++) {
Map<String, Object> map = new LinkedHashMap<>();
......@@ -453,6 +454,7 @@ public class StorageController {
map.put("w", 7);
map.put("pn","");
map.put("whcode","W10B");
map.put("model","X8");
maps.add(map);
}
......@@ -485,6 +487,7 @@ public class StorageController {
int hIndex = csvRead.getCsvIndex("高度","h");
int wIndex = csvRead.getCsvIndex("宽度","w");
int whcodeIndex = csvRead.getCsvIndex("库别","whcode");
int modelIndex = csvRead.getCsvIndex("机种","model");
int row = 1;
int newRowCount = 0;
......@@ -500,6 +503,7 @@ public class StorageController {
Integer height =0;
Integer width =0;
String whcode = lineValues[whcodeIndex];
String model = lineValues[modelIndex];
try {
priority =Integer.parseInt(lineValues[priIndex]) ;
height = Integer.parseInt(lineValues[hIndex]);
......@@ -524,10 +528,11 @@ public class StorageController {
if(posInfo == null){
posInfo=new StoragePos(storageId,posName,height,width,priority);
posInfo.setWareHouseCode(whcode);
posInfo.setModel(model);
newRowCount++;
newList.add(posInfo);
}else{
boolean needUpdate=posInfo.updatePosInfo(storageId,posName,height,width,priority,whcode);
boolean needUpdate=posInfo.updatePosInfo(storageId,posName,height,width,priority,whcode,model);
if(needUpdate){
updateRowCount++;
storagePosManager.save(posInfo);
......
......@@ -93,4 +93,7 @@ public class StoragePosDto implements Serializable {
@ApiModelProperty("库别")
private String wareHouseCode;
@ApiModelProperty("机种")
private String model = "";
}
......@@ -32,7 +32,7 @@ public class StoragePos extends BasePo implements Serializable {
setCoordinate(new double[]{point.getX(),point.getY()});
}
public boolean updatePosInfo(String storageId,String posName,int h,int w,int priority,String whCode){
public boolean updatePosInfo(String storageId,String posName,int h,int w,int priority,String whCode,String model){
boolean needUpdate=false;
if(!getPosName().equals(posName)){
needUpdate=true;
......@@ -60,6 +60,11 @@ public class StoragePos extends BasePo implements Serializable {
needUpdate = true;
}
if (StringUtils.isNotEmpty(model)){
setModel(model);
needUpdate = true;
}
Point point= PointUtil.getPosPoint(getPosName());
if(getCoordinate()==null||getCoordinate().length!=2||
(getCoordinate()[0]!=point.getX()) ||(getCoordinate()[1]!=point.getY())){
......@@ -154,6 +159,11 @@ public class StoragePos extends BasePo implements Serializable {
*/
private String wareHouseCode;
/**
* 机种
*/
private String model;
public String getLabelStr(){
String posNameLabel = posName;
int index = posNameLabel.lastIndexOf(":");
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!