PurchaseMaterialMapper.java 2.2 KB
package com.skua.modules.erp.mapper;

import java.util.List;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.skua.modules.erp.entity.DistributContract;
import com.skua.modules.erp.vo.MaterialSearchVO;
import com.skua.modules.erp.vo.PurchaseMaterialVO;
import com.skua.modules.erp.vo.PurchasePlanSearchVO;
import com.skua.tool.annotation.Anonymous;
import org.apache.ibatis.annotations.Param;
import com.skua.modules.erp.entity.PurchaseMaterial;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * 采购物料清单
 */
public interface PurchaseMaterialMapper extends BaseMapper<PurchaseMaterial> {

    /***
     * 根据合同编号删除物料清单集合
     * @param contractId
     * @return
     */
    public int  delByContractId( @Param("contractId") String contractId);

    /***
     * 根据合同编号获取物料清单集合
     * @param contractId
     * @return
     */
     List<PurchaseMaterial> queryListByContractId( @Param("contractId") String contractId);


    /***
     * 分页查询采购物料清单
     * @param page
     * @param goodCode
     * @param departId
     * @return
     */
    IPage<PurchaseMaterial> queryByPage(@Param("page")Page<PurchaseMaterial> page, @Param("goodCode")String goodCode, @Param("departId")String departId);

    /***
     * 根据货号查询采购合同物料清单
     * @param goodCode
     * @param departId
     * @return
     */
    List<PurchaseMaterial> queryMaterialByGoodCode( @Param("goodCode")String goodCode, @Param("departId")String departId);


    /***
     * 根据id或code校验货号是否唯一
     * @param id
     * @param goodCode
     * @return
     */
    int checkGoodCode(@Param("id")String id,@Param("goodCode") String goodCode);


    /**
     * 药剂入库查询结果:物料清单
     * @param materialSearchVO
     * @return
     */
    @Anonymous
    IPage<PurchaseMaterialVO> queryPurchaseMaterialListByIn(Page<PurchaseMaterialVO> page,@Param("param") MaterialSearchVO materialSearchVO);

    /***
     *  根据id或code校验合同编号是否唯一
     * @param contractCode
     * @return
     */
    int checkContractCode(@Param("contractCode")String contractCode   );
}