Index: ssts-web/src/main/java/com/forgon/disinfectsystem/stocktakerecordmanager/service/StockTakeRecordManagerImpl.java =================================================================== diff -u -r13424 -r13727 --- ssts-web/src/main/java/com/forgon/disinfectsystem/stocktakerecordmanager/service/StockTakeRecordManagerImpl.java (.../StockTakeRecordManagerImpl.java) (revision 13424) +++ ssts-web/src/main/java/com/forgon/disinfectsystem/stocktakerecordmanager/service/StockTakeRecordManagerImpl.java (.../StockTakeRecordManagerImpl.java) (revision 13727) @@ -16,6 +16,7 @@ import com.forgon.disinfectsystem.entity.assestmanagement.DisposableGoodsBatchStock; import com.forgon.disinfectsystem.entity.assestmanagement.DisposableGoodsIdentification; import com.forgon.disinfectsystem.entity.assestmanagement.DisposableGoodsStock; +import com.forgon.disinfectsystem.entity.assestmanagement.ExpensiveDisposablegoods; import com.forgon.disinfectsystem.entity.basedatamanager.supplyroomconfig.SupplyRoomConfig; import com.forgon.disinfectsystem.entity.basedatamanager.warehouse.WareHouse; import com.forgon.disinfectsystem.entity.stocktakerecordmanager.StockDiposableGoodBatch; @@ -137,7 +138,7 @@ //设置标识号 List identificationList = new ArrayList(); List identifications = batchStock.getIdentifications(); - if(identifications != null){ + if(identifications != null && identifications.size() > 0){ for (DisposableGoodsIdentification identification : identifications) { StockIdentificationOfGoods stockIdentification = new StockIdentificationOfGoods(); stockIdentification.setAmount(identification.getAmount()); @@ -152,6 +153,29 @@ goodsPrice += goodsTotalPrice; } } + } else { + //是否高值耗材 + String sql = String + .format("where po.disposableGoodsBatchStock.id = %s and po.status = '%s'", + batchStock.getId(), + ExpensiveDisposablegoods.STATUS_IN_WAREHOUSE); + @SuppressWarnings("unchecked") + List expensiveGoods = objectDao.findBySql(ExpensiveDisposablegoods.class.getSimpleName(), sql); + if(expensiveGoods != null){ + for (ExpensiveDisposablegoods expensiveDisposablegoods : expensiveGoods) { + StockIdentificationOfGoods stockIdentification = new StockIdentificationOfGoods(); + stockIdentification.setAmount(1L); + stockIdentification.setIdentification(expensiveDisposablegoods.getIdentification()); + stockIdentification.setPrice(expensiveDisposablegoods.getPrice()); + stockIdentification.setStockDiposableGoodBatch(stockDiposableGoodBatch); + identificationList.add(stockIdentification); + + recordTotalAmount += stockIdentification.getAmount(); + Double goodsTotalPrice = stockIdentification.getPrice() * stockIdentification.getAmount(); + recordTotalPrice += goodsTotalPrice; + goodsPrice += goodsTotalPrice; + } + } } stockDiposableGoodBatch.setStockIdentifications(identificationList); batcheList.add(stockDiposableGoodBatch);