李林
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
<?xml version="1.0" encoding="UTF-8"?>
 
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
 
<mapper namespace="com.chinaztt.mes.basic.mapper.JoinWorkstationTemplateMapper">
 
    <resultMap id="joinWorkstationTemplateMap" type="com.chinaztt.mes.basic.entity.JoinWorkstationTemplate">
        <id property="workstationId" column="workstation_id"/>
        <result property="handymanTemplateId" column="handyman_template_id"/>
    </resultMap>
    <select id="checkOnePartFamily" resultType="java.lang.String">
        select bpf.part_family_name
        from production_handyman_template pht
        left join production_join_type_template pjtt on pjtt.handyman_template_id=pht."id"
        left join production_handyman_type phty on phty."id"=pjtt.handyman_type_id
        left join basic_part_family bpf on bpf."id"=phty.part_family_id
        where phty.part_family_id is not null and pht."id" in
        <foreach collection="ids" index="index" item="item" open="(" separator="," close=")">
            #{item}
        </foreach>
        group by phty.part_family_id,bpf.part_family_name
        having count(1)>1
    </select>
</mapper>