|
|
|
|
@ -7,8 +7,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<resultMap type="DmsBillsMaintInstance" id="DmsBillsMaintInstanceResult">
|
|
|
|
|
<result property="maintInstanceId" column="maint_instance_id" />
|
|
|
|
|
<result property="planMaintId" column="plan_maint_id" />
|
|
|
|
|
<!-- 已废弃审批流功能 -->
|
|
|
|
|
<!-- <result property="wfProcessId" column="wf_process_id" /> -->
|
|
|
|
|
<result property="billsMaintCode" column="bills_maint_code" />
|
|
|
|
|
<result property="planBeginTime" column="plan_begin_time" />
|
|
|
|
|
<result property="realBeginTime" column="real_begin_time" />
|
|
|
|
|
@ -32,22 +30,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
select
|
|
|
|
|
a.maint_instance_id,
|
|
|
|
|
a.plan_maint_id,
|
|
|
|
|
-- a.wf_process_id, -- 已废弃审批流
|
|
|
|
|
a.bills_maint_code,
|
|
|
|
|
a.maint_group,
|
|
|
|
|
a.maint_supervisor,
|
|
|
|
|
a.maint_level,
|
|
|
|
|
a.plan_begin_time,
|
|
|
|
|
a.real_begin_time,
|
|
|
|
|
a.plan_end_time,
|
|
|
|
|
a.real_end_time,
|
|
|
|
|
a.maint_status,
|
|
|
|
|
a.maint_comp_rate,
|
|
|
|
|
a.remark,
|
|
|
|
|
a.create_by,
|
|
|
|
|
a.create_time,
|
|
|
|
|
a.update_by,
|
|
|
|
|
a.update_time,
|
|
|
|
|
b.maint_supervisor,
|
|
|
|
|
b.remark
|
|
|
|
|
a.update_time
|
|
|
|
|
from
|
|
|
|
|
dms_bills_maint_instance a left join dms_plan_maint b on a.plan_maint_id = b.plan_maint_id
|
|
|
|
|
dms_bills_maint_instance a
|
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
<select id="selectDmsBillsMaintInstanceList" parameterType="DmsBillsMaintInstance" resultMap="DmsBillsMaintInstanceResult">
|
|
|
|
|
@ -55,9 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<where>
|
|
|
|
|
<if test="planMaintId != null "> and a.plan_maint_id = #{planMaintId}</if>
|
|
|
|
|
<if test="maintInstanceId != null "> and a.maint_instance_id = #{maintInstanceId}</if>
|
|
|
|
|
<!-- 已废弃审批流 -->
|
|
|
|
|
<!-- <if test="wfProcessId != null "> and a.wf_process_id = #{wfProcessId}</if> -->
|
|
|
|
|
<if test="billsMaintCode != null and billsMaintCode != ''"> and a.bills_maint_code like concat('%',#{billsMaintCode},'%') </if>
|
|
|
|
|
<if test="billsMaintCode != null and billsMaintCode != ''"> and a.bills_maint_code like '%' || #{billsMaintCode} || '%' </if>
|
|
|
|
|
<if test="planBeginTime != null "> and a.plan_begin_time > #{planBeginTime}</if>
|
|
|
|
|
<if test="planEndTime != null "> and #{planEndTime}>a.plan_end_time</if>
|
|
|
|
|
<if test="realBeginTime != null "> and a.real_begin_time > #{realBeginTime}</if>
|
|
|
|
|
@ -90,9 +87,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="maintInstanceId != null">maint_instance_id,</if>
|
|
|
|
|
<if test="planMaintId != null">plan_maint_id,</if>
|
|
|
|
|
<!-- 已废弃审批流 -->
|
|
|
|
|
<!-- <if test="wfProcessId != null">wf_process_id,</if> -->
|
|
|
|
|
<if test="billsMaintCode != null and billsMaintCode != ''">bills_maint_code,</if>
|
|
|
|
|
<if test="maintGroup != null and maintGroup != ''">maint_group,</if>
|
|
|
|
|
<if test="maintSupervisor != null and maintSupervisor != ''">maint_supervisor,</if>
|
|
|
|
|
<if test="maintLevel != null">maint_level,</if>
|
|
|
|
|
<if test="planBeginTime != null">plan_begin_time,</if>
|
|
|
|
|
<if test="realBeginTime != null">real_begin_time,</if>
|
|
|
|
|
<if test="planEndTime != null">plan_end_time,</if>
|
|
|
|
|
@ -108,9 +106,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
|
|
<if test="maintInstanceId != null">#{maintInstanceId},</if>
|
|
|
|
|
<if test="planMaintId != null">#{planMaintId},</if>
|
|
|
|
|
<!-- 已废弃审批流 -->
|
|
|
|
|
<!-- <if test="wfProcessId != null">#{wfProcessId},</if> -->
|
|
|
|
|
<if test="billsMaintCode != null and billsMaintCode != ''">#{billsMaintCode},</if>
|
|
|
|
|
<if test="maintGroup != null and maintGroup != ''">#{maintGroup},</if>
|
|
|
|
|
<if test="maintSupervisor != null and maintSupervisor != ''">#{maintSupervisor},</if>
|
|
|
|
|
<if test="maintLevel != null">#{maintLevel},</if>
|
|
|
|
|
<if test="planBeginTime != null">#{planBeginTime},</if>
|
|
|
|
|
<if test="realBeginTime != null">#{realBeginTime},</if>
|
|
|
|
|
<if test="planEndTime != null">#{planEndTime},</if>
|
|
|
|
|
@ -129,9 +128,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
update dms_bills_maint_instance
|
|
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
|
|
<if test="planMaintId != null">plan_maint_id = #{planMaintId},</if>
|
|
|
|
|
<!-- 已废弃审批流 -->
|
|
|
|
|
<!-- <if test="wfProcessId != null">wf_process_id = #{wfProcessId},</if> -->
|
|
|
|
|
<if test="billsMaintCode != null and billsMaintCode != ''">bills_maint_code = #{billsMaintCode},</if>
|
|
|
|
|
<if test="maintGroup != null and maintGroup != ''">maint_group = #{maintGroup},</if>
|
|
|
|
|
<if test="maintSupervisor != null and maintSupervisor != ''">maint_supervisor = #{maintSupervisor},</if>
|
|
|
|
|
<if test="maintLevel != null">maint_level = #{maintLevel},</if>
|
|
|
|
|
<if test="planBeginTime != null">plan_begin_time = #{planBeginTime},</if>
|
|
|
|
|
<if test="realBeginTime != null">real_begin_time = #{realBeginTime},</if>
|
|
|
|
|
<if test="planEndTime != null">plan_end_time = #{planEndTime},</if>
|
|
|
|
|
@ -246,43 +246,44 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</insert>
|
|
|
|
|
|
|
|
|
|
<select id="selectNewestDmsBillsMaintInstance" parameterType="DmsBillsMaintInstance" resultMap="DmsBillsMaintInstanceResult">
|
|
|
|
|
select
|
|
|
|
|
dbmi.maint_instance_id,
|
|
|
|
|
dbmi.plan_maint_id,
|
|
|
|
|
-- dbmi.wf_process_id, -- 已废弃审批流
|
|
|
|
|
dbmi.bills_maint_code,
|
|
|
|
|
dbmi.plan_begin_time,
|
|
|
|
|
dbmi.real_begin_time,
|
|
|
|
|
dbmi.plan_end_time,
|
|
|
|
|
dbmi.real_end_time,
|
|
|
|
|
dbmi.maint_status,
|
|
|
|
|
dbmi.maint_comp_rate,
|
|
|
|
|
dbmi.create_by,
|
|
|
|
|
dbmi.create_time,
|
|
|
|
|
a.maint_level,
|
|
|
|
|
a.maint_group,
|
|
|
|
|
a.maint_supervisor
|
|
|
|
|
from
|
|
|
|
|
dms_bills_maint_instance dbmi left join dms_plan_maint a on dbmi.plan_maint_id = a.plan_maint_id
|
|
|
|
|
|
|
|
|
|
<where>
|
|
|
|
|
<if test="maintStatusStr != null and maintStatusStr != ''"> and dbmi.maint_status in (${maintStatusStr})</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by dbmi.create_time desc limit 1
|
|
|
|
|
select * from (
|
|
|
|
|
select
|
|
|
|
|
dbmi.maint_instance_id,
|
|
|
|
|
dbmi.plan_maint_id,
|
|
|
|
|
dbmi.bills_maint_code,
|
|
|
|
|
dbmi.maint_group,
|
|
|
|
|
dbmi.maint_supervisor,
|
|
|
|
|
dbmi.maint_level,
|
|
|
|
|
dbmi.plan_begin_time,
|
|
|
|
|
dbmi.real_begin_time,
|
|
|
|
|
dbmi.plan_end_time,
|
|
|
|
|
dbmi.real_end_time,
|
|
|
|
|
dbmi.maint_status,
|
|
|
|
|
dbmi.maint_comp_rate,
|
|
|
|
|
dbmi.remark,
|
|
|
|
|
dbmi.create_by,
|
|
|
|
|
dbmi.create_time,
|
|
|
|
|
dbmi.update_by,
|
|
|
|
|
dbmi.update_time
|
|
|
|
|
from
|
|
|
|
|
dms_bills_maint_instance dbmi
|
|
|
|
|
<where>
|
|
|
|
|
<if test="maintStatusStr != null and maintStatusStr != ''"> and dbmi.maint_status in (${maintStatusStr})</if>
|
|
|
|
|
</where>
|
|
|
|
|
order by dbmi.create_time desc
|
|
|
|
|
) where rownum = 1
|
|
|
|
|
</select>
|
|
|
|
|
<select id="selectDmsMaintInfo" resultType="com.aucma.dms.domain.DmsMaintInstanceActivity"
|
|
|
|
|
parameterType="java.lang.Long">
|
|
|
|
|
select
|
|
|
|
|
a.maint_level,
|
|
|
|
|
a.maint_group,
|
|
|
|
|
a.maint_supervisor,
|
|
|
|
|
a.remark
|
|
|
|
|
x.maint_level,
|
|
|
|
|
x.maint_group,
|
|
|
|
|
x.maint_supervisor,
|
|
|
|
|
x.remark
|
|
|
|
|
from
|
|
|
|
|
dms_bills_maint_instance x
|
|
|
|
|
left join dms_plan_maint a on
|
|
|
|
|
x.plan_maint_id = a.plan_maint_id
|
|
|
|
|
where
|
|
|
|
|
x.maint_instance_id = 25
|
|
|
|
|
x.maint_instance_id = #{maintInstanceId}
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<!-- 检查指定计划今天是否已生成工单 -->
|
|
|
|
|
|