| | |
| | | package com.ruoyi.procurementrecord.utils; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementRecordMapper; |
| | | import com.ruoyi.procurementrecord.mapper.ProcurementRecordOutMapper; |
| | | import com.ruoyi.stock.dto.StockInRecordDto; |
| | |
| | | StockInRecord one = stockInRecordService.getOne(new QueryWrapper<StockInRecord>() |
| | | .lambda().eq(StockInRecord::getRecordId, recordId) |
| | | .eq(StockInRecord::getRecordType, recordType)); |
| | | |
| | | stockInRecordService.batchDelete(Collections.singletonList(one.getId())); |
| | | if (ObjectUtils.isNotEmpty(one)) { |
| | | stockInRecordService.batchDelete(Collections.singletonList(one.getId())); |
| | | } |
| | | } |
| | | public void deleteStockOutRecord(Long recordId, String recordType) { |
| | | StockOutRecord one = stockOutRecordService.getOne(new QueryWrapper<StockOutRecord>() |
| | | .lambda().eq(StockOutRecord::getRecordId, recordId) |
| | | .eq(StockOutRecord::getRecordType, recordType)); |
| | | |
| | | stockOutRecordService.batchDelete(Collections.singletonList(one.getId())); |
| | | if (ObjectUtils.isNotEmpty(one)) { |
| | | stockOutRecordService.batchDelete(Collections.singletonList(one.getId())); |
| | | } |
| | | } |
| | | } |