<?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="org.jeecg.modules.base.mapper.WorkCenterEquipmentMapper">
|
<select id="listByWorkCenterId" resultType="Map">
|
select
|
t1.id id,
|
t2.id equipmentId,
|
t2.num equipmentCode,
|
t2.name equipmentName,
|
t2.model equipmentModel,
|
t2.equipment_category_id equipmentCategoryId,
|
t2.standard equipmentStandard,
|
t2.manufacturer equipmentManufacturer
|
from
|
mom_base_work_center_equipment t1
|
left join (select * from mom_base_equipment where del_flag=0) t2
|
on t1.equipment_id = t2.id
|
where t1.work_center_id = #{workCenterId}
|
and t1.del_flag = 0
|
</select>
|
<select id="getAddEquipmentListByEquipmentCategoryId" resultType="Map">
|
select
|
id id,
|
num equipmentCode,
|
name equipmentName,
|
model equipmentModel,
|
equipment_category_id equipmentCategoryId,
|
standard equipmentStandard,
|
manufacturer equipmentManufacturer
|
from
|
mom_base_equipment
|
where equipment_category_id = #{equipmentCategoryId}
|
<if test="equipmentIdList != null and equipmentIdList.size > 0">
|
and id not in (
|
select id from mom_base_equipment where del_flag=0 and id in
|
<foreach collection="equipmentIdList" open="(" separator="," close=")" item="equipId">
|
#{equipId}
|
</foreach>
|
)
|
</if>
|
and del_flag = 0
|
</select>
|
</mapper>
|