lyh
2025-05-08 85e36a5016633748bbd76bb4ddaef49566a505d5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
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.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.Map;
 
/**
 * @Description: tms_goods_shelves
 * @Author: jeecg-boot
 * @Date:   2025-05-08
 * @Version: V1.0
 */
@Service
public class GoodsShelvesServiceImpl extends ServiceImpl<GoodsShelvesMapper, GoodsShelves> implements IGoodsShelvesService {
 
    @Override
    public IPage<GoodsShelves> queryPageList(Page<GoodsShelves> page, Map<String, String[]> parameterMap) {
        QueryWrapper<GoodsShelves> 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);
    }
}