|
@@ -1,7 +1,7 @@
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
|
|
<mapper namespace="cn.com.ty.lift.business.annualinspection.mapper.AnnualInspectionMapper" >
|
|
|
- <resultMap id="BaseResultMap" type="cn.com.ty.lift.business.annualinspection.dto.InspectionResult" >
|
|
|
+ <resultMap id="BaseResultMap" type="cn.com.ty.lift.business.annualinspection.dto.InspectionResponse" >
|
|
|
<id column="id" property="id" jdbcType="BIGINT" />
|
|
|
<result column="lift_id" property="liftId" jdbcType="BIGINT" />
|
|
|
<result column="mt_company_id" property="mtCompanyId" jdbcType="BIGINT" />
|
|
@@ -27,8 +27,8 @@
|
|
|
<result column="device_position" property="devicePosition" jdbcType="VARCHAR" />
|
|
|
</resultMap>
|
|
|
|
|
|
-
|
|
|
- <select id="listByCondition" resultMap="BaseResultMap" parameterType="cn.com.ty.lift.business.annualinspection.dto.InspectionCondition" >
|
|
|
+ <!--多条件查询年检记录-->
|
|
|
+ <select id="listByCondition" resultMap="BaseResultMap" parameterType="cn.com.ty.lift.business.annualinspection.dto.InspectionRequest" >
|
|
|
SELECT
|
|
|
ai.*,
|
|
|
re.area_name AS area_name,
|
|
@@ -44,22 +44,22 @@
|
|
|
LEFT JOIN region re ON re.mt_company_id = ai.mt_company_id
|
|
|
LEFT JOIN project pr ON pr.mt_company_id = ai.mt_company_id
|
|
|
WHERE
|
|
|
- ai.status = #{condition.status}
|
|
|
+ ai.status = #{cond.status}
|
|
|
|
|
|
- <if test="condition.workerId != null">
|
|
|
- AND ui.user_id = #{condition.workerId}
|
|
|
+ <if test="cond.workerId != null and cond.workerId > 0">
|
|
|
+ AND ui.user_id = #{cond.workerId}
|
|
|
</if>
|
|
|
- <if test="condition.info != null and condition.info != ''">
|
|
|
- AND li.registration_code LIKE #{condition.info}
|
|
|
+ <if test="cond.info != null and cond.info != ''">
|
|
|
+ AND li.registration_code LIKE #{cond.info}
|
|
|
</if>
|
|
|
- <if test="condition.regionId != null">
|
|
|
- AND re.id = #{condition.regionId}
|
|
|
+ <if test="cond.regionId != null and cond.regionId > 0">
|
|
|
+ AND re.id = #{cond.regionId}
|
|
|
</if>
|
|
|
- <if test="condition.projectId != null">
|
|
|
- AND pr.id = #{condition.projectId}
|
|
|
+ <if test="cond.projectId != null and cond.projectId > 0">
|
|
|
+ AND pr.id = #{cond.projectId}
|
|
|
</if>
|
|
|
- <if test="condition.stepStatus != null">
|
|
|
- AND ai.step_status = #{condition.stepStatus}
|
|
|
+ <if test="cond.stepStatus != null">
|
|
|
+ AND ai.step_status = #{cond.stepStatus}
|
|
|
</if>
|
|
|
|
|
|
</select>
|