|
@@ -15,14 +15,23 @@
|
|
|
<result property="inspectionstandards" column="inspectionstandards" />
|
|
|
<result property="classification" column="classification" />
|
|
|
<result property="equipdefname" column="equipdefname" />
|
|
|
+ <result property="classification_dictText" column="classification_dictText" />
|
|
|
</resultMap>
|
|
|
|
|
|
<select id="getCmmsInspectContentItemListByCountId" parameterType="String" resultMap="CmmsSpotcheckContentItemResult">
|
|
|
select b.id, b.inspectcheckcontid, b.inspectcheckitemid, i.itemcode, i.itemname,
|
|
|
- i.equipdefid, i.conditions, i.refervalue, i.tag, i.sys_org_code, i.inspectionstandards, i.classification, t.name as equipdefname
|
|
|
+ i.equipdefid, i.conditions, i.refervalue, i.tag, i.sys_org_code, i.inspectionstandards, i.classification, t.name as equipdefname,d.item_text as classification_dictText
|
|
|
from cmms_inspect_content_item as b
|
|
|
left join cmms_inspect_item as i on b.inspectcheckitemid = i.id
|
|
|
left join tpm_equipment_tree as t on i.equipdefid = t.id
|
|
|
+ left join
|
|
|
+ (
|
|
|
+ select dt.item_text,dt.item_value
|
|
|
+ from sys_dict sd
|
|
|
+ LEFT JOIN sys_dict_item dt
|
|
|
+ on sd.dict_code = 'inspect_item_type' and sd.id = dt.dict_id
|
|
|
+ )d
|
|
|
+ on i.classification = d.item_value
|
|
|
<where>
|
|
|
<if test="inspectcheckcontid != null "> and b.inspectcheckcontid = #{inspectcheckcontid}</if>
|
|
|
</where>
|