更新成本单价

This commit is contained in:
zjf committed 2025-06-13 13:42:53 +08:00
1 parent 3decfc9bf7
commit 08890883c4
1 file changed
+1 -1
@@ -163,7 +163,7 @@ public class SmErpInventoryRecordsServiceImpl extends ServiceImpl<SmErpInventory
Double totalNum = smErpInventoryRecordsItemEntityList.stream().filter(Objects::nonNull).mapToDouble(itemEntity -> itemEntity.getPackageNum() * itemEntity.getQuantity()).sum();
int totalRealRrice = smErpInventoryRecordsItemEntityList.stream().filter(Objects::nonNull).mapToInt(SmErpCostPriceVo::getTotalAmount).sum();
double costPrice = totalRealRrice / totalNum;
double costPrice = (totalRealRrice / 100) / totalNum;
SmErpSpuEntity smErpSpuEntity = new SmErpSpuEntity();
smErpSpuEntity.setCostPrice(costPrice);