Lius
2024-03-14 1292cf73f7db223f35ab450eabeeedbf8802eb5a
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
package org.jeecg.modules.system.mapper;
 
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.system.entity.MdcProduction;
import org.springframework.data.repository.query.Param;
 
import java.util.List;
 
 
/**
 * @Description: 产线表
 * @Author: liuS
 * @Date: 2023-03-23
 * @Version: V1.0
 */
public interface MdcProductionMapper extends BaseMapper<MdcProduction> {
 
    /**
     * 根据id下级产线
     */
    @Select("SELECT * FROM mdc_production where del_flag ='0' AND parent_id = #{parentId,jdbcType=VARCHAR}")
    List<MdcProduction> queryProdByPid(@Param("parentId") String parentId);
 
    /**
     * 递归查询所有子节点
     */
    List<String> recursionChildren(@Param("productionId") String productionId);
 
    /**
     * 根据用户id和车间id获取用户拥有的车间id
     * @param userId
     * @param productionId
     * @return
     */
    String findFirstProduction(@Param("userId") String userId, @Param("productionId") String productionId);
}