|
|
|
@ -825,7 +825,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 如果当前盘点的数量大于拆单规定的进制数量
|
|
|
|
|
|
|
|
// 计算当前进制下的进位数量
|
|
|
|
int disposeQuantity = (int) Math.round(Math.floor((double) inventory / scale)); |
|
|
|
int disposeQuantity = (int) (Math.round(Math.floor((double) inventory / scale))); |
|
|
|
|
|
|
|
// 计算要进的数目
|
|
|
|
double quantity_in = (realQuantity / (scale)); |
|
|
|
@ -836,7 +836,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
realQuantity = realQuantity - quantity_in * scale; |
|
|
|
|
|
|
|
// 设置当前数量为实际数量
|
|
|
|
splitInventory.setSaveQuantity((int) realQuantity * 100); |
|
|
|
splitInventory.setSaveQuantity((int) (realQuantity * 100)); |
|
|
|
|
|
|
|
// 修改当前拆单库存
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
@ -853,7 +853,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 如果不需要进位
|
|
|
|
|
|
|
|
// 修改当前库存
|
|
|
|
splitInventory.setSaveQuantity((int) realQuantity * 100); |
|
|
|
splitInventory.setSaveQuantity((int) (realQuantity * 100)); |
|
|
|
// 修改拆单库存
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
} |
|
|
|
@ -992,10 +992,10 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
|
|
|
|
// 获取一个数量
|
|
|
|
surplus_redundant += 1.0; |
|
|
|
splitInventory.setSaveQuantity(splitInfo.getQuantity() + splitInventory.getSaveQuantity() - (int) saveQuantity * 100); |
|
|
|
splitInventory.setSaveQuantity(splitInfo.getQuantity() + splitInventory.getSaveQuantity() - (int) (saveQuantity * 100)); |
|
|
|
} else { |
|
|
|
// 如果不大于
|
|
|
|
splitInventory.setSaveQuantity(splitInventory.getSaveQuantity() - (int) saveQuantity * 100); |
|
|
|
splitInventory.setSaveQuantity(splitInventory.getSaveQuantity() - (int) (saveQuantity * 100)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -1003,14 +1003,14 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 如果能够出库
|
|
|
|
|
|
|
|
// 令库存-1
|
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() - (int) surplus_redundant * 100); |
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() - (int) (surplus_redundant * 100)); |
|
|
|
|
|
|
|
|
|
|
|
// 修改当前库位存放物料的数量
|
|
|
|
placeAndMaterialByMidAndPid.setQuantity(placeAndMaterialByMidAndPid.getQuantity() - (int) surplus_redundant * 100); |
|
|
|
placeAndMaterialByMidAndPid.setQuantity(placeAndMaterialByMidAndPid.getQuantity() - (int) (surplus_redundant * 100)); |
|
|
|
|
|
|
|
|
|
|
|
placeById.setQuantity(placeById.getQuantity() - (int) surplus_redundant * 100); |
|
|
|
placeById.setQuantity(placeById.getQuantity() - (int) (surplus_redundant * 100)); |
|
|
|
|
|
|
|
} else { |
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() - placeAndMaterialByMidAndPid.getQuantity()); |
|
|
|
@ -1057,7 +1057,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
int scale = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1); |
|
|
|
|
|
|
|
// 获取当前盘点对应基础单位的数量
|
|
|
|
int residue = (int) Math.ceil(inventory / (double) scale); |
|
|
|
int residue = (int) (Math.ceil(inventory / (double) scale)); |
|
|
|
|
|
|
|
// 获取剩余数目
|
|
|
|
int residue_realQuantity = residue * scale - inventory; |
|
|
|
@ -1343,7 +1343,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 如果当前盘点的数量大于拆单规定的进制数量
|
|
|
|
|
|
|
|
// 计算当前进制下的进位数量
|
|
|
|
int disposeQuantity = (int) Math.round(Math.floor((double) inventory / scale)); |
|
|
|
int disposeQuantity = (int) (Math.round(Math.floor((double) inventory / scale))); |
|
|
|
|
|
|
|
// 计算要进的数目
|
|
|
|
double quantity_in = (realQuantity / (scale)); |
|
|
|
@ -1354,7 +1354,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
realQuantity = realQuantity - quantity_in * scale; |
|
|
|
|
|
|
|
// 设置当前数量为实际数量
|
|
|
|
splitInventory.setSaveQuantity((int) realQuantity * 100); |
|
|
|
splitInventory.setSaveQuantity((int) (realQuantity * 100)); |
|
|
|
|
|
|
|
// 修改当前拆单库存
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
@ -1371,7 +1371,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 如果不需要进位
|
|
|
|
|
|
|
|
// 修改当前库存
|
|
|
|
splitInventory.setSaveQuantity((int) realQuantity * 100); |
|
|
|
splitInventory.setSaveQuantity((int) (realQuantity * 100)); |
|
|
|
// 修改拆单库存
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
} |
|
|
|
@ -1510,10 +1510,10 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
|
|
|
|
// 获取一个数量
|
|
|
|
surplus_redundant += 1.0; |
|
|
|
splitInventory.setSaveQuantity(splitInfo.getQuantity() + splitInventory.getSaveQuantity() - (int) saveQuantity * 100); |
|
|
|
splitInventory.setSaveQuantity(splitInfo.getQuantity() + splitInventory.getSaveQuantity() - (int) (saveQuantity * 100)); |
|
|
|
} else { |
|
|
|
// 如果不大于
|
|
|
|
splitInventory.setSaveQuantity(splitInventory.getSaveQuantity() - (int) saveQuantity * 100); |
|
|
|
splitInventory.setSaveQuantity(splitInventory.getSaveQuantity() - (int) (saveQuantity * 100)); |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@ -1521,14 +1521,14 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 如果能够出库
|
|
|
|
|
|
|
|
// 令库存-1
|
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() - (int) surplus_redundant * 100); |
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() - (int) (surplus_redundant * 100)); |
|
|
|
|
|
|
|
|
|
|
|
// 修改当前库位存放物料的数量
|
|
|
|
placeAndMaterialByMidAndPid.setQuantity(placeAndMaterialByMidAndPid.getQuantity() - (int) surplus_redundant * 100); |
|
|
|
placeAndMaterialByMidAndPid.setQuantity(placeAndMaterialByMidAndPid.getQuantity() - (int)( surplus_redundant * 100)); |
|
|
|
|
|
|
|
|
|
|
|
placeById.setQuantity(placeById.getQuantity() - (int) surplus_redundant * 100); |
|
|
|
placeById.setQuantity(placeById.getQuantity() - (int) (surplus_redundant * 100)); |
|
|
|
|
|
|
|
} else { |
|
|
|
inventoryById.setQuantity(inventoryById.getQuantity() - placeAndMaterialByMidAndPid.getQuantity()); |
|
|
|
@ -1575,7 +1575,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
int scale = splitUnitService.findSplitInfoScaleQuantity(splitInfo, -1); |
|
|
|
|
|
|
|
// 获取当前盘点对应基础单位的数量
|
|
|
|
int residue = (int) Math.ceil(inventory / (double) scale); |
|
|
|
int residue = (int)( Math.ceil(inventory / (double) scale)); |
|
|
|
|
|
|
|
// 获取剩余数目
|
|
|
|
int residue_realQuantity = residue * scale - inventory; |
|
|
|
@ -1989,7 +1989,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
if (Integer.compare(newPlace.getDid(), oldPlace.getDid()) != 0) { |
|
|
|
// 转移前后不在同一仓库
|
|
|
|
|
|
|
|
inventoryById.setQuantity((int) newInventory * 100); |
|
|
|
inventoryById.setQuantity((int)( newInventory * 100)); |
|
|
|
|
|
|
|
// 用于获取转移后仓库的物料信息
|
|
|
|
Map<String, Object> paramForMaterialToDepository = new HashMap<>(); |
|
|
|
@ -2057,7 +2057,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 如果当前转移数目大于进制数
|
|
|
|
|
|
|
|
// 计算处理数量(下取整)
|
|
|
|
int disposeQuantity = (int) Math.round(Math.floor(inventory_transfer / (double) splitInfo.getQuantity())); |
|
|
|
int disposeQuantity = (int) (Math.round(Math.floor(inventory_transfer / (double) splitInfo.getQuantity()))); |
|
|
|
|
|
|
|
// 最终存储到拆单处理的数量
|
|
|
|
double saveQuantity = inventory_transfer - disposeQuantity * splitInfo.getQuantity(); |
|
|
|
@ -2114,7 +2114,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
int scale = splitInfo.getQuantity(); |
|
|
|
|
|
|
|
// 计算处理数量(下取整)
|
|
|
|
int disposeQuantity = (int) Math.round(Math.floor(inventory_transfer / (double) splitInfo.getQuantity())); |
|
|
|
int disposeQuantity = (int) (Math.round(Math.floor(inventory_transfer / (double) splitInfo.getQuantity()))); |
|
|
|
|
|
|
|
// 最终存储到拆单处理的数量
|
|
|
|
double saveQuantity = inventory_transfer - disposeQuantity * splitInfo.getQuantity(); |
|
|
|
@ -2147,7 +2147,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
} |
|
|
|
|
|
|
|
// 设置当前拆单对应的库存数量
|
|
|
|
splitInventory.setSaveQuantity((int) realQuantity * 100); |
|
|
|
splitInventory.setSaveQuantity((int) (realQuantity * 100)); |
|
|
|
// 修改库存数量
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
|
|
|
|
@ -2315,7 +2315,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
|
|
|
|
|
|
|
|
// 计算处理数量(下取整)
|
|
|
|
int disposeQuantity = (int) Math.round(Math.floor(inventory_transfer / (double) splitInfo.getQuantity())); |
|
|
|
int disposeQuantity = (int) (Math.round(Math.floor(inventory_transfer / (double) splitInfo.getQuantity()))); |
|
|
|
|
|
|
|
// 最终存储到拆单处理的数量
|
|
|
|
double saveQuantity = inventory_transfer - disposeQuantity * splitInfo.getQuantity(); |
|
|
|
@ -2398,7 +2398,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
// 如果当前记录存在
|
|
|
|
|
|
|
|
// 设置当前拆单库存数
|
|
|
|
splitInventory.setSaveQuantity((int) newInventory * 100); |
|
|
|
splitInventory.setSaveQuantity((int) (newInventory * 100)); |
|
|
|
// 修改当前拆单库存
|
|
|
|
splitUnitMapper.updateSplitInventory(splitInventory); |
|
|
|
|
|
|
|
@ -2435,7 +2435,7 @@ public class StockTakingServiceImpl implements StockTakingService { |
|
|
|
if ("-1".equals(unit)) { |
|
|
|
// 如果是基础单位
|
|
|
|
|
|
|
|
oldPlaceAndMaterial.setQuantity((int) newInventory * 100); |
|
|
|
oldPlaceAndMaterial.setQuantity((int) (newInventory * 100)); |
|
|
|
placeMapper.updateMaterialAndPlace(oldPlaceAndMaterial); |
|
|
|
|
|
|
|
|
|
|
|
|