|
|
@@ -70,83 +70,83 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
AND ((wo.create_time >= STR_TO_DATE(CONCAT(#{monthPeriod}, '-01 00:00:00'), '%Y-%m-%d %H:%i:%s')
|
|
|
AND wo.create_time <![CDATA[<]]> DATE_ADD(STR_TO_DATE(CONCAT(#{monthPeriod}, '-01 00:00:00'), '%Y-%m-%d %H:%i:%s'), INTERVAL 1 MONTH)
|
|
|
) OR wo.is_deferred=1)
|
|
|
- AND wo.item_completion_factor_sum=1
|
|
|
+ <!-- AND wo.item_completion_factor_sum=1 -->
|
|
|
AND (wo.repair_method IS NULL OR wo.repair_method != '2')
|
|
|
GROUP BY
|
|
|
sfi.id
|
|
|
</select>
|
|
|
|
|
|
- <select id="selectGxtMonthFanInspectionById" parameterType="Long" resultMap="GxtMonthFanInspectionResult">
|
|
|
- <include refid="selectGxtMonthFanInspectionVo"/>
|
|
|
- where id = #{id}
|
|
|
- </select>
|
|
|
+<select id="selectGxtMonthFanInspectionById" parameterType="Long" resultMap="GxtMonthFanInspectionResult">
|
|
|
+ <include refid="selectGxtMonthFanInspectionVo"/>
|
|
|
+ where id = #{id}
|
|
|
+</select>
|
|
|
|
|
|
- <insert id="insertGxtMonthFanInspection" parameterType="GxtMonthFanInspection" useGeneratedKeys="true" keyProperty="id">
|
|
|
- insert into gxt_month_fan_inspection
|
|
|
- <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="monthScoreId != null">month_score_id,</if>
|
|
|
- <if test="deptId != null">dept_id,</if>
|
|
|
- <if test="deptName != null and deptName != ''">dept_name,</if>
|
|
|
- <if test="fanInspectionId != null">fan_inspection_id,</if>
|
|
|
- <if test="deviceCount != null">device_count,</if>
|
|
|
- <if test="fanInspectionScore != null">fan_inspection_score,</if>
|
|
|
- <if test="calculatedScore != null">calculated_score,</if>
|
|
|
- <if test="monthPeriod != null and monthPeriod != ''">month_period,</if>
|
|
|
- <if test="status != null">status,</if>
|
|
|
- <if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
- <if test="createTime != null">create_time,</if>
|
|
|
- <if test="updateBy != null and updateBy != ''">update_by,</if>
|
|
|
- <if test="updateTime != null">update_time,</if>
|
|
|
- <if test="remark != null">remark,</if>
|
|
|
- </trim>
|
|
|
- <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="monthScoreId != null">#{monthScoreId},</if>
|
|
|
- <if test="deptId != null">#{deptId},</if>
|
|
|
- <if test="deptName != null and deptName != ''">#{deptName},</if>
|
|
|
- <if test="fanInspectionId != null">#{fanInspectionId},</if>
|
|
|
- <if test="deviceCount != null">#{deviceCount},</if>
|
|
|
- <if test="fanInspectionScore != null">#{fanInspectionScore},</if>
|
|
|
- <if test="calculatedScore != null">#{calculatedScore},</if>
|
|
|
- <if test="monthPeriod != null and monthPeriod != ''">#{monthPeriod},</if>
|
|
|
- <if test="status != null">#{status},</if>
|
|
|
- <if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
- <if test="createTime != null">#{createTime},</if>
|
|
|
- <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
|
|
- <if test="updateTime != null">#{updateTime},</if>
|
|
|
- <if test="remark != null">#{remark},</if>
|
|
|
- </trim>
|
|
|
- </insert>
|
|
|
+<insert id="insertGxtMonthFanInspection" parameterType="GxtMonthFanInspection" useGeneratedKeys="true" keyProperty="id">
|
|
|
+ insert into gxt_month_fan_inspection
|
|
|
+ <trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="monthScoreId != null">month_score_id,</if>
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
+ <if test="deptName != null and deptName != ''">dept_name,</if>
|
|
|
+ <if test="fanInspectionId != null">fan_inspection_id,</if>
|
|
|
+ <if test="deviceCount != null">device_count,</if>
|
|
|
+ <if test="fanInspectionScore != null">fan_inspection_score,</if>
|
|
|
+ <if test="calculatedScore != null">calculated_score,</if>
|
|
|
+ <if test="monthPeriod != null and monthPeriod != ''">month_period,</if>
|
|
|
+ <if test="status != null">status,</if>
|
|
|
+ <if test="createBy != null and createBy != ''">create_by,</if>
|
|
|
+ <if test="createTime != null">create_time,</if>
|
|
|
+ <if test="updateBy != null and updateBy != ''">update_by,</if>
|
|
|
+ <if test="updateTime != null">update_time,</if>
|
|
|
+ <if test="remark != null">remark,</if>
|
|
|
+ </trim>
|
|
|
+ <trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
+ <if test="monthScoreId != null">#{monthScoreId},</if>
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
+ <if test="deptName != null and deptName != ''">#{deptName},</if>
|
|
|
+ <if test="fanInspectionId != null">#{fanInspectionId},</if>
|
|
|
+ <if test="deviceCount != null">#{deviceCount},</if>
|
|
|
+ <if test="fanInspectionScore != null">#{fanInspectionScore},</if>
|
|
|
+ <if test="calculatedScore != null">#{calculatedScore},</if>
|
|
|
+ <if test="monthPeriod != null and monthPeriod != ''">#{monthPeriod},</if>
|
|
|
+ <if test="status != null">#{status},</if>
|
|
|
+ <if test="createBy != null and createBy != ''">#{createBy},</if>
|
|
|
+ <if test="createTime != null">#{createTime},</if>
|
|
|
+ <if test="updateBy != null and updateBy != ''">#{updateBy},</if>
|
|
|
+ <if test="updateTime != null">#{updateTime},</if>
|
|
|
+ <if test="remark != null">#{remark},</if>
|
|
|
+ </trim>
|
|
|
+</insert>
|
|
|
|
|
|
- <update id="updateGxtMonthFanInspection" parameterType="GxtMonthFanInspection">
|
|
|
- update gxt_month_fan_inspection
|
|
|
- <trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="monthScoreId != null">month_score_id = #{monthScoreId},</if>
|
|
|
- <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
- <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
|
|
|
- <if test="fanInspectionId != null">fan_inspection_id = #{fanInspectionId},</if>
|
|
|
- <if test="deviceCount != null">device_count = #{deviceCount},</if>
|
|
|
- <if test="fanInspectionScore != null">fan_inspection_score = #{fanInspectionScore},</if>
|
|
|
- <if test="calculatedScore != null">calculated_score = #{calculatedScore},</if>
|
|
|
- <if test="monthPeriod != null and monthPeriod != ''">month_period = #{monthPeriod},</if>
|
|
|
- <if test="status != null">status = #{status},</if>
|
|
|
- <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
|
- <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
- <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
- <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
- <if test="remark != null">remark = #{remark},</if>
|
|
|
- </trim>
|
|
|
- where id = #{id}
|
|
|
- </update>
|
|
|
+<update id="updateGxtMonthFanInspection" parameterType="GxtMonthFanInspection">
|
|
|
+ update gxt_month_fan_inspection
|
|
|
+ <trim prefix="SET" suffixOverrides=",">
|
|
|
+ <if test="monthScoreId != null">month_score_id = #{monthScoreId},</if>
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
+ <if test="deptName != null and deptName != ''">dept_name = #{deptName},</if>
|
|
|
+ <if test="fanInspectionId != null">fan_inspection_id = #{fanInspectionId},</if>
|
|
|
+ <if test="deviceCount != null">device_count = #{deviceCount},</if>
|
|
|
+ <if test="fanInspectionScore != null">fan_inspection_score = #{fanInspectionScore},</if>
|
|
|
+ <if test="calculatedScore != null">calculated_score = #{calculatedScore},</if>
|
|
|
+ <if test="monthPeriod != null and monthPeriod != ''">month_period = #{monthPeriod},</if>
|
|
|
+ <if test="status != null">status = #{status},</if>
|
|
|
+ <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
|
|
|
+ <if test="createTime != null">create_time = #{createTime},</if>
|
|
|
+ <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
|
|
+ <if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
+ <if test="remark != null">remark = #{remark},</if>
|
|
|
+ </trim>
|
|
|
+ where id = #{id}
|
|
|
+</update>
|
|
|
|
|
|
- <delete id="deleteGxtMonthFanInspectionById" parameterType="Long">
|
|
|
- delete from gxt_month_fan_inspection where id = #{id}
|
|
|
- </delete>
|
|
|
+<delete id="deleteGxtMonthFanInspectionById" parameterType="Long">
|
|
|
+ delete from gxt_month_fan_inspection where id = #{id}
|
|
|
+</delete>
|
|
|
|
|
|
- <delete id="deleteGxtMonthFanInspectionByIds" parameterType="Long">
|
|
|
- delete from gxt_month_fan_inspection where id in
|
|
|
- <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
- #{id}
|
|
|
- </foreach>
|
|
|
- </delete>
|
|
|
+<delete id="deleteGxtMonthFanInspectionByIds" parameterType="Long">
|
|
|
+ delete from gxt_month_fan_inspection where id in
|
|
|
+ <foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
+ #{id}
|
|
|
+ </foreach>
|
|
|
+</delete>
|
|
|
|
|
|
</mapper>
|