package com.unis.crk.cplbusiness.mapper;

import com.unis.crk.cplbusiness.entity.DataKcglCplfcbgzDefault;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import org.apache.ibatis.annotations.Param;
import java.util.Map;

/**
 * <p>
 * 成品粮分仓保管账 Mapper 接口
 * </p>
 *
 * @author TangSong
 * @since 2022-03-21
 */
public interface DataKcglCplfcbgzDefaultMapper extends BaseMapper<DataKcglCplfcbgzDefault> {
        /**
         * 自定义sql分页
         * @param page
         * @param queryWrapper 看这里看这里，如果自定义的方法中需要用到wrapper查询条件，需要这样写
         * @return
         */
        IPage<Map<String,Object>> selectMyMapsPage(IPage<DataKcglCplfcbgzDefault> page, @Param(Constants.WRAPPER) QueryWrapper<DataKcglCplfcbgzDefault> queryWrapper);


        /**
         * 用形成库存生成分库保管账
         * @param userName
         * @param inNum
         * @param outNum
         * @param kcsl
         * @param zje
         * @param dataId
         * @return
         */
        int addFfcbgz(@Param("userName")String userName,
                      @Param("inNum")double inNum,
                      @Param("outNum")double outNum,
                      @Param("kcsl")double kcsl,
                      @Param("zje")double zje,
                      @Param("dataId")String dataId);

}
