|
|
|
|
@ -33,17 +33,17 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<select id="selectDmsPlanInspectList" parameterType="DmsPlanInspect" resultMap="DmsPlanInspectResult">
|
|
|
|
|
<include refid="selectDmsPlanInspectVo"/>
|
|
|
|
|
<where>
|
|
|
|
|
<if test="planInspectCode != null and planInspectCode != ''"> and plan_inspect_code = #{planInspectCode}</if>
|
|
|
|
|
<if test="planInspectName != null and planInspectName != ''"> and plan_inspect_name like concat('%', #{planInspectName}, '%')</if>
|
|
|
|
|
<if test="inspectType != null and inspectType != ''"> and inspect_type = #{inspectType}</if>
|
|
|
|
|
<if test="inspectRouteId != null "> and inspect_route_id = #{inspectRouteId}</if>
|
|
|
|
|
<if test="deviceAmount != null "> and device_amount = #{deviceAmount}</if>
|
|
|
|
|
<if test="planTime != null "> and plan_time = #{planTime}</if>
|
|
|
|
|
<if test="timeLimit != null "> and time_limit = #{timeLimit}</if>
|
|
|
|
|
<if test="jobId != null "> and job_id = #{jobId}</if>
|
|
|
|
|
<if test="cyclePeriod != null and cyclePeriod != ''"> and cycle_period = #{cyclePeriod}</if>
|
|
|
|
|
<if test="performer != null and performer != ''"> and performer = #{performer}</if>
|
|
|
|
|
<if test="isFlag != null and isFlag != ''"> and is_flag = #{isFlag}</if>
|
|
|
|
|
<if test="planInspectCode != null and planInspectCode != ''"> and plan_inspect_code = #{planInspectCode,jdbcType=VARCHAR}</if>
|
|
|
|
|
<if test="planInspectName != null and planInspectName != ''"> and plan_inspect_name like '%' || #{planInspectName,jdbcType=VARCHAR} || '%'</if>
|
|
|
|
|
<if test="inspectType != null and inspectType != ''"> and inspect_type = #{inspectType,jdbcType=VARCHAR}</if>
|
|
|
|
|
<if test="inspectRouteId != null "> and inspect_route_id = #{inspectRouteId,jdbcType=NUMERIC}</if>
|
|
|
|
|
<if test="deviceAmount != null "> and device_amount = #{deviceAmount,jdbcType=NUMERIC}</if>
|
|
|
|
|
<if test="planTime != null "> and plan_time = #{planTime,jdbcType=TIMESTAMP}</if>
|
|
|
|
|
<if test="timeLimit != null "> and time_limit = #{timeLimit,jdbcType=NUMERIC}</if>
|
|
|
|
|
<if test="jobId != null "> and job_id = #{jobId,jdbcType=NUMERIC}</if>
|
|
|
|
|
<if test="cyclePeriod != null and cyclePeriod != ''"> and cycle_period = #{cyclePeriod,jdbcType=VARCHAR}</if>
|
|
|
|
|
<if test="performer != null and performer != ''"> and performer = #{performer,jdbcType=VARCHAR}</if>
|
|
|
|
|
<if test="isFlag != null and isFlag != ''"> and is_flag = #{isFlag,jdbcType=VARCHAR}</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by create_time desc
|
|
|
|
|
</select>
|
|
|
|
|
@ -79,46 +79,46 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</trim>
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="planInspectId != null">#{planInspectId,jdbcType=NUMERIC},</if>
|
|
|
|
|
<if test="planInspectCode != null">#{planInspectCode},</if>
|
|
|
|
|
<if test="planInspectName != null">#{planInspectName},</if>
|
|
|
|
|
<if test="inspectType != null">#{inspectType},</if>
|
|
|
|
|
<if test="planInspectCode != null">#{planInspectCode,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="planInspectName != null">#{planInspectName,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="inspectType != null">#{inspectType,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="inspectRouteId != null">#{inspectRouteId,jdbcType=NUMERIC},</if>
|
|
|
|
|
<if test="deviceAmount != null">#{deviceAmount,jdbcType=NUMERIC},</if>
|
|
|
|
|
<if test="planTime != null">#{planTime},</if>
|
|
|
|
|
<if test="planTime != null">#{planTime,jdbcType=TIMESTAMP},</if>
|
|
|
|
|
<if test="timeLimit != null">#{timeLimit,jdbcType=NUMERIC},</if>
|
|
|
|
|
<if test="jobId != null">#{jobId,jdbcType=NUMERIC},</if>
|
|
|
|
|
<if test="cyclePeriod != null">#{cyclePeriod},</if>
|
|
|
|
|
<if test="performer != null">#{performer},</if>
|
|
|
|
|
<if test="isFlag != null and isFlag != ''">#{isFlag},</if>
|
|
|
|
|
<if test="remark != null">#{remark},</if>
|
|
|
|
|
<if test="createBy != null">#{createBy},</if>
|
|
|
|
|
<if test="createTime != null">#{createTime},</if>
|
|
|
|
|
<if test="updateBy != null">#{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">#{updateTime},</if>
|
|
|
|
|
<if test="cyclePeriod != null">#{cyclePeriod,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="performer != null">#{performer,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="isFlag != null and isFlag != ''">#{isFlag,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="createBy != null">#{createBy,jdbcType=NUMERIC},</if>
|
|
|
|
|
<if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
|
|
|
|
|
<if test="updateBy != null">#{updateBy,jdbcType=NUMERIC},</if>
|
|
|
|
|
<if test="updateTime != null">#{updateTime,jdbcType=TIMESTAMP},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<update id="updateDmsPlanInspect" parameterType="DmsPlanInspect">
|
|
|
|
|
update dms_plan_inspect
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="planInspectCode != null">plan_inspect_code = #{planInspectCode},</if>
|
|
|
|
|
<if test="planInspectName != null">plan_inspect_name = #{planInspectName},</if>
|
|
|
|
|
<if test="inspectType != null">inspect_type = #{inspectType},</if>
|
|
|
|
|
<if test="inspectRouteId != null">inspect_route_id = #{inspectRouteId},</if>
|
|
|
|
|
<if test="deviceAmount != null">device_amount = #{deviceAmount},</if>
|
|
|
|
|
<if test="planTime != null">plan_time = #{planTime},</if>
|
|
|
|
|
<if test="timeLimit != null">time_limit = #{timeLimit},</if>
|
|
|
|
|
<if test="jobId != null">job_id = #{jobId},</if>
|
|
|
|
|
<if test="cyclePeriod != null">cycle_period = #{cyclePeriod},</if>
|
|
|
|
|
<if test="performer != null">performer = #{performer},</if>
|
|
|
|
|
<if test="isFlag != null and isFlag != ''">is_flag = #{isFlag},</if>
|
|
|
|
|
<if test="remark != null">remark = #{remark},</if>
|
|
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
|
|
|
<if test="createTime != null">create_time = #{createTime},</if>
|
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy},</if>
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime},</if>
|
|
|
|
|
<if test="planInspectCode != null">plan_inspect_code = #{planInspectCode,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="planInspectName != null">plan_inspect_name = #{planInspectName,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="inspectType != null">inspect_type = #{inspectType,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="inspectRouteId != null">inspect_route_id = #{inspectRouteId,jdbcType=BIGINT},</if>
|
|
|
|
|
<if test="deviceAmount != null">device_amount = #{deviceAmount,jdbcType=INTEGER},</if>
|
|
|
|
|
<if test="planTime != null">plan_time = #{planTime,jdbcType=TIMESTAMP},</if>
|
|
|
|
|
<if test="timeLimit != null">time_limit = #{timeLimit,jdbcType=INTEGER},</if>
|
|
|
|
|
<if test="jobId != null">job_id = #{jobId,jdbcType=BIGINT},</if>
|
|
|
|
|
<if test="cyclePeriod != null">cycle_period = #{cyclePeriod,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="performer != null">performer = #{performer,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="isFlag != null and isFlag != ''">is_flag = #{isFlag,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="remark != null">remark = #{remark,jdbcType=VARCHAR},</if>
|
|
|
|
|
<if test="createBy != null">create_by = #{createBy,jdbcType=BIGINT},</if>
|
|
|
|
|
<if test="createTime != null">create_time = #{createTime,jdbcType=TIMESTAMP},</if>
|
|
|
|
|
<if test="updateBy != null">update_by = #{updateBy,jdbcType=BIGINT},</if>
|
|
|
|
|
<if test="updateTime != null">update_time = #{updateTime,jdbcType=TIMESTAMP},</if>
|
|
|
|
|
</trim>
|
|
|
|
|
where plan_inspect_id = #{planInspectId}
|
|
|
|
|
where plan_inspect_id = #{planInspectId,jdbcType=BIGINT}
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<delete id="deleteDmsPlanInspectByPlanInspectId" parameterType="Long">
|
|
|
|
|
@ -133,21 +133,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</delete>
|
|
|
|
|
|
|
|
|
|
<select id="selectPlanInspectJoinJobByInspectId" parameterType="Long" resultMap="DmsPlanInspectResult">
|
|
|
|
|
select a.plan_inspect_id, a.plan_inspect_code, a.plan_inspect_name, a.inspect_type,
|
|
|
|
|
a.inspect_route_id, a.device_amount, a.plan_time, a.cycle_period,a.time_limit,a.job_id,
|
|
|
|
|
a.performer, a.is_flag, a.remark, a.create_by, a.create_time, a.update_by, a.update_time,b.cron_expression from dms_plan_inspect a
|
|
|
|
|
left join sys_job b on a.job_id = b.job_id
|
|
|
|
|
where a.plan_inspect_id = #{planInspectId}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
select plan_inspect_id, plan_inspect_code, plan_inspect_name, inspect_type,
|
|
|
|
|
inspect_route_id, device_amount, plan_time, cycle_period, time_limit, job_id,
|
|
|
|
|
performer, is_flag, remark, create_by, create_time, update_by, update_time
|
|
|
|
|
from dms_plan_inspect
|
|
|
|
|
where plan_inspect_id = #{planInspectId}
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectPlanInspectJoinJobByInspectId1" resultType="com.aucma.dms.domain.DmsPlanInspect"
|
|
|
|
|
parameterType="java.lang.String">
|
|
|
|
|
select a.plan_inspect_id, a.plan_inspect_code, a.plan_inspect_name, a.inspect_type,
|
|
|
|
|
a.inspect_route_id, a.device_amount, a.plan_time, a.cycle_period,a.time_limit,a.job_id,
|
|
|
|
|
a.performer, a.is_flag, a.remark, a.create_by, a.create_time, a.update_by, a.update_time,b.cron_expression from dms_plan_inspect a
|
|
|
|
|
left join sys_job b on a.job_id = b.job_id
|
|
|
|
|
where a.plan_inspect_code = #{planInspectId}
|
|
|
|
|
select plan_inspect_id, plan_inspect_code, plan_inspect_name, inspect_type,
|
|
|
|
|
inspect_route_id, device_amount, plan_time, cycle_period, time_limit, job_id,
|
|
|
|
|
performer, is_flag, remark, create_by, create_time, update_by, update_time
|
|
|
|
|
from dms_plan_inspect
|
|
|
|
|
where plan_inspect_code = #{planInspectCode}
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|
|