| | |
| | | package com.ruoyi.stock.mapper; |
| | | |
| | | import com.ruoyi.stock.pojo.StockOutRecord; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.bean.dto.sales.SalesOutboundDto; |
| | | import com.ruoyi.account.bean.vo.sales.SalesOutboundVo; |
| | | import com.ruoyi.stock.dto.StockOutRecordDto; |
| | | import com.ruoyi.sales.dto.SalesLedgerDto; |
| | | import com.ruoyi.sales.pojo.SalesLedger; |
| | | import com.ruoyi.stock.execl.StockOutRecordExportData; |
| | | import com.ruoyi.stock.pojo.StockOutRecord; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | @Mapper |
| | | public interface StockOutRecordMapper extends BaseMapper<StockOutRecord> { |
| | | IPage<StockOutRecordDto> listPage(Page page, @Param("params") StockOutRecordDto stockOutRecordDto); |
| | | |
| | | List<StockOutRecordExportData> listStockOutRecordExportData(@Param("params") StockOutRecordDto stockOutRecordDto); |
| | | |
| | | IPage<SalesOutboundVo> listPageAccountSales(Page page, @Param("req") SalesOutboundDto salesOutboundDto); |
| | | |
| | | /** |
| | | * 按来源明细id批量查询出库记录。 |
| | | * |
| | | * <p>stock_out_record 不在 {@code IgnoreTableConfig.IGNORE_TABLES} 白名单里,普通查询会被 |
| | | * DataScopeSqlInterceptor 追加 create_user/dept_id 条件。委外订单要靠这批记录做「完成前的出库审批校验」 |
| | | * 和「作废时的占用释放」,换个账号查不到就会静默漏校验、占用释放不掉,所以这里显式跳过数据权限。</p> |
| | | */ |
| | | List<StockOutRecord> selectByRecordIds(@Param("recordIds") List<Long> recordIds, |
| | | @Param("recordType") String recordType); |
| | | |
| | | /** |
| | | * 油品出库可绑定的销售台账下拉。 |
| | | * |
| | | * <p>销售台账是被出库单引用的主数据,而 {@code sales_ledger} 不在 {@code IgnoreTableConfig.IGNORE_TABLES} |
| | | * 白名单里,按 create_user/dept_id 过滤会让油库/发货角色选不到销售建的台账,所以这里显式跳过数据权限。 |
| | | * 只读查询,且不按 ledgerType 过滤 —— 代储台账也要能绑(绑了走代储出库)</p> |
| | | */ |
| | | IPage<SalesLedger> bindableSalesLedgerPage(Page page, @Param("req") SalesLedgerDto salesLedgerDto); |
| | | } |