| | |
| | | import com.ruoyi.system.dto.InventoryGoodsDto; |
| | | import com.ruoyi.system.mapper.*; |
| | | import com.ruoyi.system.model.*; |
| | | import com.ruoyi.system.query.TClinicGoodsWarehouseQuery; |
| | | import com.ruoyi.system.query.TErpGoodsAdminQuery; |
| | | import com.ruoyi.system.query.TErpGoodsInventoryQuery; |
| | | import com.ruoyi.system.query.TErpGoodsQuery; |
| | | import com.ruoyi.system.query.*; |
| | | import com.ruoyi.system.service.TErpGoodsService; |
| | | import com.ruoyi.system.service.TErpSupplierInventoryGoodsService; |
| | | import com.ruoyi.system.vo.*; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<TErpGoods> pageAddList(Page<TErpGoods> tErpGoodsPage, String clinicSupplierId, PageAddListQuery query) { |
| | | return this.baseMapper.pageAddList(tErpGoodsPage, clinicSupplierId, query); |
| | | } |
| | | |
| | | @Override |
| | | public List<TErpGoodsVO> listExport(TErpGoodsQuery query, SysUser user) { |
| | | List<TErpGoodsVO> list = this.baseMapper.listExport(query, user); |
| | | if (list.isEmpty()) { |
| | |
| | | |
| | | @Override |
| | | public boolean isExit(String goodsIdCode, String quasiNumber,String id) { |
| | | Long size = this.baseMapper.selectCount(new LambdaQueryWrapper<>(TErpGoods.class).ne(id!=null,TErpGoods::getId, id).and(q -> q.eq(TErpGoods::getGoodsIdCode, goodsIdCode).or().eq(TErpGoods::getQuasiNumber, quasiNumber))); |
| | | Long size = this.baseMapper.selectCount(new LambdaQueryWrapper<>(TErpGoods.class).eq(TErpGoods::getGoodsSource,1).ne(id!=null,TErpGoods::getId, id).and(q -> q.eq(TErpGoods::getGoodsIdCode, goodsIdCode).or().eq(TErpGoods::getQuasiNumber, quasiNumber))); |
| | | if (size > 0) { |
| | | return true; |
| | | } |
| | |
| | | |
| | | } else { |
| | | |
| | | TErpSupplierWarehousingBatch tErpSupplierWarehousingBatch1 = erpSupplierWarehousingBatchMapper.selectById(inventoryGoodsDto.getId()); |
| | | String warehousingId1 = tErpSupplierWarehousingBatch1.getWarehousingId(); |
| | | TErpSupplierWarehousing tErpSupplierWarehousing2 = erpSupplierWarehousingMapper.selectById(warehousingId1); |
| | | |
| | | TErpSupplierOutbound tErpSupplierOutbound = new TErpSupplierOutbound(); |
| | | tErpSupplierOutbound.setWarehouseId(dto.getWarehouseId()); |
| | |
| | | tErpSupplierOutbound.setOutboundType(6); |
| | | tErpSupplierOutbound.setOutboundNumber("G" + s); |
| | | int count = inventoryGoodsDto.getNum() - inventoryGoodsDto.getInventoryCount(); |
| | | tErpSupplierOutbound.setTotalMoney(erpGoods.getSalesAmount().multiply(new BigDecimal(count))); |
| | | tErpSupplierOutbound.setTotalMoney(tErpSupplierWarehousing1.getUnitAmount().multiply(new BigDecimal(count))); |
| | | tErpSupplierOutbound.setGoodsId(tErpSupplierWarehousing2.getGoodsId()); |
| | | erpSupplierOutboundMapper.insert(tErpSupplierOutbound); |
| | | |
| | | |