<?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.ProductionLineWarehouseClientMapper">
|
|
<delete id="deleteByMainId" parameterType="java.lang.String">
|
DELETE
|
FROM mom_base_production_line_warehouse_client
|
WHERE
|
warehouse_id = #{mainId}
|
</delete>
|
|
<select id="selectByMainId" parameterType="java.lang.String" resultType="org.jeecg.modules.base.entity.ProductionLineWarehouseClient">
|
SELECT *
|
FROM mom_base_production_line_warehouse_client
|
WHERE
|
warehouse_id = #{mainId}
|
</select>
|
<select id="getFactoryList" resultType="Map">
|
select
|
t1.id id,
|
t1.code code,
|
t1.name name
|
from mom_base_factory_model t1
|
left join(select * from mom_base_factory_element_category where del_flag = 0) t2
|
on t1.factory_element_category_id= t2.id
|
left join (select * from sys_depart where del_flag = 0) t3
|
on t1.depart_id = t3.id
|
left join (select * from mom_sys_data_version where business_type='工厂建模' and del_flag=0) t4
|
on t1.data_version_id = t4.id
|
left join (select * from mom_base_factory_model where del_flag = 0) t5
|
on t1.parent_id = t5.id
|
where t1.del_flag = 0
|
and t1.version = #{version}
|
<if test="parentIds != null and parentIds.size > 0">
|
and t1.parent_id in
|
<foreach collection="parentIds" open="(" separator="," close=")" item="parentId">
|
#{parentId}
|
</foreach>
|
</if>
|
<if test="ids != null and ids.size > 0">
|
and t1.id not in
|
<foreach collection="ids" open="(" separator="," close=")" item="id">
|
#{id}
|
</foreach>
|
</if>
|
and t2.name != '工厂'
|
and t2.name != '车间'
|
</select>
|
</mapper>
|