|
@@ -2,4 +2,32 @@
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="org.jeecg.modules.cmmsSpotcheckItem.mapper.CmmsSpotcheckItemMapper">
|
|
|
|
|
|
-</mapper>
|
|
|
+ <resultMap type="org.jeecg.modules.cmmsSpotcheckItem.entity.CmmsSpotcheckItem" id="CmmsSpotcheckItemResult">
|
|
|
+ <result property="id" column="id" />
|
|
|
+ <result property="itemcode" column="itemcode" />
|
|
|
+ <result property="itemname" column="itemname" />
|
|
|
+ <result property="equipmenttreeid" column="equipmenttreeid" />
|
|
|
+ <result property="conditions" column="conditions" />
|
|
|
+ <result property="itemtype" column="itemtype" />
|
|
|
+ <result property="tag" column="tag" />
|
|
|
+<!-- <result property="equipmenttreename" column="equipmenttreename" />-->
|
|
|
+ <result property="createBy" column="create_by" />
|
|
|
+ <result property="createTime" column="create_time" />
|
|
|
+ <result property="updateBy" column="update_by" />
|
|
|
+ <result property="updateTime" column="update_time" />
|
|
|
+ <result property="remark" column="remark" />
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <select id="selectCmmsSpotcheckItemList" parameterType="org.jeecg.modules.cmmsSpotcheckItem.entity.CmmsSpotcheckItem" resultMap="CmmsSpotcheckItemResult">
|
|
|
+ select i.id, i.itemcode, i.itemname,
|
|
|
+ i.equipmenttreeid, i.conditions, i.itemtype, i.tag,
|
|
|
+ i.create_by, i.create_time, i.update_by, i.update_time, i.remark
|
|
|
+ from ems_cmms_spotcheck_item as i
|
|
|
+-- left join ems_tpm_equipment_tree as t on i.equipmenttreeid = t.id t.name as equipmenttreename,
|
|
|
+ <where>
|
|
|
+ <if test="itemname != null and itemname != ''"> and (i.itemcode like concat('%', #{itemname}, '%') or i.itemname like concat('%', #{itemname}, '%'))</if>
|
|
|
+ <if test="equipmenttreeid != null "> and i.equipmenttreeid = #{equipmenttreeid}</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+</mapper>
|