|
|
@ -26,32 +26,52 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
</resultMap>
|
|
|
|
</resultMap>
|
|
|
|
|
|
|
|
|
|
|
|
<sql id="selectDmsBillsInspectInstanceVo">
|
|
|
|
<sql id="selectDmsBillsInspectInstanceVo">
|
|
|
|
select inspect_instance_id, plan_inspect_id, wf_process_id, inspect_type, bills_inspect_code, plan_begin_time,plan_end_time, real_begin_time, real_end_time, inspect_status, is_flag, remark, create_by, create_time, update_by, update_time from dms_bills_inspect_instance
|
|
|
|
select
|
|
|
|
|
|
|
|
a.inspect_instance_id,
|
|
|
|
|
|
|
|
a.plan_inspect_id,
|
|
|
|
|
|
|
|
a.wf_process_id,
|
|
|
|
|
|
|
|
a.inspect_type,
|
|
|
|
|
|
|
|
a.bills_inspect_code,
|
|
|
|
|
|
|
|
a.plan_begin_time,
|
|
|
|
|
|
|
|
a.plan_end_time,
|
|
|
|
|
|
|
|
a.real_begin_time,
|
|
|
|
|
|
|
|
a.real_end_time,
|
|
|
|
|
|
|
|
a.inspect_status,
|
|
|
|
|
|
|
|
a.is_flag,
|
|
|
|
|
|
|
|
b.remark,
|
|
|
|
|
|
|
|
a.create_by,
|
|
|
|
|
|
|
|
a.create_time,
|
|
|
|
|
|
|
|
a.update_by,
|
|
|
|
|
|
|
|
a.update_time,
|
|
|
|
|
|
|
|
b.plan_inspect_code,
|
|
|
|
|
|
|
|
b.performer
|
|
|
|
|
|
|
|
from
|
|
|
|
|
|
|
|
dms_bills_inspect_instance a left join dms_plan_inspect b on a.plan_inspect_id = b.plan_inspect_id
|
|
|
|
</sql>
|
|
|
|
</sql>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectDmsBillsInspectInstanceList" parameterType="DmsBillsInspectInstance" resultMap="DmsBillsInspectInstanceResult">
|
|
|
|
<select id="selectDmsBillsInspectInstanceList" parameterType="DmsBillsInspectInstance" resultMap="DmsBillsInspectInstanceResult">
|
|
|
|
<include refid="selectDmsBillsInspectInstanceVo"/>
|
|
|
|
<include refid="selectDmsBillsInspectInstanceVo"/>
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="planInspectId != null "> and plan_inspect_id like concat('%',#{planInspectId},'%') </if>
|
|
|
|
<if test="planInspectId != null "> and a.plan_inspect_id like concat('%',#{planInspectId},'%') </if>
|
|
|
|
<if test="inspectInstanceId != null "> and inspect_instance_id = #{inspectInstanceId}</if>
|
|
|
|
<if test="inspectInstanceId != null "> and a.inspect_instance_id = #{inspectInstanceId}</if>
|
|
|
|
<if test="wfProcessId != null "> and wf_process_id = #{wfProcessId}</if>
|
|
|
|
<if test="wfProcessId != null "> and a.wf_process_id = #{wfProcessId}</if>
|
|
|
|
<if test="inspectType != null and inspectType != ''"> and inspect_type = #{inspectType}</if>
|
|
|
|
<if test="inspectType != null and inspectType != ''"> and a.inspect_type = #{inspectType}</if>
|
|
|
|
<if test="billsInspectCode != null and billsInspectCode != ''"> and bills_inspect_code = #{billsInspectCode}</if>
|
|
|
|
<if test="billsInspectCode != null and billsInspectCode != ''"> and a.bills_inspect_code = #{billsInspectCode}</if>
|
|
|
|
<if test="planBeginTime != null "> and plan_begin_time > #{planBeginTime}</if>
|
|
|
|
<if test="planBeginTime != null "> and a.plan_begin_time > #{planBeginTime}</if>
|
|
|
|
<if test="planEndTime != null "> and #{planEndTime}>plan_end_time </if>
|
|
|
|
<if test="planEndTime != null "> and #{planEndTime}>a.plan_end_time </if>
|
|
|
|
<if test="realBeginTime != null "> and real_begin_time > #{realBeginTime}</if>
|
|
|
|
<if test="realBeginTime != null "> and a.real_begin_time > #{realBeginTime}</if>
|
|
|
|
<if test="realEndTime != null "> and #{realEndTime}>real_end_time</if>
|
|
|
|
<if test="realEndTime != null "> and #{realEndTime}>a.real_end_time</if>
|
|
|
|
<if test="inspectStatus != null and inspectStatus != ''"> and inspect_status = #{inspectStatus}</if>
|
|
|
|
<if test="inspectStatus != null and inspectStatus != ''"> and a.inspect_status = #{inspectStatus}</if>
|
|
|
|
<if test="isFlag != null and isFlag != ''"> and is_flag = #{isFlag}</if>
|
|
|
|
<if test="isFlag != null and isFlag != ''"> and a.is_flag = #{isFlag}</if>
|
|
|
|
</where>
|
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<select id="selectPoint" parameterType="DmsBillsInspectInstance" resultMap="DmsBillsInspectInstanceResult">
|
|
|
|
<select id="selectPoint" parameterType="DmsBillsInspectInstance" resultMap="DmsBillsInspectInstanceResult">
|
|
|
|
<include refid="selectDmsBillsInspectInstanceVo"/>
|
|
|
|
<include refid="selectDmsBillsInspectInstanceVo"/>
|
|
|
|
where inspect_type = 2
|
|
|
|
where a.inspect_type = 2
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
<select id="selectInspection" parameterType="DmsBillsInspectInstance" resultMap="DmsBillsInspectInstanceResult">
|
|
|
|
<select id="selectInspection" parameterType="DmsBillsInspectInstance" resultMap="DmsBillsInspectInstanceResult">
|
|
|
|
<include refid="selectDmsBillsInspectInstanceVo"/>
|
|
|
|
<include refid="selectDmsBillsInspectInstanceVo"/>
|
|
|
|
where inspect_type = 1
|
|
|
|
where a.inspect_type = 1
|
|
|
|
</select>
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectDmsBillsInspectInstanceByInspectInstanceId" parameterType="Long" resultMap="DmsBillsInspectInstanceResult">
|
|
|
|
<select id="selectDmsBillsInspectInstanceByInspectInstanceId" parameterType="Long" resultMap="DmsBillsInspectInstanceResult">
|
|
|
@ -65,6 +85,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
<if test="planInspectId != null">plan_inspect_id,</if>
|
|
|
|
<if test="planInspectId != null">plan_inspect_id,</if>
|
|
|
|
<if test="wfProcessId != null">wf_process_id,</if>
|
|
|
|
<if test="wfProcessId != null">wf_process_id,</if>
|
|
|
|
<if test="inspectType != null and inspectType != ''">inspect_type,</if>
|
|
|
|
<if test="inspectType != null and inspectType != ''">inspect_type,</if>
|
|
|
|
|
|
|
|
<if test="inspectRouteId != null and inspectRouteId != ''">inspect_route_id,</if>
|
|
|
|
<if test="billsInspectCode != null">bills_inspect_code,</if>
|
|
|
|
<if test="billsInspectCode != null">bills_inspect_code,</if>
|
|
|
|
<if test="planBeginTime != null">plan_begin_time,</if>
|
|
|
|
<if test="planBeginTime != null">plan_begin_time,</if>
|
|
|
|
<if test="planEndTime != null">plan_end_time,</if>
|
|
|
|
<if test="planEndTime != null">plan_end_time,</if>
|
|
|
@ -141,10 +162,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="selectNewestDmsBillsInspectInstance" parameterType="DmsBillsInspectInstance" resultMap="DmsBillsInspectInstanceResult">
|
|
|
|
<select id="selectNewestDmsBillsInspectInstance" parameterType="DmsBillsInspectInstance" resultMap="DmsBillsInspectInstanceResult">
|
|
|
|
select dbii.inspect_instance_id, dbii.plan_inspect_id, dbii.wf_process_id, dbii.inspect_type, dbii.bills_inspect_code,
|
|
|
|
select
|
|
|
|
dbii.plan_begin_time,dbii.plan_end_time, dbii.real_begin_time, dbii.real_end_time, dbii.inspect_status,dbii.create_time,
|
|
|
|
dbii.inspect_instance_id,
|
|
|
|
dbir.route_name
|
|
|
|
dbii.plan_inspect_id,
|
|
|
|
from dms_bills_inspect_instance dbii left join dms_base_inspect_route dbir on dbii.inspect_route_id=dbir.inspect_route_id
|
|
|
|
dbii.wf_process_id,
|
|
|
|
|
|
|
|
dbii.inspect_type,
|
|
|
|
|
|
|
|
dbii.bills_inspect_code,
|
|
|
|
|
|
|
|
dbii.plan_begin_time,
|
|
|
|
|
|
|
|
dbii.plan_end_time,
|
|
|
|
|
|
|
|
dbii.real_begin_time,
|
|
|
|
|
|
|
|
dbii.real_end_time,
|
|
|
|
|
|
|
|
dbii.inspect_status,
|
|
|
|
|
|
|
|
dbii.create_time,
|
|
|
|
|
|
|
|
dbir.route_name,a.plan_inspect_code
|
|
|
|
|
|
|
|
from
|
|
|
|
|
|
|
|
dms_bills_inspect_instance dbii
|
|
|
|
|
|
|
|
left join dms_base_inspect_route dbir on
|
|
|
|
|
|
|
|
dbii.inspect_route_id = dbir.inspect_route_id left join dms_plan_inspect a on dbii.plan_inspect_id = a.plan_inspect_id
|
|
|
|
|
|
|
|
|
|
|
|
<where>
|
|
|
|
<where>
|
|
|
|
<if test="inspectRouteId != null "> and dbii.inspect_route_id = #{inspectRouteId}</if>
|
|
|
|
<if test="inspectRouteId != null "> and dbii.inspect_route_id = #{inspectRouteId}</if>
|
|
|
|