package com.yh.saas.plugin.yiliangyiyun.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.yh.saas.plugin.yiliangyiyun.entity.WarehouseBaseInfo;
import com.yh.saas.plugin.yiliangyiyun.entity.WarehousePositionStorageInfo;
import com.yh.saas.plugin.yiliangyiyun.mapper.WarehousePositionStorageInfoMapper;
import com.yh.saas.plugin.yiliangyiyun.service.IWarehousePositionStorageInfoService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;

/**
 * <p>
 * 记录仓库仓位储存信息 服务实现类
 * </p>
 *
 * @author Gongdc
 * @since 2021-05-21
 */
@Service
public class WarehousePositionStorageInfoServiceImpl extends ServiceImpl<WarehousePositionStorageInfoMapper, WarehousePositionStorageInfo> implements IWarehousePositionStorageInfoService {

    /**
     * 盘损货名下拉列表
     * @param positionId
     * @return
     */
    @Override
    public List<WarehousePositionStorageInfo> selectGoodsName(String positionId){
        List<WarehousePositionStorageInfo> warehousePositionStorageInfoList = this.selectList(new EntityWrapper<WarehousePositionStorageInfo>()
                .eq("position_id",positionId).eq("delete_flag", "0"));
        return warehousePositionStorageInfoList;
    }

    @Override
    public Double selectSumStoreage(String compId) {
       return baseMapper.selectSumStoreage(compId);
    }
}
