|
|
|
@ -99,20 +99,44 @@ |
|
|
|
|
|
|
|
|
|
<select id="selectOperationTicketPageExt" resultMap="operationTicketVOResultMap"> |
|
|
|
|
select |
|
|
|
|
count(b.operation_ticket_no) AS operationItemsCount, |
|
|
|
|
count(b.id) AS operationItemsCount, |
|
|
|
|
a.* |
|
|
|
|
from |
|
|
|
|
smt_operation_ticket a |
|
|
|
|
left join smt_operation_item b |
|
|
|
|
on a.operation_ticket_no = b.operation_ticket_no |
|
|
|
|
and b.is_deleted = 0 |
|
|
|
|
<if test="ew.customSqlSegment!=null and ew.customSqlSegment!=''"> |
|
|
|
|
${ew.customSqlSegment} and a.is_deleted = 0 |
|
|
|
|
</if> |
|
|
|
|
<if test="ew.customSqlSegment==null or ew.customSqlSegment==''"> |
|
|
|
|
<!-- <if test="ew.customSqlSegment!=null and ew.customSqlSegment!=''">--> |
|
|
|
|
<!-- ${ew.customSqlSegment} and a.is_deleted = 0--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
<!-- <if test="ew.customSqlSegment==null or ew.customSqlSegment==''">--> |
|
|
|
|
<!-- where a.is_deleted = 0--> |
|
|
|
|
<!-- </if>--> |
|
|
|
|
where a.is_deleted = 0 |
|
|
|
|
<if test="entity.station != null and entity.station != ''"> |
|
|
|
|
AND a.station = #{entity.station} |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.operationTicketNo != null and entity.operationTicketNo != ''"> |
|
|
|
|
AND a.operation_ticket_no LIKE CONCAT('%', #{entity.operationTicketNo}, '%') |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.operationTicketType != null and entity.operationTicketType != ''"> |
|
|
|
|
AND a.operation_ticket_type LIKE CONCAT('%',#{entity.operationTicketType}, '%') |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.workLeader != null and entity.workLeader != ''"> |
|
|
|
|
AND a.work_leader LIKE CONCAT('%',#{entity.workLeader}, '%') |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.jobRiskLevel != null and entity.jobRiskLevel != ''"> |
|
|
|
|
AND a.job_risk_level LIKE CONCAT('%',#{entity.jobRiskLevel}, '%') |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.controlLevel != null and entity.controlLevel != ''"> |
|
|
|
|
AND a.control_level LIKE CONCAT('%',#{entity.controlLevel}, '%') |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.plannedStartTime != null and entity.plannedStartTime != ''"> |
|
|
|
|
AND a.planned_start_time LIKE CONCAT('%',#{entity.plannedStartTime}, '%') |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.sts != null and entity.sts != ''"> |
|
|
|
|
AND a.sts = #{entity.sts} |
|
|
|
|
</if> |
|
|
|
|
|
|
|
|
|
group by |
|
|
|
|
b.operation_ticket_no |
|
|
|
|
, a.id |
|
|
|
@ -137,22 +161,22 @@ |
|
|
|
|
AND a.station = #{entity.station} |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.operationTicketNo != null and entity.operationTicketNo != ''"> |
|
|
|
|
AND a.operation_ticket_no LIKE #{entity.operation_ticket_no} |
|
|
|
|
AND a.operation_ticket_no LIKE #{entity.operationTicketNo} |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.operationTicketType != null and entity.operationTicketType != ''"> |
|
|
|
|
AND a.operation_ticket_type LIKE #{entity.operation_ticket_type} |
|
|
|
|
AND a.operation_ticket_type LIKE #{entity.operationTicketType} |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.workLeader != null and entity.workLeader != ''"> |
|
|
|
|
AND a.work_leader LIKE #{entity.work_leader} |
|
|
|
|
AND a.work_leader LIKE #{entity.workLeader} |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.jobRiskLevel != null and entity.jobRiskLevel != ''"> |
|
|
|
|
AND a.job_risk_level LIKE #{entity.job_risk_level} |
|
|
|
|
AND a.job_risk_level LIKE #{entity.jobRiskLevel} |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.controlLevel != null and entity.controlLevel != ''"> |
|
|
|
|
AND a.control_level LIKE #{entity.control_level} |
|
|
|
|
AND a.control_level LIKE #{entity.controlLevel} |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.plannedStartTime != null and entity.plannedStartTime != ''"> |
|
|
|
|
AND a.planned_start_time LIKE #{entity.planned_start_time} |
|
|
|
|
AND a.planned_start_time LIKE #{entity.plannedStartTime} |
|
|
|
|
</if> |
|
|
|
|
<if test="entity.sts != null and entity.sts != ''"> |
|
|
|
|
AND a.sts = #{entity.sts} |
|
|
|
|