修复 9.入库金额 18,成本单价会变成0.18,每次进入库都不会自动变更进价
This commit is contained in:
1 parent
918fd83c40
commit
36388e43b3
2 files changed
+4
-1
No files matched your search
+3
@@ -127,6 +127,9 @@ public class ShopSkuController {
|
||||
@Operation(summary = "sku详情" , description = "根据多个skuid,查询多个sku详情" )
|
||||
@GetMapping("/selectListAll" )
|
||||
public R<List<ShopSkuEntity>> getSelectListAll(@RequestParam List<Long> ids) {
|
||||
if (Objects.isNull(ids) || ids.isEmpty()) {
|
||||
return R.ok();
|
||||
}
|
||||
List<ShopSkuEntity> shopSkuEntities = shopSkuService.listByIds(ids);
|
||||
return R.ok(shopSkuEntities);
|
||||
}
|
||||
|
||||
+1
-1
@@ -167,7 +167,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 / 100) / totalNum;
|
||||
double costPrice = totalRealRrice / totalNum;
|
||||
|
||||
SmErpSpuEntity smErpSpuEntity = new SmErpSpuEntity();
|
||||
smErpSpuEntity.setCostPrice(costPrice);
|
||||
|
||||
Reference in new issue
Block a user