Lius
2024-06-07 605fe193f85a2b016f6d8227bdccd7168df40aa3
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
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
package org.jeecg.modules.mdc.mapper;
 
import com.baomidou.mybatisplus.annotation.InterceptorIgnore;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.mdc.dto.MdcEquDepDto;
import org.jeecg.modules.mdc.dto.MdcEquProDto;
import org.jeecg.modules.mdc.dto.MdcEquipmentDto;
import org.jeecg.modules.mdc.entity.MdcEquipment;
import org.jeecg.modules.mdc.entity.MdcEquipmentMonitor;
import org.jeecg.modules.mdc.vo.MdcEquipmentDepVo;
import org.jeecg.modules.mdc.vo.MdcEquipmentProVo;
import org.jeecg.modules.mdc.vo.MdcEquipmentVo;
import org.jeecg.modules.mdc.vo.WorkshopEquipmentVo;
 
import java.util.List;
import java.util.Map;
 
/**
 * @Description: 设备表
 * @Author: liuS
 * @Date: 2023-03-22
 * @Version: V1.0
 */
public interface MdcEquipmentMapper extends BaseMapper<MdcEquipment> {
 
    /**
     * 根据设备Ids,查询设备所属部门名称信息
     */
    List<MdcEquipmentDepVo> getDepNamesByEquipmentIds(@Param("equipmentIds") List<String> equipmentIds);
 
    /**
     * 根据设备Ids,查询设备所属产线名称信息
     */
    List<MdcEquipmentProVo> getProNamesByEquipmentIds(@Param("equipmentIds") List<String> equipmentIds);
 
    /**
     * 根据部门id查询设备列表
     */
    IPage<MdcEquipment> pageListByDepId(Page<MdcEquipment> page, @Param("departId") String departId, @Param("equipmentId") String equipmentId);
 
    /**
     * 根据产线id查询设备列表
     */
    IPage<MdcEquipment> pageListByProId(Page<MdcEquipment> page, @Param("productionId") String productionId, @Param("equipmentId") String equipmentId);
 
    /**
     * 根据部门id查询设备
     */
    List<MdcEquipment> queryByDepartId(@Param("departId") String departId);
 
    /**
     * 根据产线id查询设备
     */
    List<MdcEquipment> queryByProductionId(@Param("productionId") String productionId);
 
    /**
     * 查找设备监控信息
     */
    List<MdcEquipmentMonitor> checkStatusFromEquipmentIds(@Param("equipmentIds") List<String> equipmentIds);
 
    /**
     * 根据产线id查询设备id集合
     */
    List<String> queryIdsByProductions(@Param("allProductionIds") List<String> allProductionIds);
 
    /**
     * 根据部门id查询设备id集合
     */
    List<String> queryIdsByDeparts(@Param("allDepartIds") List<String> allDepartIds);
 
    /**
     * 根据设备编号查询设备信息和部门信息
     *
     * @param equipmentIdList
     * @return
     */
    List<MdcEquDepDto> findEquDepList(@Param("equipmentIdList") List<String> equipmentIdList);
 
    /**
     * 根据设备编号查询设备信息和产线信息
     *
     * @param equipmentIdList
     * @return
     */
    List<MdcEquProDto> findEquProList(@Param("equipmentIdList") List<String> equipmentIdList);
 
    /**
     * 根据大屏车间id查询设备列表
     */
    IPage<MdcEquipment> getEquipmentByWorkshopId(Page<MdcEquipment> page, @Param("workshopEquipmentVo") WorkshopEquipmentVo workshopEquipmentVo);
 
    /**
     * 分页列表
     */
    IPage<MdcEquipment> pageList(Page<MdcEquipment> page, @Param("mdcEquipment") MdcEquipmentVo mdcEquipment);
 
    @InterceptorIgnore(tenantLine = "1")
    @Select("select TOP 1 CollectTime ${columns} from [${tableName}] order by CollectTime desc")
    Map<String, Object> getWorkLineLast(Map<String, Object> param);
 
    /**
     * 导出list
     * @param mdcEquipment
     * @return
     */
    List<MdcEquipment> exportXlsList(@Param("mdcEquipment") MdcEquipmentVo mdcEquipment);
 
    /**
     * 查询单表数据
     * @param tableName
     * @return
     */
    @InterceptorIgnore(tenantLine = "1")
    MdcEquipmentDto findWorkLineLast(@Param("tableName") String tableName);
 
}