Commit a2bfe059 zshaohui

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

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