You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

67 lines
2.3 KiB

<?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.xujie.sys.modules.fanuc.dao.FanncMapper">
<select id="queryWorkCenterList" resultType="com.xujie.sys.modules.fanuc.entity.FanucEntity">
SELECT
wc.id,
wc.workshop_id,
wc.work_center_no,
wc.work_center_desc,
wc.work_center_type_db,
wc.work_center_type,
wc.average_capacity,
wc.efficiency,
wc.utilization,
wc.capacity_type_db,
wc.capacity_type,
wc.umid,
wc.active,
wc.proline_no,
wc.need_setup_flag,
wc.created_by,
wc.created_date,
wc.remark,
wc.update_by,
wc.updated_date,
wc.delflag,
wc.version,
wc.site,
wc.bu_no,
bu.id as bu_id,
bu.bu_desc
FROM
work_center wc
left join BU bu on wc.bu_no = bu.bu_no and wc.site = bu.site
<where>
<if test="fanuc.buId != null">
and bu.id = #{fanuc.buId}
</if>
<if test="fanuc.site != null and fanuc.site != ''">
and wc.site = #{fanuc.site}
</if>
<if test="fanuc.workCenterNo != null and fanuc.workCenterNo != ''">
and wc.work_center_no like #{fanuc.workCenterNo}
</if>
<if test="fanuc.workCenterDesc != null and fanuc.workCenterDesc != ''">
and wc.work_center_desc like #{fanuc.workCenterDesc}
</if>
<if test="fanuc.buNo != null and fanuc.buNo != ''">
and wc.bu_no like #{fanuc.buNo}
</if>
<if test="fanuc.active != null and fanuc.active != ''">
and wc.active = #{fanuc.active}
</if>
</where>
</select>
<select id="queryWorkCenterResource" resultType="java.lang.Integer">
SELECT dbo.get_work_center_resource_num(#{site}, #{workCenterNo}) AS resourceCount
</select>
<select id="queryResourceInfo" resultType="com.xujie.sys.modules.resource.data.ResourceEntity">
SELECT
*
FROM
resource
where site = #{site} and work_center_no = #{workCenterNo}
</select>
</mapper>