Index: ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceOptimizeManagerImpl.java =================================================================== diff -u -r27850 -r27851 --- ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceOptimizeManagerImpl.java (.../InvoiceOptimizeManagerImpl.java) (revision 27850) +++ ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceOptimizeManagerImpl.java (.../InvoiceOptimizeManagerImpl.java) (revision 27851) @@ -1759,6 +1759,7 @@ map(ti -> ti.getTousseDefinition().getParentID()). collect(Collectors.toSet()); //根据器械包定义id集合找所有外来器械拆分小包实例 + @SuppressWarnings("unchecked") List findAllSplitTousseListByParentIdSet = objectDao.getBySql_ForUpdate2(TousseInstance.class.getSimpleName(), String.format("where %s", @@ -3091,7 +3092,7 @@ if(tiSize < sendAmount.intValue()){ throw new SystemException( String.format("%s发货数量为%s,符合发货条件的包数量为%s,库存不足(可能部分包实例被其它用户发货或废弃),发货失败", - tousseItem.getTousseName(),tiSize,sendAmount)); + tousseItem.getTousseName(),tiSize,sendAmount == null ? 0 : sendAmount)); } }); //比较要发的包的数量map及通过申请项匹配的包实例数量进行校验 @@ -3102,7 +3103,7 @@ if(matchAmount == null || matchAmount < sendAmount){ throw new SystemException( String.format("%s发货数量为%s,待发货的申请单的需要发货的数量为%s,请减少发货数量(可能某些申请单或申请单内的该物品被其它用户发货或终止),发货失败", - tdIdToTousseDefinitionMap.get(tdId).getName(),sendAmount,matchAmount == null ? 0 : matchAmount)); + tdIdToTousseDefinitionMap.get(tdId).getName(),sendAmount == null ? 0 : sendAmount,matchAmount == null ? 0 : matchAmount)); } }); } @@ -3448,7 +3449,7 @@ if(matchAmount == null || matchAmount.intValue() < value.intValue()){ throw new SystemException(String.format("条码为%s的%s应发数量为%s,实际可发数据为%s,小于应发数量.可能有申请单被其它用户发货或终止,请调小其发货数量", tdIdToSendBarcodeParam.get(key),tdIdToTdMapParam.get(key).getName(), - value,matchAmount)); + value == null ? 0 : value,matchAmount == null ? 0 : matchAmount)); } } } @@ -3782,7 +3783,7 @@ if(alreadyMatchedAmount == null || alreadyMatchedAmount < amount){ String name = batch.getDiposableGoods().getShowName(); throw new SystemException(String.format("条码%s的%s发货数量为%s,待发货的申请单需要发货数量为%s,发货失败,请调小发货数量.", - barcode,name,amount,alreadyMatchedAmount == null ? 0 : alreadyMatchedAmount)); + barcode,name,amount == null ? 0 : amount,alreadyMatchedAmount == null ? 0 : alreadyMatchedAmount)); } }); }