李林
2023-10-07 658d4927d468c47208fd012d9128b09249c07eff
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
package com.chinaztt.mes.production.mapper;
 
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.chinaztt.mes.production.dto.HandymanTypeDTO;
import com.chinaztt.mes.production.entity.HandymanType;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
 
import java.util.List;
 
/**
 * 杂工类型维护
 *
 * @author cxf
 * @date 2020-12-01 13:13:44
 */
@Mapper
public interface HandymanTypeMapper extends BaseMapper<HandymanType> {
    /**
     * 获取关联的人工类型
     *
     * @param page 分页对象
     * @param gen  杂工类型维护
     * @param id   杂工类型维护
     * @return
     */
    IPage<List<HandymanType>> getHandymanType(Page page, @Param("ew") QueryWrapper<HandymanType> gen, @Param("id") Long id);
 
    /**
     * 获取未关联的人工类型
     *
     * @param page 分页对象
     * @param gen  杂工类型维护
     * @param id   杂工类型维护
     * @return
     */
    IPage<List<HandymanType>> getHandyman(Page page, @Param("ew") QueryWrapper<HandymanType> gen, @Param("id") Long id);
 
    /**
     * 根据模板id分页查询
     *
     * @param page
     * @param gen
     * @return
     */
    IPage<List<HandymanTypeDTO>> fetchListByTemplateId(Page page, @Param("ew") QueryWrapper<HandymanTypeDTO> gen);
 
    /**
     * 根据模板id过滤分页查询
     *
     * @param page
     * @param gen
     * @param handymanTemplateId
     * @return
     */
    IPage<List<HandymanTypeDTO>> fetchListFilterTemplateId(Page page, @Param("ew") QueryWrapper<HandymanTypeDTO> gen, @Param("handymanTemplateId") Long handymanTemplateId);
 
    /**
     * 根据模板id查询人工类型
     *
     * @param id
     * @return
     */
    HandymanTypeDTO getHandymanTypeById(Long id);
 
    /**
     * 根据班次id查询人工类型
     *
     * @param dutyRecordIdList
     * @return
     */
    List<HandymanTypeDTO> getHandymanTypeByDutyRecordId(@Param("dutyRecordIdList") List<Long> dutyRecordIdList);
 
    /**
     * 根据零件/工作站查询对应的人工类型
     *
     * @param workstationId
     * @param partId
     * @return
     */
    HandymanType selectByWorkstationIdAndPartId(@Param("workstationId") Long workstationId, @Param("partId") Long partId);
}