|
|
|
@ -228,12 +228,17 @@ |
|
|
|
<if test="params.status != null and params.status != ''"> |
|
|
|
and a.status = #{params.status} |
|
|
|
</if> |
|
|
|
<if test="params.rohsStatus != null and params.rohsStatus != ''"> |
|
|
|
and a.rohs_status = #{params.rohsStatus} |
|
|
|
</if> |
|
|
|
<if test="params.isExpiring != null and params.isExpiring != ''"> |
|
|
|
and isnull(a.is_expiring, 'N') = #{params.isExpiring} |
|
|
|
</if> |
|
|
|
<if test="params.expiryStartDate != null and params.expiryStartDate != ''"> |
|
|
|
and a.expiry_date is not null |
|
|
|
and cast(a.expiry_date as date) <![CDATA[ >= ]]> cast(#{params.expiryStartDate} as date) |
|
|
|
</if> |
|
|
|
<if test="params.expiryEndDate != null and params.expiryEndDate != ''"> |
|
|
|
and a.expiry_date is not null |
|
|
|
and cast(a.expiry_date as date) <![CDATA[ <= ]]> cast(#{params.expiryEndDate} as date) |
|
|
|
</if> |
|
|
|
<if test="params.nodeId != null and params.nodeId != ''"> |
|
|
|
and d.node_id = #{params.nodeId} |
|
|
|
</if> |
|
|
|
@ -306,12 +311,17 @@ |
|
|
|
<if test="params.status != null and params.status != ''"> |
|
|
|
and a.status = #{params.status} |
|
|
|
</if> |
|
|
|
<if test="params.rohsStatus != null and params.rohsStatus != ''"> |
|
|
|
and a.rohs_status = #{params.rohsStatus} |
|
|
|
</if> |
|
|
|
<if test="params.isExpiring != null and params.isExpiring != ''"> |
|
|
|
and isnull(a.is_expiring, 'N') = #{params.isExpiring} |
|
|
|
</if> |
|
|
|
<if test="params.expiryStartDate != null and params.expiryStartDate != ''"> |
|
|
|
and a.expiry_date is not null |
|
|
|
and cast(a.expiry_date as date) <![CDATA[ >= ]]> cast(#{params.expiryStartDate} as date) |
|
|
|
</if> |
|
|
|
<if test="params.expiryEndDate != null and params.expiryEndDate != ''"> |
|
|
|
and a.expiry_date is not null |
|
|
|
and cast(a.expiry_date as date) <![CDATA[ <= ]]> cast(#{params.expiryEndDate} as date) |
|
|
|
</if> |
|
|
|
<if test="params.nodeId != null and params.nodeId != ''"> |
|
|
|
and d.node_id = #{params.nodeId} |
|
|
|
</if> |
|
|
|
@ -455,12 +465,17 @@ |
|
|
|
<if test="params.status != null and params.status != ''"> |
|
|
|
and a.status = #{params.status} |
|
|
|
</if> |
|
|
|
<if test="params.rohsStatus != null and params.rohsStatus != ''"> |
|
|
|
and a.rohs_status = #{params.rohsStatus} |
|
|
|
</if> |
|
|
|
<if test="params.isExpiring != null and params.isExpiring != ''"> |
|
|
|
and isnull(a.is_expiring, 'N') = #{params.isExpiring} |
|
|
|
</if> |
|
|
|
<if test="params.expiryStartDate != null and params.expiryStartDate != ''"> |
|
|
|
and a.expiry_date is not null |
|
|
|
and cast(a.expiry_date as date) <![CDATA[ >= ]]> cast(#{params.expiryStartDate} as date) |
|
|
|
</if> |
|
|
|
<if test="params.expiryEndDate != null and params.expiryEndDate != ''"> |
|
|
|
and a.expiry_date is not null |
|
|
|
and cast(a.expiry_date as date) <![CDATA[ <= ]]> cast(#{params.expiryEndDate} as date) |
|
|
|
</if> |
|
|
|
<if test="params.nodeId != null and params.nodeId != ''"> |
|
|
|
and d.node_id = #{params.nodeId} |
|
|
|
</if> |
|
|
|
@ -706,6 +721,7 @@ |
|
|
|
set is_expiring = |
|
|
|
case |
|
|
|
when status = '已完成' |
|
|
|
and upper(isnull(rohs_status, '')) = 'ACTIVE' |
|
|
|
and expiry_date is not null |
|
|
|
and cast(expiry_date as date) <![CDATA[ <= ]]> dateadd(month, 1, cast(getdate() as date)) |
|
|
|
then 'Y' |
|
|
|
@ -714,6 +730,7 @@ |
|
|
|
where isnull(is_expiring, 'N') <![CDATA[ <> ]]> |
|
|
|
case |
|
|
|
when status = '已完成' |
|
|
|
and upper(isnull(rohs_status, '')) = 'ACTIVE' |
|
|
|
and expiry_date is not null |
|
|
|
and cast(expiry_date as date) <![CDATA[ <= ]]> dateadd(month, 1, cast(getdate() as date)) |
|
|
|
then 'Y' |
|
|
|
|