package org.jeecg.modules.tms.service.impl; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.jeecg.modules.tms.entity.GoodsShelves; import org.jeecg.modules.tms.entity.vo.DictVo; import org.jeecg.modules.tms.mapper.GoodsShelvesMapper; import org.jeecg.modules.tms.service.IGoodsShelvesService; import org.springframework.stereotype.Service; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import java.util.Collections; import java.util.List; import java.util.Map; /** * @Description: tms_goods_shelves * @Author: jeecg-boot * @Date: 2025-05-08 * @Version: V1.0 */ @Service public class GoodsShelvesServiceImpl extends ServiceImpl implements IGoodsShelvesService { @Override public IPage queryPageList(Page page, Map parameterMap) { QueryWrapper queryWrapper = Wrappers.query(); String[] warehouseIds = parameterMap.get("warehouseId"); if (warehouseIds != null && warehouseIds.length > 0) { queryWrapper.eq("t.warehouse_id", warehouseIds[0]); } String[] warehouseNames = parameterMap.get("warehouseName"); if (warehouseNames != null && warehouseNames.length > 0) { queryWrapper.like("p.warehouse_name", warehouseNames[0]); } String[] locationCodes = parameterMap.get("locationCode"); if (locationCodes != null && locationCodes.length > 0) { queryWrapper.like("t.location_code", locationCodes[0]); } String[] shelfNumbers = parameterMap.get("shelfNumber"); if (shelfNumbers != null && shelfNumbers.length > 0) { queryWrapper.like("t.shelf_number", shelfNumbers[0]); } String[] beginTimes = parameterMap.get("beginTime"); String[] endTimes = parameterMap.get("endTime"); if (beginTimes != null && beginTimes.length > 0) { queryWrapper.ge("t.create_time", beginTimes[0]); } if (endTimes != null && endTimes.length > 0) { queryWrapper.le("t.create_time", endTimes[0]); } queryWrapper.orderByDesc("t.create_time"); return this.baseMapper.queryPageList(page, queryWrapper); } @Override public List queryGoodsShelvesDictList(String warehouseId) { return this.baseMapper.queryGoodsShelvesDictList(warehouseId); } @Override public List queryGoodsShelvesStoreyDictList(String warehouseId, String shelfNumber) { return this.baseMapper.queryGoodsShelvesStoreyDictList(warehouseId, shelfNumber); } }