zhangyuewww 1 year ago
parent
commit
dbdc2de804

+ 6 - 2
winsea-haixin-plugin-yiliangyiyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/WarehouseInOutInfoServiceImpl.java

@@ -1078,7 +1078,9 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                             stockSaleReceiptReport.setTare(Double.valueOf(String.valueOf(warehouseInOutInfo.getTare())));
                             stockSaleReceiptReport.setNetWeight(-warehouseInOutInfo.getNetWeight());
                             stockSaleReceiptReport.setReturnDate(warehouseInOutInfo.getInOutDate());
-                            stockSaleReceiptReport.setAmountIngReceivable(-warehouseInOutInfo.getNetWeight() * contractManagementInfo1.getUnitContractPrice());
+                            if(contractManagementInfo1.getUnitContractPrice()!=null) {
+                                stockSaleReceiptReport.setAmountIngReceivable(-warehouseInOutInfo.getNetWeight() * contractManagementInfo1.getUnitContractPrice());
+                            }
                             stockSaleReceiptReport.setSettlementWeight(-warehouseInOutInfo.getNetWeight());
                             stockSaleReceiptReport.setReturnFlag("1");
                             stockSaleReceiptReport.setStatusFlag(StatusEnum.TO_BE_RECEIVED.getFlag());
@@ -4422,7 +4424,9 @@ public class WarehouseInOutInfoServiceImpl extends ServiceImpl<WarehouseInOutInf
                             stockSaleReceiptReport.setTare(Double.valueOf(String.valueOf(warehouseInOutInfo.getTare())));
                             stockSaleReceiptReport.setNetWeight(-warehouseInOutInfo.getNetWeight());
                             stockSaleReceiptReport.setReturnDate(warehouseInOutInfo.getInOutDate());
-                            stockSaleReceiptReport.setAmountIngReceivable(-warehouseInOutInfo.getNetWeight() * (Double.valueOf(String.valueOf(weighingManagement.getContractPrice()==null?contractManagementInfo1.getUnitContractPrice():weighingManagement.getContractPrice()))));
+                            if(contractManagementInfo1.getUnitContractPrice()!=null) {
+                                stockSaleReceiptReport.setAmountIngReceivable(-warehouseInOutInfo.getNetWeight() * (Double.valueOf(String.valueOf(weighingManagement.getContractPrice() == null ? contractManagementInfo1.getUnitContractPrice() : weighingManagement.getContractPrice()))));
+                            }
                             stockSaleReceiptReport.setSettlementWeight(-warehouseInOutInfo.getNetWeight());
                             stockSaleReceiptReport.setReturnFlag("1");
                             stockSaleReceiptReport.setStatusFlag(StatusEnum.TO_BE_RECEIVED.getFlag());