From 18867cda59f5702d4e9f79f6590de41ee839c8a0 Mon Sep 17 00:00:00 2001 From: liuy <37787198+LiuyCodes@users.noreply.github.com> Date: Thu, 26 Dec 2024 10:57:54 +0800 Subject: [PATCH] =?UTF-8?q?feat(ofs):=20=E6=B7=BB=E5=8A=A0=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E6=97=B6=E9=97=B4=E5=AD=97=E6=AE=B5=E5=B9=B6=E4=BC=98?= =?UTF-8?q?=E5=8C=96=E6=9F=A5=E8=AF=A2=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 TocofsReturngoodsEntity 中添加 modified 字段,用于记录修改时间- 在 XML 配置文件中添加 modified 字段的映射和查询条件 - 优化查询逻辑,移除不必要的排序条件 - 更新测试用例中的订单代码 --- .../ofs/entity/TocofsReturngoodsEntity.java | 4 ++ .../ofs/entity/TocofsReturngoodsEntity.xml | 68 +++++++++++-------- .../SoSaleOutPluginInitializerToCTest.java | 4 +- .../SoSaleReturnPluginInitializerToCTest.java | 4 +- .../dto/stock/StockinOrderSearchResponse.java | 1 + 5 files changed, 50 insertions(+), 31 deletions(-) diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsReturngoodsEntity.java b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsReturngoodsEntity.java index 5cbf5d1a..6a350e46 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsReturngoodsEntity.java +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsReturngoodsEntity.java @@ -130,5 +130,9 @@ public class TocofsReturngoodsEntity extends BaseEntity { private String returncarrier; private String refundedat; private String refundstatus; + /** + * 2024-12-26 10:38:00 + */ + private String modified; } diff --git a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsReturngoodsEntity.xml b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsReturngoodsEntity.xml index 25fbd15d..9b9752c6 100644 --- a/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsReturngoodsEntity.xml +++ b/buildpackage/src/main/java/com/hzya/frame/plugin/lets/ofs/entity/TocofsReturngoodsEntity.xml @@ -3,7 +3,7 @@ - + @@ -57,6 +57,7 @@ + @@ -114,8 +115,10 @@ ,returnWaybillCode ,returnCarrier ,refundedAt - ,refundStatus + ,refundStatus + ,modified + @@ -240,13 +244,14 @@ and returnCarrier = #{returncarrier} and refundedAt = #{refundedat} and refundStatus = #{refundstatus} - and sts='Y' + and modified = #{modified} +-- and sts='Y' - order by sorts asc - order by ${sort} ${order} + + - + @@ -372,10 +378,11 @@ or returnCarrier = #{returncarrier} or refundedAt = #{refundedat} or refundStatus = #{refundstatus} - and sts='Y' + or modified = #{modified} +-- and sts='Y' - order by sorts asc - order by ${sort} ${order} + + @@ -436,8 +443,9 @@ returnCarrier , refundedAt , refundStatus , - sorts, - sts, + modified , + + )values( @@ -495,27 +503,28 @@ #{returncarrier} , #{refundedat} , #{refundstatus} , - (select (max(IFNULL( a.sorts, 0 )) + 1) as sort from tocofs_returngoods a WHERE a.sts = 'Y' ), - 'Y', + #{modified} , + + ) - insert into tocofs_returngoods(clientCode, companyCode, storeCode, facilityCode, code, internalInstructionType, bizChannel, refOrderId, refOrderCode, refOrderType, closed, closedBy, status, allowOverReceive, shipFromAttentionTo, shipFromAddress, shipFromCountry, shipFromState, shipFromCity, shipFromDistrict, shipFromPostalCode, shipFromMobile, shipFromEmail, totalLines, totalQty, totalAmount, totalWeight, totalVolume, totalVolumeWeight, totalFulfillAmount, totalFulfillWeight, totalFulfillVolume, totalFulfillVolumeWeight, totalFulfillQty, totalCases, totalContainers, closeAtQty, quantityUM, weightUM, volumeUM, checkInFrom, checkInTo, closedAt, sourcePlatformCode, sourceOrderCode, created, createdBy, lastUpdated, lastUpdatedBy, returnWaybillCode, returnCarrier, refundedAt, refundStatus, sts) + insert into tocofs_returngoods(id,clientCode, companyCode, storeCode, facilityCode, code, internalInstructionType, bizChannel, refOrderId, refOrderCode, refOrderType, closed, closedBy, status, allowOverReceive, shipFromAttentionTo, shipFromAddress, shipFromCountry, shipFromState, shipFromCity, shipFromDistrict, shipFromPostalCode, shipFromMobile, shipFromEmail, totalLines, totalQty, totalAmount, totalWeight, totalVolume, totalVolumeWeight, totalFulfillAmount, totalFulfillWeight, totalFulfillVolume, totalFulfillVolumeWeight, totalFulfillQty, totalCases, totalContainers, closeAtQty, quantityUM, weightUM, volumeUM, checkInFrom, checkInTo, closedAt, sourcePlatformCode, sourceOrderCode, created, createdBy, lastUpdated, lastUpdatedBy, returnWaybillCode, returnCarrier, refundedAt, refundStatus,modified) values - (#{entity.clientcode},#{entity.companycode},#{entity.storecode},#{entity.facilitycode},#{entity.code},#{entity.internalinstructiontype},#{entity.bizchannel},#{entity.reforderid},#{entity.refordercode},#{entity.refordertype},#{entity.closed},#{entity.closedby},#{entity.status},#{entity.allowoverreceive},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromcountry},#{entity.shipfromstate},#{entity.shipfromcity},#{entity.shipfromdistrict},#{entity.shipfrompostalcode},#{entity.shipfrommobile},#{entity.shipfromemail},#{entity.totallines},#{entity.totalqty},#{entity.totalamount},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.totalfulfillamount},#{entity.totalfulfillweight},#{entity.totalfulfillvolume},#{entity.totalfulfillvolumeweight},#{entity.totalfulfillqty},#{entity.totalcases},#{entity.totalcontainers},#{entity.closeatqty},#{entity.quantityum},#{entity.weightum},#{entity.volumeum},#{entity.checkinfrom},#{entity.checkinto},#{entity.closedat},#{entity.sourceplatformcode},#{entity.sourceordercode},#{entity.created},#{entity.createdby},#{entity.lastupdated},#{entity.lastupdatedby},#{entity.returnwaybillcode},#{entity.returncarrier},#{entity.refundedat},#{entity.refundstatus}, 'Y') + (#{entity.id},#{entity.clientcode},#{entity.companycode},#{entity.storecode},#{entity.facilitycode},#{entity.code},#{entity.internalinstructiontype},#{entity.bizchannel},#{entity.reforderid},#{entity.refordercode},#{entity.refordertype},#{entity.closed},#{entity.closedby},#{entity.status},#{entity.allowoverreceive},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromcountry},#{entity.shipfromstate},#{entity.shipfromcity},#{entity.shipfromdistrict},#{entity.shipfrompostalcode},#{entity.shipfrommobile},#{entity.shipfromemail},#{entity.totallines},#{entity.totalqty},#{entity.totalamount},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.totalfulfillamount},#{entity.totalfulfillweight},#{entity.totalfulfillvolume},#{entity.totalfulfillvolumeweight},#{entity.totalfulfillqty},#{entity.totalcases},#{entity.totalcontainers},#{entity.closeatqty},#{entity.quantityum},#{entity.weightum},#{entity.volumeum},#{entity.checkinfrom},#{entity.checkinto},#{entity.closedat},#{entity.sourceplatformcode},#{entity.sourceordercode},#{entity.created},#{entity.createdby},#{entity.lastupdated},#{entity.lastupdatedby},#{entity.returnwaybillcode},#{entity.returncarrier},#{entity.refundedat},#{entity.refundstatus},#{entity.modified}) - insert into tocofs_returngoods(id,clientCode, companyCode, storeCode, facilityCode, code, internalInstructionType, bizChannel, refOrderId, refOrderCode, refOrderType, closed, closedBy, status, allowOverReceive, shipFromAttentionTo, shipFromAddress, shipFromCountry, shipFromState, shipFromCity, shipFromDistrict, shipFromPostalCode, shipFromMobile, shipFromEmail, totalLines, totalQty, totalAmount, totalWeight, totalVolume, totalVolumeWeight, totalFulfillAmount, totalFulfillWeight, totalFulfillVolume, totalFulfillVolumeWeight, totalFulfillQty, totalCases, totalContainers, closeAtQty, quantityUM, weightUM, volumeUM, checkInFrom, checkInTo, closedAt, sourcePlatformCode, sourceOrderCode, created, createdBy, lastUpdated, lastUpdatedBy, returnWaybillCode, returnCarrier, refundedAt, refundStatus) + insert into tocofs_returngoods(id,clientCode, companyCode, storeCode, facilityCode, code, internalInstructionType, bizChannel, refOrderId, refOrderCode, refOrderType, closed, closedBy, status, allowOverReceive, shipFromAttentionTo, shipFromAddress, shipFromCountry, shipFromState, shipFromCity, shipFromDistrict, shipFromPostalCode, shipFromMobile, shipFromEmail, totalLines, totalQty, totalAmount, totalWeight, totalVolume, totalVolumeWeight, totalFulfillAmount, totalFulfillWeight, totalFulfillVolume, totalFulfillVolumeWeight, totalFulfillQty, totalCases, totalContainers, closeAtQty, quantityUM, weightUM, volumeUM, checkInFrom, checkInTo, closedAt, sourcePlatformCode, sourceOrderCode, created, createdBy, lastUpdated, lastUpdatedBy, returnWaybillCode, returnCarrier, refundedAt, refundStatus,modified) values - (#{entity.id},#{entity.clientcode},#{entity.companycode},#{entity.storecode},#{entity.facilitycode},#{entity.code},#{entity.internalinstructiontype},#{entity.bizchannel},#{entity.reforderid},#{entity.refordercode},#{entity.refordertype},#{entity.closed},#{entity.closedby},#{entity.status},#{entity.allowoverreceive},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromcountry},#{entity.shipfromstate},#{entity.shipfromcity},#{entity.shipfromdistrict},#{entity.shipfrompostalcode},#{entity.shipfrommobile},#{entity.shipfromemail},#{entity.totallines},#{entity.totalqty},#{entity.totalamount},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.totalfulfillamount},#{entity.totalfulfillweight},#{entity.totalfulfillvolume},#{entity.totalfulfillvolumeweight},#{entity.totalfulfillqty},#{entity.totalcases},#{entity.totalcontainers},#{entity.closeatqty},#{entity.quantityum},#{entity.weightum},#{entity.volumeum},#{entity.checkinfrom},#{entity.checkinto},#{entity.closedat},#{entity.sourceplatformcode},#{entity.sourceordercode},#{entity.created},#{entity.createdby},#{entity.lastupdated},#{entity.lastupdatedby},#{entity.returnwaybillcode},#{entity.returncarrier},#{entity.refundedat},#{entity.refundstatus}) + (#{entity.id},#{entity.clientcode},#{entity.companycode},#{entity.storecode},#{entity.facilitycode},#{entity.code},#{entity.internalinstructiontype},#{entity.bizchannel},#{entity.reforderid},#{entity.refordercode},#{entity.refordertype},#{entity.closed},#{entity.closedby},#{entity.status},#{entity.allowoverreceive},#{entity.shipfromattentionto},#{entity.shipfromaddress},#{entity.shipfromcountry},#{entity.shipfromstate},#{entity.shipfromcity},#{entity.shipfromdistrict},#{entity.shipfrompostalcode},#{entity.shipfrommobile},#{entity.shipfromemail},#{entity.totallines},#{entity.totalqty},#{entity.totalamount},#{entity.totalweight},#{entity.totalvolume},#{entity.totalvolumeweight},#{entity.totalfulfillamount},#{entity.totalfulfillweight},#{entity.totalfulfillvolume},#{entity.totalfulfillvolumeweight},#{entity.totalfulfillqty},#{entity.totalcases},#{entity.totalcontainers},#{entity.closeatqty},#{entity.quantityum},#{entity.weightum},#{entity.volumeum},#{entity.checkinfrom},#{entity.checkinto},#{entity.closedat},#{entity.sourceplatformcode},#{entity.sourceordercode},#{entity.created},#{entity.createdby},#{entity.lastupdated},#{entity.lastupdatedby},#{entity.returnwaybillcode},#{entity.returncarrier},#{entity.refundedat},#{entity.refundstatus},#{entity.modified}) on duplicate key update id = values(id), @@ -571,7 +580,8 @@ returnWaybillCode = values(returnWaybillCode), returnCarrier = values(returnCarrier), refundedAt = values(refundedAt), - refundStatus = values(refundStatus) + refundStatus = values(refundStatus), + modified = values(modified) @@ -631,14 +641,17 @@ update tocofs_returngoods set returnCarrier = #{returncarrier}, refundedAt = #{refundedat}, refundStatus = #{refundstatus}, + modified = #{modified}, where id = #{id} + update tocofs_returngoods set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} where id = #{id} + update tocofs_returngoods set sts= 'N' ,modify_time = #{modify_time},modify_user_id = #{modify_user_id} @@ -697,13 +710,14 @@ update tocofs_returngoods set sts= 'N' ,modify_time = #{modify_time},modify_use and returnCarrier = #{returncarrier} and refundedAt = #{refundedat} and refundStatus = #{refundstatus} - and sts='Y' + and modified = #{modified} + -- and sts='Y' + delete from tocofs_returngoods where id = #{id} - - + \ No newline at end of file diff --git a/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToCTest.java b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToCTest.java index 31a5e597..b949e445 100644 --- a/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToCTest.java +++ b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleOutPluginInitializerToCTest.java @@ -120,7 +120,7 @@ class SoSaleOutPluginInitializerToCTest { // String aaa = "LETS-SH2024102800021196"; // soSaleOutPluginInitializerToC.startImplementStockByTime("2024-12-06 09:25:39", "2024-12-06 09:25:39"); - soSaleOutPluginInitializerToC.startImplementStockByTime("2024-12-24 21:53:57", "2024-12-24 21:53:57", "2"); +// soSaleOutPluginInitializerToC.startImplementStockByTime("2024-12-24 21:53:57", "2024-12-24 21:53:57", "2"); } catch (Exception e) { e.printStackTrace(); } @@ -129,7 +129,7 @@ class SoSaleOutPluginInitializerToCTest { try { // soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024110200030366", "stock"); -// soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024110500013375", "tran"); + soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024121200024676", "tran"); // soSaleOutPluginInitializerToC.startImplementStockByCode("LETS-SH2024111700013756", "tran"); } catch (Exception e) { diff --git a/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToCTest.java b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToCTest.java index bedd6584..e04f399d 100644 --- a/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToCTest.java +++ b/buildpackage/src/test/java/com/hzya/frame/plugin/lets/plugin/sales/SoSaleReturnPluginInitializerToCTest.java @@ -35,8 +35,8 @@ public class SoSaleReturnPluginInitializerToCTest { public void startImplement() { // soSaleReturnPluginInitializerToC.startImplement(null, null); try { - String code = "LETS-RE2024121200000274"; - soSaleReturnPluginInitializerToC.startImplementByCode(code, "tran"); + String code = "LETS-RE2024122300000847"; + soSaleReturnPluginInitializerToC.startImplementByCode(code, "stock"); } catch (Exception e) { e.printStackTrace(); } diff --git a/service/src/main/java/com/hzya/frame/ttxofs/dto/stock/StockinOrderSearchResponse.java b/service/src/main/java/com/hzya/frame/ttxofs/dto/stock/StockinOrderSearchResponse.java index 77b7ee66..39283af5 100644 --- a/service/src/main/java/com/hzya/frame/ttxofs/dto/stock/StockinOrderSearchResponse.java +++ b/service/src/main/java/com/hzya/frame/ttxofs/dto/stock/StockinOrderSearchResponse.java @@ -70,6 +70,7 @@ public class StockinOrderSearchResponse extends ReturnMessageBasics { private String refundStatus;//OFS退款完成状态 private RerturnGoodsOrderSearchData rerturnGoodsOrderSearchData;//OFS售后订单 private com.hzya.frame.ttxofs.dto.ofssalesordersearch.HeaderDetailsDto headerDetailsDto;//OFS销售订单 + private String modified; } @Data