Commit 30564558 hc

fix:备品仓出入库修改

1 个父辈 595d9c52
...@@ -220,7 +220,6 @@ public class BarcodeManagerImpl implements IBarcodeManager { ...@@ -220,7 +220,6 @@ public class BarcodeManagerImpl implements IBarcodeManager {
} }
protected void validateSave(Barcode barcode) throws ValidateException { protected void validateSave(Barcode barcode) throws ValidateException {
barcode.setPartNumber(barcode.getPn());
if (barcode.getBarcode()==null) { if (barcode.getBarcode()==null) {
throw new ValidateException("smfcore.valueCanotNull","{0}不能为空",new String[]{"barcode"} ); throw new ValidateException("smfcore.valueCanotNull","{0}不能为空",new String[]{"barcode"} );
// throw new ValidateException("barcode.error.empty"); // throw new ValidateException("barcode.error.empty");
......
...@@ -245,8 +245,9 @@ public class SpAgvDeviceClientController { ...@@ -245,8 +245,9 @@ public class SpAgvDeviceClientController {
log.info(barcode.getBarcode()+"生成ctu的任务信息"+JSON.toJSONString(taskData)); log.info(barcode.getBarcode()+"生成ctu的任务信息"+JSON.toJSONString(taskData));
} catch (Throwable e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
log.info(e.getMessage());
} }
return ResultBean.newOkResult(taskData); return ResultBean.newOkResult(taskData);
} }
......
...@@ -166,7 +166,7 @@ public class SpBoxPutInController { ...@@ -166,7 +166,7 @@ public class SpBoxPutInController {
boolean isOk = false; boolean isOk = false;
String codePartNumber = codeBarcode.getPartNumber(); String codePartNumber = codeBarcode.getPartNumber();
for (Barcode barcode : boxBarcode.getSubCodeList()) { for (Barcode barcode : boxBarcode.getSubCodeList()) {
String pn = barcode.getPn(); String pn = barcode.getPartNumber();
int binNum = Integer.parseInt(barcode.getBarcode().split("-")[1]); int binNum = Integer.parseInt(barcode.getBarcode().split("-")[1]);
if (pn.equals(codePartNumber) && (binNum == Integer.parseInt(binCodeStr.split("-")[1]))) { if (pn.equals(codePartNumber) && (binNum == Integer.parseInt(binCodeStr.split("-")[1]))) {
isOk = true; isOk = true;
...@@ -238,7 +238,6 @@ public class SpBoxPutInController { ...@@ -238,7 +238,6 @@ public class SpBoxPutInController {
} }
LuxsanSpApi.spareInHourse(new SpareInHourseRequest(baseNo.getDeptId(),baseNo.getNo(),baseNo.getWhCode(), details)); LuxsanSpApi.spareInHourse(new SpareInHourseRequest(baseNo.getDeptId(),baseNo.getNo(),baseNo.getWhCode(), details));
} }
baseNo.setSpareStatus(SpareNostatus.CLOSE_STATUS);
} }
if (baseNo.getClass().equals(SpareNo.class)) { if (baseNo.getClass().equals(SpareNo.class)) {
...@@ -252,7 +251,11 @@ public class SpBoxPutInController { ...@@ -252,7 +251,11 @@ public class SpBoxPutInController {
//4.开始放入料箱 //4.开始放入料箱
binBarcode.setPartNumber(codePartNumber);
binBarcode.setAmount(binBarcode.getAmount()+codeBarcode.getQty()); binBarcode.setAmount(binBarcode.getAmount()+codeBarcode.getQty());
barcodeManager.save(binBarcode);
boxBarcode.updateSubCodes(binBarcode); boxBarcode.updateSubCodes(binBarcode);
barcodeManager.save(boxBarcode); barcodeManager.save(boxBarcode);
......
...@@ -191,13 +191,11 @@ public class SpBoxUtil { ...@@ -191,13 +191,11 @@ public class SpBoxUtil {
} }
public static String getPartNumber(List<Barcode> subCodeList,String reelId){ public static String getPartNumber(List<Barcode> subCodeList,String reelId){
for (Barcode barcode : subCodeList) {
}
if (subCodeList != null && !subCodeList.isEmpty()){ if (subCodeList != null && !subCodeList.isEmpty()){
for (Barcode barcode : subCodeList) { for (Barcode barcode : subCodeList) {
if (reelId.replace("0", "") if (reelId.replace("0", "")
.equals(barcode.getBarcode().replace("0", ""))){ .equals(barcode.getBarcode().replace("0", ""))){
return barcode.getPn(); return barcode.getPartNumber();
} }
} }
} }
......
...@@ -223,6 +223,7 @@ public class SpareNoCache { ...@@ -223,6 +223,7 @@ public class SpareNoCache {
String pn = detail.getPartno(); String pn = detail.getPartno();
Barcode newPn = new Barcode(); Barcode newPn = new Barcode();
newPn.setPn(pn); newPn.setPn(pn);
newPn.setPartNumber(pn);
newPn.setAmount(0); newPn.setAmount(0);
newPn.setInitialAmount(0); newPn.setInitialAmount(0);
newPn.setOut(false); newPn.setOut(false);
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!