feat(sales): 添加交易成功时间筛选功能

- 在 TocofsSaleoutDetailedEntity 中添加 tradeSuccessAt_start 和 tradeSuccessAt_end 字段
- 更新 XML 文件以支持新的交易成功时间筛选条件
- 修改 SoSaleOutPluginInitializerToC 中的查询逻辑
- 更新 TobofsSaleoutDetailedDto 和服务层 XML 文件中的字段名称
This commit is contained in:
liuy 2025-01-16 13:59:18 +08:00
parent 1ebadb2b57
commit 660ca7f952
5 changed files with 27 additions and 11 deletions

View File

@ -392,4 +392,13 @@ public class TocofsSaleoutDetailedEntity extends BaseEntity {
*/ */
private String tradesuccessat; private String tradesuccessat;
/**
* 明细行交易成功时间开始
*/
private String tradeSuccessAt_start;
/**
* 明细行交易成功时间结束
*/
private String tradeSuccessAt_end;
} }

View File

@ -293,6 +293,9 @@
<if test="businessDateEnd != null and businessDateEnd != ''"> and businessDate &lt;= #{businessDateEnd} </if> <if test="businessDateEnd != null and businessDateEnd != ''"> and businessDate &lt;= #{businessDateEnd} </if>
<if test="successfultradedateStart != null and successfultradedateStart != ''"> and successfulTradeDate >= #{successfultradedateStart} </if> <if test="successfultradedateStart != null and successfultradedateStart != ''"> and successfulTradeDate >= #{successfultradedateStart} </if>
<if test="successfultradedateEnd != null and successfultradedateEnd != ''"> and successfulTradeDate &lt;= #{successfultradedateEnd} </if> <if test="successfultradedateEnd != null and successfultradedateEnd != ''"> and successfulTradeDate &lt;= #{successfultradedateEnd} </if>
<if test="tradeSuccessAt_start!=null and tradeSuccessAt_start!=''"> and tradeSuccessAt >= #{tradeSuccessAt_start}</if>
<if test="tradeSuccessAt_end!=null and tradeSuccessAt_end!=''"> and tradeSuccessAt &lt;= #{tradeSuccessAt_end}</if>
</trim> </trim>
<!-- <if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>--> <!-- <if test=" sort == null or sort == ''.toString() "> order by sorts asc</if>-->
<!-- <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>--> <!-- <if test=" sort !='' and sort!=null and order !='' and order!=null ">order by ${sort} ${order}</if>-->

View File

