cuijian
2023-08-19 bdd0875d4b13a3f1ef472f64d4b6a95e0ef64b22
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.base.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.jeecg.common.system.vo.SelectTreeModel;
import org.jeecg.modules.base.entity.FactoryModel;
import org.jeecg.modules.base.entity.FactoryModelDetail;
import org.jeecg.modules.system.entity.SysDepart;
import org.springframework.stereotype.Repository;
 
import java.util.List;
import java.util.Map;
 
/**
 * @Description: 工厂建模
 * @Author: jeecg-boot
 * @Date:   2022-11-08
 * @Version: V1.0
 */
@Repository
public interface FactoryModelMapper extends BaseMapper<FactoryModel> {
    /**
     * 【vue3专用】根据父级ID查询树节点数据
     *
     * @param parentId
     * @param version
     * @return
     */
    List<SelectTreeModel> loadTreeByEnterpriseIdAndVersion(@Param("parentId") String parentId, @Param("version")Integer version);
    /**
     * 根据当前登录系统管理员查询其所在公司的id
     *
     * @param uid
     * @return
     */
    String selectEnterpriseIdByUid(String uid);
    /**
     * 获取版本列表
     * @param page
     * @param parentId
     * @param version
     * @param ids
     * @return
     */
    List<Map<String,Object>> getFactoryList(Page<Map<String,Object>> page,
                                           @Param("version") Integer version,
                                           @Param("parentId") String parentId,
                                            @Param("ids") List<String> ids
                                            );
    /**
     * 获取部门列表
     *
     * @param
     * @return
     */
    List<SysDepart> getDepartList();
    /**
     * 获取父节点
     *
     * @param id
     * @return
     */
    FactoryModelDetail getFatherIdById(String id);
    /**
     * 根据父节点id获取孩子列表
     *
     * @param eid
     * @return
     */
    List<FactoryModelDetail> getListByEid(String eid);
    /**
     * 获取所有版本号
     * @param
     *
     * @return
     */
    List<Integer> getAllVersion();
    /**
     * 获取生效版本号
     *
     * @return
     */
    List<Integer> getUsableVersion();
    /**
     * 获取生效版本号
     *
     * @return
     */
    List<Integer> getLastUsableVersion();
    /**
     * 根据父Id获取所有孩子Id
     * @param parentId
     * @return
     */
    List<String> getAllChildrenIdByParentId(@Param("parentId")String parentId);
    /**
     * 获取最后一次生效列表
     * @param enterpriseIds
     * @return
     */
    List<FactoryModel> getLastUsableList(@Param("enterpriseIds") List<String> enterpriseIds);
    /**
     * 获取当前生效列表
     * @param enterpriseIds
     * @return
     */
    List<FactoryModel> getUsableList(@Param("enterpriseIds") List<String> enterpriseIds);
    /**
     * 获取版本状态根据版本号
     * @param version
     * @return
     */
    List<String> getVersionStatusByVersion(@Param("version") Integer version);
    /**
     * 获取当前生效车间列表
     * @return
     */
    List<Map<String,Object>> getUsableWorkShopList();
}