| | |
| | | if(tErpGoodsUnit!=null){ |
| | | tErpClinicWarehousingBatch.setUnitName(tErpGoodsUnit.getUnitName()); |
| | | } |
| | | |
| | | tErpClinicWarehousingBatch.setPurchaseCount(tErpClinicWarehousingBatch.getWarehousingNumber()); |
| | | } |
| | | |
| | | warehouseGoodsDetailVo.setList(tErpClinicWarehousingBatches); |
| | |
| | | List<TErpClinicOutboundGoods> tErpClinicOutboundGoods2 = erpClinicOutboundGoodsMapper.selectList(new LambdaQueryWrapper<TErpClinicOutboundGoods>().eq(TErpClinicOutboundGoods::getWarehousingBatchId, outboundGoods.getWarehousingBatchId())); |
| | | int sum = tErpClinicOutboundGoods2.stream().mapToInt(TErpClinicOutboundGoods::getOutboundCount).sum(); |
| | | |
| | | int count = tErpClinicWarehousingBatch.getPurchaseCount() - sum; |
| | | int count = tErpClinicWarehousingBatch.getWarehousingNumber() - sum; |
| | | outboundGoodsDetailNextVo.setSurplusCount(count); |
| | | |
| | | outboundGoodsDetailNextVo.setUnitAmount(tErpClinicWarehousingBatch.getUnitAmount()); |
| | | if(outboundGoodsDetailNextVo.getUnitAmount()==null){ |
| | | outboundGoodsDetailNextVo.setUnitAmount(tErpClinicWarehousingBatch.getSalesAmount()); |
| | | } |
| | | outboundGoodsDetailNextVo.setOutboundCount(outboundGoods.getOutboundCount()); |
| | | outboundGoodsDetailNextVo.setExpiryDate(tErpClinicWarehousingBatch.getExpiryDate()); |
| | | outboundGoodsDetailNextVo.setTotalAmount(outboundGoodsDetailNextVo.getUnitAmount().multiply(new BigDecimal(outboundGoods.getOutboundCount()))); |