|
|
|
@ -5,7 +5,9 @@ import com.dreamchaser.depository_manage.config.PortConfig; |
|
|
|
import com.dreamchaser.depository_manage.entity.*; |
|
|
|
import com.dreamchaser.depository_manage.exception.MyException; |
|
|
|
import com.dreamchaser.depository_manage.mapper.*; |
|
|
|
import com.dreamchaser.depository_manage.pojo.RestResponse; |
|
|
|
import com.dreamchaser.depository_manage.pojo.SimpleStockTakingP; |
|
|
|
import com.dreamchaser.depository_manage.pojo.StatusInfo; |
|
|
|
import com.dreamchaser.depository_manage.pojo.StockTakingChildP; |
|
|
|
import com.dreamchaser.depository_manage.pojo.callBackXml.approvalCallBackXml.ApprovalInfo_Details; |
|
|
|
import com.dreamchaser.depository_manage.pojo.callBackXml.approvalCallBackXml.ApprovalInfo_Details_Approver; |
|
|
|
@ -270,7 +272,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
stockTakingChildP.setTakingResultShow("正常"); |
|
|
|
} |
|
|
|
stockTakingChildP.setShowUnit(stockTakingChildP.getUnit()); |
|
|
|
if("-1".equals(stockTakingChildP.getShowUnit())){ |
|
|
|
if ("-1".equals(stockTakingChildP.getShowUnit())) { |
|
|
|
Inventory inventoryById = materialMapper.findInventoryById(stockTakingChildP.getMid()); |
|
|
|
stockTakingChildP.setShowUnit(inventoryById.getUnit()); |
|
|
|
} |
|
|
|
@ -391,7 +393,6 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
MaterialAndPlace placeAndMaterialByMidAndPid = placeMapper.findPlaceAndMaterialByMidAndPid(paramForMaterialAndPlace); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 根据盘点结果重新计算物料的单价
|
|
|
|
|
|
|
|
|
|
|
|
@ -407,8 +408,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
int newNumberForPlace = 0; |
|
|
|
// 用于计算新的库位与物料对应关系的数量
|
|
|
|
int newNumberForMatrialAndPlace = 0; |
|
|
|
if ("Inventory_up".equals(takingResult)) |
|
|
|
{ |
|
|
|
if ("Inventory_up".equals(takingResult)) { |
|
|
|
// 如果盘盈
|
|
|
|
|
|
|
|
// 更新当前库位数量
|
|
|
|
@ -432,8 +432,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 更新物料与库位对应关系的数量
|
|
|
|
placeAndMaterialByMidAndPid.setQuantity(newNumberForMatrialAndPlace); |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
|
|
|
|
// 如果盘亏
|
|
|
|
newNumberForPlace = placeById.getQuantity() - inventory; |
|
|
|
@ -536,7 +535,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
} |
|
|
|
String s = QyWxUid.toString(); |
|
|
|
s = "PangFuZhen,"; |
|
|
|
qyWxOperationService.sendMessageForOtherUserByCard(ObjectFormatUtil.toInteger(mainId),s,userAgent,2); |
|
|
|
qyWxOperationService.sendMessageForOtherUserByCard(ObjectFormatUtil.toInteger(mainId), s, userAgent, 2); |
|
|
|
} |
|
|
|
}).start(); |
|
|
|
|
|
|
|
@ -594,6 +593,8 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
List<StockTakingChildP> minRecordList = stockTakingMapper.selectStockTakingChildByMainId(mainId); |
|
|
|
// 遍历当前拆单的子单详情
|
|
|
|
for (StockTakingChildP minRecord : minRecordList) { |
|
|
|
|
|
|
|
|
|
|
|
// 获取子单详情
|
|
|
|
|
|
|
|
Integer placeId = minRecord.getPid(); |
|
|
|
@ -605,13 +606,6 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
|
|
|
|
// 获取当前盘点的计量单位
|
|
|
|
String unit = minRecord.getUnit(); |
|
|
|
if ("Inventory_normal".equals(takingResult)) { |
|
|
|
// 如果盘点结果正常
|
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
// 获取盈亏数量
|
|
|
|
Integer inventory = minRecord.getInventory(); |
|
|
|
|
|
|
|
// 获取盘点物料信息
|
|
|
|
Inventory inventoryById = materialMapper.findInventoryById(minRecord.getMid()); |
|
|
|
@ -623,6 +617,20 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 获取物料与库位的对应关系
|
|
|
|
MaterialAndPlace placeAndMaterialByMidAndPid = placeMapper.findPlaceAndMaterialByMidAndPid(paramForMaterialAndPlace); |
|
|
|
|
|
|
|
String key = "wms_stockTaking_" + userToken.getId() + "_" + DateUtil.getNowTime() + "_" + placeAndMaterialByMidAndPid.getId(); |
|
|
|
|
|
|
|
redisTemplate.delete(key); |
|
|
|
|
|
|
|
|
|
|
|
if ("Inventory_normal".equals(takingResult)) { |
|
|
|
// 如果盘点结果正常
|
|
|
|
continue; |
|
|
|
} |
|
|
|
|
|
|
|
// 获取盈亏数量
|
|
|
|
Integer inventory = minRecord.getInventory(); |
|
|
|
|
|
|
|
|
|
|
|
// 获取判断对应的生产日期
|
|
|
|
Long producedDate = minRecord.getProducedDate(); |
|
|
|
|
|
|
|
@ -667,18 +675,6 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
|
|
|
|
materialMapper.updateMaterialAndProducedDate(materialAndProducedDate); |
|
|
|
} |
|
|
|
else { |
|
|
|
// 如果没有生产日期
|
|
|
|
|
|
|
|
// 获取当前库位以外的物料数量
|
|
|
|
Integer oldQuantity = inventoryById.getQuantity() - placeAndMaterialByMidAndPid.getQuantity(); |
|
|
|
// 获取新的物料数目
|
|
|
|
int quantity = oldQuantity + newInventory; |
|
|
|
|
|
|
|
|
|
|
|
// 更新物料数目
|
|
|
|
inventoryById.setQuantity(quantity); |
|
|
|
} |
|
|
|
|
|
|
|
// 用于计算新的库位数量
|
|
|
|
int newNumberForPlace = 0; |
|
|
|
@ -706,13 +702,13 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
|
|
|
|
continue; |
|
|
|
} |
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() + inventory); |
|
|
|
|
|
|
|
newNumberForMatrialAndPlace = placeAndMaterialByMidAndPid.getQuantity() + inventory; |
|
|
|
// 更新物料与库位对应关系的数量
|
|
|
|
placeAndMaterialByMidAndPid.setQuantity(newNumberForMatrialAndPlace); |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果是拆单单位
|
|
|
|
|
|
|
|
|
|
|
|
@ -726,7 +722,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 查找当前拆单记录对应的库存记录
|
|
|
|
SplitInventory splitInventory = splitUnitService.findSplitInventoryByIidAndSid(placeAndMaterialByMidAndPid.getId(), splitInfo.getId()); |
|
|
|
// 如果存在拆单库存记录
|
|
|
|
if(splitInventory != null){ |
|
|
|
if (splitInventory != null) { |
|
|
|
// 获取当前盘点后的库存数
|
|
|
|
int realQuantity = Math.round(inventory) + splitInventory.getSaveQuantity(); |
|
|
|
// 定义当前进制
|
|
|
|
@ -759,8 +755,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
placeAndMaterialByMidAndPid.setQuantity(placeAndMaterialByMidAndPid.getQuantity() + disposeQuantity); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果不需要进位
|
|
|
|
|
|
|
|
// 修改当前库存
|
|
|
|
@ -768,27 +763,24 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 修改拆单库存
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
} else { |
|
|
|
// 如果不存在拆单库存记录
|
|
|
|
|
|
|
|
Map<String, Object> paramForUpdateSplitInventory = new HashMap<>(); |
|
|
|
paramForUpdateSplitInventory.put("placeId",minRecord.getPid()); |
|
|
|
paramForUpdateSplitInventory.put("depositoryId",mainRecord.getDepositoryId()); |
|
|
|
paramForUpdateSplitInventory.put("quantity",inventory); |
|
|
|
paramForUpdateSplitInventory.put("mid",inventoryById.getMid()); |
|
|
|
paramForUpdateSplitInventory.put("unit",minRecord.getUnit()); |
|
|
|
paramForUpdateSplitInventory.put("placeId", minRecord.getPid()); |
|
|
|
paramForUpdateSplitInventory.put("depositoryId", mainRecord.getDepositoryId()); |
|
|
|
paramForUpdateSplitInventory.put("quantity", inventory); |
|
|
|
paramForUpdateSplitInventory.put("mid", inventoryById.getMid()); |
|
|
|
paramForUpdateSplitInventory.put("unit", minRecord.getUnit()); |
|
|
|
|
|
|
|
splitUnitService.realInInventoryToDepository(Double.valueOf(inventory), null,paramForUpdateSplitInventory,splitInfo,placeAndMaterialByMidAndPid,false); |
|
|
|
splitUnitService.realInInventoryToDepository(Double.valueOf(inventory), null, paramForUpdateSplitInventory, splitInfo, placeAndMaterialByMidAndPid, false); |
|
|
|
if (paramForUpdateSplitInventory.containsKey("applicationInId")) { |
|
|
|
depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(paramForUpdateSplitInventory.get("applicationInId"))); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
|
|
|
|
// 如果盘亏
|
|
|
|
if ("-1".equals(unit) || inventoryById.getUnit().equals(minRecord.getUnit())) { |
|
|
|
@ -810,11 +802,11 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
newNumberForMatrialAndPlace = 0; |
|
|
|
} |
|
|
|
|
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() - inventory); |
|
|
|
|
|
|
|
placeAndMaterialByMidAndPid.setQuantity(newNumberForMatrialAndPlace); |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果是拆单单位
|
|
|
|
// 用于查找对应的拆单记录
|
|
|
|
Map<String, Object> paramForSplitInfo = new HashMap<>(); |
|
|
|
@ -826,40 +818,145 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 查找当前拆单记录对应的库存记录
|
|
|
|
SplitInventory splitInventory = splitUnitService.findSplitInventoryByIidAndSid(placeAndMaterialByMidAndPid.getId(), splitInfo.getId()); |
|
|
|
|
|
|
|
if(splitInventory != null){ |
|
|
|
if (splitInventory != null) { |
|
|
|
// 如果存在拆单记录
|
|
|
|
|
|
|
|
if (splitInventory.getSaveQuantity() - inventory > 0) { |
|
|
|
// 如果当前数量没有下溢
|
|
|
|
if (splitInventory.getSaveQuantity() - inventory >= 0) { |
|
|
|
// 如果单纯的拆单库存满足数量
|
|
|
|
|
|
|
|
// 设置当前拆单库存的数量
|
|
|
|
splitInventory.setSaveQuantity(splitInventory.getSaveQuantity() - inventory); |
|
|
|
// 修改拆单库存
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
} |
|
|
|
else { |
|
|
|
// 如果发生下溢
|
|
|
|
} else { |
|
|
|
// 拆单库存如果不能满足
|
|
|
|
|
|
|
|
// 获取当前拆单单位对应的所有库存
|
|
|
|
int allSplitInventory = splitUnitService.findAllInventoryForSplitInfo(-1, placeAndMaterialByMidAndPid, splitInfo.getId(), 0, true); |
|
|
|
if (allSplitInventory - inventory >= 0) { |
|
|
|
|
|
|
|
// 设置当前拆单库存的数量
|
|
|
|
splitInventory.setSaveQuantity(0); |
|
|
|
// 修改拆单库存
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
// 获取剩余不足的数量
|
|
|
|
int surplus = inventory - splitInventory.getSaveQuantity(); |
|
|
|
// 如果盘点后库存数大于0
|
|
|
|
if (splitInfo.getParentId() != null) { |
|
|
|
// 如果当前拆单有父级
|
|
|
|
|
|
|
|
|
|
|
|
// 设置剩余拆单库存处理数量
|
|
|
|
|
|
|
|
|
|
|
|
// 设置当前拆单库存出库数量
|
|
|
|
splitInventory.setOutQuantity(splitInventory.getOutQuantity() + splitInventory.getSaveQuantity()); |
|
|
|
|
|
|
|
// 将当前库存设置为0
|
|
|
|
splitInventory.setSaveQuantity(0); |
|
|
|
// 修改库存数量
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
|
|
|
|
|
|
|
|
// 获取当前父级拆单记录
|
|
|
|
SplitInfo parentSplitInfo = splitUnitMapper.findSplitInfoById(splitInfo.getParentId()); |
|
|
|
|
|
|
|
depositoryRecordService.updateOutSplitInventoryInfo(parentSplitInfo, placeAndMaterialByMidAndPid, inventory, surplus, splitInfo); |
|
|
|
|
|
|
|
} else { |
|
|
|
// 如果没有父级
|
|
|
|
if (surplus <= splitInfo.getQuantity()) { |
|
|
|
|
|
|
|
// 如果当前未处理的数量小于当前拆单库存数量
|
|
|
|
|
|
|
|
// 如果物料数量可以出库并且库位数量充足
|
|
|
|
if (placeAndMaterialByMidAndPid.getQuantity() >= 1) { |
|
|
|
|
|
|
|
|
|
|
|
// 令库存-1
|
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() - 1); |
|
|
|
|
|
|
|
|
|
|
|
// 修改当前库位存放物料的数量
|
|
|
|
placeAndMaterialByMidAndPid.setQuantity(placeAndMaterialByMidAndPid.getQuantity() - 1); |
|
|
|
placeMapper.updateMaterialAndPlace(placeAndMaterialByMidAndPid); |
|
|
|
|
|
|
|
|
|
|
|
placeById.setQuantity(placeById.getQuantity() - 1); |
|
|
|
|
|
|
|
|
|
|
|
// 设置剩余拆单库存处理数量
|
|
|
|
splitInventory.setSaveQuantity(splitInfo.getQuantity() + splitInventory.getSaveQuantity() - inventory); |
|
|
|
splitInventory.setOutQuantity(splitInventory.getOutQuantity() + inventory); |
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
} |
|
|
|
} else { |
|
|
|
// 如果大于
|
|
|
|
|
|
|
|
// 获取库存重要减少的数量
|
|
|
|
int surplus_redundant = surplus / splitInfo.getQuantity(); |
|
|
|
// 获取拆单库存处理中要处理数量
|
|
|
|
int saveQuantity = surplus - surplus_redundant * splitInfo.getQuantity(); |
|
|
|
|
|
|
|
if (saveQuantity > splitInventory.getSaveQuantity()) { |
|
|
|
// 如果要处理的数量大于剩余数量
|
|
|
|
|
|
|
|
// 获取一个数量
|
|
|
|
surplus_redundant += 1; |
|
|
|
splitInventory.setSaveQuantity(splitInfo.getQuantity() + splitInventory.getSaveQuantity() - saveQuantity); |
|
|
|
} else { |
|
|
|
// 如果不大于
|
|
|
|
splitInventory.setSaveQuantity(splitInventory.getSaveQuantity() - saveQuantity); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (placeAndMaterialByMidAndPid.getQuantity() >= surplus_redundant) { |
|
|
|
// 如果能够出库
|
|
|
|
|
|
|
|
// 令库存-1
|
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() - surplus_redundant); |
|
|
|
|
|
|
|
|
|
|
|
// 修改当前库位存放物料的数量
|
|
|
|
placeAndMaterialByMidAndPid.setQuantity(placeAndMaterialByMidAndPid.getQuantity() - surplus_redundant); |
|
|
|
|
|
|
|
|
|
|
|
placeById.setQuantity(placeById.getQuantity() - surplus_redundant); |
|
|
|
|
|
|
|
} else { |
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() - placeAndMaterialByMidAndPid.getQuantity()); |
|
|
|
placeById.setQuantity(placeById.getQuantity() - placeAndMaterialByMidAndPid.getQuantity()); |
|
|
|
placeAndMaterialByMidAndPid.setQuantity(0); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} else { |
|
|
|
// 如果盘点后的库存数非法
|
|
|
|
|
|
|
|
placeById.setQuantity(placeById.getQuantity() - placeAndMaterialByMidAndPid.getQuantity()); |
|
|
|
|
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() - placeAndMaterialByMidAndPid.getQuantity()); |
|
|
|
|
|
|
|
placeAndMaterialByMidAndPid.setQuantity(0); |
|
|
|
List<SplitInventory> splitInventoryList = splitUnitMapper.findSplitInventoryByIid(placeAndMaterialByMidAndPid.getId()); |
|
|
|
for (SplitInventory si : splitInventoryList |
|
|
|
) { |
|
|
|
si.setSaveQuantity(0); |
|
|
|
splitUnitMapper.updateSplitInventory(si); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
// 如果不存在拆单记录
|
|
|
|
|
|
|
|
// 获取当前拆单单位对应的库存数
|
|
|
|
int splitInfoInventory = splitUnitService.findAllInventoryForSplitInfo(-1,placeAndMaterialByMidAndPid,splitInfo.getId(), 0,true); |
|
|
|
int splitInfoInventory = splitUnitService.findAllInventoryForSplitInfo(-1, placeAndMaterialByMidAndPid, splitInfo.getId(), 0, true); |
|
|
|
|
|
|
|
if(Integer.compare(minRecord.getNewInventory(),0) == 0){ |
|
|
|
if (Integer.compare(minRecord.getNewInventory(), 0) == 0) { |
|
|
|
// 如果盘点数量为0
|
|
|
|
placeById.setQuantity(placeById.getQuantity() - placeAndMaterialByMidAndPid.getQuantity()); |
|
|
|
|
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() - placeAndMaterialByMidAndPid.getQuantity()); |
|
|
|
|
|
|
|
placeAndMaterialByMidAndPid.setQuantity(0); |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
// 如果不是0
|
|
|
|
|
|
|
|
// 获取当前拆单单位与基础单位之间的进制
|
|
|
|
@ -872,7 +969,6 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
int residue_realQuantity = residue * scale - inventory; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 更新库存数量
|
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() - residue); |
|
|
|
|
|
|
|
@ -887,7 +983,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
insertForSplitInventory.put("price", 0); |
|
|
|
insertForSplitInventory.put("quantity", residue_realQuantity); |
|
|
|
insertForSplitInventory.put("unit", unit); |
|
|
|
insertForSplitInventory.put("depositoryId",mainRecord.getDepositoryId()); |
|
|
|
insertForSplitInventory.put("depositoryId", mainRecord.getDepositoryId()); |
|
|
|
insertForSplitInventory.put("placeId", placeAndMaterialByMidAndPid.getPid()); |
|
|
|
insertForSplitInventory.put("type", "in"); |
|
|
|
splitUnitService.addSplitInventory(insertForSplitInventory); |
|
|
|
@ -899,7 +995,6 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ -1106,8 +1201,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
inventoryById.setPrice(avgPrice); |
|
|
|
|
|
|
|
materialMapper.updateMaterialAndProducedDate(materialAndProducedDate); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果没有生产日期
|
|
|
|
|
|
|
|
// 获取当前生产日期中的物料
|
|
|
|
@ -1196,8 +1290,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 更新物料与库位对应关系的数量
|
|
|
|
placeAndMaterialByMidAndPid.setQuantity(newNumberForMatrialAndPlace); |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果是拆单单位
|
|
|
|
// 更新当前库位数量
|
|
|
|
newNumberForPlace = placeById.getQuantity() + inventory; |
|
|
|
@ -1219,7 +1312,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 查找当前拆单记录对应的库存记录
|
|
|
|
SplitInventory splitInventory = splitUnitService.findSplitInventoryByIidAndSid(placeAndMaterialByMidAndPid.getId(), splitInfo.getId()); |
|
|
|
|
|
|
|
if(splitInventory != null){ |
|
|
|
if (splitInventory != null) { |
|
|
|
int realQuantity = Math.round(inventory) + splitInventory.getSaveQuantity(); |
|
|
|
// 定义当前进制
|
|
|
|
int scale = splitInfo.getQuantity(); |
|
|
|
@ -1253,8 +1346,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
placeAndMaterialByMidAndPid.setQuantity(placeAndMaterialByMidAndPid.getQuantity() + disposeQuantity); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果不需要进位
|
|
|
|
|
|
|
|
// 修改当前库存
|
|
|
|
@ -1262,22 +1354,21 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 修改拆单库存
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
} else { |
|
|
|
|
|
|
|
// 获取进制数目
|
|
|
|
int scale = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1); |
|
|
|
|
|
|
|
Map<String,Object> insertForSplitInventory = new HashMap<>(); |
|
|
|
Map<String, Object> insertForSplitInventory = new HashMap<>(); |
|
|
|
|
|
|
|
insertForSplitInventory.put("mid",inventoryById.getMid()); |
|
|
|
insertForSplitInventory.put("mcode",inventoryById.getCode()); |
|
|
|
insertForSplitInventory.put("price",inventoryById.getPrice() / scale); |
|
|
|
insertForSplitInventory.put("quantity",inventory); |
|
|
|
insertForSplitInventory.put("unit",unit); |
|
|
|
insertForSplitInventory.put("depositoryId",mainRecord.getDepositoryId()); |
|
|
|
insertForSplitInventory.put("placeId",placeAndMaterialByMidAndPid.getPid()); |
|
|
|
insertForSplitInventory.put("type","in"); |
|
|
|
insertForSplitInventory.put("mid", inventoryById.getMid()); |
|
|
|
insertForSplitInventory.put("mcode", inventoryById.getCode()); |
|
|
|
insertForSplitInventory.put("price", inventoryById.getPrice() / scale); |
|
|
|
insertForSplitInventory.put("quantity", inventory); |
|
|
|
insertForSplitInventory.put("unit", unit); |
|
|
|
insertForSplitInventory.put("depositoryId", mainRecord.getDepositoryId()); |
|
|
|
insertForSplitInventory.put("placeId", placeAndMaterialByMidAndPid.getPid()); |
|
|
|
insertForSplitInventory.put("type", "in"); |
|
|
|
splitUnitService.addSplitInventory(insertForSplitInventory); |
|
|
|
Integer new_id = ObjectFormatUtil.toInteger(insertForSplitInventory.get("newInMid")); |
|
|
|
depositoryRecordMapper.deleteApplicationInRecordById(new_id); |
|
|
|
@ -1285,8 +1376,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
|
|
|
|
// 如果盘亏
|
|
|
|
if ("-1".equals(unit)) { |
|
|
|
@ -1311,8 +1401,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
|
|
|
|
placeAndMaterialByMidAndPid.setQuantity(newNumberForMatrialAndPlace); |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果是拆单单位
|
|
|
|
|
|
|
|
// 用于查找对应的拆单记录
|
|
|
|
@ -1325,7 +1414,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 查找当前拆单记录对应的库存记录
|
|
|
|
SplitInventory splitInventory = splitUnitService.findSplitInventoryByIidAndSid(placeAndMaterialByMidAndPid.getId(), splitInfo.getId()); |
|
|
|
|
|
|
|
if(splitInventory != null){ |
|
|
|
if (splitInventory != null) { |
|
|
|
// 如果存在拆单记录
|
|
|
|
if (splitInventory.getSaveQuantity() - inventory > 0) { |
|
|
|
// 如果当前数量没有下溢
|
|
|
|
@ -1334,8 +1423,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
splitInventory.setSaveQuantity(splitInventory.getSaveQuantity() - inventory); |
|
|
|
// 修改拆单库存
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果发生下溢
|
|
|
|
|
|
|
|
|
|
|
|
@ -1344,7 +1432,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 修改拆单库存
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
} |
|
|
|
} else{ |
|
|
|
} else { |
|
|
|
// 如果不存在
|
|
|
|
|
|
|
|
|
|
|
|
@ -1359,16 +1447,16 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
|
|
|
|
// 当前盘点数目
|
|
|
|
int new_inventory = now_inventory - inventory; |
|
|
|
Map<String,Object> insertForSplitInventory = new HashMap<>(); |
|
|
|
|
|
|
|
insertForSplitInventory.put("mid",inventoryById.getMid()); |
|
|
|
insertForSplitInventory.put("mcode",inventoryById.getCode()); |
|
|
|
insertForSplitInventory.put("price",inventoryById.getPrice() / scale); |
|
|
|
insertForSplitInventory.put("quantity",new_inventory); |
|
|
|
insertForSplitInventory.put("unit",unit); |
|
|
|
insertForSplitInventory.put("depositoryId",mainRecord.getDepositoryId()); |
|
|
|
insertForSplitInventory.put("placeId",placeAndMaterialByMidAndPid.getPid()); |
|
|
|
insertForSplitInventory.put("type","in"); |
|
|
|
Map<String, Object> insertForSplitInventory = new HashMap<>(); |
|
|
|
|
|
|
|
insertForSplitInventory.put("mid", inventoryById.getMid()); |
|
|
|
insertForSplitInventory.put("mcode", inventoryById.getCode()); |
|
|
|
insertForSplitInventory.put("price", inventoryById.getPrice() / scale); |
|
|
|
insertForSplitInventory.put("quantity", new_inventory); |
|
|
|
insertForSplitInventory.put("unit", unit); |
|
|
|
insertForSplitInventory.put("depositoryId", mainRecord.getDepositoryId()); |
|
|
|
insertForSplitInventory.put("placeId", placeAndMaterialByMidAndPid.getPid()); |
|
|
|
insertForSplitInventory.put("type", "in"); |
|
|
|
splitUnitService.addSplitInventory(insertForSplitInventory); |
|
|
|
Integer new_id = ObjectFormatUtil.toInteger(insertForSplitInventory.get("newInMid")); |
|
|
|
depositoryRecordMapper.deleteApplicationInRecordById(new_id); |
|
|
|
@ -1542,7 +1630,6 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 根据盘点结果重新计算物料的单价
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integer newInventory = minRecord.getNewInventory(); |
|
|
|
|
|
|
|
// 获取当前库位上物料数量
|
|
|
|
@ -1727,8 +1814,8 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 用于调用现有入库逻辑时使用的数据
|
|
|
|
map.put("unit", unit); |
|
|
|
map.put("mid", inventoryById.getMid()); |
|
|
|
map.put("depositoryId",newPlace.getDid()); |
|
|
|
map.put("placeId",newPlace.getId()); |
|
|
|
map.put("depositoryId", newPlace.getDid()); |
|
|
|
map.put("placeId", newPlace.getId()); |
|
|
|
|
|
|
|
// 获取转移后的数量
|
|
|
|
Integer newInventory = minRecord.getNewInventory() - inventory_transfer; |
|
|
|
@ -1786,8 +1873,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
newPlaceAndMaterial.setQuantity(newPlaceAndMaterial.getQuantity() + inventory_transfer); |
|
|
|
placeMapper.updateMaterialAndPlace(newPlaceAndMaterial); |
|
|
|
} |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果盘点的是拆单单位
|
|
|
|
|
|
|
|
// 用于获取当前拆单记录
|
|
|
|
@ -1832,7 +1918,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
if (splitInfo.getParentId() != null) { |
|
|
|
// 如果当前拆单还有父级
|
|
|
|
SplitInfo parentSplitInfo = splitUnitMapper.findSplitInfoById(splitInfo.getParentId()); |
|
|
|
map.put("price",String.valueOf(inventoryById.getPrice() / splitUnitService.findSplitInfoScaleQuantity(splitInfo,-1))); |
|
|
|
map.put("price", String.valueOf(inventoryById.getPrice() / splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1))); |
|
|
|
|
|
|
|
// 调用现有的拆单库存变化逻辑
|
|
|
|
splitUnitService.updateSplitInfoSaveQuantity(parentSplitInfo, disposeQuantity, ObjectFormatUtil.toInteger(paramForMaterialAndPlace.get("id")), map, disposeQuantity, splitInfo); |
|
|
|
@ -1841,14 +1927,13 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
|
|
|
|
map.put("price", String.valueOf(inventoryById.getPrice() / 100)); |
|
|
|
// 调用现有入库逻辑进行修改库存
|
|
|
|
depositoryRecordService.applicationInPlace(map,false); |
|
|
|
depositoryRecordService.applicationInPlace(map, false); |
|
|
|
// 删除入库单
|
|
|
|
depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(map.get("id"))); |
|
|
|
map.remove("id"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果不大于
|
|
|
|
|
|
|
|
|
|
|
|
@ -1859,8 +1944,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果转移后的库位有该物料
|
|
|
|
|
|
|
|
// 用于查询对应的拆单库存
|
|
|
|
@ -1937,14 +2021,13 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
|
|
|
|
// 获取当前的单价
|
|
|
|
map.put("price", String.valueOf(inventoryById.getPrice() / 100)); |
|
|
|
depositoryRecordService.applicationInPlace(map,false); |
|
|
|
depositoryRecordService.applicationInPlace(map, false); |
|
|
|
depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(map.get("id"))); |
|
|
|
map.remove("id"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果不存在拆单记录
|
|
|
|
|
|
|
|
|
|
|
|
@ -1989,7 +2072,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 获取对应的父级
|
|
|
|
SplitInfo parentSplitInfo = splitUnitMapper.findSplitInfoById(splitInfo.getParentId()); |
|
|
|
// 设置当前的单价
|
|
|
|
map.put("price",String.valueOf(inventoryById.getPrice() / splitUnitService.findSplitInfoScaleQuantity(splitInfo,-1))); |
|
|
|
map.put("price", String.valueOf(inventoryById.getPrice() / splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1))); |
|
|
|
// 调用现有的拆单库存修改逻辑
|
|
|
|
splitUnitService.updateSplitInfoSaveQuantity(parentSplitInfo, disposeQuantity, newPlaceAndMaterial.getId(), map, inventory_transfer, splitInfo); |
|
|
|
} else { |
|
|
|
@ -1997,7 +2080,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 设置单价
|
|
|
|
map.put("price", String.valueOf(inventoryById.getPrice() / 100)); |
|
|
|
// 调用相关的入库逻辑
|
|
|
|
depositoryRecordService.applicationInPlace(map,false); |
|
|
|
depositoryRecordService.applicationInPlace(map, false); |
|
|
|
// 删除对应的入库订单
|
|
|
|
depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(map.get("id"))); |
|
|
|
map.remove("id"); |
|
|
|
@ -2018,8 +2101,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果不存在
|
|
|
|
|
|
|
|
// 定义库存对象
|
|
|
|
@ -2115,9 +2197,10 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
splitUnitService.updateSplitInfoSaveQuantity(parentSplitInfo, disposeQuantity, ObjectFormatUtil.toInteger(paramForMaterialAndPlace.get("id")), map, disposeQuantity, splitInfo); |
|
|
|
} else { |
|
|
|
// 如果没有父级
|
|
|
|
map.put("price", String.valueOf(inventoryById.getPrice() / 100));; |
|
|
|
map.put("price", String.valueOf(inventoryById.getPrice() / 100)); |
|
|
|
; |
|
|
|
map.put("quantity", String.valueOf(disposeQuantity)); |
|
|
|
depositoryRecordService.applicationInPlace(map,false); |
|
|
|
depositoryRecordService.applicationInPlace(map, false); |
|
|
|
depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(map.get("id"))); |
|
|
|
map.remove("id"); |
|
|
|
} |
|
|
|
@ -2140,8 +2223,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 如果是基础单位
|
|
|
|
oldPlaceAndMaterial.setQuantity(newInventory); |
|
|
|
placeMapper.updateMaterialAndPlace(oldPlaceAndMaterial); |
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果是拆单单位
|
|
|
|
|
|
|
|
// 用于获取拆单单位
|
|
|
|
@ -2165,8 +2247,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 修改当前拆单库存
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果不存在
|
|
|
|
|
|
|
|
// 用于添加一条拆单库存
|
|
|
|
@ -2183,8 +2264,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果在同一仓库
|
|
|
|
|
|
|
|
// 更新物料容量
|
|
|
|
@ -2216,8 +2296,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
newPlaceAndMaterial.setQuantity(newPlaceAndMaterial.getQuantity() + inventory_transfer); |
|
|
|
placeMapper.updateMaterialAndPlace(newPlaceAndMaterial); |
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
} else { |
|
|
|
// 如果是拆单单位
|
|
|
|
|
|
|
|
|
|
|
|
@ -2236,33 +2315,32 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 查找转移前拆单库位记录
|
|
|
|
SplitInventory oldSplitInventory = splitUnitMapper.findSplitInventoryByIidAndSid(paramForSplitInventory); |
|
|
|
|
|
|
|
paramForMaterialAndPlace.put("pid",newPlace.getId()); |
|
|
|
paramForMaterialAndPlace.put("pid", newPlace.getId()); |
|
|
|
// 获取物料与转移后库位的对应关系
|
|
|
|
MaterialAndPlace newPlaceAndMaterial = placeMapper.findPlaceAndMaterialByMidAndPid(paramForMaterialAndPlace); |
|
|
|
|
|
|
|
|
|
|
|
if(oldSplitInventory != null){ |
|
|
|
if (oldSplitInventory != null) { |
|
|
|
|
|
|
|
// 如果该拆单库存存在
|
|
|
|
oldSplitInventory.setSaveQuantity(newInventory); |
|
|
|
// 修改当前物料库存
|
|
|
|
splitUnitMapper.updateSplitInventory(oldSplitInventory); |
|
|
|
} |
|
|
|
else{ |
|
|
|
} else { |
|
|
|
// 如果该拆单库存不存在
|
|
|
|
|
|
|
|
// 添加相关数据
|
|
|
|
paramForSplitInventory.put("outQuantity",0); |
|
|
|
paramForSplitInventory.put("inQuantity",newInventory); |
|
|
|
paramForSplitInventory.put("saveQuantity",newInventory); |
|
|
|
paramForSplitInventory.put("outQuantity", 0); |
|
|
|
paramForSplitInventory.put("inQuantity", newInventory); |
|
|
|
paramForSplitInventory.put("saveQuantity", newInventory); |
|
|
|
// 添加一条拆单库存记录
|
|
|
|
splitUnitMapper.addSplitInventory(paramForSplitInventory); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if(newPlaceAndMaterial != null){ |
|
|
|
if (newPlaceAndMaterial != null) { |
|
|
|
// 如果物料与转移后的库位存在对应关系
|
|
|
|
paramForSplitInventory.put("iid",newPlaceAndMaterial.getId()); |
|
|
|
paramForSplitInventory.put("iid", newPlaceAndMaterial.getId()); |
|
|
|
// 查找转移后拆单库位记录
|
|
|
|
SplitInventory newSplitInventory = splitUnitMapper.findSplitInventoryByIidAndSid(paramForSplitInventory); |
|
|
|
|
|
|
|
@ -2275,13 +2353,10 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 最终存储到拆单处理的数量
|
|
|
|
double saveQuantity = inventory_transfer - disposeQuantity * splitInfo.getQuantity(); |
|
|
|
|
|
|
|
if(newSplitInventory != null){ |
|
|
|
if (newSplitInventory != null) { |
|
|
|
// 如果转移后的拆单库存存在
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 当前拆单库存最终存储数量
|
|
|
|
int realQuantity = (int) Math.round(saveQuantity) + newSplitInventory.getSaveQuantity(); |
|
|
|
|
|
|
|
@ -2335,14 +2410,13 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
|
|
|
|
// 获取当前的单价
|
|
|
|
map.put("price", String.valueOf(inventoryById.getPrice() / 100)); |
|
|
|
depositoryRecordService.applicationInPlace(map,false); |
|
|
|
depositoryRecordService.applicationInPlace(map, false); |
|
|
|
depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(map.get("id"))); |
|
|
|
map.remove("id"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果不存在拆单记录
|
|
|
|
|
|
|
|
|
|
|
|
@ -2387,7 +2461,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 获取对应的父级
|
|
|
|
SplitInfo parentSplitInfo = splitUnitMapper.findSplitInfoById(splitInfo.getParentId()); |
|
|
|
// 设置当前的单价
|
|
|
|
map.put("price",String.valueOf(inventoryById.getPrice() / splitUnitService.findSplitInfoScaleQuantity(splitInfo,-1))); |
|
|
|
map.put("price", String.valueOf(inventoryById.getPrice() / splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1))); |
|
|
|
// 调用现有的拆单库存修改逻辑
|
|
|
|
splitUnitService.updateSplitInfoSaveQuantity(parentSplitInfo, disposeQuantity, newPlaceAndMaterial.getId(), map, inventory_transfer, splitInfo); |
|
|
|
} else { |
|
|
|
@ -2395,14 +2469,13 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 设置单价
|
|
|
|
map.put("price", String.valueOf(inventoryById.getPrice() / 100)); |
|
|
|
// 调用相关的入库逻辑
|
|
|
|
depositoryRecordService.applicationInPlace(map,false); |
|
|
|
depositoryRecordService.applicationInPlace(map, false); |
|
|
|
// 删除对应的入库订单
|
|
|
|
depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(map.get("id"))); |
|
|
|
map.remove("id"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
|
|
|
|
insertForSplitInventory.put("saveQuantity", realQuantity); |
|
|
|
insertForSplitInventory.put("inQuantity", realQuantity); |
|
|
|
@ -2413,8 +2486,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
else{ |
|
|
|
} else { |
|
|
|
// 如果转移之后的库位没有该物料
|
|
|
|
|
|
|
|
paramForMaterialAndPlace.put("quantity", 0); |
|
|
|
@ -2452,7 +2524,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
SplitInfo parentSplitInfo = splitUnitMapper.findSplitInfoById(splitInfo.getParentId()); |
|
|
|
|
|
|
|
// 计算当前拆单下的单价
|
|
|
|
map.put("price",String.valueOf(inventoryById.getPrice() / splitUnitService.findSplitInfoScaleQuantity(splitInfo,-1))); |
|
|
|
map.put("price", String.valueOf(inventoryById.getPrice() / splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1))); |
|
|
|
|
|
|
|
// 调用现有的拆单库存变化逻辑
|
|
|
|
splitUnitService.updateSplitInfoSaveQuantity(parentSplitInfo, disposeQuantity, ObjectFormatUtil.toInteger(paramForMaterialAndPlace.get("id")), map, disposeQuantity, splitInfo); |
|
|
|
@ -2462,14 +2534,13 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 设置单价
|
|
|
|
map.put("price", String.valueOf(inventoryById.getPrice() / 100)); |
|
|
|
// 调用现有入库逻辑进行修改库存
|
|
|
|
depositoryRecordService.applicationInPlace(map,false); |
|
|
|
depositoryRecordService.applicationInPlace(map, false); |
|
|
|
// 删除入库单
|
|
|
|
depositoryRecordMapper.deleteApplicationInRecordById(ObjectFormatUtil.toInteger(map.get("id"))); |
|
|
|
map.remove("id"); |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
else { |
|
|
|
} else { |
|
|
|
// 如果不大于
|
|
|
|
|
|
|
|
insertForSplitInventory.put("saveQuantity", inventory_transfer); |
|
|
|
@ -2584,8 +2655,6 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
List<String> err = new ArrayList<>(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 获取所有子单
|
|
|
|
List<StockTakingChildP> minRecordList = stockTakingMapper.selectStockTakingChildByMainId(mainId); |
|
|
|
for (int i = 0; i < minRecordList.size(); i++) { |
|
|
|
@ -2618,7 +2687,6 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 根据盘点结果重新计算物料的单价
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Integer newInventory = minRecord.getNewInventory(); |
|
|
|
|
|
|
|
|
|
|
|
|