Browse Source

添加点检项目排序

master
shenzhouyu 3 weeks ago
parent
commit
0553f8ecbe
  1. 58
      src/main/resources/mapper/pms/EamMapper.xml

58
src/main/resources/mapper/pms/EamMapper.xml

@ -446,7 +446,7 @@
FROM eam_properties_model_detail a
left join eam_properties_item b on a.function_type = b.itemType and a.properties_item_no = b.itemNo and a.site = b.site and a.bu_no = b.bu_no and a.check_type = b.check_type
where a.function_type = #{functionType} and a.code_no = #{codeNo} and a.site = #{site} and a.bu_no = #{buNo} and a.check_type = #{checkType}
order by order_id
order by a.order_id
</select>
<select id="checkItem" resultType="EamPropertiesModelDetailData">
@ -1398,15 +1398,17 @@
a.ItemType,
a.image_flag,
a.produce_control_flag,
CASE WHEN b.id is null THEN 'N'
CASE WHEN d.id is null THEN 'N'
ELSE 'Y'
END as uploadFlag,
a.item_notes
from eam_workPlan_item as a
left join eam_workOrder as c on a.site = c.site and a.PlanID = c.PlanID and a.bu_no = c.bu_no
left join (SELECT MAX (id) as id, order_ref1, order_ref2, order_ref3, order_ref4 FROM sys_oss GROUP BY order_ref1, order_ref2, order_ref3, order_ref4) as b
on b.order_ref1 = a.site and b.order_ref2 = c.OrderNo and b.order_ref3 = a.ItemNo and order_ref4 = a.bu_no
left join eam_properties_model_detail pmd on a.Site = pmd.site and a.ItemType = pmd.function_type and a.ItemNo = pmd.properties_item_no and a.bu_no = pmd.bu_no and pmd.code_no = c.PropertiesCode
left join (SELECT MAX (id) as id, order_ref1, order_ref2, order_ref3, order_ref4 FROM sys_oss GROUP BY order_ref1, order_ref2, order_ref3, order_ref4) as d
on d.order_ref1 = a.site and d.order_ref2 = c.OrderNo and d.order_ref3 = a.ItemNo and d.order_ref4 = a.bu_no
where a.site = #{site} and c.orderNo = #{orderNo} and a.ObjectID = #{objectID} and a.bu_no = #{buNo}
order by pmd.order_id
</select>
<select id="checkEamOrderStatus" resultType="com.xujie.sys.modules.pms.data.EamWorkOrderInData">
@ -1524,28 +1526,31 @@
<select id="eamWorkOrderReportSearch" resultType="com.xujie.sys.modules.pms.data.EamWorkOrderItemInData">
SELECT
Site,
bu_no,
OrderNo,
ItemNo,
ItemDesc,
DefaultValue,
ValueType,
ValueType_DB,
ValueChooseFlag,
MaxValue,
MinValue,
ItemRemark,
ItemType,
TextValue,
NumberValue,
CreatedDate,
CreatedBy,
FinishFlag,
itemResult,
item_notes
from eam_workOrder_item
where site = #{site} and orderNo = #{orderNo} and bu_no = #{buNo}
a.Site,
a.bu_no,
a.OrderNo,
a.ItemNo,
a.ItemDesc,
a.DefaultValue,
a.ValueType,
a.ValueType_DB,
a.ValueChooseFlag,
a.MaxValue,
a.MinValue,
a.ItemRemark,
a.ItemType,
a.TextValue,
a.NumberValue,
a.CreatedDate,
a.CreatedBy,
a.FinishFlag,
a.itemResult,
a.item_notes
from eam_workOrder_item a
left join eam_workOrder c on a.site = c.site and a.orderNo = c.orderNo and a.bu_no = c.bu_no
left join eam_properties_model_detail pmd on a.site = pmd.site and a.ItemType = pmd.function_type and a.ItemNo = pmd.properties_item_no and a.bu_no = pmd.bu_no and pmd.code_no = c.PropertiesCode
where a.site = #{site} and a.orderNo = #{orderNo} and a.bu_no = #{buNo}
order by pmd.order_id
</select>
<update id="cancelOrder" parameterType="com.xujie.sys.modules.pms.data.EamWorkOrderInData">
@ -2609,6 +2614,7 @@
left join eam_properties_model_detail b on a.ItemType = b.function_type and a.ItemNo = b.properties_item_no and a.site = b.site and a.bu_no = b.bu_no
left join eam_object_item c on a.ItemType = c.ItemType and a.ItemNo = c.ItemNo and c.objectID = #{objectID}
where a.ItemType = #{itemType} and b.code_no = #{propertiesCode} and a.site = #{site} and a.bu_no = #{buNo}
order by b.order_id
</insert>
<!-- 添加新项目可选值 -->

Loading…
Cancel
Save