|
|
|
@ -1,7 +1,6 @@
|
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
|
|
<mapper namespace="com.glxp.api.dao.collect.IoCollectOrderBackupMapper">
|
|
|
|
|
|
|
|
|
|
<select id="filterList" resultType="com.glxp.api.res.collect.IoCollectOrderResponse">
|
|
|
|
|
SELECT icob.billNo,
|
|
|
|
|
icob.busType,
|
|
|
|
@ -32,7 +31,9 @@
|
|
|
|
|
icob.uploadStatus,
|
|
|
|
|
icob.uploadError,
|
|
|
|
|
icob.errorMsg,
|
|
|
|
|
row_number() over ( order by case when icob.orderTime is null then icob.createTime else icob.orderTime end desc )
|
|
|
|
|
row_number() over ( order by case
|
|
|
|
|
when icob.orderTime is null then icob.createTime
|
|
|
|
|
else icob.orderTime end desc )
|
|
|
|
|
as orderSequence
|
|
|
|
|
FROM io_collect_order_backup icob
|
|
|
|
|
left join sys_workplace_document on icob.busType = sys_workplace_document.documentTypeCode
|
|
|
|
@ -51,9 +52,6 @@
|
|
|
|
|
<if test="fromCorp != '' and fromCorp != null">
|
|
|
|
|
AND fromCorp LIKE concat('%', #{fromCorp}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="collectCode != null and collectCode != ''">
|
|
|
|
|
AND collectCode = #{collectCode}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="busType != null and busType != ''">
|
|
|
|
|
AND busType = #{busType}
|
|
|
|
|
</if>
|
|
|
|
@ -120,19 +118,18 @@
|
|
|
|
|
<if test="fromCorpName != '' and fromCorpName != null">
|
|
|
|
|
AND icob.fromCorpName LIKE concat('%', #{fromCorpName}, '%')
|
|
|
|
|
</if>
|
|
|
|
|
<if test="startTime != null">
|
|
|
|
|
<if test="startTime != null and startTime != ''">
|
|
|
|
|
<![CDATA[
|
|
|
|
|
and icob.billTime >= DATE_FORMAT(#{startTime}, '%Y-%m-%d %H:%i:%S')
|
|
|
|
|
]]>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="endTime != null">
|
|
|
|
|
<if test="endTime != null and endTime != ''">
|
|
|
|
|
<![CDATA[
|
|
|
|
|
and icob.billTime <= DATE_FORMAT(#{endTime}, '%Y-%m-%d %H:%i:%S')
|
|
|
|
|
]]>
|
|
|
|
|
</if>
|
|
|
|
|
</where>
|
|
|
|
|
GROUP BY
|
|
|
|
|
icob.billNo
|
|
|
|
|
GROUP BY icob.billNo
|
|
|
|
|
order by case when icob.orderTime is null then icob.createTime else icob.orderTime end desc
|
|
|
|
|
</select>
|
|
|
|
|
</mapper>
|
|
|
|
|