更新成本单价
This commit is contained in:
1 parent
8dffb993a4
commit
3decfc9bf7
2 files changed
+6
-1
No files matched your search
+5
@@ -102,4 +102,9 @@ public interface SmErpSpuService extends IService<SmErpSpuEntity> {
|
||||
*/
|
||||
R importErpSpu(List<SmErpSpuImportDto> smErpSupplierImportDtos, BindingResult bindingResult);
|
||||
|
||||
|
||||
|
||||
|
||||
// R calculateCostPrice();
|
||||
|
||||
}
|
||||
+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 / 100) / totalNum;
|
||||
double costPrice = totalRealRrice / totalNum;
|
||||
|
||||
SmErpSpuEntity smErpSpuEntity = new SmErpSpuEntity();
|
||||
smErpSpuEntity.setCostPrice(costPrice);
|
||||
|
||||
Reference in new issue
Block a user