Commit 26f35b58 LN

库存报表中格口未更新

1 个父辈 4e5fb311
...@@ -614,7 +614,7 @@ public class DataCache { ...@@ -614,7 +614,7 @@ public class DataCache {
if(ObjectUtil.isEmpty(wcode)){ if(ObjectUtil.isEmpty(wcode)){
wcode=""; wcode="";
} }
log.info("updateInventoryAmount : cid="+cid+",pn="+partNumber+",amount="+amount+",pn="+pn); log.info("updateInventoryAmount : cid="+cid+",pn="+partNumber+",amount="+amount+",pn="+pn+",wcode="+wcode);
InventoryItem inventoryItem = getStorageInventoryByPartNumber(cid,partNumber); InventoryItem inventoryItem = getStorageInventoryByPartNumber(cid,partNumber);
if(inventoryItem == null){ if(inventoryItem == null){
inventoryItem = new InventoryItem(); inventoryItem = new InventoryItem();
...@@ -636,7 +636,7 @@ public class DataCache { ...@@ -636,7 +636,7 @@ public class DataCache {
* @param amount * @param amount
* @return * @return
*/ */
public int updateInAmount(String cid,String partNumber,int amount,String pn,String wcode){ public int updateInAmount(String cid,String partNumber,int amount,String pn,String wcode,String gekou){
if(amount != 0){ if(amount != 0){
if(ObjectUtil.isEmpty(pn)){ if(ObjectUtil.isEmpty(pn)){
pn=""; pn="";
...@@ -644,13 +644,15 @@ public class DataCache { ...@@ -644,13 +644,15 @@ public class DataCache {
if(ObjectUtil.isEmpty(wcode)){ if(ObjectUtil.isEmpty(wcode)){
wcode=""; wcode="";
} }
log.info("updateInAmount,直接更改库存="+amount+",不需要计算 : cid="+cid+",pn="+partNumber+",amount="+amount+",pn="+pn); log.info("updateInAmount,直接更改库存="+amount+",不需要计算 : cid="+cid+",pn="+partNumber+",amount="+amount+",pn="+pn+",wcode="+wcode+",gekou="+gekou);
InventoryItem inventoryItem = getStorageInventoryByPartNumber(cid,partNumber); InventoryItem inventoryItem = getStorageInventoryByPartNumber(cid,partNumber);
if(inventoryItem == null){ if(inventoryItem == null){
inventoryItem = new InventoryItem(); inventoryItem = new InventoryItem();
inventoryItem.setPartNumber(partNumber); inventoryItem.setPartNumber(partNumber);
inventoryItem.setWareHouseCode(wcode); inventoryItem.setWareHouseCode(wcode);
inventoryItem.setPartname(pn); inventoryItem.setPartname(pn);
inventoryItem.setGekouName(gekou);
} }
inventoryItem.setStockCount(amount); inventoryItem.setStockCount(amount);
inventoryItem.setStockReel(1); inventoryItem.setStockReel(1);
......
...@@ -412,7 +412,7 @@ public class SpAgvDeviceClientController { ...@@ -412,7 +412,7 @@ public class SpAgvDeviceClientController {
for (Barcode subCode : subCodes) { for (Barcode subCode : subCodes) {
subCode.setStorageId(storage.getId()); subCode.setStorageId(storage.getId());
barcodeManager.save(subCode); barcodeManager.save(subCode);
dataCache.updateInAmount(storage.getCid(), subCode.getPartNumber(), subCode.getAmount(),subCode.getPn(),storagePos.getWareHouseCode()); dataCache.updateInAmount(storage.getCid(), subCode.getPartNumber(), subCode.getAmount(),subCode.getPn(),storagePos.getWareHouseCode(),subCode.getBarcode());
} }
} }
barcode.setSubCodeList(subCodes); barcode.setSubCodeList(subCodes);
...@@ -473,7 +473,7 @@ public class SpAgvDeviceClientController { ...@@ -473,7 +473,7 @@ public class SpAgvDeviceClientController {
if (subCodes != null && !subCodes.isEmpty()) { if (subCodes != null && !subCodes.isEmpty()) {
Storage storage = dataCache.getStorageById(storagePos.getStorageId()); Storage storage = dataCache.getStorageById(storagePos.getStorageId());
for (Barcode subCode : subCodes) { for (Barcode subCode : subCodes) {
dataCache.updateInAmount(storage.getCid(), subCode.getPartNumber(), subCode.getAmount(),subCode.getPn(),storagePos.getWareHouseCode()); dataCache.updateInAmount(storage.getCid(), subCode.getPartNumber(), subCode.getAmount(),subCode.getPn(),storagePos.getWareHouseCode(),subCode.getBarcode());
} }
} }
} }
......
支持 Markdown 格式
你添加了 0 到此讨论。请谨慎行事。
Finish editing this message first!