|
|
|
@ -31,7 +31,9 @@
|
|
|
|
|
ico.uploadStatus,
|
|
|
|
|
ico.uploadError,
|
|
|
|
|
ico.errorMsg,
|
|
|
|
|
row_number() over ( order by case when ico.orderTime is null then ico.createTime else ico.orderTime end desc ) as orderSequence
|
|
|
|
|
row_number() over ( order by case
|
|
|
|
|
when ico.orderTime is null then ico.createTime
|
|
|
|
|
else ico.orderTime end desc ) as orderSequence
|
|
|
|
|
FROM io_collect_order ico
|
|
|
|
|
left join sys_workplace_document on ico.busType = sys_workplace_document.documentTypeCode
|
|
|
|
|
left join thr_bustype_origin on sys_workplace_document.documentTypeCode = thr_bustype_origin.action
|
|
|
|
@ -65,7 +67,8 @@
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="excludeWorkCode != null and excludeWorkCode != ''">
|
|
|
|
|
AND ico.workPlaceCode is not null and ico.workPlaceCode not in (#{excludeWorkCode})
|
|
|
|
|
AND ico.workPlaceCode is not null
|
|
|
|
|
and ico.workPlaceCode not in (#{excludeWorkCode})
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
<if test="chargeUser != null">
|
|
|
|
@ -136,19 +139,18 @@
|
|
|
|
|
<if test="fromCorpName != '' and fromCorpName != null">
|
|
|
|
|
AND ico.fromCorpName LIKE concat('%', #{fromCorpName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startTime != null">
|
|
|
|
|
<if test="startTime != null and startTime != ''">
|
|
|
|
|
<![CDATA[
|
|
|
|
|
and ico.billTime >= DATE_FORMAT(#{startTime}, '%Y-%m-%d %H:%i:%S')
|
|
|
|
|
]]>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endTime != null">
|
|
|
|
|
<if test="endTime != null and endTime != ''">
|
|
|
|
|
<![CDATA[
|
|
|
|
|
and ico.billTime <= DATE_FORMAT(#{endTime}, '%Y-%m-%d %H:%i:%S')
|
|
|
|
|
]]>
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
GROUP BY
|
|
|
|
|
ico.billNo
|
|
|
|
|
GROUP BY ico.billNo
|
|
|
|
|
order by case when ico.orderTime is null then ico.createTime else ico.orderTime end desc
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
@ -178,7 +180,6 @@
|
|
|
|
|
TRUNCATE io_collect_order_biz_origin;
|
|
|
|
|
TRUNCATE io_collect_order_backup;
|
|
|
|
|
TRUNCATE io_collect_order_biz_backup;
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<update id="updateInvAlert" parameterType="map">
|
|
|
|
|