<?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.production.mapper.HandymanTemplateMapper">
|
|
<resultMap id="handymanTemplateMap" type="com.chinaztt.mes.production.dto.HandymanTemplateDTO">
|
<id property="id" column="id"/>
|
<result property="templateNo" column="template_no"/>
|
<result property="templateDescription" column="template_description"/>
|
<result property="remark" column="remark"/>
|
<result property="workstationId" column="workstation_id"/>
|
</resultMap>
|
|
<select id="getList" resultMap="handymanTemplateMap">
|
select distinct pht.*
|
from production_handyman_template pht
|
left join basic_join_workstation_template bjwt on bjwt.handyman_template_id=pht."id"
|
<if test="ew.emptyOfWhere == false">
|
${ew.customSqlSegment}
|
</if>
|
</select>
|
|
|
<select id="getProductionHandymanTemplateByWorkstation" resultMap="handymanTemplateMap">
|
select distinct pht.*
|
from production_handyman_template pht
|
left join basic_join_workstation_template bjwt on bjwt.handyman_template_id=pht."id"
|
where bjwt.workstation_id in
|
<foreach collection="workstationIdList" item="id" index="index" open="(" close=")" separator=",">
|
#{id}
|
</foreach>
|
</select>
|
</mapper>
|