@ -459,14 +459,14 @@ public class SoSaleOutPluginInitializerToC extends PluginBaseEntity {
//1:中台->u8c //1:中台->u8c
TocofsSaleoutDetailedEntity tocofsSaleoutDetailedEntity = new TocofsSaleoutDetailedEntity(); TocofsSaleoutDetailedEntity tocofsSaleoutDetailedEntity = new TocofsSaleoutDetailedEntity();
if (startTime.length() == 19) { if (startTime.length() == 19) {
tocofsSaleoutDetailedEntity.setSuccessfultradedateStart(startTime); tocofsSaleoutDetailedEntity.setTradeSuccessAt_start(startTime);
} else { } else {
tocofsSaleoutDetailedEntity.setSuccessfultradedateStart(startTime + " 00:00:00"); tocofsSaleoutDetailedEntity.setTradeSuccessAt_end(startTime + " 00:00:00");
} }
if (endTime.length() == 19) { if (endTime.length() == 19) {
tocofsSaleoutDetailedEntity.setSuccessfultradedateEnd(endTime); tocofsSaleoutDetailedEntity.setTradeSuccessAt_start(endTime);
} else { } else {
tocofsSaleoutDetailedEntity.setSuccessfultradedateEnd(endTime + " 23:59:59"); tocofsSaleoutDetailedEntity.setTradeSuccessAt_end(endTime + " 23:59:59");
} }
tocofsSaleoutDetailedEntity.setBusinesstype("TOC_ORDER"); tocofsSaleoutDetailedEntity.setBusinesstype("TOC_ORDER");
headerDetailsDtoList = queryTocOfsSaleoutDetailed(tocofsSaleoutDetailedEntity); headerDetailsDtoList = queryTocOfsSaleoutDetailed(tocofsSaleoutDetailedEntity);

View File

@ -67,8 +67,10 @@ public class TobofsSaleoutDetailedDto {
//库存 结束 //库存 结束
//TOB交易红 开始 //TOB交易红 开始
// @ExcelProperty(value = "交易-O交易成功时间")
// private String successfulTradeDate;
@ExcelProperty(value = "交易-O交易成功时间") @ExcelProperty(value = "交易-O交易成功时间")
private String successfulTradeDate; private String tradeSuccessAt;
@ExcelProperty(value = "交易-推送状态") @ExcelProperty(value = "交易-推送状态")
private String newstate4; private String newstate4;

View File

@ -398,10 +398,10 @@
and a.businessDate &lt;= #{businessdate_end} and a.businessDate &lt;= #{businessdate_end}
</if> </if>
<if test="successfultradedate_start!=null and successfultradedate_start!=''"> <if test="successfultradedate_start!=null and successfultradedate_start!=''">
and a.successfulTradeDate >= #{successfultradedate_start} and a.tradeSuccessAt >= #{successfultradedate_start}
</if> </if>
<if test="successfultradedate_end!=null and successfultradedate_end!=''"> <if test="successfultradedate_end!=null and successfultradedate_end!=''">
and a.successfulTradeDate &lt;= #{successfultradedate_end} and a.tradeSuccessAt &lt;= #{successfultradedate_end}
</if> </if>
<if test="headCode!=null and headCode!=''"> <if test="headCode!=null and headCode!=''">
and b.code = #{headCode} and b.code = #{headCode}
@ -474,6 +474,7 @@
<result property="newsystemprimary4" column="newSystemPrimary4" jdbcType="VARCHAR"/> <result property="newsystemprimary4" column="newSystemPrimary4" jdbcType="VARCHAR"/>
<result property="businessDate" column="businessDate" jdbcType="VARCHAR"/> <result property="businessDate" column="businessDate" jdbcType="VARCHAR"/>
<result property="successfulTradeDate" column="successfulTradeDate" jdbcType="VARCHAR"/> <result property="successfulTradeDate" column="successfulTradeDate" jdbcType="VARCHAR"/>
<result property="tradeSuccessAt" column="tradeSuccessAt" jdbcType="VARCHAR"/>
<result property="def7" column="def7" jdbcType="VARCHAR"/> <result property="def7" column="def7" jdbcType="VARCHAR"/>
<result property="def8" column="def8" jdbcType="VARCHAR"/> <result property="def8" column="def8" jdbcType="VARCHAR"/>
@ -749,6 +750,7 @@
,a.newSystemPrimary4 ,a.newSystemPrimary4
,a.businessDate ,a.businessDate
,a.successfulTradeDate ,a.successfulTradeDate
,a.tradeSuccessAt
,a.businessType ,a.businessType
,a.def1 ,a.def1
,a.def2 ,a.def2
@ -903,10 +905,10 @@
and a.businessDate &lt;= #{businessdate_end} and a.businessDate &lt;= #{businessdate_end}
</if> </if>
<if test="successfultradedate_start!=null and successfultradedate_start!=''"> <if test="successfultradedate_start!=null and successfultradedate_start!=''">
and a.successfulTradeDate >= #{successfultradedate_start} and a.tradeSuccessAt >= #{successfultradedate_start}
</if> </if>
<if test="successfultradedate_end!=null and successfultradedate_end!=''"> <if test="successfultradedate_end!=null and successfultradedate_end!=''">
and a.successfulTradeDate &lt;= #{successfultradedate_end} and a.tradeSuccessAt &lt;= #{successfultradedate_end}
</if> </if>
<if test="headCode!=null and headCode!=''"> <if test="headCode!=null and headCode!=''">
and b.code = #{headCode} and b.code = #{headCode}
@ -1126,10 +1128,10 @@
and businessDate &lt;= #{businessdate_end} and businessDate &lt;= #{businessdate_end}
</if> </if>
<if test="successfultradedate_start!=null and successfultradedate_start!=''"> <if test="successfultradedate_start!=null and successfultradedate_start!=''">
and successfulTradeDate >= #{successfultradedate_start} and tradeSuccessAt >= #{successfultradedate_start}
</if> </if>
<if test="successfultradedate_end!=null and successfultradedate_end!=''"> <if test="successfultradedate_end!=null and successfultradedate_end!=''">
and successfultradedate_end &lt;= #{successfultradedate_end} and tradeSuccessAt &lt;= #{successfultradedate_end}
</if> </if>
-- and sts='Y' -- and sts='Y'