|
@@ -3,6 +3,39 @@
|
|
|
<mapper namespace="org.jeecg.modules.cmmsInspect.mapper.CmmsInspectMapper">
|
|
|
|
|
|
|
|
|
+ <resultMap id="cmmInspectResult" type="org.jeecg.modules.cmmsInspect.entity.CmmsInspectVo">
|
|
|
+ <result property="id" column="id"/>
|
|
|
+ <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"/>
|
|
|
+ <result property="inspectcode" column="inspectcode"/>
|
|
|
+ <result property="inspectname" column="inspectname"/>
|
|
|
+ <result property="tasktype" column="tasktype"/>
|
|
|
+ <result property="status" column="status"/>
|
|
|
+ <result property="inspectdetail" column="inspectdetail"/>
|
|
|
+ <result property="inspectplanid" column="inspectplanid"/>
|
|
|
+ <result property="chargeruser" column="chargeruser"/>
|
|
|
+ <result property="sysOrgCode" column="sys_org_code"/>
|
|
|
+ <result property="planname" column="planname"/>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <select id="getCmmsInspectList" parameterType="org.jeecg.modules.cmmsInspect.entity.CmmsInspectVo" resultMap="cmmInspectResult">
|
|
|
+ SELECT t.id,t.create_by,t.create_time,t.update_by,t.update_time,t.remark,t.inspectcode,t.inspectname,
|
|
|
+ t.tasktype,t.`status`,t.inspectdetail,t.inspectplanid,t.chargeruser,t.sys_org_code,p.planname
|
|
|
+ FROM cmms_inspect t
|
|
|
+ LEFT JOIN cmms_inspect_plan p
|
|
|
+ ON t.inspectplanid = p.id
|
|
|
+ <where>
|
|
|
+ <if test="cmmsInspect.inspectname != null and cmmsInspect.inspectname != ''">and t.inspectname like concat('%',#{cmmsInspect.inspectname},'%')</if>
|
|
|
+ <if test="cmmsInspect.planname != null and cmmsInspect.planname != ''">and p.planname like concat('%',#{cmmsInspect.planname},'%')</if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
|
|
|
<select id="getCmmsInspectPlanById" resultType="org.jeecg.modules.cmmsInspectPlan.entity.CmmsInspectPlan">
|
|
|
select * from cmms_inspect_plan where id = #{id}
|