Index: ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerImpl.java =================================================================== diff -u -r26867 -r26880 --- ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerImpl.java (.../InvoiceManagerImpl.java) (revision 26867) +++ ssts-invoice/src/main/java/com/forgon/disinfectsystem/invoicemanager/service/InvoiceManagerImpl.java (.../InvoiceManagerImpl.java) (revision 26880) @@ -2631,7 +2631,7 @@ // } // } if (CollectionUtils.isEmpty(invoiceList)) - throw new RuntimeException("未能发货!"); + throw new RuntimeException("未能发货!已扫描的物品已被其他人发货或者终止,已扫描数量大于待发货数量,请检查。"); //发完货后,判断本次发货的器械包所在虚拟篮筐内的器械包是否已全部已发货完成,如已完成则清对应的虚拟篮筐释放,即状态置为空闲,since2015-10-26 // refreshReviewedBasketStatus(submitInvoiceItems); @@ -2906,7 +2906,7 @@ // } // } if (CollectionUtils.isEmpty(invoiceList)) - throw new RuntimeException("未能发货!"); + throw new RuntimeException("未能发货!已扫描的物品已被其他人发货或者终止,已扫描数量大于待发货数量,请检查。"); //发完货后,判断本次发货的器械包所在虚拟篮筐内的器械包是否已全部已发货完成,如已完成则清对应的虚拟篮筐释放,即状态置为空闲,since2015-10-26 // refreshReviewedBasketStatus(submitInvoiceItems); @@ -3096,7 +3096,7 @@ // } // } if (CollectionUtils.isEmpty(invoiceList)) - throw new RuntimeException("未能发货!"); + throw new RuntimeException("未能发货!已扫描的物品已被其他人发货或者终止,已扫描数量大于待发货数量,请检查。"); // refreshReviewedBasketStatus(submitInvoiceItems); checkIfForeignTousseAppInvoiceComplete(submitInvoiceContext); @@ -3347,6 +3347,21 @@ default: throw new RuntimeException("缺失参数mode"); } + if(CollectionUtils.isNotEmpty(invoicePlanList)){ + //定义集合变量存放需要删除的未审核借物单:ASSJMSZXYY-15 借物单是未审核状态但可以发货 + List needRemoveUnReviewBorrowInvoicePlanList = new ArrayList(); + for (InvoicePlan invoicePlan2 : invoicePlanList) { + // 东莞东华医院要求:发货计划只能看到供应室审核了的借物单,所以这里要判断单据类型是否借物单,如果不是借物单且审核状态不为待审核则按原来的方式运行, + // 审核状态只有东莞东华医院(后续的江门中心医院)申请借物单时才会有,其他医院这个状态都是空 + if (!invoicePlanManager.checkIsShowNoConBorrow(invoicePlan2.getType(),invoicePlan2.getBorrowConfirmStatus())){ + needRemoveUnReviewBorrowInvoicePlanList.add(invoicePlan2); + } + } + //如果需要删除的待发货申请单不为,则删除 + if(CollectionUtils.isNotEmpty(needRemoveUnReviewBorrowInvoicePlanList)){ + invoicePlanList.removeAll(needRemoveUnReviewBorrowInvoicePlanList); + } + } return invoicePlanList; }