refactor: 简化应付单生成条件的代码判断逻辑
优化了OmsInventoryInnerServiceImpl中应付单生成的条件判断,将原本拆分的两个布尔变量合并为直接的条件判断,提升代码可读性。dev_1.0.3
parent
86fe86d72d
commit
a14993e1b8
|
|
@ -36,6 +36,7 @@ dist/
|
|||
nbdist/
|
||||
.nb-gradle/
|
||||
.DS_Store
|
||||
*.png
|
||||
|
||||
######################################################################
|
||||
# Others
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 510 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 510 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 510 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 510 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 510 KiB |
|
|
@ -197,10 +197,9 @@ public class OmsInventoryInnerServiceImpl implements IOmsInventoryInnerService {
|
|||
|
||||
OmsPayableBill payableBill = new OmsPayableBill();
|
||||
VendorInfo vendorInfo = vendorInfoService.selectVendorInfoByVendorCode(vendorCode);
|
||||
boolean innerPay = vendorInfo != null && VendorInfo.PayTypeEnum.INNER_PAY.getCode().equals(vendorInfo.getPayType());
|
||||
boolean notStandard = !Arrays.asList("1", "2").contains(omsInventoryInner.getProductType());
|
||||
//每次入库均生成应付单,金额按本次入库量计算
|
||||
if (innerPay || notStandard) {
|
||||
//入库付款厂商(INNER_PAY)或非标准品(服务/维保)在入库时生成应付单,金额按本次入库量计算
|
||||
if ((vendorInfo != null && VendorInfo.PayTypeEnum.INNER_PAY.getCode().equals(vendorInfo.getPayType()))
|
||||
|| !Arrays.asList("1", "2").contains(omsInventoryInner.getProductType())) {
|
||||
BigDecimal reduce = inventoryInfoList.stream().map(InventoryInfo::getInnerPrice).filter(Objects::nonNull).reduce(BigDecimal.ZERO, BigDecimal::add);
|
||||
//服务金额为单价*数量 没有具体的详情
|
||||
BigDecimal totalPriceWithTax = Arrays.asList("3", "22").contains(omsInventoryInner.getProductType()) ?
|
||||
|
|
|
|||
Loading…
Reference in New Issue