Commit 76c5d1ae authored by 张森's avatar 张森

装备列表优化

parent 16a297ce
...@@ -2100,6 +2100,7 @@ ...@@ -2100,6 +2100,7 @@
<select id="getColaCategoryAmountEquList" resultMap="CategoryAmountList"> <select id="getColaCategoryAmountEquList" resultMap="CategoryAmountList">
SELECT SELECT
...@@ -2134,7 +2135,9 @@ ...@@ -2134,7 +2135,9 @@
wled.code as eqtype, wled.code as eqtype,
wles.biz_org_code as bizOrgCode, wles.biz_org_code as bizOrgCode,
wles.biz_org_name as bizOrgName, wles.biz_org_name as bizOrgName,
wles.equip_status as equipStatus wles.equip_status as equipStatus,
wec.industry_code as industryCode,
wle.is_iot as wleIsIot
FROM FROM
(select id,name,qr_code,code ,iot_code ,biz_org_code,team_id ,biz_org_name,create_date ,equipment_detail_id ,system_id,equip_status from wl_equipment_specific) wles (select id,name,qr_code,code ,iot_code ,biz_org_code,team_id ,biz_org_name,create_date ,equipment_detail_id ,system_id,equip_status from wl_equipment_specific) wles
LEFT JOIN (select id,amount,status,equipment_specific_id,warehouse_structure_id from wl_stock_detail ) wlsd on wlsd.equipment_specific_id = wles.id LEFT JOIN (select id,amount,status,equipment_specific_id,warehouse_structure_id from wl_stock_detail ) wlsd on wlsd.equipment_specific_id = wles.id
...@@ -2149,9 +2152,7 @@ ...@@ -2149,9 +2152,7 @@
and LEFT (wle.CODE, #{hierarchy}) = #{codeHead} and LEFT (wle.CODE, #{hierarchy}) = #{codeHead}
<!-- and wec.`code` like concat(#{codeHead}, '%')--> <!-- and wec.`code` like concat(#{codeHead}, '%')-->
</if> </if>
<if test="equipTypeAmountPage.industryCode!=null">
and wec.industry_code = #{equipTypeAmountPage.industryCode}
</if>
<if test="equipTypeAmountPage.teamId!=null"> <if test="equipTypeAmountPage.teamId!=null">
and wles.team_id = #{equipTypeAmountPage.teamId} and wles.team_id = #{equipTypeAmountPage.teamId}
</if> </if>
...@@ -2176,9 +2177,7 @@ ...@@ -2176,9 +2177,7 @@
<if test="equipTypeAmountPage.status == 1"> <if test="equipTypeAmountPage.status == 1">
and wlsd.warehouse_structure_id is null and wlsd.warehouse_structure_id is null
</if> </if>
<if test="equipTypeAmountPage.isIot!=null">
and wle.is_iot=#{equipTypeAmountPage.isIot}
</if>
<if test="equipTypeAmountPage.status == 0"> <if test="equipTypeAmountPage.status == 0">
and wlsd.warehouse_structure_id is not null and wlsd.warehouse_structure_id is not null
</if> </if>
...@@ -2201,9 +2200,18 @@ ...@@ -2201,9 +2200,18 @@
<if test="equipTypeAmountPage.bizOrgCode!=null and equipTypeAmountPage.bizOrgCode!=''"> <if test="equipTypeAmountPage.bizOrgCode!=null and equipTypeAmountPage.bizOrgCode!=''">
AND wles.biz_org_code LIKE CONCAT(#{equipTypeAmountPage.bizOrgCode},'%') AND wles.biz_org_code LIKE CONCAT(#{equipTypeAmountPage.bizOrgCode},'%')
</if> </if>
group by wles.id
having 1 = 1
<if test="equipTypeAmountPage.industryCode!=null">
AND industryCode = #{equipTypeAmountPage.industryCode}
</if>
<if test="equipTypeAmountPage.isIot!=null">
AND wleIsIot = #{equipTypeAmountPage.isIot}
</if>
order by createDate DESC order by createDate DESC
</select> </select>
<select id="listByBizOrgCode" resultType="java.util.Map"> <select id="listByBizOrgCode" resultType="java.util.Map">
SELECT SELECT
form_group_id typeId, form_group_id typeId,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment